From 12a980ba43c58cfbcfa0ca91fb45dbf74cd779a6 Mon Sep 17 00:00:00 2001 From: 1 <1> Date: Thu, 12 Jun 2025 08:53:59 +0800 Subject: [PATCH] =?UTF-8?q?api=E4=B8=8B=E5=8F=91=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .env.staging | 2 +- .vscode/settings.json | 3 + MQTT接口.md | 27 ++++ src/views/iot/device/device-edit.vue | 193 +++++++++++++++++++-------- 5 files changed, 167 insertions(+), 60 deletions(-) diff --git a/.env.development b/.env.development index 52113e8..f70ac31 100644 --- a/.env.development +++ b/.env.development @@ -14,7 +14,7 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_APP_SERVER_API_URL = 'http://localhost:8080/' # Mqtt消息服务器连接地址 -VUE_APP_MQTT_SERVER_URL = 'ws://localhost:8083/mqtt' +VUE_APP_MQTT_SERVER_URL = 'ws://192.168.1.188:8083/mqtt' # 百度地图AK VUE_APP_BAI_DU_AK = 'nAtaBg9FYzav6c8P9rF9qzsWZfT8O0PD' diff --git a/.env.staging b/.env.staging index dc094e0..c2d42a8 100644 --- a/.env.staging +++ b/.env.staging @@ -10,7 +10,7 @@ ENV = 'staging' VUE_APP_BASE_API = '/stage-api' # Mqtt消息服务器连接地址 -VUE_APP_MQTT_SERVER_URL = 'ws://localhost:8083/mqtt' +VUE_APP_MQTT_SERVER_URL = 'ws:///192.168.1.188:8083/mqtt' # 百度地图AK VUE_APP_BAI_DU_AK = 'nAtaBg9FYzav6c8P9rF9qzsWZXXXXXX' diff --git a/.vscode/settings.json b/.vscode/settings.json index a2cfc6a..6042d82 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,5 +9,8 @@ "i18n-ally.displayLanguage": "zh-CN", "[json]": { "editor.defaultFormatter": "vscode.json-language-features" + }, + "[vue]": { + "editor.defaultFormatter": "Vue.volar" } // 显示文件 } diff --git a/MQTT接口.md b/MQTT接口.md index 868e867..3714cfa 100644 --- a/MQTT接口.md +++ b/MQTT接口.md @@ -573,3 +573,30 @@ msgContext.logger.info("输出:" + msgContext.getTopic()); // 执行Action动作参数(脚本由系统自动生成) msgContext.setData("mqttBridgeID", 7); // 执行Action动作参数(脚本由系统自动生成) + + + + + + + +accesskey +INMu6CDgMnaKH+wptmLtkhIxlPmVrjOTgfSyITqsC9A= + + + +用户 + +dpx0z9T75vMN4ZbdreEEHdHLPDxm2S7gFnQqsIk2Sj+rYUbfSNIFCCSCYdsZFe9q + + + + ++q9aB+VvIIEGG2D8/psyhaYBn42AzV/ormU9bUPicNhHGz9SZPtNjjlvlnFXX2YvCrZSeq38VaxYw+Q3QyBMeg== + +主用户的accesskey + + + +token +version=2022-05-01&res=userid%2F275606&et=1907391331&method=sha1&sign=TxfzLFdfzIPwCSw6e1P9tYh1udQ%3D \ No newline at end of file diff --git a/src/views/iot/device/device-edit.vue b/src/views/iot/device/device-edit.vue index e071bb5..7e73f71 100644 --- a/src/views/iot/device/device-edit.vue +++ b/src/views/iot/device/device-edit.vue @@ -23,100 +23,136 @@ - + {{ $t('device.device-edit.148398-0') }} - - {{ $t('device.device-edit.148398-3') }} + + {{ + $t('device.device-edit.148398-3') }} - - {{ $t('device.device-edit.148398-6') }} + + {{ $t('device.device-edit.148398-6') + }} - - + + {{ $t('device.device-edit.148398-9') }} - + {{ $t('device.device-edit.148398-9') }} - + - + - + - + {{ $t('device.device-edit.148398-85') }} {{ $t('device.device-edit.148398-86') }} - + - + - - + + - - + + {{ $t('device.device-edit.148398-23') }} - - + + {{ $t('device.device-edit.148398-23') }} - + - + - + - - + + - - + + {{ $t('device.device-edit.148398-35') }} - {{ $t('device.device-edit.148398-36') }} + {{ + $t('device.device-edit.148398-36') }} -
-
{{ $t('device.device-edit.148398-37') }}
+
+
{{ + $t('device.device-edit.148398-37') }}
@@ -124,24 +160,55 @@ - + {{ $t('update') }} - + {{ $t('add') }} - + + + + + + + + + {{ $t('device.device-edit.148398-42') }} - + + + + + + + + + + + + + + + + + + + {{ $t('device.device-edit.148398-74') }} @@ -150,23 +217,22 @@ {{ $t('device.device-edit.148398-76') }} - + lazy> {{ $t('device.device-edit.148398-43') }} - + {{ $t('device.device-edit.148398-77') }} - + {{ $t('device.device-edit.148398-73') }} @@ -221,7 +287,8 @@ - + {{ $t('device.device-edit.148398-80') }} @@ -251,11 +318,13 @@ - +
- +
@@ -272,14 +341,17 @@
-
+
{{ $t('device.device-edit.148398-56') }}
- - + + @@ -299,7 +371,8 @@ - + @@ -308,7 +381,8 @@ - + @@ -320,7 +394,8 @@ - + @@ -339,7 +414,8 @@ @@ -356,6 +432,7 @@ import deviceAlert from './device-alert'; import alertUser from './alert-user'; import deviceUser from './device-user'; import runningStatus from './running-status'; +import fire from './fire-extinguisher.vue'; import deviceMonitor from './device-monitor'; import deviceStatistic from './device-statistic'; import instructionParsing from './instruction-parsing'; @@ -382,7 +459,6 @@ import DeviceFunc from '@/views/iot/device/device-functionlog'; import RealTimeStatus from '@/views/iot/device/realTime-status'; import { clientOut } from '@/api/iot/netty'; import defaultSettings from '@/settings'; - export default { name: 'DeviceEdit', dicts: ['iot_device_status', 'iot_location_way'], @@ -414,6 +490,7 @@ export default { instructionParsing, deviceModbusTask, deviceInlineVideo, + fire }, watch: { activeName(val) { @@ -1012,7 +1089,7 @@ export default { //是否设备设置为禁用状态,则踢出设备 if (this.form.status === 2) { const params = { clientId: this.form.serialNumber }; - clientOut(params).then((res) => {}); + clientOut(params).then((res) => { }); } } }); @@ -1090,7 +1167,7 @@ export default { this.form.serialNumber = devsipid; }, // 获取选中的用户 - getUserData(user) {}, + getUserData(user) { }, /**关闭物模型 */ openSummaryDialog() { let json = {