[FIX]【自助入司优化】健康告知反显修复

This commit is contained in:
yuweiqi
2020-05-22 11:04:02 +08:00
parent c4c253bfec
commit 8e29bc5993

View File

@@ -107,32 +107,14 @@ export default {
})
agentAll({}).then(res => {
if (res.result == '0') {
if (res.content.ebizItemDtoLst.length == 0) {
this.getImpart()
} else {
res.content.ebizItemDtoLst.map((item, index) => {
item.bigCode = 'A' + index + 1 //添加大标题标识
if (item.itemDtoLst) {
item.itemDtoLst.map((it, index) => {
it.impartAnswer = ''
it.smallCode = item.bigCode + index //添加小题目标识
})
}
})
if (localStorage.agentSex == 0) {
// //姓别为男不显示该题
// this.isDisabled = true
// res.content.ebizItemDtoLst.splice(7, 1)
}
this.impartDTOS = res.content.ebizItemDtoLst
}
this.getImpart(res.content.ebizItemDtoLst)
} else {
this.$toast(res.resultMessage)
}
})
},
//获取健康告知列表
getImpart() {
getImpart(dataItemLst) {
let that = this
let data = {
// userModel: {
@@ -150,15 +132,53 @@ export default {
that.$toast.clear()
console.log(res)
res.map((item, index) => {
if (dataItemLst && dataItemLst.length > 0) {
let showLst = dataItemLst.filter(itemC => {
return itemC.impartId == item.impartId && itemC.impartType == item.impartType
})
if (showLst && showLst.length > 0) {
item.impartAnswer = showLst[0].impartAnswer
item.impartRemark = showLst[0].impartRemark
item.bigCode = 'A' + index + 1
if (item.itemDtoLst) {
item.itemDtoLst.map((it, index) => {
let showSubLst = showLst.filter(itemB => {
return itemB.impartNo == it.impartNo && itemB.impartType == it.impartType
})
if (showSubLst && showSubLst.length > 0) {
it.impartAnswer = showSubLst[0].impartAnswer
it.impartRemark = showSubLst[0].impartRemark
} else {
it.impartAnswer = ''
it.impartRemark = ''
}
it.smallCode = item.bigCode + index //添加小题目标识
})
}
} else {
item.impartAnswer = ''
item.impartRemark = ''
item.bigCode = 'A' + index + 1 //添加大标题标识
if (item.itemDtoLst) {
item.itemDtoLst.map((it, index) => {
it.impartAnswer = ''
it.impartRemark = ''
it.smallCode = item.bigCode + index //添加小题目标识
})
}
}
} else {
item.impartAnswer = ''
item.impartRemark = ''
item.bigCode = 'A' + index + 1 //添加大标题标识
if (item.itemDtoLst) {
item.itemDtoLst.map((it, index) => {
it.impartAnswer = ''
it.impartRemark = ''
it.smallCode = item.bigCode + index //添加小题目标识
})
}
}
})
if (localStorage.agentSex == 0) {
// //姓别为男不显示该题