435 lines
15 KiB
Plaintext
435 lines
15 KiB
Plaintext
<template>
|
|
<div ref="container" style="width:100%;height:100%" class="dicom-container">
|
|
<!-- 访视阅片 -->
|
|
<div v-if="(isReadingTaskViewInOrder || (!isReadingTaskViewInOrder && isShow)) && readingCategory && readingCategory=== 1 && CriterionType !== 0" class="reading-wrapper">
|
|
<el-tabs v-model="activeName" v-loading="loading" :before-leave="beforeLeave">
|
|
<!-- 阅片 -->
|
|
<el-tab-pane :label="$t('trials:reading:tabTitle:review')" name="read">
|
|
<ReadPage
|
|
v-if="tabs.includes('read')"
|
|
:trial-id="trialId"
|
|
:visit-task-id="visitTaskId"
|
|
:subject-id="subjectId"
|
|
:subject-code="subjectCode"
|
|
:isReadingShowSubjectInfo="isReadingShowSubjectInfo"
|
|
:is-exists-clinical-data="isExistsClinicalData"
|
|
:is-exists-no-dicom-file="isExistsNoDicomFile"
|
|
/>
|
|
</el-tab-pane>
|
|
<!-- 报告 -->
|
|
<el-tab-pane :label="$t('trials:reading:tabTitle:report')" name="report">
|
|
<ReportPage v-if="tabs.includes('report') && isShow" ref="reportPage" :visit-task-id="visitTaskId" />
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</div>
|
|
<div v-if="(isReadingTaskViewInOrder || (!isReadingTaskViewInOrder && isShow)) && readingCategory && readingCategory=== 1 && CriterionType === 0" class="reading-wrapper">
|
|
<el-tabs v-model="activeName" v-loading="loading" :before-leave="beforeLeaveCustomize">
|
|
<!-- 阅片 -->
|
|
<el-tab-pane :label="$t('trials:reading:tabTitle:review')" name="read">
|
|
<CustomizeReadPage
|
|
v-if="tabs.includes('read')"
|
|
:trial-id="trialId"
|
|
:visit-task-id="visitTaskId"
|
|
:subject-id="subjectId"
|
|
:subject-code="subjectCode"
|
|
:isReadingShowSubjectInfo="isReadingShowSubjectInfo"
|
|
:IseCRFShowInDicomReading="IseCRFShowInDicomReading"
|
|
:is-exists-clinical-data="isExistsClinicalData"
|
|
:is-exists-no-dicom-file="isExistsNoDicomFile"
|
|
/>
|
|
</el-tab-pane>
|
|
<!-- 报告 -->
|
|
<el-tab-pane v-if="!IseCRFShowInDicomReading" :label="$t('trials:reading:tabTitle:report')" name="report">
|
|
<CustomizeReportPage ref="reportPage" v-if="isShow" :visit-task-id="visitTaskId" />
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</div>
|
|
<!-- 全局阅片 -->
|
|
<GlobalReview
|
|
v-else-if="isShow && readingCategory && readingCategory === 2"
|
|
:trial-id="trialId"
|
|
:subject-id="subjectId"
|
|
:visit-task-id="visitTaskId"
|
|
:reading-category="readingCategory"
|
|
:subject-code="subjectCode"
|
|
:task-blind-name="taskBlindName"
|
|
:is-reading-show-subject-info="isReadingShowSubjectInfo"
|
|
:is-reading-show-previous-results="isReadingShowPreviousResults"
|
|
:is-exists-clinical-data="isExistsClinicalData"
|
|
/>
|
|
<!-- 裁判阅片 -->
|
|
<AdReview
|
|
v-else-if="isShow && readingCategory && readingCategory === 4"
|
|
:trial-id="trialId"
|
|
:subject-id="subjectId"
|
|
:visit-task-id="visitTaskId"
|
|
:reading-category="readingCategory"
|
|
:subject-code="subjectCode"
|
|
:task-blind-name="taskBlindName"
|
|
:is-reading-show-subject-info="isReadingShowSubjectInfo"
|
|
:is-reading-show-previous-results="isReadingShowPreviousResults"
|
|
:is-exists-clinical-data="isExistsClinicalData"
|
|
/>
|
|
|
|
<!-- 肿瘤学阅片 -->
|
|
<OncologyReview
|
|
v-else-if="isShow && readingCategory && readingCategory === 5"
|
|
:trial-id="trialId"
|
|
:subject-id="subjectId"
|
|
:visit-task-id="visitTaskId"
|
|
:reading-category="readingCategory"
|
|
:subject-code="subjectCode"
|
|
:task-blind-name="taskBlindName"
|
|
:is-reading-show-subject-info="isReadingShowSubjectInfo"
|
|
:is-reading-show-previous-results="isReadingShowPreviousResults"
|
|
:is-exists-clinical-data="isExistsClinicalData"
|
|
/>
|
|
|
|
<el-dialog
|
|
width="75%"
|
|
:visible.sync="dialogVisible"
|
|
style="margin:0px"
|
|
custom-class="dialog-container"
|
|
:show-close="false"
|
|
:close-on-click-modal="false"
|
|
>
|
|
<span slot="title" class="dialog-footer">
|
|
<!-- 当前阅片任务存在临床数据,请查看。若已查看,请点击“确认” -->
|
|
{{ $t('trials:reading:dagTitle:msg1') }}
|
|
</span>
|
|
<div :style="{'height':dialogH,'margin':0}">
|
|
<ClinicalData
|
|
:trial-id="trialId"
|
|
:subject-id="subjectId"
|
|
:visit-task-id="visitTaskId"
|
|
/>
|
|
</div>
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
<!-- 确认 -->
|
|
<el-button type="primary" @click="handleConfirmCD">{{ $t('trials:reading:button:confirm') }}</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import { getNextTask, readClinicalData, verifyDefaultQuestionBeAnswer } from '@/api/trials'
|
|
import ReadPage from './components/ReadPage'
|
|
import CustomizeReadPage from './customize/CustomizeReadPage'
|
|
import ReportPage from './components/ReportPage'
|
|
import CustomizeReportPage from './customize/CustomizeReportPage'
|
|
import GlobalReview from '@/views/trials/trials-panel/reading/global-review'
|
|
import AdReview from '@/views/trials/trials-panel/reading/ad-review'
|
|
import OncologyReview from '@/views/trials/trials-panel/reading/oncology-review'
|
|
import ClinicalData from '@/views/trials/trials-panel/reading/clinical-data'
|
|
import DicomEvent from './components/DicomEvent'
|
|
import store from '@/store'
|
|
import { getToken } from '@/utils/auth'
|
|
import { changeURLStatic } from '@/utils/history.js'
|
|
export default {
|
|
name: 'Reading',
|
|
components: {
|
|
ReadPage,
|
|
ReportPage,
|
|
GlobalReview,
|
|
AdReview,
|
|
OncologyReview,
|
|
ClinicalData,
|
|
CustomizeReadPage,
|
|
CustomizeReportPage
|
|
},
|
|
data() {
|
|
return {
|
|
activeName: '',
|
|
tabs: [],
|
|
trialId: '',
|
|
subjectCode: '',
|
|
subjectId: '',
|
|
visitTaskId: '',
|
|
loading: false,
|
|
readingCategory: null,
|
|
isReadingShowSubjectInfo: false,
|
|
isReadingShowPreviousResults: false,
|
|
isExistsClinicalData: false,
|
|
isExistsNoDicomFile: false,
|
|
isNeedReadClinicalData: false,
|
|
isReadClinicalData: false,
|
|
digitPlaces: 2,
|
|
isReadingTaskViewInOrder: false,
|
|
firstTaskReadingCategory: null,
|
|
criterionType: null,
|
|
readingTool: null,
|
|
dialogVisible: false,
|
|
dialogH: 0,
|
|
TrialReadingCriterionId: null,
|
|
isNewSubject: null,
|
|
isShow: false,
|
|
IseCRFShowInDicomReading: false,
|
|
isQualityIssueSaved: false,
|
|
questionFormChangeState: false,
|
|
questionFormChangeNum: 0
|
|
}
|
|
},
|
|
mounted() {
|
|
DicomEvent.$on('questionFormChange', (v) => {
|
|
if (this.questionFormChangeNum !== 0) {
|
|
this.questionFormChangeState = v
|
|
}
|
|
this.questionFormChangeNum++
|
|
})
|
|
DicomEvent.$on('getNextTask', () => {
|
|
this.isQualityIssueSaved = false
|
|
this.firstTaskReadingCategory = this.readingCategory
|
|
if (!this.isReadingTaskViewInOrder) {
|
|
// 清除缓存visitTaskList
|
|
store.dispatch('reading/resetVisitTasks')
|
|
}
|
|
this.getTaskInfo(1)
|
|
})
|
|
this.activeName = this.$router.currentRoute.query.tabName ? this.$router.currentRoute.query.tabName : 'read'
|
|
this.tabs.push(this.activeName)
|
|
this.trialId = this.$router.currentRoute.query.trialId
|
|
this.subjectCode = this.$router.currentRoute.query.subjectCode
|
|
this.subjectId = this.$router.currentRoute.query.subjectId
|
|
this.visitTaskId = this.$router.currentRoute.query.visitTaskId
|
|
this.isReadingTaskViewInOrder = JSON.parse(this.$router.currentRoute.query.isReadingTaskViewInOrder)
|
|
this.criterionType = this.$router.currentRoute.query.criterionType
|
|
this.readingTool = this.$router.currentRoute.query.readingTool
|
|
this.TrialReadingCriterionId = this.$router.currentRoute.query.TrialReadingCriterionId
|
|
this.isNewSubject = this.$router.currentRoute.query.isNewSubject
|
|
if (this.isNewSubject && this.isReadingTaskViewInOrder) {
|
|
// 已开始受试者${this.subjectCode}阅片任务
|
|
var msg = this.$t('trials:reading:warnning:msg1')
|
|
msg = msg.replace('xxx', this.subjectCode)
|
|
this.$message.success(msg)
|
|
changeURLStatic('isNewSubject', '')
|
|
}
|
|
if (this.$router.currentRoute.query.TokenKey) {
|
|
store.dispatch('user/setToken', this.$router.currentRoute.query.TokenKey)
|
|
changeURLStatic('TokenKey', '')
|
|
}
|
|
store.dispatch('reading/resetVisitTasks')
|
|
this.getTaskInfo()
|
|
|
|
this.dialogH = this.$refs['container'].clientHeight - 250 + 'px'
|
|
window.addEventListener('resize', () => { this.dialogH = this.$refs['container'].clientHeight - 250 + 'px' })
|
|
},
|
|
beforeDestroy() {
|
|
DicomEvent.$off('getNextTask')
|
|
},
|
|
methods: {
|
|
getTaskInfo(flag = 0) {
|
|
this.loading = true
|
|
var param = {
|
|
subjectId: this.subjectId,
|
|
trialId: this.trialId,
|
|
subjectCode: this.subjectCode,
|
|
visitTaskId: this.$router.currentRoute.query.visitTaskId,
|
|
trialReadingCriterionId: this.$router.currentRoute.query.TrialReadingCriterionId
|
|
}
|
|
this.isShow = false
|
|
getNextTask(param).then(async res => {
|
|
this.visitTaskId = res.Result.VisitTaskId
|
|
DicomEvent.$emit('getCustomTableQuestionAnswer', res.Result.VisitTaskId)
|
|
if (this.subjectId !== res.Result.SubjectId) {
|
|
store.dispatch('reading/resetVisitTasks')
|
|
var token = getToken()
|
|
window.location.href = `/readingDicoms?TrialReadingCriterionId=${this.TrialReadingCriterionId}&trialId=${this.trialId}&subjectCode=${res.Result.SubjectCode}&subjectId=${res.Result.SubjectId}&isReadingTaskViewInOrder=${this.isReadingTaskViewInOrder}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&TokenKey=${token}&isNewSubject=1`
|
|
} else if (!this.isReadingTaskViewInOrder || res.Result.ReadingCategory !== 1) {
|
|
store.dispatch('reading/resetVisitTasks')
|
|
}
|
|
this.subjectId = res.Result.SubjectId
|
|
this.subjectCode = res.Result.SubjectCode
|
|
this.taskBlindName = res.Result.TaskBlindName
|
|
this.isReadingShowSubjectInfo = res.Result.IsReadingShowSubjectInfo
|
|
this.isReadingShowPreviousResults = res.Result.IsReadingShowPreviousResults
|
|
this.isExistsNoDicomFile = res.Result.IsExistsNoDicomFile
|
|
this.isExistsClinicalData = res.Result.IsExistsClinicalData
|
|
this.isReadClinicalData = res.Result.IsReadClinicalData
|
|
this.isNeedReadClinicalData = res.Result.IsNeedReadClinicalData
|
|
this.CriterionType = res.Result.CriterionType
|
|
this.digitPlaces = res.Result.DigitPlaces
|
|
this.IseCRFShowInDicomReading = res.Result.IseCRFShowInDicomReading
|
|
localStorage.setItem('CriterionType', res.Result.CriterionType)
|
|
localStorage.setItem('digitPlaces', res.Result.DigitPlaces)
|
|
this.readingCategory = res.Result.ReadingCategory
|
|
if (this.isExistsClinicalData && this.isNeedReadClinicalData && !this.isReadClinicalData) {
|
|
this.dialogVisible = true
|
|
}
|
|
|
|
if (res.Result.ReadingCategory === 1) {
|
|
this.activeName = 'read'
|
|
this.tabs = [this.activeName]
|
|
}
|
|
if (this.firstTaskReadingCategory === 1 && res.Result.ReadingCategory === 1 && this.isReadingTaskViewInOrder && flag) {
|
|
this.activeName = 'read'
|
|
this.tabs = [this.activeName]
|
|
this.$nextTick(() => {
|
|
DicomEvent.$emit('getNextVisitInfo')
|
|
DicomEvent.$emit('getReportInfo')
|
|
})
|
|
}
|
|
this.isShow = true
|
|
this.loading = false
|
|
}).catch(() => { this.loading = false })
|
|
},
|
|
beforeLeaveCustomize() {
|
|
this.isShow = false
|
|
this.$nextTick(() => {
|
|
this.isShow = true
|
|
})
|
|
},
|
|
myConfirm(msg) {
|
|
return new Promise(resolve => {
|
|
this.$confirm(msg, {
|
|
type: 'warning',
|
|
showCancelButton: true
|
|
}).then(() => {
|
|
// this.tabs.push(activeName)
|
|
// this.$nextTick(() => {
|
|
// this.$refs.reportPage.setScrollTop(1)
|
|
// })
|
|
resolve(true)
|
|
}).catch(() => {
|
|
resolve(false)
|
|
})
|
|
})
|
|
|
|
},
|
|
async beforeLeave(activeName, oldActiveName) {
|
|
if (oldActiveName === 'read') {
|
|
// if (this.questionFormChangeState) {
|
|
// var msg = this.$t('trials:reading:warnning:msg201')
|
|
// var isgo = await this.myConfirm(msg)
|
|
// if (isgo) {
|
|
// this.tabs.push(activeName)
|
|
// this.$nextTick(() => {
|
|
// this.$refs.reportPage.setScrollTop(1)
|
|
// })
|
|
// return Promise.resolve(true)
|
|
// } else {
|
|
// return Promise.reject(false)
|
|
// }
|
|
// }
|
|
// var list = null
|
|
// DicomEvent.$emit('getAllUnSaveLesions', val => {
|
|
// list = val
|
|
// })
|
|
// if (list.length > 0) {
|
|
// var arr = []
|
|
// list.map(i => {
|
|
// arr.push(i.lessionName)
|
|
// })
|
|
// // 请先保存${arr.join('、')}病灶信息!
|
|
// var msg = this.$t('trials:reading:warnning:msg2')
|
|
// msg = msg.replace('xxx', arr.join('、'))
|
|
// var isgo = await this.myConfirm(msg)
|
|
// if (isgo) {
|
|
// this.tabs.push(activeName)
|
|
// this.$nextTick(() => {
|
|
// this.$refs.reportPage.setScrollTop(1)
|
|
// })
|
|
// return Promise.resolve(true)
|
|
// } else {
|
|
// return Promise.reject(false)
|
|
// }
|
|
// } else {
|
|
// this.tabs.push(activeName)
|
|
// return Promise.resolve(true)
|
|
// }
|
|
this.tabs.push(activeName)
|
|
return Promise.resolve(true)
|
|
} else {
|
|
console.log(activeName)
|
|
if (!this.tabs.includes(activeName)) {
|
|
this.tabs.push(activeName)
|
|
}
|
|
// return true
|
|
return Promise.resolve(true)
|
|
}
|
|
},
|
|
verifyVisitTaskQuestions() {
|
|
return new Promise((resolve, reject) => {
|
|
this.loading = true
|
|
verifyDefaultQuestionBeAnswer({ visitTaskId: this.visitTaskId }).then(res => {
|
|
this.loading = false
|
|
this.isQualityIssueSaved = true
|
|
resolve()
|
|
}).catch(() => {
|
|
this.loading = false
|
|
this.isQualityIssueSaved = false
|
|
reject()
|
|
})
|
|
})
|
|
},
|
|
handleConfirmCD() {
|
|
this.loading = true
|
|
var visitTaskId = this.visitTaskId
|
|
readClinicalData({ visitTaskId }).then(res => {
|
|
this.loading = false
|
|
this.dialogVisible = false
|
|
this.isReadClinicalData = true
|
|
}).catch(() => { this.loading = false })
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
>>>.el-message-box__headerbtn{
|
|
display: none;
|
|
}
|
|
.dicom-container{
|
|
.reading-wrapper{
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: 0 5px;
|
|
box-sizing: border-box;
|
|
background-color: #000;
|
|
.el-tabs{
|
|
box-sizing: border-box;
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
.el-tabs__item{
|
|
color: #fff;
|
|
}
|
|
>>>.el-tabs__header{
|
|
height: 50px;
|
|
margin:0px;
|
|
box-sizing: border-box;
|
|
}
|
|
>>>.el-tabs__content{
|
|
flex: 1;
|
|
margin:0px;
|
|
box-sizing: border-box;
|
|
}
|
|
>>>.el-tabs__item{
|
|
color: #fff;
|
|
}
|
|
>>>.el-tab-pane{
|
|
height: 100%;
|
|
}
|
|
|
|
}
|
|
.el-dialog{
|
|
margin-top: 0px !important;
|
|
>>>.el-dialog__wrapper{
|
|
margin-top: 0px !important;
|
|
}
|
|
>>>.el-dialog__body{
|
|
padding: 10px;
|
|
}
|
|
}
|
|
|
|
}
|
|
>>>.dialog-container{
|
|
margin-top: 50px !important;
|
|
|
|
}
|
|
>>>.el-dialog__body{
|
|
padding: 10px;
|
|
}
|
|
}
|
|
</style>
|