【修改】工作组的工号字段处理改进,更换为username字段
【修改】统一选人组件去掉账号字段和查询条件
This commit is contained in:
@@ -33,9 +33,9 @@
|
||||
<a-form v-if="switchValue === 'user'" layout="inline" @keyup.enter.native="searchQueryUser">
|
||||
<a-row :gutter="24">
|
||||
<a-col :sm="6">
|
||||
<a-form-item :label="$t('user.account')">
|
||||
<a-form-item :label="$t('user.workNo')">
|
||||
<a-input :placeholder="$t('pleaseEnter')"
|
||||
v-model="queryParamUser.account"></a-input>
|
||||
v-model="queryParamUser.username"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :sm="6">
|
||||
@@ -44,12 +44,6 @@
|
||||
v-model="queryParamUser.realname"></a-input>
|
||||
</a-form-item>
|
||||
</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">
|
||||
<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>
|
||||
@@ -266,8 +260,8 @@ export default {
|
||||
queryParamUser: {},
|
||||
columnsUser: [
|
||||
{
|
||||
title: this.$t('user.account'),
|
||||
dataIndex: 'account',
|
||||
title: this.$t('user.workNo'),
|
||||
dataIndex: 'username',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
@@ -275,11 +269,6 @@ export default {
|
||||
dataIndex: 'name',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: this.$t('user.workNo'),
|
||||
dataIndex: 'workNo',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: this.$t('role'),
|
||||
dataIndex: 'role',
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<a-col :span="6">
|
||||
<a-form-item :label="$t('user.account')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input :placeholder="$t('pleaseEnter')"
|
||||
v-model="queryParam.account"></a-input>
|
||||
v-model="queryParam.username"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
@@ -45,12 +45,6 @@
|
||||
v-model="queryParam.realname"></a-input>
|
||||
</a-form-item>
|
||||
</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">
|
||||
<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>
|
||||
@@ -80,7 +74,7 @@
|
||||
<p class="modal-content-title">{{ $t('userSelect.selectedPersonnel') }}</p>
|
||||
<div v-if="dataSourceRight && dataSourceRight.length > 0" class="name-content">
|
||||
<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)" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -134,7 +128,7 @@ export default {
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('user.account'),
|
||||
title: this.$t('user.workNo'),
|
||||
dataIndex: 'username',
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
@@ -145,12 +139,6 @@ export default {
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
title: this.$t('user.workNo'),
|
||||
dataIndex: 'workNo',
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
title: this.$t('role'),
|
||||
dataIndex: 'roleTxt',
|
||||
@@ -231,7 +219,7 @@ export default {
|
||||
const params = Object.assign({}, this.queryParam)
|
||||
params.pageNo = this.ipagination.current
|
||||
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.order = 'desc'
|
||||
this.loadingLeft = true
|
||||
@@ -310,7 +298,7 @@ export default {
|
||||
},
|
||||
handleOk () {
|
||||
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()
|
||||
},
|
||||
handleCancel () {
|
||||
|
||||
@@ -69,12 +69,12 @@
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="8">
|
||||
<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-col>
|
||||
<a-col :span="8">
|
||||
<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-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
@@ -172,14 +172,14 @@ export default {
|
||||
title: this.$t('system.internalWorkGroup.name'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'userName',
|
||||
dataIndex: 'realname',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
title: this.$t('system.internalWorkGroup.workNo'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'userWorkNo',
|
||||
dataIndex: 'username',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
|
||||
@@ -48,10 +48,6 @@
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('user.userName')" v-model="model.realname" :maxLength="50" :disabled="disableSubmit" />
|
||||
</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">-->
|
||||
<!--<j-select-position placeholder="请选择职务" :multiple="false" v-decorator="['post', {}]"/>-->
|
||||
<!--</a-form-model-item>-->
|
||||
@@ -185,15 +181,13 @@ export default {
|
||||
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
|
||||
message: this.$t('user.passwordConsists')
|
||||
},
|
||||
{ validator: this.validateToNextPassword, trigger: 'change' }],
|
||||
{ validator: this.validateToNextPassword, trigger: 'change' }],
|
||||
confirmpassword: [{ required: true, message: this.$t('user.reenterLoginPassword') },
|
||||
{ validator: this.compareToFirstPassword }],
|
||||
realname: [{ required: true, message: this.$t('pleaseEnter') + this.$t('user.userName') }],
|
||||
phone: [{ validator: this.validatePhone }],
|
||||
email: [{ validator: this.validateEmail }],
|
||||
roles: {},
|
||||
workNo: [{ required: true, message: this.$t('pleaseEnter') + this.$t('user.workNo') },
|
||||
{ validator: this.validateWorkNo }]
|
||||
},
|
||||
departIdShow: false,
|
||||
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) {
|
||||
const value = e.target.value
|
||||
this.confirmDirty = this.confirmDirty || !!value
|
||||
|
||||
Reference in New Issue
Block a user