|
|
|
@ -23,7 +23,7 @@ |
|
|
|
|
<div class="dev_control_table"> |
|
|
|
|
<el-table :data="data.timingList" height="500px"> |
|
|
|
|
<el-table-column label="序号" align="center" width="50" type="index"/> |
|
|
|
|
<el-table-column label="策略名称" align="center" prop="sceneName" width="200"/> |
|
|
|
|
<el-table-column label="策略名称" align="center" prop="sceneName" width="300"/> |
|
|
|
|
<el-table-column label="策略描述" align="center" prop="sceneRemark"/> |
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime"/> |
|
|
|
|
<!-- <el-table-column label="温度" align="center" prop="sceneValue"/>--> |
|
|
|
@ -52,7 +52,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 新增对话框 --> |
|
|
|
|
<el-dialog :title="title" v-model="open" width="600" append-to-body> |
|
|
|
|
<el-dialog :title="title" v-model="open" width="1000" append-to-body> |
|
|
|
|
<el-form :model="timingForm" ref="userRef" label-width="88px"> |
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="24"> |
|
|
|
@ -68,10 +68,18 @@ |
|
|
|
|
<el-checkbox :indeterminate="data.isIndeterminate" v-model="data.checkAll" @change="handleCheckAllChange">全选</el-checkbox> |
|
|
|
|
<el-checkbox-group v-model="data.checkedSblb" @change="handleCheckedCitiesChange" style="white-space: normal;display: inline-block"> |
|
|
|
|
<el-checkbox v-for="item in data.sblb" :label="item.deviceId" :key="item.deviceId" style="margin-bottom: 10px;width: 560px;"> |
|
|
|
|
<span style="width: 100px;display: inline-block">{{item.deviceName}}</span> |
|
|
|
|
<span v-for="control in item.controlKey"> |
|
|
|
|
<span style="width: 85px;display: inline-block">{{control.label}}</span> |
|
|
|
|
<span style="width: 160px;display: inline-block">{{item.deviceName}}</span> |
|
|
|
|
<span v-for="control in item.controlKey" style="margin-left: 20px"> |
|
|
|
|
<span style="width: 80px;display: inline-block">{{control.label}}</span> |
|
|
|
|
<template v-if="control.label === '控制启停'"> |
|
|
|
|
<el-radio-group v-model="control.value"> |
|
|
|
|
<el-radio label="1">开启</el-radio> |
|
|
|
|
<el-radio label="0">关闭</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</template> |
|
|
|
|
<template v-else> |
|
|
|
|
<el-input type="number" v-model="control.value" style="width: 120px ;margin: 10px;height: 25px"/> |
|
|
|
|
</template> |
|
|
|
|
</span> |
|
|
|
|
</el-checkbox> |
|
|
|
|
</el-checkbox-group> |
|
|
|
@ -116,7 +124,7 @@ |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
<!-- 修改对话框 --> |
|
|
|
|
<el-dialog :title="title1" v-model="open1" width="600px" append-to-body> |
|
|
|
|
<el-dialog :title="title1" v-model="open1" width="1000px" append-to-body> |
|
|
|
|
<el-form :model="timingForm1" ref="userRef" label-width="88px"> |
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="24"> |
|
|
|
@ -133,10 +141,18 @@ |
|
|
|
|
<!-- <div class="taber"><span>进水温度</span><span>出水温度</span><span>温度</span></div>--> |
|
|
|
|
<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;width: 560px;"> |
|
|
|
|
<span style="width: 100px;display: inline-block">{{item.deviceName}}</span> |
|
|
|
|
<span v-for="control in item.controlKey"> |
|
|
|
|
<span style="width: 85px;display: inline-block">{{control.label}}</span> |
|
|
|
|
<span style="width: 160px;display: inline-block">{{item.deviceName}}</span> |
|
|
|
|
<span v-for="control in item.controlKey" style="margin-left: 20px"> |
|
|
|
|
<span style="width: 80px;display: inline-block">{{control.label}}</span> |
|
|
|
|
<template v-if="control.label === '控制启停'"> |
|
|
|
|
<el-radio-group v-model="control.value"> |
|
|
|
|
<el-radio label="1">开启</el-radio> |
|
|
|
|
<el-radio label="0">关闭</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</template> |
|
|
|
|
<template v-else> |
|
|
|
|
<el-input type="number" v-model="control.value" style="width: 120px ;margin: 10px;height: 25px"/> |
|
|
|
|
</template> |
|
|
|
|
</span> |
|
|
|
|
</el-checkbox> |
|
|
|
|
</el-checkbox-group> |
|
|
|
@ -179,32 +195,18 @@ |
|
|
|
|
import {ElMessage,ElMessageBox} from 'element-plus' |
|
|
|
|
import {Delete} from '@element-plus/icons-vue' |
|
|
|
|
import {ref,reactive,watch,onMounted} from "vue"; |
|
|
|
|
import {getXl,getTb,postNew,getSb,postXg,postDel} from '../../../api/emonitor/api' |
|
|
|
|
import {getXl,getTb,postNew,getSb1,postXg,postDel} from '../../../api/emonitor/api' |
|
|
|
|
onMounted(()=>{ |
|
|
|
|
getSb().then((res)=>{ |
|
|
|
|
var crr = [] |
|
|
|
|
for(let x in res.data){ |
|
|
|
|
if(res.data[x].isControl==2) { |
|
|
|
|
crr.push(res.data[x]) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getSb1().then((res)=>{ |
|
|
|
|
var arr = [] |
|
|
|
|
for(var i in crr){ |
|
|
|
|
arr=arr.concat(crr[i].children) |
|
|
|
|
} |
|
|
|
|
console.log(arr) |
|
|
|
|
var drr = [] |
|
|
|
|
for(let j in arr){ |
|
|
|
|
if(arr[j].controlKey.length!=0){ |
|
|
|
|
drr.push(arr[j]) |
|
|
|
|
} |
|
|
|
|
for(var i in res.data){ |
|
|
|
|
arr=arr.concat(res.data[i].children) |
|
|
|
|
} |
|
|
|
|
console.log('sblb',drr) |
|
|
|
|
data.sblb=drr |
|
|
|
|
console.log('sblb',arr) |
|
|
|
|
data.sblb=arr |
|
|
|
|
var brr = [] |
|
|
|
|
for(let a in drr){ |
|
|
|
|
brr.push(drr[a].deviceId) |
|
|
|
|
for(let a in arr){ |
|
|
|
|
brr.push(arr[a].deviceId) |
|
|
|
|
} |
|
|
|
|
data.AllName=brr |
|
|
|
|
console.log(brr) |
|
|
|
|