BUG 29447

This commit is contained in:
aixianling
2022-04-29 18:32:34 +08:00
parent 92e5773157
commit 6089dea690

View File

@@ -213,7 +213,7 @@
</div>
<div class="bottoms">
<div class="cards" v-for="(e, index) in helthList" :key="index">
<div :style="{color:e.checked == true ? '#1174FE' : '#333'}" @click="userClick(e, index)">{{ e.dictName }}</div>
<div :style="{color:e.checked == true ? '#1174FE' : '#333'}" @click="userClick(e)">{{ e.dictName }}</div>
</div>
</div>
</div>
@@ -289,7 +289,7 @@
<span>劳动技能</span>
</div>
<div class="right">
<AiSelect dict="fpLaborSkills" v-model="form.labourStatus"></AiSelect>
<AiSelect dict="fpLaborSkills" v-model="form.labourStatus"/>
</div>
</div>
</div>
@@ -493,7 +493,6 @@ export default {
userList: [],
flag: false,
helthList: [],
namelist: [],
basicsCheckList: [
{dictName: '城乡居民基本医疗保险', checked: false},
{dictName: '城镇职工基本医疗保险', checked: false},
@@ -546,21 +545,15 @@ export default {
this.form.objectType = query.objectType
this.houseIdNumber = query.houseIdNumber
if (query.id) {
this.flag = true
this.id = query.id
this.getInfo(this.id)
}
})
},
onShow() {
document.title = this.id ? '编辑监测对象' : '添加监测对象'
document.title = this.$route.query.id ? '编辑监测对象' : '添加监测对象'
if (this.$route.query.id) {
this.flag = true
this.getInfo(this.$route.query.id)
}
},
methods: {
rules() {
@@ -579,20 +572,9 @@ export default {
})
},
userClick(row, i) {
if (!this.helthList[i].checked) {
this.helthList[i].checked = true // 确定
this.namelist.push({dictValue: row.dictValue, dictName: row.dictName}) // 赋值
} else {
this.helthList[i].checked = false // 取消
this.namelist.map((item, index) => {
if (item.dictValue == row.dictValue) {
this.namelist.splice(index, 1)
}
})
}
this.form.healthyStatus = this.namelist.map(v => v.dictValue).join(',')
userClick(row) {
row.checked = !row.checked
this.form.healthyStatus = this.helthList.filter(e => e.checked)?.map(e => e.dictValue)?.toString()
},
// 医疗保险
@@ -704,11 +686,10 @@ export default {
this.$http.post('/app/apppreventionreturntopoverty/addByEwechat', {
...this.form,
id: this.id || '',
girdId: this.user.girdId,
}).then(res => {
if (res.code == 0) {
this.$u.toast(this.id ? '保存成功' : '提交成功')
this.$u.toast(this.$route.query.id ? '保存成功' : '提交成功')
uni.$emit('reload')
uni.navigateTo({url: './serviceResult'})
}
@@ -737,9 +718,7 @@ export default {
res.data.healthyStatusList.map((item) => {
this.helthList.map(items => {
if (item == items.dictValue) {
items.checked = true
}
items.checked = item == items.dictValue
})
})