|
|
|
@ -37,14 +37,24 @@
@@ -37,14 +37,24 @@
|
|
|
|
|
v-hasPermi="['system:dept:add']" |
|
|
|
|
>新增</el-button> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="1.5"> |
|
|
|
|
<el-button |
|
|
|
|
type="info" |
|
|
|
|
plain |
|
|
|
|
icon="el-icon-sort" |
|
|
|
|
size="mini" |
|
|
|
|
@click="toggleExpandAll" |
|
|
|
|
>展开/折叠</el-button> |
|
|
|
|
</el-col> |
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<el-table |
|
|
|
|
v-if="refreshTable" |
|
|
|
|
v-loading="loading" |
|
|
|
|
:data="deptList" |
|
|
|
|
row-key="deptId" |
|
|
|
|
default-expand-all |
|
|
|
|
:default-expand-all="isExpandAll" |
|
|
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
|
|
|
|
> |
|
|
|
|
<el-table-column prop="deptName" label="部门名称" width="260"></el-table-column> |
|
|
|
@ -164,6 +174,12 @@ export default {
@@ -164,6 +174,12 @@ export default {
|
|
|
|
|
title: "", |
|
|
|
|
// 是否显示弹出层 |
|
|
|
|
open: false, |
|
|
|
|
// 是否展开,默认全部展开 |
|
|
|
|
isExpandAll: true, |
|
|
|
|
// 重新渲染表格状态 |
|
|
|
|
refreshTable: true, |
|
|
|
|
// 是否展开 |
|
|
|
|
expand: false, |
|
|
|
|
// 状态数据字典 |
|
|
|
|
statusOptions: [], |
|
|
|
|
// 查询参数 |
|
|
|
@ -267,6 +283,14 @@ export default {
@@ -267,6 +283,14 @@ export default {
|
|
|
|
|
this.deptOptions = this.handleTree(response.data, "deptId"); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
/** 展开/折叠操作 */ |
|
|
|
|
toggleExpandAll() { |
|
|
|
|
this.refreshTable = false; |
|
|
|
|
this.isExpandAll = !this.isExpandAll; |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.refreshTable = true; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
/** 修改按钮操作 */ |
|
|
|
|
handleUpdate(row) { |
|
|
|
|
this.reset(); |
|
|
|
@ -314,4 +338,4 @@ export default {
@@ -314,4 +338,4 @@ export default {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
</script> |
|
|
|
|