<template>
  <div class="main-content abnormal">
    <!-- <div class="content-header"> -->
    <!-- <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 /> -->
    <div class="content-body">
      <el-form ref="form" :model="form" label-width="150px" label-position="right" :rules="formRules">
        <div class="form">
          <div class="tab">
            <div class="tab-title"><label>异常信息</label></div>
          </div>
          <div class="form-body">
            <el-row class="lh0">
              <el-form-item label="列入异常主体信息">
                <p>主体名称：{{ form.entname }}</p><br>
                <p>统一社会信用代码/注册号：{{ form.unisicd || form.regno }}</p>
              </el-form-item>
            </el-row>

            <el-row>
              <el-col :span="12">
                <el-form-item label="原列入原因" prop="preasonStr" class="bt0">
                  <el-row :span="10" style="border-left:0">
                    <el-select v-model="pReason" placeholder="请选择列入原因" class="custom" disabled style="width:100%">
                      <el-option
                        v-for="item in reasonOptions"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                    </el-select>
                  </el-row>
                  <!--                  <el-row :span="10">-->
                  <!--                    <el-input v-model="form.preasonStr" type="textarea" placeholder="请输入列入原因" disabled style="width:100%" />-->
                  <!--                  </el-row>-->
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="当前列入原因" prop="reasonStr" class="redItem bt0">
                  <el-row :span="10" style="border-left:0">
                    <el-select v-model="reason" placeholder="请选择列入原因" class="custom" :disabled="curNodeID != 'feedbackEnter' || onlyShow" style="width:100%">
                      <el-option
                        v-for="item in reasonOptions"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                    </el-select>
                  </el-row>
                  <!--                  <el-row :span="10">-->
                  <!--                    <el-input v-model="form.reasonStr" type="textarea" placeholder="请输入列入原因" disabled style="width:100%" />-->
                  <!--                  </el-row>-->
                </el-form-item>
              </el-col>
            </el-row>
            <!--            <el-row :span="12">-->
            <!--              <el-form-item label="原列入原因" prop="preasonStr">-->
            <!--                <el-row :span="10">-->
            <!--                  <el-select v-model="pReason" placeholder="请选择列入原因" class="custom" disabled style="width:100%">-->
            <!--                    <el-option-->
            <!--                      v-for="item in reasonOptions"-->
            <!--                      :key="item.value"-->
            <!--                      :label="item.label"-->
            <!--                      :value="item.value"-->
            <!--                    />-->
            <!--                  </el-select>-->
            <!--                </el-row>-->
            <!--                <el-row :span="10">-->
            <!--                  <el-input v-model="form.preasonStr" type="textarea" placeholder="请输入列入原因" disabled style="width:100%" />-->
            <!--                </el-row>-->

            <!--              </el-form-item>-->
            <!--            </el-row>-->

            <!--            <el-row :span="12">-->
            <!--              <el-form-item label="当前列入原因" prop="reasonStr">-->
            <!--                <el-row :span="10">-->
            <!--                  <el-select v-model="reason" placeholder="请选择列入原因" class="custom" :disabled="curNodeID != 'feedbackEnter'" style="width:100%">-->
            <!--                    <el-option-->
            <!--                      v-for="item in reasonOptions"-->
            <!--                      :key="item.value"-->
            <!--                      :label="item.label"-->
            <!--                      :value="item.value"-->
            <!--                    />-->
            <!--                  </el-select>-->
            <!--                </el-row>-->
            <!--                <el-row :span="10">-->
            <!--                  <el-input v-model="form.reasonStr" type="textarea" placeholder="请输入列入原因" disabled style="width:100%" />-->
            <!--                </el-row>-->

            <!--              </el-form-item>-->
            <!--            </el-row>-->

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="原决定书内容" prop="decisionContent" class="bt0">
                  <el-col :span="24">
                    <el-input v-model="pdecisionContent" style="width:100%;" type="textarea" disabled :autosize="{ minRows: 8, maxRows: 8 }" />
                  </el-col>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="现决定书内容" prop="decisionContent" class="redItem bt0">
                  <el-col :span="24">
                    <el-input v-model="decisionContent" style="width:100%" :row="10" type="textarea" :autosize="{ minRows: 8, maxRows: 8 }" :disabled="curNodeID != 'feedbackEnter' || onlyShow" />
                  </el-col>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="原备注" prop="remark" class="bt0">
                  <el-col :span="24">
                    <el-input v-model="premark" type="textarea" style="width:100%" disabled :autosize="{ minRows: 4, maxRows: 4 }" maxlength="500" show-word-limit />
                  </el-col>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="现备注" prop="remark" class="redItem  bt0">
                  <el-col :span="24">
                    <el-input v-model="remark" type="textarea" placeholder="备注" style="width:100%" :autosize="{ minRows: 4, maxRows: 4 }" maxlength="500" show-word-limit :disabled="curNodeID != 'feedbackEnter' || onlyShow" />
                  </el-col>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row class="el-row--flex">
              <el-col :span="12">
                <el-form-item label="原材料列表" style="height: 100%;" class="bt0">
                  <ul style="list-style:none;padding:0;margin:5px;">
                    <li v-for="item in oldFileList" :key="item.id" style="line-height: 30px">
                      <el-link style="font-size:16px" @click="handlePreview(item)">{{ item.name }}</el-link>
                    </li>
                  </ul>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item v-if="curNodeID === 'feedbackEnter' && searchNameP ==='' && !onlyShow" label="材料上传" class="upload bt0">
                  <el-upload
                    :action="uploadPath"
                    :data="{bizseq:bizseq,attachtype: '1'}"
                    :on-remove="removeFile"
                    :on-success="uploadCallback"
                    :on-preview="previewFile"
                    :before-upload="beforeFileUpload"
                    :before-remove="beforeRemove"
                    accept=".doc,.docx,.xlsx,.xls,.pdf,.jpg,.zip,.rar,.7z"
                    multiple
                    :file-list="fileList"
                    style="max-width:800px;display: inline-block"
                    class="uploadFileList"
                  >
                    <div style="display: inline-block;">
                      <el-button style="display: inline-block;margin-right:10px" size="small" type="primary">点击上传</el-button>
                      <div slot="tip" style="display: inline-block;" class="el-upload__tip">只能上传jpg/png/pdf/doc/docx/xls/xlsx/rar/zip/7z文件，且单个文件不能超过20M</div>
                    </div>
                  </el-upload>
                </el-form-item>
                <el-form-item v-else label="材料列表" style="height: 100%;" 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 style="font-size:16px" @click="handlePreview(item)">{{ item.name }}</el-link>
                    </li>
                  </ul>
                </el-form-item>
              </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" class="correct">
              <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="searchNameP === '' && !onlyShow">
          <div v-if="curNodeID != '' && curNodeID != 'endFeedback'" class="form">
            <div class="tab">
              <div class="tab-title"><label>{{ opinionTypeName }}</label></div>
            </div>
            <div class="form-body">
              <el-row>
                <el-form-item v-if="curNodeID != 'feedbackEnter'" label="是否通过" prop="nextNodeID">
                  <div style="display:inline-block;">
                    <el-radio-group v-model="form.nextNodeId">
                      <el-radio :label="nextNodeID">通过</el-radio>
                      <el-radio :label="'overFeedback'">不通过</el-radio>
                      <el-radio :label="returnNode">回退</el-radio>
                    </el-radio-group>
                  </div>
                </el-form-item>
              </el-row>

              <el-row>
                <el-form-item :label="opinionTypeName" prop="opinion">
                  <el-col :span="24">
                    <el-input v-model="form.opinion" type="textarea" placeholder="请输入意见" />
                  </el-col>
                  <el-col :span="12">
                    <label>常用语</label>
                    <el-select v-model="opinion" style="width:100%" placeholder="请选择" class="custom">
                      <el-option
                        v-for="item in opinionOptions"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                    </el-select>
                  </el-col>
                </el-form-item>
              </el-row>
              <el-row>
                <el-form-item v-if="curNodeID != 'approvelist' && form.nextNodeId != 'overFeedback' && form.nextNodeId != 'feedbackEnter'" :label="nextOne" prop="reviewerId">
                  <el-col :span="12">
                    <el-select v-model="form.reviewerId" placeholder="请选择审核人" class="custom" style="width:100%">
                      <el-option
                        v-for="item in reviewer"
                        :key="'reviewer'+item.primaryKey"
                        :label="item.name"
                        :value="item.primaryKey"
                      />
                    </el-select>
                  </el-col>
                </el-form-item>
              </el-row>

            </div>
          </div>
        </div>
      </el-form>
      <div v-if="nodes.length > 0 && nodes[0].curruserid == user.primaryKey && (curNodeID != 'endFeedback' || curNodeID != 'overFeedback') && !onlyShow" class="submit-box">
        <el-button v-if="searchNameP === ''" v-loading="submitLoading" type="primary" @click="submitForm">提交</el-button>
        <el-button v-if="searchNameP === '' && curNodeID === 'feedbackEnter'" v-loading="submitLoading" type="primary" @click="endSubmit">结束流程</el-button>
        <el-button @click="$router.back()">返回</el-button>
      </div>
      <template v-if="onlyShow">
        <el-button @click="$router.back()">返回</el-button>
      </template>
    </div>
  </div>
</template>

<script>
import DetailHead from '@/components/DetailHead'
import { removeAttachementById, listAttachmentByBizseq } from '@/api/attachment'
import { getCorrectionsDetail, nextAbnormalCorrectionsProcess, loadOldFileList } from '@/api/corrections'
import { getUsersWithPermission } from '@/api/user'
import { getDecContent } from '@/api/abnormal'
import { validBeforeUpload } from '@/api/fileUpload'
import { getConstant } from '@/api/system'
import { taskOpinion } from '@/api/task'
import { isMenHu } from '@/utils/utils'

export default {
  components: {
    DetailHead
  },
  data() {
    return {
      onlyShow: false,
      busId: '',
      oldFileList: [],
      nextOne: '',
      opinionTypeName: '',
      searchNameP: '',
      uploadPath: `${process.env.VUE_APP_BASE_API}/attachment/uploadAdvance`,
      showEntbase: false,
      bizseq: '',
      workflowId: '',
      tasklistid: '',
      form: {
        entName: '',
        regNo: '',
        spereasons: '',
        reason: '',
        pReason: '',
        decisionContent: '',
        remark: '',
        opinion: ''
      },
      formRules: {
        reason: [
          { required: true, message: '请输入列入原因', trigger: 'blur' }
        ],
        opinion: [
          { required: true, message: '请输入意见', trigger: ['blur', 'change'] }
        ],
        reviewerId: [
          { required: true, message: '请选择审核人' }
        ]
      },
      reason: '',
      pReason: '',
      pdecisionContent: '',
      decisionContent: '',
      remark: '',
      premark: '',
      opinion: '',
      reasonOptions: [],
      opinionOptions: [{
        value: 0,
        label: '拟同意,呈领导审核。'
      }],
      historyLog: [],
      exmainerOptions: [],
      fileList: [],
      user: JSON.parse(sessionStorage.getItem('user')),
      reviewer: [],
      nodes: [],
      curNodeID: '',
      nextNodeID: '',
      returnNode: '',
      submitLoading: false
    }
  },
  watch: {
    // 文书渲染
    'reason': {
      handler(newValue, oldValue) {
        this.form.reason = this.reason
        let name = ''
        this.reasonOptions.forEach(each => {
          if (this.reason === each.value) {
            name = each.label
          }
        })
        this.form.reason = name
        // 调用接口请求，选择不同原因时对应的模板
        if (this.$util.isNotEmpty(newValue) && oldValue !== '') {
          getDecContent({
            specause: this.reason,
            entertype: 'company'
          }).then(res => {
            if (res.code === 0) {
              this.decisionContent = res.data
            }
          })
        }
      }

    },
    // reason() {
    //   this.form.reason = this.reason
    //   let name = ''
    //   this.reasonOptions.forEach(each => {
    //     if (this.reason === each.value) {
    //       name = each.label
    //     }
    //   })
    //   this.form.reason = name
    //   // 调用接口请求，选择不同原因时对应的模板
    //   if (this.$util.isNotEmpty(this.reason)) {
    //     getDecContent({
    //       specause: this.reason,
    //       entertype: 'company'
    //     }).then(res => {
    //       if (res.code === 0) {
    //         this.decisionContent = res.data
    //       }
    //     })
    //   }
    //   // if (this.reason === '1') {
    //   //   this.prepareContent = '经查，你单位' + name + '符合《企业经营异常名录管理暂行办法》第四条第一款第(一)项所指的情形，根据《企业经营异常名录管理暂行办法》第六条的规定，我局决定将你单位列入经营异常名录，并向社会公示。'
    //   // } else if (this.reason === '2') {
    //   //   this.prepareContent = '经查，你单位' + name + '符合《企业经营异常名录管理暂行办法》第四条第一款第(二)项所指的情形，根据《企业经营异常名录管理暂行办法》第七条的规定，我局决定将你单位列入经营异常名录，并向社会公示。'
    //   // } else if (this.reason === '3') {
    //   //   this.prepareContent = '经查，你单位' + name + '符合《企业经营异常名录管理暂行办法》第四条第一款第(三)项所指的情形，根据《企业经营异常名录管理暂行办法》第八条的规定，我局决定将你单位列入经营异常名录，并向社会公示。'
    //   // } else if (this.reason === '4') {
    //   //   this.prepareContent = '经查，你单位' + name + '符合《企业经营异常名录管理暂行办法》第四条第一款第(四)项所指的情形，根据《企业经营异常名录管理暂行办法》第九条的规定，我局决定将你单位列入经营异常名录，并向社会公示。'
    //   // }
    //   // this.decisionContent = this.prepareContent
    // },
    decisionContent() {
      this.$set(this.form, 'decisionContent', this.decisionContent)
    },
    // 意见渲染
    opinion() {
      let name = ''
      this.opinionOptions.forEach(each => {
        if (this.opinion === each.value) {
          name = each.label
        }
      })
      this.$set(this.form, 'opinion', name)
    }
  },
  mounted() {
    this.searchNameP = this.$route.query.searchName
    if (this.searchNameP === undefined) {
      this.searchNameP = ''
    }
    this.bizseq = this.$route.query.bizseq // 获取跳转携带的参数bizseq
    this.workflowId = this.$route.query.workflowId
    this.tasklistid = this.$route.query.tasklistid
    this.onlyShow = this.$route.query.onlyShow === 'true'
    console.log(this.onlyShow)
    // 加载常用语
    this.opinionOptions = this.$util.getCommonWordsWithModule(this.user.primaryKey, '列异勘误')
    // 加载主体详情
    getCorrectionsDetail(this.bizseq).then(res => {
      if (res.code === 0) {
        const detail = res.data.detail || {}
        this.form = {
          ...detail
        }
        this.pReason = detail.preason
        this.pdecisionContent = detail.pdecisionContent
        this.premark = this.$util.isEmpty(detail.premark) ? '' : detail.premark
        this.entType = detail.entType
        this.nodes = res.data.nodes || []
        this.randerNode()
        this.loadReviewer()
        // if (this.curNodeID !== 'feedbackEnter') {
        //   this.reason = detail.reason
        //   this.nodes = res.data.nodes || []
        //   this.decisionContent = detail.decisionContent
        //   this.remark = detail.remark
        // }
        this.reason = detail.reason
        this.nodes = res.data.nodes || []
        this.remark = detail.remark
        this.busId = detail.busId
        this.$nextTick(() => {
          this.decisionContent = detail.decisionContent
        })
      }
    }).then(res => {
      // 加载旧附件清单
      if (this.$util.isNotEmpty(this.bizseq)) {
        loadOldFileList(this.bizseq).then(res => {
          res.data.forEach(each => {
            each.id = each.attachmentid
            each.name = each.filename
            each.url = `${process.env.VUE_APP_DOWNLOAD_URL}/` + each.temppath
          })
          this.oldFileList = res.data
        })
      }
      // 判断类型，加载对应原因列表
      let baseCode = ''
      if (this.entType === 'company') {
        baseCode = 'CD71'
      } else if (this.entType === 'individual') {
        baseCode = 'CD75'
      } else if (this.entType === 'farmer') {
        baseCode = 'CD77'
      }
      this.getReasonList(baseCode)
    })

    // 加载处办记录
    taskOpinion(this.workflowId).then(res => {
      if (res.code === 0) {
        res.data.forEach(each => {
          switch (each.opiniontype) {
            case '0': each.step = '经办'
              break
            case '1': each.step = '审核'
              break
            case '2': each.step = '审批'
              break
          }
          this.historyLog.push(each)
        })
      } else {
        this.$message.error('加载处办记录失败')
      }
    })
    // 加载审核人
    // this.loadReviewer()

    // 加载附件清单
    if (this.$util.isNotEmpty(this.bizseq)) {
      const list = []
      listAttachmentByBizseq(this.bizseq).then(data => {
        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
      })
    }
  },
  methods: {
    // 加载企业列入原因
    getReasonList(code) {
      getConstant(code).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.reason !== '') {
            let name = ''
            this.reasonOptions.forEach(each => {
              if (this.reason === each.value) {
                name = each.label
              }
            })
            this.form.reasonStr = name
          }
        }
      })
    },
    // 点击文件列表中已上传文件进行下载
    handlePreview(file) {
      var a = document.createElement('a')
      var event = new MouseEvent('click')
      a.download = file.name
      a.href = file.url
      a.dispatchEvent(event)
    },
    // 上传文件之前校验大小
    beforeFileUpload(file) {
      var that = this
      return validBeforeUpload(file, that)
    },
    // 移除文件前
    beforeRemove(file, fileList) {
      if (file && file.status === 'success') {
        return this.$confirm(`确定移除 ${file.name} ？`)
      }
    },
    // 上传文件预览
    previewFile(file) {
      if(file.url != null){
        window.open(file.url, '_blank')
      }else {
        window.open( `${process.env.VUE_APP_DOWNLOAD_URL}/` + file.response.data.temppath)
      }
    },
    endSubmit(){
       this.$confirm('是否结束流程？', '提示').then(() => {
          this.submitLoading = true
          this.form.bizseq = this.bizseq
          this.form.workflowId = this.workflowId
          this.form.tasklistid = this.tasklistid
          this.form.opiniontype = this.curNodeID === 'feedbackEnter' ? '0' : this.curNodeID === 'handleFeedback' ? '1' : '2'
          this.form.opinioncontent = this.form.opinion
          this.form.tasklistid = this.tasklistid
          this.form.nextUserIds = this.form.reviewerId
          for (const i in this.reviewer) {
            if (this.reviewer[i].primaryKey === this.form.reviewerId) {
              this.form.nextUserNames = this.reviewer[i].name
            }
          }
          this.form.nextUserNames = this.user.nickname
          this.form.nextUserIds = this.user.primaryKey
          this.form.nextNodeId = 'overKwFinish'
          this.form.reason = this.reason
          this.form.decisionContent = this.decisionContent
          this.form.remark = this.remark
          this.form.curNodeId = this.curNodeID
          nextAbnormalCorrectionsProcess(this.form).then(res => {
            this.submitLoading = false
            if (res.code === 0) {
              this.$message.success('提交成功')
              // this.$router.go(0)
              if (isMenHu()) {
                // 信创门户环境跳转回待办
                window.location.href = '/aiccs/#/todo/list'
              } else {
                this.$router.back()
              }
            }
          })
        }).catch(() => {})
    },
    // 发送提交
    submitForm() {
      if (this.submitLoading) return
      this.$refs.form.validate(valid => {
        if (!valid) return
        this.$confirm('是否确认提交？', '提示').then(() => {
          this.submitLoading = true
          // 附件id
          // let ids = []
          // this.fileList.forEach(each => {
          //   ids.push(each.id)
          // })
          // this.form.fileIds = ids.toString()
          // 主体id
          // ids = []
          // this.entbase.forEach(each => {
          // ids.push(each.id)
          // })
          // this.form.pripids = ids.toString()
          this.form.bizseq = this.bizseq
          this.form.workflowId = this.workflowId
          this.form.tasklistid = this.tasklistid
          this.form.opiniontype = this.curNodeID === 'feedbackEnter' ? '0' : this.curNodeID === 'handleFeedback' ? '1' : '2'
          this.form.opinioncontent = this.form.opinion
          // this.form.tasklistid = this.form.tasklistids
          this.form.tasklistid = this.tasklistid
          this.form.nextUserIds = this.form.reviewerId
          for (const i in this.reviewer) {
            if (this.reviewer[i].primaryKey === this.form.reviewerId) {
              this.form.nextUserNames = this.reviewer[i].name
            }
          }
          // 办结使用当前用回信息作为下一节点信息
          if (this.curNodeID === 'approvelist' || this.form.nextNodeId === 'overFeedback' || this.form.nextNodeId === 'feedbackEnter') {
            this.form.nextUserNames = this.user.nickname
            this.form.nextUserIds = this.user.primaryKey
          }
          // this.form.nextNodeId = this.nextNodeID
          this.form.reason = this.reason
          this.form.decisionContent = this.decisionContent
          this.form.remark = this.remark
          this.form.curNodeId = this.curNodeID
          nextAbnormalCorrectionsProcess(this.form).then(res => {
            this.submitLoading = false
            if (res.code === 0) {
              this.$message.success('提交成功')
              // this.$router.go(0)
              if (isMenHu()) {
                // 信创门户环境跳转回待办
                window.location.href = '/aiccs/#/todo/list'
              } else {
                this.$router.back()
              }
            }
          })
        }).catch(() => {})
      })
    },
    uploadCallback(res, file) {
      if (res.code === 0) {
        file.id = res.data.attachmentid
        this.$message.success('上传成功')
      }
    },
    // 移除文件回调
    removeFile(file) {
      if (file && file.status === 'success') {
        removeAttachementById(file.id).then(res => {
          if (res.code === 0) {
            this.$message.success('删除成功')
          } else {
            this.$message.error(res.msg)
          }
        })
      }
    },
    // 加载审核人
    loadReviewer() {
      if (this.nodes.length === 0) return
      const node = this.nodes[0]
      let perm = ''
      switch (node.currentnode) {
        case 'feedbackEnter':perm = 'abnormalCorrectionsHandle'; break
        case 'handleFeedback':perm = 'abnormalCorrectionsApprove'; break
      }
      getUsersWithPermission(perm, this.user.orgId).then(res => {
        if (res.code === 0) {
          this.reviewer = res.data
        }
      })
    },
    // 节点渲染
    randerNode() {
      if (this.nodes.length > 0) {
        this.curNodeID = this.nodes[0].currentnode
        switch (this.curNodeID) {
          case 'feedbackEnter' : this.nextNodeID = 'handleFeedback'; this.$set(this.form, 'nextNodeId', 'handleFeedback')
            this.opinionTypeName = '经办意见'
            this.nextOne = '审核人'
            break
          case 'handleFeedback' : this.nextNodeID = 'approvelist'; this.$set(this.form, 'nextNodeId', 'approvelist')
            this.opinionTypeName = '审核意见'
            this.nextOne = '审批人'
            this.returnNode = 'feedbackEnter'
            break
          case 'approvelist' : this.nextNodeID = 'endFeedback'; this.$set(this.form, 'nextNodeId', 'endFeedback')
            this.opinionTypeName = '审批意见'
            this.returnNode = 'handleFeedback'
            break
          default: this.nextNodeID = ''
        }
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.el-row--flex{
  /deep/ .el-form-item__content{
    height: 100%;
  }
}
.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;
    .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: 0!important;
  }
  /deep/.el-form-item__content{
    border-top: 0!important;
  }
}
</style>
<style lang="scss">
.main-content.abnormal{
  .el-select .el-input.is-disabled .el-input__inner{
    color: unset;
  }
  .el-form-item{
    margin-bottom:0;

    background: $color-form-label;
    .el-form-item__label{
      padding-left: 10px;
      font-size: $table-content-font-size;
      border-top: 1px solid $color-border;
    }
    .el-form-item__content{
      background: white;
      padding: 10px;
      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;
  }
  .el-form-item.is-error .custom .el-input__inner{
    border-color:$color-border;
  }
  .el-table-column--selection .cell {
    padding-right: 0px;
  }
  .no {
    padding-left: 0px;
  }
  .el-table_9_column_61.is-left.is-leaf{
    .cell{
      padding-left: 0px;
      padding-right: 0px;
    }
  }
  .el-pagination{
    text-align: right;
  }
  .dialog-box{
    text-align: right;
  }
  .el-textarea.is-disabled .el-textarea__inner{
    color: #1c1e23;
  }
  .el-input__inner{
    margin-bottom: 5px;
  }
  .redItem .el-form-item__label{
    color: #bd2c00;
  }
  .uploadFileList{
    .el-upload-list__item{
      display: inline-block;
      width: auto;
    }
  }
  .correct{
    .el-step__description.is-finish {
      font-size: 16px;
    }
  }
  .fileRow{
    .el-row{
      display:flex
    }
  }
}
</style>
