|
|
|
|
@ -11,156 +11,77 @@ |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="19"> |
|
|
|
|
<basic-container> |
|
|
|
|
<avue-crud :option="option" |
|
|
|
|
:search.sync="search" |
|
|
|
|
:table-loading="loading" |
|
|
|
|
:data="data" |
|
|
|
|
ref="crud" |
|
|
|
|
v-model="form" |
|
|
|
|
:permission="permissionList" |
|
|
|
|
@row-del="rowDel" |
|
|
|
|
@row-update="rowUpdate" |
|
|
|
|
@row-save="rowSave" |
|
|
|
|
:before-open="beforeOpen" |
|
|
|
|
:page.sync="page" |
|
|
|
|
@search-change="searchChange" |
|
|
|
|
@search-reset="searchReset" |
|
|
|
|
@selection-change="selectionChange" |
|
|
|
|
@current-change="currentChange" |
|
|
|
|
@size-change="sizeChange" |
|
|
|
|
@refresh-change="refreshChange" |
|
|
|
|
@on-load="onLoad"> |
|
|
|
|
<avue-crud :option="option" :search.sync="search" :table-loading="loading" :data="data" ref="crud" |
|
|
|
|
v-model="form" :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave" |
|
|
|
|
:before-open="beforeOpen" :page.sync="page" @search-change="searchChange" @search-reset="searchReset" |
|
|
|
|
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
|
|
|
|
@refresh-change="refreshChange" @on-load="onLoad"> |
|
|
|
|
<template slot="menuLeft"> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
size="small" |
|
|
|
|
v-if="permission.user_add && !auditMode" |
|
|
|
|
icon="el-icon-plus" |
|
|
|
|
<el-button type="primary" size="small" v-if="permission.user_add && !auditMode" icon="el-icon-plus" |
|
|
|
|
@click="$refs.crud.rowAdd()">新 增 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="danger" |
|
|
|
|
size="small" |
|
|
|
|
plain |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
v-if="permission.user_delete && !auditMode" |
|
|
|
|
@click="handleDelete">删 除 |
|
|
|
|
<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" |
|
|
|
|
v-if="userInfo.role_name.includes('admin') && !auditMode" |
|
|
|
|
@click="handleAudit">审 核 |
|
|
|
|
<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" |
|
|
|
|
v-if="userInfo.role_name.includes('admin') && auditMode" |
|
|
|
|
@click="handleAuditPass">通 过 |
|
|
|
|
<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" |
|
|
|
|
v-if="userInfo.role_name.includes('admin') && auditMode" |
|
|
|
|
@click="handleAuditRefuse">拒 绝 |
|
|
|
|
<el-button type="danger" size="small" plain icon="el-icon-close" |
|
|
|
|
v-if="userInfo.role_name.includes('admin') && auditMode" @click="handleAuditRefuse">拒 绝 |
|
|
|
|
</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 type="primary" size="small" plain icon="el-icon-refresh-left" |
|
|
|
|
v-if="userInfo.role_name.includes('admin') && auditMode" @click="handleAuditBack">返 回 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="info" |
|
|
|
|
size="small" |
|
|
|
|
plain |
|
|
|
|
v-if="permission.user_role && !auditMode" |
|
|
|
|
icon="el-icon-user" |
|
|
|
|
<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" |
|
|
|
|
<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" |
|
|
|
|
icon="el-icon-setting" |
|
|
|
|
@click="handlePlatform">平台配置 |
|
|
|
|
<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 type="info" size="small" plain v-if="userInfo.role_name.includes('admin') && !auditMode" |
|
|
|
|
icon="el-icon-coordinate" @click="handleLock">账号解封 |
|
|
|
|
</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 type="success" size="small" plain v-if="userInfo.role_name.includes('admin') && !auditMode" |
|
|
|
|
icon="el-icon-upload2" @click="handleImport">导入 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="warning" |
|
|
|
|
size="small" |
|
|
|
|
plain |
|
|
|
|
v-if="userInfo.role_name.includes('admin') && !auditMode" |
|
|
|
|
icon="el-icon-download" |
|
|
|
|
@click="handleExport">导出 |
|
|
|
|
<el-button type="warning" size="small" plain v-if="userInfo.role_name.includes('admin') && !auditMode" |
|
|
|
|
icon="el-icon-download" @click="handleExport">导出 |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="{row}" |
|
|
|
|
slot="tenantName"> |
|
|
|
|
<template slot-scope="{row}" slot="tenantName"> |
|
|
|
|
<el-tag>{{ row.tenantName }}</el-tag> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="{row}" |
|
|
|
|
slot="roleName"> |
|
|
|
|
<template slot-scope="{row}" slot="roleName"> |
|
|
|
|
<el-tag>{{ row.roleName }}</el-tag> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="{row}" |
|
|
|
|
slot="deptName"> |
|
|
|
|
<template slot-scope="{row}" slot="deptName"> |
|
|
|
|
<el-tag>{{ row.deptName }}</el-tag> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="{row}" |
|
|
|
|
slot="userTypeName"> |
|
|
|
|
<template slot-scope="{row}" slot="userTypeName"> |
|
|
|
|
<el-tag>{{ row.userTypeName }}</el-tag> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="{row}" |
|
|
|
|
slot="isMaintenanceClient" v-if="row.isMaintenanceClient != -1"> |
|
|
|
|
<template slot-scope="{row}" slot="isMaintenanceClient" v-if="row.isMaintenanceClient != -1"> |
|
|
|
|
<el-tag>{{ row.isMaintenanceClient == 0 ? '维修客户' : row.isMaintenanceClient == 1 ? '维保客户' : '' }}</el-tag> |
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
<el-dialog title="用户角色配置" |
|
|
|
|
append-to-body |
|
|
|
|
:visible.sync="roleBox" |
|
|
|
|
width="345px"> |
|
|
|
|
<el-dialog title="用户角色配置" append-to-body :visible.sync="roleBox" width="345px"> |
|
|
|
|
|
|
|
|
|
<el-tree :data="roleGrantList" |
|
|
|
|
show-checkbox |
|
|
|
|
check-strictly |
|
|
|
|
default-expand-all |
|
|
|
|
node-key="id" |
|
|
|
|
ref="treeRole" |
|
|
|
|
:default-checked-keys="roleTreeObj" |
|
|
|
|
:props="props"> |
|
|
|
|
<el-tree :data="roleGrantList" show-checkbox check-strictly default-expand-all node-key="id" ref="treeRole" |
|
|
|
|
:default-checked-keys="roleTreeObj" :props="props"> |
|
|
|
|
</el-tree> |
|
|
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button @click="roleBox = false">取 消</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
@click="submitRole">确 定</el-button> |
|
|
|
|
<el-button type="primary" @click="submitRole">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
<el-dialog title="用户数据导入" |
|
|
|
|
append-to-body |
|
|
|
|
:visible.sync="excelBox" |
|
|
|
|
width="555px"> |
|
|
|
|
<el-dialog title="用户数据导入" append-to-body :visible.sync="excelBox" width="555px"> |
|
|
|
|
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> |
|
|
|
|
<template slot="excelTemplate"> |
|
|
|
|
<el-button type="primary" @click="handleTemplate"> |
|
|
|
|
@ -169,31 +90,17 @@ |
|
|
|
|
</template> |
|
|
|
|
</avue-form> |
|
|
|
|
</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-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"> |
|
|
|
|
<template slot-scope="{row}" slot="userTypeName"> |
|
|
|
|
<el-tag>{{ row.userTypeName }}</el-tag> |
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
@ -812,6 +719,14 @@ |
|
|
|
|
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 |
|
|
|
|
} |
|
|
|
|
update(row).then(() => { |
|
|
|
|
this.initFlag = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
|