158 lines
		
	
	
		
			5.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
			
		
		
	
	
			158 lines
		
	
	
		
			5.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
<template>
 | 
						|
  <div v-loading="loading" class="none-dicom-reading-container">
 | 
						|
    <!-- 访视阅片 -->
 | 
						|
    <VisitReview
 | 
						|
      v-if="readingCategory && readingCategory=== 1"
 | 
						|
      :trial-id="trialId"
 | 
						|
      :subject-id="subjectId"
 | 
						|
      :subject-code="subjectCode"
 | 
						|
      :visit-task-id="visitTaskId"
 | 
						|
      :reading-category="readingCategory"
 | 
						|
    />
 | 
						|
    <!-- 全局阅片 -->
 | 
						|
    <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 store from '@/store'
 | 
						|
import { changeURLStatic } from '@/utils/history.js'
 | 
						|
import DicomEvent from '@/views/trials/trials-panel/reading/dicoms/components/DicomEvent'
 | 
						|
import VisitReview from './components/VisitReview'
 | 
						|
import GlobalReview from '@/views/trials/trials-panel/reading/global-review'
 | 
						|
import AdReview from '@/views/trials/trials-panel/reading/ad-review'
 | 
						|
import { getToken } from '@/utils/auth'
 | 
						|
import OncologyReview from '@/views/trials/trials-panel/reading/oncology-review'
 | 
						|
export default {
 | 
						|
  name: 'NoneDicomReading',
 | 
						|
  components: {
 | 
						|
    VisitReview,
 | 
						|
    AdReview,
 | 
						|
    GlobalReview,
 | 
						|
    OncologyReview
 | 
						|
  },
 | 
						|
  data() {
 | 
						|
    return {
 | 
						|
      loading: false,
 | 
						|
      readingCategory: null,
 | 
						|
      subjectId: '',
 | 
						|
      visitTaskId: '',
 | 
						|
      trialId: '',
 | 
						|
      subjectCode: '',
 | 
						|
      taskBlindName: '',
 | 
						|
      isReadingShowSubjectInfo: false,
 | 
						|
      isReadingShowPreviousResults: false,
 | 
						|
      isReadingTaskViewInOrder: false,
 | 
						|
      criterionType: null,
 | 
						|
      readingTool: null,
 | 
						|
      isNewSubject: null
 | 
						|
    }
 | 
						|
  },
 | 
						|
  mounted() {
 | 
						|
    DicomEvent.$on('getNextTask', () => {
 | 
						|
      this.getTaskInfo()
 | 
						|
    })
 | 
						|
    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.isReadingShowSubjectInfo = this.$router.currentRoute.query.isReadingShowSubjectInfo
 | 
						|
    this.isReadingShowPreviousResults = this.$router.currentRoute.query.isReadingShowPreviousResults
 | 
						|
    this.isReadingTaskViewInOrder = this.$router.currentRoute.query.isReadingTaskViewInOrder
 | 
						|
    this.criterionType = this.$router.currentRoute.query.criterionType
 | 
						|
    this.readingTool = this.$router.currentRoute.query.readingTool
 | 
						|
    this.isNewSubject = this.$router.currentRoute.query.isNewSubject
 | 
						|
    if (this.isNewSubject && this.isReadingTaskViewInOrder === 'true') {
 | 
						|
      this.$message.success(`已开始受试者${this.subjectCode}阅片任务`)
 | 
						|
      changeURLStatic('isNewSubject', '')
 | 
						|
      changeURLStatic('isReadingTaskViewInOrder', '')
 | 
						|
    }
 | 
						|
    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() {
 | 
						|
      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(res => {
 | 
						|
        this.readingCategory = res.Result.ReadingCategory
 | 
						|
        if (this.subjectId !== res.Result.SubjectId) {
 | 
						|
          store.dispatch('reading/resetVisitTasks')
 | 
						|
          var token = getToken()
 | 
						|
          window.location.href = `/noneDicomReading?trialId=${this.trialId}&subjectCode=${res.Result.SubjectCode}&subjectId=${res.Result.SubjectId}&isReadingShowPreviousResults=${this.isReadingShowPreviousResults}&isReadingShowSubjectInfo=${this.isReadingShowSubjectInfo}&criterionType=${this.criterionType}&readingTool=${this.readingTool}&isNewSubject=1&isReadingTaskViewInOrder=${res.Result.IsReadingTaskViewInOrder}&TokenKey=${token}`
 | 
						|
        }
 | 
						|
        this.subjectId = res.Result.SubjectId
 | 
						|
        this.visitTaskId = res.Result.VisitTaskId
 | 
						|
        this.subjectCode = res.Result.SubjectCode
 | 
						|
        this.taskBlindName = res.Result.TaskBlindName
 | 
						|
        this.isReadingShowSubjectInfo = res.Result.IsReadingShowSubjectInfo
 | 
						|
        this.isReadingShowPreviousResults = res.Result.IsReadingShowPreviousResults
 | 
						|
        this.digitPlaces = res.Result.DigitPlaces
 | 
						|
        localStorage.setItem('digitPlaces', 2)
 | 
						|
        this.loading = false
 | 
						|
      }).catch(() => { this.loading = false })
 | 
						|
    }
 | 
						|
  }
 | 
						|
}
 | 
						|
</script>
 | 
						|
 | 
						|
<style lang="scss" scoped>
 | 
						|
.none-dicom-reading-container{
 | 
						|
  width: 100%;
 | 
						|
  height: 100%;
 | 
						|
  display: flex;
 | 
						|
  flex-direction: column;
 | 
						|
}
 | 
						|
 | 
						|
</style>
 |