|
|
@@ -5,39 +5,26 @@
|
|
|
<!-- 左侧树Start -->
|
|
|
<SplitArea :size="leftSplitWidth" :minSize="240">
|
|
|
<div>
|
|
|
- <div>
|
|
|
<div>
|
|
|
<!-- <el-checkbox v-model="containsSubDeptChecked"
|
|
|
>包含下级机构</el-checkbox
|
|
|
> -->
|
|
|
|
|
|
- <kt-button style="
|
|
|
<kt-button style="
|
|
|
background-color: #ffc000;
|
|
|
border: #ffc000;
|
|
|
" icon="fa fa-plus" label="添加人员" type="primary" perms="sys:agent:add" @click="handleAddButton" />
|
|
|
- " icon="fa fa-plus" label="添加人员" type="primary" perms="sys:agent:add" @click="handleAddButton" />
|
|
|
</div>
|
|
|
<el-divider></el-divider>
|
|
|
<!-- 左侧树形结构 -->
|
|
|
<el-tree :data="ztreeNodes" :props="{ children: 'children', label: 'name' }" node-key="id"
|
|
|
:default-expanded-keys="['9']" @node-click="onZTreeClick"></el-tree>
|
|
|
- <el-tree :data="ztreeNodes" :props="{ children: 'children', label: 'name' }" node-key="id"
|
|
|
- :default-expanded-keys="['9']" @node-click="onZTreeClick"></el-tree>
|
|
|
</div>
|
|
|
</SplitArea>
|
|
|
<!-- 左侧树End -->
|
|
|
|
|
|
<!-- 右侧列表页面Start -->
|
|
|
<SplitArea :size="rightSplitWidth">
|
|
|
- <templateTable :formList="formList" :searchData.sync="queryFrom" :tableConfig="tableConfig" :btnGroup="btnGroup"
|
|
|
- :data="pageResult" @getList="findPage" @handleSearchList="handleSearchList" :pagination="pageData">
|
|
|
- <div style="display:inline-block;" slot="upload">
|
|
|
- <el-upload class="upload" ref="upload" :show-file-list="false" :limit="1" action="#"
|
|
|
- :http-request="carfrontChange" :multiple="false">
|
|
|
- <el-button type="primary" size="small" @click="$refs.upload.clearFiles()">导入新用户</el-button>
|
|
|
- </el-upload>
|
|
|
- </div>
|
|
|
<templateTable :formList="formList" :searchData.sync="queryFrom" :tableConfig="tableConfig" :btnGroup="btnGroup"
|
|
|
:data="pageResult" @getList="findPage" @handleSearchList="handleSearchList" :pagination="pageData">
|
|
|
<div style="display:inline-block;" slot="upload">
|
|
|
@@ -52,7 +39,6 @@
|
|
|
</Split>
|
|
|
</el-main>
|
|
|
|
|
|
- <!-- 新新增修改界面 -->
|
|
|
<!-- 新新增修改界面 -->
|
|
|
|
|
|
<el-dialog :title="dialogTitle" width="60%" :visible.sync="dialogVisible" :close-on-click-modal="false"
|
|
|
@@ -297,17 +283,12 @@ export default {
|
|
|
prop: "status",
|
|
|
type: "select",
|
|
|
options: JSON.parse(localStorage.getItem('user_statusoptions'))
|
|
|
- options: JSON.parse(localStorage.getItem('user_statusoptions'))
|
|
|
},
|
|
|
],
|
|
|
- btnGroup: [{
|
|
|
- name: 'upload',
|
|
|
- slot: true
|
|
|
btnGroup: [{
|
|
|
name: 'upload',
|
|
|
slot: true
|
|
|
},],
|
|
|
- tableConfig: {
|
|
|
tableConfig: {
|
|
|
columns: [
|
|
|
// 数据列
|
|
|
@@ -316,22 +297,6 @@ export default {
|
|
|
prop: "pdeptName",
|
|
|
label: "机构名称", type: 'text',
|
|
|
},
|
|
|
- // 数据列
|
|
|
- { prop: "deptId", label: "部门编码", type: 'text' },
|
|
|
- {
|
|
|
- prop: "pdeptName",
|
|
|
- label: "机构名称", type: 'text',
|
|
|
- },
|
|
|
-
|
|
|
- { prop: "deptName", label: "部门名称", type: 'text', },
|
|
|
-
|
|
|
- { prop: "userId", label: "工号", type: 'text', },
|
|
|
- { prop: "name", label: "姓名", type: 'text', },
|
|
|
- {
|
|
|
- prop: "sex",
|
|
|
- label: "性别", type: 'text',
|
|
|
- },
|
|
|
- { prop: "mobile", label: "联系电话", type: 'text', },
|
|
|
{ prop: "deptName", label: "部门名称", type: 'text', },
|
|
|
|
|
|
{ prop: "userId", label: "工号", type: 'text', },
|
|
|
@@ -352,14 +317,6 @@ export default {
|
|
|
loading: true,
|
|
|
isPaginationShow: true,
|
|
|
isShowIndex: true,
|
|
|
- optBtns: [
|
|
|
- prop: "roleId",
|
|
|
- label: "角色", type: 'text',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: "status",
|
|
|
- label: "状态", type: 'text',
|
|
|
- },],
|
|
|
loading: true,
|
|
|
isPaginationShow: true,
|
|
|
isShowIndex: true,
|
|
|
@@ -370,15 +327,10 @@ export default {
|
|
|
icon: "fa fa-edit",
|
|
|
click: (row, index) => { return this.handleTableEdit(row) },
|
|
|
type: 'primary',
|
|
|
- label: '编辑',
|
|
|
- icon: "fa fa-edit",
|
|
|
- click: (row, index) => { return this.handleTableEdit(row) },
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
recommenderOptions: [],
|
|
|
- pageData: {
|
|
|
- recommenderOptions: [],
|
|
|
pageData: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
@@ -420,7 +372,6 @@ export default {
|
|
|
status: [{ required: true, message: "请选择状态", trigger: "change" }],
|
|
|
// roleId: [{ required: true, message: "请填写角色", trigger: "blur" }],
|
|
|
},
|
|
|
- },
|
|
|
filterObject: {},
|
|
|
peopleid: "",
|
|
|
peopledeptid: "",
|
|
|
@@ -508,7 +459,6 @@ export default {
|
|
|
queryStaffInfo() {
|
|
|
this.findPage();
|
|
|
},
|
|
|
- sexFormatter(row) {
|
|
|
sexFormatter(row) {
|
|
|
// return this.sexoptions[row.sex]
|
|
|
// return row.sex+'1'
|
|
|
@@ -547,19 +497,12 @@ export default {
|
|
|
},
|
|
|
//联级选择器触发事件
|
|
|
handleChange(val) {
|
|
|
- if (val && val.length !== 0) {
|
|
|
if (val && val.length !== 0) {
|
|
|
this.formData.deptId = val.at(-1);
|
|
|
- this.formData.referrerId = ''
|
|
|
- this.$api.user.selectfindByreferrerId({ deptId: this.formData.deptId }).then((res) => {
|
|
|
- this.recommenderOptions = res.data
|
|
|
- this.formData.referrerId = ''
|
|
|
this.$api.user.selectfindByreferrerId({ deptId: this.formData.deptId }).then((res) => {
|
|
|
this.recommenderOptions = res.data
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
// 右侧列表的方法Start
|
|
|
findPage(data) {
|
|
|
@@ -567,24 +510,15 @@ export default {
|
|
|
this.$api.user
|
|
|
// .findPage({dto,pageNum:this.pageData.pageNum,pageSize:this.pageData.pageSize})
|
|
|
.findPage({ ...this.pageData, dto: { ...data, roleId: '20', deptId: this.deptId } })
|
|
|
- .findPage({ ...this.pageData, dto: { ...data, roleId: '20', deptId: this.deptId } })
|
|
|
.then((res) => {
|
|
|
- if (res.code == 200 && res.data.content.length > 0) {
|
|
|
- res.data.content.forEach(val => {
|
|
|
- if (val.sex && val.sex !== '' && val.sex !== null) {
|
|
|
- val.sex = this.sexoptions.find(ele => ele.value == val.sex).label
|
|
|
if (res.code == 200 && res.data.content.length > 0) {
|
|
|
res.data.content.forEach(val => {
|
|
|
if (val.sex && val.sex !== '' && val.sex !== null) {
|
|
|
val.sex = this.sexoptions.find(ele => ele.value == val.sex).label
|
|
|
}
|
|
|
- if (val.status && val.status !== '' && val.status !== null) {
|
|
|
- val.status = this.user_statusoptions.find(ele => ele.value == val.status).label
|
|
|
if (val.status && val.status !== '' && val.status !== null) {
|
|
|
val.status = this.user_statusoptions.find(ele => ele.value == val.status).label
|
|
|
}
|
|
|
- if (val.roleId && val.roleId !== '' && val.roleId !== null) {
|
|
|
- val.roleId = this.roles.find(ele => ele.id == val.roleId).name
|
|
|
if (val.roleId && val.roleId !== '' && val.roleId !== null) {
|
|
|
val.roleId = this.roles.find(ele => ele.id == val.roleId).name
|
|
|
}
|
|
|
@@ -599,10 +533,7 @@ export default {
|
|
|
this.pageData.pageSize = res.data.pageSize;
|
|
|
this.pageData.totalSize = res.data.totalSize;
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
- handleSearchList(data) {
|
|
|
handleSearchList(data) {
|
|
|
this.findPage(data)
|
|
|
},
|
|
|
@@ -636,15 +567,12 @@ export default {
|
|
|
});
|
|
|
this.findPage();
|
|
|
}
|
|
|
- else {
|
|
|
else {
|
|
|
this.$message.error(res.msg);
|
|
|
}
|
|
|
- }
|
|
|
});
|
|
|
})
|
|
|
.catch(() => { });
|
|
|
- .catch(() => { });
|
|
|
},
|
|
|
//添加人员
|
|
|
handleAddButton() {
|
|
|
@@ -686,7 +614,6 @@ export default {
|
|
|
done();
|
|
|
})
|
|
|
.catch((_) => { });
|
|
|
- .catch((_) => { });
|
|
|
},
|
|
|
closeDialog() {
|
|
|
// 清空数据
|
|
|
@@ -772,8 +699,8 @@ export default {
|
|
|
// });
|
|
|
}
|
|
|
});
|
|
|
- },
|
|
|
},
|
|
|
+}
|
|
|
};
|
|
|
</script>
|
|
|
|