|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
<template>
|
|
|
|
|
<el-dialog
|
|
|
|
|
class="addLineDialog"
|
|
|
|
|
class="photoSetDialog"
|
|
|
|
|
title="设置"
|
|
|
|
|
:visible.sync="isShow"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
@ -26,9 +26,16 @@
|
|
|
|
|
</el-form> -->
|
|
|
|
|
<div class="flexnr">
|
|
|
|
|
<div class="w50">通道:</div>
|
|
|
|
|
<el-tree :data="listnr" show-checkbox :props="defaultProps" ref="tree" node-key="id" :default-expand-all="true"></el-tree>
|
|
|
|
|
<el-tree
|
|
|
|
|
:data="listnr"
|
|
|
|
|
show-checkbox
|
|
|
|
|
:props="defaultProps"
|
|
|
|
|
ref="tree"
|
|
|
|
|
node-key="id"
|
|
|
|
|
:default-expand-all="true"
|
|
|
|
|
></el-tree>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<!-- <el-button @click="getCheckedNodes">获取</el-button> -->
|
|
|
|
|
<el-button @click="isShow = false">取 消</el-button>
|
|
|
|
@ -59,16 +66,15 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
selid: 0,
|
|
|
|
|
ruleid: "",
|
|
|
|
|
parmsList: [],//选中的通道
|
|
|
|
|
parmsList: [], //选中的通道
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
},
|
|
|
|
|
mounted() {},
|
|
|
|
|
methods: {
|
|
|
|
|
//判断
|
|
|
|
|
getdataform(val) {
|
|
|
|
|
this.selid = val.id;
|
|
|
|
|
this.getlistnr()
|
|
|
|
|
this.getlistnr();
|
|
|
|
|
},
|
|
|
|
|
//获取所有通道
|
|
|
|
|
getlistnr() {
|
|
|
|
@ -81,7 +87,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
//获取所选值
|
|
|
|
|
getCheckedNodes() {
|
|
|
|
|
this.parmsList = []
|
|
|
|
|
this.parmsList = [];
|
|
|
|
|
const checkedNodes = this.$refs.tree.getCheckedNodes(false, true); //若节点可被选择,则返回目前被选中的节点所组成的数组
|
|
|
|
|
//const checkedParam = []; //定义选中的数组
|
|
|
|
|
let index = -1;
|
|
|
|
@ -123,8 +129,9 @@ export default {
|
|
|
|
|
|
|
|
|
|
// 保存确定操作
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.getCheckedNodes()
|
|
|
|
|
if (this.parmsList.length==0) return this.$message.error("通道不能为空");
|
|
|
|
|
this.getCheckedNodes();
|
|
|
|
|
if (this.parmsList.length == 0)
|
|
|
|
|
return this.$message.error("通道不能为空");
|
|
|
|
|
setScheduleRulel({ list: this.parmsList, ruleid: this.selid })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
this.isShow = false;
|
|
|
|
@ -144,12 +151,14 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
.flexnr {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: start;
|
|
|
|
|
}
|
|
|
|
|
.w50{
|
|
|
|
|
width: 50px;
|
|
|
|
|
<style lang="less">
|
|
|
|
|
.photoSetDialog {
|
|
|
|
|
.flexnr {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
}
|
|
|
|
|
.w50 {
|
|
|
|
|
width: 50px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|