From 8d49c46c500a34ea5e682b8cd27e30c49d10b9c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Mon, 28 Apr 2025 16:28:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E6=B5=81=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/DeviceControlDialog.vue | 24 +++++++++---------- .../Dialogs/ConfluenceArea/index.vue | 9 ++++++- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue index 87b14165..a09665d7 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue @@ -39,12 +39,12 @@ export default { event: "update:value", }, props: { - + rebind: { type: Function, default: null }, - + visible: Boolean, dialogData: { type: Object, @@ -129,10 +129,10 @@ export default { handleSubmit(){ const self = this; this.$refs.FormConfigRef.validate().then((data) => { - + data.numberOfDevices = this.dialogData.iotDeviceId.substr(this.dialogData.iotDeviceId.lastIndexOf('-')+1) request({ - url: `/business/device/functions/${self.dialogData.iotDeviceId}/0b`, + url: `/business/device/functions2/${self.dialogData.iotDeviceId}/0b`, method: "POST", data: data }) @@ -157,12 +157,12 @@ export default { method: "get", }).then(result => { if (result.code != 200) return Message.error("操作失败"); - + let pv = ""; result.data.forEach(x=>{ pv += `${x.propertyName},${x.type},${x.property}.` }) - + let _formList = []; this.list.forEach(e => { const p = _.find(result.data,{property:e}) @@ -173,9 +173,9 @@ export default { key: p.property, }) } else if(p.type === 'enum' ){ - if(p.property.indexOf('PeriodHornSwitch') !== -1 || - p.property.indexOf('PeriodRedAndBlueFlash') !== -1 || - p.property.indexOf('PeriodWhetherToReport') !== -1 || + if(p.property.indexOf('PeriodHornSwitch') !== -1 || + p.property.indexOf('PeriodRedAndBlueFlash') !== -1 || + p.property.indexOf('PeriodWhetherToReport') !== -1 || p.property.indexOf('TimePeriodScreenSwitch') !== -1 ){ // 号角开关 | 红蓝爆闪灯 _formList.push({ label: p.propertyName+':', @@ -236,14 +236,14 @@ export default { } }) } - } + } this.formData[p.property] = p.value } }) this.formList = _formList; }) } - + }; @@ -254,7 +254,7 @@ export default { flex-direction: column; gap: 15px; min-height: 360px; - + .tips { font-size: 12px; } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue index e35c914f..697ae688 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue @@ -16,7 +16,7 @@ @@ -123,6 +123,13 @@ export default { // const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark); // if (roadInfo) this.data.roadName = roadInfo.roadName; }, + mounted() { + return request({ + url: `/business/device/functions/${this.dialogData.iotDeviceId}/0d`, + method: "POST", + data:{}, + }); + }, methods: { rebind(){ this.$refs.refParam.bind()