424 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			Plaintext
		
	
	
			
		
		
	
	
			424 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			Plaintext
		
	
	
| <template>
 | |
|   <div class="glReview_wrapper">
 | |
|     <el-card shadow="never" :body-style="{ padding: '10px' }" style="margin-bottom:10px">
 | |
|       <h4 v-if="isReadingShowSubjectInfo">
 | |
|         受试者:
 | |
|         <span style="font-weight:normal">{{ subjectCode }} </span>
 | |
|         <span style="font-weight:normal">({{ taskBlindName }})</span>
 | |
|       </h4>
 | |
|     </el-card>
 | |
| 
 | |
|     <el-card :body-style="{ padding: '10px' }" shadow="never">
 | |
|       <div slot="header" class="clearfix">
 | |
|         <span style="font-weight: bold;">访视评估结果</span>
 | |
|       </div>
 | |
| 
 | |
|       <div v-if="taskList.length > 0 && readingTaskState < 2" style="text-align:right;margin:5px 0;">
 | |
|         <el-button size="small" type="primary" @click="handleConfirm">
 | |
|           确认
 | |
|         </el-button>
 | |
|       </div>
 | |
|       <el-table
 | |
|         v-loading="loading"
 | |
|         :data="taskList"
 | |
|       >
 | |
|         <el-table-column
 | |
|           prop="BlindName"
 | |
|           label="访视名称"
 | |
|           show-overflow-tooltip
 | |
|           width="150"
 | |
|         />
 | |
|         <!-- 评估结果 -->
 | |
|         <el-table-column
 | |
|           label="评估结果"
 | |
|           align="center"
 | |
|           prop=""
 | |
|         >
 | |
|           <template>
 | |
|             <el-table-column
 | |
|               v-for="(qs,index) in evaluationQsList"
 | |
|               :key="index"
 | |
|               prop=""
 | |
|               :label="qs"
 | |
|               show-overflow-tooltip
 | |
|               width="150"
 | |
|             >
 | |
|               <template slot-scope="scope">
 | |
|                 <div v-if="scope.row.BeforeQuestionList.length>index && scope.row.BeforeQuestionList[index].Answer">
 | |
|                   <span v-if="scope.row.BeforeQuestionList[index].DictionaryCode">
 | |
|                     {{ $fd(scope.row.BeforeQuestionList[index].DictionaryCode,parseInt(scope.row.BeforeQuestionList[index].Answer)) }}
 | |
|                   </span>
 | |
|                   <span v-else>{{ scope.row.BeforeQuestionList[index].Answer }}</span>
 | |
|                 </div>
 | |
|               </template>
 | |
|             </el-table-column>
 | |
|           </template>
 | |
|         </el-table-column>
 | |
| 
 | |
|         <!-- 是否同意访视结果 -->
 | |
|         <el-table-column
 | |
|           v-for="(qs,index) in agreeOrNotList"
 | |
|           :key="index"
 | |
|           prop=""
 | |
|           :label="qs"
 | |
|           show-overflow-tooltip
 | |
|           width="170"
 | |
|         >
 | |
|           <template slot-scope="scope">
 | |
|             <!-- <el-switch
 | |
|               v-if="readingTaskState < 2"
 | |
|               v-model="scope.row.AgreeOrNot[0].Answer"
 | |
|               active-value="1"
 | |
|               inactive-value="0"
 | |
|               @change="changeAgreeOrNotList($event, scope.row.AgreeOrNot[0],scope.row.VisitTaskId)"
 | |
|             />
 | |
|             <span v-else>
 | |
|               {{ scope.row.AgreeOrNot.length>index?$fd('ReadingYesOrNo',parseInt(scope.row.AgreeOrNot[0].Answer)):'' }}
 | |
|             </span> -->
 | |
|             <el-tag v-if="parseInt(scope.row.AgreeOrNot[0].Answer) === 1" type="primary">
 | |
|               {{ $fd('ReadingYesOrNo',parseInt(scope.row.AgreeOrNot[0].Answer)) }}
 | |
|             </el-tag>
 | |
|             <el-tag v-else-if="parseInt(scope.row.AgreeOrNot[0].Answer) === 0" type="danger"> {{ $fd('ReadingYesOrNo',parseInt(scope.row.AgreeOrNot[0].Answer)) }}</el-tag>
 | |
|             <span v-else />
 | |
|           </template>
 | |
|         </el-table-column>
 | |
| 
 | |
|         <!-- 评估结果 -->
 | |
|         <el-table-column
 | |
|           label="调整后结果"
 | |
|           align="center"
 | |
|           prop=""
 | |
|         >
 | |
|           <template>
 | |
|             <el-table-column
 | |
|               v-for="(qs,index) in adjustedQsList"
 | |
|               :key="index"
 | |
|               prop=""
 | |
|               :label="qs"
 | |
|               show-overflow-tooltip
 | |
|               width="150"
 | |
|             >
 | |
|               <template slot-scope="scope">
 | |
|                 <!-- {{ scope.row.AfterQuestionList.length>index?scope.row.AfterQuestionList[index].Answer:'' }} -->
 | |
|                 <div v-if="scope.row.AfterQuestionList.length>index && scope.row.AfterQuestionList[index].Answer">
 | |
| 
 | |
|                   <span v-if="scope.row.AfterQuestionList[index].GlobalAnswerType === 3">
 | |
|                     {{ getAssessType(scope.row.AfterQuestionList[index].Answer) }}
 | |
|                   </span>
 | |
|                   <span v-else-if="scope.row.AfterQuestionList[index].DictionaryCode">
 | |
|                     {{ $fd(scope.row.AfterQuestionList[index].DictionaryCode,parseInt(scope.row.AfterQuestionList[index].Answer)) }}
 | |
|                   </span>
 | |
|                   <span v-else>{{ scope.row.AfterQuestionList[index].Answer }}</span>
 | |
|                 </div>
 | |
|               </template>
 | |
|             </el-table-column>
 | |
|           </template>
 | |
|         </el-table-column>
 | |
| 
 | |
|         <el-table-column
 | |
|           :label="$t('common:action:action')"
 | |
|           width="200"
 | |
|         >
 | |
|           <template slot-scope="scope">
 | |
|             <el-button
 | |
|               circle
 | |
|               title="查看详情"
 | |
|               icon="el-icon-view"
 | |
|               @click="handleView(scope.row)"
 | |
|             />
 | |
|             <!-- v-if="readingTaskState < 2 && scope.row.AgreeOrNot[0].Answer==='0'" -->
 | |
|             <el-button
 | |
|               v-if="readingTaskState < 2"
 | |
|               circle
 | |
|               title="调整"
 | |
|               icon="el-icon-edit"
 | |
|               @click="handleEdit(scope.row)"
 | |
|             />
 | |
|           </template>
 | |
|         </el-table-column>
 | |
|       </el-table>
 | |
|     </el-card>
 | |
| 
 | |
|     <el-card v-if="isReadingShowPreviousResults" :body-style="{ padding: '10px' }" shadow="never">
 | |
|       <div slot="header" class="clearfix">
 | |
|         <span style="font-weight: bold;">既往全局阅片结果</span>
 | |
|       </div>
 | |
|       <el-table
 | |
|         v-loading="historyLoading"
 | |
|         :data="historyTaskList"
 | |
|       >
 | |
|         <el-table-column
 | |
|           prop="TaskBlindName"
 | |
|           label="全局"
 | |
|           show-overflow-tooltip
 | |
|           width="200"
 | |
|         />
 | |
|         <el-table-column
 | |
|           :label="$t('common:action:action')"
 | |
|           width="200"
 | |
|         >
 | |
|           <template slot-scope="scope">
 | |
|             <el-button
 | |
|               circle
 | |
|               title="查看详情"
 | |
|               icon="el-icon-view"
 | |
|               @click="handleView(scope.row)"
 | |
|             />
 | |
|           </template>
 | |
|         </el-table-column>
 | |
|       </el-table>
 | |
|     </el-card>
 | |
| 
 | |
|     <!-- 签名框 -->
 | |
|     <el-dialog
 | |
|       v-if="signVisible"
 | |
|       :visible.sync="signVisible"
 | |
|       :close-on-click-modal="false"
 | |
|       width="600px"
 | |
|       custom-class="base-dialog-wrapper"
 | |
|     >
 | |
|       <div slot="title">
 | |
|         <span style="font-size:18px;">{{ $t('common:dialogTitle:sign') }}</span>
 | |
|         <span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${ currentUser })` }}</span>
 | |
|       </div>
 | |
|       <SignForm ref="signForm" :sign-code-enum="signCode" @closeDialog="closeSignDialog" />
 | |
|     </el-dialog>
 | |
| 
 | |
|     <el-dialog
 | |
|       v-if="editVisible"
 | |
|       :visible.sync="editVisible"
 | |
|       :close-on-click-modal="false"
 | |
|       width="600px"
 | |
|       custom-class="base-dialog-wrapper"
 | |
|       title="调整"
 | |
|     >
 | |
| 
 | |
|       <EditGlobalForm
 | |
|         :assess-type-list="assessTypeList"
 | |
|         :agree-or-not="rowData.AgreeOrNot[0]"
 | |
|         :global-update-type="globalUpdateType"
 | |
|         :global-task-id="visitTaskId"
 | |
|         :visit-task-id="rowData.VisitTaskId"
 | |
|         :question-list="rowData.AfterQuestionList"
 | |
|         :subject-id="subjectId"
 | |
|         :trial-id="trialId"
 | |
|         :is-baseline="rowData.IsBaseLine"
 | |
|         :before-question-list="rowData.BeforeQuestionList"
 | |
|         @getList="getGlInfo"
 | |
|         @close="editVisible = false"
 | |
|       />
 | |
|     </el-dialog>
 | |
|   </div>
 | |
| </template>
 | |
| <script>
 | |
| import { getGlobalReadingInfo, getReadingPastResultList, submitGlobalReadingInfo, saveGlobalReadingInfo } from '@/api/trials'
 | |
| import { getToken } from '@/utils/auth'
 | |
| import const_ from '@/const/sign-code'
 | |
| import EditGlobalForm from './components/EditGlobalForm'
 | |
| import SignForm from '@/views/trials/components/newSignForm'
 | |
| export default {
 | |
|   name: 'GlobalReview',
 | |
|   components: { EditGlobalForm, SignForm },
 | |
| 
 | |
|   data() {
 | |
|     return {
 | |
|       trialId: '',
 | |
|       subjectId: '',
 | |
|       visitTaskId: '',
 | |
|       readingCategory: '',
 | |
|       subjectCode: '',
 | |
|       taskBlindName: '',
 | |
|       isReadingShowSubjectInfo: '',
 | |
|       isReadingShowPreviousResults: '',
 | |
|       loading: false,
 | |
|       maxLength: 2,
 | |
|       evaluationQsList: [],
 | |
|       adjustedQsList: [],
 | |
|       agreeOrNotList: [],
 | |
|       taskList: [],
 | |
|       historyLoading: false,
 | |
|       historyTaskList: [],
 | |
|       currentUser: zzSessionStorage.getItem('userName'),
 | |
|       signVisible: false,
 | |
|       signCode: null,
 | |
|       editVisible: false,
 | |
|       rowData: {},
 | |
|       readingTaskState: 0,
 | |
|       globalUpdateType: [],
 | |
|       assessTypeList: []
 | |
|     }
 | |
|   },
 | |
|   mounted() {
 | |
|     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.readingCategory = parseInt(this.$router.currentRoute.query.readingCategory)
 | |
| 
 | |
|     this.taskBlindName = this.$router.currentRoute.query.taskBlindName
 | |
|     this.isReadingShowSubjectInfo = this.$router.currentRoute.query.isReadingShowSubjectInfo
 | |
|     this.isReadingShowPreviousResults = this.$router.currentRoute.query.isReadingShowPreviousResults
 | |
|     this.getGlInfo()
 | |
|     if (this.isReadingShowPreviousResults) {
 | |
|       this.getHistoryGlobalInfo()
 | |
|     }
 | |
|   },
 | |
|   methods: {
 | |
|     getGlInfo() {
 | |
|       this.loading = true
 | |
|       getGlobalReadingInfo({ visitTaskId: this.visitTaskId }).then(res => {
 | |
|         var evaluationQsList = []
 | |
|         var adjustedQsList = []
 | |
|         var agreeOrNotList = []
 | |
|         if (res.Result.TaskList.length > 0) {
 | |
|           var task = res.Result.TaskList[0]
 | |
|           task.BeforeQuestionList.map(qs => {
 | |
|             evaluationQsList.push(qs.QuestionName)
 | |
|           })
 | |
|           task.AfterQuestionList.map(qs => {
 | |
|             adjustedQsList.push(qs.QuestionName)
 | |
|           })
 | |
|           task.AgreeOrNot.map(qs => {
 | |
|             agreeOrNotList.push(qs.QuestionName)
 | |
|           })
 | |
|         }
 | |
|         this.globalUpdateType = res.Result.GlobalUpdateType ? res.Result.GlobalUpdateType.split('|') : []
 | |
|         this.evaluationQsList = evaluationQsList
 | |
|         this.adjustedQsList = adjustedQsList
 | |
|         this.agreeOrNotList = agreeOrNotList
 | |
| 
 | |
|         this.taskList = res.Result.TaskList
 | |
|         this.readingTaskState = res.Result.ReadingTaskState
 | |
|         this.assessTypeList = res.Result.AssessTypeList
 | |
|         this.loading = false
 | |
|       }).catch(() => { this.loading = false })
 | |
|     },
 | |
|     getHistoryGlobalInfo() {
 | |
|       this.historyLoading = true
 | |
|       getReadingPastResultList({ visitTaskId: this.visitTaskId }).then(res => {
 | |
|         this.historyTaskList = res.Result
 | |
|         this.historyLoading = false
 | |
|       }).catch(() => { this.historyLoading = false })
 | |
|     },
 | |
|     changeAgreeOrNotList(callback, row, visitTaskId) {
 | |
|       var message = ''
 | |
|       if (parseInt(callback) === 1) {
 | |
|         message = '是否确认更改?'
 | |
|         row.Answer = '0'
 | |
|       } else {
 | |
|         message = '是否确认更改?'
 | |
|         row.Answer = '1'
 | |
|       }
 | |
|       this.$confirm(message, {
 | |
|         distinguishCancelAndClose: true,
 | |
|         type: 'warning'
 | |
|       }).then(() => {
 | |
|         this.loading = true
 | |
|         var params = {
 | |
|           globalTaskId: this.visitTaskId,
 | |
|           subjectId: this.subjectId,
 | |
|           trialId: this.trialId,
 | |
|           questionList: [
 | |
|             {
 | |
|               questionId: row.QuestionId ? row.QuestionId : '',
 | |
|               visitTaskId: visitTaskId,
 | |
|               globalAnswerType: row.GlobalAnswerType,
 | |
|               answer: row.Answer === '1' ? '0' : '1'
 | |
|             }
 | |
|           ]
 | |
|         }
 | |
|         saveGlobalReadingInfo(params).then(res => {
 | |
|           this.loading = false
 | |
|           if (res.IsSuccess) {
 | |
|             this.$message.success('保存成功!')
 | |
|             this.getGlInfo()
 | |
|           }
 | |
|         }).catch(() => { this.loading = false })
 | |
|       }).catch(() => {})
 | |
|     },
 | |
|     handleEdit(row) {
 | |
|       this.rowData = { ...row }
 | |
|       this.editVisible = true
 | |
|     },
 | |
|     handleConfirm() {
 | |
|       // 判断是否存在访视评估结果未确认
 | |
|       var idx = this.taskList.findIndex(i => !i.AgreeOrNotAnswer)
 | |
|       if (idx > -1) {
 | |
|         this.$confirm('存在访视评估结果未确认!', {
 | |
|           type: 'warning',
 | |
|           distinguishCancelAndClose: true
 | |
|         })
 | |
|           .then(() => {})
 | |
|           .catch(() => {})
 | |
|       } else {
 | |
|         const { ImageAssessmentReportConfirmation } = const_.processSignature
 | |
|         this.signCode = ImageAssessmentReportConfirmation
 | |
|         this.signVisible = true
 | |
|       }
 | |
|     },
 | |
|     // 关闭签名框
 | |
|     closeSignDialog(isSign, signInfo) {
 | |
|       if (isSign) {
 | |
|         this.signConfirm(signInfo)
 | |
|       } else {
 | |
|         this.signVisible = false
 | |
|       }
 | |
|     },
 | |
|     // 签名并确认
 | |
|     signConfirm(signInfo) {
 | |
|       this.loading = true
 | |
|       var params = {
 | |
|         data: {
 | |
|           globalTaskId: this.visitTaskId
 | |
|         },
 | |
|         signInfo: signInfo
 | |
|       }
 | |
|       submitGlobalReadingInfo(params).then(res => {
 | |
|         if (res.IsSuccess) {
 | |
|           this.$message.success(this.$t('common:message:savedSuccessfully'))
 | |
|           this.$refs['signForm'].btnLoading = false
 | |
|           this.signVisible = false
 | |
|           window.opener.postMessage('refreshTaskList', window.location)
 | |
|           var token = getToken()
 | |
|           this.$router.push({
 | |
|             path: `/readingPage?subjectCode=${this.subjectCode}&subjectId=${this.subjectId}&trialId=${this.trialId}&TokenKey=${token}`
 | |
|           })
 | |
|         }
 | |
|         this.loading = false
 | |
|       }).catch(_ => {
 | |
|         this.loading = false
 | |
|         this.$refs['signForm'].btnLoading = false
 | |
|       })
 | |
|     },
 | |
|     handleView(row) {
 | |
|       var token = getToken()
 | |
|       var visitTaskId = row.VisitTaskId
 | |
|       const routeData = this.$router.resolve({
 | |
|         path: `/readingPage?subjectId=${this.subjectId}&trialId=${this.trialId}&visitTaskId=${visitTaskId}&TokenKey=${token}&isReadingShowPreviousResults=false&tabName=report`
 | |
|       })
 | |
|       window.open(routeData.href, '_blank')
 | |
|     },
 | |
|     getAssessType(code) {
 | |
|       var idx = this.assessTypeList.findIndex(item => item.Code === code)
 | |
|       if (idx > -1) {
 | |
|         return this.assessTypeList[idx].ValueCN
 | |
|       } else {
 | |
|         return ''
 | |
|       }
 | |
|     }
 | |
|   }
 | |
| }
 | |
| </script>
 | |
| <style lang="scss" scoped>
 | |
| .glReview_wrapper{
 | |
|   flex: 1;
 | |
|   padding: 10px;
 | |
|   width: 100%;
 | |
|   height: 100%;
 | |
|   overflow-y: auto;
 | |
|   .box-mr{
 | |
|     margin:10px 0;
 | |
|   }
 | |
| }
 | |
| </style>
 |