From c5382b3f03170845cf10645955f602e083df2ca0 Mon Sep 17 00:00:00 2001 From: lukeyan <1727408482@qq.com> Date: Tue, 22 Aug 2023 15:18:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/map.html | 35 ++++++++++++ src/components/login.vue | 2 +- src/router/index.js | 2 +- src/utils/request.js | 4 +- src/views/compositeIndex/index.vue | 86 ++++++++++++++++++++++++++++-- src/views/head.vue | 2 +- src/views/realtimeWarning/map.vue | 3 +- src/views/safetyIndex/toubu.vue | 14 +++-- 8 files changed, 135 insertions(+), 13 deletions(-) create mode 100644 public/static/map.html diff --git a/public/static/map.html b/public/static/map.html new file mode 100644 index 0000000..1611a34 --- /dev/null +++ b/public/static/map.html @@ -0,0 +1,35 @@ + + + + + + + Document + + + + + +
+ + + + \ No newline at end of file diff --git a/src/components/login.vue b/src/components/login.vue index a3f0659..3ee1ca9 100644 --- a/src/components/login.vue +++ b/src/components/login.vue @@ -97,7 +97,7 @@ export default { if (res.code === 200) { sessionStorage.setItem('activeIndex', '1') this.$router.push({ - path: '/home/safetyIndex' + path: '/home/compositeIndex' }) } else { this.$message.error(res.msg) diff --git a/src/router/index.js b/src/router/index.js index 030555b..00e29d3 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -18,7 +18,7 @@ const routes = [ name: 'home', component: () => import('@/views/head'), children: [ - // 待用首页 + // 首页 { path: 'compositeIndex', name: 'compositeIndex', diff --git a/src/utils/request.js b/src/utils/request.js index bbddc92..56dd381 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -7,8 +7,8 @@ const request = axios.create({ //baseURL: 'http://172.18.113.50:8080/zhapi', //baseURL: 'http://172.18.113.13:8080/zhapi', // 孙强 //baseURL: 'http://192.168.0.188:8888/zhapi', - //baseURL: 'http://121.41.91.94:12002/zhapi', - baseURL: `http://${window.location.host}/zhapi`, + baseURL: 'http://121.41.91.94:12002/zhapi', + //baseURL: `http://${window.location.host}/zhapi`, timeout: 50000, headers: { 'content-type': 'application/json' }, }) diff --git a/src/views/compositeIndex/index.vue b/src/views/compositeIndex/index.vue index d58fc2b..2dddda8 100644 --- a/src/views/compositeIndex/index.vue +++ b/src/views/compositeIndex/index.vue @@ -3,6 +3,18 @@
+ +
@@ -11,6 +23,22 @@
+ +
+ + + + +
@@ -28,7 +56,7 @@ import Employee from "./components/employee"; import CompanyCar from "./components/companyCar"; import CompanyService from "./components/companyService"; import Notification from "./components/notification"; -import Endanger from "./components/endanger" +import Endanger from "./components/endanger"; export default { name: "CompositeIndex", components: { @@ -37,12 +65,35 @@ export default { CompanyCar, CompanyService, Notification, - Endanger + Endanger, }, data() { - return {}; + return { + getPageUrl:'static/map.html', // 引入在线地图 + options: [ + { + value: "1", + label: "地图", + }, + { + value: "2", + label: "排名", + }, + ], + select_value: "地图", + }; + }, + methods: { + change_map(val) { + console.log("22222", val); + if (val == "2") { + console.log("789"); + this.$router.push({ + path: "/home/safetyIndex", + }); + } + }, }, - methods: {}, }; \ No newline at end of file diff --git a/src/views/head.vue b/src/views/head.vue index 54238a9..f176be4 100644 --- a/src/views/head.vue +++ b/src/views/head.vue @@ -13,7 +13,7 @@ :router="true" >
- 综合指数
diff --git a/src/views/realtimeWarning/map.vue b/src/views/realtimeWarning/map.vue index 0280a62..7400027 100644 --- a/src/views/realtimeWarning/map.vue +++ b/src/views/realtimeWarning/map.vue @@ -44,7 +44,8 @@ export default { styleJson, }, }); - + console.log('this.dongtaiPoint[0]',this.dongtaiPoint[0]); + console.log('this.dongtaiPoint[1]',this.dongtaiPoint[1]); // console.log(this.WaringList, 'waringList'); let that = this; map.centerAndZoom( diff --git a/src/views/safetyIndex/toubu.vue b/src/views/safetyIndex/toubu.vue index 2253539..cb02b4c 100644 --- a/src/views/safetyIndex/toubu.vue +++ b/src/views/safetyIndex/toubu.vue @@ -113,11 +113,12 @@ placeholder="请选择" class="topSelect" v-if="Selectvalue == '排名'" + @change="change_map" > - - + -->
{ - console.log('ressss',res.data); + console.log("ressss", res.data); this.statisticsDangerData = res.data; }); }, @@ -278,6 +279,13 @@ export default { path: "/home/companyCanban", }); }, + change_map(val) { + if (val == "地图") { + this.$router.push({ + path: "/home/compositeIndex", + }); + } + }, }, }; -- 2.36.3