167 lines
		
	
	
		
			5.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
			
		
		
	
	
			167 lines
		
	
	
		
			5.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
<template>
 | 
						|
  <div style="text-align: right">
 | 
						|
    <!--导出-->
 | 
						|
    <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport(0)" style="margin-bottom: 10px">
 | 
						|
      {{ $t('common:button:export') }}阅片跟踪列表
 | 
						|
    </el-button>
 | 
						|
    <el-tabs type="border-card" v-model="TrialReadingCriterionId">
 | 
						|
      <el-tab-pane :label="i.TrialReadingCriterionName" :name="i.TrialReadingCriterionId" v-for="i of trialCriterionList" :key="i.TrialReadingCriterionId">
 | 
						|
        <el-table
 | 
						|
          v-loading="loading"
 | 
						|
          :data="list"
 | 
						|
          border
 | 
						|
          stripe
 | 
						|
        >
 | 
						|
          <el-table-column
 | 
						|
            label="序号"
 | 
						|
            :min-width="50"
 | 
						|
          >
 | 
						|
            <template slot-scope="scope">
 | 
						|
              {{scope.$index + 1}}
 | 
						|
            </template>
 | 
						|
          </el-table-column>
 | 
						|
          <el-table-column
 | 
						|
            label="文件名称"
 | 
						|
            :min-width="50"
 | 
						|
          >
 | 
						|
            <template slot-scope="scope">
 | 
						|
              {{ scope.row.FileName }}
 | 
						|
            </template>
 | 
						|
          </el-table-column>
 | 
						|
          <el-table-column
 | 
						|
            prop="AnswerGroupB"
 | 
						|
            label="操作"
 | 
						|
            min-width="80"
 | 
						|
          >
 | 
						|
            <template slot-scope="scope">
 | 
						|
              <el-button
 | 
						|
                icon="el-icon-download"
 | 
						|
                circle
 | 
						|
                title="下载"
 | 
						|
                size="mini"
 | 
						|
                @click="handleExport(scope.row.ExportCatogory)"
 | 
						|
              />
 | 
						|
            </template>
 | 
						|
          </el-table-column>
 | 
						|
        </el-table>
 | 
						|
      </el-tab-pane>
 | 
						|
    </el-tabs>
 | 
						|
  </div>
 | 
						|
</template>
 | 
						|
 | 
						|
<script>
 | 
						|
import { getReadingTaskList_Export, getTrialReadingCriterionCanExportDocumentList, getOverallTumorEvaluationList_Export, getEvaluationOfTumorEfficacy_Export, getDetailedOfEvaluatedLesion_Export } from '@/api/export'
 | 
						|
import { getTrialCriterionList } from '@/api/trials/reading'
 | 
						|
 | 
						|
export default {
 | 
						|
name: "exportList",
 | 
						|
  data() {
 | 
						|
    return {
 | 
						|
      loading: false,
 | 
						|
      trialCriterionList: [],
 | 
						|
      TrialReadingCriterionId: null,
 | 
						|
      trialId: null,
 | 
						|
      list: []
 | 
						|
    }
 | 
						|
  },
 | 
						|
  props: {
 | 
						|
    data: {
 | 
						|
      type: Object,
 | 
						|
      default() { return {} }
 | 
						|
    }
 | 
						|
  },
 | 
						|
  watch: {
 | 
						|
    TrialReadingCriterionId(v) {
 | 
						|
      if (v === '0') return
 | 
						|
      this.loading = true
 | 
						|
      getTrialReadingCriterionCanExportDocumentList({TrialReadingCriterionId: v}).then(res => {
 | 
						|
        this.list = res.Result
 | 
						|
        this.loading = false
 | 
						|
      }).catch(() => { this.loading = true })
 | 
						|
    }
 | 
						|
  },
 | 
						|
  mounted() {
 | 
						|
    this.trialId =this.$route.query.trialId
 | 
						|
    this.getTrialCriterionList()
 | 
						|
  },
 | 
						|
  methods: {
 | 
						|
    handleExport(type) {
 | 
						|
      var searchData = {...this.data}
 | 
						|
      searchData.TrialReadingCriterionId = this.TrialReadingCriterionId
 | 
						|
      switch (type) {
 | 
						|
        case 0:
 | 
						|
          getReadingTaskList_Export(searchData).then(res => {
 | 
						|
            var data = new Blob([res], {})
 | 
						|
            var a = document.createElement('a')
 | 
						|
            var url = URL.createObjectURL(data)
 | 
						|
            a.href = url
 | 
						|
            a.download = window.document.title + '_' + new Date().getTime() + '.xlsx'
 | 
						|
            document.body.appendChild(a)
 | 
						|
            a.click()
 | 
						|
            setTimeout(function() {
 | 
						|
              document.body.removeChild(a)
 | 
						|
              window.URL.revokeObjectURL(url)
 | 
						|
            }, 0)
 | 
						|
          }).catch(() => { this.loading = false })
 | 
						|
          break;
 | 
						|
        case 1:
 | 
						|
          getOverallTumorEvaluationList_Export(searchData).then(res => {
 | 
						|
            var data = new Blob([res], {})
 | 
						|
            var a = document.createElement('a')
 | 
						|
            var url = URL.createObjectURL(data)
 | 
						|
            a.href = url
 | 
						|
            a.download = window.document.title + '_' + new Date().getTime() + '.xlsx'
 | 
						|
            document.body.appendChild(a)
 | 
						|
            a.click()
 | 
						|
            setTimeout(function() {
 | 
						|
              document.body.removeChild(a)
 | 
						|
              window.URL.revokeObjectURL(url)
 | 
						|
            }, 0)
 | 
						|
          }).catch(() => { this.loading = false })
 | 
						|
          break;
 | 
						|
        case 2:
 | 
						|
          getEvaluationOfTumorEfficacy_Export(searchData).then(res => {
 | 
						|
            var data = new Blob([res], {})
 | 
						|
            var a = document.createElement('a')
 | 
						|
            var url = URL.createObjectURL(data)
 | 
						|
            a.href = url
 | 
						|
            a.download = window.document.title + '_' + new Date().getTime() + '.xlsx'
 | 
						|
            document.body.appendChild(a)
 | 
						|
            a.click()
 | 
						|
            setTimeout(function() {
 | 
						|
              document.body.removeChild(a)
 | 
						|
              window.URL.revokeObjectURL(url)
 | 
						|
            }, 0)
 | 
						|
          }).catch(() => { this.loading = false })
 | 
						|
          break
 | 
						|
        case 3:
 | 
						|
          getDetailedOfEvaluatedLesion_Export(searchData).then(res => {
 | 
						|
            var data = new Blob([res], {})
 | 
						|
            var a = document.createElement('a')
 | 
						|
            var url = URL.createObjectURL(data)
 | 
						|
            a.href = url
 | 
						|
            a.download = window.document.title + '_' + new Date().getTime() + '.xlsx'
 | 
						|
            document.body.appendChild(a)
 | 
						|
            a.click()
 | 
						|
            setTimeout(function() {
 | 
						|
              document.body.removeChild(a)
 | 
						|
              window.URL.revokeObjectURL(url)
 | 
						|
            }, 0)
 | 
						|
          }).catch(() => { this.loading = false })
 | 
						|
          break;
 | 
						|
      }
 | 
						|
    },
 | 
						|
    getTrialCriterionList() {
 | 
						|
      getTrialCriterionList(this.trialId).then(res => {
 | 
						|
        this.trialCriterionList = res.Result
 | 
						|
        this.TrialReadingCriterionId = this.trialCriterionList[0].TrialReadingCriterionId
 | 
						|
      }).catch(() => {})
 | 
						|
    }
 | 
						|
  }
 | 
						|
}
 | 
						|
</script>
 | 
						|
 | 
						|
<style scoped>
 | 
						|
 | 
						|
</style>
 |