diff --git a/web/package.json b/web/package.json index 3ab0940..f222ab6 100644 --- a/web/package.json +++ b/web/package.json @@ -76,6 +76,7 @@ "vue-i18n": "11.1.12", "vue-router": "4.4.5", "vue-types": "^5.1.1", + "vue-virtual-scroller": "2.0.0-beta.8", "vue3-signature": "^0.2.4", "vuedraggable": "^4.1.0", "web-storage-cache": "^1.1.1", diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index d1fe3f0..4fb9cee 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -167,6 +167,9 @@ importers: vue-types: specifier: ^5.1.1 version: 5.1.3(vue@3.5.24(typescript@5.3.3)) + vue-virtual-scroller: + specifier: 2.0.0-beta.8 + version: 2.0.0-beta.8(vue@3.5.24(typescript@5.3.3)) vue3-signature: specifier: ^0.2.4 version: 0.2.4(vue@3.5.24(typescript@5.3.3)) @@ -4267,6 +4270,9 @@ packages: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} + mitt@2.1.0: + resolution: {integrity: sha512-ILj2TpLiysu2wkBbWjAmww7TkZb65aiQO+DkVdUTBpBXq+MHYiETENkKFMtsJZX1Lf4pe4QOrTSjIfUwN5lRdg==} + mitt@3.0.1: resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} @@ -5392,6 +5398,16 @@ packages: peerDependencies: vue: ^3.0.0 + vue-observe-visibility@2.0.0-alpha.1: + resolution: {integrity: sha512-flFbp/gs9pZniXR6fans8smv1kDScJ8RS7rEpMjhVabiKeq7Qz3D9+eGsypncjfIyyU84saU88XZ0zjbD6Gq/g==} + peerDependencies: + vue: ^3.0.0 + + vue-resize@2.0.0-alpha.1: + resolution: {integrity: sha512-7+iqOueLU7uc9NrMfrzbG8hwMqchfVfSzpVlCMeJQe4pyibqyoifDNbKTZvwxZKDvGkB+PdFeKvnGZMoEb8esg==} + peerDependencies: + vue: ^3.0.0 + vue-router@4.4.5: resolution: {integrity: sha512-4fKZygS8cH1yCyuabAXGUAsyi1b2/o/OKgu/RUb+znIYOxPRxdkytJEx+0wGcpBE1pX6vUgh5jwWOKRGvuA/7Q==} peerDependencies: @@ -5415,6 +5431,11 @@ packages: vue: optional: true + vue-virtual-scroller@2.0.0-beta.8: + resolution: {integrity: sha512-b8/f5NQ5nIEBRTNi6GcPItE4s7kxNHw2AIHLtDp+2QvqdTjVN0FgONwX9cr53jWRgnu+HRLPaWDOR2JPI5MTfQ==} + peerDependencies: + vue: ^3.2.0 + vue3-signature@0.2.4: resolution: {integrity: sha512-XFwwFVK9OG3F085pKIq2SlNVqx32WdFH+TXbGEWc5FfEKpx8oMmZuAwZZ50K/pH2FgmJSE8IRwU9DDhrLpd6iA==} peerDependencies: @@ -9988,6 +10009,8 @@ snapshots: minipass@7.1.2: {} + mitt@2.1.0: {} + mitt@3.0.1: {} mlly@1.8.0: @@ -11149,6 +11172,14 @@ snapshots: '@vue/devtools-api': 6.6.4 vue: 3.5.24(typescript@5.3.3) + vue-observe-visibility@2.0.0-alpha.1(vue@3.5.24(typescript@5.3.3)): + dependencies: + vue: 3.5.24(typescript@5.3.3) + + vue-resize@2.0.0-alpha.1(vue@3.5.24(typescript@5.3.3)): + dependencies: + vue: 3.5.24(typescript@5.3.3) + vue-router@4.4.5(vue@3.5.24(typescript@5.3.3)): dependencies: '@vue/devtools-api': 6.6.4 @@ -11172,6 +11203,13 @@ snapshots: optionalDependencies: vue: 3.5.24(typescript@5.3.3) + vue-virtual-scroller@2.0.0-beta.8(vue@3.5.24(typescript@5.3.3)): + dependencies: + mitt: 2.1.0 + vue: 3.5.24(typescript@5.3.3) + vue-observe-visibility: 2.0.0-alpha.1(vue@3.5.24(typescript@5.3.3)) + vue-resize: 2.0.0-alpha.1(vue@3.5.24(typescript@5.3.3)) + vue3-signature@0.2.4(vue@3.5.24(typescript@5.3.3)): dependencies: default-passive-events: 2.0.0 diff --git a/web/src/views/HandDevice/Home/components/TopPanel.vue b/web/src/views/HandDevice/Home/components/TopPanel.vue index 502ad40..e5eed06 100644 --- a/web/src/views/HandDevice/Home/components/TopPanel.vue +++ b/web/src/views/HandDevice/Home/components/TopPanel.vue @@ -19,14 +19,14 @@
- -
正常状态
-
围栏报警
-
气体报警
+
正常状态
+
围栏报警
+
气体报警
+
离线状态
diff --git a/web/src/views/HandDevice/Home/components/constants/map.constants.ts b/web/src/views/HandDevice/Home/components/constants/map.constants.ts index 587ce57..dbacee9 100644 --- a/web/src/views/HandDevice/Home/components/constants/map.constants.ts +++ b/web/src/views/HandDevice/Home/components/constants/map.constants.ts @@ -13,17 +13,14 @@ export const STATUS_DICT = { gasStatus: [ { value: '0', label: '正常', cssClass: '#67c23a' }, { value: '1', label: '气体报警', cssClass: '#e6a23c' } - // { value: '2', label: '二级气体告警', cssClass: '#f56c6c' } ] as StatusDictItem[], batteryStatus: [ { value: '0', label: '正常', cssClass: '#67c23a' }, { value: '1', label: '低电量报警', cssClass: '#e6a23c' } - // { value: '2', label: '二级低电量报警', cssClass: '#f56c6c' } ] as StatusDictItem[], fenceStatus: [ { value: '0', label: '正常', cssClass: '#67c23a' }, { value: '1', label: '围栏报警', cssClass: '#e6a23c' } - // { value: '2', label: '二级围栏报警', cssClass: '#f56c6c' } ] as StatusDictItem[] } @@ -31,9 +28,8 @@ export const STATUS_DICT = { export const STATUS_PRIORITY = { gasStatus_2: 1, gasStatus_1: 2, - // battery_2: 3, + batteryStatus_1: 4, - // fence_2: 5, fenceStatus_1: 6, offline: 7, diff --git a/web/src/views/HandDevice/Home/components/types/map.types.ts b/web/src/views/HandDevice/Home/components/types/map.types.ts index a26ecd3..5a0a486 100644 --- a/web/src/views/HandDevice/Home/components/types/map.types.ts +++ b/web/src/views/HandDevice/Home/components/types/map.types.ts @@ -59,7 +59,8 @@ export interface MarkerData extends HandDetectorData { // /** 状态字符串 */ // statusStr: string - data?: any + data?: any, + [key: string]: any } // 地图组件 Props 接口 diff --git a/web/src/views/HandDevice/Home/index.vue b/web/src/views/HandDevice/Home/index.vue index eaf0fa0..d34d707 100644 --- a/web/src/views/HandDevice/Home/index.vue +++ b/web/src/views/HandDevice/Home/index.vue @@ -12,16 +12,107 @@ @on-click-marker="onClickMarker" />
+
+ + + + +
+
+
{{ item.name }}
+
+ {{ item.statusLabel }} +
+
+
+
SN:{{ item.sn }}
+
类型:{{ item.gasChemical }}
+ +
气体状态:{{ getLabelWithTypeValue('gasStatus', item.gasStatus) }}
+
围栏状态:{{ getLabelWithTypeValue('fenceStatus', item.fenceStatus) }}
+
电池状态:{{ getLabelWithTypeValue('batteryStatus', item.batteryStatus) }}
+ +
电量:{{ item.battery }}
+
数值:{{ item.value }} {{ item.unit }}
+
时间:{{ item.timeStr }}
+ +
+ 定位 + 轨迹 + 历史曲线 +
+
+
+
+
+
+
+ + - - + +