111 lines
3.1 KiB
Plaintext
111 lines
3.1 KiB
Plaintext
<template>
|
|
<div class="reading-wrapper">
|
|
<el-tabs v-model="activeName" v-loading="loading" @tab-click="handleClick">
|
|
<el-tab-pane label="阅片" name="read">
|
|
<ReadPage v-if="visitTaskId" :visit-task-id="visitTaskId" />
|
|
</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>
|
|
</template>
|
|
<script>
|
|
import { getNextTask } from '@/api/trials'
|
|
import store from '@/store'
|
|
import { changeURLStatic } from '@/utils/history.js'
|
|
import ReadPage from './components/ReadPage'
|
|
import ReportPage from './components/ReportPage'
|
|
export default {
|
|
name: 'Reading',
|
|
components: { ReadPage, ReportPage },
|
|
data() {
|
|
return {
|
|
activeName: 'read',
|
|
tabs: ['read'],
|
|
trialId: '',
|
|
subjectCode: '',
|
|
subjectId: '',
|
|
visitTaskId: '',
|
|
loading: 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.getTaskInfo()
|
|
},
|
|
methods: {
|
|
getTaskInfo() {
|
|
this.loading = 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
|
|
this.isReadingShowPreviousResults = res.Result.IsReadingShowPreviousResults
|
|
|
|
this.loading = false
|
|
}).catch(() => { this.loading = false })
|
|
},
|
|
handleClick(tab, event) {
|
|
if (this.tabs.includes(tab.name)) {
|
|
return
|
|
} else {
|
|
this.tabs.push(tab.name)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</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>
|