【修改】工作组的工号字段处理改进,更换为username字段
【修改】统一选人组件去掉账号字段和查询条件
This commit is contained in:
@@ -33,9 +33,9 @@
|
|||||||
<a-form v-if="switchValue === 'user'" layout="inline" @keyup.enter.native="searchQueryUser">
|
<a-form v-if="switchValue === 'user'" layout="inline" @keyup.enter.native="searchQueryUser">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :sm="6">
|
<a-col :sm="6">
|
||||||
<a-form-item :label="$t('user.account')">
|
<a-form-item :label="$t('user.workNo')">
|
||||||
<a-input :placeholder="$t('pleaseEnter')"
|
<a-input :placeholder="$t('pleaseEnter')"
|
||||||
v-model="queryParamUser.account"></a-input>
|
v-model="queryParamUser.username"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="6">
|
<a-col :sm="6">
|
||||||
@@ -44,12 +44,6 @@
|
|||||||
v-model="queryParamUser.realname"></a-input>
|
v-model="queryParamUser.realname"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="6">
|
|
||||||
<a-form-item :label="$t('user.workNo')">
|
|
||||||
<a-input :placeholder="$t('pleaseEnter')"
|
|
||||||
v-model="queryParamUser.workNo"></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||||
<a-button style="margin-left: 8px" @click="searchResetUser">{{$t('reset')}}</a-button>
|
<a-button style="margin-left: 8px" @click="searchResetUser">{{$t('reset')}}</a-button>
|
||||||
<a-button style="margin-left: 8px" type="primary" @click="searchQueryUser">{{$t('query')}}</a-button>
|
<a-button style="margin-left: 8px" type="primary" @click="searchQueryUser">{{$t('query')}}</a-button>
|
||||||
@@ -266,8 +260,8 @@ export default {
|
|||||||
queryParamUser: {},
|
queryParamUser: {},
|
||||||
columnsUser: [
|
columnsUser: [
|
||||||
{
|
{
|
||||||
title: this.$t('user.account'),
|
title: this.$t('user.workNo'),
|
||||||
dataIndex: 'account',
|
dataIndex: 'username',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -275,11 +269,6 @@ export default {
|
|||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: this.$t('user.workNo'),
|
|
||||||
dataIndex: 'workNo',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: this.$t('role'),
|
title: this.$t('role'),
|
||||||
dataIndex: 'role',
|
dataIndex: 'role',
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<a-form-item :label="$t('user.account')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('user.account')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input :placeholder="$t('pleaseEnter')"
|
<a-input :placeholder="$t('pleaseEnter')"
|
||||||
v-model="queryParam.account"></a-input>
|
v-model="queryParam.username"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
@@ -45,12 +45,6 @@
|
|||||||
v-model="queryParam.realname"></a-input>
|
v-model="queryParam.realname"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="6">
|
|
||||||
<a-form-item :label="$t('user.workNo')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
||||||
<a-input :placeholder="$t('pleaseEnter')"
|
|
||||||
v-model="queryParam.workNo"></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||||
<a-button style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
<a-button style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||||
<a-button style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
<a-button style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||||
@@ -80,7 +74,7 @@
|
|||||||
<p class="modal-content-title">{{ $t('userSelect.selectedPersonnel') }}</p>
|
<p class="modal-content-title">{{ $t('userSelect.selectedPersonnel') }}</p>
|
||||||
<div v-if="dataSourceRight && dataSourceRight.length > 0" class="name-content">
|
<div v-if="dataSourceRight && dataSourceRight.length > 0" class="name-content">
|
||||||
<div v-for="(item, index) in dataSourceRight" :key="item.id" class="name-div">
|
<div v-for="(item, index) in dataSourceRight" :key="item.id" class="name-div">
|
||||||
{{ item.realname + '(' + item.workNo + ')' }}
|
{{ item.realname + '(' + item.username + ')' }}
|
||||||
<a-icon type="close" @click="handleDelete(item, index)" />
|
<a-icon type="close" @click="handleDelete(item, index)" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -134,7 +128,7 @@ export default {
|
|||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('user.account'),
|
title: this.$t('user.workNo'),
|
||||||
dataIndex: 'username',
|
dataIndex: 'username',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
@@ -145,12 +139,6 @@ export default {
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: this.$t('user.workNo'),
|
|
||||||
dataIndex: 'workNo',
|
|
||||||
align: 'center',
|
|
||||||
scopedSlots: { customRender: 'text' }
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: this.$t('role'),
|
title: this.$t('role'),
|
||||||
dataIndex: 'roleTxt',
|
dataIndex: 'roleTxt',
|
||||||
@@ -231,7 +219,7 @@ export default {
|
|||||||
const params = Object.assign({}, this.queryParam)
|
const params = Object.assign({}, this.queryParam)
|
||||||
params.pageNo = this.ipagination.current
|
params.pageNo = this.ipagination.current
|
||||||
params.pageSize = this.ipagination.pageSize
|
params.pageSize = this.ipagination.pageSize
|
||||||
params.field = 'id,,,avatar,username,realname,sex_dictText,phone,orgCodeTxt,roleTxt,status_dictText,undefined'
|
params.field = 'id,avatar,username,realname,sex_dictText,phone,orgCodeTxt,roleTxt,status_dictText'
|
||||||
params.column = 'createTime'
|
params.column = 'createTime'
|
||||||
params.order = 'desc'
|
params.order = 'desc'
|
||||||
this.loadingLeft = true
|
this.loadingLeft = true
|
||||||
@@ -310,7 +298,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleOk () {
|
handleOk () {
|
||||||
this.$emit('change', this.selectedRowKeys.join(','))
|
this.$emit('change', this.selectedRowKeys.join(','))
|
||||||
this.$emit('nameChange', this.dataSourceRight.map(item => item.realname + '(' + item.workNo + ')').join(','))
|
this.$emit('nameChange', this.dataSourceRight.map(item => item.realname + '(' + item.username + ')').join(','))
|
||||||
this.close()
|
this.close()
|
||||||
},
|
},
|
||||||
handleCancel () {
|
handleCancel () {
|
||||||
|
|||||||
@@ -69,12 +69,12 @@
|
|||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item :label="$t('system.internalWorkGroup.name')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('system.internalWorkGroup.name')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input :placeholder="$t('pleaseEnter')+$t('system.internalWorkGroup.name')" v-model="queryParam.userName"></a-input>
|
<a-input :placeholder="$t('pleaseEnter')+$t('system.internalWorkGroup.name')" v-model="queryParam.realname"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item :label="$t('system.internalWorkGroup.workNo')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('system.internalWorkGroup.workNo')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input :placeholder="$t('pleaseEnter')+$t('system.internalWorkGroup.workNo')" v-model="queryParam.userWorkNo"></a-input>
|
<a-input :placeholder="$t('pleaseEnter')+$t('system.internalWorkGroup.workNo')" v-model="queryParam.username"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<template v-if="toggleSearchStatus">
|
<template v-if="toggleSearchStatus">
|
||||||
@@ -172,14 +172,14 @@ export default {
|
|||||||
title: this.$t('system.internalWorkGroup.name'),
|
title: this.$t('system.internalWorkGroup.name'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
dataIndex: 'userName',
|
dataIndex: 'realname',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('system.internalWorkGroup.workNo'),
|
title: this.$t('system.internalWorkGroup.workNo'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
dataIndex: 'userWorkNo',
|
dataIndex: 'username',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -48,10 +48,6 @@
|
|||||||
<a-input :placeholder="$t('pleaseEnter') + $t('user.userName')" v-model="model.realname" :maxLength="50" :disabled="disableSubmit" />
|
<a-input :placeholder="$t('pleaseEnter') + $t('user.userName')" v-model="model.realname" :maxLength="50" :disabled="disableSubmit" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
|
|
||||||
<a-form-model-item label="工号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
||||||
<a-input placeholder="请输入工号" v-model="model.workNo" />
|
|
||||||
</a-form-model-item>
|
|
||||||
|
|
||||||
<!--<a-form-model-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
<!--<a-form-model-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||||
<!--<j-select-position placeholder="请选择职务" :multiple="false" v-decorator="['post', {}]"/>-->
|
<!--<j-select-position placeholder="请选择职务" :multiple="false" v-decorator="['post', {}]"/>-->
|
||||||
<!--</a-form-model-item>-->
|
<!--</a-form-model-item>-->
|
||||||
@@ -185,15 +181,13 @@ export default {
|
|||||||
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
|
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
|
||||||
message: this.$t('user.passwordConsists')
|
message: this.$t('user.passwordConsists')
|
||||||
},
|
},
|
||||||
{ validator: this.validateToNextPassword, trigger: 'change' }],
|
{ validator: this.validateToNextPassword, trigger: 'change' }],
|
||||||
confirmpassword: [{ required: true, message: this.$t('user.reenterLoginPassword') },
|
confirmpassword: [{ required: true, message: this.$t('user.reenterLoginPassword') },
|
||||||
{ validator: this.compareToFirstPassword }],
|
{ validator: this.compareToFirstPassword }],
|
||||||
realname: [{ required: true, message: this.$t('pleaseEnter') + this.$t('user.userName') }],
|
realname: [{ required: true, message: this.$t('pleaseEnter') + this.$t('user.userName') }],
|
||||||
phone: [{ validator: this.validatePhone }],
|
phone: [{ validator: this.validatePhone }],
|
||||||
email: [{ validator: this.validateEmail }],
|
email: [{ validator: this.validateEmail }],
|
||||||
roles: {},
|
roles: {},
|
||||||
workNo: [{ required: true, message: this.$t('pleaseEnter') + this.$t('user.workNo') },
|
|
||||||
{ validator: this.validateWorkNo }]
|
|
||||||
},
|
},
|
||||||
departIdShow: false,
|
departIdShow: false,
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
@@ -480,21 +474,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
validateWorkNo (rule, value, callback) {
|
|
||||||
const params = {
|
|
||||||
tableName: 'sys_user',
|
|
||||||
fieldName: 'work_no',
|
|
||||||
fieldVal: value,
|
|
||||||
dataId: this.userId
|
|
||||||
}
|
|
||||||
duplicateCheck(params).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
callback()
|
|
||||||
} else {
|
|
||||||
callback(new Error(this.$t('user.workNoExists')))
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleConfirmBlur (e) {
|
handleConfirmBlur (e) {
|
||||||
const value = e.target.value
|
const value = e.target.value
|
||||||
this.confirmDirty = this.confirmDirty || !!value
|
this.confirmDirty = this.confirmDirty || !!value
|
||||||
|
|||||||
Reference in New Issue
Block a user