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", event: "update:value",
}, },
props: { props: {
rebind: { rebind: {
type: Function, type: Function,
default: null default: null
}, },
visible: Boolean, visible: Boolean,
dialogData: { dialogData: {
type: Object, type: Object,
@ -129,10 +129,10 @@ export default {
handleSubmit(){ handleSubmit(){
const self = this; const self = this;
this.$refs.FormConfigRef.validate().then((data) => { this.$refs.FormConfigRef.validate().then((data) => {
data.numberOfDevices = this.dialogData.iotDeviceId.substr(this.dialogData.iotDeviceId.lastIndexOf('-')+1) data.numberOfDevices = this.dialogData.iotDeviceId.substr(this.dialogData.iotDeviceId.lastIndexOf('-')+1)
request({ request({
url: `/business/device/functions/${self.dialogData.iotDeviceId}/0b`, url: `/business/device/functions2/${self.dialogData.iotDeviceId}/0b`,
method: "POST", method: "POST",
data: data data: data
}) })
@ -157,12 +157,12 @@ export default {
method: "get", method: "get",
}).then(result => { }).then(result => {
if (result.code != 200) return Message.error("操作失败"); if (result.code != 200) return Message.error("操作失败");
let pv = ""; let pv = "";
result.data.forEach(x=>{ result.data.forEach(x=>{
pv += `${x.propertyName},${x.type},${x.property}.` pv += `${x.propertyName},${x.type},${x.property}.`
}) })
let _formList = []; let _formList = [];
this.list.forEach(e => { this.list.forEach(e => {
const p = _.find(result.data,{property:e}) const p = _.find(result.data,{property:e})
@ -173,9 +173,9 @@ export default {
key: p.property, key: p.property,
}) })
} else if(p.type === 'enum' ){ } else if(p.type === 'enum' ){
if(p.property.indexOf('PeriodHornSwitch') !== -1 || if(p.property.indexOf('PeriodHornSwitch') !== -1 ||
p.property.indexOf('PeriodRedAndBlueFlash') !== -1 || p.property.indexOf('PeriodRedAndBlueFlash') !== -1 ||
p.property.indexOf('PeriodWhetherToReport') !== -1 || p.property.indexOf('PeriodWhetherToReport') !== -1 ||
p.property.indexOf('TimePeriodScreenSwitch') !== -1 ){ // | p.property.indexOf('TimePeriodScreenSwitch') !== -1 ){ // |
_formList.push({ _formList.push({
label: p.propertyName+':', label: p.propertyName+':',
@ -236,14 +236,14 @@ export default {
} }
}) })
} }
} }
this.formData[p.property] = p.value this.formData[p.property] = p.value
} }
}) })
this.formList = _formList; this.formList = _formList;
}) })
} }
}; };
</script> </script>
@ -254,7 +254,7 @@ export default {
flex-direction: column; flex-direction: column;
gap: 15px; gap: 15px;
min-height: 360px; min-height: 360px;
.tips { .tips {
font-size: 12px; font-size: 12px;
} }

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

@ -16,7 +16,7 @@
</ElTabs> </ElTabs>
</div> </div>
<template #footer> <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> </Button>
</template> </template>
@ -123,6 +123,13 @@ export default {
// const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark); // const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark);
// if (roadInfo) this.data.roadName = roadInfo.roadName; // if (roadInfo) this.data.roadName = roadInfo.roadName;
}, },
mounted() {
return request({
url: `/business/device/functions/${this.dialogData.iotDeviceId}/0d`,
method: "POST",
data:{},
});
},
methods: { methods: {
rebind(){ rebind(){
this.$refs.refParam.bind() this.$refs.refParam.bind()

Loading…
Cancel
Save