BUG 28444
This commit is contained in:
@@ -29,15 +29,8 @@
|
||||
@onConfirm="onConfirm"
|
||||
@closed="form={}">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="选择人员" prop="residentId">
|
||||
<ai-person-select :instance="instance" :customClicker="true"
|
||||
:url="'/app/appresident/list?auditType=1areaId=' + user.info.areaId"
|
||||
:isMultiple="false" dialogTitle="选择" @selectPerson="selectPerson">
|
||||
<template name="option" v-slot:option="{ item }">
|
||||
<span class="iconfont iconProlife">{{ item.name }}</span>
|
||||
<ai-id mode="show" :show-eyes="false" :value="item.idNumber"/>
|
||||
</template>
|
||||
</ai-person-select>
|
||||
<el-form-item label="选择账号" prop="portalUserId">
|
||||
<ai-user-picker :instance="instance" v-model="form.portalUserId"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="调整说明" prop="description">
|
||||
<el-input v-model.trim="form.description" placeholder="请输入..." type="textarea" :rows="4" show-word-limit
|
||||
@@ -59,9 +52,11 @@
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex"
|
||||
import AiUserPicker from "../../../components/AiUserPicker";
|
||||
|
||||
export default {
|
||||
name: "scoreChange",
|
||||
components: {AiUserPicker},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
@@ -85,7 +80,7 @@ export default {
|
||||
...mapState(["user"]),
|
||||
rules() {
|
||||
return {
|
||||
residentId: [{required: true, message: '请选择人员', trigger: 'blur'},],
|
||||
portalUserId: [{required: true, message: '请选择人员', trigger: 'blur'},],
|
||||
description: [{required: true, message: '请输入调整说明', trigger: 'blur'},],
|
||||
doType: [{required: true, message: '请输入调整说明', trigger: 'change'},],
|
||||
changeIntegral: [
|
||||
@@ -124,10 +119,10 @@ export default {
|
||||
methods: {
|
||||
selectPerson(val) {
|
||||
if (val) {
|
||||
this.form.residentId = val.id
|
||||
this.form.portalUserId = val.id
|
||||
this.personList = [{...val}]
|
||||
} else {
|
||||
this.form.residentId = ""
|
||||
this.form.portalUserId = ""
|
||||
this.personList = []
|
||||
}
|
||||
},
|
||||
|
||||
47
project/xiushan/components/AiUserPicker.vue
Normal file
47
project/xiushan/components/AiUserPicker.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<section class="AiUserPicker">
|
||||
<el-select size="small" :value="value" placeholder="选择人员" clearable @change="v=>$emit('select',v)" v-bind="$attrs"
|
||||
filterable>
|
||||
<el-option v-for="row in list" :key="row.id" :value="row.id" :label="row.phone"/>
|
||||
</el-select>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "AiUserPicker",
|
||||
model: {
|
||||
prop: "value",
|
||||
event: "select"
|
||||
},
|
||||
props: {
|
||||
value: {default: ""},
|
||||
instance: Function,
|
||||
action: {default: "/appportaluser/list"},
|
||||
params: {default: () => ({})}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getUsers() {
|
||||
let {action, params} = this
|
||||
this.instance?.post(action, null, {params: {...params, size: 9999}}).then(res => {
|
||||
if (res?.data) {
|
||||
this.list = res.data.records
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUsers()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AiUserPicker {
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user