质控页面回复内容格式化

uat_us
caiyiling 2024-09-10 15:23:56 +08:00
parent ce079f923a
commit bf701bf3d8
3 changed files with 12 additions and 6 deletions

View File

@ -13,7 +13,7 @@
<span style="font-weight:700;">{{ record.CreateUserName }} </span> <span style="font-weight:700;">{{ record.CreateUserName }} </span>
<span>({{ record.CreateTime }}) </span> <span>({{ record.CreateTime }}) </span>
</p> </p>
<div class="info-content" v-html="record.TalkContent" /> <div class="info-content" v-html="formattedText(record.TalkContent)" />
</div> </div>
</div> </div>
@ -23,7 +23,7 @@
<span style="font-weight:700;">{{ record.CreateUserName }} </span> <span style="font-weight:700;">{{ record.CreateUserName }} </span>
<span>({{ record.CreateTime }}) </span> <span>({{ record.CreateTime }}) </span>
</p> </p>
<div class="info-content" v-html="record.TalkContent" /> <div class="info-content" v-html="formattedText(record.TalkContent)" />
</div> </div>
<!-- <img :src="record.headUrl"> --> <!-- <img :src="record.headUrl"> -->
<img v-if="record.UserTypeEnum*1 === 8" :src="adminAvatar" alt="Admin"> <img v-if="record.UserTypeEnum*1 === 8" :src="adminAvatar" alt="Admin">
@ -231,6 +231,9 @@ export default {
this.getMessageList() this.getMessageList()
}, },
methods: { methods: {
formattedText(text) {
return text.replace(/\n/g, '<br>')
},
// //
getMessageList() { getMessageList() {
var recordContent = [] var recordContent = []

View File

@ -13,7 +13,7 @@
<span style="font-weight:700;">{{ record.CreateUserName }} </span> <span style="font-weight:700;">{{ record.CreateUserName }} </span>
<span>({{ record.CreateTime }}) </span> <span>({{ record.CreateTime }}) </span>
</p> </p>
<div class="info-content" v-html="record.TalkContent" /> <div class="info-content" v-html="formattedText(record.TalkContent)" />
</div> </div>
</div> </div>
@ -23,7 +23,7 @@
<span style="font-weight:700;">{{ record.CreateUserName }} </span> <span style="font-weight:700;">{{ record.CreateUserName }} </span>
<span>({{ record.CreateTime }}) </span> <span>({{ record.CreateTime }}) </span>
</p> </p>
<div class="info-content" v-html="record.TalkContent" /> <div class="info-content" v-html="formattedText(record.TalkContent)" />
</div> </div>
<!-- <img :src="record.headUrl"> --> <!-- <img :src="record.headUrl"> -->
<img v-if="record.UserTypeEnum*1 === 8" :src="adminAvatar" alt="Admin"> <img v-if="record.UserTypeEnum*1 === 8" :src="adminAvatar" alt="Admin">
@ -153,6 +153,9 @@ export default {
close() { close() {
this.$emit('close') this.$emit('close')
}, },
formattedText(text) {
return text.replace(/\n/g, '<br>')
},
// //
getMessageList() { getMessageList() {
var recordContent = [] var recordContent = []

View File

@ -1643,14 +1643,14 @@ export default {
var str = `${item.keyName} <br>` var str = `${item.keyName} <br>`
if (item.keyValue) { if (item.keyValue) {
// //
str = `${str}${this.$t('trials:audit:form:questionSummary')}${ str = `${str}${this.$t('trials:audit:form:questionSummary')}<br>${
item.keyValue item.keyValue
}<br>` }<br>`
} }
if (item.actionContent) { if (item.actionContent) {
// //
actions.push(`${item.actionContent}`) actions.push(`${item.actionContent}`)
str = `${str}${this.$t('trials:audit:form:actionMatters')}${ str = `${str}${this.$t('trials:audit:form:actionMatters')}<br>${
item.actionContent item.actionContent
}<br>` }<br>`
} }