|
|
|
|
@ -4,7 +4,7 @@ |
|
|
|
|
<div class="box"> |
|
|
|
|
<el-scrollbar> |
|
|
|
|
<basic-container> |
|
|
|
|
<avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" /> |
|
|
|
|
<avue-tree ref="avueTree" :option="treeOption" :data="treeData" @node-click="nodeClick" /> |
|
|
|
|
</basic-container> |
|
|
|
|
</el-scrollbar> |
|
|
|
|
</div> |
|
|
|
|
@ -23,10 +23,10 @@ |
|
|
|
|
<el-button type="danger" size="small" plain icon="el-icon-delete" |
|
|
|
|
v-if="permission.user_delete && !auditMode" @click="handleDelete">删 除 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="primary" size="small" plain icon="el-icon-s-operation" |
|
|
|
|
<!-- <el-button type="primary" size="small" plain icon="el-icon-s-operation" |
|
|
|
|
v-if="userInfo.role_name.includes('admin') && !auditMode" @click="handleAudit">审 核 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="success" size="small" plain icon="el-icon-check" |
|
|
|
|
</el-button> --> |
|
|
|
|
<!-- <el-button type="success" size="small" plain icon="el-icon-check" |
|
|
|
|
v-if="userInfo.role_name.includes('admin') && auditMode" @click="handleAuditPass">通 过 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="danger" size="small" plain icon="el-icon-close" |
|
|
|
|
@ -34,19 +34,19 @@ |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="primary" size="small" plain icon="el-icon-refresh-left" |
|
|
|
|
v-if="userInfo.role_name.includes('admin') && auditMode" @click="handleAuditBack">返 回 |
|
|
|
|
</el-button> |
|
|
|
|
</el-button> --> |
|
|
|
|
<el-button type="info" size="small" plain v-if="permission.user_role && !auditMode" icon="el-icon-user" |
|
|
|
|
@click="handleGrant">角色配置 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="info" size="small" plain v-if="permission.user_reset && !auditMode" icon="el-icon-refresh" |
|
|
|
|
@click="handleReset">密码重置 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="info" size="small" plain v-if="userInfo.role_name.includes('admin') && !auditMode" |
|
|
|
|
<!-- <el-button type="info" size="small" plain v-if="userInfo.role_name.includes('admin') && !auditMode" |
|
|
|
|
icon="el-icon-setting" @click="handlePlatform">平台配置 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="info" size="small" plain v-if="userInfo.role_name.includes('admin') && !auditMode" |
|
|
|
|
icon="el-icon-coordinate" @click="handleLock">账号解封 |
|
|
|
|
</el-button> |
|
|
|
|
</el-button> --> |
|
|
|
|
<el-button type="success" size="small" plain v-if="userInfo.role_name.includes('admin') && !auditMode" |
|
|
|
|
icon="el-icon-upload2" @click="handleImport">导入 |
|
|
|
|
</el-button> |
|
|
|
|
@ -192,15 +192,20 @@ export default { |
|
|
|
|
nodeKey: 'id', |
|
|
|
|
lazy: true, |
|
|
|
|
treeLoad: function (node, resolve) { |
|
|
|
|
const parentId = (node.level === 0) ? 0 : node.data.id; |
|
|
|
|
getDeptLazyTree(parentId).then(res => { |
|
|
|
|
resolve(res.data.data.map(item => { |
|
|
|
|
return { |
|
|
|
|
...item, |
|
|
|
|
leaf: !item.hasChildren |
|
|
|
|
} |
|
|
|
|
})) |
|
|
|
|
}); |
|
|
|
|
console.log('node------------->',node) |
|
|
|
|
if(node.level < 2){ |
|
|
|
|
const parentId = (node.level === 0) ? 0 : node.data.id; |
|
|
|
|
getDeptLazyTree(parentId).then(res => { |
|
|
|
|
resolve(res.data.data.map(item => { |
|
|
|
|
return { |
|
|
|
|
...item, |
|
|
|
|
leaf: !item.hasChildren |
|
|
|
|
} |
|
|
|
|
})) |
|
|
|
|
}); |
|
|
|
|
}else{ |
|
|
|
|
return resolve([]) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
addBtn: false, |
|
|
|
|
menu: false, |
|
|
|
|
@ -217,6 +222,7 @@ export default { |
|
|
|
|
calcHeight: 30, |
|
|
|
|
tip: false, |
|
|
|
|
searchShow: true, |
|
|
|
|
searchEnter:true, |
|
|
|
|
searchMenuSpan: 6, |
|
|
|
|
border: true, |
|
|
|
|
index: true, |
|
|
|
|
@ -225,6 +231,13 @@ export default { |
|
|
|
|
viewBtn: true, |
|
|
|
|
dialogType: 'drawer', |
|
|
|
|
dialogClickModal: false, |
|
|
|
|
searchShowBtn: false, // 栏目折叠显隐 |
|
|
|
|
refreshBtn: false, // 刷新 |
|
|
|
|
columnBtn: false, // 操作列显隐 |
|
|
|
|
gridBtn:false, |
|
|
|
|
excelBtn: false, // 导出Excel |
|
|
|
|
printBtn: false, // 表格打印导出 |
|
|
|
|
filterBtn: false, // 筛选 |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: "登录账号", |
|
|
|
|
@ -363,16 +376,16 @@ export default { |
|
|
|
|
prop: 'detailInfo', |
|
|
|
|
icon: 'el-icon-s-order', |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: "用户昵称", |
|
|
|
|
prop: "name", |
|
|
|
|
hide: true, |
|
|
|
|
rules: [{ |
|
|
|
|
required: true, |
|
|
|
|
message: "请输入用户昵称", |
|
|
|
|
trigger: "blur" |
|
|
|
|
}] |
|
|
|
|
}, |
|
|
|
|
// { |
|
|
|
|
// label: "用户昵称", |
|
|
|
|
// prop: "name", |
|
|
|
|
// hide: true, |
|
|
|
|
// rules: [{ |
|
|
|
|
// required: true, |
|
|
|
|
// message: "请输入用户昵称", |
|
|
|
|
// trigger: "blur" |
|
|
|
|
// }] |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
label: "用户姓名", |
|
|
|
|
prop: "realName", |
|
|
|
|
@ -680,6 +693,19 @@ export default { |
|
|
|
|
}); |
|
|
|
|
getDeptTree(tenantId).then(res => { |
|
|
|
|
const column = this.findObject(this.option.group, "deptId"); |
|
|
|
|
if(this.treeDeptId != ''){ |
|
|
|
|
this.form.deptId = [this.treeDeptId] |
|
|
|
|
} |
|
|
|
|
res.data.data.map(item =>{ |
|
|
|
|
if(item.parentId == '0' && item.hasChildren && item.children.length != 0){ |
|
|
|
|
item.children.map(item1 =>{ |
|
|
|
|
if(item1.hasChildren){ |
|
|
|
|
item1.children = [] |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
console.log('res.data.data------------------->',res.data.data) |
|
|
|
|
column.dicData = res.data.data; |
|
|
|
|
}); |
|
|
|
|
getPostList(tenantId).then(res => { |
|
|
|
|
@ -702,6 +728,14 @@ export default { |
|
|
|
|
row.deptId = func.join(row.deptId); |
|
|
|
|
row.roleId = func.join(row.roleId); |
|
|
|
|
row.postId = func.join(row.postId); |
|
|
|
|
if (row.deptId.split(',').length > 1) { |
|
|
|
|
this.$message({ |
|
|
|
|
type: "error", |
|
|
|
|
message: "所属部门只能选择一个!" |
|
|
|
|
}); |
|
|
|
|
loading(); |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
add(row).then(() => { |
|
|
|
|
this.initFlag = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
@ -760,6 +794,8 @@ export default { |
|
|
|
|
searchReset() { |
|
|
|
|
this.query = {}; |
|
|
|
|
this.treeDeptId = ''; |
|
|
|
|
this.form.deptId = [] |
|
|
|
|
this.$refs.avueTree.setCurrentKey(null) |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
searchChange(params, done) { |
|
|
|
|
|