From 13b9069aa1170f79aef6d0e29adc57fbb24478f2 Mon Sep 17 00:00:00 2001
From: jiminglei <836545853@qq.com>
Date: Fri, 2 Jun 2023 18:38:24 +0800
Subject: [PATCH] 11
---
psdc-ui/src/views/system/cl/index.vue | 112 ++++++++++++--------------
1 file changed, 50 insertions(+), 62 deletions(-)
diff --git a/psdc-ui/src/views/system/cl/index.vue b/psdc-ui/src/views/system/cl/index.vue
index 7bf4f2b..8957e08 100644
--- a/psdc-ui/src/views/system/cl/index.vue
+++ b/psdc-ui/src/views/system/cl/index.vue
@@ -66,13 +66,13 @@
全选
-
进水温度出水温度温度
-
-
- {{item.deviceName}}
-
-
-
+
+
+ {{item.deviceName}}
+
+ {{control.label}}
+
+
@@ -130,13 +130,14 @@
全选
- 进水温度出水温度温度
+
-
- {{item.deviceName}}
-
-
-
+
+ {{item.deviceName}}
+
+ {{control.label}}
+
+
@@ -187,22 +188,23 @@ onMounted(()=>{
crr.push(res.data[x])
}
}
- console.log(crr)
+
var arr = []
for(var i in crr){
arr=arr.concat(crr[i].children)
}
-
+ console.log(arr)
+ var drr = []
for(let j in arr){
- arr[j].Temp=!arr[j].Temp
- arr[j].inTemp=!arr[j].inTemp
- arr[j].outTemp=!arr[j].outTemp
+ if(arr[j].controlKey.length!=0){
+ drr.push(arr[j])
+ }
}
- console.log('sblb',arr)
- data.sblb=arr
+ console.log('sblb',drr)
+ data.sblb=drr
var brr = []
- for(let a in arr){
- brr.push(arr[a].deviceId)
+ for(let a in drr){
+ brr.push(drr[a].deviceId)
}
data.AllName=brr
console.log(brr)
@@ -382,23 +384,19 @@ function submitForm() {
data.checkedSblb.forEach(item => {
let tempItem = {
deviceId: item,
- intemp: '',
- outtemp: '',
- temp: ''
+ tempList:[]
};
// 根据 item 从 data.sblb 中找到对应的设备信息
let deviceInfo = data.sblb.find(sblbItem => sblbItem.deviceId === item);
if (deviceInfo) {
- tempItem.intemp = deviceInfo.intemp;
- tempItem.outtemp = deviceInfo.outtemp;
- tempItem.temp = deviceInfo.temp;
-
+ console.log(deviceInfo)
+ tempItem.tempList = deviceInfo.controlKey
}
tempCheckedSblb.push(tempItem);
timingForm.deviceVos=tempCheckedSblb
- deviceInfo.intemp=''
- deviceInfo.outtemp=''
- deviceInfo.temp=''
+ for(let i in deviceInfo.controlKey){
+ deviceInfo.controlKey[i].value=''
+ }
});
console.log(timingForm)
postNew(timingForm).then((res)=>{
@@ -422,21 +420,17 @@ function cancel() {
data.checkedSblb.forEach(item => {
let tempItem = {
deviceId: item,
- intemp: '',
- outtemp: '',
- temp: ''
+ tempList:[]
};
// 根据 item 从 data.sblb 中找到对应的设备信息
let deviceInfo = data.sblb.find(sblbItem => sblbItem.deviceId === item);
if (deviceInfo) {
- tempItem.intemp = deviceInfo.intemp;
- tempItem.outtemp = deviceInfo.outtemp;
- tempItem.temp = deviceInfo.temp;
+ tempItem.tempList = deviceInfo.controlKey;
}
tempCheckedSblb.push(tempItem);
- deviceInfo.intemp=''
- deviceInfo.outtemp=''
- deviceInfo.temp=''
+ // deviceInfo.intemp=''
+ // deviceInfo.outtemp=''
+ // deviceInfo.temp=''
});
timingForm.sceneName='',
timingForm.sceneRemark='',
@@ -460,38 +454,29 @@ function handleXg(dat) {
var deviceId = data.sblb[i].deviceId
for (let j = 0;j < dat.deviceVos.length ;j++ ) {
if ( deviceId === dat.deviceVos[j].deviceId){
- data.sblb[i].intemp = dat.deviceVos[j].intemp;
- data.sblb[i].outtemp = dat.deviceVos[j].outtemp;
- data.sblb[i].temp = dat.deviceVos[j].temp;
+ data.sblb[i].controlKey = dat.deviceVos[j].tempValue;
}
}
}
timingForm1.sceneName=dat.sceneName
timingForm1.sceneRemark=dat.sceneRemark
timingForm1.sceneCode = dat.sceneCode
-
-
};
function submitForm1() {
let tempCheckedSblb = [];
data.checkedSblb1.forEach(item => {
let tempItem = {
deviceId: item,
- intemp: '',
- outtemp: '',
- temp: ''
+ tempList:[]
};
// 根据 item 从 data.sblb 中找到对应的设备信息
let deviceInfo = data.sblb.find(sblbItem => sblbItem.deviceId === item);
if (deviceInfo) {
- tempItem.intemp = deviceInfo.intemp;
- tempItem.outtemp = deviceInfo.outtemp;
- tempItem.temp = deviceInfo.temp;
+ tempItem.tempList = deviceInfo.controlKey;
}
tempCheckedSblb.push(tempItem);
timingForm1.deviceVos=tempCheckedSblb
});
-
console.log(timingForm1)
postXg(timingForm1).then((res)=>{
console.log(res)
@@ -507,11 +492,11 @@ function submitForm1() {
timingForm1.sceneRemark=''
timingForm1.sceneCode=''
timingForm1.deviceVos=[]
- for(let i in data.sblb) {
- data.sblb[i].temp = ''
- data.sblb[i].intemp = ''
- data.sblb[i].outtemp = ''
- }
+ // for(let i in data.sblb) {
+ // data.sblb[i].temp = ''
+ // data.sblb[i].intemp = ''
+ // data.sblb[i].outtemp = ''
+ // }
};
function cancel1() {
open1.value = false;
@@ -519,10 +504,10 @@ function cancel1() {
timingForm1.sceneRemark=''
timingForm1.sceneCode=''
timingForm1.deviceVos=[]
-for(let i in data.sblb){
- data.sblb[i].temp=''
- data.sblb[i].intemp=''
- data.sblb[i].outtemp=''
+for(let i=0 ;i