29497
This commit is contained in:
@@ -184,7 +184,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload">
|
||||
<!-- :disabled="isEdit" -->
|
||||
<AiUploader :def.sync="photo" multiple placeholder="上传图片" :limit="1" action="/admin/file/add2"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -517,14 +516,17 @@ export default {
|
||||
...mapState(['user']),
|
||||
isEdit() {
|
||||
return !!this.$route.query.id
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
userList: {
|
||||
handler: function (v) {
|
||||
let {name, idNumber, currentAreaId, currentAreaName} = v?.[0] || {}
|
||||
this.form = {...this.form, name, idNumber, currentAreaId, currentAreaName}
|
||||
this.form.sex = this.$idCardNoUtil.getIdCardInfo(idNumber)?.sex
|
||||
this.form.birthday = this.$idCardNoUtil.getIdCardInfo(idNumber)?.birthday
|
||||
this.form.age = this.$calcAge(this.form.idNumber)
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
@@ -636,8 +638,6 @@ export default {
|
||||
},
|
||||
|
||||
submit() {
|
||||
|
||||
|
||||
if(!this.isEdit) {
|
||||
if (!this.form.riskType) {
|
||||
return this.$u.toast('请选择风险因素')
|
||||
@@ -700,10 +700,6 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
onChange(e) {
|
||||
this.form.placeAreaId = e
|
||||
},
|
||||
|
||||
getInfo(id) {
|
||||
this.$http.post(`/app/apppreventionreturntopoverty/queryDetailById?id=${id}`).then(res => {
|
||||
if (res?.data) {
|
||||
@@ -720,15 +716,10 @@ export default {
|
||||
this.helthList.map(items => {
|
||||
items.checked = res.data.healthyStatusList.includes(items.dictValue)
|
||||
})
|
||||
this.form = {
|
||||
...this.form,
|
||||
...res.data
|
||||
}
|
||||
// this.photo = [{url: this.form.photo}]
|
||||
this.form = { ...this.form, ...res.data }
|
||||
|
||||
if (this.form.photo) {
|
||||
this.photo = [{url: this.form.photo}] || []
|
||||
// this.form.files = [{url: this.form.photo}]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -661,6 +661,8 @@ export default {
|
||||
let {name, idNumber, currentAreaId, currentAreaName} = v?.[0] || {}
|
||||
this.form = {...this.form, name, idNumber, currentAreaId, currentAreaName}
|
||||
this.form.sex = this.$idCardNoUtil.getIdCardInfo(idNumber)?.sex
|
||||
this.form.birthday = this.$idCardNoUtil.getIdCardInfo(idNumber)?.birthday
|
||||
this.form.age = this.$calcAge(this.form.idNumber)
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user