<template>
  <div class="main-content revokeCancel">
    <!-- <DetailHead /> -->
    <div class="content-body">
      <el-form ref="form" :model="form" label-width="220px" 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>
              <el-col :span="12">
                <el-form-item label="案件编号">
                  <span style="display:inline-block;text-indent: 1em;">{{ form.caseNo }}</span>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="案件名称">
                  <span style="display:inline-block;text-indent: 1em;"> {{ form.caseName }}</span>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row class="bt0">
              <el-col :span="12">
                <el-form-item label="当事人(主体名称)">
                  <span style="display:inline-block;text-indent: 1em;">{{ form.entname }}</span>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="注册号/统一社会信用代码">
                  <span style="display:inline-block;text-indent: 1em;">{{ form.uniscid || form.regno }}</span>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row class="bt0">
              <el-col :span="12">
                <el-form-item label="处罚文书号">
                  <span style="display:inline-block;text-indent: 1em;">{{ form.punishDecWritsNo }}</span>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="处罚决定书日期">
                  <span style="display:inline-block;text-indent: 1em;">{{ form.punishDecDate }}</span>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row class="bt0">
              <el-col>
                <el-form-item label="处罚信息">
                  <!-- <p v-for="item in form.punishDecContent" :id="'paragraphNo' + item.paragraphNo" :key="item.paragraphNo" style="margin: 0px;text-indent: 1em;">{{ item.paragraphContent }}</p> -->
                  <div class="info" v-html="form.punishDecContent" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row class="bt0">
              <el-col>
                <el-form-item label="文书号" prop="cancelwritsno">
                  <el-input v-model="form.cancelwritsno" :disabled="currentNode !== 'revCancelEnter' || onlyShow"/>
                </el-form-item>
              </el-col>
            </el-row>
            <div v-if="handleType === '1'">
              <el-row>
                <el-col :span="12">
                  <el-form-item label="撤销决定单位" prop="handledecorg">
                    <el-select v-model="form.handledecorg" :disabled="currentNode !== 'revCancelEnter' || onlyShow" style="width:100%" clearable class="custom">
                      <el-option
                        v-for="item in orgList"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="撤销决定日期" prop="handlerdate">
                    <el-date-picker
                      v-model="form.handlerdate"
                      :disabled="currentNode !== 'revCancelEnter' || onlyShow"
                      style="display: inline-block;width:100%"
                      :clearable="false"
                      value-format="yyyy-MM-dd"
                      type="date"
                      placeholder="选择日期"
                    />
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row class="bt0">
                <el-col>
                  <el-form-item label="撤销决定内容" prop="cancelwritscontent">
                    <el-input
                      v-model="form.cancelwritscontent"
                      :disabled="currentNode !== 'revCancelEnter' || onlyShow"
                      :autosize="{ minRows: 2 }"
                      type="textarea"
                      placeholder="请输入决定内容"
                    />
                  </el-form-item>
                </el-col>
              </el-row>
            </div>
            <div v-if="handleType === '2'">
              <el-row>
                <el-col :span="12">
                  <el-form-item label="复议决定单位">
                    {{ form.lerepname }}
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="复议决定日期">
                    {{ form.phone }}
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row class="bt0">
                <el-col>
                  <el-form-item label="复议决定内容">
                    {{ form.phone }}
                  </el-form-item>
                </el-col>
              </el-row>
            </div>
            <div v-if="handleType === '3'">
              <el-row class="bt0">
                <el-col :span="12">
                  <el-form-item label="诉讼决定单位">
                    {{ form.lerepname }}
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="诉讼决定日期">
                    {{ form.phone }}
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row class="bt0">
                <el-col>
                  <el-form-item label="诉讼决定内容">
                    {{ form.phone }}
                  </el-form-item>
                </el-col>
              </el-row>
            </div>
            <!-- 意见栏 --><!-- 经办 -->
            <el-row>
              <el-form-item v-if="currentNode === 'revCancelEnter' && !onlyShow" label="经办意见" prop="opinion">
                <el-col :span="24">
                  <el-input
                    v-model="form.opinion"
                    :autosize="{ minRows: 2 }"
                    type="textarea"
                    placeholder="请输入意见"
                  />
                </el-col>
                <el-col :span="12">
                  <label style="font-size:14px">常用语</label>
                  <el-select
                    v-model="opinion"
                    placeholder="请选择"
                    clearable
                    style="margin-left: 10px;width: 80%"
                    class="custom"
                  >
                    <el-option
                      v-for="item in opinionOptions"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </el-col>
                <el-col :span="8" :offset="4">
                  <label>经办人:</label>
                  <span>{{ user.nickname }}</span>
                  <label
                    style="margin-left: 10px"
                  >经办日期:</label>
                  <el-date-picker
                    v-model="form.handledate"
                    style="display: inline-block"
                    :clearable="false"
                    value-format="yyyy-MM-dd HH:mm:ss"
                    format="yyyy-MM-dd HH:mm:ss"
                    size="small"
                    type="datetime"
                    placeholder="选择日期"
                  />
                </el-col>
              </el-form-item>
              <el-form-item v-else label="经办意见">
                <span style="display: block;text-indent: 1em;">{{ handleOpinion.opinionContent }}</span>
                <el-col :span="8" :offset="16">
                  <label>经办人:</label>
                  <span>{{ handleOpinion.handler }}</span>
                  <label
                    style="margin-left: 10px"
                  >经办日期:</label>
                  <span style="display: inline-block">{{ handleOpinion.handleDate }}</span>
                </el-col>
              </el-form-item>
            </el-row>
            <!-- 调查审核 -->
            <el-row>
              <el-form-item v-if="currentNode === 'handleRevCancel' && !onlyShow" label="审核意见" prop="opinion">
                <el-col :span="24">
                  <el-input
                    v-model="form.opinion"
                    :autosize="{ minRows: 2 }"
                    type="textarea"
                    placeholder="请输入意见"
                  />
                </el-col>
                <el-col :span="12">
                  <label style="font-size:14px">常用语</label>
                  <el-select
                    v-model="opinion"
                    placeholder="请选择"
                    clearable
                    style="margin-left: 10px;width: 80%"
                    class="custom"
                  >
                    <el-option
                      v-for="item in opinionOptions"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </el-col>
                <el-col :span="8" :offset="4">
                  <label>审核人:</label>
                  <span>{{ user.nickname }}</span>
                  <label
                    style="margin-left: 10px"
                  >审核日期:</label>
                  <el-date-picker
                    v-model="form.handledate"
                    style="display: inline-block"
                    :clearable="false"
                    value-format="yyyy-MM-dd HH:mm:ss"
                    format="yyyy-MM-dd HH:mm:ss"
                    size="small"
                    type="datetime"
                    placeholder="选择日期"
                  />
                </el-col>
              </el-form-item>
              <el-form-item v-else-if="this.$util.isNotEmpty(reviewOpinion.opinionContent)" label="审核意见">
                <span style="display: block;text-indent: 1em;">{{ reviewOpinion.opinionContent }}</span>
                <el-col :span="8" :offset="16">
                  <label>审核人:</label>
                  <span>{{ reviewOpinion.handler }}</span>
                  <label
                    style="margin-left: 10px"
                  >审核日期:</label>
                  <span style="display: inline-block">{{ reviewOpinion.handleDate }}</span>
                </el-col>
              </el-form-item>
            </el-row>
            <!-- 调查审批 -->
            <el-row>
              <el-form-item v-if="currentNode === 'approveRevCancel' && !onlyShow" label="审批意见" prop="opinion">
                <el-col :span="24">
                  <el-input
                    v-model="form.opinion"
                    :autosize="{ minRows: 2 }"
                    type="textarea"
                    placeholder="请输入意见"
                  />
                </el-col>
                <el-col :span="12">
                  <label style="font-size:14px">常用语</label>
                  <el-select
                    v-model="opinion"
                    placeholder="请选择"
                    clearable
                    style="margin-left: 10px;width: 80%"
                    class="custom"
                  >
                    <el-option
                      v-for="item in opinionOptions"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </el-col>
                <el-col :span="8" :offset="4">
                  <label>审批人:</label>
                  <span>{{ user.nickname }}</span>
                  <label
                    style="margin-left: 10px"
                  >审批日期:</label>
                  <el-date-picker
                    v-model="form.handledate"
                    style="display: inline-block"
                    :clearable="false"
                    value-format="yyyy-MM-dd HH:mm:ss"
                    format="yyyy-MM-dd HH:mm:ss"
                    size="small"
                    type="datetime"
                    placeholder="选择日期"
                  />
                </el-col>
              </el-form-item>
              <el-form-item v-else-if="this.$util.isNotEmpty(approvalOpinion.opinionContent)" label="审批意见">
                <span style="display: block;text-indent: 1em;">{{ approvalOpinion.opinionContent }}</span>
                <el-col :span="8" :offset="16">
                  <label>审批人:</label>
                  <span>{{ approvalOpinion.handler }}</span>
                  <label
                    style="margin-left: 10px"
                  >审批日期:</label>
                  <span style="display: inline-block">{{ approvalOpinion.handleDate }}</span>
                </el-col>
              </el-form-item>
            </el-row>
            <el-row v-if="!onlyShow">
              <el-form-item v-if="currentNode === 'revCancelEnter'" label="审核人" prop="reviewerId">
                <el-select
                  v-model="form.reviewerId"
                  filterable
                  clearable
                  placeholder="请选择审核人"
                  class="custom"
                >
                  <el-option
                    v-for="item in reviewer"
                    :key="'reviewer' + item.primaryKey"
                    :label="item.name"
                    :value="item.primaryKey"
                  />
                </el-select>
              </el-form-item>
            </el-row>
            <div v-if="currentNode === 'handleRevCancel' && !onlyShow">
              <el-row>
                <el-form-item label="是否通过" prop="nextNodeID">
                  <el-radio
                    v-model="nextNodeID"
                    label="approveRevCancel"
                  >通过</el-radio>
                  <el-radio
                    v-model="nextNodeID"
                    label="revCancelEnter"
                  >回退</el-radio>
                  <!-- 回退至经办人 -->
                </el-form-item>
              </el-row>
              <el-row>
                <el-form-item v-if="form.nextNodeID == 'approveRevCancel'" label="审批人" prop="reviewerId">
                  <el-select
                    v-model="form.reviewerId"
                    filterable
                    clearable
                    placeholder="请选择审批人"
                    class="custom"
                  >
                    <el-option
                      v-for="item in reviewer"
                      :key="'reviewer' + item.primaryKey"
                      :label="item.name"
                      :value="item.primaryKey"
                    />
                  </el-select>
                </el-form-item>
              </el-row>

            </div>
            <el-row>
              <el-form-item v-if="currentNode === 'approveRevCancel' && !onlyShow" label="是否通过" prop="nextNodeID">
                <el-radio
                  v-model="nextNodeID"
                  label="endRevCancel"
                >通过</el-radio>
                <el-radio
                  v-model="nextNodeID"
                  label="handleRevCancel"
                >回退</el-radio>
                <!-- 回退至审核人 -->
              </el-form-item>
            </el-row>
          </div>
        </div>
        <!-- <div class="form">
          <div class="tab">
            <div class="tab-title"><label>处理意见</label></div>
          </div>
          <div class="form-body history">
            <div v-if="historyLog.length == 0" class="none">暂无历史意见</div>
            <el-steps direction="vertical">
              <el-step v-for="(each,index) in historyLog" :key="'historyLog'+index" :title="each.step + '：' + each.handler + ' 处办日期：' + each.handledate" :description="each.opinioncontent" status="finish" />
            </el-steps>
          </div>
        </div>
        <div class="form">
          <div class="tab">
            <div class="tab-title"><label>经办意见</label></div>
          </div>
          <div class="form-body">
            <el-form-item label="经办意见" prop="opinion">
              <div style="display:inline-block;">
                <el-input v-model="form.opinion" type="textarea" placeholder="请输入经办意见" />
                <label>常用语</label>
                <el-select v-model="opinion" placeholder="请选择" class="custom">
                  <el-option
                    v-for="item in opinionOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  />
                </el-select>
              </div>
            </el-form-item>
            <el-form-item required label="后续操作" prop="nextNodeID">
              <el-radio-group v-model="form.nextNodeID">
                <el-radio label="handleCancel">送审核</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="后续处理人" prop="reviewerId">
              <el-select v-model="form.reviewerId" placeholder="请选择后续处理人" class="custom">
                <el-option
                  v-for="item in reviewer"
                  :key="'reviewer'+item.primaryKey"
                  :label="item.name"
                  :value="item.primaryKey"
                />
              </el-select>
            </el-form-item>
          </div>
        </div> -->
      </el-form>
      <div v-if="!onlyShow" class="submit-box">
        <el-button type="primary" :loading="submitLoading" @click="submitForm">提交</el-button>
        <el-button @click="$router.back()">返回</el-button>
      </div>
    </div>
  </div>
</template>

<script>
import DetailHead from '@/components/DetailHead'
import { taskOpinion } from '@/api/task'
import { getNewestOpinion, getRevCancelInfo, next } from '@/api/revoke'
import { getAllDepts } from '@/api/personate'
import { getUsersWithPermission } from '@/api/user'
export default {
  components: {
    DetailHead
  },
  data() {
    return {
      onlyShow: false,
      historyLog: [],
      form: {
        nextNodeID: '',
        opinion: '',
        handledate: ''
      },
      handleType: '',
      opinion: '',
      opinionOptions: [],
      user: JSON.parse(sessionStorage.getItem('user')),
      currentNode: '',
      // 意见-经办人
      handleOpinion: {
        handler: '',
        handleDate: '',
        opinionContent: ''
      },
      // 意见-审核人
      reviewOpinion: {
        handler: '',
        handleDate: '',
        opinionContent: ''
      },
      // 意见-审批人
      approvalOpinion: {
        handler: '',
        handleDate: '',
        opinionContent: ''
      },
      formRules: {
        cancelwritscontent: [
          { required: true, message: '请输入接收人', trigger: 'blur' }
        ],
        handlerdate: [
          { required: true, message: '请输入接收时间', trigger: 'blur' }
        ],
        handledecorg: [
          { required: true, message: '请输入线索内容', trigger: 'blur' }
        ],
        cancelwritsno: [
          { required: true, message: '请选择线索来源', trigger: 'blur' }
        ],
        opinion: [
          { required: true, message: '请输入经办意见', trigger: ['blur'] }
        ],
        reviewerId: [
          { required: true, message: '请选择审核人' }
        ],
        nextNodeID: [
          { required: true, message: '请选择审核人' }
        ]
      },
      orgList: [
        {
          value: '440101',
          label: '广州市市场监督管理局'
        },{
          value: '440103',
          label: '广州市荔湾区市场监督管理局'
        },{
          value: '440104',
          label: '广州市越秀区市场监督管理局'
        },{
          value: '440105',
          label: '广州市海珠区市场监督管理局'
        },{
          value: '440111',
          label: '广州市白云区市场监督管理局'
        },{
          value: '440112',
          label: '广州市黄埔区市场监督管理局'
        },{
          value: '440121',
          label: '广州市花都区市场监督管理局'
        },{
          value: '440122',
          label: '广州市从化区市场监督管理局'
        },{
          value: '440125',
          label: '广州市增城区市场监督管理局'
        },{
          value: '440126',
          label: '广州市番禺区市场监督管理局'
        },{
          value: '440110',
          label: '广州市南沙区市场监督管理局'
        },{
          value: '440106',
          label: '广州市天河区市场监督管理局'
        },{
          value: '440129',
          label: '广州市市场监督管理局登记注册二处'
        }
      ],
      opiniontype: '',
      nextNodeID: '',
      submitLoading: false,
      reviewer: []

    }
  },
  watch: {
    // 监听通过单选框给表单nextNodeID赋值
    'nextNodeID': {
      handler(newVal, oldVal) {
        this.$set(this.form, 'nextNodeID', newVal)
        this.$refs.form.validateField('nextNodeID')
      },
      deep: true
    },
    // 意见渲染
    opinion() {
      let name = ''
      this.opinionOptions.forEach(each => {
        if (this.opinion === each.value) {
          name = each.label
        }
      })
      if (this.$util.isNotEmpty(name)) {
        this.$set(this.form, 'opinion', name)
      }
      this.$refs.form.validateField('opinion')
    }
  },
  mounted() {
    this.bizseq = this.$route.query.bizseq
    this.workflowId = this.$route.query.workflowId
    this.tasklistid = this.$route.query.tasklistid
    this.handleType = this.$route.query.handleType
    this.currentNode = this.$route.query.currentNode
    this.onlyShow = this.$route.query.onlyShow === 'true'
    const allLoading = this.$loading({
      lock: true,
      text: '正在加载..',
      spinner: 'el-icon-loading',
      background: 'rgba(0, 0, 0, 0.7)'
    })
    this.getRevCancel().then(() => {
      const ps = []
      // 加载常用语
      this.getCommonWordList()
      // this.opinionOptions = this.$util.getCommonWordsWithModule(this.user.primaryKey, '撤销复议诉讼')

      // 加载处办记录
      // 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('加载处办记录失败')
      //   }
      // })
     // ps.push(this.getAllDeptList())
      if (this.currentNode === 'revCancelEnter') {
        this.nextNode = 'handleRevCancel'
        this.opiniontype = '0'
      } else if (this.currentNode === 'handleRevCancel') {
        this.nextNode = 'approveRevCancel'
        this.opiniontype = '1'
      } else if (this.currentNode === 'approveRevCancel') {
        this.opiniontype = '2'
      }
      // 加载审核人
      ps.push(this.loadReviewer())
      ps.push(this.getHandleOpinion(this.workflowId, '0'))
      ps.push(this.getReviewOpinion(this.workflowId, '1'))
      ps.push(this.getApprovalOpinion(this.workflowId, '2'))
      Promise.all(ps).finally(() => {
        allLoading.close()
      })
    })
  },
  methods: {
    // 加载常用语
    getCommonWordList() {
      this.opinionOptions = this.$util.getCommonWordsWithModule(this.user.primaryKey, '撤销复议诉讼')
    },
    // 加载决定机关
    getAllDeptList() {
      return getAllDepts().then(res => {
        if (res.code === 0) {
          const list = []
          res.data.forEach(each => {
            list.push({
              value: each.code,
              label: each.name
            })
          })
          this.orgList = list
        }
      })
    },
    // 获取撤销决定页面详情
    getRevCancel() {
      return getRevCancelInfo(this.bizseq).then(res => {
        if (res.code === 0) {
          this.form = res.data
        }
      })
    },
    // 获取最新经办意见
    getHandleOpinion(workflowid, opinionType) {
      return getNewestOpinion(workflowid, opinionType).then(res => {
        if (res.code === 0 && res.data !== null) {
          this.handleOpinion.opinionContent = res.data.opinioncontent
          this.handleOpinion.handler = res.data.handler
          this.handleOpinion.handleDate = this.$util.formatDate.format(new Date(Date.parse(res.data.handledate)), 'yyyy-MM-dd hh:mm:ss')
          if (this.currentNode === 'revCancelEnter') {
            this.$nextTick(() => {
              this.$set(this.form, 'opinion', res.data.opinioncontent)
              this.$set(this.form, 'handledate', res.data.handledate)
            })
          }
        } else {
          this.$set(this.form, 'handledate', this.$util.formatDate.format(new Date(), 'yyyy-MM-dd hh:mm:ss'))
        }
      })
    },
    // 获取最新审核意见
    getReviewOpinion(workflowid, opinionType) {
      return getNewestOpinion(workflowid, opinionType).then(res => {
        if (res.code === 0 && res.data !== null) {
          this.reviewOpinion.opinionContent = res.data.opinioncontent
          this.reviewOpinion.handler = res.data.handler
          this.reviewOpinion.handleDate = this.$util.formatDate.format(new Date(Date.parse(res.data.handledate)), 'yyyy-MM-dd hh:mm:ss')
          if (this.currentNode === 'handleRevCancel') {
            this.$nextTick(() => {
              this.$set(this.form, 'opinion', res.data.opinioncontent)
              this.$set(this.form, 'handledate', res.data.handledate)
            })
          }
        } else {
          this.$set(this.form, 'handledate', this.$util.formatDate.format(new Date(), 'yyyy-MM-dd hh:mm:ss'))
        }
      })
    },
    // 获取最新审批意见
    getApprovalOpinion(workflowid, opinionType) {
      return getNewestOpinion(workflowid, opinionType).then(res => {
        if (res.code === 0 && res.data !== null) {
          this.approvalOpinion.handler = res.data.handler
          this.approvalOpinion.handleDate = this.$util.formatDate.format(new Date(Date.parse(res.data.handledate)), 'yyyy-MM-dd hh:mm:ss')
          this.approvalOpinion.opinionContent = res.data.opinioncontent
          if (this.currentNode === 'approveRevCancel') {
            this.$nextTick(() => {
              this.$set(this.form, 'opinion', res.data.opinioncontent)
              this.$set(this.form, 'handledate', res.data.handledate)
            })
          }
        } else {
          this.$set(this.form, 'handledate', this.$util.formatDate.format(new Date(), 'yyyy-MM-dd hh:mm:ss'))
        }
      })
    },
    // 加载审核人
    loadReviewer() {
      return getUsersWithPermission(this.nextNode, this.user.orgId).then(res => {
        if (res.code === 0) {
          this.reviewer = res.data
        }
      })
    },
    // 发送提交
    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 = this.opiniontype
          this.form.handler = this.user.username
          this.form.handlerid = this.user.primaryKey
          this.form.opinioncontent = this.form.opinion
          this.form.tasklistid = this.tasklistid
          if (this.currentNode === 'revCancelEnter') {
            this.form.nextNodeID = 'handleRevCancel'
            this.form.nextPerformerids = this.form.reviewerId
          } else if (this.currentNode === 'handleRevCancel') {
            this.form.nextPerformerids = this.form.reviewerId === undefined ? '' : this.form.reviewerId
          }
          for (const i in this.reviewer) {
            if (this.reviewer[i].primaryKey === this.form.reviewerId) {
              this.form.nextPerformerNames = this.reviewer[i].name
            }
          }
          next(this.form).then(res => {
            this.submitLoading = false
            if (res.code === 0) {
              this.$message.success('提交成功')
              // this.$router.back()
              this.$router.push('/todo/list')
            } else {
              this.$confirm(res.msg, '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
              }).then(() => {
                this.form.isNext = '1'
                next(this.form).then(res => {
                  this.$message.success('提交成功')
                  this.$router.push('/todo/list')
                })
              })
            }
          })
        }).catch(() => {})
      })
    }
    // submitForm() {
    //   console.log(this.form)
    // }
  }
}
</script>

<style lang="scss" scoped>
.main-content{
  padding: 5pt;
  .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;
    }
  }
  .info{
    .p{
      margin: 5px;
    }
        text-indent: 2em;
        line-height: 30px;
        font-size: 16px;
        margin-top: 12px;
      }
}
</style>
<style lang="scss">
.main-content.revokeCancel{
  .el-form-item{
    margin-bottom:0;
    background: $color-form-label;
    .el-form-item__label{
      padding-left: 20px;
      border-top: 1px solid $color-border;
      border-left: 1px solid $color-border;
      font-size: $table-content-font-size;
    }
    .el-form-item__content{
      font-size: 16px;
      background: white;
      padding: 5px;
      border-top: 1px solid $color-border;
      border-right: 1px solid $color-border;
      border-left: 1px solid $color-border;
      font-size: $table-content-font-size;
      // min-height: 60px;
    }
  }
  .el-form-item:last-child{
    border-bottom: 1px solid $color-border;
  }
  .form-body.history{
    padding:15px;
    border:1px solid $color-border;
  }
  .form-body.history .none{
    font-size: 14px;
  }

  .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;
  }
  .upload .el-form-item__label::after{
    content: '(单个文件不能超过20M)';
    color: #F56C6C;
  }
  .el-textarea.is-disabled .el-textarea__inner{
    color: black;
  }
  .el-input.is-disabled .el-input__inner{
    color:black;
  }
.el-input.is-disabled .el-input__inner
  .el-input__inner{
    margin-bottom: 5px;
    width: 50%;
  }
}
</style>
