GFRS-2468 特定疾病险-健康告知页面修改-提交人:白金岩

This commit is contained in:
bai.jinyan
2021-05-21 15:21:46 +08:00
parent 1dd14096b2
commit bd84465c5f

View File

@@ -417,7 +417,7 @@ export default {
// 特定疾病险 第一题 换行展示 // 特定疾病险 第一题 换行展示
item.impartItemDTOS.map(items => { item.impartItemDTOS.map(items => {
if (items.impartContent) { if (items.impartContent) {
items.impartContent = items.impartContent.replaceAll('\n','<br/>') items.impartContent = that.replaceNToBr(items.impartContent)
} }
}) })
} }
@@ -611,7 +611,7 @@ export default {
} else if (item.impartType == '13') { } else if (item.impartType == '13') {
//特定疾病险 答案全否 换行符转换 //特定疾病险 答案全否 换行符转换
item.impartItemDTOS.map(i => { item.impartItemDTOS.map(i => {
i.impartContent = i.impartContent.replaceAll('<br/>','') i.impartContent = that.replaceBrToNull(i.impartContent)
i.impartAnswer = '1' i.impartAnswer = '1'
}) })
objInsured = item objInsured = item
@@ -729,6 +729,14 @@ export default {
this.$toast(this.$validator.errors.all()[0]) this.$toast(this.$validator.errors.all()[0])
} }
}) })
},
replaceNToBr(str){
if(str!=null) str = str.replace(/\n/g,"<br/>")
return str;
},
replaceBrToNull(str){
if(str!=null) str = str.replace(/<br\/>/g,"")
return str;
} }
}, },