293 lines
		
	
	
		
			8.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
			
		
		
	
	
			293 lines
		
	
	
		
			8.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
<template>
 | 
						|
  <div class="glReview_wrapper">
 | 
						|
    <h3>访视评估结果</h3>
 | 
						|
    <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="VisitName"
 | 
						|
        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">
 | 
						|
              {{ scope.row.BeforeQuestionList[index].Answer }}
 | 
						|
            </template>
 | 
						|
          </el-table-column>
 | 
						|
        </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[index].Answer }}
 | 
						|
            </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)"
 | 
						|
          />
 | 
						|
          <el-button
 | 
						|
            v-if="!scope.row.IsEdit && readingTaskState < 2"
 | 
						|
            circle
 | 
						|
            title="调整"
 | 
						|
            icon="el-icon-edit"
 | 
						|
            @click="handleEdit(scope.row)"
 | 
						|
          />
 | 
						|
        </template>
 | 
						|
      </el-table-column>
 | 
						|
    </el-table>
 | 
						|
 | 
						|
    <h3>历史全局阅片结果</h3>
 | 
						|
    <el-table
 | 
						|
      v-loading="historyLoading"
 | 
						|
      :data="historyTaskList"
 | 
						|
    >
 | 
						|
      <el-table-column
 | 
						|
        prop="TaskName"
 | 
						|
        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-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
 | 
						|
        :global-task-id="visitTaskId"
 | 
						|
        :visit-task-id="rowData.VisitTaskId"
 | 
						|
        :question-list="rowData.AfterQuestionList"
 | 
						|
        :subject-id="subjectId"
 | 
						|
        :trial-id="trialId"
 | 
						|
        @getList="getGlInfo"
 | 
						|
        @close="editVisible = false"
 | 
						|
      />
 | 
						|
    </el-dialog>
 | 
						|
  </div>
 | 
						|
</template>
 | 
						|
<script>
 | 
						|
import { getGlobalReadingInfo, getHistoryGlobalInfo, submitGlobalReadingInfo } from '@/api/trials'
 | 
						|
import { getToken } from '@/utils/auth'
 | 
						|
import const_ from '@/const/sign-code'
 | 
						|
import EditGlobalForm from './EditGlobalForm'
 | 
						|
import SignForm from '@/views/trials/components/newSignForm'
 | 
						|
export default {
 | 
						|
  name: 'GlobalReview',
 | 
						|
  components: { EditGlobalForm, SignForm },
 | 
						|
  props: {
 | 
						|
    trialId: {
 | 
						|
      type: String,
 | 
						|
      required: true
 | 
						|
    },
 | 
						|
    subjectId: {
 | 
						|
      type: String,
 | 
						|
      required: true
 | 
						|
    },
 | 
						|
    visitTaskId: {
 | 
						|
      type: String,
 | 
						|
      required: true
 | 
						|
    },
 | 
						|
    readingCategory: {
 | 
						|
      type: Number,
 | 
						|
      required: true
 | 
						|
    }
 | 
						|
  },
 | 
						|
  data() {
 | 
						|
    return {
 | 
						|
      loading: false,
 | 
						|
      maxLength: 2,
 | 
						|
      evaluationQsList: [],
 | 
						|
      adjustedQsList: [],
 | 
						|
      taskList: [],
 | 
						|
      historyLoading: false,
 | 
						|
      historyTaskList: [],
 | 
						|
      currentUser: zzSessionStorage.getItem('userName'),
 | 
						|
      signVisible: false,
 | 
						|
      signCode: null,
 | 
						|
      editVisible: false,
 | 
						|
      rowData: {},
 | 
						|
      readingTaskState: 0
 | 
						|
    }
 | 
						|
  },
 | 
						|
  mounted() {
 | 
						|
    this.getGlInfo()
 | 
						|
    this.getHistoryGlobalInfo()
 | 
						|
  },
 | 
						|
  methods: {
 | 
						|
    getGlInfo() {
 | 
						|
      this.loading = true
 | 
						|
      getGlobalReadingInfo({ visitTaskId: this.visitTaskId }).then(res => {
 | 
						|
        var evaluationQsList = []
 | 
						|
        var adjustedQsList = []
 | 
						|
        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)
 | 
						|
          })
 | 
						|
          res.Result.TaskList.map(task => {
 | 
						|
            task.IsEdit = false
 | 
						|
          })
 | 
						|
        }
 | 
						|
 | 
						|
        this.evaluationQsList = evaluationQsList
 | 
						|
        this.adjustedQsList = adjustedQsList
 | 
						|
        this.taskList = res.Result.TaskList
 | 
						|
        this.readingTaskState = res.Result.ReadingTaskState
 | 
						|
        this.loading = false
 | 
						|
      }).catch(() => { this.loading = false })
 | 
						|
    },
 | 
						|
    getHistoryGlobalInfo() {
 | 
						|
      this.historyLoading = true
 | 
						|
      getHistoryGlobalInfo({ visitTaskId: this.visitTaskId }).then(res => {
 | 
						|
        this.historyTaskList = res.Result
 | 
						|
        this.historyLoading = false
 | 
						|
      }).catch(() => { this.historyLoading = false })
 | 
						|
    },
 | 
						|
    handleEdit(row) {
 | 
						|
      this.rowData = { ...row }
 | 
						|
      this.editVisible = true
 | 
						|
    },
 | 
						|
    handleConfirm() {
 | 
						|
      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.isEdit = false
 | 
						|
          this.$refs['signForm'].btnLoading = false
 | 
						|
          this.signVisible = false
 | 
						|
          window.location.reload()
 | 
						|
          window.opener.postMessage('noneDicoms', window.location)
 | 
						|
        }
 | 
						|
        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: `/noneDicomReading?subjectId=${this.subjectId}&trialId=${this.trialId}&visitTaskId=${visitTaskId}&TokenKey=${token}&isReadingShowPreviousResults=false`
 | 
						|
      })
 | 
						|
      window.open(routeData.href, '_blank')
 | 
						|
    }
 | 
						|
  }
 | 
						|
}
 | 
						|
</script>
 | 
						|
<style lang="scss" scoped>
 | 
						|
.glReview_wrapper{
 | 
						|
  flex: 1;
 | 
						|
  padding: 10px;
 | 
						|
  width: 100%;
 | 
						|
  height: 100%;
 | 
						|
  overflow-y: auto;
 | 
						|
  .box-mr{
 | 
						|
    margin:10px 0;
 | 
						|
  }
 | 
						|
}
 | 
						|
</style>
 |