From 3ebbc2428787332807d6de215dd23072079b800c Mon Sep 17 00:00:00 2001 From: ZZJ <zzjdsg2300@163.com> Date: 星期三, 24 十一月 2021 17:16:39 +0800 Subject: [PATCH] 地图 --- src/api/helemt.ts | 20 +++++----- vue.config.js | 7 +-- src/pages/internetEquipment/components/realTimeItem.vue | 28 +++++++------- src/pages/internetEquipment/module/realTimeModule.vue | 8 ++-- src/pages/internetEquipment/views/helemetEquipment.vue | 7 +++ src/pages/internetEquipment/module/elecModule.vue | 2 src/pages/internetEquipment/module/mapIndex.vue | 2 7 files changed, 38 insertions(+), 36 deletions(-) diff --git a/src/api/helemt.ts b/src/api/helemt.ts index 9dc8d6f..cf1a5e6 100644 --- a/src/api/helemt.ts +++ b/src/api/helemt.ts @@ -2,7 +2,7 @@ export const getHelemtData = (data: any) => { return request({ - url: "/temp/iotdata/devices", + url: "/iotdata/devices", method: "post", data }) @@ -10,7 +10,7 @@ export const sendAudio = (id,data: any) => { return request({ - url: `/temp/iotdata/audio/?sn=${id}`, + url: `/iotdata/audio/?sn=${id}`, method: "post", data }) @@ -18,42 +18,42 @@ export const getBanner = () => { return request({ - url: `/temp/iotdata/banner-info`, + url: `/iotdata/banner-info`, method: "get", }) } export const getChart = () => { return request({ - url: `/temp/iotdata/seven-day`, + url: `/iotdata/seven-day`, method: "get", }) } export const lowBattery = () => { return request({ - url: `/temp/iotdata/low-battery`, + url: `/iotdata/low-battery`, method: "post", }) } export const outBound = () => { return request({ - url: `/temp/iotdata/out-bound`, + url: `/iotdata/out-bound`, method: "post", }) } export const historyWarn = () => { return request({ - url: `/temp/iotdata/history`, + url: `/iotdata/history`, method: "post", }) } export const handleWarn = (data) => { return request({ - url: `/temp/iotdata/handle-warn`, + url: `/iotdata/handle-warn`, method: "post", data }) @@ -61,7 +61,7 @@ export const getZones = (data) => { return request({ - url: `/temp/iotdata/zones`, + url: `/iotdata/zones`, method: "post", data }) @@ -69,7 +69,7 @@ export const createZones = (data) => { return request({ - url: `/temp/iotdata/create-zone`, + url: `/iotdata/create-zone`, method: "post", data }) diff --git a/src/pages/internetEquipment/components/realTimeItem.vue b/src/pages/internetEquipment/components/realTimeItem.vue index 791da22..383440e 100644 --- a/src/pages/internetEquipment/components/realTimeItem.vue +++ b/src/pages/internetEquipment/components/realTimeItem.vue @@ -1,29 +1,29 @@ <template> <div class="realTimeItem"> - <warnDescription/> + <warnDescription /> </div> </template> <script> -import warnDescription from '@/pages/internetEquipment/components/warnDescription' +import warnDescription from "@/pages/internetEquipment/components/warnDescription"; export default { - props :{ - warnObj:{ - type:Object - }, + props: { + boundArr: { + type: Object, }, - components :{ - warnDescription - } -} + }, + components: { + warnDescription, + }, +}; </script> <style scoped lang="scss"> .realTimeItem { - display: flex; - flex-direction: column; - width: 167px; - height: 134px; + display: flex; + flex-direction: column; + width: 167px; + height: 134px; } </style> \ No newline at end of file diff --git a/src/pages/internetEquipment/module/elecModule.vue b/src/pages/internetEquipment/module/elecModule.vue index 08d2c5d..7e2ec79 100644 --- a/src/pages/internetEquipment/module/elecModule.vue +++ b/src/pages/internetEquipment/module/elecModule.vue @@ -84,7 +84,7 @@ .colobox { position: absolute; top: 2px; - left: 10px; + left: 5px; width: 29px; height: 15px; border-radius: 2px; diff --git a/src/pages/internetEquipment/module/mapIndex.vue b/src/pages/internetEquipment/module/mapIndex.vue index a4a648d..e295056 100644 --- a/src/pages/internetEquipment/module/mapIndex.vue +++ b/src/pages/internetEquipment/module/mapIndex.vue @@ -300,7 +300,7 @@ return { name, dots: data, - id: item.id, + id: +item.id, }; }); const res = await createZones({ dots_arr: arrData }); diff --git a/src/pages/internetEquipment/module/realTimeModule.vue b/src/pages/internetEquipment/module/realTimeModule.vue index 190a5e0..140629d 100644 --- a/src/pages/internetEquipment/module/realTimeModule.vue +++ b/src/pages/internetEquipment/module/realTimeModule.vue @@ -1,8 +1,8 @@ <template> <div class="real-time-module"> <div class="title">瀹炴椂鎶撴媿棰勮</div> - <div class="real-time-item" v-for="(item, index) in warnArr" :key="index"> - <img src="/images/settings/background.png" alt="" class="warnArea" /> + <div class="real-time-item" v-for="(item, index) in boundArr" :key="index"> + <img :src="item.snap_shot" alt="" class="warnArea" /> <warnDescription :warnDes="{ code: item.device_sn, @@ -20,7 +20,7 @@ import warnDescription from "@/pages/internetEquipment/components/warnDescription"; export default { props: { - warnArr: { + boundArr: { type: Array, }, }, @@ -52,7 +52,7 @@ } .real-time-item { - margin-right: 14px; + margin-right: 13px; } .warnArea { width: 167px; diff --git a/src/pages/internetEquipment/views/helemetEquipment.vue b/src/pages/internetEquipment/views/helemetEquipment.vue index ab9f851..ee3abec 100644 --- a/src/pages/internetEquipment/views/helemetEquipment.vue +++ b/src/pages/internetEquipment/views/helemetEquipment.vue @@ -32,6 +32,7 @@ }, data() { return { + boundArr: [], warnArr: [], lowBatteryArr: [], }; @@ -64,8 +65,12 @@ .footer { height: 292px; display: flex; - justify-content: space-between; + justify-content: start; color: #4f4f4f; + + .elec-module { + margin: 0 20px; + } } } </style> \ No newline at end of file diff --git a/vue.config.js b/vue.config.js index 0142447..f4b88d8 100644 --- a/vue.config.js +++ b/vue.config.js @@ -40,7 +40,7 @@ // } }); -// const serverUrl = "http://58.118.225.79:41243" // 缇婁簲 +// const serverUrl = "http://192.168.20.189/:7009"; // 缇婁簲 const serverUrl = "http://192.168.8.10:7009"; const serverUrl2 = "http://192.168.8.10:9000"; // const serverUrl = "http://192.168.20.10:7009"; @@ -129,12 +129,9 @@ target: serverUrl, changeOrigin: true, //寮�鍚唬鐞� }, - "/temp": { + "/iotdata": { target: serverUrl2, changeOrigin: true, //寮�鍚唬鐞�, - pathRewrite: { - "/temp": "", - }, }, }, }, -- Gitblit v1.8.0