irc_web/.svn/pristine/a4/a4f254f3d25e66ced6925003e20...

318 lines
9.1 KiB
Plaintext

<template>
<div v-loading="loading" class="chat-wrapper">
<div class="chat-content">
<div v-for="(record,index) in recordContent" :key="index">
<div :class="[!record.IsCurrentUser?'word':'word-my']">
<img v-if="record.UserTypeEnumInt*1 === 14" class="avatar" :src="mimAvatar" alt="MIM">
<img v-else class="avatar" :src="irAvatar" alt="IR">
<div class="info">
<p class="user-info">
<span style="font-weight:700;">{{ record.CreateUserName }} </span>
<span>({{ record.CreateTime }}) </span>
</p>
<div class="info-content">
<template v-if="record.UserTypeEnumInt === 14 && record.Content">
<div>{{ record.Content }}</div>
</template>
<template v-else-if="record.UserTypeEnumInt === 14 && !record.Content">
<div>
您好,根据医学审核反馈,该阅片任务的评估有如下问题需要您确认或澄清:
<ol>
{{ record.Questioning }}
</ol>
</div>
<div v-if="record.FileList && record.FileList.length > 0" style="margin-top:5px;">
本次医学审核相关截图(如适用)如下:
<ol>
<li v-for="file in record.FileList" :key="file.ImagePath" style="list-style: none;">
<el-button
type="text"
size="mini"
@click="previewImage(file.ImagePath)"
>{{ file.FileName }}</el-button>
</li>
</ol>
</div>
<div style="margin-top:5px;">
根据本项目《独立影像评估章程》的相关约定,该类问题医学审核建议为:
<ol>
<span style="color:red">{{ $fd('AuditAdvice', record.AuditAdviceEnum) }}</span>
</ol>
</div>
<div style="margin-top:5px;">
为高效解决/处理以上全部医学反馈问题,麻烦您在对该阅片任务的评估准确复核后,明确是否认可医学反馈问题及结论。如不认可医学反馈,请逐条准确完整回复不认可的原因,非常感谢。
</div>
</template>
<template v-else>
<div>
是否认可医学反馈:{{ $fd('MedicalReviewDoctorUserIdea', record.DoctorUserIdeaEnum) }}
</div>
<div v-if="record.DoctorUserIdeaEnum===2">原因:{{ record.DisagreeReason }}</div>
<div>
是否申请重阅:{{ record.IsApplyHeavyReading ? '是' : '否' }}
</div>
<div v-if="record.ImagePath" style="margin-top:5px;">
本次医学审核相关截图(如适用)如下:
<el-button
type="text"
@click="previewImage(record.ImagePath)"
>{{ record.FileName }}</el-button>
</div>
<!-- <div v-if="!!record.IsApplyHeavyReading">
是否复制阅片表单{{ record.IsApplyHeavyReading ? '是' : '否' }}
</div>
<div v-if="!!record.IsCopyOrigenalForms">
是否复制后续表单{{ record.IsCopyOrigenalForms ? '是' : '否' }}
</div> -->
</template>
</div>
</div>
</div>
</div>
</div>
<div
v-if="userTypeEnumInt===13 && !otherInfo.IsClosedDialog"
class="chat-message"
>
<div class="function">
<el-button
type="primary"
:loading="btnLoading"
@click="handleIRReply"
>
回复
</el-button>
</div>
</div>
<el-dialog
v-if="previewDialog"
append-to-body
:close-on-click-modal="false"
:visible.sync="previewDialog"
width="600px"
>
<!-- <img width="100%" :src="imagePath" alt="图片未找到"> -->
<el-image :src="imagePath" width="100%">
<div slot="placeholder" class="image-slot">
加载中<span class="dot">...</span>
</div>
</el-image>
</el-dialog>
<el-dialog
v-if="irFeedbackForm.visible"
:visible.sync="irFeedbackForm.visible"
:close-on-click-modal="false"
custom-class="base-dialog-wrapper"
:title="irFeedbackForm.title"
width="1200px"
append-to-body
>
<FeedbackForm
:task-medical-review-id="taskMedicalReviewId"
:visit-task-id="visitTaskId"
@getList="getMessageList"
@close="irFeedbackForm.visible = false"
/>
</el-dialog>
</div>
</template>
<script>
import { getMedicalReviewDialog } from '@/api/trials'
import FeedbackForm from './FeedbackForm'
import mimAvatar from '@/assets/MIM.png'
import irAvatar from '@/assets/IR.png'
export default {
name: 'ChatForm',
components: { FeedbackForm },
props: {
taskMedicalReviewId: {
type: String,
required: true
},
visitTaskId: {
type: String,
required: true
}
},
data() {
return {
recordContent: [],
newMessage: '',
showNewMessage: false,
loading: false,
btnLoading: false,
mimAvatar,
irAvatar,
userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1,
ReuploadEnum: 0,
trialId: this.$route.query.trialId,
currentUserId: zzSessionStorage.getItem('userId'),
otherInfo: {},
irFeedbackForm: { visible: false, title: '' },
imagePath: '',
previewDialog: false
}
},
mounted() {
this.getMessageList()
},
methods: {
// 初始化聊天信息
getMessageList() {
this.loading = true
var param = {
taskMedicalReviewId: this.taskMedicalReviewId
}
getMedicalReviewDialog(param).then(res => {
this.otherInfo = res.OtherInfo
this.recordContent = res.Result
this.setScrollHeight()
this.loading = false
}).catch(() => {
this.loading = false
})
},
setScrollHeight() {
setTimeout(() => {
var container = document.querySelectorAll('.chat-content')[0]
container.scrollTop = container.scrollHeight
}, 200)
},
handleIRReply() {
this.irFeedbackForm.title = '反馈'
this.irFeedbackForm.visible = true
},
previewImage(path) {
this.imagePath = `/api/${path}`
this.previewDialog = true
}
}
}
</script>
<style lang="scss">
.chat-wrapper{
::-webkit-scrollbar {
width: 7px;
height: 7px;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
background: #d0d0d0;
}
.chat-content{
width:100%;
padding: 20px;
height: 500px;
overflow-y: auto;
.word{
display: flex;
margin-bottom: 20px;
.avatar{
width:40px;
height: 40px;
border-radius: 50%;
}
.info{
margin-left: 10px;
.user-info{
font-size: 12px;
color:rgba(51,51,51,0.8);
margin:0;
height: 20px;
line-height: 20px;
margin-top: -5px;
}
.info-content{
padding: 10px;
font-size: 14px;
background-color: #ebeef5;
position: relative;
margin-top: 8px;
}
.info-content::before{
position: absolute;
left: -8px;
top: 8px;
content: '';
border-right: 10px solid #ebeef5;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
}
}
}
.word-my{
display: flex;
justify-content: flex-start;
flex-direction: row-reverse;
margin-bottom: 20px;
.avatar{
width: 40px;
height: 40px;
border-radius: 50%;
}
.info{
width: 90%;
margin-left: 10px;
text-align: right;
.user-info{
font-size: 12px;
color: rgba(51,51,51,0.8);
margin: 0;
height: 20px;
line-height: 20px;
margin-top: -5px;
margin-right: 10px;
}
.info-content{
position: relative;
max-width: 70%;
padding: 10px;
font-size: 14px;
float: right;
margin-right: 10px;
margin-top: 8px;
background-color: #7574d9;
color: #fff;
text-align: left;
}
.info-content::after{
position: absolute;
right: -8px;
top: 8px;
content: '';
border-left: 10px solid #7574d9;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
}
}
}
}
.chat-message{
padding: 0 50px;
.function{
margin-top: 10px;
text-align: right;
}
}
ol{
margin: 5px;
padding: 0px 10px;
counter-reset: num;
li{
counter-increment: num;
// list-style:none;
}
}
ol.example{counter-reset: num;}
ol.example li{counter-increment: num; list-style:none;}
}
</style>