2723d4af by 杨威
2 parents 5283100e 0a51ce55
......@@ -159,6 +159,7 @@
</div>
<div class="xz-sidebar">
<el-tree :data="zrzData" :props="defaultProps" @node-click="handleNodeClick"
node-key="id"
:default-expand-all="true"></el-tree>
</div>
</div>
......@@ -470,7 +471,7 @@
:visible.sync="isopenXz"
:modal-append-to-body="false"
width="50%"
center>
>
<div class="xz-container">
<div class="xz-main">
<table border="1">
......@@ -547,38 +548,38 @@
label: 'label'
},
zrzData: [{
id: 1,
label: '一级 1',
children: [{
id: 4,
label: '二级 1-1',
children: [{
id: 9,
label: '三级 1-1-1'
}, {
id: 10,
label: '三级 1-1-2'
}]
}]
}, {
id: 2,
label: '一级 2',
children: [{
label: '二级 2-1',
children: [{
label: '三级 2-1-1'
}]
id: 5,
label: '二级 2-1'
}, {
label: '二级 2-2',
children: [{
label: '三级 2-2-1'
}]
id: 6,
label: '二级 2-2'
}]
}, {
id: 3,
label: '一级 3',
children: [{
label: '二级 3-1',
children: [{
label: '三级 3-1-1'
}]
id: 7,
label: '二级 3-1'
}, {
label: '二级 3-2',
children: [{
label: '三级 3-2-1'
}]
id: 8,
label: '二级 3-2'
}]
}],
ztypes: [
......@@ -628,9 +629,34 @@
this.getzdtzm();
},
methods: {
handleNodeClick(data) {
console.log(data);
handleNodeClick(node) {
console.log(node, 'node');
console.log(node.parent, 'node.parent')
console.log(node.children, 'node.children')
this.fghData.newZdlist[this.selectIndex].fwlist.push({
zbsm: node.label,
ztype: '多幢'
}
);
},
/**
* 删除节点
*
*/
delNode(node, data) {
},
/**
* 添加节点
*
*/
addNode(data) {
},
/**
* 选择幢信息
* @param index 当前选中行
*/
xzzrz(index) {
this.isopenXz = true
this.selectIndex = index
......@@ -724,7 +750,7 @@
});
this.changeXzq(this.checkedData.xzqbsm)
this.changeDjq(this.checkedData.djqbsm)
this.$set(this.fghData.newZdlist,this.fghData.newZdlist.length - 1, JSON.parse(JSON.stringify(this.checkedData)))
this.$set(this.fghData.newZdlist, this.fghData.newZdlist.length - 1, JSON.parse(JSON.stringify(this.checkedData)))
},
delRow(index) {
this.fghData.newZdlist.splice(index, 1)
......@@ -763,9 +789,10 @@
}
</script>
<style scoped lang="less">
.v-model{
z-index: 99!important;
.v-model {
z-index: 99 !important;
}
.main {
box-sizing: border-box;
padding: 18px;
......