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