// 线上审核本次审核信息
<template>
  <div class="auditList">
    <data-table :handleFlag.sync="handleFlag" :showPage="false" :showSelection='true' :type="'selection'"
                :queryParas="queryParas" :sourceData.sync="sourceData" :selectedRows.sync="selectedRows"
                :loadCount.sync="loadCount" operateBtnLayout="">
      <template slot="headButton">
        <div class="headButton">
          <auth-button type="primary" size="medium" :label="$t('common.staging')" @click="addCompany"></auth-button>
          <auth-button type="primary" size="medium" :label="$t('taskManage.todoTask.trialFileAllDownload')" @click="del"></auth-button>
          <auth-button type="primary" size="medium" :label="$t('taskManage.todoTask.copyLastAuditOpinion')" @click="del"></auth-button>
          <btn-import class="headImport" :btnDisplay="true" :uploadApi="uploadApi" btnSize="medium" :openPerms="false"
                      @importSuccess="importSuccess" :uploadName="$t('taskManage.todoTask.uploadPictrue')"></btn-import>
          <btn-export class="headImport" :btnDisplay="true" :uploadApi="uploadApi" btnSize="medium" templateCode=""
                      :openPerms="false" @importSuccess="importSuccess" :btnName="$t('taskManage.todoTask.downloadPictrue')"></btn-export>
        </div>
      </template>

      <!-- 审核文件名称 -->
      <el-table-column :label="$t('taskManage.todoTask.auditFile')" align="center" width="300px">
        <template slot-scope="scope">
          <span>{{scope.row.file}}</span>
        </template>
      </el-table-column>

      <!-- 初审意见 -->
      <el-table-column :label="$t('taskManage.todoTask.trialOpinion')" align="center">
        <template slot-scope="scope">
          <el-input v-model="scope.row.opinion" :maxlength="1000" :placeholder="$t('common.input')"></el-input>
        </template>
      </el-table-column>

      <!-- 操作 -->
        <el-table-column :label="$t('common.operate')" align="center" width="330px">
          <template slot-scope="scope">
            <div>
              <btn-upload :classType="true" :fileID="scope.row.fileId" :openPerms="false"></btn-upload>
              <btn-download :openPerms="false" v-if="!UtilJs.isEmpty(scope.row.fileId)"></btn-download>
              <auth-button class="iconCircleDel" icon="iconfont iconjian" v-if="!UtilJs.isEmpty(scope.row.fileId)" :title="$t('common.del')" @click="del"></auth-button>
            </div>
          </template>
        </el-table-column>
    </data-table>
  </div>
</template>
<script>
import BasePage from '@/pages/basePage.js'
import { DataTable, authButton, btnUpload, btnDownload } from 'newepoch-components'
export default {
  extends: new BasePage(),
  components: {
    DataTable,
    authButton,
    btnUpload,
    btnDownload
  },
  prop: {
    form: {
      type: [Object],
      default: function () {
        return {}
      }
    }
  },
  data () {
    return {
      uploadApi: 'todo/上传地址',
      sourceData: [
        {
          file: '供应商营业执照',
          opinion: '',
          fileId: '1'
        },
        {
          file: '产值确认文件',
          opinion: '',
          fileId: ''
        }
      ]
    }
  },
  methods: {
    addCompany () {},
    del () {},
    chooseFile () {},
    // 上传文件
    importSuccess () {}
  }
}
</script>
<style scoped lang="scss" src="@/styles/dataAudit/taskManage/auditList.scss">
</style>
