|
|
|
@ -45,12 +45,20 @@ |
|
|
|
icon="el-icon-user" |
|
|
|
icon="el-icon-user" |
|
|
|
@click="handleGrant">角色配置 |
|
|
|
@click="handleGrant">角色配置 |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
<el-button size="small" |
|
|
|
<el-button type="info" |
|
|
|
|
|
|
|
size="small" |
|
|
|
plain |
|
|
|
plain |
|
|
|
v-if="permission.user_reset" |
|
|
|
v-if="permission.user_reset" |
|
|
|
icon="el-icon-refresh" |
|
|
|
icon="el-icon-refresh" |
|
|
|
@click="handleReset">密码重置 |
|
|
|
@click="handleReset">密码重置 |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
|
|
|
|
<el-button type="info" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
plain |
|
|
|
|
|
|
|
v-if="userInfo.role_name.includes('admin')" |
|
|
|
|
|
|
|
icon="el-icon-setting" |
|
|
|
|
|
|
|
@click="handlePlatform">平台配置 |
|
|
|
|
|
|
|
</el-button> |
|
|
|
<el-button type="success" |
|
|
|
<el-button type="success" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
plain |
|
|
|
plain |
|
|
|
@ -116,6 +124,35 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</avue-form> |
|
|
|
</avue-form> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="用户平台配置" |
|
|
|
|
|
|
|
append-to-body |
|
|
|
|
|
|
|
:visible.sync="platformBox"> |
|
|
|
|
|
|
|
<avue-crud :option="platformOption" |
|
|
|
|
|
|
|
:table-loading="platformLoading" |
|
|
|
|
|
|
|
:data="platformData" |
|
|
|
|
|
|
|
ref="platformCrud" |
|
|
|
|
|
|
|
v-model="platformForm" |
|
|
|
|
|
|
|
:before-open="platformBeforeOpen" |
|
|
|
|
|
|
|
:page.sync="platformPage" |
|
|
|
|
|
|
|
:permission="platformPermissionList" |
|
|
|
|
|
|
|
@row-update="platformRowUpdate" |
|
|
|
|
|
|
|
@search-change="platformSearchChange" |
|
|
|
|
|
|
|
@search-reset="platformSearchReset" |
|
|
|
|
|
|
|
@selection-change="platformSelectionChange" |
|
|
|
|
|
|
|
@current-change="platformCurrentChange" |
|
|
|
|
|
|
|
@size-change="platformSizeChange" |
|
|
|
|
|
|
|
@refresh-change="platformRefreshChange" |
|
|
|
|
|
|
|
@on-load="platformOnLoad"> |
|
|
|
|
|
|
|
<template slot-scope="{row}" |
|
|
|
|
|
|
|
slot="tenantName"> |
|
|
|
|
|
|
|
<el-tag>{{row.tenantName}}</el-tag> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<template slot-scope="{row}" |
|
|
|
|
|
|
|
slot="userTypeName"> |
|
|
|
|
|
|
|
<el-tag>{{row.userTypeName}}</el-tag> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</avue-crud> |
|
|
|
|
|
|
|
</el-dialog> |
|
|
|
</basic-container> |
|
|
|
</basic-container> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
@ -125,8 +162,10 @@ |
|
|
|
import { |
|
|
|
import { |
|
|
|
getList, |
|
|
|
getList, |
|
|
|
getUser, |
|
|
|
getUser, |
|
|
|
|
|
|
|
getUserPlatform, |
|
|
|
remove, |
|
|
|
remove, |
|
|
|
update, |
|
|
|
update, |
|
|
|
|
|
|
|
updatePlatform, |
|
|
|
add, |
|
|
|
add, |
|
|
|
grant, |
|
|
|
grant, |
|
|
|
resetPassword |
|
|
|
resetPassword |
|
|
|
@ -161,15 +200,22 @@ |
|
|
|
search:{}, |
|
|
|
search:{}, |
|
|
|
roleBox: false, |
|
|
|
roleBox: false, |
|
|
|
excelBox: false, |
|
|
|
excelBox: false, |
|
|
|
|
|
|
|
platformBox: false, |
|
|
|
initFlag: true, |
|
|
|
initFlag: true, |
|
|
|
selectionList: [], |
|
|
|
selectionList: [], |
|
|
|
query: {}, |
|
|
|
query: {}, |
|
|
|
loading: true, |
|
|
|
loading: true, |
|
|
|
|
|
|
|
platformLoading: false, |
|
|
|
page: { |
|
|
|
page: { |
|
|
|
pageSize: 10, |
|
|
|
pageSize: 10, |
|
|
|
currentPage: 1, |
|
|
|
currentPage: 1, |
|
|
|
total: 0 |
|
|
|
total: 0 |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
platformPage: { |
|
|
|
|
|
|
|
pageSize: 10, |
|
|
|
|
|
|
|
currentPage: 1, |
|
|
|
|
|
|
|
total: 0 |
|
|
|
|
|
|
|
}, |
|
|
|
init: { |
|
|
|
init: { |
|
|
|
roleTree: [], |
|
|
|
roleTree: [], |
|
|
|
deptTree: [], |
|
|
|
deptTree: [], |
|
|
|
@ -484,6 +530,77 @@ |
|
|
|
] |
|
|
|
] |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: [], |
|
|
|
data: [], |
|
|
|
|
|
|
|
platformQuery: {}, |
|
|
|
|
|
|
|
platformSelectionList: [], |
|
|
|
|
|
|
|
platformData: [], |
|
|
|
|
|
|
|
platformForm: {}, |
|
|
|
|
|
|
|
platformOption: { |
|
|
|
|
|
|
|
tip: false, |
|
|
|
|
|
|
|
searchShow: true, |
|
|
|
|
|
|
|
searchMenuSpan: 6, |
|
|
|
|
|
|
|
border: true, |
|
|
|
|
|
|
|
index: true, |
|
|
|
|
|
|
|
selection: true, |
|
|
|
|
|
|
|
viewBtn: true, |
|
|
|
|
|
|
|
dialogClickModal: false, |
|
|
|
|
|
|
|
menuWidth: 120, |
|
|
|
|
|
|
|
editBtnText: '配置', |
|
|
|
|
|
|
|
column: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "登录账号", |
|
|
|
|
|
|
|
prop: "account", |
|
|
|
|
|
|
|
search: true, |
|
|
|
|
|
|
|
display: false |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "所属租户", |
|
|
|
|
|
|
|
prop: "tenantName", |
|
|
|
|
|
|
|
slot: true, |
|
|
|
|
|
|
|
display: false |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "用户姓名", |
|
|
|
|
|
|
|
prop: "realName", |
|
|
|
|
|
|
|
search: true, |
|
|
|
|
|
|
|
display: false |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "用户平台", |
|
|
|
|
|
|
|
prop: "userTypeName", |
|
|
|
|
|
|
|
slot: true, |
|
|
|
|
|
|
|
display: false |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "用户平台", |
|
|
|
|
|
|
|
type: "select", |
|
|
|
|
|
|
|
dicUrl: "/api/blade-system/dict/dictionary?code=user_type", |
|
|
|
|
|
|
|
props: { |
|
|
|
|
|
|
|
label: "dictValue", |
|
|
|
|
|
|
|
value: "dictKey" |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
dataType: "number", |
|
|
|
|
|
|
|
search: true, |
|
|
|
|
|
|
|
hide: true, |
|
|
|
|
|
|
|
display: false, |
|
|
|
|
|
|
|
prop: "userType", |
|
|
|
|
|
|
|
rules: [{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请选择用户平台", |
|
|
|
|
|
|
|
trigger: "blur" |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "用户拓展", |
|
|
|
|
|
|
|
prop: "userExt", |
|
|
|
|
|
|
|
type: "textarea", |
|
|
|
|
|
|
|
minRows: 8, |
|
|
|
|
|
|
|
span: 24, |
|
|
|
|
|
|
|
overHidden: true, |
|
|
|
|
|
|
|
row: true, |
|
|
|
|
|
|
|
hide: true, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
}, |
|
|
|
excelForm: {}, |
|
|
|
excelForm: {}, |
|
|
|
excelOption: { |
|
|
|
excelOption: { |
|
|
|
submitBtn: false, |
|
|
|
submitBtn: false, |
|
|
|
@ -561,6 +678,14 @@ |
|
|
|
editBtn: this.vaildData(this.permission.user_edit, false) |
|
|
|
editBtn: this.vaildData(this.permission.user_edit, false) |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
platformPermissionList() { |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
addBtn: false, |
|
|
|
|
|
|
|
viewBtn: false, |
|
|
|
|
|
|
|
delBtn: false, |
|
|
|
|
|
|
|
editBtn: this.vaildData(this.permission.user_edit, false) |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
}, |
|
|
|
ids() { |
|
|
|
ids() { |
|
|
|
let ids = []; |
|
|
|
let ids = []; |
|
|
|
this.selectionList.forEach(ele => { |
|
|
|
this.selectionList.forEach(ele => { |
|
|
|
@ -732,6 +857,9 @@ |
|
|
|
this.roleBox = true; |
|
|
|
this.roleBox = true; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
handlePlatform() { |
|
|
|
|
|
|
|
this.platformBox = true; |
|
|
|
|
|
|
|
}, |
|
|
|
handleImport() { |
|
|
|
handleImport() { |
|
|
|
this.excelBox = true; |
|
|
|
this.excelBox = true; |
|
|
|
}, |
|
|
|
}, |
|
|
|
@ -789,6 +917,63 @@ |
|
|
|
this.loading = false; |
|
|
|
this.loading = false; |
|
|
|
this.selectionClear(); |
|
|
|
this.selectionClear(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
platformRowUpdate(row, index, done, loading) { |
|
|
|
|
|
|
|
updatePlatform(row.id, row.userType, row.userExt).then(() => { |
|
|
|
|
|
|
|
this.platformOnLoad(this.platformPage); |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
type: "success", |
|
|
|
|
|
|
|
message: "操作成功!" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
done(); |
|
|
|
|
|
|
|
}, error => { |
|
|
|
|
|
|
|
window.console.log(error); |
|
|
|
|
|
|
|
loading(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
platformBeforeOpen(done, type) { |
|
|
|
|
|
|
|
if (["edit", "view"].includes(type)) { |
|
|
|
|
|
|
|
getUserPlatform(this.platformForm.id).then(res => { |
|
|
|
|
|
|
|
this.platformForm = res.data.data; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
done(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
platformSearchReset() { |
|
|
|
|
|
|
|
this.platformQuery = {}; |
|
|
|
|
|
|
|
this.platformOnLoad(this.platformPage); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
platformSearchChange(params, done) { |
|
|
|
|
|
|
|
this.platformQuery = params; |
|
|
|
|
|
|
|
this.platformPage.currentPage = 1; |
|
|
|
|
|
|
|
this.platformOnLoad(this.platformPage, params); |
|
|
|
|
|
|
|
done(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
platformSelectionChange(list) { |
|
|
|
|
|
|
|
this.platformSelectionList = list; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
platformSelectionClear() { |
|
|
|
|
|
|
|
this.platformSelectionList = []; |
|
|
|
|
|
|
|
this.$refs.platformCrud.toggleSelection(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
platformCurrentChange(currentPage) { |
|
|
|
|
|
|
|
this.platformPage.currentPage = currentPage; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
platformSizeChange(pageSize) { |
|
|
|
|
|
|
|
this.platformPage.pageSize = pageSize; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
platformRefreshChange() { |
|
|
|
|
|
|
|
this.platformOnLoad(this.platformPage, this.platformQuery); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
platformOnLoad(page, params = {}) { |
|
|
|
|
|
|
|
this.platformLoading = true; |
|
|
|
|
|
|
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => { |
|
|
|
|
|
|
|
const data = res.data.data; |
|
|
|
|
|
|
|
this.platformPage.total = data.total; |
|
|
|
|
|
|
|
this.platformData = data.records; |
|
|
|
|
|
|
|
this.platformLoading = false; |
|
|
|
|
|
|
|
this.selectionClear(); |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|