提交 f4130f61 authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw

feat: dataease适配符号地图插件

上级 a5d8d6cb
...@@ -503,6 +503,9 @@ public class ChartViewService { ...@@ -503,6 +503,9 @@ public class ChartViewService {
// 如果是插件视图 走插件内部的逻辑 // 如果是插件视图 走插件内部的逻辑
if (ObjectUtils.isNotEmpty(view.getIsPlugin()) && view.getIsPlugin()) { if (ObjectUtils.isNotEmpty(view.getIsPlugin()) && view.getIsPlugin()) {
Map<String, List<ChartViewFieldDTO>> fieldMap = new HashMap<>(); Map<String, List<ChartViewFieldDTO>> fieldMap = new HashMap<>();
List<ChartViewFieldDTO> xAxisExt = new Gson().fromJson(view.getXAxisExt(), new TypeToken<List<ChartViewFieldDTO>>() {
}.getType());
fieldMap.put("xAxisExt",xAxisExt);
fieldMap.put("xAxis", xAxis); fieldMap.put("xAxis", xAxis);
fieldMap.put("yAxis", yAxis); fieldMap.put("yAxis", yAxis);
fieldMap.put("extStack", extStack); fieldMap.put("extStack", extStack);
......
package io.dataease.service.sys; package io.dataease.service.sys;
import cn.hutool.core.io.FileUtil; import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.ZipUtil;
import com.google.gson.Gson; import com.google.gson.Gson;
import io.dataease.dto.MyPluginDTO; import io.dataease.dto.MyPluginDTO;
import io.dataease.ext.ExtSysPluginMapper; import io.dataease.ext.ExtSysPluginMapper;
...@@ -72,8 +73,9 @@ public class PluginService { ...@@ -72,8 +73,9 @@ public class PluginService {
//2.解压目标文件dest 得到plugin.json和jar //2.解压目标文件dest 得到plugin.json和jar
String folder = pluginDir + "folder/"; String folder = pluginDir + "folder/";
try { try {
ZipUtils.unzip(dest, folder); ZipUtil.unzip(dest.getAbsolutePath(), folder);
} catch (IOException e) { // ZipUtils.unzip(dest, folder);
} catch (Exception e) {
DeFileUtils.deleteFile(pluginDir + "temp/"); DeFileUtils.deleteFile(pluginDir + "temp/");
DeFileUtils.deleteFile(folder); DeFileUtils.deleteFile(folder);
// 需要删除文件 // 需要删除文件
......
...@@ -21,7 +21,14 @@ ...@@ -21,7 +21,14 @@
:ref="element.propValue.id" :ref="element.propValue.id"
:component-name="chart.type + '-view'" :component-name="chart.type + '-view'"
:obj="{chart, trackMenu, searchCount, terminalType: scaleCoefficientType}" :obj="{chart, trackMenu, searchCount, terminalType: scaleCoefficientType}"
:chart="chart"
:track-menu="trackMenu"
:search-count="searchCount"
:terminal-type="scaleCoefficientType"
:scale="scale"
class="chart-class" class="chart-class"
@onChartClick="chartClick"
@onJumpClick="jumpClick"
/> />
<chart-component <chart-component
v-else-if="charViewShowFlag" v-else-if="charViewShowFlag"
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
v-if="chart.isPlugin" v-if="chart.isPlugin"
:component-name="chart.type + '-view'" :component-name="chart.type + '-view'"
:obj="{chart: mapChart || chart}" :obj="{chart: mapChart || chart}"
:chart="mapChart || chart"
class="chart-class" class="chart-class"
/> />
<chart-component v-else-if="!chart.type.includes('text') && chart.type !== 'label' && !chart.type.includes('table') && renderComponent() === 'echarts'" class="chart-class" :chart="mapChart || chart" /> <chart-component v-else-if="!chart.type.includes('text') && chart.type !== 'label' && !chart.type.includes('table') && renderComponent() === 'echarts'" class="chart-class" :chart="mapChart || chart" />
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
v-if="chart.isPlugin" v-if="chart.isPlugin"
:component-name="chart.type + '-view'" :component-name="chart.type + '-view'"
:obj="{chart: mapChart || chart}" :obj="{chart: mapChart || chart}"
:chart="mapChart || chart"
class="chart-class" class="chart-class"
/> />
<chart-component v-else-if="!chart.type.includes('text') && chart.type !== 'label' && !chart.type.includes('table') && renderComponent() === 'echarts'" class="chart-class" :chart="mapChart || chart" /> <chart-component v-else-if="!chart.type.includes('text') && chart.type !== 'label' && !chart.type.includes('table') && renderComponent() === 'echarts'" class="chart-class" :chart="mapChart || chart" />
......
...@@ -962,7 +962,10 @@ ...@@ -962,7 +962,10 @@
ref="dynamicChart" ref="dynamicChart"
:component-name="chart.type + '-view'" :component-name="chart.type + '-view'"
:obj="{chart}" :obj="{chart}"
:chart-id="chart.id"
:chart="chart"
class="chart-class" class="chart-class"
@onChartClick="chartClick"
/> />
<chart-component <chart-component
v-else-if="httpRequest.status && chart.type && !chart.type.includes('table') && !chart.type.includes('text') && chart.type !== 'label' && renderComponent() === 'echarts'" v-else-if="httpRequest.status && chart.type && !chart.type.includes('table') && !chart.type.includes('text') && chart.type !== 'label' && renderComponent() === 'echarts'"
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
:ref="refId" :ref="refId"
:url="url" :url="url"
:obj="obj" :obj="obj"
v-bind="$attrs"
v-on="$listeners"
@execute-axios="executeAxios" @execute-axios="executeAxios"
@on-add-languanges="addLanguages" @on-add-languanges="addLanguages"
@plugin-call-back="pluginCallBack" @plugin-call-back="pluginCallBack"
...@@ -26,6 +28,7 @@ export default { ...@@ -26,6 +28,7 @@ export default {
components: { components: {
AsyncComponent AsyncComponent
}, },
inheritAttrs: true,
props: { props: {
componentName: { componentName: {
type: String, type: String,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论