|
@@ -5,28 +5,7 @@
|
|
<div class="table-page-search-wrapper">
|
|
<div class="table-page-search-wrapper">
|
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
<a-row :gutter="24">
|
|
<a-row :gutter="24">
|
|
- <a-col :md="6" :sm="8">
|
|
|
|
- <a-form-item label="所属公司">
|
|
|
|
- <j-dict-select-tag v-model="queryParam.belongingCompany" placeholder="请输入用户性别"
|
|
|
|
- dictCode="affiliated-company"/>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
-
|
|
|
|
- <a-col :md="6" :sm="8">
|
|
|
|
- <a-form-item label="部门">
|
|
|
|
- <j-search-select-tag v-model="queryParam.deptName" placeholder="请选择部门"
|
|
|
|
- dict="sys_depart,depart_name,depart_name,org_type='3' or org_code='TBD' or org_code='TWH' order by org_code"/>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
-
|
|
|
|
|
|
|
|
-
|
|
|
|
- <template v-if="toggleSearchStatus">
|
|
|
|
- <a-col :md="6" :sm="12">
|
|
|
|
- <a-form-item label="员工姓名">
|
|
|
|
- <j-input placeholder="请输入" v-model="queryParam.realname"></j-input>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
<a-col :md="6" :sm="12">
|
|
<a-col :md="6" :sm="12">
|
|
<a-form-item label="账号">
|
|
<a-form-item label="账号">
|
|
<!--<a-input placeholder="请输入账号查询" v-model="queryParam.username"></a-input>-->
|
|
<!--<a-input placeholder="请输入账号查询" v-model="queryParam.username"></a-input>-->
|
|
@@ -34,7 +13,31 @@
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
|
|
|
|
- <!-- <a-col :md="6" :sm="8">
|
|
|
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
|
+ <a-form-item label="性别">
|
|
|
|
+ <a-select v-model="queryParam.sex" placeholder="请选择性别">
|
|
|
|
+ <a-select-option value="">请选择</a-select-option>
|
|
|
|
+ <a-select-option value="1">男性</a-select-option>
|
|
|
|
+ <a-select-option value="2">女性</a-select-option>
|
|
|
|
+ </a-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <template v-if="toggleSearchStatus">
|
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
|
+ <a-form-item label="真实名字">
|
|
|
|
+ <j-input placeholder="请输入真实名字" v-model="queryParam.realname"></j-input>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+
|
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
|
+ <a-form-item label="手机号码">
|
|
|
|
+ <j-input placeholder="请输入手机号码查询" v-model="queryParam.phone"></j-input>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+
|
|
|
|
+ <a-col :md="6" :sm="8">
|
|
<a-form-item label="用户状态">
|
|
<a-form-item label="用户状态">
|
|
<a-select v-model="queryParam.status" placeholder="请选择">
|
|
<a-select v-model="queryParam.status" placeholder="请选择">
|
|
<a-select-option value="">请选择</a-select-option>
|
|
<a-select-option value="">请选择</a-select-option>
|
|
@@ -42,7 +45,7 @@
|
|
<a-select-option value="2">冻结</a-select-option>
|
|
<a-select-option value="2">冻结</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
- </a-col> -->
|
|
|
|
|
|
+ </a-col>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
<a-col :md="6" :sm="8">
|
|
@@ -62,7 +65,7 @@
|
|
|
|
|
|
<!-- 操作按钮区域 -->
|
|
<!-- 操作按钮区域 -->
|
|
<div class="table-operator" style="border-top: 5px">
|
|
<div class="table-operator" style="border-top: 5px">
|
|
- <a-button @click="handleAdd" type="primary" icon="plus">添加用户</a-button>
|
|
|
|
|
|
+ <a-button @click="showUserSelection" type="primary" icon="plus">添加用户</a-button>
|
|
<a-button @click="handleSyncUser" v-has="'user:syncbpm'" type="primary" icon="plus">同步流程</a-button>
|
|
<a-button @click="handleSyncUser" v-has="'user:syncbpm'" type="primary" icon="plus">同步流程</a-button>
|
|
<a-button type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button>
|
|
<a-button type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button>
|
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
|
@@ -141,9 +144,9 @@
|
|
<a href="javascript:;" @click="handleDetail(record)">详情</a>
|
|
<a href="javascript:;" @click="handleDetail(record)">详情</a>
|
|
</a-menu-item>
|
|
</a-menu-item>
|
|
|
|
|
|
- <a-menu-item>
|
|
|
|
|
|
+ <!-- <a-menu-item>
|
|
<a href="javascript:;" @click="handleChangePassword(record.username)">密码</a>
|
|
<a href="javascript:;" @click="handleChangePassword(record.username)">密码</a>
|
|
- </a-menu-item>
|
|
|
|
|
|
+ </a-menu-item> -->
|
|
|
|
|
|
<a-menu-item>
|
|
<a-menu-item>
|
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
|
@@ -163,9 +166,9 @@
|
|
</a-popconfirm>
|
|
</a-popconfirm>
|
|
</a-menu-item>
|
|
</a-menu-item>
|
|
|
|
|
|
- <a-menu-item>
|
|
|
|
|
|
+ <!-- <a-menu-item>
|
|
<a href="javascript:;" @click="handleAgentSettings(record.username)">代理人</a>
|
|
<a href="javascript:;" @click="handleAgentSettings(record.username)">代理人</a>
|
|
- </a-menu-item>
|
|
|
|
|
|
+ </a-menu-item> -->
|
|
|
|
|
|
</a-menu>
|
|
</a-menu>
|
|
</a-dropdown>
|
|
</a-dropdown>
|
|
@@ -185,19 +188,49 @@
|
|
<!-- 用户回收站 -->
|
|
<!-- 用户回收站 -->
|
|
<user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk"/>
|
|
<user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk"/>
|
|
|
|
|
|
|
|
+ <a-modal title="新增用户选择" :width="450" :visible="newUserVisible" :closable="false" :maskClosable="false">
|
|
|
|
+ <template slot="footer">
|
|
|
|
+ <a-button type="primary" @click="handleAddUser">确认</a-button>
|
|
|
|
+ <a-button type="primary" @click="newUserVisible = false">取消</a-button>
|
|
|
|
+ </template>
|
|
|
|
+
|
|
|
|
+ <a-form>
|
|
|
|
+ <a-form-item
|
|
|
|
+ :labelCol="{ span: 4 }"
|
|
|
|
+ :wrapperCol="{ span: 20 }"
|
|
|
|
+ style="margin-bottom:10px"
|
|
|
|
+ >
|
|
|
|
+ <!-- <a-tooltip placement="topLeft">
|
|
|
|
+ <template slot="title">
|
|
|
|
+ <span>请选择最新添加的用户</span>
|
|
|
|
+ </template>
|
|
|
|
+ <a-avatar style="backgroundColor:#87d068" icon="gold" />
|
|
|
|
+ </a-tooltip> -->
|
|
|
|
+ <a-select
|
|
|
|
+ @change="selectUser"
|
|
|
|
+ placeholder="请选择需要添加的用户"
|
|
|
|
+ style="margin-left:10px;width: 80%"
|
|
|
|
+ >
|
|
|
|
+ <a-icon slot="suffixIcon" type="gold" />
|
|
|
|
+ <a-select-option v-for="d in newUserList" :key="d.user_id" :value="d.user_id">
|
|
|
|
+ {{ d.user_cn_name }} -- {{ d.dept_cn_name }}
|
|
|
|
+ </a-select-option>
|
|
|
|
+ </a-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-form>
|
|
|
|
+ </a-modal>
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import UserModal from './modules/UserModal'
|
|
|
|
|
|
+ import UserModal from './modules/NewUserModal'
|
|
import PasswordModal from './modules/PasswordModal'
|
|
import PasswordModal from './modules/PasswordModal'
|
|
- import {putAction,getFileAccessHttpUrl} from '@/api/manage';
|
|
|
|
|
|
+ import {putAction,getFileAccessHttpUrl,getAction} from '@/api/manage';
|
|
import {frozenBatch} from '@/api/api'
|
|
import {frozenBatch} from '@/api/api'
|
|
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
|
|
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
|
|
import SysUserAgentModal from "./modules/SysUserAgentModal";
|
|
import SysUserAgentModal from "./modules/SysUserAgentModal";
|
|
import JInput from '@/components/jeecg/JInput'
|
|
import JInput from '@/components/jeecg/JInput'
|
|
import UserRecycleBinModal from './modules/UserRecycleBinModal'
|
|
import UserRecycleBinModal from './modules/UserRecycleBinModal'
|
|
- import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "UserList",
|
|
name: "UserList",
|
|
@@ -207,8 +240,7 @@
|
|
UserModal,
|
|
UserModal,
|
|
PasswordModal,
|
|
PasswordModal,
|
|
JInput,
|
|
JInput,
|
|
- UserRecycleBinModal,
|
|
|
|
- JSearchSelectTag
|
|
|
|
|
|
+ UserRecycleBinModal
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -216,15 +248,14 @@
|
|
queryParam: {},
|
|
queryParam: {},
|
|
recycleBinVisible: false,
|
|
recycleBinVisible: false,
|
|
userVisible: false,
|
|
userVisible: false,
|
|
|
|
+ newUserVisible: false,
|
|
|
|
+ newUserList: [],
|
|
|
|
+ userSelected:{},
|
|
sheBao: '',
|
|
sheBao: '',
|
|
gongJiJin: '',
|
|
gongJiJin: '',
|
|
ipagination:{
|
|
ipagination:{
|
|
pageSizeOptions: ["10", "20", "30", "300"]
|
|
pageSizeOptions: ["10", "20", "30", "300"]
|
|
},
|
|
},
|
|
- isorter:{
|
|
|
|
- column: "",
|
|
|
|
- order: ''
|
|
|
|
- },
|
|
|
|
columns: [
|
|
columns: [
|
|
/*{
|
|
/*{
|
|
title: '#',
|
|
title: '#',
|
|
@@ -237,84 +268,62 @@
|
|
}
|
|
}
|
|
},*/
|
|
},*/
|
|
{
|
|
{
|
|
- title: '部门',
|
|
|
|
|
|
+ title: '用户账号',
|
|
align: "center",
|
|
align: "center",
|
|
- width: 180,
|
|
|
|
- dataIndex: 'orgCode'
|
|
|
|
|
|
+ dataIndex: 'username',
|
|
|
|
+ width: 120
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '员工姓名',
|
|
|
|
|
|
+ title: '用户姓名',
|
|
align: "center",
|
|
align: "center",
|
|
width: 100,
|
|
width: 100,
|
|
dataIndex: 'realname',
|
|
dataIndex: 'realname',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '工号',
|
|
|
|
|
|
+ title: '头像',
|
|
align: "center",
|
|
align: "center",
|
|
width: 120,
|
|
width: 120,
|
|
- dataIndex: 'workNo',
|
|
|
|
|
|
+ dataIndex: 'avatar',
|
|
|
|
+ scopedSlots: {customRender: "avatarslot"}
|
|
},
|
|
},
|
|
|
|
+
|
|
{
|
|
{
|
|
- title: '身份证号',
|
|
|
|
|
|
+ title: '性别',
|
|
align: "center",
|
|
align: "center",
|
|
- width: 120,
|
|
|
|
- dataIndex: 'nidNo',
|
|
|
|
|
|
+ width: 80,
|
|
|
|
+ dataIndex: 'sex_dictText',
|
|
|
|
+ sorter: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '手机号码',
|
|
|
|
|
|
+ title: '生日',
|
|
align: "center",
|
|
align: "center",
|
|
width: 100,
|
|
width: 100,
|
|
- dataIndex: 'phone'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '所属公司',
|
|
|
|
- align: "center",
|
|
|
|
- width: 180,
|
|
|
|
- dataIndex: 'belongingCompany'
|
|
|
|
|
|
+ dataIndex: 'birthday'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '生日',
|
|
|
|
|
|
+ title: '手机号码',
|
|
align: "center",
|
|
align: "center",
|
|
width: 100,
|
|
width: 100,
|
|
- dataIndex: 'birthday'
|
|
|
|
- },
|
|
|
|
|
|
+ dataIndex: 'phone'
|
|
|
|
+ },
|
|
// {
|
|
// {
|
|
- // title: '状态',
|
|
|
|
|
|
+ // title: '公司',
|
|
// align: "center",
|
|
// align: "center",
|
|
- // width: 80,
|
|
|
|
- // dataIndex: 'status_dictText'
|
|
|
|
|
|
+ // width: 180,
|
|
|
|
+ // dataIndex: 'pkOrgName'
|
|
// },
|
|
// },
|
|
{
|
|
{
|
|
- title: '雇佣状态',
|
|
|
|
|
|
+ title: '部门',
|
|
align: "center",
|
|
align: "center",
|
|
- width: 80,
|
|
|
|
- dataIndex: 'syHireType'
|
|
|
|
|
|
+ width: 180,
|
|
|
|
+ dataIndex: 'orgCode'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '用户账号',
|
|
|
|
|
|
+ title: '状态',
|
|
align: "center",
|
|
align: "center",
|
|
- dataIndex: 'username',
|
|
|
|
- width: 120
|
|
|
|
|
|
+ width: 80,
|
|
|
|
+ dataIndex: 'status_dictText'
|
|
},
|
|
},
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- // {
|
|
|
|
- // title: '头像',
|
|
|
|
- // align: "center",
|
|
|
|
- // width: 120,
|
|
|
|
- // dataIndex: 'avatar',
|
|
|
|
- // scopedSlots: {customRender: "avatarslot"}
|
|
|
|
- // },
|
|
|
|
-
|
|
|
|
- // {
|
|
|
|
- // title: '性别',
|
|
|
|
- // align: "center",
|
|
|
|
- // width: 80,
|
|
|
|
- // dataIndex: 'sex_dictText',
|
|
|
|
- // sorter: true
|
|
|
|
- // },
|
|
|
|
-
|
|
|
|
{
|
|
{
|
|
title: '操作',
|
|
title: '操作',
|
|
dataIndex: 'action',
|
|
dataIndex: 'action',
|
|
@@ -459,7 +468,50 @@
|
|
},
|
|
},
|
|
passwordModalOk() {
|
|
passwordModalOk() {
|
|
//TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
|
|
//TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ showUserSelection(){
|
|
|
|
+ getAction(`/sys/user/recently/added`)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.newUserList = res.result
|
|
|
|
+ // this.newUserList = [
|
|
|
|
+ // {
|
|
|
|
+ // "user_id": "zhangds5",
|
|
|
|
+ // "user_cn_name": "张大山",
|
|
|
|
+ // "active_state": "1",
|
|
|
|
+ // "update_time": "2022-12-22 10:35:55",
|
|
|
|
+ // "dept_code": "c01",
|
|
|
|
+ // "dept_cn_name": "办公室",
|
|
|
|
+ // "contact": "",
|
|
|
|
+ // "email": "",
|
|
|
|
+ // "registry_date": "2022-12-19 10:35:55"
|
|
|
|
+ // }
|
|
|
|
+ // ]
|
|
|
|
+ this.newUserVisible = true;
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error(res.message)
|
|
|
|
+ this.newUserVisible = false;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.newUserVisible = false;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ selectUser (value) {
|
|
|
|
+ this.newUserList.forEach(u=>{
|
|
|
|
+ if(u.user_id == value)
|
|
|
|
+ this.userSelected = u;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ handleAddUser(){
|
|
|
|
+ console.log(this.userSelected);
|
|
|
|
+ let u = this.userSelected;
|
|
|
|
+ let user = {
|
|
|
|
+ username : u.user_id,
|
|
|
|
+ realname: u.user_cn_name,
|
|
|
|
+ }
|
|
|
|
+ this.handleEdit(user);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|