110 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
			
		
		
	
	
			110 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
<template>
 | 
						|
  <div v-loading="loading" class="resumes-container">
 | 
						|
    <div class="resume-content">
 | 
						|
      <p>Consultant Agreement</p>
 | 
						|
      <div class="upload-content">
 | 
						|
        <upload-files ref="uploadAgreement" :doctor-id="doctorId" type="Consultant Agreement" accept=".pdf" @getFileList="getFileList" />
 | 
						|
      </div>
 | 
						|
      <p>(must be in pdf format)</p>
 | 
						|
    </div>
 | 
						|
    <div>
 | 
						|
      <el-table :data="agreementList" size="small">
 | 
						|
        <el-table-column type="index" width="40" />
 | 
						|
        <el-table-column prop="FileName" label="Consultant Agreement" width="300" />
 | 
						|
        <el-table-column prop="CreateTime" label="Upload Time" width="150" />
 | 
						|
        <el-table-column label="Action" width="400">
 | 
						|
          <template slot-scope="scope">
 | 
						|
            <el-button type="text" size="small" @click="handlePreview(scope.row)">View</el-button>
 | 
						|
            <el-button type="text" size="small" @click="handleRemoveFile(scope.row)">Delete</el-button>
 | 
						|
          </template>
 | 
						|
        </el-table-column>
 | 
						|
      </el-table>
 | 
						|
    </div>
 | 
						|
    <p style="margin-top:20px">Statement of Work</p>
 | 
						|
    <el-table :data="sowList" size="small">
 | 
						|
      <el-table-column type="index" width="40" />
 | 
						|
      <el-table-column prop="TrialCode" label="Trial ID" width="90" />
 | 
						|
      <el-table-column prop="FileName" label="Statement of Work" width="400" />
 | 
						|
      <el-table-column prop="CreateTime" label="Upload Time" width="150" />
 | 
						|
      <el-table-column label="Action" width="400">
 | 
						|
        <template slot-scope="scope">
 | 
						|
          <el-button type="text" size="small" @click="handlePreview(scope.row)">View</el-button>
 | 
						|
        </template>
 | 
						|
      </el-table-column>
 | 
						|
    </el-table>
 | 
						|
    <p style="margin-top:20px">Acknowledgement of SOW</p>
 | 
						|
    <el-table :data="ackSowList" size="small">
 | 
						|
      <el-table-column type="index" width="40" />
 | 
						|
      <el-table-column prop="TrialCode" label="Trial ID" width="90" />
 | 
						|
      <el-table-column prop="FileName" label="Acknowledgement of SOW" width="400" />
 | 
						|
      <el-table-column prop="CreateTime" label="Upload Time" width="150" />
 | 
						|
      <el-table-column label="Action" width="400">
 | 
						|
        <template slot-scope="scope">
 | 
						|
          <el-button type="text" size="small" @click="handlePreview(scope.row)">View</el-button>
 | 
						|
        </template>
 | 
						|
      </el-table-column>
 | 
						|
    </el-table>
 | 
						|
  </div>
 | 
						|
</template>
 | 
						|
<script>
 | 
						|
import UploadFiles from '@/components/UploadFiles'
 | 
						|
import { getDoctorSowList, getDoctorAckSowList, addDoctorCriterionFile, deleteDoctorCriterionFile, getDoctorCriterionFile } from '@/api/reviewers'
 | 
						|
export default {
 | 
						|
  name: 'Agreements',
 | 
						|
  components: {
 | 
						|
    UploadFiles
 | 
						|
  },
 | 
						|
  data() {
 | 
						|
    return {
 | 
						|
      doctorId: this.$route.query.Id,
 | 
						|
      agreementList: [],
 | 
						|
      sowList: [],
 | 
						|
      ackSowList: [],
 | 
						|
      loading: false
 | 
						|
    }
 | 
						|
  },
 | 
						|
  mounted() {
 | 
						|
    this.initSowList()
 | 
						|
  },
 | 
						|
  methods: {
 | 
						|
    initSowList() {
 | 
						|
      getDoctorCriterionFile({
 | 
						|
        CriterionFileType: 0
 | 
						|
      }).then(res => {
 | 
						|
        this.sowList = res.Result
 | 
						|
      })
 | 
						|
      getDoctorCriterionFile({
 | 
						|
        CriterionFileType: 1
 | 
						|
      }).then(res => {
 | 
						|
        this.ackSowList = res.Result
 | 
						|
      })
 | 
						|
    },
 | 
						|
    handlePreview(row) {
 | 
						|
      if (row.FullPath) {
 | 
						|
        window.open(row.FullPath, '_blank')
 | 
						|
      }
 | 
						|
    },
 | 
						|
    handleRemoveFile(row) {
 | 
						|
      this.$refs.uploadAgreement.handleDeleteFile(row)
 | 
						|
    },
 | 
						|
    getFileList(fileList) {
 | 
						|
      this.agreementList = fileList
 | 
						|
    }
 | 
						|
  }
 | 
						|
}
 | 
						|
</script>
 | 
						|
<style lang="scss" scoped>
 | 
						|
.resumes-container{
 | 
						|
  p {
 | 
						|
    float: left;
 | 
						|
    font-size: 13px;
 | 
						|
    line-height: 30px;
 | 
						|
    margin: 0;
 | 
						|
  }
 | 
						|
  .upload-content {
 | 
						|
    float: left;
 | 
						|
  }
 | 
						|
}
 | 
						|
 | 
						|
</style>
 |