Merge pull request #2166 from dataease/pr@dev@feat_marker_map

feat: dataease适配符号地图插件
This commit is contained in:
fit2cloud-chenyw 2022-04-25 13:01:37 +08:00 committed by GitHub
commit 3ed388d7b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 2 deletions

View File

@ -503,6 +503,9 @@ public class ChartViewService {
// 如果是插件视图 走插件内部的逻辑
if (ObjectUtils.isNotEmpty(view.getIsPlugin()) && view.getIsPlugin()) {
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("yAxis", yAxis);
fieldMap.put("extStack", extStack);

View File

@ -1,6 +1,7 @@
package io.dataease.service.sys;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.ZipUtil;
import com.google.gson.Gson;
import io.dataease.dto.MyPluginDTO;
import io.dataease.ext.ExtSysPluginMapper;
@ -72,8 +73,9 @@ public class PluginService {
//2.解压目标文件dest 得到plugin.json和jar
String folder = pluginDir + "folder/";
try {
ZipUtils.unzip(dest, folder);
} catch (IOException e) {
ZipUtil.unzip(dest.getAbsolutePath(), folder);
// ZipUtils.unzip(dest, folder);
} catch (Exception e) {
DeFileUtils.deleteFile(pluginDir + "temp/");
DeFileUtils.deleteFile(folder);
// 需要删除文件

View File

@ -21,7 +21,14 @@
:ref="element.propValue.id"
:component-name="chart.type + '-view'"
:obj="{chart, trackMenu, searchCount, terminalType: scaleCoefficientType}"
:chart="chart"
:track-menu="trackMenu"
:search-count="searchCount"
:terminal-type="scaleCoefficientType"
:scale="scale"
class="chart-class"
@onChartClick="chartClick"
@onJumpClick="jumpClick"
/>
<chart-component
v-else-if="charViewShowFlag"

View File

@ -7,6 +7,7 @@
v-if="chart.isPlugin"
:component-name="chart.type + '-view'"
:obj="{chart: mapChart || chart}"
:chart="mapChart || chart"
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" />

View File

@ -5,6 +5,7 @@
v-if="chart.isPlugin"
:component-name="chart.type + '-view'"
:obj="{chart: mapChart || chart}"
:chart="mapChart || chart"
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" />

View File

@ -962,7 +962,10 @@
ref="dynamicChart"
:component-name="chart.type + '-view'"
:obj="{chart}"
:chart-id="chart.id"
:chart="chart"
class="chart-class"
@onChartClick="chartClick"
/>
<chart-component
v-else-if="httpRequest.status && chart.type && !chart.type.includes('table') && !chart.type.includes('text') && chart.type !== 'label' && renderComponent() === 'echarts'"

View File

@ -5,6 +5,8 @@
:ref="refId"
:url="url"
:obj="obj"
v-bind="$attrs"
v-on="$listeners"
@execute-axios="executeAxios"
@on-add-languanges="addLanguages"
@plugin-call-back="pluginCallBack"
@ -26,6 +28,7 @@ export default {
components: {
AsyncComponent
},
inheritAttrs: true,
props: {
componentName: {
type: String,