irc_web/.svn/pristine/9a/9a96c796866981103afaa55c54b...

238 lines
7.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<div v-loading="loading">
<div style="padding: 0 20px;">
<div class="info-content" v-html="crcMessageInfo.TalkContent" />
</div>
<div>
<div style="padding: 10px;background: #f3f3f3;border-radius: 10px;margin-top: 10px">
<div style="text-align: right;margin-bottom: 10px">
<el-button type="primary" size="mini" @click="addMsg">添加</el-button>
</div>
<el-table
:data="msgList">
<el-table-column type="index" width="40" />
<el-table-column
prop=""
label="检查信息"
show-overflow-tooltip
>
<template slot-scope="scope">
{{scope.row.StudyDate}}的{{scope.row.Modality}}影像检查
</template>
</el-table-column>
<el-table-column
prop=""
width="100px"
label="操作"
fixed="right"
>
<template slot-scope="scope">
<el-button @click="moveMsg(scope.$index)" size="small" type="text">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-form ref="revenusForm"
size="small"
label-width="170px"
:rules="rules"
:model="form">
<el-form-item label-width="130px" v-if="isLackOf" label="IRC缺失影像原因" prop="reason">
<el-checkbox-group v-model="form.reason" style="display: flex;flex-direction: column">
<el-checkbox style="display: block" label="EDC按疗效评估数据记录影像检查信息;">EDC按疗效评估数据记录影像检查信息</el-checkbox>
<el-checkbox style="display: block" label="EDC录入错误;">EDC录入错误</el-checkbox>
<el-checkbox style="display: block" label="IRC数据上传错误申请回退并重新上传;">IRC数据上传错误申请回退并重新上传</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form>
</div>
</div>
<div class="function">
<!-- 发送 -->
<el-button
type="primary"
@click="handleReply"
>
{{ $t('trials:consistencyCheck:button:sendMessage') }}
</el-button>
</div>
<el-dialog
v-if="studyVisible"
:visible.sync="studyVisible"
:close-on-click-modal="false"
append-to-body
custom-class="base-dialog-wrapper"
:width="'500px'"
title="添加检查"
>
<el-form>
<div class="base-dialog-body">
<el-form-item label-width="80px" label="检查日期">
<el-date-picker
v-model="typeInfo.StudyDate"
style="width: 100%"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label-width="80px" label="检查类型">
<el-select
v-model="typeInfo.Modality"
style="width: 100%"
>
<el-option v-for="item of $d.Modality" :label="item.raw.Value" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<el-form-item style="text-align:right;">
<el-button size="small" type="primary" @click="handleCancel"> {{ $t('common:button:cancel') }}</el-button>
<el-button size="small" type="primary" @click="handleSave">
{{ $t('common:button:save') }}
</el-button>
</el-form-item>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'CrcSendMessage',
props: {
crcMessageInfo: {
type: Object,
default() {
return {
TalkContent: null,
}
}
}
},
data() {
return {
loading: false,
msgList: [],
studyVisible: false,
typeInfo: {
StudyDate: null,
Modality: null
},
isLackOf: false,
EDCList: [],
IRCList: [],
form: {
reason: []
},
rules: {
reason: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }]
}
}
},
mounted() {
console.log(this.crcMessageInfo.ParamInfoList)
},
methods: {
compareStudy() {
var isLackOf = false
this.IRCList = []
this.EDCList = []
this.msgList.forEach((v, i) => {
this.crcMessageInfo.ParamInfoList.forEach(v1 => {
if (v.StudyDate + v.Modality !== v1.StudyDate + v1.Modality) {
isLackOf = true
this.IRCList.push({...v})
}
})
})
this.crcMessageInfo.ParamInfoList.forEach((v, i) => {
this.msgList.forEach(v1 => {
if (v.StudyDate + v.Modality !== v1.StudyDate + v1.Modality) {
isLackOf = true
this.EDCList.push({...v})
}
})
})
if (this.crcMessageInfo.ParamInfoList.length === 0) {
isLackOf = true
this.DifferentList = Object.assign([], this.msgList)
}
this.isLackOf = isLackOf
},
handleCancel() {
this.studyVisible = false
this.typeInfo = {
StudyDate: null,
Modality: null
}
},
handleSave() {
if (!this.typeInfo.StudyDate || !this.typeInfo.Modality) {
this.$message.error('请选择检查日期和检查类型')
return
}
this.msgList.push({...this.typeInfo})
this.compareStudy()
this.studyVisible = false
this.typeInfo = {
StudyDate: null,
Modality: null
}
},
closeLoading() {
this.loading = false
},
addMsg() {
this.studyVisible = true
},
moveMsg(index) {
this.$confirm('确定删除该条检查记录?').then(res => {
this.msgList.splice(index, 1)
this.compareStudy()
})
},
handleReply() {
if (this.msgList.length === 0) {
this.$message.error('请录入真实的检查情况')
return
}
this.$refs.revenusForm.validate((valid) => {
if (!valid) return
var TalkContent = ''
TalkContent += '经系统核实该受试者当前访视在IRC和EDC中一致的影像检查如下<br>'
this.crcMessageInfo.ParamInfoList.forEach((v, i) => {
TalkContent += `${i+1}.${v.StudyDate}的${v.Modality}影像检查`
})
TalkContent += '<br><br>'
if (this.isLackOf) {
TalkContent += 'IRC和EDC中不一致的影像检查如下<br>'
}
this.IRCList.forEach((v, i) => {
TalkContent += `${i+1}.${v.StudyDate}的${v.Modality}影像检查IRC缺少<br>`
})
if (this.form.reason.length > 0) {
TalkContent += '<br>'
TalkContent += '问题原因如下:'
this.form.reason.forEach(v => {
TalkContent += v
})
}
console.log(TalkContent)
this.$emit('sendMessage', TalkContent, this.closeLoading)
})
}
}
}
</script>
<style scoped>
.function{
margin-top: 10px;
text-align: right;
}
</style>