|
|
@ -66,13 +66,13 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-checkbox :indeterminate="data.isIndeterminate" v-model="data.checkAll" @change="handleCheckAllChange">全选</el-checkbox> |
|
|
|
<el-checkbox :indeterminate="data.isIndeterminate" v-model="data.checkAll" @change="handleCheckAllChange">全选</el-checkbox> |
|
|
|
<div class="taber"><span>进水温度</span><span>出水温度</span><span>温度</span></div> |
|
|
|
<el-checkbox-group v-model="data.checkedSblb" @change="handleCheckedCitiesChange" style="white-space: normal;display: inline-block"> |
|
|
|
<el-checkbox-group v-model="data.checkedSblb" @change="handleCheckedCitiesChange"> |
|
|
|
<el-checkbox v-for="item in data.sblb" :label="item.deviceId" :key="item.deviceId" style="margin-bottom: 10px;width: 560px;"> |
|
|
|
<el-checkbox v-for="item in data.sblb" :label="item.deviceId" :key="item.deviceId" label-width="120" style="margin-bottom: 10px"> |
|
|
|
<span style="width: 100px;display: inline-block">{{item.deviceName}}</span> |
|
|
|
<span style="width: 70px;display: inline-block">{{item.deviceName}}</span> |
|
|
|
<span v-for="control in item.controlKey"> |
|
|
|
<el-input :disabled="item.inTemp" type="number" v-model="item.intemp" placeholder="进水温度" style="width: 120px ;margin: 10px"/> |
|
|
|
<span style="width: 85px;display: inline-block">{{control.label}}</span> |
|
|
|
<el-input :disabled="item.outTemp" type="number" v-model="item.outtemp" placeholder="出水温度" style="width: 120px ;margin: 10px"/> |
|
|
|
<el-input type="number" v-model="control.value" style="width: 120px ;margin: 10px;height: 25px"/> |
|
|
|
<el-input :disabled="item.Temp" type="number" v-model="item.temp" placeholder="温度" style="width: 120px ;margin: 10px"/> |
|
|
|
</span> |
|
|
|
</el-checkbox> |
|
|
|
</el-checkbox> |
|
|
|
</el-checkbox-group> |
|
|
|
</el-checkbox-group> |
|
|
|
<!-- <el-col :span="12">--> |
|
|
|
<!-- <el-col :span="12">--> |
|
|
@ -130,13 +130,14 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-checkbox :indeterminate="data.isIndeterminate1" v-model="data.checkAll1" @change="handleCheckAllChange1">全选</el-checkbox> |
|
|
|
<el-checkbox :indeterminate="data.isIndeterminate1" v-model="data.checkAll1" @change="handleCheckAllChange1">全选</el-checkbox> |
|
|
|
<div class="taber"><span>进水温度</span><span>出水温度</span><span>温度</span></div> |
|
|
|
<!-- <div class="taber"><span>进水温度</span><span>出水温度</span><span>温度</span></div>--> |
|
|
|
<el-checkbox-group v-model="data.checkedSblb1" @change="handleCheckedCitiesChange1"> |
|
|
|
<el-checkbox-group v-model="data.checkedSblb1" @change="handleCheckedCitiesChange1"> |
|
|
|
<el-checkbox v-for="item in data.sblb" :label="item.deviceId" :key="item.deviceId" style="margin-bottom: 10px"> |
|
|
|
<el-checkbox v-for="item in data.sblb" :label="item.deviceId" :key="item.deviceId" style="margin-bottom: 10px;width: 560px;"> |
|
|
|
<span style="width: 70px;display: inline-block">{{item.deviceName}}</span> |
|
|
|
<span style="width: 100px;display: inline-block">{{item.deviceName}}</span> |
|
|
|
<el-input type="number" v-model="item.intemp" placeholder="进水温度" style="width: 120px ;margin: 10px"/> |
|
|
|
<span v-for="control in item.controlKey"> |
|
|
|
<el-input type="number" v-model="item.outtemp" placeholder="出水温度" style="width: 120px ;margin: 10px"/> |
|
|
|
<span style="width: 85px;display: inline-block">{{control.label}}</span> |
|
|
|
<el-input type="number" v-model="item.temp" placeholder="温度" style="width: 120px ;margin: 10px"/> |
|
|
|
<el-input type="number" v-model="control.value" style="width: 120px ;margin: 10px;height: 25px"/> |
|
|
|
|
|
|
|
</span> |
|
|
|
</el-checkbox> |
|
|
|
</el-checkbox> |
|
|
|
</el-checkbox-group> |
|
|
|
</el-checkbox-group> |
|
|
|
<!-- <el-col :span="24">--> |
|
|
|
<!-- <el-col :span="24">--> |
|
|
@ -187,22 +188,23 @@ onMounted(()=>{ |
|
|
|
crr.push(res.data[x]) |
|
|
|
crr.push(res.data[x]) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(crr) |
|
|
|
|
|
|
|
var arr = [] |
|
|
|
var arr = [] |
|
|
|
for(var i in crr){ |
|
|
|
for(var i in crr){ |
|
|
|
arr=arr.concat(crr[i].children) |
|
|
|
arr=arr.concat(crr[i].children) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
console.log(arr) |
|
|
|
|
|
|
|
var drr = [] |
|
|
|
for(let j in arr){ |
|
|
|
for(let j in arr){ |
|
|
|
arr[j].Temp=!arr[j].Temp |
|
|
|
if(arr[j].controlKey.length!=0){ |
|
|
|
arr[j].inTemp=!arr[j].inTemp |
|
|
|
drr.push(arr[j]) |
|
|
|
arr[j].outTemp=!arr[j].outTemp |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
console.log('sblb',arr) |
|
|
|
console.log('sblb',drr) |
|
|
|
data.sblb=arr |
|
|
|
data.sblb=drr |
|
|
|
var brr = [] |
|
|
|
var brr = [] |
|
|
|
for(let a in arr){ |
|
|
|
for(let a in drr){ |
|
|
|
brr.push(arr[a].deviceId) |
|
|
|
brr.push(drr[a].deviceId) |
|
|
|
} |
|
|
|
} |
|
|
|
data.AllName=brr |
|
|
|
data.AllName=brr |
|
|
|
console.log(brr) |
|
|
|
console.log(brr) |
|
|
@ -382,23 +384,19 @@ function submitForm() { |
|
|
|
data.checkedSblb.forEach(item => { |
|
|
|
data.checkedSblb.forEach(item => { |
|
|
|
let tempItem = { |
|
|
|
let tempItem = { |
|
|
|
deviceId: item, |
|
|
|
deviceId: item, |
|
|
|
intemp: '', |
|
|
|
tempList:[] |
|
|
|
outtemp: '', |
|
|
|
|
|
|
|
temp: '' |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
// 根据 item 从 data.sblb 中找到对应的设备信息 |
|
|
|
// 根据 item 从 data.sblb 中找到对应的设备信息 |
|
|
|
let deviceInfo = data.sblb.find(sblbItem => sblbItem.deviceId === item); |
|
|
|
let deviceInfo = data.sblb.find(sblbItem => sblbItem.deviceId === item); |
|
|
|
if (deviceInfo) { |
|
|
|
if (deviceInfo) { |
|
|
|
tempItem.intemp = deviceInfo.intemp; |
|
|
|
console.log(deviceInfo) |
|
|
|
tempItem.outtemp = deviceInfo.outtemp; |
|
|
|
tempItem.tempList = deviceInfo.controlKey |
|
|
|
tempItem.temp = deviceInfo.temp; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
tempCheckedSblb.push(tempItem); |
|
|
|
tempCheckedSblb.push(tempItem); |
|
|
|
timingForm.deviceVos=tempCheckedSblb |
|
|
|
timingForm.deviceVos=tempCheckedSblb |
|
|
|
deviceInfo.intemp='' |
|
|
|
for(let i in deviceInfo.controlKey){ |
|
|
|
deviceInfo.outtemp='' |
|
|
|
deviceInfo.controlKey[i].value='' |
|
|
|
deviceInfo.temp='' |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
console.log(timingForm) |
|
|
|
console.log(timingForm) |
|
|
|
postNew(timingForm).then((res)=>{ |
|
|
|
postNew(timingForm).then((res)=>{ |
|
|
@ -422,21 +420,17 @@ function cancel() { |
|
|
|
data.checkedSblb.forEach(item => { |
|
|
|
data.checkedSblb.forEach(item => { |
|
|
|
let tempItem = { |
|
|
|
let tempItem = { |
|
|
|
deviceId: item, |
|
|
|
deviceId: item, |
|
|
|
intemp: '', |
|
|
|
tempList:[] |
|
|
|
outtemp: '', |
|
|
|
|
|
|
|
temp: '' |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
// 根据 item 从 data.sblb 中找到对应的设备信息 |
|
|
|
// 根据 item 从 data.sblb 中找到对应的设备信息 |
|
|
|
let deviceInfo = data.sblb.find(sblbItem => sblbItem.deviceId === item); |
|
|
|
let deviceInfo = data.sblb.find(sblbItem => sblbItem.deviceId === item); |
|
|
|
if (deviceInfo) { |
|
|
|
if (deviceInfo) { |
|
|
|
tempItem.intemp = deviceInfo.intemp; |
|
|
|
tempItem.tempList = deviceInfo.controlKey; |
|
|
|
tempItem.outtemp = deviceInfo.outtemp; |
|
|
|
|
|
|
|
tempItem.temp = deviceInfo.temp; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
tempCheckedSblb.push(tempItem); |
|
|
|
tempCheckedSblb.push(tempItem); |
|
|
|
deviceInfo.intemp='' |
|
|
|
// deviceInfo.intemp='' |
|
|
|
deviceInfo.outtemp='' |
|
|
|
// deviceInfo.outtemp='' |
|
|
|
deviceInfo.temp='' |
|
|
|
// deviceInfo.temp='' |
|
|
|
}); |
|
|
|
}); |
|
|
|
timingForm.sceneName='', |
|
|
|
timingForm.sceneName='', |
|
|
|
timingForm.sceneRemark='', |
|
|
|
timingForm.sceneRemark='', |
|
|
@ -460,38 +454,29 @@ function handleXg(dat) { |
|
|
|
var deviceId = data.sblb[i].deviceId |
|
|
|
var deviceId = data.sblb[i].deviceId |
|
|
|
for (let j = 0;j < dat.deviceVos.length ;j++ ) { |
|
|
|
for (let j = 0;j < dat.deviceVos.length ;j++ ) { |
|
|
|
if ( deviceId === dat.deviceVos[j].deviceId){ |
|
|
|
if ( deviceId === dat.deviceVos[j].deviceId){ |
|
|
|
data.sblb[i].intemp = dat.deviceVos[j].intemp; |
|
|
|
data.sblb[i].controlKey = dat.deviceVos[j].tempValue; |
|
|
|
data.sblb[i].outtemp = dat.deviceVos[j].outtemp; |
|
|
|
|
|
|
|
data.sblb[i].temp = dat.deviceVos[j].temp; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
timingForm1.sceneName=dat.sceneName |
|
|
|
timingForm1.sceneName=dat.sceneName |
|
|
|
timingForm1.sceneRemark=dat.sceneRemark |
|
|
|
timingForm1.sceneRemark=dat.sceneRemark |
|
|
|
timingForm1.sceneCode = dat.sceneCode |
|
|
|
timingForm1.sceneCode = dat.sceneCode |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
function submitForm1() { |
|
|
|
function submitForm1() { |
|
|
|
let tempCheckedSblb = []; |
|
|
|
let tempCheckedSblb = []; |
|
|
|
data.checkedSblb1.forEach(item => { |
|
|
|
data.checkedSblb1.forEach(item => { |
|
|
|
let tempItem = { |
|
|
|
let tempItem = { |
|
|
|
deviceId: item, |
|
|
|
deviceId: item, |
|
|
|
intemp: '', |
|
|
|
tempList:[] |
|
|
|
outtemp: '', |
|
|
|
|
|
|
|
temp: '' |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
// 根据 item 从 data.sblb 中找到对应的设备信息 |
|
|
|
// 根据 item 从 data.sblb 中找到对应的设备信息 |
|
|
|
let deviceInfo = data.sblb.find(sblbItem => sblbItem.deviceId === item); |
|
|
|
let deviceInfo = data.sblb.find(sblbItem => sblbItem.deviceId === item); |
|
|
|
if (deviceInfo) { |
|
|
|
if (deviceInfo) { |
|
|
|
tempItem.intemp = deviceInfo.intemp; |
|
|
|
tempItem.tempList = deviceInfo.controlKey; |
|
|
|
tempItem.outtemp = deviceInfo.outtemp; |
|
|
|
|
|
|
|
tempItem.temp = deviceInfo.temp; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
tempCheckedSblb.push(tempItem); |
|
|
|
tempCheckedSblb.push(tempItem); |
|
|
|
timingForm1.deviceVos=tempCheckedSblb |
|
|
|
timingForm1.deviceVos=tempCheckedSblb |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
console.log(timingForm1) |
|
|
|
console.log(timingForm1) |
|
|
|
postXg(timingForm1).then((res)=>{ |
|
|
|
postXg(timingForm1).then((res)=>{ |
|
|
|
console.log(res) |
|
|
|
console.log(res) |
|
|
@ -507,11 +492,11 @@ function submitForm1() { |
|
|
|
timingForm1.sceneRemark='' |
|
|
|
timingForm1.sceneRemark='' |
|
|
|
timingForm1.sceneCode='' |
|
|
|
timingForm1.sceneCode='' |
|
|
|
timingForm1.deviceVos=[] |
|
|
|
timingForm1.deviceVos=[] |
|
|
|
for(let i in data.sblb) { |
|
|
|
// for(let i in data.sblb) { |
|
|
|
data.sblb[i].temp = '' |
|
|
|
// data.sblb[i].temp = '' |
|
|
|
data.sblb[i].intemp = '' |
|
|
|
// data.sblb[i].intemp = '' |
|
|
|
data.sblb[i].outtemp = '' |
|
|
|
// data.sblb[i].outtemp = '' |
|
|
|
} |
|
|
|
// } |
|
|
|
}; |
|
|
|
}; |
|
|
|
function cancel1() { |
|
|
|
function cancel1() { |
|
|
|
open1.value = false; |
|
|
|
open1.value = false; |
|
|
@ -519,10 +504,10 @@ function cancel1() { |
|
|
|
timingForm1.sceneRemark='' |
|
|
|
timingForm1.sceneRemark='' |
|
|
|
timingForm1.sceneCode='' |
|
|
|
timingForm1.sceneCode='' |
|
|
|
timingForm1.deviceVos=[] |
|
|
|
timingForm1.deviceVos=[] |
|
|
|
for(let i in data.sblb){ |
|
|
|
for(let i=0 ;i<data.sblb.length;i++){ |
|
|
|
data.sblb[i].temp='' |
|
|
|
for(let j=0; j<data.sblb[i].controlKey.length;j++){ |
|
|
|
data.sblb[i].intemp='' |
|
|
|
data.sblb[i].controlKey[j].value='' |
|
|
|
data.sblb[i].outtemp='' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -599,5 +584,8 @@ const { queryParams } = toRefs(data); |
|
|
|
::v-deep .el-form-item__content{ |
|
|
|
::v-deep .el-form-item__content{ |
|
|
|
//display: flex; |
|
|
|
//display: flex; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-checkbox { |
|
|
|
|
|
|
|
width: 560px; |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|
|
|
|
|
|
|
|
|