修改用户管理的查询
This commit is contained in:
@@ -6,7 +6,7 @@ module.exports = {
|
||||
pleaseSelect: 'please select',
|
||||
male: 'male',
|
||||
female: 'female',
|
||||
RealName: 'real name',
|
||||
RealName: 'User name',
|
||||
pleaseEnter: 'please enter',
|
||||
phoneNumber: 'phone number',
|
||||
query: 'query',
|
||||
@@ -413,5 +413,7 @@ module.exports = {
|
||||
SeeMore:'See more',
|
||||
OperationSuccessful:'Operation successful',
|
||||
operationFailed:'operation failed',
|
||||
PersonnelSelection:'Personnel selection'
|
||||
PersonnelSelection:'Personnel selection',
|
||||
EmployeeNumber:'Employee number',
|
||||
EmployeeType:'Employee type',
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
module.exports = {
|
||||
home: '首页',
|
||||
account: '账号',
|
||||
EnterAccountFuzzyQuery:'输入账号模糊查询',
|
||||
account: '用户账号',
|
||||
EnterAccountFuzzyQuery:'输入用户账号模糊查询',
|
||||
Gender:'性别',
|
||||
pleaseSelect:'请选择',
|
||||
male:'男',
|
||||
female:'女',
|
||||
RealName:'真实姓名',
|
||||
RealName:'用户名称',
|
||||
pleaseEnter:'请输入',
|
||||
phoneNumber:'手机号码',
|
||||
query:'搜索',
|
||||
@@ -418,4 +418,6 @@ module.exports = {
|
||||
OperationSuccessful:'操作成功',
|
||||
operationFailed:'操作失败',
|
||||
PersonnelSelection:'人员选择',
|
||||
EmployeeNumber:'员工号',
|
||||
EmployeeType:'员工类型',
|
||||
}
|
||||
@@ -105,6 +105,5 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -180,7 +180,7 @@
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.field_show_type === 'treeSelect'">
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '0'">
|
||||
<div class="box-title-text" :title="item.db_field_txt">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 0">*</span>
|
||||
@@ -191,9 +191,9 @@
|
||||
v-model="formInline[item.db_field_name]"
|
||||
style="width: 100%"
|
||||
:maxTagCount="1"
|
||||
:tree-data="treeData"
|
||||
:tree-data="item.tree"
|
||||
tree-checkable
|
||||
placeholder="Please select"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -283,50 +283,6 @@
|
||||
content: []
|
||||
}
|
||||
],
|
||||
treeData: [
|
||||
{
|
||||
title: 'Node1',
|
||||
value: '0-0',
|
||||
key: '0-0',
|
||||
children: [
|
||||
{
|
||||
title: 'Child Node1',
|
||||
value: '0-0-0',
|
||||
key: '0-0-0',
|
||||
children: [
|
||||
{
|
||||
title: 'Child Node1',
|
||||
value: '0-0-0-0',
|
||||
key: '0-0-0-0'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'Node2',
|
||||
value: '0-1',
|
||||
key: '0-1',
|
||||
children: [
|
||||
{
|
||||
title: 'Child Node3',
|
||||
value: '0-1-0',
|
||||
key: '0-1-0',
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
title: 'Child Node4',
|
||||
value: '0-1-1',
|
||||
key: '0-1-1'
|
||||
},
|
||||
{
|
||||
title: 'Child Node5',
|
||||
value: '0-1-2',
|
||||
key: '0-1-2'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -5,76 +5,80 @@
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('account')">
|
||||
<j-input :placeholder="$t('EnterAccountFuzzyQuery')" v-model="queryParam.username"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('Gender')">
|
||||
<a-select v-model="queryParam.sex" :placeholder="$t('pleaseSelect')+$t('Gender')">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('account')">
|
||||
<span>{{$t('account')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('account')"
|
||||
v-model="queryParam.username"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('RealName')">
|
||||
<span>{{$t('RealName')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('RealName')"
|
||||
v-model="queryParam.realname"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('EmployeeNumber')">
|
||||
<span>{{$t('EmployeeNumber')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('EmployeeNumber')"
|
||||
v-model="queryParam.workNo"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('EmployeeType')">
|
||||
<span>{{$t('EmployeeType')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.workerType"
|
||||
:placeholder="$t('pleaseSelect')+$t('EmployeeType')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" dictCode="worker_type"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('status')">
|
||||
<span>{{$t('status')}}</span>
|
||||
</div>
|
||||
<a-select class="box-input" v-model="queryParam.status"
|
||||
:placeholder="$t('pleaseSelect')+$t('status')">
|
||||
<a-select-option value="">{{$t('pleaseSelect')}}</a-select-option>
|
||||
<a-select-option value="1">{{$t('male')}}</a-select-option>
|
||||
<a-select-option value="2">{{$t('female')}}</a-select-option>
|
||||
<a-select-option value="1">{{$t('normal')}}</a-select-option>
|
||||
<a-select-option value="2">{{$t('frozen')}}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('RealName')">
|
||||
<a-input :placeholder="$t('pleaseEnter')+$t('RealName')" v-model="queryParam.realname"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('phoneNumber')">
|
||||
<a-input :placeholder="$t('pleaseEnter')+$t('phoneNumber')+$t('query')" v-model="queryParam.phone"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('userStatues')">
|
||||
<a-select v-model="queryParam.status" :placeholder="$t('pleaseSelect')">
|
||||
<a-select-option value="">{{$t('pleaseSelect')}}</a-select-option>
|
||||
<a-select-option value="1">{{$t('normal')}}</a-select-option>
|
||||
<a-select-option value="2">{{$t('frozen')}}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</template>
|
||||
|
||||
<a-col :md="6" :sm="8">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
|
||||
<a @click="handleToggleSearch" style="margin-left: 8px">
|
||||
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
</a>
|
||||
</span>
|
||||
</a-col>
|
||||
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="table-operator" style="border-top: 5px">
|
||||
<!-- <a-button @click="handleAdd" type="primary" icon="plus" >{{$t('addUser')}}</a-button>-->
|
||||
<!-- <a-button type="primary" icon="download" @click="handleExportXls($t('userInformation'))">{{$t('export')}}</a-button>-->
|
||||
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
|
||||
<!-- <a-button type="primary" icon="import">{{$t('import')}}</a-button>-->
|
||||
<!-- </a-upload>-->
|
||||
<!-- <a-button type="primary" icon="hdd" @click="recycleBinVisible=true">{{$t('recycleBin')}}</a-button>-->
|
||||
<!-- <a-button @click="handleAdd" type="primary" icon="plus" >{{$t('addUser')}}</a-button>-->
|
||||
<!-- <a-button type="primary" icon="download" @click="handleExportXls($t('userInformation'))">{{$t('export')}}</a-button>-->
|
||||
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
|
||||
<!-- <a-button type="primary" icon="import">{{$t('import')}}</a-button>-->
|
||||
<!-- </a-upload>-->
|
||||
<!-- <a-button type="primary" icon="hdd" @click="recycleBinVisible=true">{{$t('recycleBin')}}</a-button>-->
|
||||
</div>
|
||||
|
||||
<!-- table区域-begin -->
|
||||
<div>
|
||||
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"-->
|
||||
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"-->
|
||||
<a-table
|
||||
ref="table"
|
||||
rowKey="id"
|
||||
@@ -106,15 +110,15 @@
|
||||
<script>
|
||||
import UserModal from './modules/UserModal'
|
||||
import PasswordModal from './modules/PasswordModal'
|
||||
import {putAction,getFileAccessHttpUrl} from '@/api/manage';
|
||||
import {frozenBatch} from '@/api/api'
|
||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||
import { putAction, getFileAccessHttpUrl } from '@/api/manage'
|
||||
import { frozenBatch } from '@/api/api'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import JInput from '@/components/jero/JInput'
|
||||
import UserRecycleBinModal from './modules/UserRecycleBinModal'
|
||||
import JSuperQuery from '@/components/jero/JSuperQuery'
|
||||
|
||||
export default {
|
||||
name: "UserList",
|
||||
name: 'UserList',
|
||||
mixins: [JeroListMixin],
|
||||
components: {
|
||||
UserModal,
|
||||
@@ -132,42 +136,41 @@
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
dataIndex: '',
|
||||
key:'rowIndex',
|
||||
width:20,
|
||||
align:"center",
|
||||
customRender:function (t,r,index) {
|
||||
return parseInt(index)+1;
|
||||
key: 'rowIndex',
|
||||
width: 20,
|
||||
align: 'center',
|
||||
customRender: function(t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('userAccount'),
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'username',
|
||||
width: 120,
|
||||
sorter: true
|
||||
},
|
||||
{
|
||||
title: this.$t('userName'),
|
||||
align: "center",
|
||||
align: 'center',
|
||||
width: 100,
|
||||
dataIndex: 'realname',
|
||||
dataIndex: 'realname'
|
||||
},
|
||||
{
|
||||
title: this.$t('Gender'),
|
||||
align: "center",
|
||||
width: 80,
|
||||
dataIndex: 'sex_dictText',
|
||||
sorter: true
|
||||
title: this.$t('EmployeeNumber'),
|
||||
align: 'center',
|
||||
width: 100,
|
||||
dataIndex: 'workNo'
|
||||
},
|
||||
{
|
||||
title: this.$t('phoneNumber'),
|
||||
align: "center",
|
||||
title: this.$t('EmployeeType'),
|
||||
align: 'center',
|
||||
width: 100,
|
||||
dataIndex: 'phone'
|
||||
dataIndex: 'workerType_dictText'
|
||||
},
|
||||
{
|
||||
title: this.$t('department'),
|
||||
align: "center",
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'orgCodeTxt'
|
||||
},
|
||||
@@ -185,10 +188,10 @@
|
||||
// },
|
||||
{
|
||||
title: this.$t('status'),
|
||||
align: "center",
|
||||
align: 'center',
|
||||
width: 80,
|
||||
dataIndex: 'status_dictText'
|
||||
},
|
||||
}
|
||||
// {
|
||||
// title: this.$t('operation'),
|
||||
// dataIndex: 'action',
|
||||
@@ -198,94 +201,94 @@
|
||||
// }
|
||||
],
|
||||
superQueryFieldList: [
|
||||
{ type: 'input', value: 'username', text: this.$t('userAccount'), },
|
||||
{ type: 'input', value: 'realname', text: this.$t('userName'), },
|
||||
{ type: 'select', value: 'sex', text: this.$t('Gender'), dictCode: 'sex' },
|
||||
{ type: 'input', value: 'username', text: this.$t('userAccount') },
|
||||
{ type: 'input', value: 'realname', text: this.$t('userName') },
|
||||
{ type: 'select', value: 'sex', text: this.$t('Gender'), dictCode: 'sex' }
|
||||
],
|
||||
url: {
|
||||
syncUser: "/act/process/extActProcess/doSyncUser",
|
||||
list: "/sys/user/page",
|
||||
delete: "/sys/user/delete",
|
||||
deleteBatch: "/sys/user/deleteBatch",
|
||||
exportXlsUrl: "/sys/user/exportXls",
|
||||
importExcelUrl: "sys/user/importExcel",
|
||||
},
|
||||
syncUser: '/act/process/extActProcess/doSyncUser',
|
||||
list: '/sys/user/page',
|
||||
delete: '/sys/user/delete',
|
||||
deleteBatch: '/sys/user/deleteBatch',
|
||||
exportXlsUrl: '/sys/user/exportXls',
|
||||
importExcelUrl: 'sys/user/importExcel'
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
importExcelUrl: function(){
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||
importExcelUrl: function() {
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getAvatarView: function (avatar) {
|
||||
getAvatarView: function(avatar) {
|
||||
return getFileAccessHttpUrl(avatar)
|
||||
},
|
||||
|
||||
batchFrozen: function (status) {
|
||||
batchFrozen: function(status) {
|
||||
if (this.selectedRowKeys.length <= 0) {
|
||||
this.$message.warning(this.$t('pleaseSelect')+this.$t('aRcord'));
|
||||
return false;
|
||||
this.$message.warning(this.$t('pleaseSelect') + this.$t('aRcord'))
|
||||
return false
|
||||
} else {
|
||||
let ids = "";
|
||||
let that = this;
|
||||
let isAdmin = false;
|
||||
that.selectionRows.forEach(function (row) {
|
||||
let ids = ''
|
||||
let that = this
|
||||
let isAdmin = false
|
||||
that.selectionRows.forEach(function(row) {
|
||||
if (row.username == 'admin') {
|
||||
isAdmin = true;
|
||||
isAdmin = true
|
||||
}
|
||||
});
|
||||
})
|
||||
if (isAdmin) {
|
||||
that.$message.warning(this.$t('operationAllowedAccount'));
|
||||
return;
|
||||
that.$message.warning(this.$t('operationAllowedAccount'))
|
||||
return
|
||||
}
|
||||
that.selectedRowKeys.forEach(function (val) {
|
||||
ids += val + ",";
|
||||
});
|
||||
that.selectedRowKeys.forEach(function(val) {
|
||||
ids += val + ','
|
||||
})
|
||||
that.$confirm({
|
||||
title: this.$t('confirm')+this.$t('operation'),
|
||||
title: this.$t('confirm') + this.$t('operation'),
|
||||
content: this.whether + (status == 1 ? this.$t('thaw') : this.$t('frozen')) + this.$t('selectedAccount'),
|
||||
onOk: function () {
|
||||
frozenBatch({ids: ids, status: status}).then((res) => {
|
||||
onOk: function() {
|
||||
frozenBatch({ ids: ids, status: status }).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message);
|
||||
that.loadData();
|
||||
that.onClearSelected();
|
||||
that.$message.success(res.message)
|
||||
that.loadData()
|
||||
that.onClearSelected()
|
||||
} else {
|
||||
that.$message.warning(res.message);
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
handleMenuClick(e) {
|
||||
if (e.key == 1) {
|
||||
this.batchDel();
|
||||
this.batchDel()
|
||||
} else if (e.key == 2) {
|
||||
this.batchFrozen(2);
|
||||
this.batchFrozen(2)
|
||||
} else if (e.key == 3) {
|
||||
this.batchFrozen(1);
|
||||
this.batchFrozen(1)
|
||||
}
|
||||
},
|
||||
handleFrozen: function (id, status, username) {
|
||||
let that = this;
|
||||
handleFrozen: function(id, status, username) {
|
||||
let that = this
|
||||
//TODO 后台校验管理员角色
|
||||
if ('admin' == username) {
|
||||
that.$message.warning(this.$t('adminDoNotAllowOperation'));
|
||||
return;
|
||||
that.$message.warning(this.$t('adminDoNotAllowOperation'))
|
||||
return
|
||||
}
|
||||
frozenBatch({ids: id, status: status}).then((res) => {
|
||||
frozenBatch({ ids: id, status: status }).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message);
|
||||
that.loadData();
|
||||
that.$message.success(res.message)
|
||||
that.loadData()
|
||||
} else {
|
||||
that.$message.warning(res.message);
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
handleChangePassword(username) {
|
||||
this.$refs.passwordmodal.show(username);
|
||||
this.$refs.passwordmodal.show(username)
|
||||
},
|
||||
passwordModalOk() {
|
||||
//TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
|
||||
@@ -295,5 +298,49 @@
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less'
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 20%;
|
||||
min-width: 90px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 3px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: 70%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
height: 38px;
|
||||
/*margin-top: 2px;*/
|
||||
}
|
||||
|
||||
</style>
|
||||
<style>
|
||||
.box-input .ant-select-selection {
|
||||
height: 38px !important;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection__rendered {
|
||||
line-height: 38px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user