<!--  -->
<template>
  <div class="main-content revoke">
    <div class="content-header">
      <div class="step">
        <el-steps :active="active_top" align-center>
          <el-step title="名单导入" />
          <el-step title="立案" />
          <el-step title="调查" />
          <el-step title="听证告知" />
          <el-step title="决定" />
          <el-step title="归档" />
        </el-steps>
      </div>
    </div>

    <div class="content-body">
      <el-row class="header">
        <el-col :span="24" style="margin-bottom:10px">
          <div>
            <label style="font-weight: bolder;">批量吊销名单</label>
            <span style="margin-left: 10px;font-size: 0.32rem">(注：标记为红色表示已剔除)</span></div>
        </el-col>
        <el-col :span="24" style="font-size:16px">
          <div class="search-input-box">
            <label class="label-name">统一社会信用代码/注册号：</label>
            <el-input
              v-model="searchForm.searchCode"
              clearable
              type="text"
              size="mini"
              class="search-input"
              placeholder="统一社会信用代码/注册号"
              style="width:300px"
              @keyup.enter.native="search"
            />
            <el-button
              style="margin-left: 10px"
              type="primary"
              size="mini"
              icon="el-icon-search"
              @click="search"
            >查询</el-button>
          </div>
        </el-col>
      </el-row>
      <div class="body">
        <el-table
          ref="revList"
          v-loading="loading"
          element-loading-background="rgba(233, 233, 233, 0.8)"
          :data="revList"
          tooltip-effect="dark"
          style="width: 100%"
          :fit="true"
          :row-class-name="tableRowClassName"
          :header-cell-style="{background:'#8cc3fb',color:'#fff'}"
        >
          <el-table-column
            prop="index"
            label="序号"
            min-width="30"
            align="center"
          >
            <template slot-scope="scope">
              <span v-if="scope.row.isRemove === '1'" style="color: red">{{ scope.row.index }}</span>
              <span v-else>{{ scope.row.index }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="uniscid" label="统一社会信用代码/注册号" min-width="80" align="left">
            <template slot-scope="scope">
              <span v-if="scope.row.isRemove === '1'" style="color: red">{{ scope.row.uniscid }}</span>
              <span v-else>{{ scope.row.uniscid }}</span>
            </template>
          </el-table-column>
          <el-table-column
            prop="entname"
            :show-overflow-tooltip="true"
            label="企业名称"
            min-width="100"
            align="left"
          >
            <template slot-scope="scope">
              <span v-if="scope.row.isRemove === '1'" style="color: red">{{ scope.row.entname }}</span>
              <span v-else>{{ scope.row.entname }}</span>
            </template>
          </el-table-column>
          <el-table-column
            prop="name"
            label="法定代表人"
            min-width="40"
            align="left"
          >
            <template slot-scope="scope">
              <span v-if="scope.row.isRemove === '1'" style="color: red">{{ scope.row.name }}</span>
              <span v-else>{{ scope.row.name }}</span>
            </template>
          </el-table-column>
          <el-table-column
            prop="enttypeCn"
            :show-overflow-tooltip="true"
            label="企业类型"
            min-width="70"
            align="left"
          >
            <template slot-scope="scope">
              <span v-if="scope.row.isRemove === '1'" style="color: red">{{ scope.row.enttypeCn }}</span>
              <span v-else>{{ scope.row.enttypeCn }}</span>
            </template>
          </el-table-column>
          <el-table-column
            prop="settime"
            label="立案时间"
            min-width="60"
            align="left"
          >
            <template slot-scope="scope">
              <span v-if="scope.row.isRemove === '1'" style="color: red">{{ scope.row.settime }}</span>
              <span v-else>{{ scope.row.settime }}</span>
            </template>
          </el-table-column>
        </el-table>
        <div class="page-box">
          <el-row style="padding-bottom: 10px">
            <el-col :span="12" style="text-align: left">
              <!-- <el-button size="mini" @click="selectAll">全选</el-button>
                  <el-button
                    size="mini"
                    @click="$util.toggleSelect($refs.revList)"
                  >反选</el-button>
                  <el-button
                    v-if="active_top !== 4"
                    size="mini"
                    type="primary"
                    icon="el-icon-circle-plus-outline"
                    @click="showAddRevList"
                  >新增</el-button>
                  <el-button
                    size="mini"
                    type="danger"
                    icon="el-icon-delete"
                    @click="showRemDia"
                  >剔除</el-button> -->
              <el-button
                size="mini"
                type="primary"
                icon="el-icon-search"
                @click="showRemRecord"
              >查看剔除记录</el-button>
              <el-button
                type="primary"
                icon="el-icon-download"
                @click="exportDialogVisible = true"
              >导出到Excel</el-button>
            </el-col>
            <el-col :span="12">
              <el-pagination
                :page-sizes="[5, 10, 20, 30]"
                :page-size="pageParam.pageSize"
                layout="total, prev, pager, next, sizes"
                :total="pageParam.total"
                @size-change="pageSizeChange"
                @current-change="pageIndexChange"
              />
            </el-col>
          </el-row>
        </div>
      </div>
    </div>
    <div class="content-body">
      <el-tabs
        v-model="activeName"
        type="border-card"
        style="min-height: 700px"
        @tab-click="handleTabClick"
      >
        <el-tab-pane label="不予立案审批表" class="caseForm" name="first">
          <el-form
            ref="caseForm"
            :model="caseForm"
            label-width="210px"
            label-position="right"
          >
            <div class="form">
              <div class="tab">
                <div class="tab-title"><label>案件信息</label></div>
              </div>
              <div class="form-body">
                <el-row>
                  <el-col :span="12">
                    <el-form-item label="案件编号">{{
                      caseForm.caseNo
                    }}</el-form-item>
                  </el-col>
                  <!-- <el-col :span="12">
                        <el-form-item label="主体名称">{{
                          caseForm.entname
                        }}</el-form-item>
                      </el-col> -->
                  <el-col :span="12">
                    <el-form-item label="案件名称">{{
                      caseForm.caseName
                    }}</el-form-item>
                  </el-col>
                  <!-- <el-col :span="12">
                        <el-form-item label="主体类型">{{
                          caseForm.enttypeCn
                        }}</el-form-item>
                      </el-col> -->
                  <!-- <el-col :span="12">
                        <el-form-item label="注册号/统一社会信用代码">{{
                          caseForm.uniscid
                        }}</el-form-item>
                      </el-col> -->

                  <!-- <el-col :span="12">
                        <el-form-item label="法定代表人或负责人">{{
                          caseForm.name
                        }}</el-form-item>
                      </el-col> -->
                  <!-- <el-col :span="12">
                        <el-form-item label="行业代码">{{
                          caseForm.industryco
                        }}</el-form-item>
                      </el-col> -->
                  <!-- <el-col :span="12">
                        <el-form-item label="行业分类">{{
                          caseForm.industryphy
                        }}</el-form-item>
                      </el-col> -->
                </el-row>

                <!-- <el-row>
                      <el-form-item label="经营地址">{{
                        caseForm.dom
                      }}</el-form-item>
                    </el-row> -->
                <el-row class="bt0">
                  <el-form-item label="案件违法类型" prop="illegalType">
                    {{ caseForm.illegalTypeCn }}
                  </el-form-item>
                </el-row>
                <el-row class="bt0">
                  <el-form-item label="违法行为">
                    <div style="padding: 15px 15px 15px 0px">
                      <el-table
                        :data="illegactList"
                        border
                        style="width: 100%"
                        :header-cell-style="{background:'#8cc3fb',color:'#fff'}"
                        :row-class-name="tableRowClassName"
                      >
                        <el-table-column
                          prop="illegactTypeL"
                          label="违法行为大类"
                          min-width="80"
                        />
                        <el-table-column
                          prop="illegactTypeM"
                          label="违法行为中类"
                          min-width="80"
                        />
                        <el-table-column
                          prop="illegactTypeS"
                          label="违法行为小类"
                          min-width="110"
                        />
                        <el-table-column
                          prop="illegact"
                          label="具体违法行为"
                          min-width="110"
                        />
                      </el-table>
                    </div>
                  </el-form-item>
                </el-row>
                <el-row class="bt0">
                  <el-form-item label="案发地" prop="place">{{
                    caseForm.place
                  }}</el-form-item>
                </el-row>
                <el-row class="bt0">
                  <el-form-item label="案件来源">{{
                    caseFromName
                  }}</el-form-item>
                </el-row>
                <el-row class="bt0">
                  <el-form-item label="案件登记时间">{{
                    caseForm.registTime
                  }}</el-form-item>
                </el-row>
                <el-row class="bt0">
                  <el-form-item label="承办人">{{ caseForm.handlerName }}</el-form-item>
                </el-row>
                <el-row class="bt0">
                  <el-form-item label="承办时间">{{ caseForm.handlerDate }}</el-form-item>
                </el-row>
                <el-row class="bl0">
                  <el-col :span="24" class="btn-box">
                    <el-button
                      type="primary"
                      size="small"
                      @click="getContent()"
                    >预览文书</el-button>
                    <el-button
                      size="small"
                      round
                      @click="$refs.paperScale.scaleUp()"
                    >放大</el-button>
                    <el-button
                      size="small"
                      round
                      @click="$refs.paperScale.scaleDown()"
                    >缩小</el-button>
                    <el-button size="small" round>{{ '打印调查终结书' }}</el-button>
                  </el-col>
                  <el-col :span="24">
                    <div v-if="showReport">
                      <paper-scale ref="paperScale" class="scale">
                        <paper style="width:800px;min-height:395px;font-size:16px">
                          <h2 style="text-align:center">案件终结报告书</h2>
                          <p>当事人：{{ caseForm.entname }}</p>
                          <p>本局于{{ year }}年{{ month }}月{{ day }}日对{{ caseForm.entname }}<span v-if="revList.length > 1">...等公司</span>连续两年未报年报且未进行纳税申报，涉嫌构成6个月为开业行为立案调查。</p>
                          <p>经查明：截止{{ year }}年{{ month }}月，当事人未送报2019年和2020年年度报告，且未进行纳税申报。</p>
                          <p>对此，本局认为，当事人上述行为，构成《中华人民共和国公司法》第二百一十一条所指向“公司成立后无正当理由超过6个月为开业的”的行为。根据《中华人民共和国公司法》第二百一十一条规定、《公司登记管理条例》第六十八条规定：“公司成立后无正当理由超过6个月为开业，....可以由公司登记机关吊销营业执照”，建议对当事人作出吊销营业执照处罚。</p>
                          <p style="text-align:right">{{ year }}年{{ month }}月{{ day }}日</p>
                        </paper>
                      </paper-scale>
                    </div>
                  </el-col>
                </el-row>
              </div>
            </div>

            <div class="form">
              <div class="tab">
                <div class="tab-title"><label>审批进度</label></div>
              </div>
              <div class="form-body history">
                <div v-if="historyLog.length == 0" class="none">
                  暂无历史意见
                </div>
                <el-steps direction="vertical">
                  <el-step
                    v-for="(each, index) in historyLog"
                    :key="'historyLog' + index"
                    :title="each.step + '人意见：'"
                    :description="
                      each.handler +
                        ': ' +
                        each.opinioncontent +
                        ' ' +
                        each.step +
                        '日期：' +
                        each.handledate
                    "
                    status="finish"
                  />
                </el-steps>
              </div>
            </div>
          </el-form>
          <div class="submit-box">
            <el-button
              type="primary"
              @click="submitForm"
            >结束流程</el-button>
            <el-button @click="$router.back()">返回</el-button>
          </div>
        </el-tab-pane>
        <el-tab-pane class="baseinfoForm" label="线索信息" name="second">
          <div class="tab">
            <div class="tab-title"><label>线索信息</label></div>
          </div>
          <div style="height: 1050px">
            <el-form
              ref="clueInfo"
              style="margin-top: 0"
              class="clueForm"
              :model="clueInfo"
              label-width="180px"
            >
              <el-row>
                <el-col :span="18">
                  <el-row>
                    <el-form-item label="线索名称" prop="clueName">
                      <el-input
                        v-model="clueInfo.clueName"
                        disabled
                        placeholder="请输入线索名称"
                      />
                    </el-form-item>
                  </el-row>
                  <el-row>
                    <el-col :span="12">
                      <el-form-item label="线索来源" prop="clueFrom">
                        <el-select
                          v-model="clueInfo.clueFrom"
                          disabled
                          filterable
                          placeholder="请选择线索来源"
                          class="custom"
                        >
                          <el-option
                            v-for="item in cluefromOptions"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          />
                        </el-select>
                      </el-form-item>
                    </el-col>
                  </el-row>
                  <el-row>
                    <el-col :span="12">
                      <el-row>
                        <el-form-item label="接收人" prop="acceptName">
                          <el-input
                            v-model="clueInfo.acceptName"
                            disabled
                            placeholder="请输入接收人"
                          />
                        </el-form-item>
                      </el-row>
                      <el-row>
                        <el-form-item
                          label="转办函流号"
                          prop="traLetterNo"
                        >
                          <el-input
                            v-model="clueInfo.traLetterNo"
                            disabled
                            placeholder="请输入转办函流号"
                          />
                        </el-form-item>
                      </el-row>
                    </el-col>
                    <el-col :span="12">
                      <el-row>
                        <el-form-item label="接收时间" prop="acceptTime">
                          <el-date-picker
                            v-model="clueInfo.acceptTime"
                            disabled
                            value-format="yyyy-MM-dd"
                            type="date"
                            placeholder="请选择接收时间"
                          />
                        </el-form-item>
                      </el-row>
                      <el-row>
                        <el-form-item
                          label="限期改正时间"
                          prop="correctDeadLine"
                        >
                          <el-date-picker
                            v-model="clueInfo.correctDeadLine"
                            disabled
                            value-format="yyyy-MM-dd"
                            type="date"
                            placeholder="请选择限期改正时间"
                          />
                        </el-form-item>
                      </el-row>
                    </el-col>
                  </el-row>
                  <el-row>
                    <el-form-item label="线索内容" prop="clueContent">
                      <el-input
                        v-model="clueInfo.clueContent"
                        disabled
                        type="textarea"
                        :autosize="{ minRows: 2 }"
                        placeholder="请输入线索内容"
                      />
                    </el-form-item>
                  </el-row>
                  <el-row>
                    <el-form-item label="核查情况" prop="situation">
                      <el-input
                        v-model="clueInfo.situation"
                        disabled
                        type="textarea"
                        :autosize="{ minRows: 2 }"
                        placeholder="请输入核查情况"
                      />
                    </el-form-item>
                  </el-row>
                </el-col>
                <el-col :span="6" />
              </el-row>
            </el-form>
          </div>
        </el-tab-pane>
        <el-tab-pane class="tab_pane" label="文书资料" name="third">
          <el-row class="mb10">
            <div class="tab">
              <div class="tab-title"><label>已生成文书</label></div>
            </div>
            <el-tabs v-model="subActiveName1" class="tab-card" type="border-card" @tab-click="handleWritsTabClick">
              <el-tab-pane label="审批表" name="11" />
              <el-tab-pane label="案件终结报告书" name="12" />
            </el-tabs>
            <div class="content-body">
              <el-table
                v-loading="fileLoading"
                :data="systemAttachmentList"
                border
                :row-class-name="tableRowClassName"
                :header-cell-style="{background:'#8cc3fb',color:'#fff'}"
                style="width: 100%"
              >
                <el-table-column prop="index" label="序号" width="50" />
                <el-table-column prop="filename" label="文件名" min-width="100" />
                <!-- <el-table-column prop="username" label="上传用户" min-width="50" /> -->
                <el-table-column prop="uploaddate" label="审批时间" min-width="60" />
                <el-table-column label="操作" min-width="90">
                  <template slot-scope="scope">
                    <el-button type="primary">下载</el-button>
                    <!-- <el-button size="mini" type="danger" @click="btnRemoveAttachementById(scope.row)">删除</el-button> -->
                  </template>
                </el-table-column>
              </el-table>
              <el-row>
                <el-col style="text-align: right">
                  <el-pagination
                    :current-page="currentPage"
                    small
                    layout="prev, pager, next"
                    :total="filePageParam.total"
                    @current-change="handleFileCurrentChange"
                  />
                </el-col>
              </el-row>
            </div>
          </el-row>
          <!-- <el-row>
                <label>当前环节文书</label>
              </el-row> -->
          <!-- <el-row>
            <div class="tab">
              <div class="tab-title"><label>通用文书</label></div>
            </div>
            <div class="doc_box">
              <el-checkbox-group v-model="clueForm.clueFrom">
                <el-col :span="6">
                  <el-checkbox label="案卷" name="clueFrom" />
                  <el-checkbox label="指定管辖通知书" name="clueFrom" />
                </el-col>
                <el-col :span="6">
                  <el-checkbox label="送达回证" name="clueFrom" />
                  <el-checkbox label="督办案件通知书" name="clueFrom" />
                </el-col>
                <el-col :span="6">
                  <el-checkbox label="调整通知书" name="clueFrom" />
                  <el-checkbox label="案件来源登记表" name="clueFrom" />
                </el-col>
                <el-col :span="6">
                  <el-checkbox label="卷内目录" name="clueFrom" />
                  <el-checkbox label="询问（调查）笔录" name="clueFrom" />
                </el-col>
              </el-checkbox-group>
            </div>
          </el-row>
          <el-row>
            <div class="tab">
              <div class="tab-title"><label>其他文书</label></div>
            </div>
            <div class="doc_box">
              <el-checkbox-group v-model="clueForm.clueFrom">
                <el-col :span="6">
                  <el-checkbox label="有关会议文书" name="clueFrom" />
                </el-col>
                <el-col :span="6">
                  <el-checkbox label="无固定格式文书" name="clueFrom" />
                </el-col>
                <el-col :span="6">
                  <el-checkbox label="其它文书" name="clueFrom" />
                </el-col>
              </el-checkbox-group>
            </div>
          </el-row>
          <el-row style="text-align: center">
            <el-button
              size="mini"
              type="success"
              icon="el-icon-download"
            >下载文书模版</el-button>
          </el-row> -->
        </el-tab-pane>

        <el-tab-pane label="证据材料" name="fourth">
          <el-row>
            <el-col :span="8">
              <div class="tab">
                <div class="tab-title"><label>材料上传</label></div>
              </div>
              <el-tabs v-model="subActiveName2" class="tab-card" type="border-card">
                <el-tab-pane label="文档" name="first">
                  <el-upload
                    class="upload-demo"
                    drag
                    :action="bizUploadPath"
                    :data="{bizseq:bizseq,attachtype:(active_top + '')}"
                    :on-remove="remFileCallback"
                    :on-success="commonUploadCallback"
                    :on-preview="previewFile"
                    :before-upload="beforeFileUpload"
                    :before-remove="beforeRemove"
                    :file-list="fileList"
                    :show-file-list="false"
                    accept=".doc,.docx,.xlsx,.xls,.pdf"
                    multiple
                  >
                    <i class="el-icon-upload" />
                    <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
                    <div slot="tip" class="el-upload__tip">只能上传doc/docx/xls/xlsx/pdf文件，且不超过10M</div>
                  </el-upload>
                </el-tab-pane>
                <el-tab-pane
                  disabled
                  label="视频"
                  name="second"
                >视频</el-tab-pane>
                <el-tab-pane label="图片" name="third">
                  <el-upload
                    class="upload-demo"
                    drag
                    action="https://jsonplaceholder.typicode.com/posts/"
                    multiple
                  >
                    <i class="el-icon-upload" />
                    <div class="el-upload__text">
                      将文件拖到此处，或<em>点击上传</em>
                    </div>
                    <div slot="tip" class="el-upload__tip">
                      只能上传jpg/png文件，且不超过500kb
                    </div>
                  </el-upload>
                </el-tab-pane>
                <el-tab-pane
                  label="其他"
                  name="fourth"
                >其他</el-tab-pane>
              </el-tabs>
            </el-col>
            <el-col v-if="subActiveName2 == 'first'" :offset="1" :span="15">
              <div class="tab">
                <div class="tab-title"><label>材料列表</label></div>
              </div>
              <el-tabs v-model="subActiveName3" type="border-card" class="tab-card" @tab-click="handleFileTabClick">
                <el-tab-pane :disabled="active_top < 1" label="立案" name="1" />
                <el-tab-pane :disabled="active_top < 2" label="调查" name="2" />
                <el-tab-pane :disabled="active_top < 3" label="听证告知" name="3" />
                <el-tab-pane :disabled="active_top < 4" label="处罚决定" name="4" />
                <el-tab-pane :disabled="active_top < 5" label="归档" name="5" />
              </el-tabs>
              <el-table
                v-loading="fileLoading"
                :data="dataShow"
                border
                :row-class-name="tableRowClassName"
                :header-cell-style="{background:'#8cc3fb',color:'#fff'}"
                style="width: 100%"
              >
                <el-table-column prop="index" label="序号" width="50" />
                <el-table-column prop="filename" label="文件名" min-width="80" />
                <el-table-column prop="username" label="上传用户" min-width="50" />
                <el-table-column prop="uploaddate" label="上传时间" min-width="60" />
                <el-table-column label="操作" min-width="80">
                  <template slot-scope="scope">
                    <el-button size="mini" type="primary">下载</el-button>
                    <el-button size="mini" type="danger" @click="btnRemoveAttachementById(scope.row)">删除</el-button>
                  </template>
                </el-table-column>
              </el-table>
              <el-row>
                <el-col style="text-align: right">
                  <el-pagination
                    :current-page="currentPage"
                    small
                    layout="prev, pager, next"
                    :total="bizAttachmentList.length"
                    @current-change="handleCurrentChange"
                  />
                </el-col>
              </el-row>
            </el-col>
            <el-col v-if="subActiveName2 == 'third'" :span="16"> 图片预览 </el-col>
          </el-row>
        </el-tab-pane>
        <el-tab-pane label="流程跟踪" name="fifth">
          <el-row>
            <el-col :span="4">
              <el-steps style="background-color: #DFDFDF;padding: 15px" :space="100" direction="vertical" :active="active_top">
                <el-step>
                  <template slot="title">
                    <el-button class="step-btn" type="text" :disabled="stepDisable[0]" @click.native="showStepTab('0')">线索录入</el-button>
                  </template>
                </el-step>
                <el-step>
                  <template slot="title">
                    <el-button class="step-btn" type="text" :disabled="stepDisable[1]" @click.native="showStepTab('1')">立案</el-button>
                  </template>
                </el-step>
                <el-step>
                  <template slot="title">
                    <el-button class="step-btn" type="text" :disabled="stepDisable[2]" @click.native="showStepTab('2')">调查</el-button>
                  </template>
                </el-step>
                <el-step>
                  <template slot="title">
                    <el-button class="step-btn" type="text" :disabled="stepDisable[3]" @click.native="showStepTab('3')">听证告知</el-button>
                  </template>
                </el-step>
                <el-step>
                  <template slot="title">
                    <el-button class="step-btn" type="text" :disabled="stepDisable[4]" @click.native="showStepTab('4')">决定</el-button>
                  </template>
                </el-step>
                <el-step>
                  <template slot="title">
                    <el-button class="step-btn" type="text" :disabled="stepDisable[5]" @click.native="showStepTab('5')">归档</el-button>
                  </template>
                </el-step>
              </el-steps>
            </el-col>
            <el-col :span="20">
              <el-table
                :data="stepTabList"
                style="width: 100%"
                :row-class-name="tableRowClassName"
                :header-cell-style="{background:'#8cc3fb',color:'#fff'}"
              >
                <el-table-column type="expand">
                  <template slot-scope="props">
                    <el-form label-position="left" inline class="demo-table-expand">
                      <el-form-item label="意见内容:">
                        <span>{{ props.row.opinionContent }}</span>
                      </el-form-item>
                    </el-form>
                  </template>
                </el-table-column>
                <el-table-column
                  type="index"
                  label="序号"
                  width="50"
                />
                <el-table-column
                  label="处理人"
                  prop="handlerName"
                  width="100"
                />
                <el-table-column
                  label="开始时间"
                  prop="startTime"
                />
                <el-table-column
                  label="结束时间"
                  prop="endTime"
                />
                <el-table-column
                  label="处理日期"
                  prop="handleDate"
                />
                <el-table-column
                  show-overflow-tooltip
                  label="意见内容"
                  prop="opinionContent"
                />
                <el-table-column
                  label="环节"
                  prop="opinionContent"
                  :formatter="opiniontypeFormat"
                />
              </el-table>
            </el-col>
          </el-row>

        </el-tab-pane>
      </el-tabs>
    </div>

    <HandleDialog :show.sync="isShowRemRecord" title="剔除记录">
      <el-row
        style="border-bottom: 1px solid #dfdfdf; padding: 5px 0"
      >
        <el-col :span="10" style="text-align: left">
          <label class="label-name">统一社会信用代码/注册号：</label>
          <div class="search-input-box">
            <el-input
              v-model="remSearchForm.searchCode"
              clearable
              size="mini"
              type="text"
              class="search-input"
              placeholder="统一社会信用代码/注册号"
              @keyup.enter.native="search_dialog"
            />
          </div>
        </el-col>
        <el-col :span="14" style="text-align: right; padding-right: 20px">
          <el-button
            size="mini"
            style="margin-left: 10px"
            type="primary"
            icon="el-icon-search"
            @click="remReocrdSearch"
          >查询</el-button>
        </el-col>
      </el-row>
      <el-table
        ref="remRecordList"
        v-loading="remRecordLoading"
        highlight-current-row
        size="mini"
        :data="remRecordList"
        tooltip-effect="dark"
        height="500px"
        :header-cell-style="{background:'#8cc3fb',color:'#fff'}"
        :row-class-name="tableRowClassName"
        style="width: 100%; min-height: 400px; max-height: 500px;overflow-y: auto"
        :fit="true"
      >
        <el-table-column
          type="index"
          label="序号"
          width="50"
          align="center"
        />
        <el-table-column
          prop="entname"
          :show-overflow-tooltip="true"
          label="企业名称"
          min-width="200"
          align="left"
        />
        <el-table-column
          prop="removeReason"
          :show-overflow-tooltip="true"
          label="剔除原因"
          min-width="200"
          align="left"
        />
        <el-table-column
          prop="intosponsor"
          label="处理人"
          min-width="50"
          align="left"
        />
        <el-table-column
          prop="removeTime"
          :show-overflow-tooltip="true"
          label="剔除时间"
          min-width="80"
          align="left"
        />
        <el-table-column
          label="附件"
          min-width="80"
          align="left"
        >
          <template slot-scope="scope">
            <el-button type="primary" size="mini" class="mini-btn" @click="showRemAttachment(scope.row.remNo)">查看附件</el-button>
          </template>
        </el-table-column>
      </el-table>
      <div>
        <el-row>
          <el-col :span="12">
            <el-pagination
              small
              layout="prev, pager, next"
              :total="remPageParam.total"
              @current-change="remRecordPageIndexChange"
            />
          </el-col>
          <el-col :span="12">
            <div class="dialog-box">
              <el-button size="mini" @click="showRemRecordOff">返回</el-button>
            </div>
          </el-col>
        </el-row>
      </div>
      <el-dialog
        class="remFileDialog"
        title="附件列表"
        :modal="false"
        :visible.sync="attachementDialogVisible"
        width="30%"
        @close="closeRemFileDialog"
      >
        <el-upload
          v-loading="fileLoading"
          action=""
          multiple
          :file-list="remFileList"
        />
        <span slot="footer" class="dialog-footer">
          <el-button type="primary" size="mini" @click="attachementDialogVisible = false">确 定</el-button>
        </span>
      </el-dialog>
      <!--分页多选组件 对话框新增主体选中-->
      <pageSelector
        :selection="selection_dialog"
        :columns="toAddSelectionColumn"
        @removeCallback="removeAddCallback"
      />
    </HandleDialog>
    <el-dialog
      title="选择导出类型"
      :visible.sync="exportDialogVisible"
      width="30%"
    >
      <el-radio-group v-model="exportType">
        <el-radio label="All">导出全部</el-radio>
        <el-radio label="process">仅导出业务中</el-radio>
        <el-radio label="removed">仅导出已剔除</el-radio>
      </el-radio-group>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" size="mini" @click="exportEntListExcelbyType">导出</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
import {
  getUploadFileList,
  getSystemFileList,
  exportValid,
  getRemFileList,
  templateValid,
  getBizRevListPage,
  bizRevNext,
  getClueByTaskListid,
  getCaseByBizseq,
  getStepTableList,
  getRemoveRecord
} from '@/api/revoke'
import { removeAttachementById } from '@/api/attachment'
import HandleDialog from '@/components/HandleDialog'
import pageSelector from '@/components/PageSelector'
import PaperScale from '@/components/PaperScale'
import { getConstant } from '@/api/system'
import { taskOpinion } from '@/api/task'
export default {
  components: {
    HandleDialog: HandleDialog,
    PaperScale: PaperScale,
    pageSelector: pageSelector
  },
  data() {
    return {
      fileLoading: false,
      isRegister: '',
      remFileList: [],
      bizAttachmentList: [],
      systemAttachmentList: [],
      attachementDialogVisible: false,
      exportDialogVisible: false,
      exportType: '',
      uploadLoading: false,
      nextLoading: false,
      nextNodeID: '',
      remRecordList: [],
      // 剔除原因
      removeReason: '',
      handlerDate: '',
      // 流程跟踪表格
      stepTabList: [],
      showReport: false,
      stepDisable: [],
      // 违法行为列表
      illegactList: [{
        illegactId: '',
        illegactTypeL: '',
        illegactTypeM: '',
        illegactTypeS: '',
        illegact: ''
      }],
      illegactListExample: [{
        illegactTypeL: '注册登记违法行为',
        illegactTypeM: '违反《公司登记管理条例》',
        illegactTypeS: '公司成立后无正当理由超过6个月为开业或者开业后自行停业连续6个月以上的',
        illegact: '公司成立后无正当理由超过6个月为开业或者开业后自行停业连续6个月以上的'
      }],
      selection_dialog: [],
      toAddSelectionColumn: [
        { label: '统一社会信用代码/注册号', prop: 'uniscid' },
        { label: '名称', prop: 'name' },
        { label: '主体类型', prop: 'enttypeCn' }
      ],
      bizStatus: '0',
      bodyTitle: '案件终结',
      clueInfo: {}, // 录入线索信息
      cluefromOptions: [],
      addRevList: [],
      showAddRev: false,

      loading: false,
      dialogLoading: false,
      remRecordLoading: false,
      bizseq: '',
      workflowid: '',
      tasklistid: '',
      uploadPath: `${process.env.VUE_APP_BASE_API}/tsbizrevlist/fileParamExplain`,
      remUploadPath: `${process.env.VUE_APP_BASE_API}/revokeUpload/remUploadAdvance`,
      bizUploadPath: `${process.env.VUE_APP_BASE_API}/revokeUpload/uploadAdvance`,
      tableData: [],
      revList: [],
      fileList: [],
      historyLog: [],
      paperList: [],

      activeName: 'first',
      subActiveName1: '11',
      subActiveName2: 'first',
      subActiveName3: '',
      // 违法行为表单
      illegactForm: {
        illegactTypeL: '',
        illegactTypeM: '',
        illegactTypeS: '',
        illegact: ''
      },
      // 立案审批表
      caseForm: {
        // illegalType: '',
        nextNodeID: '',
        illegactList: [],
        place: '',
        // illegalTypeCn: '公司连续两年未年报且未纳税',
        // illegalType: '1',
        opinion: ''
      },
      // 案件违法类型
      illegalType: '1',
      illegalTypeCn: '公司连续两年未年报且未纳税',
      illegalTypeCn1: '公司连续两年未年报且未纳税',
      illegalTypeCn2: '其他',
      // radio: '',
      caseFromName: '',
      // 线索信息表
      baseinfoForm: {},
      active_top: 2, // 顶层步骤条当前激活
      searchForm: {
        searchCode: ''
      },
      searchForm_dialog: {
        searchCode: ''
      },
      remSearchForm: {
        searchCode: ''
      },
      pageParam: {
        customParamMap: {
          bizseq: '',
          searchCode: ''
        },
        curPage: 1,
        total: 0,
        pageSize: 5
      },
      pageParam_dialog: {
        customParamMap: {
          bizseq: '',
          searchCode: ''
        },
        curPage: 1,
        total: 0,
        pageSize: 10
      },
      remPageParam: { // 移除接口分页参数
        customParamMap: {
          bizseq: '',
          searchCode: ''
        },
        curPage: 1,
        total: 0,
        pageSize: 10
      },
      filePageParam: { // 已生成文书列表分页参数
        customParamMap: {
          bizseq: '',
          attachtype: ''
        },
        curPage: 1,
        total: 0,
        pageSize: 10
      },
      // 线索录入表单
      clueForm: {
        clueId: '',
        acceptName: '',
        acceptTime: '',
        clueContent: '',
        clueFrom: '',
        clueName: '',
        correctDeadLine: '',
        situation: '',
        traLetterNo: ''
      },
      opinion: '',
      user: JSON.parse(sessionStorage.getItem('user')),
      props: {
        label: 'name',
        children: 'zones'
      },
      count: 1,
      curDate: '',
      year: '',
      month: '',
      day: '',
      isShowNewReport: false,
      isShowRemRecord: false,
      showRemDialog: false,
      // 分页数据,这里用来保存每页切割后的数据
      totalPageData: [],
      // 共几页
      pageNum: '',
      // 每页显示数量
      pageSize: 10,
      // 当前显示页码
      currentPage: 1,
      // 总共多少条数据
      total: 1,
      // 当前要显示的数据
      dataShow: [],
      checkList: [],
      processList: [{
        value: '0',
        label: '线索录入'
      }, {
        value: '1',
        label: '立案-经办'
      }, {
        value: '2',
        label: '立案-审核'
      }, {
        value: '3',
        label: '立案-审批'
      }, {
        value: '4',
        label: '调查-经办'
      }, {
        value: '5',
        label: '调查-审核'
      }, {
        value: '6',
        label: '调查-审批'
      }, {
        value: '7',
        label: '听证告知-经办'
      }, {
        value: '8',
        label: '听证告知-审核'
      }, {
        value: '9',
        label: '听证告知-审批'
      }, {
        value: '10',
        label: '处罚决定-经办'
      }, {
        value: '11',
        label: '处罚决定-审核'
      }, {
        value: '12',
        label: '处罚决定-法规部门审核'
      }, {
        value: '13',
        label: '处罚决定-审批'
      }, {
        value: '14',
        label: '送达-经办'
      }, {
        value: '15',
        label: '送达-审核'
      }, {
        value: '16',
        label: '送达-审批'
      }]
    }
  },
  watch: {
    activeName() {
      if (this.activeName === 'fourth') {
        this.getAttachmentList(this.subActiveName3)
      } else if (this.activeName === 'third') {
        this.getSystemAttachmentList()
      }
    }
  },
  mounted() {
    this.bizseq = this.$route.query.bizseq
    this.workflowid = this.$route.query.workflowid
    this.bizStatus = this.$route.query.bizStatus
    this.tasklistid = this.$route.query.tasklistid

    this.loadRevListPage()
    // 加载线索来源(trbasecode表 'CE03')
    getConstant('CE03').then((res) => {
      if (res.code === 0) {
        const list = []
        res.data.forEach((each) => {
          list.push({
            value: each.code,
            label: each.name
          })
        })
        this.cluefromOptions = list
      }
    })
    // 加载审批表
    this.getCaseInfo()
    // 加载线索录入信息
    getClueByTaskListid(this.tasklistid).then((res) => {
      if (res.code === 0) {
        this.clueInfo = res.data
      }
    })
    // 证据材料文档 当前环节对应高亮
    this.subActiveName3 = this.active_top + ''

    // 控制流程跟踪步骤可不可点击
    this.stepControl(this.active_top)
    // 加载处办记录
    taskOpinion(this.workflowid).then((res) => {
      if (res.code === 0) {
        const historyLog1 = []
        const historyLog2 = []
        const historyLog3 = []
        const historyLog4 = []
        const historyLog5 = []
        res.data.forEach((each) => {
          switch (each.opiniontype) {
            case '1':
              each.step = '经办'
              historyLog1.push(each)
              break
            case '2':
              each.step = '审核'
              historyLog1.push(each)
              break
            case '3':
              each.step = '审批'
              historyLog1.push(each)
              break
            case '4':
              each.step = '经办'
              historyLog2.push(each)
              break
            case '5':
              each.step = '审核'
              historyLog2.push(each)
              break
            case '6':
              each.step = '审批'
              historyLog2.push(each)
              break
            case '7':
              each.step = '经办'
              historyLog3.push(each)
              break
            case '8':
              each.step = '审核'
              historyLog3.push(each)
              break
            case '9':
              each.step = '审批'
              historyLog3.push(each)
              break
            case '10':
              each.step = '经办'
              historyLog4.push(each)
              break
            case '11':
              each.step = '审核'
              historyLog4.push(each)
              break
            case '12':
              each.step = '法规部门审查'
              historyLog4.push(each)
              break
            case '13':
              each.step = '审批'
              historyLog4.push(each)
              break
            case '14':
              each.step = '经办'
              historyLog5.push(each)
              break
            case '15':
              each.step = '审核'
              historyLog5.push(each)
              break
            case '16':
              each.step = '审批'
              historyLog5.push(each)
              break
          }
        })
        switch (this.active_top) {
          case 1:
            this.historyLog = historyLog1
            break
          case 2:
            this.historyLog = historyLog2
            break
          case 3:
            this.historyLog = historyLog3
            break
          case 4:
            this.historyLog = historyLog4
            break
          case 5:
            this.historyLog = historyLog5
            break
        }
      } else {
        this.$message.error('加载处办记录失败')
      }
    })
  },
  // 方法集合
  methods: {
    tableRowClassName({ row, rowIndex }) {
      if (rowIndex % 2 === 1) {
        return 'warning-row'
      }
    },
    // 格式化流程跟踪环节回显
    opiniontypeFormat(row) {
      let name = ''
      this.processList.forEach(each => {
        if (each.value === row.opiniontype) {
          name = each.label
        }
      })
      return name
    },
    closeRemFileDialog() {
      this.remFileList = []
    },
    // 查看剔除记录材料
    showRemAttachment(remNo) {
      this.attachementDialogVisible = true
      this.fileLoading = true
      // 加载剔除记录附件
      getRemFileList(this.bizseq, remNo).then(data => {
        data.forEach(each => {
          each.id = each.attachmentid
          each.name = each.filename
          each.url = `${process.env.VUE_APP_DOWNLOAD_URL}/` + each.temppath
        })
        this.remFileList = data
        this.fileLoading = false
      })
    },
    // 处理证据材料-材料列表tabs点击事件
    handleFileTabClick(tab, event) {
      this.getAttachmentList(tab.name)
    },
    // 处理文书资料-已生成文书tabs点击事件
    handleWritsTabClick(tab, event) {
      this.filePageParam.curPage = 1
      this.getSystemAttachmentList()
    },
    // 证据材料加载附件清单
    getAttachmentList(attachtype) {
      this.fileLoading = true
      getUploadFileList(this.bizseq, attachtype).then(data => {
        this.fileLoading = false
        data.forEach(each => {
          each.id = each.attachmentid
          each.name = each.filename
          each.url = `${process.env.VUE_APP_DOWNLOAD_URL}/` + each.temppath
        })
        this.bizAttachmentList = data
        this.calcPageData(this.bizAttachmentList)
      })
    },
    // 文书材料加载文书清单
    getSystemAttachmentList() {
      this.fileLoading = true
      this.filePageParam.customParamMap.bizseq = this.bizseq
      this.filePageParam.customParamMap.attachtype = this.subActiveName1
      getSystemFileList(this.filePageParam).then(res => {
        this.fileLoading = false
        let i = 1
        const pageStart = (this.filePageParam.curPage - 1) * this.filePageParam.pageSize
        res.data.records.forEach(each => {
          each.index = pageStart + i++
          each.id = each.attachmentid
          each.name = each.filename
          each.url = `${process.env.VUE_APP_DOWNLOAD_URL}/` + each.temppath
        })
        this.filePageParam.total = res.data.total
        this.systemAttachmentList = res.data.records
      })
    },
    // 当前分页改变-生成文书列表
    handleFileCurrentChange(curPage) {
      this.filePageParam.curPage = curPage
      this.getSystemAttachmentList()
    },
    // 批量吊销主体名单分类导出Excel
    exportEntListExcelbyType() {
      if (this.$util.isEmpty(this.exportType)) {
        return this.$message.error('请先选择导出类型！')
      }
      exportValid(this.bizseq, this.exportType).then(res => {
        if (res.code === 0) {
          this.$confirm('是否确认导出', '提示').then(() => {
            const url = location.origin + process.env.VUE_APP_BASE_API + '/tsbizrevlist/exportEntListbyType?bizseq=' + this.bizseq + '&exportType=' + this.exportType
            window.open(url)
          })
        } else {
          this.$message.error(res.msg)
        }
      })
    },
    // 加载审批表
    getCaseInfo() {
      getCaseByBizseq(this.bizseq).then((res) => {
        if (res.code === 0) {
          this.caseForm = res.data
          if (res.data.illegactList.length > 0) {
            this.illegactList = res.data.illegactList
          }
          this.caseForm.uniscid = res.data.uniscid || res.data.regno
          this.cluefromOptions.find(
            (item) => {
              if (item.value === res.data.caseFrom) {
                this.$set(this, 'caseFromName', item.label)
              }
            }
          )
        }
      })
    },
    // 移除记录对话框
    showRemRecord() {
      this.getRemRecord()
      this.isShowRemRecord = !this.isShowRemRecord
    },
    showRemRecordOff() {
      this.isShowRemRecord = !this.isShowRemRecord
    },
    getRemRecord() {
      if (this.remRecordLoading) return
      this.remRecordLoading = true
      this.remPageParam.customParamMap.bizseq = this.bizseq
      getRemoveRecord(this.remPageParam).then(res => {
        this.remRecordLoading = false
        if (res.code === 0) {
          const list = []
          res.data.records.forEach(each => {
            each.uniscid = each.uniscid || each.regno
            list.push(each)
          })
          this.remRecordList = list
          this.remPageParam.total = res.data.total
        }
      })
    },
    selectInit(row, index) {
      if (row.isRemove === '1') {
        return false
      } else {
        return true
      }
    },
    // 计算页数-抽取
    calcPageData(dataList) {
      // 计算页数(根据后台数据的条数和每页显示数量算出一共几页,得0时设为1)
      if (dataList.length >= 1) {
        this.pageNum = Math.ceil(dataList.length / this.pageSize) || 1
      }
      // 数据分组
      for (let i = 0; i < this.pageNum; i++) {
        this.totalPageData[i] = dataList.slice(this.pageSize * i, this.pageSize * (i + 1))
        let j = 1
        const pageStart = i * this.pageSize
        this.totalPageData[i].forEach(each => {
          each.index = pageStart + j++
        })
      }
      this.dataShow = this.totalPageData[this.currentPage - 1]
    },
    // 每页条数发生变化
    handleSizeChange(newPageSize, dataList) {
      this.pageSize = newPageSize
      // 重新计算页数并分组
      this.calcPageData(dataList)
    },
    // 当前页码发生变化
    handleCurrentChange(newPageNum) {
      this.currentPage = newPageNum
      // 这里仍然不要忘记减去1
      this.dataShow = this.totalPageData[newPageNum - 1]
    },
    // 剔除拟吊销主体对话框
    showRemDia() {
      if (this.toDelSelection.length === 0) { return this.$message.error('请至少选择一个企业以移除') }
      this.calcPageData(this.toDelSelection)
      this.showRemDialog = !this.showRemDialog
    },
    // 赋值到illegactForm
    toIllegactForm(index, val) {
      this.illegactForm[index] = val
    },
    // 步骤对应意见记录
    showStepTab(stepNo) {
      getStepTableList(this.tasklistid, stepNo).then(res => {
        if (res.code === 0) {
          this.stepTabList = res.data
        }
      })
    },
    stepControl(active) {
      for (let i = 0; i <= active; i++) {
        this.stepDisable.push(false)
      }
      for (let i = active + 1; i <= 5; i++) {
        this.stepDisable.push(true)
      }
    },
    // 预览文书界面
    getContent() {
      this.showReport = !this.showReport
    },
    // 编辑违法记录
    handleEdit(row) {
      this.$set(row, 'edit', true)
    },
    // 查看违法记录
    handleShow(row) {
      this.$set(row, 'showAll', true)
    },
    // 取消
    handleOff(row) {
      this.$set(row, 'edit', false)
      this.$set(row, 'showAll', false)
    },
    // 删除违法列表记录
    deleteRow(index, rows) {
      this.$confirm('是否确认删除', '提示').then(() => {
        rows.splice(index, 1)
      })
    },
    // 处理tabs点击事件
    handleTabClick(tab, event) {
      // // 查看立案审批表
      if (tab.name === 'first') {
        this.getCaseInfo()
      }
      // 查看线索录入信息
      if (tab.name === 'second') {
        getClueByTaskListid(this.tasklistid).then((res) => {
          if (res.code === 0) {
            this.clueInfo = res.data
          }
        })
      }
      // 加载当前步骤流程跟踪
      if (tab.name === 'fifth') {
        this.showStepTab(this.active_top + '')
      }
    },
    // 重置表单
    resetForm(formName) {
      this.$refs[formName].resetFields()
    },

    // 案件提交抽取
    submitForm() {
      // 意见isagree必传
      this.$confirm('确认结束流程？', '提示').then(() => {
        this.caseForm.bizseq = this.bizseq
        this.caseForm.workflowid = this.workflowid

        this.caseForm.tasklistid = this.tasklistid
        this.caseForm.nextPerformerids = this.user.primaryKey
        this.caseForm.nextPerformerNames = this.user.username
        this.caseForm.nextNodeID = 'endRevoke'
        bizRevNext(this.caseForm).then((res) => {
          if (res.code === 0) {
            this.$message.success('提交成功')
            this.$router.back()
          } else {
            this.$message.error(res.msg)
          }
        })
      })
    },
    // 上传模板格式Excel之前校验
    beforeUpload(file) {
      this.uploadLoading = true
      return new Promise((resolve, reject) => {
        var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1)
        const extension = testmsg === 'xls'
        const extension2 = testmsg === 'xlsx'
        if (!extension && !extension2) {
          this.uploadLoading = false
          this.$message({
            message: '上传文件只能是 xls、xlsx格式！',
            type: 'warning'
          })
          reject()
        }
        // 大小判断
        const isLt10M = file.size / 1024 / 1024 < 10
        if (!isLt10M) {
          this.uploadLoading = false
          this.$message({
            message: '上传文件大小不能超过 10MB！',
            type: 'warning'
          })
          reject()
        }
        if ((extension || extension2) && isLt10M) {
          templateValid(file, 'company').then(res => {
            if (res.code === 0) {
              resolve()
            } else {
              this.uploadLoading = false
              this.$message({
                message: '上传文件模板参数格式有误，请下载指定模板重新上传！',
                type: 'warning'
              })
              reject()
            }
          })
        }
      })
    },
    // 上传文件之前校验格式为 ".doc,.docx,.xlsx,.xls,.pdf"
    beforeFileUpload(file) {
      var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1)
      const isExcel = testmsg === 'xls' || testmsg === 'xlsx'
      const isDoc = testmsg === 'doc' || testmsg === 'docx'
      const isPdf = testmsg === 'pdf'

      const isLt10M = file.size / 1024 / 1024 < 10

      if (!isExcel && !isDoc && !isPdf) {
        this.$message.error('不支持该上传格式!')
      }
      if (!isLt10M) {
        this.$message.error('上传附件大小不能超过 10MB!')
      }
      return (isExcel || isDoc || isPdf) && isLt10M
    },
    // 移除文件前
    beforeRemove(file, fileList) {
      if (file && file.status === 'success') {
        return this.$confirm(`确定移除 ${file.name} ？`)
      }
    },
    handleCheckChange(data, checked, indeterminate) {
      // console.log(data, checked, indeterminate);
    },
    commonUploadCallback(res, file) {
      if (res.code === 0) {
        file.id = res.data.attachmentid
        this.$message.success('上传成功')
        this.getAttachmentList(this.subActiveName3)
      } else {
        this.$message.error(res.msg)
      }
    },
    // 移除文件回调
    remFileCallback(file) {
      if (file && file.status === 'success') {
        removeAttachementById(file.id).then((res) => {
          if (res.code === 0) {
            this.$message.success('删除成功')
          } else {
            this.$message.error(res.msg)
          }
        })
      }
    },
    btnRemoveAttachementById(row) {
      this.$confirm(`确定删除 ${row.filename} ？`).then(() => {
        removeAttachementById(row.attachmentid).then((res) => {
          if (res.code === 0) {
            this.$message.success('删除成功')
            if (this.activeName === 'fourth') {
              this.getAttachmentList(this.subActiveName3)
            } else if (this.activeName === 'third') {
              this.getSystemAttachmentList()
            }
          } else {
            this.$message.error(res.msg)
          }
        })
      })
    },
    remUploadCallback(res, file) {
      this.uploadLoading = false
      if (res.code === 0) {
        file.id = res.data.attachmentid
        this.remNo = res.data.remNo
        this.$message.success('上传成功')
      } else {
        this.$message.error(res.msg)
      }
    },
    // 上传文件预览
    previewFile(file) {
      window.open(file.url, '_blank')
    },
    // 剔除对话框内搜索
    remReocrdSearch() {
      this.remPageParam.customParamMap.searchCode = this.remSearchForm.searchCode
      this.remPageParam.curPage = 1
      this.getRemRecord()
    },
    // 搜索
    search() {
      this.pageParam.customParamMap.searchCode = this.searchForm.searchCode
      this.pageParam.customParamMap.bizseq = this.bizseq
      this.pageParam.curPage = 1
      this.loadRevListPage()
    },
    // 分页多选插件回调
    removeDelCallback(index, row) {
      this.$refs.revList.toggleRowSelection(row, false)
    },
    // 对话框分页多选插件回调
    removeAddCallback(index, row) {
      this.$refs.dialogTable.toggleRowSelection(row, false)
    },
    // 全选按钮事件
    selectAll() {
      const table = this.$refs.revList
      for (const i in table.data) {
        const each = table.data[i]
        table.toggleRowSelection(each, true)
      }
    },
    // 对话框选项变更事件
    handleSelectionChange_dialog(selectData) {
      const cancel = []
      if (selectData.length !== this.addRevList.length) {
        // 找出没有选中的内容
        this.addRevList.forEach((each) => {
          for (const i in selectData) {
            const atom = selectData[i]
            if (atom.pripid === each.pripid) {
              return
            }
          }
          cancel.push(each)
        })
      }
      // 取消选中的内容
      for (const i in cancel) {
        const each = cancel[i]
        let index
        for (const j in this.selection_dialog) {
          const select = this.selection_dialog[j]
          if (select.pripid === each.pripid) {
            index = parseInt(j)
            break
          }
        }
        if (index !== undefined) {
          this.selection_dialog.splice(index, 1)
        }
      }
      // 增加选中内容
      for (const i in selectData) {
        const each = selectData[i]
        let exist = false
        for (const j in this.selection_dialog) {
          const select = this.selection_dialog[j]
          if (select.pripid === each.pripid) {
            exist = true
            break
          }
        }
        if (!exist) {
          this.selection_dialog.push(each)
        }
      }
    },
    // 选项变更事件
    handleSelectionChange(selectData) {
      const cancel = []
      if (selectData.length !== this.revList.length) {
        // 找出没有选中的内容
        this.revList.forEach((each) => {
          for (const i in selectData) {
            const atom = selectData[i]
            if (atom.pripid === each.pripid) {
              return
            }
          }
          cancel.push(each)
        })
      }
      // 取消选中的内容
      for (const i in cancel) {
        const each = cancel[i]
        let index
        for (const j in this.toDelSelection) {
          const select = this.toDelSelection[j]
          if (select.pripid === each.pripid) {
            index = parseInt(j)
            break
          }
        }
        if (index !== undefined) {
          this.toDelSelection.splice(index, 1)
        }
      }
      // 增加选中内容
      for (const i in selectData) {
        const each = selectData[i]
        let exist = false
        if (each.isRemove !== '1') {
          for (const j in this.toDelSelection) {
            const select = this.toDelSelection[j]
            if (select.pripid === each.pripid) {
              exist = true
              break
            }
          }
          if (!exist) {
            this.toDelSelection.push(each)
          }
        }
      }
    },
    // 当前分页改变
    pageIndexChange(curPage) {
      this.pageParam.curPage = curPage
      this.loadRevListPage()
    },
    // 新增对话框当前分页改变
    pageIndexChange_dialog(curPage) {
      this.pageParam_dialog.curPage = curPage
      this.loadAddRevListPage()
    },
    // 剔除记录对话框当前分页改变
    remRecordPageIndexChange(curPage) {
      this.remPageParam.curPage = curPage
      this.getRemRecord()
    },
    // 分页大小改变
    pageSizeChange(pageSize) {
      this.pageParam.pageSize = pageSize
      this.loadRevListPage()
    },
    // 加载拟吊销主体分页
    loadRevListPage() {
      if (this.loading) return
      this.loading = true
      this.pageParam.customParamMap.bizseq = this.bizseq
      this.pageParam.customParamMap.searchCode = this.searchForm.searchCode
      getBizRevListPage(this.pageParam).then((res) => {
        this.loading = false
        const list = []
        let i = 1
        const pageStart =
          (this.pageParam.curPage - 1) * this.pageParam.pageSize
        res.data.records.forEach((each) => {
          each.index = pageStart + i++
          each.uniscid = each.uniscid || each.regno
          list.push(each)
        })
        this.revList = list
        this.pageParam.total = res.data.total
      })
    }
  }

}
</script>
<style lang="scss" scoped>
.revoke {
  padding: 5pt;
  .content-header {
    background: white;

    .body {
      padding: 20px;
      border: 1px solid #eee;
      border-top: none;
      margin-bottom: 20px;
    }
  }
  .header{
    margin-bottom: 40px;
  }
  .content-body_out {
    background: rgb(238, 240, 238);
  }
  .body_out {
    padding: 10px;
    border: 1px solid #eee;
    border-top: none;
    margin-bottom: 20px;
  }
  .content-body {
    background: white;
    .tab {
      .tab-title {
        label {
          display: inline-block;
        }
      }
    }
    .form {
      margin-bottom: 20pt;
      .btn-box {
        text-align: center;
        padding: 10px;
        margin-top: 0;
        font-size:$table-content-font-size;
        p {
          font-size:$table-content-font-size;
        }
        /* border-right: 1px solid $color-border; */
        /* border-left: 1px solid $color-border; */
      }
      .scale {
        background-color: white;
        border: 1px solid $color-border;
      }
    }
  }
  .step {
    // height: 90px;
    padding: 10px 10px;
    border: 1px solid #eee;
    margin-bottom: 10px;
  }
  .label-name {
    text-align: right;
    display: inline-block; //转成行内快，才可定义宽度
    width: 250px;
    font-size:$table-title-font-size;
  }
  .search-input-box {
    display: flex;
    align-items: center;
  }
  .header_out {
    background: white;
    height: 40px;
    .title {
      font-weight: 600;
      //   font-size: $font-size-sub-title;
    }
  }
  .header {
    background-color: white;
    line-height: 32px;
    padding: 5px;
    .title {
      font-weight: 700;
      font-size: 1.2rem;
    }
  }
  .page-box {
    margin: 10px;
    text-align: right;
  }
  .mb10 {
    margin-bottom: 10px;
  }
  .btn-box {
    display: inline-block;
    padding-left: 10px;
    margin-top: 10px;
  }
  .back-btn {
    margin-top: 4px;
    position: absolute;
    right: 40pt;
  }
  .doc_box {
    height: 80px;
    background-color: $color-form-label;
    .el-checkbox {
      padding: 10px;
      display: block;
    }
  }
  .table_box {
    background-color: $color-form-label;
    padding: 30px 60px;
  }
  .tab_pane {
    .el-row {
      padding: 15px 10px;
    }
  }
  .dialog-box {
    text-align: right;
    padding: 5px 5px;
  }
  div.label{
    margin:15px 10px;
    border: 1px solid $color-border;
    background: #eee;
    padding:10px 5px
  }
  .mini-btn{
    padding: 3px 15px;
  }

}
/deep/.tab-card.el-tabs--border-card{
  border:0!important;
  box-shadow: 0 0 0 0!important;
}
</style>
<style lang="scss">
.revoke {
  .removeUpload{
    .el-upload-list__item{
      display: inline-block;
      width: auto;
    }
  }
  .handle-dialog.mid>.main-dialog{
    min-height: 300px;
    width: 75vw;
  }
  .no_border {
    .el-step__icon.is-text {
      border: none;
    }
  }
  .clueForm {
    margin-top: 10px;
    .el-form-item__content {
      width: calc(100% - 180px);
      .custom {
        width: 100%;
        display: inline-block;
      }
      .el-date-editor.el-input {
        width: 100%;
        display: inline-block;
      }
    }
  }
  .baseinfoForm {
    .tab {
      .tab-title {
        label {
          background: $color-primary;
          display: inline-block;
          color: $color-title-color;
          padding: 5px;
        }
      }
    }
    .el-row {
      padding-top: 10px;
    }
    .el-form-item {
      margin-bottom: 0;
      background: $color-form-label;
      .el-form-item__label {
        padding-left: 20px;
      }
      .el-form-item__content {
        font-size: unset;
        // line-height: normal;
        background: white;
      }
    }

    .el-input.is-disabled .el-input__inner {
      color: unset;
    }
    .el-textarea.is-disabled .el-textarea__inner {
      color: unset;
    }
  }
  .caseForm {
    .el-form-item {
      margin-bottom: 0;
      background: $color-form-label;
      .el-form-item__label {
        padding-left: 20px;
        border-top: 1px solid $color-border;
        border-left: 1px solid $color-border;
        font-size: $table-content-font-size;
      }
      .el-form-item__content {
        padding-left: 10px;
        font-size: unset;
        // line-height: normal;
        background: white;
        border-right: 1px solid $color-border;
        border-left: 1px solid $color-border;
        font-size: $table-content-font-size;
      }
      .el-form-item__error{
        position: unset;
      }
    }

    .scale .el-form-item .el-form-item__content {
        padding-left: 0;
      }
    .el-row:first-child{
      .el-col:nth-of-type(1),.el-col:nth-of-type(2){
        .el-form-item__content{
          border-top: 1px solid $color-border;
        }
      }
    }
    .el-form-item:last-child {
      border-bottom: 1px solid $color-border;
    }
    .form-body.history {
      padding: 15px;
      border: 1px solid $color-border;
      font-size:$table-content-font-size;
    }
  }
  .showApart{
    width: 80px;
    overflow: hidden;
    white-space: nowrap;
  }
  // .el-textarea__inner{
  //   padding: 0;
  // }
  .step-btn{
    padding: 0px 0px 5px 0px;
    color: unset;
  }
  .step-btn:hover{
    color: #1A77FF;
    border-bottom: 1px solid #1A77FF;
  }
  .step-btn.is-disabled:hover{
    color: #C0C4CC;
    border-bottom: none;
  }
  .showAll{

  }
  .illegactForm{
    .el-form-item .el-form-item__content{
      padding-left: 0px;
    }
  }
  .remFileDialog{
    .el-dialog__body {
      padding: 0px 20px;
    }
  }
}
</style>
