<template>
  <div class="main-content m20">
    <!--头部-查询-->
    <div class="content-header">
      <div class="body search-body">
        <el-row class="mb10">
          <el-col :span="12">
            <el-row>
              <label class="label-name_1">受理编号：</label>
              <div class="search-input-box_1">
                <el-input v-model="searchForm.acceptno" clearable type="text" class="search-input" placeholder="请输入受理编号" @keyup.enter.native="search" />
              </div>
            </el-row>
          </el-col>
          <el-col :span="12">
            <el-row>
              <label class="label-name_2">企业名称：</label>
              <div class="search-input-box_2">
                <el-input v-model="searchForm.searchName" clearable type="text" class="search-input" placeholder="请输入名称（精确）" @keyup.enter.native="search" />
              </div>
            </el-row>
          </el-col>
        </el-row>
        <el-row v-if="showMore" style="margin-bottom:10px">
          <el-row style="margin-bottom:10px">
            <el-col :span="12">
              <el-row>
                <label class="label-name_3">业务类型：</label>
                <el-select
                  v-model="searchForm.busType"
                  clearable
                  class="custom"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in bustypeOptions"
                    :key="item.label"
                    :label="item.label"
                    :value="item.value"
                  />
                </el-select>
              </el-row>
            </el-col>
            <el-col :span="12">
              <el-row>
                <label class="label-name_1">注册号/统一码：</label>
                <div class="search-input-box_1">
                  <el-input v-model="searchForm.uniscid" clearable type="text" class="search-input" placeholder="请输入注册号/统一码" @keyup.enter.native="search" />
                </div>
              </el-row>
            </el-col>
          </el-row>
          <el-row style="margin-bottom:10px">
            <el-col :span="12">
              <el-row>
                <label class="label-name_1">办理机关：</label>
                <el-select v-model="searchForm.orgNumber" clearable size="mini" placeholder="请选择" class="custom">
                  <el-option
                    v-for="item in orgList"
                    :key="item.orgNumber"
                    :label="item.orgUnitName"
                    :value="item.orgNumber"
                  />
                </el-select>
              </el-row>
            </el-col>
            <el-col :span="12">
              <el-row>
                <label class="label-name_3">发送时间：</label>
                <el-date-picker
                  v-model="searchForm.searchDate"
                  size="mini"
                  value-format="yyyy-MM-dd"
                  type="daterange"
                  range-separator="至"
                  start-placeholder="开始日期"
                  end-placeholder="结束日期"
                  class="custom"
                />
              </el-row>
            </el-col>
          </el-row>
<!--          <el-row style="margin-bottom:10px">-->
<!--            <el-col :span="12">-->
<!--              <label class="label-name_3">业务状态：</label>-->
<!--              <el-select v-model="searchForm.busStatus" clearable size="mini" class="custom" placeholder="请选择">-->
<!--                <el-option-->
<!--                  v-for="item in busstatusOptions"-->
<!--                  :key="item.label"-->
<!--                  :label="item.label"-->
<!--                  :value="item.value"-->
<!--                />-->
<!--              </el-select>-->
<!--            </el-col>-->
<!--          </el-row>-->
        </el-row>

        <el-col :span="6" :offset="1">
          <div class="btn-box" style="font-size: 14px">
            <span v-if="!showMore" style="margin-right:20px;color:#409EFF;cursor:pointer" @click="showMoreCriteria">
              展开<i class="el-icon-d-arrow-right" />
            </span>
            <span v-if="showMore" style="margin-right:20px;color:#409EFF;cursor:pointer" @click="showMoreCriteria">
              <i class="el-icon-d-arrow-left" />隐藏
            </span>
            <el-button size="mini" type="primary" @click="search" :loading="loading">查询</el-button>
            <el-button size="mini" @click="searchForm.acceptno = '';searchForm.searchName='';searchForm.reportYear='';searchForm.busType='';searchForm.uniscid='';searchForm.busStatus=''">重置</el-button>
          </div>
        </el-col>
      </div>
    </div>
    <!--body-查询结果-->
    <div class="content-body">
      <!-- <div class="header">
        <span class="title">查询业务</span>
      </div> -->
      <div class="body">
        <el-radio-group v-model="tabPosition" style="margin-bottom: 30px;margin-left: 30px">
          <el-radio-button label="current">当前记录</el-radio-button>
          <el-radio-button label="history">历史记录</el-radio-button>
        </el-radio-group>
        <el-table
          v-if="tabPosition === 'current'"
          ref="multipleTable"
          v-loading="loading"
          :data="tableData"
          tooltip-effect="dark"
          style="width: 95%;margin:0 auto"
          :fit="true"
          :row-class-name="tableRowClassName"
          :header-cell-style="{background:'#8cc3fb',color:'#fff'}"
          @selection-change="handleSelectionChange"
        >
          <el-table-column prop="index" label="序号" min-width="30" align="center" />
          <el-table-column prop="acceptno" label="受理编号" min-width="90" align="left" />
          <el-table-column prop="busname" :show-overflow-tooltip="true" label="业务名称" min-width="120" align="left" />
          <el-table-column prop="busTypeName" label="业务类型" min-width="100" align="left" />
          <el-table-column prop="busStatusName" label="业务状态" min-width="60" align="left" />
          <el-table-column prop="signloginname" label="接收人" min-width="50" align="left" />
          <el-table-column prop="xzqh" label="受理单位" min-width="120" align="left" />
          <el-table-column prop="signtime" label="受理时间" min-width="60" align="left" />
          <el-table-column prop="sendertime" label="发送时间" min-width="60" align="left" :formatter="dateFormat" />
          <el-table-column prop="sendername" label="发送人" min-width="50" align="left" />
          <el-table-column label="操作" min-width="120" align="left">
            <template slot-scope="scope">
              <el-button type="primary" size="mini" @click="showInfo(scope.row)">查看</el-button>
            </template>
          </el-table-column>
        </el-table>
        <div class="page-box" v-if="tabPosition === 'current'">
          <el-pagination
            :disabled="loading"
            :page-size="pageParam.pageSize"
            :total="pageParam.total"
            :current-page="pageParam.curPage"
            :page-sizes="[10, 20, 30, 40,50,100,200]"
            layout="slot,total, sizes, prev, pager, next, jumper"
            @size-change="pageSizeChange"
            @current-change="pageIndexChange"
          >
            <!-- <batchFunction :options="options" style="float:left" /> -->
            <span>
              第 {{ pageParam.curPage }} 页 /
              共 {{ (pageParam.total !== 0 ? parseInt((pageParam.total + pageParam.pageSize - 1)/pageParam.pageSize) : 1) }} 页
            </span>
          </el-pagination>
        </div>

        <el-table
          v-if="tabPosition === 'history'"
          ref="multipleTable"
          v-loading="historyloading"
          :data="historyData"
          tooltip-effect="dark"
          style="width: 95%;margin:0 auto"
          :fit="true"
          :row-class-name="tableRowClassName"
          :header-cell-style="{background:'#8cc3fb',color:'#fff'}"
          @selection-change="handleSelectionChange"
        >
          <el-table-column prop="index" label="序号" min-width="30" align="center" />
          <el-table-column prop="acceptno" label="受理编号" min-width="90" align="left" />
          <el-table-column prop="busname" :show-overflow-tooltip="true" label="业务名称" min-width="120" align="left" />
          <el-table-column prop="busTypeName" label="业务类型" min-width="100" align="left" />
          <el-table-column prop="busStatusName" label="业务状态" min-width="60" align="left" />
          <el-table-column prop="signloginname" label="接收人" min-width="50" align="left" />
          <el-table-column prop="xzqh" label="受理单位" min-width="120" align="left" />
          <el-table-column prop="signtime" label="受理时间" min-width="60" align="left" />
          <el-table-column prop="sendertime" label="发送时间" min-width="60" align="left" :formatter="dateFormat" />
          <el-table-column prop="sendername" label="发送人" min-width="50" align="left" />
          <el-table-column label="操作" min-width="120" align="left">
            <template slot-scope="scope">
              <el-button type="primary" size="mini" @click="showInfo(scope.row)">查看</el-button>
            </template>
          </el-table-column>
        </el-table>
        <div class="page-box" v-if="tabPosition === 'history'">
          <el-pagination
            :disabled="historyloading"
            :page-size="pageParamhistory.pageSize"
            :total="pageParamhistory.total"
            :current-page="pageParamhistory.curPage"
            :page-sizes="[10, 20, 30, 40,50,100,200]"
            layout="slot,total, sizes, prev, pager, next, jumper"
            @size-change="historyPageSizeChange"
            @current-change="historyPageIndexChange"
          >
            <!-- <batchFunction :options="options" style="float:left" /> -->
            <span>
              第 {{ pageParamhistory.curPage }} 页 /
              共 {{ (pageParamhistory.total !== 0 ? parseInt((pageParamhistory.total + pageParamhistory.pageSize - 1)/pageParamhistory.pageSize) : 1) }} 页
            </span>
          </el-pagination>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { businessQuery, queryAllOrg, queryOldeBusness } from '@/api/comprehensive'
import { isPassDissentApply } from '@/api/abnormal'
export default {
  data() {
    return {
      tabPosition: 'current',
      currentData: [],
      historyData: [],
      historyloading: false,
      orgList: [],
      showMore: false,
      searchNameP: '',
      busyTypes: [],
      searchForm: {
        uniscid: '',
        acceptno: '',
        searchName: '',
        busType: '',
        busStatus: '',
        searchDate: '',
        orgNumber: ''
      },
      loading: false,
      tableData: [],
      busstatusOptions: [{
        value: '1',
        label: '待受理'
      }, {
        value: '2',
        label: '待审核'
      }, {
        value: '3',
        label: '待审批'
      }, {
        value: '4',
        label: '审批通过'
      }, {
        value: '5',
        label: '审批不通过'
      }, {
        value: '6',
        label: '材料补正'
      }, {
        value: '7',
        label: '作废办结'
      }],
      bustypeOptions: [{
        value: '71',
        label: '企业地址批量列入'
      }, {
        value: '72',
        label: '个体户地址批量列入'
      }, {
        value: '73',
        label: '农合地址批量列入'
      }, {
        value: '5',
        label: '企业异常名录列入'
      }, {
        value: '6',
        label: '企业异常名录异议'
      }, {
        value: '7',
        label: '企业异常名录移出'
      }, {
        value: '11',
        label: '个体工商户标记'
      }, {
        value: '12',
        label: '个体工商户恢复'
      }, {
        value: '13',
        label: '农民专业合作社列入'
      }, {
        value: '14',
        label: '农民专业合作社移出'
      }, {
        value: '15',
        label: '严重违法失信列入'
      }, {
        value: '16',
        label: '严重违法失信异议'
      },
      {
        value: '27',
        label: '行政处罚修复'
      },
      {
        value: '33',
        label: '严重违法信用修复'
      }, {
        value: '61',
        label: '联合惩戒锁定'
      }, {
        value: '62',
        label: '联合惩戒解锁'
      }, {
        value: '31',
        label: '撤销登记案件'
      }, {
        value: '40',
        label: '列异勘误'
      }, {
        value: '41',
        label: '列严勘误'
      }, {
        value: '42',
        label: '批量吊销勘误'
      }],
      user: JSON.parse(sessionStorage.getItem('user')),
      pageParam: {
        customParamMap: {},
        curPage: 1,
        total: 0,
        pageSize: 10
      },
      pageParamhistory: {
        customParamMap: {},
        curPage: 1,
        total: 0,
        pageSize: 10
      },
      exportQueryData: {}, // 导出excel的查询条件, 用于导出excel和分页, 每轮查询成功后赋值--当前记录
      exportQueryOldData: {}, // 导出excel的查询条件, 用于导出excel和分页, 每轮查询成功后赋值--历史记录
    }
  },
  mounted() {
    // 加载办理机关
    this.getOrgList()
    this.getCache()
    // this.loadPage()
  },
  methods: {
    getOrgList() {
      queryAllOrg().then(res => {
        if (res.code === 0) {
          res.data.forEach(each => {
            this.orgList.push(each)
          })
        }
      })
    },
    getCache() {
      const pageParam = sessionStorage.getItem('pageParam-zhcx')
      const tableData = sessionStorage.getItem('tableData-zhcx')
      if (pageParam) {
        this.pageParam = JSON.parse(pageParam)
        this.searchForm = this.pageParam.customParamMap
      }
      if (tableData) {
        this.tableData = JSON.parse(tableData)
      }
    },
    showMoreCriteria() {
      this.showMore = !this.showMore
    },
    dateFormat(row) {
      if (this.$util.isEmpty(row.sendertime)) return ''
      return this.$util.formatDate.format(new Date(Date.parse(row.sendertime)), 'yyyy-MM-dd')
    },
    tableRowClassName({ row, rowIndex }) {
      if (rowIndex % 2 === 1) {
        return 'warning-row'
      }
    },
    // 公示提示
    tip() {
      return this.$message.error('该主体公示中')
    },
    gotoPrintNotice(row) {
      this.$router.push({ path: '/abnormal/company/dissent/ApplyNoticePrint', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
    },
    // 搜索
    search() {
      this.pageParam.customParamMap = this.searchForm
      // 判断是否填写了条件
      let flag = false
      // obj的遍历
      Object.keys(this.pageParam.customParamMap).forEach(key => {
        if (key === 'userId' ){
        } else {
          if (this.pageParam.customParamMap[key] !== '' && this.pageParam.customParamMap[key] !== null) {
            flag = true
          }
        }
      })
      if (!flag) {
        this.$message({
          message: '请至少填写一个查询条件！',
          type: 'warning'
        })
        return
      }
      this.exportQueryData = null
      this.exportQueryOldData = null
      this.pageParam.curPage = 1
      this.loadPage()
      // sessionStorage.setItem('pageParam-zhcx', JSON.stringify(this.pageParam))
      // sessionStorage.setItem('tableData-zhcx', JSON.stringify(this.tableData))
    },
    // 分页多选插件回调
    removeCallback(index, row) {
      this.$refs.multipleTable.toggleRowSelection(row, false)
    },
    // 全选按钮事件
    selectAll() {
      const table = this.$refs.multipleTable
      for (const i in table.data) {
        const each = table.data[i]
        table.toggleRowSelection(each, true)
      }
    },
    // 选项变更事件
    handleSelectionChange(selectData) {
      const cancel = []
      if (selectData.length !== this.tableData.length) {
        // 找出没有选中的内容
        this.tableData.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) {
          const select = this.selection[j]
          if (select.pripid === each.pripid) {
            index = parseInt(j)
            break
          }
        }
        if (index !== undefined) {
          this.selection.splice(index, 1)
        }
      }
      // 增加选中内容
      for (const i in selectData) {
        const each = selectData[i]
        let exist = false
        for (const j in this.selection) {
          const select = this.selection[j]
          if (select.pripid === each.pripid) {
            exist = true
            break
          }
        }
        if (!exist) {
          this.selection.push(each)
        }
      }
    },
    // 当前分页改变
    pageIndexChange(curPage) {
      this.pageParam.curPage = curPage
      this.loadPage()
    },
    // 分页大小改变
    pageSizeChange(pageSize) {
      this.pageParam.pageSize = pageSize
      this.loadPage()
    },
    // 当前分页改变
    historyPageIndexChange(curPage) {
      this.pageParamhistory.curPage = curPage
      this.loadPage()
    },
    // 分页大小改变
    historyPageSizeChange(pageSize) {
      this.pageParamhistory.pageSize = pageSize
      this.loadPage()
    },
    // 加载分页
    loadPage() {
      if (this.loading) return
      this.loading = true
      this.historyloading = true
      this.pageParam.customParamMap.userId = this.user.primaryKey
      let data = {}
      if(this.exportQueryData && JSON.stringify(this.exportQueryData) != "{}"){
        this.exportQueryData.curPage = this.pageParam.curPage
        this.exportQueryData.pageSize = this.pageParam.pageSize
        data = JSON.parse(JSON.stringify(this.exportQueryData))
      }else{
        data = JSON.parse(JSON.stringify(this.pageParam))
      }
      businessQuery(data).then(res => {
        this.loading = false
        this.exportQueryData = JSON.parse(JSON.stringify(data))
        console.log(this.exportQueryData)
        const list = []
        let i = 1
        const pageStart = (this.pageParam.curPage - 1) * this.pageParam.pageSize
        res.data.records.forEach(each => {
          each.index = pageStart + i++
          each.busTypeName = this.$util.getTaskBusinessTypeName(each.bustype)
          each.busStatusName = this.$util.getTaskNodeName(each.currentNodeOrBizStatus)
          each.isPassDissentApply = false
          if (each.bustype === '6') {
            isPassDissentApply(each.bustype, each.bizseqid).then(res => {
              each.isPassDissentApply = res.data.isPass
              each.acceptstat = res.data.acceptstat
              // 若通过受理审批环节且不同意 当前业务状态：不予受理
              if (each.isPassDissentApply === true && each.acceptstat === '0') {
                each.busStatusName = '不予受理'
              }
            })
          }
          list.push(each)
        })
        this.tableData = list
        this.pageParam.total = res.data.total
        sessionStorage.setItem('pageParam-zhcx', JSON.stringify(this.pageParam))
        sessionStorage.setItem('tableData-zhcx', JSON.stringify(this.tableData))
        if (this.searchForm.searchName !== '') {
          this.searchNameP = this.searchForm.searchName
        } else {
          this.searchNameP = ''
        }
      })
      this.pageParamhistory.customParamMap = this.pageParam.customParamMap
      let historyData = {}
      if(this.exportQueryOldData && JSON.stringify(this.exportQueryOldData) != "{}" ){
        this.exportQueryOldData.curPage = this.pageParamhistory.curPage
        this.exportQueryOldData.pageSize = this.pageParamhistory.pageSize
        historyData = JSON.parse(JSON.stringify(this.exportQueryOldData))
      }else{
        historyData = JSON.parse(JSON.stringify(this.pageParamhistory))
      }
      queryOldeBusness(historyData).then(res => {
        this.historyloading = false
        this.exportQueryOldData = JSON.parse(JSON.stringify(historyData))
        const list = []
        let i = 1
        const pageStart = (this.pageParamhistory.curPage - 1) * this.pageParamhistory.pageSize
        res.data.records.forEach(each => {
          each.index = pageStart + i++
          each.busTypeName = this.$util.getTaskBusinessTypeName(each.bustype)
          each.busStatusName = this.$util.getTaskNodeName(each.currentNodeOrBizStatus)
          each.isPassDissentApply = false
          list.push(each)
        })
        this.historyData = list
        this.pageParamhistory.total = res.data.total
      })
    },
    // 查看详情跳转
    showInfo(row) {
      console.log(row)
      if (this.searchNameP === '') {
        switch (row.bustype) {
          // 撤销案件-录入处理结果
          case '81': {
           this.$router.push({ path: '/cancel/easyTFraud/easyResultApproval', query: { bizseq: row.bizseqid, currentNode: row.currentNodeOrBizStatus, workflowId: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
            break
          }
          // 地址异常名录列入
          case '71': this.$router.push({ path: '/abnormal/company/inclusion/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
            break
          // 异常名录列入
          case '5': this.$router.push({ path: '/abnormal/company/inclusion/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
            break
          // 异常名录异议
          case '6':
          case '20':
            if (row.lastNode === 'acceptDissentEnter' || row.lastNode === 'handleDissentAccept') {
              this.$router.push({ path: '/abnormal/company/dissent/applyInfo', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, acceptstat: row.acceptstat }})
            } else {
              this.$router.push({ path: '/abnormal/company/dissent/approveInfo', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, acceptstat: row.acceptstat }})
            }
            break
          // 异常名录移出
          // case '7': this.$router.push({ path: '/abnormal/company/remove/RemoveExamine', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, onlyShow: true }})
          case '7': this.$router.push({ path: '/abnormal/company/repairInfo', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
            break
          // 个体工商户地址批量列入
          case '72': this.$router.push({ path: '/abnormal/individual/mark/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
            break
          // 个体工商户标记
          case '11': this.$router.push({ path: '/abnormal/individual/mark/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
            break
          // 个体工商户恢复
          case '12': this.$router.push({ path: '/abnormal/company/repairInfo', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
            break
          // 农民专业合作社列入
          case '73': this.$router.push({ path: '/abnormal/agriculture/inclusion/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
            break
          // 农民专业合作社列入
          case '13': this.$router.push({ path: '/abnormal/agriculture/inclusion/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
            break
          // 农民专业合作社移出
          case '14': this.$router.push({ path: '/abnormal/company/repairInfo', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
            break
          // 严重违法列入
          case '15': this.$router.push({ path: '/illegal/listed/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
            break
          // 严重违法异议
          case '16': this.$router.push({ path: '/illegal/dissent/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
            break
          // 严重违法移出
          case '17': this.$router.push({ path: '/illegal/remove/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
            break
          // 严重违法拟列入
          case '55': this.$router.push({ path: '/illegal/inclusion/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
            break
          // 冒用他人身份
          case '31': {
            // const day = this.$util.DateDiff(row.signtime)
            // if (row.currentNodeOrBizStatus === 'cancelShow' && day < 46) return this.$message.warning('主体公示中,剩' + (45 - day) + '天期满才可操作')
            // this.$router.push({ path: '/cancel/' + (row.currentNodeOrBizStatus === 'startAccept' ? 'cancelTodo' : row.currentNodeOrBizStatus === 'handleCancel' ? 'cancelCheck' : row.currentNodeOrBizStatus === 'approvalCancel' ? 'cancelPass' : row.currentNodeOrBizStatus === 'resultAddEnter' || row.currentNodeOrBizStatus === 'cancelShow' ? 'resultAccept' : row.currentNodeOrBizStatus === 'handleResultAdd' ? 'resultReview' : 'resultExamine'), query: { bizseq: row.bizseqid, currentNode: row.currentNodeOrBizStatus, workflowId: row.workflowid, tasklistid: row.tasklistid, onlyShow: true }})
            this.$router.push({ path: '/cancel/cancelInfo', query: { bizseq: row.bizseqid, currentNode: row.currentNodeOrBizStatus, workflowId: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true', currentNodeOrBizStatus: row.currentNodeOrBizStatus }})
            break
          }
          // 批量吊销
          case '51':
            const bizStatus = row.currentNodeOrBizStatus

            switch (row.currentNodeOrBizStatus) {
            // active_top: 1 立案审批环节
              case '1': this.$router.push({ path: '/revoke/register/accept', query: { active_top: 1, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '2': this.$router.push({ path: '/revoke/register/review', query: { active_top: 1, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '3': this.$router.push({ path: '/revoke/register/examine', query: { active_top: 1, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              // active_top: 2 调查与听证环节
              case '4': this.$router.push({ path: '/revoke/investigate/accept', query: { active_top: 2, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '8': this.$router.push({ path: '/revoke/hearing/review', query: { active_top: 2, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '9': this.$router.push({ path: '/revoke/hearing/examine', query: { active_top: 2, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '24': this.$router.push({ path: '/revoke/hearing/review', query: { active_top: 2, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '25': this.$router.push({ path: '/revoke/hearing/review', query: { active_top: 2, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '26': this.$router.push({ path: '/revoke/hearing/review', query: { active_top: 2, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              // active_top: 4 决定环节
              case '10': this.$router.push({ path: '/revoke/decision/accept', query: { active_top: 3, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '11': this.$router.push({ path: '/revoke/decision/review', query: { active_top: 3, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '12': this.$router.push({ path: '/revoke/decision/department', query: { active_top: 3, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '27': this.$router.push({ path: '/revoke/decision/department', query: { active_top: 3, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '28': this.$router.push({ path: '/revoke/decision/department', query: { active_top: 3, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '29': this.$router.push({ path: '/revoke/decision/department', query: { active_top: 3, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '13': this.$router.push({ path: '/revoke/decision/examine', query: { active_top: 3, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              // active_top: 5 送达与结束环节
              case '14': this.$router.push({ path: '/revoke/send/accept', query: { active_top: 5, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '15': this.$router.push({ path: '/revoke/send/review', query: { active_top: 5, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '16': this.$router.push({ path: '/revoke/send/examine', query: { active_top: 5, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '22': this.$router.push({ path: '/revoke/noRegister/', query: { bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case 'endRevoke':this.$router.push({ path: '/revoke/send/examine', query: { active_top: 6, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
            }
            break
          // 撤销复议诉讼
          case '52':
            this.$router.push({ path: '/revoke/revokeDetail', query: { handleType: '1', currentNode: row.currentNodeOrBizStatus, bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, onlyShow: true }})
            break
          // 联合惩戒锁定
          case '61': this.$router.push({ path: '/punish/inclusion/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
            break
          // 联合惩戒解锁
          case '62': this.$router.push({ path: '/punish/remove/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
            break
          // 总局一体化平台
          // 列异勘误
          case '40':
            this.$router.push({ path: '/abnormal/corrections/detail', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: '1' }})
            break
          // 列严勘误
          case '41':
            this.$router.push({ path: '/illegal/corrections/detail', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: '1' }})
            break
          // 批量吊销勘误
          case '42':
            this.$router.push({ path: '/revoke/revokeCorrectionsDetail', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
            break
          // 信用修复管理-严重违法信用修复
          case '33':
            this.$router.push({ path: '/comprehensive/creditDetails', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: '1' }})
            break
          case '27':
            this.$router.push({ path: '/remPunish/accept', query: { bizSeq: row.bizseqid, workflowId: row.workflowid, taskId: row.tasklistid, onlyShow: '1' }})
            break
        }
      } else {
        switch (row.bustype) {
          case '27':
            this.$router.push({ path: '/remPunish/accept', query: { bizSeq: row.bizseqid, workflowId: row.workflowid, taskId: row.tasklistid, onlyShow: '1' }})
          break
          // 撤销案件-录入处理结果
          case '81': {
           this.$router.push({ path: '/cancel/easyTFraud/easyResultApproval', query: { bizseq: row.bizseqid, currentNode: row.currentNodeOrBizStatus, workflowId: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
            break
          }
          // 信用修复管理-严重违法信用修复
          case '33':
            this.$router.push({ path: '/comprehensive/creditDetails', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: '1' }})
            break
            // const path = '/crss/#/credit/repair/details' + '?bizseq=' + row.bizseqid + '&workflowid=' + row.workflowid + '&currentNode=' + row.currentNodeOrBizStatus + '&tasklistid=' + row.tasklistid
            // // this.$router.push({ path: '/credit/repair/' + (row.currentNodeOrBizStatus === 'serIllegalEnter' ? 'accept' : row.currentNodeOrBizStatus === 'handleSerIllegal' ? 'review' : 'examine'), query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
            // console.log(path)
            // this.jumpUrl(path)
            // break
          // 异常名录地址批量列入
          case '71': this.$router.push({ path: '/abnormal/company/inclusion/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: this.searchNameP }})
            break
          case '5': this.$router.push({ path: '/abnormal/company/inclusion/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: this.searchNameP }})
            break
          // 异常名录异议
          case '6':
          case '20':
            if (row.lastNode === 'acceptDissentEnter' || row.lastNode === 'handleDissentAccept') {
              this.$router.push({ path: '/abnormal/company/dissent/applyInfo', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, acceptstat: row.acceptstat }})
            } else {
              this.$router.push({ path: '/abnormal/company/dissent/approveInfo', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, acceptstat: row.acceptstat }})
            }
            break
          // 异常名录移出
          case '7': this.$router.push({ path: '/abnormal/company/repairInfo', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: this.searchNameP, type: 'company' }})
            break
          // 个体工商户地址批量列入标记
          case '72': this.$router.push({ path: '/abnormal/individual/mark/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: this.searchNameP }})
            break
          // 个体工商户标记
          case '11': this.$router.push({ path: '/abnormal/individual/mark/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: this.searchNameP }})
            break
          // 个体工商户恢复
          case '12': this.$router.push({ path: '/abnormal/company/repairInfo', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: this.searchNameP, type: 'individual' }})
            break
          // 农民专业合作社地址批量列入
          case '73': this.$router.push({ path: '/abnormal/agriculture/inclusion/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: this.searchNameP }})
            break
          // 农民专业合作社列入
          case '13': this.$router.push({ path: '/abnormal/agriculture/inclusion/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: this.searchNameP }})
            break
          // 农民专业合作社移出
          case '14': this.$router.push({ path: '/abnormal/company/repairInfo', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: this.searchNameP, type: 'farmer' }})
            break
          // 严重违法列入
          case '15': this.$router.push({ path: '/illegal/listed/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid }})
            break
          // 严重违法列入
          case '55': this.$router.push({ path: '/illegal/inclusion/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: this.searchNameP }})
            break
          // 严重违法异议
          case '16': this.$router.push({ path: '/illegal/dissent/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: this.searchNameP }})
            break
          // 严重违法移出
          case '17': this.$router.push({ path: '/illegal/remove/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: this.searchNameP }})
            break
          // 冒用他人身份
          case '31': {
            const day = this.$util.DateDiff(row.signtime)
            // if (row.currentNodeOrBizStatus === 'cancelShow' && day < 46) return this.$message.warning('主体公示中,剩' + (45 - day) + '天期满才可操作')
            // this.$router.push({ path: '/cancel/' + (row.currentNodeOrBizStatus === 'startAccept' ? 'cancelTodo' : row.currentNodeOrBizStatus === 'handleCancel' ? 'cancelCheck' : row.currentNodeOrBizStatus === 'approvalCancel' ? 'cancelPass' : row.currentNodeOrBizStatus === 'resultAddEnter' || row.currentNodeOrBizStatus === 'cancelShow' ? 'resultAccept' : row.currentNodeOrBizStatus === 'handleResultAdd' ? 'resultReview' : 'resultExamine'), query: { bizseq: row.bizseqid, currentNode: row.currentNodeOrBizStatus, workflowId: row.workflowid, tasklistid: row.tasklistid, onlyShow: true, searchName: this.searchNameP }})
            this.$router.push({ path: '/cancel/cancelInfo', query: { bizseq: row.bizseqid, currentNode: row.currentNodeOrBizStatus, workflowId: row.workflowid, tasklistid: row.tasklistid, onlyShow: true, currentNodeOrBizStatus: row.currentNodeOrBizStatus }})
            break
          }
          // 批量吊销
          case '51':
            const bizStatus = row.currentNodeOrBizStatus

            switch (row.currentNodeOrBizStatus) {
            // active_top: 1 立案审批环节
              case '1': this.$router.push({ path: '/revoke/register/accept', query: { active_top: 1, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '2': this.$router.push({ path: '/revoke/register/review', query: { active_top: 1, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '3': this.$router.push({ path: '/revoke/register/examine', query: { active_top: 1, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              // active_top: 2 调查与听证环节
              case '4': this.$router.push({ path: '/revoke/investigate/accept', query: { active_top: 2, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '8': this.$router.push({ path: '/revoke/hearing/review', query: { active_top: 2, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '9': this.$router.push({ path: '/revoke/hearing/examine', query: { active_top: 2, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '24': this.$router.push({ path: '/revoke/hearing/review', query: { active_top: 2, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '25': this.$router.push({ path: '/revoke/hearing/review', query: { active_top: 2, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '26': this.$router.push({ path: '/revoke/hearing/review', query: { active_top: 2, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              // active_top: 4 决定环节
              case '10': this.$router.push({ path: '/revoke/decision/accept', query: { active_top: 3, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '11': this.$router.push({ path: '/revoke/decision/review', query: { active_top: 3, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '12': this.$router.push({ path: '/revoke/decision/department', query: { active_top: 3, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '27': this.$router.push({ path: '/revoke/decision/department', query: { active_top: 3, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '28': this.$router.push({ path: '/revoke/decision/department', query: { active_top: 3, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '29': this.$router.push({ path: '/revoke/decision/department', query: { active_top: 3, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '13': this.$router.push({ path: '/revoke/decision/examine', query: { active_top: 3, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              // active_top: 5 送达与结束环节
              case '14': this.$router.push({ path: '/revoke/send/accept', query: { active_top: 5, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '15': this.$router.push({ path: '/revoke/send/review', query: { active_top: 5, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '16': this.$router.push({ path: '/revoke/send/examine', query: { active_top: 5, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case '22': this.$router.push({ path: '/revoke/noRegister/', query: { bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
              case 'endRevoke':this.$router.push({ path: '/revoke/send/examine', query: { active_top: 6, active: 3, bizStatus: bizStatus, bizseq: row.bizseqid, workflowid: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
                break
            }
            break
          // 撤销复议诉讼
          case '52':
            this.$router.push({ path: '/revoke/revokeDetail', query: { handleType: '1', currentNode: row.currentNodeOrBizStatus, bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, onlyShow: 'true' }})
            break
          // 联合惩戒锁定
          case '61': this.$router.push({ path: '/punish/inclusion/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: this.searchNameP }})
            break
          // 联合惩戒解锁
          case '62': this.$router.push({ path: '/punish/remove/info', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: this.searchNameP }})
            break
          // 总局一体化平台
          // 列异勘误
          case '40':
            this.$router.push({ path: '/abnormal/corrections/detail', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: '1' }})
            break
          // 列严勘误
          case '41':
            this.$router.push({ path: '/illegal/corrections/detail', query: { bizseq: row.bizseqid, workflowId: row.workflowid, tasklistid: row.tasklistid, searchName: '1' }})
            break
        }
      }
    }
  }
}
</script>

<style lang="scss" scoped>
  .main-content{
    background: #fff;
    padding: 10pt;
    .content-header{
      background: white;
      .label-name_1 {
        text-align: right;
        display: inline-block;//转成行内快，才可定义宽度
        width: 140px;
        font-size: $table-content-font-size;
      }
      .search-input-box_1{
        display: inline-block;
        width: calc(100% - 230px);
      }
      .label-name_2 {
        text-align: right;
        display: inline-block;//转成行内快，才可定义宽度
        width: 140px;
        font-size: $table-content-font-size;
      }
      .search-input-box_2{
        display: inline-block;
        width: calc(100% - 230px);
      }
      .label-name_3 {
        text-align: right;
        display: inline-block;//转成行内快，才可定义宽度
        width: 140px!important;
        font-size: $table-content-font-size;
      }
      .custom{
        width: calc(100% - 150px);
      }
      .search-input{
        cursor: pointer;
      }
      .body{
        padding: 20px 0;
        border-top:none;
        margin-bottom: 40PX;
      }
    }
    .content-body{
      background:white
    }
    .header{
      .title{
        font-weight: 600;
        font-size: 1.2rem;
      }
    }
    .page-box{margin:10PX;text-align:right}
    .mb10{
      margin-bottom: 10px;
    }
    .btn-box{
      display: inline-block;
      padding-left: 10px;
    }
  }
  /deep/.el-input__inner{
    height: 28px;
  }
</style>
