拍照时间表设置

master
fanluyan 2 years ago
parent ba6c5c5524
commit 095a9ffb28

@ -57,7 +57,7 @@
</el-radio-group> </el-radio-group>
</div> </div>
</div> </div>
<div class="flexnr"> <div class="flexnr" v-loading="loading" v-if="newzzList.length !== 0">
<div class="dybox" v-for="(dyitem, index) in newzzList" :key="index"> <div class="dybox" v-for="(dyitem, index) in newzzList" :key="index">
<h4>电压等级{{ dyitem.name }}</h4> <h4>电压等级{{ dyitem.name }}</h4>
<div <div
@ -67,25 +67,21 @@
> >
<h4>线路{{ xlitem.name }}</h4> <h4>线路{{ xlitem.name }}</h4>
<div class="zzbox"> <div class="zzbox">
<el-checkbox-group v-model="zzListCheck"> <el-checkbox-group v-model="zzListCheck" @change="handleCheckBox">
<el-checkbox <el-checkbox
:label="zzitem.displayName" :label="zzitem.id"
v-for="(zzitem, index) in xlitem.list" v-for="(zzitem, index) in xlitem.list"
:key="index" :key="index"
></el-checkbox> :checked="checked"
>{{ zzitem.displayName }}</el-checkbox
>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="w50">通道:</div> </div>
<el-tree <div class="flexnr" v-else>
:data="listnr" <p class="nochannel">暂无通道</p>
show-checkbox
:props="defaultProps"
ref="tree"
node-key="id"
:default-expand-all="true"
></el-tree> -->
</div> </div>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -167,6 +163,8 @@ export default {
// //
newzzList: [], newzzList: [],
zzListCheck: [], zzListCheck: [],
loading: false,
checked: false,
}; };
}, },
mounted() {}, mounted() {},
@ -190,16 +188,22 @@ export default {
// //
handleChange() { handleChange() {
console.log(this.checkedAisle); console.log(this.checkedAisle);
this.loading = true;
getTermListByChannelJoggle({ getTermListByChannelJoggle({
id: this.checkedAisle, id: this.checkedAisle,
}) })
.then((res) => { .then((res) => {
console.log(res); console.log(res);
this.newzzList = res.data.list; this.newzzList = res.data.list;
this.checked = true;
console.log(this.zzListCheck);
this.loading = false;
}) })
.catch((err) => {}); .catch((err) => {});
}, },
handleCheckBox() {
console.log(this.zzListCheck);
},
// //
eachTreeData(data, callback, childKey) { eachTreeData(data, callback, childKey) {
if (!childKey) childKey = "children"; if (!childKey) childKey = "children";
@ -259,10 +263,24 @@ export default {
// //
submitForm() { submitForm() {
this.getCheckedNodes(); console.log(this.zzListCheck);
if (this.parmsList.length == 0) console.log(this.checkedAisle);
return this.$message.error("通道不能为空"); let checkzzList = [];
setScheduleRulel({ list: this.parmsList, ruleid: this.selid }) for (let i = 0; i < this.zzListCheck.length; i++) {
console.log(this.zzListCheck[i]);
checkzzList.push({
termid: this.zzListCheck[i],
channelidlist: [this.checkedAisle],
});
}
console.log(checkzzList);
if (this.zzListCheck.length == 0) {
this.$message.error("请选择通道");
} else {
setScheduleRulel({
scheduleid: this.selid,
list: checkzzList,
})
.then((res) => { .then((res) => {
this.isShow = false; this.isShow = false;
this.$message.success("添加成功"); this.$message.success("添加成功");
@ -271,6 +289,18 @@ export default {
.catch((err) => { .catch((err) => {
this.$message.error("添加失败"); this.$message.error("添加失败");
}); });
}
// if (this.parmsList.length == 0)
// return this.$message.error("");
// setScheduleRulel({ list: this.parmsList, ruleid: this.selid })
// .then((res) => {
// this.isShow = false;
// this.$message.success("");
// this.$parent.deviceList();
// })
// .catch((err) => {
// this.$message.error("");
// });
}, },
display() { display() {
this.isShow = true; this.isShow = true;
@ -296,8 +326,38 @@ export default {
border: 1px solid #eee; border: 1px solid #eee;
padding: 16px; padding: 16px;
border-radius: 4px; border-radius: 4px;
.el-tree { .dybox {
flex: 1; h4 {
font-size: 14px;
color: #333;
line-height: 24px;
font-weight: normal;
}
.xlbox {
h4 {
font-size: 14px;
color: #333;
line-height: 24px;
font-weight: normal;
}
margin-left: 16px;
.zzbox {
margin-left: 16px;
.el-checkbox-group {
.el-checkbox {
line-height: 24px;
width: 196px;
}
}
}
}
}
.nochannel {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
} }
} }
.w50 { .w50 {

Loading…
Cancel
Save