234 lines
7.5 KiB
Plaintext
234 lines
7.5 KiB
Plaintext
<template>
|
|
<div style="width:100%;height:100%">
|
|
<!-- 访视阅片 -->
|
|
<div v-if="readingCategory && readingCategory=== 1" class="reading-wrapper">
|
|
<el-tabs v-model="activeName" v-loading="loading" :before-leave="beforeLeave">
|
|
<el-tab-pane label="阅片" name="read">
|
|
<ReadPage
|
|
v-if="tabs.includes('read')"
|
|
:trial-id="trialId"
|
|
:visit-task-id="visitTaskId"
|
|
:subject-id="subjectId"
|
|
:subject-code="subjectCode"
|
|
:is-exists-clinical-data="isExistsClinicalData"
|
|
:is-exists-no-dicom-file="isExistsNoDicomFile"
|
|
/>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="报告" name="report">
|
|
<ReportPage v-if="tabs.includes('report')" :visit-task-id="visitTaskId" />
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</div>
|
|
|
|
<!-- 全局阅片 -->
|
|
<GlobalReview
|
|
v-else-if="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"
|
|
/>
|
|
<!-- 裁判阅片 -->
|
|
<AdReview
|
|
v-else-if="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"
|
|
/>
|
|
|
|
<!-- 肿瘤学阅片 -->
|
|
<OncologyReview
|
|
v-else-if="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"
|
|
/>
|
|
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import { getNextTask } from '@/api/trials'
|
|
import ReadPage from './components/ReadPage'
|
|
import ReportPage from './components/ReportPage'
|
|
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 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
|
|
},
|
|
data() {
|
|
return {
|
|
activeName: '',
|
|
tabs: [],
|
|
trialId: '',
|
|
subjectCode: '',
|
|
subjectId: '',
|
|
visitTaskId: '',
|
|
loading: false,
|
|
readingCategory: null,
|
|
isReadingShowSubjectInfo: false,
|
|
isReadingShowPreviousResults: false,
|
|
isExistsClinicalData: false,
|
|
isExistsNoDicomFile: false,
|
|
digitPlaces: 2,
|
|
isReadingTaskViewInOrder: false,
|
|
firstTaskReadingCategory: null,
|
|
criterionType: null,
|
|
readingTool: null
|
|
}
|
|
},
|
|
mounted() {
|
|
DicomEvent.$on('getNextTask', () => {
|
|
this.activeName = this.$router.currentRoute.query.tabName ? this.$router.currentRoute.query.tabName : 'read'
|
|
this.tabs = [this.activeName]
|
|
this.firstTaskReadingCategory = this.readingCategory
|
|
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 = this.$router.currentRoute.query.isReadingTaskViewInOrder
|
|
this.criterionType = this.$router.currentRoute.query.criterionType
|
|
this.readingTool = this.$router.currentRoute.query.readingTool
|
|
if (this.$router.currentRoute.query.TokenKey) {
|
|
store.dispatch('user/setToken', this.$router.currentRoute.query.TokenKey)
|
|
changeURLStatic('TokenKey', '')
|
|
}
|
|
this.getTaskInfo()
|
|
},
|
|
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
|
|
}
|
|
getNextTask(param).then(async res => {
|
|
this.visitTaskId = res.Result.VisitTaskId
|
|
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.CriterionType = res.Result.CriterionType
|
|
this.digitPlaces = res.Result.DigitPlaces
|
|
localStorage.setItem('CriterionType', res.Result.CriterionType)
|
|
localStorage.setItem('digitPlaces', 2)
|
|
this.readingCategory = res.Result.ReadingCategory
|
|
if (this.firstTaskReadingCategory === 1 && res.Result.ReadingCategory === 1 && this.isReadingTaskViewInOrder === 'true' && flag) {
|
|
this.$nextTick(() => {
|
|
this.activeName = 'read'
|
|
DicomEvent.$emit('getNextVisitInfo')
|
|
DicomEvent.$emit('getReportInfo')
|
|
})
|
|
}
|
|
this.loading = false
|
|
}).catch(() => { this.loading = false })
|
|
},
|
|
|
|
beforeLeave(activeName, oldActiveName) {
|
|
if (oldActiveName === 'read') {
|
|
var list = null
|
|
DicomEvent.$emit('getAllUnSaveLesions', val => {
|
|
list = val
|
|
})
|
|
if (list.length > 0) {
|
|
var arr = []
|
|
list.map(i => {
|
|
arr.push(i.lessionName)
|
|
})
|
|
this.$confirm(`请先保存${arr.join('、')}病灶信息!`, {
|
|
type: 'warning',
|
|
showCancelButton: false
|
|
}).then(() => {
|
|
}).catch(() => {
|
|
})
|
|
return false
|
|
} else {
|
|
if (!this.tabs.includes(activeName)) {
|
|
this.tabs.push(activeName)
|
|
}
|
|
return true
|
|
}
|
|
} else {
|
|
if (!this.tabs.includes(activeName)) {
|
|
this.tabs.push(activeName)
|
|
}
|
|
return true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
.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%;
|
|
}
|
|
|
|
}
|
|
}
|
|
</style>
|