403 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			Plaintext
		
	
	
			
		
		
	
	
			403 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			Plaintext
		
	
	
<template>
 | 
						|
  <BaseContainer>
 | 
						|
    <template slot="search-container">
 | 
						|
      <el-form :inline="true">
 | 
						|
        <!-- 受试者编号 -->
 | 
						|
        <el-form-item :label="$t('trials:consistencyCheck:table:siteId')">
 | 
						|
          <el-select v-model="searchData.SiteId" clearable filterable style="width:120px;">
 | 
						|
            <el-option
 | 
						|
              v-for="(item,index) of siteOptions"
 | 
						|
              :key="index"
 | 
						|
              :label="item.TrialSiteCode"
 | 
						|
              :value="item.SiteId"
 | 
						|
            />
 | 
						|
          </el-select>
 | 
						|
        </el-form-item>
 | 
						|
        <!-- 受试者编号 -->
 | 
						|
        <el-form-item :label="$t('trials:consistencyCheck:table:subjectId')">
 | 
						|
          <el-input v-model="searchData.SubjectCode" style="width:100px;" />
 | 
						|
        </el-form-item>
 | 
						|
        <el-form-item style="margin-bottom:10px" label="访视/阅片期名称">
 | 
						|
          <el-input
 | 
						|
            v-model="searchData.TaskName"
 | 
						|
            style="width:100px;"
 | 
						|
            clearable
 | 
						|
          />
 | 
						|
        </el-form-item>
 | 
						|
        <!-- 任务编号 -->
 | 
						|
        <el-form-item label="任务编号">
 | 
						|
          <el-input
 | 
						|
            v-model="searchData.TaskCode"
 | 
						|
            style="width:130px;"
 | 
						|
            clearable
 | 
						|
          />
 | 
						|
        </el-form-item>
 | 
						|
 | 
						|
        <el-form-item>
 | 
						|
          <!-- 查询 -->
 | 
						|
          <el-button type="primary" icon="el-icon-search" @click="handleSearch">
 | 
						|
            {{ $t('common:button:search') }}
 | 
						|
          </el-button>
 | 
						|
          <!-- 重置 -->
 | 
						|
          <el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
 | 
						|
            {{ $t('common:button:reset') }}
 | 
						|
          </el-button>
 | 
						|
        </el-form-item>
 | 
						|
      </el-form>
 | 
						|
    </template>
 | 
						|
    <template slot="main-container">
 | 
						|
      <el-table
 | 
						|
        v-adaptive="{bottomOffset:60}"
 | 
						|
        v-loading="loading"
 | 
						|
        :data="list"
 | 
						|
        stripe
 | 
						|
        height="100"
 | 
						|
        @sort-change="handleSortChange"
 | 
						|
      >
 | 
						|
        <el-table-column type="index" width="40" align="left" />
 | 
						|
        <!-- 是否加急 -->
 | 
						|
        <el-table-column
 | 
						|
          prop="OriginalReReadingTask.IsUrgent"
 | 
						|
          :label="$t('trials:consistencyCheck:table:isUrgent')"
 | 
						|
          show-overflow-tooltip
 | 
						|
          sortable="custom"
 | 
						|
          min-width="100"
 | 
						|
        >
 | 
						|
          <template slot-scope="scope">
 | 
						|
            <el-tag v-if="scope.row.OriginalReReadingTask.IsUrgent" type="danger">{{ $fd('YesOrNo', scope.row.OriginalReReadingTask.IsUrgent) }}</el-tag>
 | 
						|
            <el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.OriginalReReadingTask.IsUrgent) }}</el-tag>
 | 
						|
          </template>
 | 
						|
        </el-table-column>
 | 
						|
        <!-- 任务编号 -->
 | 
						|
        <el-table-column
 | 
						|
          prop="OriginalReReadingTask.TaskCode"
 | 
						|
          min-width="100"
 | 
						|
          label="任务编号"
 | 
						|
          sortable="custom"
 | 
						|
          show-overflow-tooltip
 | 
						|
        />
 | 
						|
        <el-table-column
 | 
						|
          prop="OriginalReReadingTask.TrialSiteCode"
 | 
						|
          label="中心编号"
 | 
						|
          min-width="100"
 | 
						|
          sortable="custom"
 | 
						|
          show-overflow-tooltip
 | 
						|
        />
 | 
						|
        <!-- 受试者编号 -->
 | 
						|
        <el-table-column
 | 
						|
          prop="OriginalReReadingTask.SubjectCode"
 | 
						|
          min-width="100"
 | 
						|
          label="受试者编号"
 | 
						|
          sortable="custom"
 | 
						|
          show-overflow-tooltip
 | 
						|
        />
 | 
						|
 | 
						|
        <!-- 盲态访视名称 -->
 | 
						|
        <el-table-column
 | 
						|
          prop="OriginalReReadingTask.TaskBlindName"
 | 
						|
          min-width="120"
 | 
						|
          label="盲态访视名称"
 | 
						|
          sortable="custom"
 | 
						|
          show-overflow-tooltip
 | 
						|
        />
 | 
						|
        <el-table-column
 | 
						|
          prop="OriginalReReadingTask.TrialReadingCriterionName"
 | 
						|
          label="阅片标准"
 | 
						|
          min-width="100"
 | 
						|
          show-overflow-tooltip
 | 
						|
          sortable="custom"
 | 
						|
        />
 | 
						|
        <el-table-column
 | 
						|
          prop="OriginalReReadingTask.TaskState"
 | 
						|
          label="任务状态"
 | 
						|
          min-width="100"
 | 
						|
          sortable="custom"
 | 
						|
          show-overflow-tooltip
 | 
						|
        >
 | 
						|
          <template slot-scope="scope">
 | 
						|
            <el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 0" type="primary">{{ $fd('TaskState', scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
 | 
						|
            <el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 1" type="info">{{ $fd('TaskState', scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
 | 
						|
            <el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 3" type="danger">{{ $fd('TaskState', scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
 | 
						|
            <el-tag v-if="scope.row.OriginalReReadingTask.TaskState === 4" type="warning">{{ $fd('TaskState', scope.row.OriginalReReadingTask.TaskState) }}</el-tag>
 | 
						|
          </template>
 | 
						|
        </el-table-column>
 | 
						|
        <!-- 任务类型 -->
 | 
						|
        <el-table-column
 | 
						|
          prop="OriginalReReadingTask.ReadingCategory"
 | 
						|
          min-width="100"
 | 
						|
          label="任务类型"
 | 
						|
          sortable="custom"
 | 
						|
          show-overflow-tooltip
 | 
						|
        >
 | 
						|
          <template slot-scope="scope">
 | 
						|
            <el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 1" type="primary">{{ $fd('ReadingCategory', scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
 | 
						|
            <el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 2" type="info">{{ $fd('ReadingCategory', scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
 | 
						|
            <el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 4" type="danger">{{ $fd('ReadingCategory', scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
 | 
						|
            <el-tag v-if="scope.row.OriginalReReadingTask.ReadingCategory === 5" type="warning">{{ $fd('ReadingCategory', scope.row.OriginalReReadingTask.ReadingCategory) }}</el-tag>
 | 
						|
          </template>
 | 
						|
        </el-table-column>
 | 
						|
        <!-- 完成阅片时间 -->
 | 
						|
        <el-table-column
 | 
						|
          prop="OriginalReReadingTask.SignTime"
 | 
						|
          min-width="120"
 | 
						|
          label="完成阅片时间"
 | 
						|
          sortable="custom"
 | 
						|
          show-overflow-tooltip
 | 
						|
        />
 | 
						|
        <!-- 重阅申请类型 -->
 | 
						|
        <el-table-column
 | 
						|
          prop="RequestReReadingType"
 | 
						|
          min-width="100"
 | 
						|
          label="申请类型"
 | 
						|
          sortable="custom"
 | 
						|
          show-overflow-tooltip
 | 
						|
        >
 | 
						|
          <template slot-scope="scope">
 | 
						|
            <div v-if="scope.row.RequestReReadingType">
 | 
						|
              <el-tag v-if="scope.row.RequestReReadingType === 2" type="danger">{{ $fd('RequestReReadingType', scope.row.RequestReReadingType) }}</el-tag>
 | 
						|
              <el-tag v-else type="primary">{{ $fd('RequestReReadingType', scope.row.RequestReReadingType) }}</el-tag>
 | 
						|
            </div>
 | 
						|
          </template>
 | 
						|
        </el-table-column>
 | 
						|
        <!-- 申请退回时间 -->
 | 
						|
        <el-table-column
 | 
						|
          prop="RequestReReadingTime"
 | 
						|
          min-width="100"
 | 
						|
          label="申请时间"
 | 
						|
          sortable="custom"
 | 
						|
          show-overflow-tooltip
 | 
						|
        />
 | 
						|
        <!-- 申请退回原因 -->
 | 
						|
        <el-table-column
 | 
						|
          prop="RequestReReadingReason"
 | 
						|
          min-width="100"
 | 
						|
          label="申请原因"
 | 
						|
          show-overflow-tooltip
 | 
						|
        />
 | 
						|
 | 
						|
        <!-- 审批结果 -->
 | 
						|
        <el-table-column
 | 
						|
          prop="RequestReReadingResultEnum"
 | 
						|
          min-width="100"
 | 
						|
          label="审批结果"
 | 
						|
          sortable="custom"
 | 
						|
          show-overflow-tooltip
 | 
						|
        >
 | 
						|
          <template slot-scope="scope">
 | 
						|
            <div v-if="scope.row.RequestReReadingResultEnum || scope.row.RequestReReadingResultEnum === 0">
 | 
						|
              <el-tooltip v-if="scope.row.RequestReReadingResultEnum === 2" class="item" effect="dark" placement="top">
 | 
						|
                <div slot="content">
 | 
						|
                  {{ scope.row.RequestReReadingRejectReason }}
 | 
						|
                </div>
 | 
						|
                <el-tag type="danger">{{ $fd('RequestReReadingResult', scope.row.RequestReReadingResultEnum) }}</el-tag>
 | 
						|
              </el-tooltip>
 | 
						|
              <el-tag v-if="scope.row.RequestReReadingResultEnum === 1" type="primary">{{ $fd('RequestReReadingResult', scope.row.RequestReReadingResultEnum) }}</el-tag>
 | 
						|
              <el-tag v-if="scope.row.RequestReReadingResultEnum === 0" type="warning">{{ $fd('RequestReReadingResult', scope.row.RequestReReadingResultEnum) }}</el-tag>
 | 
						|
            </div>
 | 
						|
          </template>
 | 
						|
        </el-table-column>
 | 
						|
        <el-table-column
 | 
						|
          prop="ReReadingNewTaskCode"
 | 
						|
          label="新任务编号"
 | 
						|
          min-width="120"
 | 
						|
          sortable="custom"
 | 
						|
          show-overflow-tooltip
 | 
						|
        />
 | 
						|
      </el-table>
 | 
						|
      <!-- 分页组件 -->
 | 
						|
      <pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
 | 
						|
      <el-dialog
 | 
						|
        v-if="ConfirmReReadingVisible"
 | 
						|
        title="驳回"
 | 
						|
        :visible.sync="ConfirmReReadingVisible"
 | 
						|
        width="600px"
 | 
						|
        append-to-body
 | 
						|
        :close-on-click-modal="false"
 | 
						|
        custom-class="base-dialog-wrapper"
 | 
						|
      >
 | 
						|
        <div style="padding:10px;border: 1px solid #e0e0e0;max-height:650px;overflow-y: auto;">
 | 
						|
          <el-form
 | 
						|
            ref="reasonForm"
 | 
						|
            :rules="rules"
 | 
						|
            :model="ConfirmReReadingForm"
 | 
						|
            class="demo-ruleForm"
 | 
						|
            size="small"
 | 
						|
            label-width="120px"
 | 
						|
          >
 | 
						|
            <el-form-item label="驳回原因" prop="RequestReReadingRejectReason">
 | 
						|
              <el-input
 | 
						|
                v-model="ConfirmReReadingForm.RequestReReadingRejectReason"
 | 
						|
                type="textarea"
 | 
						|
                :autosize="{ minRows: 2, maxRows: 4}"
 | 
						|
                :placeholder="$t('common:ruleMessage:specify')"
 | 
						|
                maxlength="500"
 | 
						|
                show-word-limit
 | 
						|
              />
 | 
						|
            </el-form-item>
 | 
						|
          </el-form>
 | 
						|
        </div>
 | 
						|
        <div slot="footer" class="dialog-footer">
 | 
						|
          <!-- 取消 -->
 | 
						|
          <el-button :disabled="btnLoading" size="small" type="primary" @click="ConfirmReReadingVisible = false;ConfirmReReadingForm = { RequestReReadingRejectReason: null }">
 | 
						|
            {{ $t('common:button:cancel') }}
 | 
						|
          </el-button>
 | 
						|
          <!-- 保存 -->
 | 
						|
          <el-button :loading="btnLoading" size="small" type="primary" @click="handleConfirmReReading(rowData, 2)">
 | 
						|
            {{ $t('common:button:save') }}
 | 
						|
          </el-button>
 | 
						|
        </div>
 | 
						|
      </el-dialog>
 | 
						|
    </template>
 | 
						|
  </BaseContainer>
 | 
						|
</template>
 | 
						|
<script>
 | 
						|
import { getIRReReadingTaskList, getTrialSiteSelect } from '@/api/trials'
 | 
						|
import { confirmReReading } from '@/api/trials/reading'
 | 
						|
import BaseContainer from '@/components/BaseContainer'
 | 
						|
import Pagination from '@/components/Pagination'
 | 
						|
import { changeURLStatic } from '@/utils/history.js'
 | 
						|
const searchDataDefault = () => {
 | 
						|
  return {
 | 
						|
    SubjectCode: '',
 | 
						|
    TaskCode: '',
 | 
						|
    PageIndex: 1,
 | 
						|
    PageSize: 20
 | 
						|
  }
 | 
						|
}
 | 
						|
export default {
 | 
						|
  name: 'RereadTask',
 | 
						|
  components: { BaseContainer, Pagination },
 | 
						|
  data() {
 | 
						|
    return {
 | 
						|
      searchData: searchDataDefault(),
 | 
						|
      list: [],
 | 
						|
      siteOptions: [],
 | 
						|
      total: 0,
 | 
						|
      loading: false,
 | 
						|
      trialId: '',
 | 
						|
      ConfirmReReadingForm: {
 | 
						|
        RequestReReadingRejectReason: null
 | 
						|
      },
 | 
						|
      rules: {
 | 
						|
        RequestReReadingRejectReason: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }]
 | 
						|
      },
 | 
						|
      ConfirmReReadingVisible: false
 | 
						|
    }
 | 
						|
  },
 | 
						|
  mounted() {
 | 
						|
    if (this.$route.query.SiteId) {
 | 
						|
      this.searchData.SiteId = this.$route.query.SiteId
 | 
						|
      this.searchData.SubjectCode = this.$route.query.SubjectCode
 | 
						|
      this.searchData.TaskName = this.$route.query.TaskName
 | 
						|
      changeURLStatic('SiteId', '')
 | 
						|
      changeURLStatic('SubjectCode', '')
 | 
						|
      changeURLStatic('TaskName', '')
 | 
						|
    }
 | 
						|
    this.trialId = this.$route.query.trialId
 | 
						|
    this.getSite()
 | 
						|
    this.getList()
 | 
						|
  },
 | 
						|
  methods: {
 | 
						|
    getSite() {
 | 
						|
      getTrialSiteSelect(this.trialId).then(res => {
 | 
						|
        this.siteOptions = res.Result
 | 
						|
      })
 | 
						|
    },
 | 
						|
    getList() {
 | 
						|
      this.loading = true
 | 
						|
      this.searchData.TrialId = this.trialId
 | 
						|
      getIRReReadingTaskList(this.searchData).then(res => {
 | 
						|
        this.list = res.Result.CurrentPageData
 | 
						|
        this.total = res.Result.TotalCount
 | 
						|
        this.loading = false
 | 
						|
      }).catch(() => { this.loading = false })
 | 
						|
    },
 | 
						|
    handleSearch() {
 | 
						|
      this.searchData.PageIndex = 1
 | 
						|
      this.getList()
 | 
						|
    },
 | 
						|
    handleReset() {
 | 
						|
      this.searchData = searchDataDefault()
 | 
						|
      this.getList()
 | 
						|
    },
 | 
						|
    handleConfirmReReading(row, type, open) {
 | 
						|
      if (open) {
 | 
						|
        this.rowData = { ...row }
 | 
						|
        this.ConfirmReReadingVisible = true
 | 
						|
        this.ConfirmReReadingForm = {
 | 
						|
          RequestReReadingRejectReason: null
 | 
						|
        }
 | 
						|
        return
 | 
						|
      }
 | 
						|
      if (type === 2) {
 | 
						|
        this.$refs.reasonForm.validate((valid) => {
 | 
						|
          if (!valid) return
 | 
						|
          var params = {
 | 
						|
            ConfirmReReadingList: [
 | 
						|
              {
 | 
						|
                Id: row.Id,
 | 
						|
                OriginalReReadingTaskId: row.OriginalReReadingTaskId,
 | 
						|
                RootReReadingTaskId: row.RootReReadingTaskId,
 | 
						|
                NewReReadingTaskId: row.NewReReadingTaskId
 | 
						|
              }
 | 
						|
            ],
 | 
						|
            RequestReReadingRejectReason: this.ConfirmReReadingForm.RequestReReadingRejectReason,
 | 
						|
            TrialId: this.$route.query.trialId,
 | 
						|
            RequestReReadingResultEnum: type
 | 
						|
          }
 | 
						|
          this.loading = true
 | 
						|
          this.btnLoading = true
 | 
						|
          confirmReReading(params).then(() => {
 | 
						|
            this.loading = false
 | 
						|
            this.btnLoading = false
 | 
						|
            this.$message.success(`${type === 1 ? '同意' : '拒绝'}申请成功`)
 | 
						|
            this.getList()
 | 
						|
            this.ConfirmReReadingVisible = false
 | 
						|
          }).catch(() => {
 | 
						|
            this.loading = false
 | 
						|
            this.btnLoading = false
 | 
						|
          })
 | 
						|
        })
 | 
						|
        return
 | 
						|
      }
 | 
						|
      this.$confirm(`确定${type === 1 ? '同意' : '拒绝'}该重阅申请?`).then(() => {
 | 
						|
        var params = {
 | 
						|
          ConfirmReReadingList: [
 | 
						|
            {
 | 
						|
              Id: row.Id,
 | 
						|
              OriginalReReadingTaskId: row.OriginalReReadingTaskId,
 | 
						|
              RootReReadingTaskId: row.RootReReadingTaskId,
 | 
						|
              NewReReadingTaskId: row.NewReReadingTaskId
 | 
						|
            }
 | 
						|
          ],
 | 
						|
          TrialId: this.$route.query.trialId,
 | 
						|
          RequestReReadingResultEnum: type
 | 
						|
        }
 | 
						|
        this.loading = true
 | 
						|
        this.btnLoading = true
 | 
						|
        confirmReReading(params).then(() => {
 | 
						|
          this.loading = false
 | 
						|
          this.btnLoading = false
 | 
						|
          this.$message.success(`${type === 1 ? '同意' : '拒绝'}申请成功`)
 | 
						|
          this.getList()
 | 
						|
        }).catch(() => {
 | 
						|
          this.loading = false
 | 
						|
          this.btnLoading = false
 | 
						|
        })
 | 
						|
      })
 | 
						|
    },
 | 
						|
    // 排序
 | 
						|
    handleSortChange(column) {
 | 
						|
      if (column.order === 'ascending') {
 | 
						|
        this.searchData.Asc = true
 | 
						|
      } else {
 | 
						|
        this.searchData.Asc = false
 | 
						|
      }
 | 
						|
      this.searchData.SortField = column.prop
 | 
						|
      this.searchData.PageIndex = 1
 | 
						|
      this.getList()
 | 
						|
    }
 | 
						|
  }
 | 
						|
}
 | 
						|
</script>
 |