<!--
 @description: 组件委员会-未对接专家库
 @author: yf
 @date: 2020-7-9 14:36:58
 @routerPath:  /procurement/procurementDrive/probidCommittee
-->
<template>
  <div class="main p0-16">
    <div class="mt10 mb10" style="text-align:center">
      <el-radio-group v-model="expertSourceType" :disabled="tableData.length>0">
        <el-radio v-for="(item, k) in hqzzgzList" :key="k" :label="item.typecode">
          {{ item.typename }}
        </el-radio>
      </el-radio-group>
    </div>
    <div>
      <!-- expertSourceStatus 专家状态 true代表平台抽取 false代表平台录入
          true 获取专家、设定组长、取消组长、导出名单、编辑按钮 展示
          false 按钮都需要展示
      -->
      <gx-button
        v-if="!isChange && !expertSourceStatus"
        :code="'001_003_001'"
        size="small"
        type="primary"
        @click="addExpert"
      >
        添加专家
      </gx-button>
      <!-- getExtractExpertsStatus 01已获取专家不显示按钮 02未进行抽取显示按钮 -->
      <gx-button
        v-if="!isChange && expertSourceStatus && (getExtractExpertsStatus === '02' || getExtractExpertsStatus === '')"
        :code="'001_003_014'"
        size="small"
        type="primary"
        @click="getExtractExperts"
      >
        获取专家
      </gx-button>
      <gx-button v-if="!isChange" :code="'001_003_002'" type="primary" @click="addExpertLeader">
        设定组长
      </gx-button>
      <gx-button v-if="!isChange" :code="'001_003_003'" @click="cancelExpertLeader">
        取消组长
      </gx-button>
      <gx-button v-if="isChange && !expertSourceStatus" :code="'001_003_013'" class="primary" size="small" @click="sendPassword">
        重置密码
      </gx-button>
      <el-upload
        ref="uploads"
        :on-success="handleSuccess"
        :on-error="handleError"
        :show-file-list="false"
        :action="action"
        :data="actionData"
        :headers="importHeaders"
        multiple
        style="display: inline-block;margin:0 10px"
      >
        <gx-button v-if="!isChange && !expertSourceStatus" :code="'001_003_004'" class="primary" size="small">
          导入专家
        </gx-button>
      </el-upload>
      <gx-button v-if="!isChange && !expertSourceStatus" :code="'001_003_005'" class="primary" size="small" @click="downloadTemp">
        下载模板
      </gx-button>
      <gx-button class="primary" :code="'001_003_006'" size="small" @click="checkoutExpert">
        导出名单
      </gx-button>
    </div>
    <!-- 专家列表 -->
    <section class="mt10">
      <el-table
        ref="selectionTab"
        v-loading="loading"
        :data="tableData"
        highlight-current-row
        @selection-change="selectionChange"
      >
        <el-table-column type="selection" width="55" align="center" />
        <el-table-column type="index" label="序号" width="50" align="center" />
        <el-table-column label="姓名" width="80" prop="expertName" align="center" />
        <el-table-column label="专家身份证号" width="150" prop="idcardNo" align="center" />
        <el-table-column label="联系方式" width="100" prop="expertTelephone" align="center" />
        <el-table-column label="工作单位" min-width="130" prop="company" align="left" />
        <el-table-column label="性别" width="60" prop="sex" align="center" />
        <el-table-column label="专家类型" min-width="100" prop="personType" align="center">
          <template slot-scope="scope">
            {{ filterDictText(personTypeList,scope.row.personType) }}
          </template>
        </el-table-column>
        <el-table-column label="评标类别" prop="expertTypes" align="center" min-width="100">
          <template slot-scope="scope">
            <span v-for="(item, index) in scope.row.expertTypes" :key="index">
              {{ filterDictText(expertTypeList,item) }}
            </span>
          </template>
        </el-table-column>
        <el-table-column label="组长类型" min-width="130" prop="expertLeaderType" align="center">
          <template slot-scope="scope">
            {{ scope.row.expertLeaderType }}
          </template>
        </el-table-column>
        <el-table-column label="需推荐候选人" width="100" prop="isRecommendCandidate" align="center">
          <template slot-scope="scope">
            <div v-if="!isChange">
              <!-- scope.row.expertId -->
              <el-radio v-if="scope.row.isLeader === '01'" v-model="scope.row.isRecommendCandidate" :disabled="setIsReferrer()" label="01" @change.native="currentRadio(scope.row)">
                {{ '' }}
              </el-radio>
            </div>
            <div v-else>
              <span v-if="scope.row.isRecommendCandidate!=='00' && scope.row.isRecommendCandidate!=='' && scope.row.isRecommendCandidate!==null">是</span>
            </div>
          </template>
        </el-table-column>
        <el-table-column v-if="!isChange" label="操作" width="100" align="center" fixed="right">
          <!-- isChange是否为变更， isChangeSubmit变更后生效 expertStatus专家状态 00-请假，01–正常 useStatus专家生效状态 00-未生效 ，01-已生效-->
          <template slot-scope="scope">
            <gx-link v-if="!isChange" :code="'001_003_009'" type="primary" @click="addExpert(scope.row)">
              [编辑]
            </gx-link>
            <gx-link v-if="!isChange && !expertSourceStatus" :code="'001_003_008'" type="primary" @click="deleteExpert(scope.row)">
              [删除]
            </gx-link>
          </template>
        </el-table-column>
      </el-table>
      <!--分页组件-->
      <page-nation :pagination-data="paginationData" @change="loadData" />
    </section>
    <!--附件表格-->
    <p class="title" />
    <table class="tableData">
      <tr class="singleRow">
        <td>附件</td>
        <td>
          <upload
            v-if="!isChange"
            ref="upload"
            :title="''"
            :code="'001_003_010'"
            :on-change="principalFile"
            :data="procurementFile"
            :file-list="principalList"
            :auto-delete="true"
            :auto-upload="true"
            :success="successdata"
            tip-text="上传附件格式（*.doc;*.docx;*.pdf;*.png;*.jpg;*.zip;*.jpeg;*.txt;*.xlsx;*. xls;*.ppt;*.pptx;*.rar）"
            accept=".doc, .docx, .pdf, .png, .jpg, .zip;.jpeg;.txt;.xlsx;. xls;.ppt;.pptx;.rar"
            file-ref="fileRef"
            but-text="点击上传"
          />
          <downloadFile v-else :data="procurementFile" />
        </td>
      </tr>
    </table>
    <!-- 底部按钮 -->
    <div class="but_footer">
      <div class="but_footer-h">
        <div class="but_footer-but">
          <gx-button v-if="!isChange&&!isChangeSubmit&&!drawoffNew" :code="'001_003_011'" :loading="loading" type="primary" size="medium" @click="saveData('00')">
            生效
          </gx-button>
          <gx-button v-if="isChange&&drawoffNew" :loading="loading" :code="'001_003_012'" type="primary" size="medium" @click="change">
            变更
          </gx-button>
          <gx-button v-if="!isChange&&drawoffNew" :code="'001_003_011'" :loading="loading" type="primary" size="medium" @click="saveData('01')">
            生效
          </gx-button>
        </div>
      </div>
    </div>
    <!-- 添加专家弹框 -->
    <expert-add :dialog-data="dialogData" :get-tender-base="getTenderBase" @reload="initData" />
    <!--设定组长弹框-->
    <leader-add :leader-dialog-data="leaderDialogData" :get-tender-base="getTenderBase" @reload="initData" />
  </div>
</template>

<script>
/* 公共组件*/
import pagination from '@comp/common/pagination/pagination' // 分页组件
import upload from '@comp/common/updownload/upload'// 文件上传组件
import downloadFile from '@comp/common/updownload/downloadFile' // 文件回显组件
/* 公用方法*/
import { filterDictText } from '@/assets/js/utils'// 常用方法
import { filterObj, download } from '@/assets/js/utils/index'
import { getToken } from '@/assets/js/utils/auth'
import procIsShowField from '@/views/procurement/mixins/procIsShowField'
/* 添加专家弹框*/
import probidExpertDialog from './procurementCommitteeAdd-dialog.vue'
/* 设定组长弹框*/
import addExpertLeaderDialog from './procurementCommitteeExpertLeaderAdd-dialog'
/* 混合开发方法-参数字段*/
import { ListMixin } from '@/mixins/ListMixin' // 分页
import { probidCommitteeMixin } from './mixins/procurementCommitteeMixins'
import { procurementCommitteeGroupMixin } from './mixins/procurementCommitteeGroupMixins'
/* api*/
import {
  listExpertdrawOffByPackId, // 获取专家信息列表
  deleteProcurementExpertdrawOff, // 删除专家
  effectiveProcurementExpertdrawOff, // 评委会生效
  effectiveProcurementExpertdrawOffForChange, // 评委会变更生效
  downProcurementExpertdrawOffList, // 导出专家
  leaveProcurementExpertdrawOffForChange, // 评委请假
  qryProtProjectProcurementIsChangeStatus, // 查询是否可以变更
  resetPasswordForExpertdrawOff, // 重置密码
  cancelProcurementExpertdrawOffOfLeader, // 取消组长
  isRecommendCandidateOfExpertOff, // 需推荐候选人
  getProjectDrawOffEntityId, // 附件上传bizId
  getExtractExperts // 获取专家抽取状态
} from '@/api/procurement/procurementEvaluation'
import { downloadTemplate } from '@/api/procurement/datacenterDangtfz'

import {
  resetPasswordOfSystem
} from '@/api/common/user.js'
export default {
  name: 'ProbidCommitteeList',
  components: {
    'leader-add': addExpertLeaderDialog, // 设定组长弹框
    'expert-add': probidExpertDialog, // 添加专家弹框
    'page-nation': pagination, // 分页组件
    upload,
    downloadFile
  },
  inject: ['getTenderBase'],
  mixins: [ListMixin, probidCommitteeMixin, procurementCommitteeGroupMixin],
  data() {
    return {
      // 上传文件地址
      action:
        '/bidprocurement/procurement-evaluation/procurementExpertDrawOff/importProcurementExpertdrawOffListByExcel',
      importHeaders: {
        'X-AUTH-TOKEN': getToken()
      }, // 上传的请求头
      actionData: {
        // 上传接口参数
        tenderId: this.getTenderBase().tenderId, // 项目id
        packId: this.getTenderBase().packId // 标段id
      },
      tableData: [], // 委员会-专家
      dialogData: {
        // 传递的弹框数据
        dialog: false, // 添加委员会-弹框
        id: '' // 抽取id
      },
      isChangeSubmit: false, // 是否变更页面生效按钮
      isChange: false, // 是否显示变更按钮
      drawoffNew: false, // 新增变更状态的值
      currentData: [], // 勾选数据
      loading: true, // loading效果
      getTenderBase: this.getTenderBase(), // 项目基本信息
      procurementFile: {
        bizId: '', // 业务主键Id
        fileType: 'prot_project_procurement_expert_draw_off_file'// 文件类型
      }, // 附件信息
      principalList: [], // 文件列表
      recommendCandidatesInfo: {}, // 推荐候选人
      leaderDialogData: { // 设定组长弹框数据
        dialog: false,
        expertId: ''
      },
      isReferrer: procIsShowField(), // 判断角色code是否是非监察员角色 返回布尔值 是 true否 false
      expertSourceType: '01', // 专家来源 01平台录入 02平台抽取
      hqzzgzList: [], // 获取专家规则字典
      expertSourceStatus: false, // 专家规则状态 true显示获取专家按钮 flase显示添加专家按钮
      getExtractExpertsStatus: '' // 平台抽取 获取专家 01已获取到专家 02未进行抽取申请
    }
  },
  watch: {
    // 监听
    'expertSourceType'(val) {
      // val 01平台录入 02平台抽取
      if (val === '02') {
        this.expertSourceStatus = true
        // this.getExtractExperts() // 获取专家状态
      } else {
        this.expertSourceStatus = false
        this.loadData() // 获取专家
      }
    }
  },
  created() {
    this.initGroup() // 获取专家规则字典
    // 初始化表格数据
    this.loadData()
    // 获取uuid
    this.getEvalAnnexUUidData()
  },
  methods: {
    filterDictText,
    // 获取字典方法
    initGroup() {
      const data = [
        'hqzzgz'// 获取专家规则
      ]
      this.$store.dispatch('getGroupType', data).then(res => {
        Object.keys(res.bidTypeData).forEach((key) => {
          this[key] = res.bidTypeData[key]
        })
      })
    },
    // 初始化录入专家列表
    loadData() {
      this.tableData = []
      const params = this.getQueryParams()// 查询条件
      listExpertdrawOffByPackId(params)
        .then(res => {
          this.loading = false
          this.tableData = res.data.records
          this.expertSourceType = this.tableData[0].personCometype // 获取专家抽取状态 01录入 02抽取

          if (this.tableData[0].personCometype === '02') {
            this.getExtractExpertsStatus = '01'
          }

          // 传递给父节点列表数据
          this.$emit('bidCommitteeTableData', this.tableData)
          this.tableData.forEach(item => {
            // this.$set(item, 'isRecommendCandidate', null)
            // 判断是否有组长勾选推荐中标人
            if (item.isRecommendCandidate === '01') {
              // item.isRecommendCandidate = item.expertId
              // this.recommendCandidatesInfo.isRecommendCandidate = item.expertId
            }
          })
          this.paginationData.total = res.data.total
          if (!this.tableData.length) {
            this.isChange = false
            this.loading = false
            return
          }
          // 判断是否已生效 00未生效  01生效（变更）
          const filterResult = this.tableData.filter(item => {
            return item.useStatus === '00'
            // return item.useStatus === '00'
          })
          const filterResultNew = this.tableData.filter(item => {
            // 已经生效过 01已生效
            return item.drawoffStatus === '00'
          })
          if (filterResult.length && filterResultNew.length) {
            // 专家全部已经是生效状态
            this.isChange = false
            this.loading = false
            this.drawoffNew = false
          } else if (!filterResult.length && !filterResultNew.length) {
            this.isChange = true
            this.loading = false
            this.drawoffNew = true
          } else if (filterResult.length && !filterResultNew.length) {
            // 判断是否存在生效状态
            const hasEffectStatus = this.tableData.filter(item => {
              return item.useStatus === '01'
            })
            if (hasEffectStatus.length) {
              // 生效和未生效共同存在
              this.isChangeSubmit = true
              this.loading = false
            } else {
              this.isChangeSubmit = false
              this.loading = false
            }
            this.drawoffNew = true
          }
        })
        .catch(() => {
          this.loading = false
        })
    },
    //  删除
    deleteExpert(row) {
      this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        confirmButtonClass: 'confirmBtn',
        cancelButtonClass: 'cancelBtn',
        type: 'warning'
      })
        .then(() => {
          this.loading = true
          deleteProcurementExpertdrawOff(row.id).then(res => {
            this.loadData()
          }).catch(() => {
            this.loading = false
          })
        })
        .catch(() => {})
    },
    //  生效
    saveData(val) {
      this.loading = true
      const leaderList = this.tableData.filter(item => {
        return item.isLeader === '01'
      })
      // 判断是否设置过组长
      if (!leaderList.length) {
        this.loading = false
        this.$message.warning('请设置组长。')
        return
      }
      if (leaderList.length) {
        // 判断是否勾选推荐候选人
        const notCandidatesList = leaderList.filter(item => {
          // 有多个组长的情况 如果选了一个 已经赋值 则会返回一个不为空的
          return item.isRecommendCandidate === '01'
        })
        if (notCandidatesList.length === 0 && notCandidatesList !== '') {
          this.loading = false
          this.$message.warning('选择组长推荐候选人！')
          return
        }
      }
      // 判断是否设置商务组长
      const businessLeader = leaderList.filter(item => {
        return item.expertLeaderType === '商务组长' || item.expertLeaderType === '商务组长,技术组长'// 商务组长 技术组长
      })
      if (!businessLeader.length) {
        this.loading = false
        this.$message.warning('必须设置商务组长')
        return
      }
      // 判断专家数是否为单数
      if (this.tableData.length % 2 === 0) {
        this.$confirm('评标委员会人数必须为单数！', '提示', {
          confirmButtonText: '确定',
          confirmButtonClass: 'confirmBtn',
          type: 'warning',
          showCancelButton: false
        }).then(() => {
          this.loading = false
          return
        }).catch(() => {
          this.loading = false
          return
        })
        return
      }
      // 发送生效请求
      this.effective(val)
    },
    // 编辑/新增
    addExpert(row) {
      this.dialogData = {
        dialog: true,
        id: row && row.id// 专家id
      }
    },
    // 下载模板
    downloadTemp() {
      //  模板类型
      const data = {
        templateType: 'P_T_P_EVALUATION_EXPERTDETAILTEMPLATE'
      }
      downloadTemplate(data)
        .then(res => {
          download(res, '采购小组导入模板.xlsx')
        })
        .catch(() => {})
    },
    // 设定组长
    addExpertLeader() {
      // 判断是否勾选数据
      if (this.currentData.length === 1) {
        // 判断勾选专家是否请假 00请假01正常
        if (this.currentData[0].expertStatus === '00') {
          this.$message.warning('该专家已请假，请设置其它组长。')
          // 取消之前的勾选数据
          this.currentData = []
          return
        }
        // 判断当前数据是否已经是组长
        if (this.currentData[0].isLeader === '01') {
          this.$message.warning('已为组长')
          this.$refs.selectionTab.clearSelection()
          // 取消之前的勾选数据
          this.currentData = []
          return
        }
        // 发请求设定组长
        this.leaderDialogData.expertId = this.currentData[0].expertId
        this.leaderDialogData.dialog = true
        return
      }
      this.$message.warning('请勾选一条数据！')
      this.$refs.selectionTab.clearSelection()
      // 取消之前的勾选数据
      this.currentData = []
    },
    // 变更
    change() {
      this.loading = true
      // 判断信息是否可以变更
      this.canChangeData().then(res => {
        if (!res.data) {
          this.$message.warning('已经下达评标指令，不允许更改评委名单、评审步骤和评审指标。')
          this.loading = false
        }
        if (res.data) {
          this.loading = false
          this.isChange = false
          this.isChangeSubmit = true
          this.drawoffNew = true
        }
      })
    },
    // 勾选数据
    selectionChange(val) {
      this.currentData = val
    },
    // 导出专家
    checkoutExpert() {
      downProcurementExpertdrawOffList(this.getTenderBase.packId)
        .then(res => {
          download(
            res,
            '【' + this.getTenderBase.tenderName + '】专家列表.xls'
          )
        })
        .catch(() => {})
    },
    // 请假
    leaveInputdExpert(row) {
      this.$confirm('确定专家请假吗？', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        confirmButtonClass: 'confirmBtn',
        cancelButtonClass: 'cancelBtn',
        type: 'warning'
      })
        .then(() => {
          leaveProcurementExpertdrawOffForChange(row.id)
            .then(res => {
              if (res.header.ret === '0') {
                this.loadData()
              }
            })
            .catch(() => {})
        })
        .catch(() => {})
    },
    // 导入成功后的回调
    handleSuccess(response, file, fileList) {
      if (response.header.ret === '0') {
        this.$message.success(response.header.msg)
      } else {
        this.$message.error(response.header.msg)
      }
      this.loadData()
    },
    // 导入失败后的回调
    handleError(response, file, fileList) {
      this.$message.error(response.header.msg)
    },
    // 查询条件
    getQueryParams() {
      const param = {
        packId: this.getTenderBase.packId// 标段id
      }
      param.pageNo = this.paginationData.pageNo
      param.pageSize = this.paginationData.pageSize
      return filterObj(param)
    },
    // 刷新数据
    initData() {
      this.paginationData.pageNo = 1
      this.paginationData.pageSize = 10
      // 获取列表信息
      this.loadData()
    },
    // 重置密码
    sendPassword() {
      // 判断是否选择数据
      if (!this.currentData.length) {
        this.$confirm('请选择重置密码的用户。', '提示', {
          confirmButtonText: '确定',
          confirmButtonClass: 'confirmBtn',
          showCancelButton: false,
          type: 'warning'
        }).then(() => {})
        return
      }
      const data = {
        dtos: this.assemblyData()
      }
      resetPasswordForExpertdrawOff(data).then(res => {
        let data = {
          id: '',
          password: '',
          repeatPassword: '',
          userName: ''
        }
        // 判断列表有没有数据
        if (res.data.vos && res.data.vos.length) {
          res.data.vos.forEach(item => {
            data = {
              id: item.userId,
              password: item.password,
              repeatPassword: item.password,
              userName: item.userName
            }
            resetPasswordOfSystem(data).then(res => {
            })
          })
        }
        if (res.data.ret === '0') {
          this.$message.success('重置密码成功')
        }
        if (res.data.ret === '1') {
          // 校验选中的数据是否已经完成签到
          this.$confirm(`${res.data.signExpertName}专家发送失败！原因：专家已经签到，不能发送密码`, '提示', {
            confirmButtonText: '确定',
            confirmButtonClass: 'confirmBtn',
            showCancelButton: false,
            type: 'warning'
          }).then(() => {
            // 刷新数据
            this.loadData()
          })
        }
      })
    },
    // 是否可以变更数据
    canChangeData() {
      return qryProtProjectProcurementIsChangeStatus(this.getTenderBase.packId)
    },
    // 封装提交数据
    assemblyData() {
      // 定义提交数据
      let data = {
        expertId: '',
        mobilePhone: '',
        userId: ''
      }
      const resetList = []
      this.currentData.forEach(item => {
        data = {
          expertId: item.expertId,
          expertName: item.expertName,
          packId: item.packId,
          mobilePhone: item.expertTelephone,
          userId: item.userId,
          userName: item.idcardNo
        }
        resetList.push(data)
      })
      return resetList
    },
    // 附件上传
    principalFile(file, fileList) {
      this.principalList = fileList
    },
    // 文件上传成功的回调
    successdata(file) {
    },
    // 获取附件上传的uuid
    getEvalAnnexUUidData() {
      getProjectDrawOffEntityId(this.getTenderBase.packId).then(res => {
        this.procurementFile.bizId = res.data
      })
    },
    // 生效请求
    effective(val) {
      // 判断是新增生效
      if (val === '00') {
        effectiveProcurementExpertdrawOff(this.getTenderBase.packId).then(res => {
          this.isChangeSubmit = false
          this.isChange = true
          this.drawoffNew = true
          this.loadData()
        }).catch(() => {
          this.loading = false
        })
      }
      // 判断是变更生效
      if (val === '01') {
        effectiveProcurementExpertdrawOffForChange(this.getTenderBase.packId).then(res => {
          this.isChangeSubmit = false
          this.isChange = true
          this.drawoffNew = true
          this.loadData()
        }).catch(() => {
          this.loading = false
        })
      }
    },
    // 勾选推荐候选人
    currentRadio(data) {
      // 取消上一次推荐
      // if (this.recommendCandidatesInfo.expertId) {
      //   this.recommendCandidates(this.recommendCandidatesInfo.expertId, '00')
      // }

      // 将全部单选按钮置空
      this.tableData.forEach(item => {
        // if (item.expertId !== data.expertId) {
        //   this.recommendCandidates(item.expertId, '00')
        // }
        this.$set(item, 'isRecommendCandidate', '00')
      })
      // 选中当前单选
      // data.isRecommendCandidate = data.expertId
      data.isRecommendCandidate = '01'
      // 保存当前勾选的推荐候选人信息
      this.recommendCandidatesInfo = data
      // 推荐当前数据
      this.recommendCandidates(data.expertId, '01')
    },
    // 取消组长
    cancelExpertLeader() {
      // 判断是否勾选数据
      if (this.currentData.length !== 1) {
        this.$message.warning('必须且只能勾选一个专家！')
        return
      }
      // 判断勾选数据是否为组长
      if (this.currentData[0].isLeader !== '01') {
        this.$message.warning('您选择的专家不是组长，无需取消组长。')
        return
      }
      // 发请求取消组长，并提示取消成功
      const data = {
        packId: this.getTenderBase.packId,
        expertId: this.currentData[0].expertId
      }
      cancelProcurementExpertdrawOffOfLeader(data).then(res => {
        this.currentData = []
        this.$message.success('已取消组长！')
        // 刷新页面数据
        this.initData()
      })
    },
    // 推荐候选人请求
    async recommendCandidates(expertId, isRecommend) {
      const data = {
        packId: this.getTenderBase.packId,
        expertId: expertId
        // isRecommend: isRecommend
      }
      const res = await isRecommendCandidateOfExpertOff(data)
      if (res.header.ret === '0') {
      }
    },
    /*
    * 推荐后选人单选是否禁用 isChange 是否显示变更按钮 isReferrer 是否是非监察员角色
    *
    */
    setIsReferrer() {
      if (this.isReferrer) {
        return true
      } else if (this.isChange) {
        return true
      } else {
        return false
      }
    },
    // 获取专家抽取状态
    getExtractExperts() {
      const data = {
        packId: this.getTenderBase.packId,
        tenderId: this.getTenderBase.tenderId
      }
      getExtractExperts(data).then((res) => {
        this.getExtractExpertsStatus = res.data.status
        if (res.data.status === '01') {
          this.loadData() // 获取专家
        } else {
          this.$message.warning('请先进行抽取申请后,在获取抽取的专家!')
        }
      })
    }
  }
}
</script>

<style lang="less" scoped>
</style>
