|
|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
|
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-if="!isQueryDept" v-show="showSearch">
|
|
|
|
|
<el-form-item label="部门名称" prop="deptName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.deptName"
|
|
|
|
|
@ -114,7 +114,7 @@
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24" v-if="form.parentId !== 0">
|
|
|
|
|
<el-form-item label="上级部门" prop="parentId">
|
|
|
|
|
<treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />
|
|
|
|
|
<treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" :disabled="isQueryDept"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
@ -230,6 +230,7 @@ export default {
|
|
|
|
|
components: { Treeselect },
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
isQueryDept: false,
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: true,
|
|
|
|
|
// 显示搜索条件
|
|
|
|
|
@ -249,6 +250,7 @@ export default {
|
|
|
|
|
// 查询参数
|
|
|
|
|
queryParams: {
|
|
|
|
|
deptName: undefined,
|
|
|
|
|
deptId: undefined,
|
|
|
|
|
status: undefined
|
|
|
|
|
},
|
|
|
|
|
// 表单参数
|
|
|
|
|
@ -299,6 +301,11 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
let userInfo = this.$store.state.user;
|
|
|
|
|
if(userInfo.roles.length===1 && userInfo.roles[0]==='deptRole'){
|
|
|
|
|
this.isQueryDept = true;
|
|
|
|
|
this.queryParams.deptId = userInfo.deptId
|
|
|
|
|
}
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
|