BUG 29360
This commit is contained in:
@@ -35,10 +35,8 @@
|
||||
<span>选择人员</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<AiPagePicker class="select" :selected.sync="userList" householdName="1">
|
||||
<span v-if="!userList.length">请选择</span>
|
||||
<span v-if="userList.length" style="color: #333;">{{ userList[0].name }}</span>
|
||||
<u-icon name="arrow-right" color="#DDD" size="28"></u-icon>
|
||||
<AiPagePicker class="select" :selected.sync="userList" householdName="1" single>
|
||||
<AiMore v-model="form.name"/>
|
||||
</AiPagePicker>
|
||||
</div>
|
||||
</div>
|
||||
@@ -75,7 +73,7 @@
|
||||
</div>
|
||||
<div class="right">
|
||||
<input placeholder="请输入" type="idcard" v-model="form.idNumber" :maxlength="20"
|
||||
placeholder-style="color: #999; font-size: 30rpx;" @input="changeIdNumber" :disabled="userList.length? true : false"/>
|
||||
placeholder-style="color: #999; font-size: 30rpx;" @input="changeIdNumber" :disabled="!!userList.length"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -523,13 +521,11 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
userList: {
|
||||
handler: function (newValue, oldValue) {
|
||||
handler: function (v) {
|
||||
this.isEdit = true;
|
||||
this.form.name = newValue[0].name;
|
||||
this.form.idNumber = newValue[0].idNumber;
|
||||
this.form.sex = this.form.idNumber.substr(16, 1) % 2 == 0 ? '1' : '0'
|
||||
this.form.currentAreaId = newValue[0].currentAreaId
|
||||
this.form.currentAreaName = newValue[0].currentAreaName
|
||||
let {name, idNumber, currentAreaId, currentAreaName} = v?.[0] || {}
|
||||
this.form = {...this.form, name, idNumber, currentAreaId, currentAreaName}
|
||||
this.form.sex = this.idCardNoUtil.getIdCardInfo(idNumber)?.sex
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
@@ -565,9 +561,7 @@ export default {
|
||||
|
||||
onShow() {
|
||||
document.title = this.id ? '编辑监测对象' : '添加监测对象'
|
||||
console.log(this.userList);
|
||||
},
|
||||
|
||||
methods: {
|
||||
rules() {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user