216 lines
		
	
	
		
			6.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
			
		
		
	
	
			216 lines
		
	
	
		
			6.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
<template>
 | 
						|
  <BaseContainer>
 | 
						|
    <template slot="search-container">
 | 
						|
      <div style="margin-left:auto;">
 | 
						|
        <!-- Approve -->
 | 
						|
        <el-button
 | 
						|
          icon="el-icon-check"
 | 
						|
          type="primary"
 | 
						|
          :disabled="approveIdArr.length==0"
 | 
						|
          @click="handleApprove()"
 | 
						|
        >
 | 
						|
          {{ $t('trials:seletctedReviews:button:approve') }}
 | 
						|
        </el-button>
 | 
						|
      </div>
 | 
						|
    </template>
 | 
						|
    <template slot="main-container">
 | 
						|
      <el-table
 | 
						|
        v-loading="listLoading"
 | 
						|
        v-adaptive="{bottomOffset:65}"
 | 
						|
        height="100"
 | 
						|
        :data="list"
 | 
						|
        class="table"
 | 
						|
        :row-class-name="handleHighLighRow"
 | 
						|
        @sort-change="handleSortChange"
 | 
						|
        @selection-change="handleSelectionChange"
 | 
						|
      >
 | 
						|
        <el-table-column type="selection" :selectable="handleSelectTable" />
 | 
						|
        <el-table-column type="index" width="40" />
 | 
						|
        <el-table-column
 | 
						|
          prop="BlindNameCN"
 | 
						|
          label="中文名"
 | 
						|
          show-overflow-tooltip
 | 
						|
          min-width="120"
 | 
						|
          sortable="custom"
 | 
						|
        >
 | 
						|
        </el-table-column>
 | 
						|
        <el-table-column
 | 
						|
          prop="BlindName"
 | 
						|
          label="英文名"
 | 
						|
          show-overflow-tooltip
 | 
						|
          min-width="120"
 | 
						|
          sortable="custom"
 | 
						|
        />
 | 
						|
        <el-table-column
 | 
						|
          prop="SpecialityId"
 | 
						|
          label="专业"
 | 
						|
          show-overflow-tooltip
 | 
						|
          min-width="120"
 | 
						|
        >
 | 
						|
          <template slot-scope="scope">
 | 
						|
            {{ scope.row.SpecialityId === otherId?(scope.row.SpecialityOther?scope.row.SpecialityOther:'Other'): scope.row.Speciality }}
 | 
						|
          </template>
 | 
						|
        </el-table-column>
 | 
						|
        <el-table-column
 | 
						|
          prop="SubspecialityIds"
 | 
						|
          label="亚专业"
 | 
						|
          show-overflow-tooltip
 | 
						|
          min-width="120"
 | 
						|
        >
 | 
						|
          <template slot-scope="scope">
 | 
						|
            {{ scope.row.SubspecialityIds.map(v => {return $fd('Subspeciality', v, 'id')}).toString() }}
 | 
						|
          </template>
 | 
						|
        </el-table-column>
 | 
						|
        <el-table-column
 | 
						|
          prop="HospitalName"
 | 
						|
          :label="$t('trials:seletctedReviews:table:institution')"
 | 
						|
          show-overflow-tooltip
 | 
						|
          width="150"
 | 
						|
        />
 | 
						|
        <el-table-column
 | 
						|
          prop="SubmmitUserName"
 | 
						|
          label="提交人"
 | 
						|
          min-width="100"
 | 
						|
        />
 | 
						|
        <el-table-column
 | 
						|
          prop="SubmmitTime"
 | 
						|
          label="提交时间"
 | 
						|
          min-width="150"
 | 
						|
        />
 | 
						|
        <el-table-column
 | 
						|
          prop="OptUserName"
 | 
						|
          label="审核人"
 | 
						|
          min-width="100"
 | 
						|
        />
 | 
						|
        <el-table-column
 | 
						|
          prop="OptTimeStr"
 | 
						|
          label="审核时间"
 | 
						|
          min-width="150"
 | 
						|
        />
 | 
						|
        <el-table-column
 | 
						|
          fixed="right"
 | 
						|
          label="操作"
 | 
						|
          width="210"
 | 
						|
        >
 | 
						|
          <template slot-scope="scope">
 | 
						|
            <el-button
 | 
						|
              icon="el-icon-view"
 | 
						|
              circle
 | 
						|
              title="查看阅片人简历"
 | 
						|
              @click="lookResumeInfo(scope.row)"
 | 
						|
            />
 | 
						|
            <el-button
 | 
						|
              :disabled="scope.row.DoctorTrialState === 8"
 | 
						|
              icon="el-icon-check"
 | 
						|
              circle
 | 
						|
              title="同意"
 | 
						|
              @click="handleApprove(scope.row)"
 | 
						|
            />
 | 
						|
          </template>
 | 
						|
        </el-table-column>
 | 
						|
      </el-table>
 | 
						|
      <pagination class="page" :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" />
 | 
						|
    </template>
 | 
						|
  </BaseContainer>
 | 
						|
</template>
 | 
						|
<script>
 | 
						|
import BaseContainer from '@/components/BaseContainer'
 | 
						|
import Pagination from '@/components/Pagination'
 | 
						|
import { getSubmissionOrApprovalReviewerList, approveReviewer } from '@/api/trials'
 | 
						|
import store from '@/store'
 | 
						|
const enrollState = 4
 | 
						|
export default {
 | 
						|
  name: 'Approval',
 | 
						|
  components: { BaseContainer, Pagination },
 | 
						|
  data() {
 | 
						|
    return {
 | 
						|
      list: [],
 | 
						|
      listQuery: {
 | 
						|
        TrialId: '',
 | 
						|
        IntoGroupSearchState: enrollState,
 | 
						|
        PageIndex: 1,
 | 
						|
        PageSize: 20,
 | 
						|
        Asc: false,
 | 
						|
        SortField: ''
 | 
						|
      },
 | 
						|
      otherId: 'ef84e9cb-f1a6-49d7-b6da-34be2c12abd5',
 | 
						|
      total: 0,
 | 
						|
      listLoading: false,
 | 
						|
      approveIdArr: [],
 | 
						|
      token: store.getters.token
 | 
						|
    }
 | 
						|
  },
 | 
						|
  created() { this.initPage() },
 | 
						|
  methods: {
 | 
						|
    lookResumeInfo(row) {
 | 
						|
      console.log(row)
 | 
						|
      window.open(`/blindResumeInfo?doctorId=${row.Id}&token=${this.token}`)
 | 
						|
    },
 | 
						|
    initPage() {
 | 
						|
      this.getList()
 | 
						|
    },
 | 
						|
    getList() {
 | 
						|
      this.listLoading = true
 | 
						|
      this.listQuery.TrialId = this.$route.query.trialId
 | 
						|
      getSubmissionOrApprovalReviewerList(this.listQuery).then(res => {
 | 
						|
        this.listLoading = false
 | 
						|
        this.list = res.Result.CurrentPageData
 | 
						|
        this.total = res.Result.TotalCount
 | 
						|
      // eslint-disable-next-line handle-callback-err
 | 
						|
      }).catch(() => { this.listLoading = false })
 | 
						|
    },
 | 
						|
    handleApprove(row) {
 | 
						|
      // Confirm the approval?
 | 
						|
      var params
 | 
						|
      if (row) {
 | 
						|
        params = [row.Id]
 | 
						|
      } else {
 | 
						|
        params = Object.assign([], this.approveIdArr)
 | 
						|
      }
 | 
						|
      this.$confirm('是否确认审核?', {
 | 
						|
        type: 'warning'
 | 
						|
      }).then(() => {
 | 
						|
        this.listLoading = true
 | 
						|
        const trialId = this.$route.query.trialId
 | 
						|
        approveReviewer(trialId, params, 1).then(res => {
 | 
						|
          if (res.IsSuccess) {
 | 
						|
            this.getList()
 | 
						|
            this.$message.success(this.$t('common:message:savedSuccessfully'))
 | 
						|
            // this.$emit('nextStep', 'confirmation')
 | 
						|
          }
 | 
						|
          this.listLoading = false
 | 
						|
        }).catch(() => {this.listLoading = false})
 | 
						|
      })
 | 
						|
    },
 | 
						|
    handleSelectionChange(val) {
 | 
						|
      const arr = []
 | 
						|
      for (let index = 0; index < val.length; index++) {
 | 
						|
        arr.push(val[index].Id)
 | 
						|
      }
 | 
						|
      this.approveIdArr = arr
 | 
						|
    },
 | 
						|
    handleSortChange(column) {
 | 
						|
      if (column.order === 'ascending') {
 | 
						|
        this.listQuery.Asc = true
 | 
						|
      } else {
 | 
						|
        this.listQuery.Asc = false
 | 
						|
      }
 | 
						|
      this.listQuery.SortField = column.prop
 | 
						|
      this.listQuery.PageIndex = 1
 | 
						|
      this.getList()
 | 
						|
    },
 | 
						|
    handleHighLighRow({ row, rowIndex }) {
 | 
						|
      if (row.DoctorTrialState === 8) {
 | 
						|
        return 'selected'
 | 
						|
      }
 | 
						|
    },
 | 
						|
    handleSelectTable(row) { return row.DoctorTrialState !== 8 },
 | 
						|
    handleDetail(row) {
 | 
						|
      const { href } = this.$router.resolve({ path: `/trialsResume?doctorId=${row.Id}` })
 | 
						|
      window.open(href, '_blank')
 | 
						|
    }
 | 
						|
  }
 | 
						|
}
 | 
						|
</script>
 | 
						|
 |