<template>
  <div class="main-content abnormal">
    <!-- <div class="content-header"> -->
    <!-- <img src="../../../../assets/images/icon-text.png" alt="" style="width:24px;margin-left:10px"> -->
    <!-- <span class="title">查询结果</span> -->
    <!-- <el-button type="warning" icon="el-icon-caret-left" size="mini" class="back-btn" @click="$router.back()">返回上一层</el-button> -->
    <!-- </div> -->
    <!-- <DetailHead result="查询结果" /> -->
    <div class="content-body">
      <el-form ref="form" :model="form" label-width="150px" label-position="right" :rules="formRules">
        <div class="form">
          <div class="form-body">
            <div v-if="bizList.length === 1" class="tab">
              <div class="tab-title">
                <label>
                  主体信息
                </label>
              </div>
            </div>
            <div class="form-body">
              <el-row v-if="bizList.length === 1">
                <el-col :span="12">
                  <el-form-item label="统一社会信用代码" class="bt0">
                    <span>{{ bizList[0].uniscid }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="主体名称" class="bt0">
                    {{ bizList[0].entname }}
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row v-if="bizList.length === 1">
                <el-col :span="24">
                  <el-form-item label="经营地址" class="bt0">
                    <span>{{ bizList[0].address }}</span>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row v-if="bizList.length === 1">
                <el-col :span="12">
                  <el-form-item label="成立日期" class="bt0">
                    <span>{{ bizList[0].estDate }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="法定代表人" class="bt0">
                    {{ bizList[0].lerepname }}
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row v-if="bizList.length === 1">
                <el-col :span="12">
                  <el-form-item label="主体类型" class="bt0">
                    <span>{{ bizList[0].entTypeName }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="主体状态" class="bt0">
                    {{ bizList[0].regstateCn }}
                  </el-form-item>
                </el-col>
              </el-row>
            </div>
            <div class="tab">
              <div class="tab-title"><label>异常信息</label></div>
            </div>
            <el-row v-if="searchNameP === '' && bizList.length > 1">
              <el-form-item label="列入异常主体信息">
                <el-button size="medium" type="primary" @click="showEntbaseList">查看异常主体名单<i class="el-icon el-icon-s-order" style="margin-left:5px" /></el-button>
                <el-button size="medium" type="primary" @click="exportEntListExcel">导出Excel<i class="el-icon" style="margin-left:5px" /></el-button>
                <el-button v-if="remList.length > 0" size="medium" type="primary" @click="showRemEntList">查看已剔除名单<i class="el-icon el-icon-s-order" style="margin-left:5px" /></el-button>
              </el-form-item>
            </el-row>
            <el-row v-if="searchNameP !== '' && entbase.length>1">
              <el-form-item label="列入异常主体信息">
                <el-button type="primary" @click="showEntbaseList">查看异常主体名单<i class="el-icon el-icon-s-order" style="margin-left:5px" /></el-button>
              </el-form-item>
            </el-row>
            <el-row v-if="searchNameP !== '' && entbase.length === 1">
              <el-form-item label="主体名称">
                <span>{{ dataShow[0].entname }}</span>
              </el-form-item>
            </el-row>
            <el-row>
              <el-form-item label="列入原因" prop="reason" class="bt0">
                <el-col :span="24">
                  <el-input v-model="form.reason" type="textarea" style="display:inline-block;width:100%" disabled />
                </el-col>
              </el-form-item>
            </el-row>
            <el-row>
              <el-form-item label="决定书内容" prop="decisionContent" class="bt0">
                <el-col :span="24">
                  <el-input v-model="decisionContent" type="textarea" style="display:inline-block;width:100%" disabled :autosize="{ minRows: 2, maxRows: 6 }" />
                </el-col>
              </el-form-item>
            </el-row>
            <el-row>
              <el-form-item label="备注" prop="remark" class="bt0">
                <el-col :span="24">
                  <el-input v-model="remark" type="textarea" style="display:inline-block;width:100%" :autosize="{ minRows: 2, maxRows: 6 }" disabled />
                </el-col>
              </el-form-item>
            </el-row>
            <el-row>
              <el-form-item label="材料列表" class="bt0">
                <ul style="list-style:none;padding:0;margin:5px">
                  <li v-for="item in fileList" :key="item.id" style="line-height: 30px">
                    <el-link class="list-style" @click="previewFile(item)">{{ item.name }}</el-link>
                  </li>
                </ul>
              </el-form-item>
            </el-row>
            <!-- <el-form-item label="事实理由">
              <el-input v-model="form.spereasons" type="textarea" style="display:inline-block;width:600px" :autosize="{ minRows: 3, maxRows: 6 }" disabled />
            </el-form-item> -->

          </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 + '人：' + each.handler + ' ' + each.step +'日期：' + each.handledate " :description=" each.opinioncontent " status="finish" />
            </el-steps>
          </div>
        </div>
        <div v-if="endApply === '2'" class="form">
          <div class="tab">
            <div class="tab-title"><label style="color: #bd2c00">结束原因</label></div>
          </div>
          <el-row>
            <el-form>
              <el-input v-model="endReason" type="textarea" style="display:inline-block;width:100%" disabled :autosize="{ minRows: 2, maxRows: 6 }" />
            </el-form>
          </el-row>

        </div>
      </el-form>
      <div class="submit-box">
        <el-button @click="$router.back()">返回</el-button>
      </div>
    </div>
    <el-dialog
      title="异常主体名单"
      :visible.sync="showEntbase"
      width="90%"
    >
/*      <span style="color:red;">这批核查主体的同一地址为：{{bizList[0].checkAddress}}</span>*/
      <el-table
        v-loading="loading"
        :data="bizList"
        tooltip-effect="dark"
        style="width: 100%; min-height: 380px"
        :fit="true"
        :header-cell-style="{background:'#8cc3fb',color:'#fff'}"
        :row-class-name="tableRowClassName"
      >
        <!-- <el-table-column class="no" type="selection" min-width="20" align="center" /> -->
        <el-table-column prop="index" label="序号" min-width="50" align="center" />
        <el-table-column prop="uscc" label="统一社会信用代码/注册号" min-width="160" align="left" />
        <el-table-column prop="entname" :show-overflow-tooltip="true" label="主体名称" min-width="210" align="left" />
        <el-table-column prop="address" :show-overflow-tooltip="true" label="经营地址" min-width="180" align="left" />
        <el-table-column prop="estDate" :show-overflow-tooltip="true" label="成立日期" min-width="80" align="left" />
        <el-table-column prop="lerepname" label="法定代表人" min-width="80" align="left" />
        <el-table-column prop="entTypeName" :show-overflow-tooltip="true" label="企业类型" min-width="120" align="left" />
        <el-table-column prop="regstateCn" :show-overflow-tooltip="true" label="企业状态" min-width="100" align="left" />
      </el-table>
      <el-row class="bl0">
        <el-col>
          <el-pagination
            :current-page="pageParam.curPage"
            small
            layout="prev, pager, next"
            :total="pageParam.total"
            @size-change="pageSizeChange"
            @current-change="pageIndexChange"
          />
        </el-col>
      </el-row>
    </el-dialog>
    <el-dialog
      title="已剔除主体名单"
      :visible.sync="showRemEnt"
      width="90%"
    >
      <el-table
        v-loading="loading"
        :data="remList"
        tooltip-effect="dark"
        style="width: 100%; min-height: 380px"
        :fit="true"
        :header-cell-style="{background:'#8cc3fb',color:'#fff'}"
        :row-class-name="tableRowClassName"
      >
        <el-table-column prop="index" label="序号" min-width="50" align="center" />
        <el-table-column prop="uscc" label="统一社会信用代码/注册号" min-width="160" align="left" />
        <el-table-column prop="entname" :show-overflow-tooltip="true" label="主体名称" min-width="210" align="left" />
        <el-table-column prop="removeReason" :show-overflow-tooltip="true" label="剔除原因" min-width="180" align="left" />
        <el-table-column
          prop="removeTime"
          :show-overflow-tooltip="true"
          label="剔除时间"
          min-width="80"
          align="left"
        />
        <el-table-column prop="removeHandler" label="剔除处理人" min-width="80" align="left" />
      </el-table>
      <div>
        <el-row class="bl0">
          <el-col :span="12">
            <el-pagination
              :current-page="remPageParam.curPage"
              small
              layout="prev, pager, next"
              :total="remPageParam.total"
              @size-change="remPageSizeChange"
              @current-change="remPageIndexChange"
            />
          </el-col>
          <el-col :span="12">
            <div class="dialog-box">
              <el-button type="primary" size="mini" @click="showRemEntList">确定</el-button>
            </div>
          </el-col>
        </el-row>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import DetailHead from '@/components/DetailHead'
import HandleDialog from '@/components/HandleDialog'
import { removeAttachementById, listAttachmentByModelParam } from '@/api/attachment'
import { nextAbnormaInclusionProcess, getBizSpeListPage, searchBizSpeByBizSeqId, listAbnormalByBizSeqAndEntName, down,
  queryOldabnInfo, getOldBizSpeListPage, downLoadHistoryFile, exportExcelOldBizSpeList } from '@/api/abnormal'
import { getUsersWithPermission } from '@/api/user'
import { taskOpinion } from '@/api/task'
import { parseTime } from '@/utils'
import { getConstant } from '@/api/system'
import { isMenHu } from '@/utils/utils'

export default {
  components: {
    DetailHead,
    HandleDialog: HandleDialog
  },
  data() {
    return {
      remPageParam: {
        customParamMap: {
          bizseq: '',
          searchCode: '',
          entname: '',
          type: 'rem'
        },
        curPage: 1,
        total: 0,
        pageSize: 10
      },
      remList: [],
      showRemEnt: false,
      removeReason: '',
      searchNameP: '',
      decisionContent: '',
      uploadPath: `${process.env.VUE_APP_BASE_API}/attachment/uploadAdvance`,
      showEntbase: false,
      batchId: this.$route.query.batch,
      submitLoading: false,
      entbase: [],
      // 分页数据,这里用来保存每页切割后的数据
      // 看起来格式是这样的[[{},{},{}],[{},{},{}]]
      // 数组内套数组，每个数组就是一页数据
      totalPageData: [],
      // 共几页
      pageNum: '',
      // 每页显示数量
      pageSize: 10,
      // 当前显示页码
      currentPage: 1,
      // 总共多少条数据
      total: 1,
      // 当前要显示的数据
      dataShow: [],
      remark: '',
      endApply: '',
      endReason: '',
      form: {
        enterType: 'company',
        nextNodeID: 'endExptlist',
        spereasons: '',
        opinion: '',
        reason: ''
      },
      formRules: {
        opinion: [
          { required: true, message: '请输入审批意见', trigger: 'blur' }
        ]
      },
      reason: '',
      opinion: '',
      reasonOptions: [],
      opinionOptions: [{
        value: 0,
        label: '同意。'
      }, {
        value: 1,
        label: '不同意，回退至审核人。'
      }],
      historyLog: [],
      exmainerOptions: [],
      fileList: [],
      user: JSON.parse(sessionStorage.getItem('user')),
      reviewer: [],
      pageParam: {
        customParamMap: {
          bizseq: '',
          searchCode: '',
          entname: '',
          type: 'biz'
        },
        curPage: 1,
        total: 0,
        pageSize: 10
      },
      bizList: [], // 异常主体名单分页列表
      loading: false,
      correctBizseq: ''
    }
  },
  watch: {
    // 原因渲染
    reason() {
      this.form.specause = this.reason
      let name = ''
      this.reasonOptions.forEach(each => {
        if (this.reason === each.value) {
          name = each.label
        }
      })
      this.form.reason = name
    },
    // 意见渲染
    opinion() {
      let name = ''
      this.opinionOptions.forEach(each => {
        if (this.opinion === each.value) {
          name = each.label
        }
      })
      this.form.opinion = name
    }
  },
  mounted() {
    this.bizseq = this.$route.query.bizseq
    this.workflowId = this.$route.query.workflowId
    this.tasklistid = this.$route.query.tasklistid
    this.searchNameP = this.$route.query.searchName
    if (this.searchNameP === undefined) {
      this.searchNameP = ''
    }
    const loading = this.$loading({
      lock: true,
      text: '正在加载..',
      spinner: 'el-icon-loading',
      background: 'rgba(0, 0, 0, 0.7)'
    })
    let ps = []
    if (this.workflowId) {
      console.log('current=====================')
      ps = [
        taskOpinion(this.workflowId).then(res => {
          if (res.code === 0) {
            res.data.forEach(each => {
              switch (each.opiniontype) {
                case '9':
                case '8':
                case '1': each.step = '经办'
                  break
                case '2': each.step = '审核'
                  break
                case '3': each.step = '审批'
                  break
              }
              this.historyLog.push(each)
              // return 20
            })
          } else {
            this.$message.error('加载处办记录失败')
          }
          return
        }),
        // 加载企业列入原因
        getConstant('CD71').then(res => {
          if (res.code === 0) {
            const list = []
            res.data.forEach(each => {
              list.push({
                value: each.code,
                label: each.name
              })
            })
            this.reasonOptions = list

            if (this.$util.isNotEmpty(this.reason)) {
              let name = ''
              this.reasonOptions.forEach(each => {
                if (this.reason === each.value) {
                  name = each.label
                }
              })
              this.form.reason = name
            }
          }
          return
        }),
        // 加载异常名录主体
        // this.loadList(),
        this.loadBizSpeListPage().then(() => {
          this.listAttachmentByBizseq()
        }),
        this.loadRemListPage(),
        // 加载列入原因及事实理由
        searchBizSpeByBizSeqId(this.bizseq).then(res => {
          if (res.code === 0) {
            this.reason = res.data.specause
            this.spereasons = res.data.spereasons === 'null' ? '' : res.data.spereasons
            this.remark = res.data.remark === 'null' ? '' : res.data.remark
            this.decisionContent = res.data.decisionContent
            this.endApply = res.data.endApply === 'null' ? '' : res.data.endApply
            this.endReason = res.data.endReason === 'null' ? '' : res.data.endReason
          }
          return
        })
      ]
    } else {
      // 历史数据
      console.log('olde=====================')
      ps = [
        queryOldabnInfo(this.bizseq).then(res => {
          if (res.code === 0) {
            res.data.tsOpinions.forEach(each => {
              switch (each.opiniontype) {
                case '9':
                case '8':
                case '1': each.step = '经办'
                  break
                case '2': each.step = '审核'
                  break
                case '3': each.step = '审批'
                  break
              }
              this.historyLog.push(each)
              // return 20
            })
            this.form.reason = res.data.tsBizSpeListVO.specause
            this.decisionContent = res.data.tsBizSpeListVO.decisionContent
            const list = []
            res.data.tsAttachments.forEach(each => {
              if (each.attachtype !== '0') {
                each.id = each.attachmentid
                each.name = each.filename
                each.url = `${process.env.VUE_APP_DOWNLOAD_URL}/` + each.temppath
                list.push(each)
              }
            })
            this.fileList = list
          } else {
            this.$message.error('加载处办记录失败')
          }
          return
        }),
        this.loadOldBizSpeListPage()
      ]
    }

    Promise.all(ps).finally(() => {
      loading.close()
    })
  },
  methods: {
    listAttachmentByBizseq() {
      let param = {}
      if (this.$util.isNotEmpty(this.correctBizseq)) {
        param = {
          bizseq: this.correctBizseq,
          attachtype: '1'
        }
      } else {
        param = {
          bizseq: this.bizseq
        }
      }
      return listAttachmentByModelParam(param).then(data => {
        const list = []
        data.forEach(each => {
          if (each.attachtype !== '0') {
            each.id = each.attachmentid
            each.name = each.filename
            each.url = `${process.env.VUE_APP_DOWNLOAD_URL}/` + each.temppath
            list.push(each)
          }
        })
        this.fileList = list
      })
    },
    loadBizSpeListPage() {
      if (this.loading) return
      this.loading = true
      this.pageParam.customParamMap.bizseq = this.bizseq
      return getBizSpeListPage(this.pageParam).then((res) => {
        const list = []
        let i = 1
        const pageStart =
          (this.pageParam.curPage - 1) * this.pageParam.pageSize
        res.data.records.forEach((each) => {
          each.index = pageStart + i++
          each.uscc = each.uniscid ? each.uniscid : each.regno
          list.push(each)
        })
        this.bizList = list
        this.loading = false
        this.pageParam.total = res.data.total
        this.reason = this.bizList[0].specause
        this.remark = this.bizList[0].remark === 'null' ? '' : this.bizList[0].remark
        this.correctBizseq = this.bizList[0].correctBizseq
        if (this.bizList[0].decisionContent !== null) {
          this.$nextTick(() => {
            this.decisionContent = this.bizList[0].decisionContent
          })
        }
      })
    },
    loadOldBizSpeListPage() {
      this.loading = true
      this.pageParam.customParamMap.bizseq = this.bizseq
      return getOldBizSpeListPage(this.pageParam).then((res) => {
        const list = []
        let i = 1
        const pageStart =
          (this.pageParam.curPage - 1) * this.pageParam.pageSize
        res.data.records.forEach((each) => {
          each.index = pageStart + i++
          each.uscc = each.uniscid ? each.uniscid : each.regno
          list.push(each)
        })
        this.bizList = list
        this.loading = false
        this.pageParam.total = res.data.total
      })
    },
    // 加载已剔除名单
    loadRemListPage() {
      this.loading = true
      this.remPageParam.customParamMap.bizseq = this.bizseq
      return getBizSpeListPage(this.remPageParam).then((res) => {
        const list = []
        let i = 1
        const pageStart =
          (this.remPageParam.curPage - 1) * this.remPageParam.pageSize
        res.data.records.forEach((each) => {
          each.index = pageStart + i++
          each.uscc = each.uniscid ? each.uniscid : each.regno
          list.push(each)
        })
        this.remList = list
        this.loading = false
        this.remPageParam.total = res.data.total
      })
    },
    // 剔除名单列表分页大小改变
    remPageSizeChange(pageSize) {
      this.remPageParam.pageSize = pageSize
      this.loadRemListPage()
    },
    // 剔除名单列表当前分页改变
    remPageIndexChange(curPage) {
      this.remPageParam.curPage = curPage
      this.loadRemListPage()
    },
    parseTime(...args) {
      return parseTime(...args)
    },
    // 分页大小改变
    pageSizeChange(pageSize) {
      this.pageParam.pageSize = pageSize
      if (this.workflowId) {
        this.loadBizSpeListPage()
      } else {
        this.loadOldBizSpeListPage()
      }
    },
    // 当前分页改变
    pageIndexChange(curPage) {
      this.pageParam.curPage = curPage
      if (this.workflowId) {
        this.loadBizSpeListPage()
      } else {
        this.loadOldBizSpeListPage()
      }
    },
    loadList() {
      if (this.searchNameP === '') {
        return listAbnormalByBizSeq(this.bizseq).then(res => {
          if (res.code === 0) {
          // 添加分页index
            let i = 1
            const pageStart = (this.currentPage - 1) * this.pageSize
            res.data.forEach(each => {
              each.index = pageStart + i++
              each.name = each.entname
              each.uscc = each.uniscid ? each.uniscid : each.regno
              each.typeName = each.entTypeName
              // this.$set(this, 'reason', each.specause)
              // this.form.spereasons = each.spereasons
              this.entbase.push(each)
            })
            // 分页处理
            this.total = this.entbase.length
            // 计算页数
            this.calcPageData()
          } else {
            this.$message.error('加载异常名录主体信息失败')
          }
        })
      } else {
        return listAbnormalByBizSeqAndEntName(this.bizseq, this.searchNameP).then(res => {
          if (res.code === 0) {
          // 添加分页index
            let i = 1
            const pageStart = (this.currentPage - 1) * this.pageSize
            res.data.forEach(each => {
              each.index = pageStart + i++
              each.name = each.entname
              each.uscc = each.uniscid ? each.uniscid : each.regno
              each.typeName = each.entTypeName
              // this.$set(this, 'reason', each.specause)
              // this.form.spereasons = each.spereasons
              this.entbase.push(each)
            })
            // 分页处理
            this.total = this.entbase.length
            // 计算页数
            this.calcPageData()
          } else {
            this.$message.error('加载异常名录主体信息失败')
          }
        })
      }
    },
    tableRowClassName({ row, rowIndex }) {
      if (rowIndex % 2 === 1) {
        return 'warning-row'
      }
    },
    // 主体名单导出Excel
    exportEntListExcel() {
      if (this.workflowId) {
        this.$confirm('是否确认导出', '提示').then(() => {
          const url = location.origin + process.env.VUE_APP_BASE_API + '/bizSpeList/exportEntList?bizseq=' + this.bizseq
          window.open(url)
        })
      } else {
        this.$confirm('是否确认导出', '提示').then(() => {
          exportExcelOldBizSpeList(this.bizseq).then(res => {
            this.download2(res, '列异主体清单')
          }).catch(req => {
            console.log('下载失败', req)
          })
        })
      }
    },
    download2(data, fileName) {
      if (!data) {
        return
      }
      const url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel;charset=utf-8' }))
      // window.open(url)
      const link = document.createElement('a')
      link.style.display = 'none'
      link.href = url
      link.setAttribute('download', fileName)
      // document.body.appendChild(link)
      link.click()
    },
    // 上传文件预览
    previewFile(file) {
      if (this.workflowId) {
        if (file.createtype === '2') { // 双随机系统附件
          down(file.id).then(res => {
            this.download2(res, file.name)
          }).catch(req => {
            console.log('下载失败', req)
          })
        } else {
          if (['.jpg', '.png', '.jpeg', '.bmp'].includes(file.fileext)) {
            const fileList = this.fileList
            const imges = []
            let index = 0
            let indextemporary = 0
            for (let i = 0; i < fileList.length; i++) {
              if (['.jpg', '.png', '.jpeg', '.bmp'].includes(fileList[i].fileext) && fileList[i].createtype !== '2') {
                imges.push(fileList[i].url)
                if (file.id === fileList[i].id) {
                  index = indextemporary
                }
                // 下一张图片的下标
                indextemporary++
              }
            }
            this.$hevueImgPreview({
              multiple: true, // 开启多图预览模式
              nowImgIndex: index, // 多图预览，默认展示第几张图片
              imgList: imges
            })
          } else {
            window.open(file.url, '_blank')
          }
        }
      } else {
        console.log('jiufujian===========')
        downLoadHistoryFile(file.id).then(res => {
          this.download2(res, file.name)
        }).catch(req => {
          console.log('下载失败', req)
        })
      }
    },
    // 发送提交
    submitForm() {
      this.$refs.form.validate(valid => {
        if (!valid) return
        this.$confirm('是否确认提交？', '提示').then(() => {
          this.submitLoading = true
          this.form.bizseq = this.bizseq
          this.form.workflowid = this.workflowId
          this.form.opiniontype = '2'
          this.form.handler = this.user.username
          this.form.handlerid = this.user.primaryKey
          this.form.opinioncontent = this.form.opinion
          this.form.tasklistid = this.tasklistid
          this.form.nextPerformerids = this.user.primaryKey
          this.form.nextPerformerNames = this.user.username
          nextAbnormaInclusionProcess(this.form).then(res => {
            this.submitLoading = false
            if (res.code === 0) {
              this.$message.success('审批成功')
              if (isMenHu()) {
                // 信创门户环境跳转回待办
                window.location.href = '/aiccs/#/todo/list'
              } else {
                this.$router.back()
              }
            } else {
              this.$message.error(res.msg)
            }
          })
        }).catch(() => {})
      })
    },
    // 查看异常主体名单
    showEntbaseList() {
      this.showEntbase = true
    },
    // 查看已剔除主体名单
    showRemEntList() {
      this.showRemEnt = !this.showRemEnt
    },
    // 移除文件回调
    removeFile(file) {
      removeAttachementById(file.id).then(res => {
        if (res.code === 0) {
          this.$message.success('删除成功')
        } else {
          this.$message.error(res.msg)
        }
      })
    }
    // 加载审核人
    // loadReviewer() {
    //   getUsersWithPermission('abnormalReview', this.user.orgId).then(res => {
    //     if (res.code === 0) {
    //       this.reviewer = res.data
    //     }
    //   })
    // }
  }
}
</script>

<style lang="scss" scoped>
.main-content{
  font-size: $table-content-font-size;
  .back-btn{
    position:absolute;
    right:40pt;
  }
  .content-header,.content-body{
    background: white;
    padding:20PX 10PX;
    border:1PX solid #eee;
  }
  .content-header{
    height:60PX;
    display: flex;
    align-items: center;
    .title{
      font-weight: 700;
      font-size: $font-size-sub-title;
    }
  }
  .content-body{
    padding:20pt;
      .tab{
        .tab-title{
          label{
            display:inline-block;
          }
        }
      }
    .form{
      margin-bottom: 20pt;
    }
  }
}
.el-row {
  border-left: 1px solid $color-border;
}
.bt0 {
  /deep/.el-form-item__label{
      border-top: 1px solid $color-border;
    }
  /deep/.el-form-item__content{
    border-top: 0!important;
  }
}
.list-style {
  font-size: 16px;
}
.content-body{
  background: #fff;
}
/deep/.el-table .warning-row {
  background: #eaf4fe!important;
}
</style>
<style lang="scss">
.main-content.abnormal{
  font-size: $table-content-font-size;
  .el-form-item{
    margin-bottom:0;
    background: $color-form-label;
    .el-form-item__label{
      font-size: $table-content-font-size;
      border-top: 1px solid $color-border;
      padding: 25px 10px 10px 10px;
      line-height: 0!important;
      /* border-left: 1px solid $color-border; */
    }
    .el-form-item__content{
      background: white;
      padding: 5px;
      /*line-height: 0!important;*/
      font-size: $table-content-font-size;
      border-top: 1px solid $color-border;
      border-right: 1px solid $color-border;
      border-left: 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;
  }
  .el-form-item.is-error .custom .el-input__inner{
    border-color:$color-border;
  }
  .el-textarea.is-disabled .el-textarea__inner{
    color: #1c1e23;
  }
  .handle-dialog.mid>.main-dialog{
    min-height: 300px;
    width: 75vw;
  }
  .el-step__description{
    font-size: 18px;
  }
}
</style>
