细节优化

master
fanluyan 2 years ago
parent 803c9d50a2
commit a1f05f665f

@ -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>

Loading…
Cancel
Save