diff --git a/.env.development b/.env.development index 80890df..20bd3a3 100644 --- a/.env.development +++ b/.env.development @@ -1,11 +1,6 @@ # VITE_APP_URL = 'http://192.168.3.116:8001/' # VITE_APP_URL_WEBSOCKET = 'http://192.168.3.116:8000/api/websocket' -# VITE_APP_URL = 'http://47.112.185.26:8001/' -# VITE_APP_URL_WEBSOCKET = 'ws://47.112.185.26:8000/api/websocket' - VITE_APP_URL = 'http://api.handcuff.zhuhaiguangdun.cn' VITE_APP_URL_WEBSOCKET = 'ws://device.handcuff.zhuhaiguangdun.cn:8000/api/websocket' -# VITE_APP_URL = 'http://api.handcuff.youaikang.cn' -# VITE_APP_URL_WEBSOCKET = 'http://device.handcuff.youaikang.cn:8000/api/websocket' diff --git a/.env.production b/.env.production index 41b1104..9f311ea 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,5 @@ -VITE_APP_URL = 'http://47.112.185.26:8001/' -VITE_APP_URL_WEBSOCKET = 'ws://47.112.185.26:8000/api/websocket' +# VITE_APP_URL = 'http://47.112.185.26:8001/' +# VITE_APP_URL_WEBSOCKET = 'ws://47.112.185.26:8000/api/websocket' -# VITE_APP_URL = 'http://api.handcuff.zhuhaiguangdun.cn' -# VITE_APP_URL_WEBSOCKET = 'ws://device.handcuff.zhuhaiguangdun.cn:8000/api/websocket' \ No newline at end of file +VITE_APP_URL = 'http://api.handcuff.zhuhaiguangdun.cn' +VITE_APP_URL_WEBSOCKET = 'ws://device.handcuff.zhuhaiguangdun.cn:8000/api/websocket' \ No newline at end of file diff --git a/public/mock/role.json b/public/mock/role.json deleted file mode 100644 index 3ee9f89..0000000 --- a/public/mock/role.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "list": [ - { - "id": 1, - "name": "管理员", - "key": "admin", - "status": true, - "permiss": [ - "0", - "1", - "11", - "12", - "13", - "2", - "21", - "22", - "23", - "24", - "3", - "31", - "32", - "33", - "331", - "332", - "4", - "41", - "42", - "5" - ] - }, - { - "id": 2, - "name": "普通用户", - "key": "user", - "status": true, - "permiss": [ - "0", - "1", - "11", - "12", - "13" - ] - } - ], - "pageTotal": 2 -} \ No newline at end of file diff --git a/public/mock/table.json b/public/mock/table.json deleted file mode 100644 index abbbace..0000000 --- a/public/mock/table.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "list": [ - { - "id": 1, - "name": "张三", - "money": 123, - "address": "广东省东莞市长安镇", - "state": true, - "date": "2019-11-1", - "thumb": "https://lin-xin.gitee.io/images/post/wms.png" - }, - { - "id": 2, - "name": "李四", - "money": 456, - "address": "广东省广州市白云区", - "state": true, - "date": "2019-10-11", - "thumb": "https://lin-xin.gitee.io/images/post/node3.png" - }, - { - "id": 3, - "name": "王五", - "money": 789, - "address": "湖南省长沙市", - "state": false, - "date": "2019-11-11", - "thumb": "https://lin-xin.gitee.io/images/post/parcel.png" - }, - { - "id": 4, - "name": "赵六", - "money": 1011, - "address": "福建省厦门市鼓浪屿", - "state": true, - "date": "2019-10-20", - "thumb": "https://lin-xin.gitee.io/images/post/notice.png" - } - ], - "pageTotal": 4 -} \ No newline at end of file diff --git a/public/mock/user.json b/public/mock/user.json deleted file mode 100644 index 079b73b..0000000 --- a/public/mock/user.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "list": [ - { - "id": 1, - "name": "张三", - "password": "123", - "email": "123@qq.com", - "phone": "12345678944", - "date": "2024-01-01", - "role": "管理员" - }, - { - "id": 2, - "name": "李四", - "password": "123", - "email": "1234@qq.com", - "phone": "12345678945", - "date": "2024-01-01", - "role": "普通用户" - } - ], - "pageTotal": 2 -} \ No newline at end of file diff --git a/src/api/index.d.ts b/src/api/index.d.ts index 233ab1a..24af3f0 100644 --- a/src/api/index.d.ts +++ b/src/api/index.d.ts @@ -337,6 +337,7 @@ export namespace TWarningDetail { creatUser: string createTime: string deviceId: string + polygon?: string healthData: THealthData[] id: number lat: number diff --git a/src/utils/mapCustom.js b/src/utils/mapCustom.js index c0fc8eb..702a004 100644 --- a/src/utils/mapCustom.js +++ b/src/utils/mapCustom.js @@ -39,6 +39,25 @@ export class MapCustom { }); } + + polygon(list) { + if (!list) return; + let pathList = []; + list.forEach((item, index) => { + let lngLat = new AMap.LngLat(item.lng, item.lat); + pathList.push(lngLat); + }); + const circle = new AMap.Polygon({ + map: this.map, + path: pathList, // 圆心位置 + strokeWeight: 2, + strokeStyle: "solid", + fillColor: "#00aeff57", + strokeColor: "#00AEFF", //描边颜色 + fillOpacity: 0.3, //填充透明度 + }); + this.map.add([circle]) + } draw() { return new Promise((resolve) => { this.drawResolve = resolve; diff --git a/src/views/incidentDispose/index.vue b/src/views/incidentDispose/index.vue index ceef1b2..3ee429e 100644 --- a/src/views/incidentDispose/index.vue +++ b/src/views/incidentDispose/index.vue @@ -86,7 +86,7 @@