diff --git a/packages/bigscreen/designer/components/componentConfig.vue b/packages/bigscreen/designer/components/componentConfig.vue
index f81f5302..2cc8e4f1 100644
--- a/packages/bigscreen/designer/components/componentConfig.vue
+++ b/packages/bigscreen/designer/components/componentConfig.vue
@@ -39,11 +39,17 @@
-
+
+
+
+
+
+
+
config.echartOps=$echartTpls[v]"/>
@@ -185,14 +191,7 @@
-
-
-
-
+
@@ -202,7 +201,7 @@
-
+
@@ -219,7 +218,6 @@ import {monitorTypes} from "../config";
import JsonEditor from "./jsonEditor.vue";
import ChartPicker from "./chartPicker.vue";
import AiDvSummary from "@dui/dv/layout/AiDvSummary/AiDvSummary";
-import Vue from "vue";
export default {
name: 'componentConfig',
@@ -239,14 +237,17 @@ export default {
{label: '否', value: '0'}
],
dialog: {},
- monitorTypes
+ monitorTypes,
+ positionList: [
+ {label: "左上", id: "lt"},
+ {label: "右上", id: "rt"},
+ {label: "左下", id: "lb"},
+ {label: "右下", id: "rb"}
+ ]
}
},
computed: {
- summaryList: () => Object.keys(AiDvSummary.components)
- },
- created() {
- console.log(Vue.component("AiDvSummary"))
+ summaryOps: () => Object.keys(AiDvSummary.components).map(e => ({label: e, id: e})),
}
}
diff --git a/packages/bigscreen/designer/components/datasourcePicker.vue b/packages/bigscreen/designer/components/datasourcePicker.vue
index 0fe831c1..65927ac5 100644
--- a/packages/bigscreen/designer/components/datasourcePicker.vue
+++ b/packages/bigscreen/designer/components/datasourcePicker.vue
@@ -102,7 +102,7 @@ export default {
methods: {
changeData(sdata) {
this.source.dataType == 'staticData' ? this.source.staticData = sdata :
- new DvCompData(this.source.dataType, this.source, this.instance).getData().then(data => {
+ new DvCompData(this.source, this.instance).getData().then(data => {
this.source[this.source.dataType] = data
})
}
diff --git a/packages/bigscreen/designer/config.js b/packages/bigscreen/designer/config.js
index 4ff626dc..579edfff 100644
--- a/packages/bigscreen/designer/config.js
+++ b/packages/bigscreen/designer/config.js
@@ -437,7 +437,7 @@ const maps = [{
layers: 'vector'
}, {
type: 'AiDvMap',
- label: '地图',
+ label: 'echart地图',
display: 'map',
width: 840,
height: 534,
@@ -458,7 +458,7 @@ const maps = [{
thumb: 'https://cdn.cunwuyun.cn/dvcp/dv/tpl/map.png',
is3dAround: '0',
limitArea: '0',
-}, {type: "linkageMap", label: "联动地图", width: 800, height: 964, top: 0, left: 560, thumb: "https://cdn.cunwuyun.cn/dvcp/dv/tpl/linkageMap.png"}]
+}, {type: "linkageMap", label: "联动地图", width: 800, height: 964, top: 0, left: 560, thumb: "https://cdn.cunwuyun.cn/dvcp/dv/tpl/linkageMap.png", dataType: 'staticData'}]
const customHtml = {
label: "HTML块", type: "html", list: [{
type: 'html',
diff --git a/packages/bigscreen/designer/viewport.vue b/packages/bigscreen/designer/viewport.vue
index 92453397..055847c1 100644
--- a/packages/bigscreen/designer/viewport.vue
+++ b/packages/bigscreen/designer/viewport.vue
@@ -504,7 +504,6 @@ export default {
window.open(origin + pathname + '?id=' + this.$route.query.did + "#preview")
},
setCurLayer(v) {
- console.log(v)
this.componentList.splice(this.activeIndex, 1, v)
}
},
diff --git a/ui/dv/AiDvRender.vue b/ui/dv/AiDvRender.vue
index ea5b3140..ed665ba0 100644
--- a/ui/dv/AiDvRender.vue
+++ b/ui/dv/AiDvRender.vue
@@ -64,6 +64,7 @@
+
@@ -81,6 +82,7 @@ import AiDvSummary from "./layout/AiDvSummary/AiDvSummary";
import AiDvPlot from "./layout/AiDvPlot/AiDvPlot.vue";
import AiAssist from "./AiAssist.vue";
import AiMonitorCarousel from "./AiMonitorCarousel.vue";
+import AiLinkageMap from "./AiLinkageMap.vue";
Vue.use(scrollBoard)
@@ -88,6 +90,7 @@ export default {
name: 'AiDvRender',
props: ['data', 'index', 'theme', 'instance'],
components: {
+ AiLinkageMap,
AiMonitorCarousel,
AiAssist,
AiDvPlot,
@@ -106,7 +109,8 @@ export default {
lib: null,
timer: null,
dvTableConfig: [],
- mapDialog: false
+ mapDialog: false,
+ areaId: ""
}
},
computed: {
diff --git a/ui/dv/AiLinkageMap.vue b/ui/dv/AiLinkageMap.vue
new file mode 100644
index 00000000..69a766b1
--- /dev/null
+++ b/ui/dv/AiLinkageMap.vue
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
diff --git a/ui/dv/index.js b/ui/dv/index.js
index 7ff9f3bf..f76f466e 100644
--- a/ui/dv/index.js
+++ b/ui/dv/index.js
@@ -38,22 +38,22 @@ export class DvCompData {
staticData: "静态数据", dynamicData: "动态数据", apiData: "接口数据", htmlData: "HTML数据"
}
- constructor(type, dataConfig = {}, instance) {
+ constructor(dataConfig = {dataType: ""}, instance) {
this.instance = instance
- this.type = type
+ this.type = dataConfig.dataType
this.params = dataConfig
}
- getData() {
+ getData(params) {
return this.type == 'staticData' ? this.getStaticData() :
this.type == 'htmlData' ? this.getStaticData() :
- this.type == 'dynamicData' ? this.getDynamicData() :
- this.type == 'apiData' ? this.getApiData() : []
+ this.type == 'dynamicData' ? this.getDynamicData(params) :
+ this.type == 'apiData' ? this.getApiData(params) : Promise.resolve([])
}
- getDynamicData() {
+ getDynamicData(params) {
const {sourceDataId: id} = this.params
- return id ? this.getAsyncData(`/app/appdiylargescreen/statisticsByLsid?id=${id}`) : Promise.reject("未获取到数据源id")
+ return id ? this.getAsyncData(`/app/appdiylargescreen/statisticsByLsid?id=${id}`, params) : Promise.reject("未获取到数据源id")
}
getStaticData() {
@@ -63,13 +63,13 @@ export class DvCompData {
})
}
- getApiData() {
+ getApiData(params) {
const {api} = this.params
- return api ? this.getAsyncData(api) : Promise.reject("未获取到api")
+ return api ? this.getAsyncData(api, params) : Promise.reject("未获取到api")
}
- getAsyncData(api) {
- return this.instance.post(api).then(res => {
+ getAsyncData(api, params) {
+ return this.instance.post(api, null, {params}).then(res => {
if (res?.data) {
const list = res.data,
firstRecord = list?.[0] || {},
diff --git a/ui/dv/layout/AiDvPlot/AiDvPlot.vue b/ui/dv/layout/AiDvPlot/AiDvPlot.vue
index 07ed9518..36d892db 100644
--- a/ui/dv/layout/AiDvPlot/AiDvPlot.vue
+++ b/ui/dv/layout/AiDvPlot/AiDvPlot.vue
@@ -72,7 +72,7 @@ export default {
this.getChartData()
},
getChartData() {
- return new DvCompData(this.plot.dataType, this.plot, this.instance).getData().then(source => {
+ return new DvCompData(this.plot, this.instance).getData().then(source => {
if (this.tpl.series?.type == 'pie') {
let data
if (source?.length == 1) {