|
|
|
@ -3,7 +3,7 @@ |
|
|
|
|
<div class="page"> |
|
|
|
|
<h6 class="l-title">用户列表</h6> |
|
|
|
|
<div class="page-content"> |
|
|
|
|
<div class="tool" style="margin-bottom: 0;"> |
|
|
|
|
<div class="tool"> |
|
|
|
|
<ul class="filter"> |
|
|
|
|
<li> |
|
|
|
|
<label>创建时间:</label> |
|
|
|
@ -16,8 +16,8 @@ |
|
|
|
|
<el-date-picker v-model="date" align="right" unlink-panels type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" clearable size="small"></el-date-picker> |
|
|
|
|
</li> |
|
|
|
|
<li> |
|
|
|
|
<label style="width: auto;">角色:</label> |
|
|
|
|
<el-select v-model="role" placeholder="请选择角色" size="small" clearable @change="initData"> |
|
|
|
|
<label>角色:</label> |
|
|
|
|
<el-select v-model="role" placeholder="请选择角色" size="small" clearable class="flex-1" @change="initData"> |
|
|
|
|
<el-option label="不限" value=""></el-option> |
|
|
|
|
<el-option v-for="(item,index) in roleList" :key="index" :label="item.roleName" :value="item.id"></el-option> |
|
|
|
|
</el-select> |
|
|
|
@ -28,18 +28,22 @@ |
|
|
|
|
<el-option v-for="(item,index) in statusList" :key="index" :label="item.label" :value="item.id"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</li> |
|
|
|
|
<li> |
|
|
|
|
<label>搜索:</label> |
|
|
|
|
<el-input style="width: 250px" placeholder="请输入员工账号/姓名/工号" v-model="keyword" suffix-icon="el-icon-search" clearable size="small"></el-input> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
<div></div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="tool" style="justify-content: flex-end;margin-bottom: 16px;"> |
|
|
|
|
<el-button type="primary" size="small" round @click="add" v-auth="'/user/list:新增用户'">新增账号</el-button> |
|
|
|
|
<el-button type="primary" size="small" round @click="batchImport" v-auth>批量导入</el-button> |
|
|
|
|
<el-button type="primary" size="small" round @click="delAllSelection" v-auth>批量删除</el-button> |
|
|
|
|
<div class="tool" style="margin-bottom: 16px;"> |
|
|
|
|
<ul class="filter"> |
|
|
|
|
<li style="margin-bottom: 0"> |
|
|
|
|
<label>搜索:</label> |
|
|
|
|
<el-input style="width: 250px" placeholder="请输入员工账号/姓名/工号" v-model="keyword" suffix-icon="el-icon-search" clearable size="small"></el-input> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
<div> |
|
|
|
|
<el-button type="primary" size="small" round @click="add" v-auth="'/user/list:新增用户'">新增账号</el-button> |
|
|
|
|
<el-button type="primary" size="small" round @click="batchImport" v-auth>批量导入</el-button> |
|
|
|
|
<el-button type="primary" size="small" round @click="delAllSelection" v-auth>批量删除</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange"> |
|
|
|
@ -76,17 +80,17 @@ |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-dialog :title="isDetail ? '查看账号' : (form.userId ? '编辑账号' : '新增账号')" :visible.sync="userVisible" width="500px" @close="closeUser" class="dialog" :close-on-click-modal="false"> |
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="105px" label-suffix=":" :disabled="isDetail"> |
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px" label-suffix=":" :disabled="isDetail"> |
|
|
|
|
<el-form-item prop="account" label="账号"> |
|
|
|
|
<el-input v-model="form.account" ref="account" placeholder="请输入职工账号" @change="accountChange"></el-input> |
|
|
|
|
<el-input v-model="form.account" ref="account" placeholder="请输入账号" @change="accountChange"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="userName" label="用户姓名"> |
|
|
|
|
<el-input v-model="form.userName" placeholder="请输入员工姓名"></el-input> |
|
|
|
|
<el-input v-model="form.userName" placeholder="请输入姓名"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="roleIds" label="账号角色"> |
|
|
|
|
<el-checkbox-group v-model="form.roleIds"> |
|
|
|
|
<template v-for="(item,index) in roleList"> |
|
|
|
|
<el-checkbox v-if="item.roleName != '超级管理员'" :key="index" :label="item.id" :disabled="item.id == 'user'">{{item.roleName}}</el-checkbox> |
|
|
|
|
<el-checkbox v-if="item.roleName != '超级管理员'" :key="index" :label="item.id" :disabled="item.roleName === '用户'">{{item.roleName}}</el-checkbox> |
|
|
|
|
</template> |
|
|
|
|
</el-checkbox-group> |
|
|
|
|
</el-form-item> |
|
|
|
@ -100,7 +104,7 @@ |
|
|
|
|
<el-input v-model="form.email" placeholder="请输入邮箱"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="workNumber" label="工号/学号"> |
|
|
|
|
<el-input v-model="form.workNumber" placeholder="请输入职工工号" @change="workNumberChange"></el-input> |
|
|
|
|
<el-input v-model="form.workNumber" placeholder="请输入工号/学号" @change="workNumberChange"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<span slot="footer" class="dialog-footer" v-if="!isDetail"> |
|
|
|
@ -302,7 +306,9 @@ export default { |
|
|
|
|
// 获取全部角色 |
|
|
|
|
getRole(){ |
|
|
|
|
this.$get(`${this.api.listRole}?page=1&size=1000&name=&platformId=${Setting.platformId}`).then(res => { |
|
|
|
|
this.roleList = res.rolePage.records |
|
|
|
|
const list = res.rolePage.records |
|
|
|
|
this.roleList = list |
|
|
|
|
if (user) this.form.roleIds.push(user.id) |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}, |
|
|
|
|
resetPassword(row){ |
|
|
|
@ -534,11 +540,7 @@ export default { |
|
|
|
|
.filter{ |
|
|
|
|
flex-wrap: wrap; |
|
|
|
|
li{ |
|
|
|
|
width: 30%; |
|
|
|
|
margin-bottom: 16px; |
|
|
|
|
label{ |
|
|
|
|
width: 70px; |
|
|
|
|
} |
|
|
|
|
width: 22%; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/deep/.dialog{ |
|
|
|
|