|
@@ -5,30 +5,32 @@
|
|
|
<el-card shadow="hover">
|
|
|
<el-tag class="full space-vertical">当前所选:载体结构</el-tag>
|
|
|
<!-- @node-click="handleDeptNodeClick" -->
|
|
|
- <el-tree
|
|
|
- ref="selectTree"
|
|
|
- :data="DeptTree"
|
|
|
- node-key="id"
|
|
|
- :indent="deptTreeIndent"
|
|
|
- accordion
|
|
|
- :expand-on-click-node="expandDeptClick"
|
|
|
- :default-expanded-keys="expandedDeptKey"
|
|
|
- node-click="(data, node, item) => nodeClick(data, node, item)"
|
|
|
- @node-click="getCheckedNodes"
|
|
|
- >
|
|
|
- <span slot-scope="{ node, data }" class="custom-tree-node">
|
|
|
- <span>
|
|
|
- <i v-if="data.level == 0" class="el-icon-s-home" />
|
|
|
- <i v-else-if="data.level == 1" class="el-icon-menu" />
|
|
|
- <i v-else class="el-icon-link" />
|
|
|
- {{ node.label }}
|
|
|
+ <div style="height: 74vh;overflow-y: auto;">
|
|
|
+ <el-tree
|
|
|
+ ref="selectTree"
|
|
|
+ :data="DeptTree"
|
|
|
+ node-key="id"
|
|
|
+ :indent="deptTreeIndent"
|
|
|
+ accordion
|
|
|
+ :expand-on-click-node="expandDeptClick"
|
|
|
+ :default-expanded-keys="expandedDeptKey"
|
|
|
+ node-click="(data, node, item) => nodeClick(data, node, item)"
|
|
|
+ @node-click="getCheckedNodes"
|
|
|
+ >
|
|
|
+ <span slot-scope="{ node, data }" class="custom-tree-node">
|
|
|
+ <span>
|
|
|
+ <i v-if="data.level == 0" class="el-icon-s-home" />
|
|
|
+ <i v-else-if="data.level == 1" class="el-icon-menu" />
|
|
|
+ <i v-else class="el-icon-link" />
|
|
|
+ {{ node.label }}
|
|
|
+ </span>
|
|
|
+ <span v-if="data.level == 0">
|
|
|
+ <el-link class="space" type="primary" @click="() => unFoldAll()">展开</el-link>
|
|
|
+ <el-link class="space" type="primary" @click="() => collapseAll()">折叠</el-link>
|
|
|
+ </span>
|
|
|
</span>
|
|
|
- <span v-if="data.level == 0">
|
|
|
- <el-link class="space" type="primary" @click="() => unFoldAll()">展开</el-link>
|
|
|
- <el-link class="space" type="primary" @click="() => collapseAll()">折叠</el-link>
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- </el-tree>
|
|
|
+ </el-tree>
|
|
|
+ </div>
|
|
|
</el-card>
|
|
|
</div>
|
|
|
<div class="block-r">
|
|
@@ -353,7 +355,7 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.initDict(this.dc_key).then((res) => {
|
|
|
- this.getList()
|
|
|
+ this.getData()
|
|
|
})
|
|
|
this.getTreeData()
|
|
|
this.getTreeSelectData()
|
|
@@ -364,7 +366,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
handleSearch: function() {
|
|
|
- this.getList()
|
|
|
+ this.getData()
|
|
|
},
|
|
|
|
|
|
getTreeData: function() {
|
|
@@ -383,10 +385,10 @@ export default {
|
|
|
|
|
|
handleReset: function() {
|
|
|
this.queryParam = {}
|
|
|
- this.getList()
|
|
|
+ this.getData()
|
|
|
},
|
|
|
|
|
|
- getList: function() {
|
|
|
+ getData: function() {
|
|
|
const _this = this
|
|
|
_this.loading = true
|
|
|
_this.AllData = []
|
|
@@ -490,7 +492,7 @@ export default {
|
|
|
if (res.data.code == 200) {
|
|
|
// this.buildForm = {}
|
|
|
this.dialogVisible = false
|
|
|
- // this.getList()
|
|
|
+ // this.getData()
|
|
|
this.getTreeData()
|
|
|
this.$message({
|
|
|
message: '提交成功',
|
|
@@ -513,7 +515,7 @@ export default {
|
|
|
console.log('层级====', node.level)
|
|
|
_this.queryParam.nodeId = node.data.id
|
|
|
_this.queryParam.level = node.level
|
|
|
- _this.getList()
|
|
|
+ _this.getData()
|
|
|
},
|
|
|
getItemJson: function(item) {
|
|
|
return item
|
|
@@ -523,7 +525,7 @@ export default {
|
|
|
dlgClose: function() {
|
|
|
const _this = this
|
|
|
_this.buildForm = {}
|
|
|
- _this.getList()
|
|
|
+ _this.getData()
|
|
|
},
|
|
|
|
|
|
cancel() {
|
|
@@ -536,7 +538,7 @@ export default {
|
|
|
this.importVisible = false
|
|
|
this.importType = ''
|
|
|
this.getTreeData()
|
|
|
- this.getList()
|
|
|
+ this.getData()
|
|
|
},
|
|
|
handleDelete(val) {
|
|
|
this.$confirm('确认删除该数据,删除后将无法恢复,确认删除吗?', '提示', {
|
|
@@ -546,7 +548,7 @@ export default {
|
|
|
}).then(() => {
|
|
|
this.baseRequest('delete', { id: val.id }).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
- this.getList()
|
|
|
+ this.getData()
|
|
|
this.getTreeData()
|
|
|
this.$message({
|
|
|
type: 'success',
|