Browse Source

合流区

develop
王兴琳 6 days ago
parent
commit
8d49c46c50
  1. 24
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue
  2. 9
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue

24
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;
})
}
};
</script>
@ -254,7 +254,7 @@ export default {
flex-direction: column;
gap: 15px;
min-height: 360px;
.tips {
font-size: 12px;
}

9
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue

@ -16,7 +16,7 @@
</ElTabs>
</div>
<template #footer>
<Button v-if="activeName != 'first' && data.deviceState == '1'" @click.native="deviceControlVisible = true">
<Button v-if="activeName != 'first' && data.deviceState == '1'" @click.native="deviceControlVisible = true" >
设备操作
</Button>
</template>
@ -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()

Loading…
Cancel
Save