质控页面回复内容格式化

This commit is contained in:
2024-09-10 15:23:56 +08:00
parent ce079f923a
commit bf701bf3d8
3 changed files with 12 additions and 6 deletions
@@ -13,7 +13,7 @@
<span style="font-weight:700;">{{ record.CreateUserName }} </span>
<span>({{ record.CreateTime }}) </span>
</p>
<div class="info-content" v-html="record.TalkContent" />
<div class="info-content" v-html="formattedText(record.TalkContent)" />
</div>
</div>
@@ -23,7 +23,7 @@
<span style="font-weight:700;">{{ record.CreateUserName }} </span>
<span>({{ record.CreateTime }}) </span>
</p>
<div class="info-content" v-html="record.TalkContent" />
<div class="info-content" v-html="formattedText(record.TalkContent)" />
</div>
<!-- <img :src="record.headUrl"> -->
<img v-if="record.UserTypeEnum*1 === 8" :src="adminAvatar" alt="Admin">
@@ -231,6 +231,9 @@ export default {
this.getMessageList()
},
methods: {
formattedText(text) {
return text.replace(/\n/g, '<br>')
},
// 初始化聊天信息
getMessageList() {
var recordContent = []
@@ -13,7 +13,7 @@
<span style="font-weight:700;">{{ record.CreateUserName }} </span>
<span>({{ record.CreateTime }}) </span>
</p>
<div class="info-content" v-html="record.TalkContent" />
<div class="info-content" v-html="formattedText(record.TalkContent)" />
</div>
</div>
@@ -23,7 +23,7 @@
<span style="font-weight:700;">{{ record.CreateUserName }} </span>
<span>({{ record.CreateTime }}) </span>
</p>
<div class="info-content" v-html="record.TalkContent" />
<div class="info-content" v-html="formattedText(record.TalkContent)" />
</div>
<!-- <img :src="record.headUrl"> -->
<img v-if="record.UserTypeEnum*1 === 8" :src="adminAvatar" alt="Admin">
@@ -153,6 +153,9 @@ export default {
close() {
this.$emit('close')
},
formattedText(text) {
return text.replace(/\n/g, '<br>')
},
// 初始化聊天信息
getMessageList() {
var recordContent = []
@@ -1643,14 +1643,14 @@ export default {
var str = `${item.keyName} <br>`
if (item.keyValue) {
// 问题总结
str = `${str}${this.$t('trials:audit:form:questionSummary')}${
str = `${str}${this.$t('trials:audit:form:questionSummary')}<br>${
item.keyValue
}<br>`
}
if (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
}<br>`
}