99 lines
		
	
	
		
			4.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
			
		
		
	
	
			99 lines
		
	
	
		
			4.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
<template>
 | 
						|
  <div />
 | 
						|
</template>
 | 
						|
<script>
 | 
						|
import { getNextTask, getReadingTool } from '@/api/trials'
 | 
						|
import store from '@/store'
 | 
						|
import { changeURLStatic } from '@/utils/history.js'
 | 
						|
export default {
 | 
						|
  name: 'ReadPage',
 | 
						|
  data() {
 | 
						|
    return {
 | 
						|
      trialId: '',
 | 
						|
      subjectCode: '',
 | 
						|
      subjectId: '',
 | 
						|
      visitTaskId: '',
 | 
						|
      readingCategory: 2,
 | 
						|
      taskBlindName: '',
 | 
						|
      isReadingShowSubjectInfo: false,
 | 
						|
      isReadingShowPreviousResults: false
 | 
						|
 | 
						|
    }
 | 
						|
  },
 | 
						|
  mounted() {
 | 
						|
    if (this.$router.currentRoute.query.TokenKey) {
 | 
						|
      store.dispatch('user/setToken', this.$router.currentRoute.query.TokenKey)
 | 
						|
      changeURLStatic('TokenKey', '')
 | 
						|
    }
 | 
						|
    this.trialId = this.$router.currentRoute.query.trialId
 | 
						|
    this.subjectCode = this.$router.currentRoute.query.subjectCode
 | 
						|
    this.subjectId = this.$router.currentRoute.query.subjectId ? this.$router.currentRoute.query.subjectId : ''
 | 
						|
    this.visitTaskId = this.$router.currentRoute.query.visitTaskId ? this.$router.currentRoute.query.visitTaskId : ''
 | 
						|
 | 
						|
    // this.isReadingShowPreviousResults = this.$router.currentRoute.query.isReadingShowPreviousResults
 | 
						|
    this.getTaskInfo()
 | 
						|
  },
 | 
						|
  methods: {
 | 
						|
    getTaskInfo() {
 | 
						|
      const loading = this.$loading({ fullscreen: true })
 | 
						|
      var param = {
 | 
						|
        subjectId: this.subjectId,
 | 
						|
        trialId: this.trialId,
 | 
						|
        visistTaskId: this.visitTaskId,
 | 
						|
        subjectCode: this.subjectCode
 | 
						|
      }
 | 
						|
      getNextTask(param).then(async res => {
 | 
						|
        this.readingCategory = res.Result.ReadingCategory
 | 
						|
        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
 | 
						|
        if (this.$router.currentRoute.query.isReadingShowPreviousResults !== undefined && this.$router.currentRoute.query.isReadingShowPreviousResults !== null) {
 | 
						|
          this.isReadingShowPreviousResults = this.$router.currentRoute.query.isReadingShowPreviousResults
 | 
						|
        } else {
 | 
						|
          this.isReadingShowPreviousResults = res.Result.IsReadingShowPreviousResults
 | 
						|
        }
 | 
						|
 | 
						|
        loading.close()
 | 
						|
        if (res.Result.ReadingCategory === 1) {
 | 
						|
          // 访视阅片
 | 
						|
          this.getCriterionConfig()
 | 
						|
        } else if (res.Result.ReadingCategory === 2) {
 | 
						|
          // 全局阅片
 | 
						|
          this.$router.push({
 | 
						|
            path: `/globalReview?trialId=${this.trialId}&subjectCode=${this.subjectCode}&subjectId=${this.subjectId}&visitTaskId=${this.visitTaskId}&readingCategory=${this.readingCategory}&taskBlindName=${this.taskBlindName}&isReadingShowSubjectInfo=${this.isReadingShowSubjectInfo}isReadingShowPreviousResults=${this.isReadingShowPreviousResults}`
 | 
						|
          })
 | 
						|
        } else if (res.Result.ReadingCategory === 4) {
 | 
						|
          // 裁判阅片
 | 
						|
          this.$router.push({
 | 
						|
            path: `/adReview?trialId=${this.trialId}&subjectCode=${this.subjectCode}&subjectId=${this.subjectId}&visitTaskId=${this.visitTaskId}&readingCategory=${this.readingCategory}&taskBlindName=${this.taskBlindName}&isReadingShowSubjectInfo=${this.isReadingShowSubjectInfo}isReadingShowPreviousResults=${this.isReadingShowPreviousResults}`
 | 
						|
          })
 | 
						|
        } else if (res.Result.ReadingCategory === 5) {
 | 
						|
          // 肿瘤学阅片
 | 
						|
          this.$router.push({
 | 
						|
            path: `/oncologyReview?trialId=${this.trialId}&subjectCode=${this.subjectCode}&subjectId=${this.subjectId}&visitTaskId=${this.visitTaskId}&readingCategory=${this.readingCategory}&taskBlindName=${this.taskBlindName}&isReadingShowSubjectInfo=${this.isReadingShowSubjectInfo}isReadingShowPreviousResults=${this.isReadingShowPreviousResults}`
 | 
						|
          })
 | 
						|
        }
 | 
						|
      }).catch(() => { loading.close() })
 | 
						|
    },
 | 
						|
    getCriterionConfig() {
 | 
						|
      const loading = this.$loading({ fullscreen: true })
 | 
						|
      getReadingTool({ visitTaskId: this.visitTaskId }).then(res => {
 | 
						|
        loading.close()
 | 
						|
        if (res.Result.ReadingTool === 0) {
 | 
						|
          this.$router.push({
 | 
						|
            path: `/readingDicoms?trialId=${this.trialId}&subjectCode=${this.subjectCode}&subjectId=${this.subjectId}&visitTaskId=${this.visitTaskId}&readingCategory=${this.readingCategory}&taskBlindName=${this.taskBlindName}&isReadingShowSubjectInfo=${this.isReadingShowSubjectInfo}isReadingShowPreviousResults=${this.isReadingShowPreviousResults}`
 | 
						|
          })
 | 
						|
        } else if (res.Result.ReadingTool === 1) {
 | 
						|
          this.$router.push({
 | 
						|
            path: `/noneDicomReading?trialId=${this.trialId}&subjectCode=${this.subjectCode}&subjectId=${this.subjectId}&visitTaskId=${this.visitTaskId}&readingCategory=${this.readingCategory}&taskBlindName=${this.taskBlindName}&isReadingShowSubjectInfo=${this.isReadingShowSubjectInfo}isReadingShowPreviousResults=${this.isReadingShowPreviousResults}`
 | 
						|
          })
 | 
						|
        }
 | 
						|
      }).catch(() => { loading.close() })
 | 
						|
    }
 | 
						|
  }
 | 
						|
}
 | 
						|
</script>
 | 
						|
 |