From 640e2b36ba05e7f73b784d92c397068b273d8976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=8A=B2=E9=BE=99?= <2860996570@qq.com> Date: Wed, 11 Sep 2024 10:04:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=9C=B0=E5=B8=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/MapCars.vue | 65 +++++++++++++++++-- src/views/components/MapCarsLog.vue | 44 ++++++++++++- .../components/healthSon/mySortChange.js | 4 +- .../productsMsg/components/productInfo.vue | 2 +- 4 files changed, 104 insertions(+), 11 deletions(-) diff --git a/src/views/components/MapCars.vue b/src/views/components/MapCars.vue index 2355279..88c1245 100644 --- a/src/views/components/MapCars.vue +++ b/src/views/components/MapCars.vue @@ -132,7 +132,23 @@ export default { this.chartDatatow = [] this.chartData = [] if (this.echartstitle == "医疗器械") { - let msg1 = await this.$api.apparatus.typecount({ area: this.mystortTow }); + let cities = { + '沈阳市': 210100000000, + '大连市': 210200000000, + '鞍山市': 210300000000, + '抚顺市': 210400000000, + '本溪市': 210500000000, + '丹东市': 210600000000, + '锦州市': 210700000000, + '营口市': 210800000000, + '阜新市': 210900000000, + '辽阳市': 211000000000, + '盘锦市': 211100000000, + '铁岭市': 211200000000, + '朝阳市': 211300000000, + '葫芦岛市': 211400000000 + } + let msg1 = await this.$api.apparatus.typecount({ area:cities[this.mystortTow] }); if (msg1.code == 200) { msg1.data.forEach(item => { this.chartDatatow.push(item.count) @@ -237,7 +253,46 @@ export default { } let _this = this if (this.echartstitle == "医疗器械") { - jiekou("ylqxJnyelcpareacount") + // jiekou("ylqxJnyelcpareacount") + let cities = { + 210100000000: '沈阳市', + 210200000000: '大连市', + 210300000000: '鞍山市', + 210400000000: '抚顺市', + 210500000000: '本溪市', + 210600000000: '丹东市', + 210700000000: '锦州市', + 210800000000: '营口市', + 210900000000: '阜新市', + 211000000000: '辽阳市', + 211100000000: '盘锦市', + 211200000000: '铁岭市', + 211300000000: '朝阳市', + 211400000000: '葫芦岛市' + } + let msg2 = await _this.$api.apparatus["ylqxJnyelcpareacount"](_this.form) + if (msg2.code == 200) { + msg2.data.forEach(item => { + _this.cityData[cities[item.area]] = item.count || item.countOne + + }) + if (_this.mytype == "healtson") { + _this.cartData.forEach((item) => { + var foundItem = msg2.data.find(data => data.area == item); + if (foundItem) { + _this.chartDatatow.push(foundItem.count || foundItem.countOne) + _this.chartData.push(foundItem.area) + } else { + _this.chartDatatow.push(0) + _this.chartData.push(item) + } + }); + } + } + _this.initPoitCenter(_this.cityData); + if (_this.mytype == "healtson") { + _this.mycharts() + } } else if (this.echartstitle == "药品") { jiekou("vRdgYpwhGxwztareacount") } else if (this.echartstitle == "传统中药") { @@ -321,7 +376,7 @@ export default { } }, - ops(chartData, chartDatatow,bzc) { + ops(chartData, chartDatatow, bzc) { return { tooltip: { trigger: 'axis', @@ -392,8 +447,8 @@ export default { }; }, Yaotongyi(data) { - this.myChart2.setOption(this.ops(this.chartDataYao1, this.chartDatatowYao1,15), true); - this.myChart3.setOption(this.ops(this.chartDataYao2, this.chartDatatowYao2,2), true); + this.myChart2.setOption(this.ops(this.chartDataYao1, this.chartDatatowYao1, 15), true); + this.myChart3.setOption(this.ops(this.chartDataYao2, this.chartDatatowYao2, 2), true); }, initMap() { this.globalMap = L.map("leafletMap", { diff --git a/src/views/components/MapCarsLog.vue b/src/views/components/MapCarsLog.vue index 04b225e..bf723a1 100644 --- a/src/views/components/MapCarsLog.vue +++ b/src/views/components/MapCarsLog.vue @@ -194,8 +194,7 @@ export default { }) } else { - this.chartDatatow = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - ] + this.chartDatatow = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] this.chartData = ["散剂", "片剂", "颗粒剂", @@ -256,7 +255,46 @@ export default { let _this = this var combinedData = []; if (this.echartstitle == "医疗器械") { - jiekou("ylqxJnyelcpareacount") + let cities = { + 210100000000: '沈阳市', + 210200000000: '大连市', + 210300000000: '鞍山市', + 210400000000: '抚顺市', + 210500000000: '本溪市', + 210600000000: '丹东市', + 210700000000: '锦州市', + 210800000000: '营口市', + 210900000000: '阜新市', + 211000000000: '辽阳市', + 211100000000: '盘锦市', + 211200000000: '铁岭市', + 211300000000: '朝阳市', + 211400000000: '葫芦岛市' + } + let msg2 = await _this.$api.apparatus["ylqxJnyelcpareacount"](_this.form) + if (msg2.code == 200) { + msg2.data.forEach(item => { + _this.cityData[cities[item.area]] = item.count || item.countOne + + }) + if (_this.mytype == "healtson") { + _this.cartData.forEach((item) => { + var foundItem = msg2.data.find(data => cities[data.area] == item); + + if (foundItem) { + _this.chartDatatow.push(foundItem.count || foundItem.countOne) + _this.chartData.push( cities[foundItem.area]) + } else { + _this.chartDatatow.push(0) + _this.chartData.push(item) + } + }); + } + } + _this.initPoitCenter(_this.cityData); + if (_this.mytype == "healtson") { + _this.mycharts() + } } else if (this.echartstitle == "药品") { jiekou("vRdgYpwhGxwztareacount") } else if (this.echartstitle == "传统中药") { diff --git a/src/views/productsMsg/components/healthSon/mySortChange.js b/src/views/productsMsg/components/healthSon/mySortChange.js index 05c04fc..4ad8cdb 100644 --- a/src/views/productsMsg/components/healthSon/mySortChange.js +++ b/src/views/productsMsg/components/healthSon/mySortChange.js @@ -57,9 +57,9 @@ export const mySortChange = { 211100000000: '盘锦市', 211200000000: '铁岭市', 211300000000: '朝阳市', - 211400000000: '葫芦岛市' + 211400000000: '葫芦岛市', } - return cities[type] || "外地" + return cities[type] || "暂无" } } }; \ No newline at end of file diff --git a/src/views/productsMsg/components/productInfo.vue b/src/views/productsMsg/components/productInfo.vue index 05f1046..9979df8 100644 --- a/src/views/productsMsg/components/productInfo.vue +++ b/src/views/productsMsg/components/productInfo.vue @@ -47,7 +47,7 @@ export default { // }&flag=${this.$route.query.flag}&data=${this.$route.query.data // }&token=${localStorage.getItem("MSSM-LIAONING__TOKEN")}&bah=${this.$route.query.bah}` - this.Url = `http://localhost:81?type=${this.$route.query.type + this.Url = `http://localhost:82?type=${this.$route.query.type }&flag=${this.$route.query.flag}&data=${this.$route.query.data }&token=${localStorage.getItem("MSSM-LIAONING__TOKEN")}&bah=${this.$route.query.bah}`