From 6dec70cb56f09bde0619d6143d76cedf5952bb08 Mon Sep 17 00:00:00 2001 From: loveflow <5269966+loveflow@user.noreply.gitee.com> Date: Mon, 1 Apr 2024 23:39:14 +0800 Subject: [PATCH] update --- public/static/config.js | 2 +- src/components/offLineMap/index.vue | 4 +- .../components/echart/pie/dpieOne.vue | 30 +- src/loveflow/components/echart/pie/five.vue | 2 +- src/loveflow/components/echart/pie/four.vue | 2 +- .../components/echart/radar/three.vue | 6 +- src/loveflow/components/echart/radar/two.vue | 36 +-- .../compositeIndex/components/homeMap.vue | 4 +- src/views/enterpriseTopic/components/num.vue | 8 +- src/views/enterpriseTopic/listGoods/index.vue | 306 +++++++++++------- .../personSafety/keyPerson.vue | 34 +- .../enterpriseTopic/personSafety/screen.vue | 130 ++++++-- src/views/factor/components/factorMap.vue | 5 +- src/views/factor/index.vue | 4 + src/views/factorResources/map.vue | 4 +- src/views/realtimeWarning/map.vue | 4 +- 16 files changed, 359 insertions(+), 222 deletions(-) diff --git a/public/static/config.js b/public/static/config.js index bae8feb..ad94e10 100644 --- a/public/static/config.js +++ b/public/static/config.js @@ -1,5 +1,5 @@ window.$mapCfg = { - mapType: "online", //在线; offline:离线 + mapType: "offline", //在线; offline:离线 lgt: "", //经度 lat: "", //纬度 center: [121.619992, 30.025703], diff --git a/src/components/offLineMap/index.vue b/src/components/offLineMap/index.vue index 2650157..a844219 100644 --- a/src/components/offLineMap/index.vue +++ b/src/components/offLineMap/index.vue @@ -38,7 +38,9 @@ export default { this.$emit("goBack"); }, initMap() { - var BMap = window.BMap; + //var BMap = window.BMap; + let BMap = + window.$mapCfg.mapType === "online" ? window.BMapGL : window.BMap; // console.log(BMap, 'BMap'); var map = new BMap.Map("container", { style: { diff --git a/src/loveflow/components/echart/pie/dpieOne.vue b/src/loveflow/components/echart/pie/dpieOne.vue index 06fd19b..cb6b1ec 100644 --- a/src/loveflow/components/echart/pie/dpieOne.vue +++ b/src/loveflow/components/echart/pie/dpieOne.vue @@ -28,34 +28,20 @@ import * as echarts from "echarts"; import "echarts-gl"; export default { + props: { + data: { + type: Array, + default: () => { + return []; + }, + }, + }, data() { return { - data: [ - { - name: "已被核查人数", - value: 34567, - itemStyle: { - color: "#378DFF", - }, - }, - { - name: "未被核查人数", - value: 21456, - itemStyle: { - color: "#E15A4E", - }, - }, - ], - total: 1, viewH: 1, }; }, mounted() { - this.total = 1; - for (let i = 0; i < this.data.length; i++) { - this.total += this.data[i].value; - } - let temp = this.getHeight(); let height = parseInt(temp / 3); this.viewH = 2 * height; diff --git a/src/loveflow/components/echart/pie/five.vue b/src/loveflow/components/echart/pie/five.vue index 8879b4a..6d22c7c 100644 --- a/src/loveflow/components/echart/pie/five.vue +++ b/src/loveflow/components/echart/pie/five.vue @@ -46,7 +46,7 @@ export default { }, }, { - value: 20, + value: 4, name: "", itemStyle: { normal: { diff --git a/src/loveflow/components/echart/pie/four.vue b/src/loveflow/components/echart/pie/four.vue index 32cf246..6289cdf 100644 --- a/src/loveflow/components/echart/pie/four.vue +++ b/src/loveflow/components/echart/pie/four.vue @@ -46,7 +46,7 @@ export default { }, }, { - value: 20, + value: 4, name: "", itemStyle: { normal: { diff --git a/src/loveflow/components/echart/radar/three.vue b/src/loveflow/components/echart/radar/three.vue index cfb5912..92588d8 100644 --- a/src/loveflow/components/echart/radar/three.vue +++ b/src/loveflow/components/echart/radar/three.vue @@ -29,7 +29,7 @@ export default { show: false, }, tooltip: { - show: false, + show: true, }, radar: { center: ["50%", "50%"], // 外圆的位置 @@ -80,8 +80,8 @@ export default { data: [ { - value: [50, 60, 90, 30, 10, 80], - name: "商业射击馆枪支", + value: this.chartObj.yData, + name: this.chartObj.name, lineStyle: { color: "#5B8FF9", }, diff --git a/src/loveflow/components/echart/radar/two.vue b/src/loveflow/components/echart/radar/two.vue index c4177f5..bf4e750 100644 --- a/src/loveflow/components/echart/radar/two.vue +++ b/src/loveflow/components/echart/radar/two.vue @@ -42,7 +42,7 @@ export default { }, }, tooltip: { - show: false, + show: true, }, radar: { center: ["50%", "50%"], // 外圆的位置 @@ -90,39 +90,7 @@ export default { lineStyle: { width: 3, }, - - data: [ - { - value: [80, 80, 80, 70, 60, 50], - name: "猎枪", - lineStyle: { - color: "#C6403E", - }, - areaStyle: { - color: "rgba(198,64,62,0.2)", - }, - }, - { - value: [40, 70, 50, 60, 30, 80], - name: "竞技体育用枪", - lineStyle: { - color: "#FF8A5A", - }, - areaStyle: { - color: "rgba(255,138,90,0.2)", - }, - }, - { - value: [50, 60, 90, 30, 10, 80], - name: "商业射击馆枪支", - lineStyle: { - color: "#5B8FF9", - }, - areaStyle: { - color: "rgba(91,143,249,0.2)", - }, - }, - ], + data: this.chartObj.data, }, ], }; diff --git a/src/views/compositeIndex/components/homeMap.vue b/src/views/compositeIndex/components/homeMap.vue index b91172d..84b6498 100644 --- a/src/views/compositeIndex/components/homeMap.vue +++ b/src/views/compositeIndex/components/homeMap.vue @@ -21,7 +21,9 @@ export default { methods: { // 创建地图 init_map() { - let build_map = window.BMap; + //let build_map = window.BMap; + let build_map = + window.$mapCfg.mapType === "online" ? window.BMapGL : window.BMap; let map = new build_map.Map("container", { style: { styleJson, diff --git a/src/views/enterpriseTopic/components/num.vue b/src/views/enterpriseTopic/components/num.vue index f2a4801..5ec1cca 100644 --- a/src/views/enterpriseTopic/components/num.vue +++ b/src/views/enterpriseTopic/components/num.vue @@ -22,13 +22,11 @@ export default { }, methods: { setNum() { - this.num = this.num + ""; + let numStr = this.num + ""; this.numArr = []; - let length = this.num.length; - console.log(length); - console.log(this.num); + let length = numStr.length; for (let i = 0; i < length; i++) { - this.numArr.push(this.num.charAt(i)); + this.numArr.push(numStr.charAt(i)); } }, }, diff --git a/src/views/enterpriseTopic/listGoods/index.vue b/src/views/enterpriseTopic/listGoods/index.vue index 77ac368..16b7b29 100644 --- a/src/views/enterpriseTopic/listGoods/index.vue +++ b/src/views/enterpriseTopic/listGoods/index.vue @@ -1,8 +1,8 @@