细节优化

master
fanluyan 2 years ago
parent 803c9d50a2
commit a1f05f665f

@ -1,6 +1,6 @@
<template> <template>
<el-dialog <el-dialog
class="addLineDialog" class="photoSetDialog"
title="设置" title="设置"
:visible.sync="isShow" :visible.sync="isShow"
:close-on-click-modal="false" :close-on-click-modal="false"
@ -26,7 +26,14 @@
</el-form> --> </el-form> -->
<div class="flexnr"> <div class="flexnr">
<div class="w50">通道:</div> <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>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -59,16 +66,15 @@ export default {
}, },
selid: 0, selid: 0,
ruleid: "", ruleid: "",
parmsList: [],// parmsList: [], //
}; };
}, },
mounted() { mounted() {},
},
methods: { methods: {
// //
getdataform(val) { getdataform(val) {
this.selid = val.id; this.selid = val.id;
this.getlistnr() this.getlistnr();
}, },
// //
getlistnr() { getlistnr() {
@ -81,7 +87,7 @@ export default {
// //
getCheckedNodes() { getCheckedNodes() {
this.parmsList = [] this.parmsList = [];
const checkedNodes = this.$refs.tree.getCheckedNodes(false, true); // const checkedNodes = this.$refs.tree.getCheckedNodes(false, true); //
//const checkedParam = []; // //const checkedParam = []; //
let index = -1; let index = -1;
@ -123,8 +129,9 @@ export default {
// //
submitForm() { submitForm() {
this.getCheckedNodes() this.getCheckedNodes();
if (this.parmsList.length==0) return this.$message.error("通道不能为空"); if (this.parmsList.length == 0)
return this.$message.error("通道不能为空");
setScheduleRulel({ list: this.parmsList, ruleid: this.selid }) setScheduleRulel({ list: this.parmsList, ruleid: this.selid })
.then((res) => { .then((res) => {
this.isShow = false; this.isShow = false;
@ -144,12 +151,14 @@ export default {
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less">
.flexnr { .photoSetDialog {
display: flex; .flexnr {
align-items: start; display: flex;
} align-items: flex-start;
.w50{ }
width: 50px; .w50 {
width: 50px;
}
} }
</style> </style>

Loading…
Cancel
Save