[FIX]【自助入司优化】健康告知页增加queryAll接口访问

This commit is contained in:
yuweiqi
2020-05-21 18:13:08 +08:00
parent 72596ab4be
commit c4c253bfec

View File

@@ -63,7 +63,7 @@
<script>
import { Collapse, CollapseItem, RadioGroup, Radio, Field, CellGroup, Icon } from 'vant'
import RsTop from '@/components/ebiz/agentEenter/RsTop'
import { saveOrUpdateInfo, getImpart } from '@/api/ebiz/agentEenter/agentEenter'
import { saveOrUpdateInfo, getImpart, agentAll } from '@/api/ebiz/agentEenter/agentEenter'
export default {
data() {
return {
@@ -74,7 +74,8 @@ export default {
},
mounted() {
document.body.style.backgroundColor = '#fff'
this.getImpart()
// this.getImpart()
this.agentAll()
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
@@ -97,6 +98,39 @@ export default {
}
})
},
agentAll() {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
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
}
} else {
this.$toast(res.resultMessage)
}
})
},
//获取健康告知列表
getImpart() {
let that = this