<template>
  <div>
    <table>
      <tr>
        <td colspan="16" style="background-color: #fff70036">
          <font style="color: red">注意：安全措施没有落实之前，不得执行任何工作！ 当现场出现报警，气体泄漏，撤离或其它紧急情况时，此作业证立即中止/取消!</font>
        </td>
      </tr>
      <tr>
        <td colspan="2">申请单位</td>
        <td colspan="4"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.applyUnit" class="editInput"/></td>
        <td colspan="2">申请人</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.proposer" class="editInput"/></td>
        <td colspan="2">作业证编号</td>
        <td colspan="4"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.licenceNum" class="editInput"/></td>
      </tr>
      <tr>
        <td colspan="2">动火级别</td>
        <td colspan="6">
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.flareUpSpecialType"/>特殊
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.flareUpFirstType"/>一级
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.flareUpSecondType"/>二级
        </td>
        <td colspan="4">涉及的其它特殊作业/作业证编号</td>
        <td colspan="4"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.otherLicenceNum" class="editInput"/></td>
      </tr>
      <tr>
        <td colspan="2">动火地点</td>
        <td colspan="4"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.flareUpLocation" class="editInput"/></td>
        <td colspan="2">动火作业内容</td>
        <td colspan="8"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.flareUpWorkContent" class="editInput"/></td>
      </tr>
      <tr>
        <td colspan="2">动火方式</td>
        <td colspan="14">
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.flareUpByWeld"/>焊接
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.flareUpByPolish"/>打磨
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.flareUpByCut"/>切割
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.flareUpBySandBlast"/>喷砂
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.flareUpByOther"/>其它：<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="flareUp.flareUpByOtherDetail" style="width: 250px;"/>
        </td>
      </tr>
      <tr>
        <td colspan="2">动火日期/时间</td>
        <td colspan="14">
          自<input class="editLine" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="startYear" style="width: 45px"/>年<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="startMonth" style="width: 45px"/>月<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="startDay" style="width: 45px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="startTime" class="editLine" style="width: 45px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="startMinute" class="editLine" style="width: 45px"/>分 始  至 <input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="endYear" class="editLine" style="width: 45px"/>年<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="endMonth" class="editLine" style="width: 45px"/>月<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="endDay" class="editLine" style="width: 45px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="endTime" class="editLine" style="width: 45px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="endMinute" class="editLine" style="width: 45px"/>分止
        </td>
      </tr>
      <tr>
        <td colspan="2">动火作业负责人</td>
        <td colspan="6"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.leader" class="editInput"/></td>
        <td colspan="2">监火人</td>
        <td colspan="6"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.guardian" class="editInput"/></td>
      </tr>
      <tr>
        <td colspan="2">动火人</td>
        <td colspan="14"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.flareUpPerson" class="editInput"/></td>
      </tr>
      <tr>
        <td colspan="2">动火人作业证号</td>
        <td colspan="14"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.flareUpWorkNum" class="editInput"/></td>
      </tr>
      <tr>
        <td colspan="2" style="background-color: #8080801c;">动火分析时间</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="firstDay" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="firstDay" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="firstMinute" style="width: 20px"/>分</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="secondDay" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="secondDay" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="secondMinute" style="width: 20px"/>分</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="thirdDay" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="thirdDay" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="thirdMinute" style="width: 20px"/>分</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="fourthDay" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="fourthDay" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="fourthMinute" style="width: 20px"/>分</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="fifthDay" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="fifthDay" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="fifthMinute" style="width: 20px"/>分</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="sixthDay" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="sixthDay" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="sixthMinute" style="width: 20px"/>分</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="seventhDay" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="seventhDay" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="seventhMinute" style="width: 20px"/>分</td>
      </tr>
      <tr>
        <td colspan="2" style="background-color: #8080801c;">分析点名称</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.firstFlareUpAnalyse.location" class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.secondFlareUpAnalyse.location" class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.thirdFlareUpAnalyse.location" class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.fourthFlareUpAnalyse.location" class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.fifthFlareUpAnalyse.location" class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.sixthFlareUpAnalyse.location" class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.seventhFlareUpAnalyse.location" class="editInput"/></td>
      </tr>
      <tr>
        <td colspan="2" style="background-color: #8080801c;">分析数据O2/LEL</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.firstFlareUpAnalyse.analyseData" class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.secondFlareUpAnalyse.analyseData" class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.thirdFlareUpAnalyse.analyseData" class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.fourthFlareUpAnalyse.analyseData" class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.fifthFlareUpAnalyse.analyseData" class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.sixthFlareUpAnalyse.analyseData" class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.seventhFlareUpAnalyse.analyseData" class="editInput"/></td>
      </tr>
      <tr>
        <td colspan="2" style="background-color: #8080801c;">分析人</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.firstFlareUpAnalyse.person" class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.secondFlareUpAnalyse.person" class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.thirdFlareUpAnalyse.person" class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.fourthFlareUpAnalyse.person"  class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.fifthFlareUpAnalyse.person" class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.sixthFlareUpAnalyse.person"  class="editInput"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.seventhFlareUpAnalyse.person" class="editInput"/></td>
      </tr>
      <tr>
        <td colspan="16" style="background-color: #8080801c;">取样与动火间隔不得超过30min，如超过此间隔或动火作业中断时间超过30min，必须重新取样分析。一二级动火作业2h监测一次，特殊动火作业期间需做到随时监测；</td>
      </tr>

      <tr>
        <td colspan="16" style="background-color: #fff70036">危害辨识与安全措施</td>
      </tr>

      <tr>
        <td>序号</td>
        <td colspan="3">危害辨识</td>
        <td colspan="10">安全措施</td>
        <td>选项</td>
        <td>确认人</td>
      </tr>
      <tr>
        <td>1</td>
        <td rowspan="9" colspan="3">
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.combustible"/>可燃物<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" class="editLine" v-model="flareUp.combustibleDetail" style="width:148px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.combustibleGas"/>易燃气体氛围<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.combustibleGasDetail" class="editLine" style="width:148px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.reactant"/>反应物<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.reactantDetail" class="editLine" style="width:148px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.oxidant"/>氧化剂<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.oxidantDetail" class="editLine" style="width:148px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.fireSource"/>点火源<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.fireSourceDetail" class="editLine" style="width:148px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.dangerous"/>不利环境条件<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.dangerousDetail" class="editLine" style="width:148px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.other"/>其它<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.otherDetail" class="editLine" style="width:148px"/>
        </td>
        <td colspan="10">动火设备、管道内部构件清理干净、置换、蒸汽吹扫或水洗，并经分析合格，达到动火条件。</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.condition.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.comfir" class="editInput"/></td>
      </tr>
      <tr>
        <td>2</td>
        <td colspan="10">断开与动火设备相连接的所有管线，锁定挂牌记录，加盲板<input v-model="flareUp.blindPlate.block" class="editLine" style="width: 30px"/>块隔断，并办理《盲板抽堵作业证》。</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.blindPlate.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.blindPlate.comfire" class="editInput"/></td>
      </tr>
      <tr>
        <td>3</td>
        <td colspan="10">动火附近周围的下水井、地漏、地沟、电缆沟等已清除易燃物，并采取覆盖、铺沙、水封等手段进行隔离。缆沟动火，清除沟内易燃气体、液体，必要时将沟两端隔绝。</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.isolated.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.isolated.comfire" class="editInput"/></td>
      </tr>
      <tr>
        <td>4</td>
        <td colspan="10">罐区内动火点同一围堰内和防火间距内的罐体（油罐）不同时进行脱水作业。</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.dehydration.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.dehydration.comfire" class="editInput"/></td>
      </tr>
      <tr>
        <td>5</td>
        <td colspan="10">动火点周围易燃物已移除，动火点30m内不应排放可燃气体；动火点15m内不应排放可燃液体；在动火点10m范围内及动火点下方不应同时进行可燃溶剂清洗或喷漆等作业；</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.remove.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.remove.comfire" class="editInput"/></td>
      </tr>
      <tr>
        <td>6</td>
        <td colspan="10">高处作业已采取防止火花飞溅措施，涉及作业高度距坠落基准面2m及以上高处作业应同时办理高处安全作业证；</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.height.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.height.comfire" class="editInput"/></td>
      </tr>
      <tr>
        <td>7</td>
        <td colspan="10">乙炔气瓶（直立放置），氧气瓶与之间距≥5m，二者与作业地点间距≥10m，并设置防晒设施；</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.gasCylinder.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.gasCylinder.comfire" class="editInput"/></td>
      </tr>
      <tr>
        <td>8</td>
        <td colspan="10">使用电焊机作业，办理临时用电安全作业证， 回路线已接在焊件上，把线未穿过下水井或与其他设备搭接；</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.elestic.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.elestic.comfire" class="editInput"/></td>
      </tr>
      <tr>
        <td>9</td>
        <td colspan="10">现场配备消防蒸汽带<input class="editLine" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.device.root" style="width: 30px"/>根，灭火器<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.device.platform" class="editLine" style="width: 30px"/>台，铁锹<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.device.grasp" class="editLine" style="width: 30px"/>把，防火毯<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.device.block" class="editLine" style="width: 30px"/>块。</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.device.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.device.comfire" class="editInput"/></td>
      </tr>
      <tr>
        <td>10</td>
        <td colspan="3">其他安全措施：</td>
        <td colspan="7"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.otherSafetyMeasures" class="editInput"/></td>
        <td colspan="3">实施安全教育人</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="flareUp.educator" class="editInput"/></td>
      </tr>
      <tr v-if="!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))">
        <td colspan="2" style="text-align: left">申请人(单位）意见：<textarea style="height:54%" :disabled="-1 == post.findIndex(item => item === -1) || flareUp.auditing.apply.status != '0'" v-model="flareUp.auditing.apply.opinion"></textarea></td>
        <td colspan="3" style="text-align: left">相关部门主管意见：<textarea style="height:80%" :disabled="-1 == post.findIndex(item => item === 11) || flareUp.auditing.major.status != '0'" v-model="flareUp.auditing.major.opinion"></textarea></td>
        <td colspan="3" style="text-align: left">安全部批准人审批意见(一级动火/二级动火)：<textarea style="height:54%" :disabled="-1 == post.findIndex(item => item === 7) || flareUp.auditing.safeDept.status != '0'" v-model="flareUp.auditing.safeDept.opinion"></textarea></td>
        <td colspan="3" style="text-align: left">工厂/运行经理审批意见(特殊动火)：<textarea style="height:54%" :disabled="-1 == post.findIndex(item => item === 8) || flareUp.auditing.factory.status != '0'" v-model="flareUp.auditing.factory.opinion"></textarea></td>
        <td colspan="3" style="text-align: left">生产班组长验票确认：<textarea style="height:80%" :disabled="-1 == post.findIndex(item => item === 9) || flareUp.auditing.produce.status != '0'" v-model="flareUp.auditing.produce.opinion"></textarea></td>
        <td colspan="2" style="text-align: left">完工验收：<textarea style="height:80%" :disabled="-1 == post.findIndex(item => item === -2) || flareUp.auditing.complete.status != '0'" v-model="flareUp.auditing.complete.opinion"></textarea></td>
      </tr>
      <tr v-if="!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))">
        <td colspan="2" style="text-align: left">
          <div>签名：</div>
          <Esign :resultImg.sync="flareUp.auditing.apply.sign" v-if ="-1 != post.findIndex(item => item === -1) || flareUp.auditing.apply.status != '0'" :height="100" :width="135"/>
          <textarea v-if ="-1 == post.findIndex(item => item === -1) && flareUp.auditing.apply.status == '0'" disabled style="height: 71%"></textarea>
          日期/时间：<input :disabled ="-1 == post.findIndex(item => item === -1) || flareUp.auditing.apply.status !='0'" v-model="flareUp.auditing.apply.date" class="editInput" style="height: 10px;width: 32px"/>
        </td>
        <td colspan="3" style="text-align: left">
          <div>签名：</div>
          <Esign :resultImg.sync="flareUp.auditing.major.sign" v-if ="-1 != post.findIndex(item => item === 11) || flareUp.auditing.major.status != '0'" :height="100" :width="135"/>
          <textarea v-if ="-1 == post.findIndex(item => item === 11) && flareUp.auditing.major.status == '0'" disabled style="height: 71%"></textarea>
          日期/时间：<input :disabled ="-1 == post.findIndex(item => item === 11) || flareUp.auditing.major.status !='0'" v-model="flareUp.auditing.major.date" class="editInput" style="height: 14px;width: 88px;"/>
        </td>
        <td colspan="3" style="text-align: left">
          <div>签名：</div>
          <Esign :resultImg.sync="flareUp.auditing.safeDept.sign" v-if ="-1 != post.findIndex(item => item === 7) || flareUp.auditing.safeDept.status != '0'" :height="100" :width="135"/>
          <textarea v-if ="-1 == post.findIndex(item => item === 7) && flareUp.auditing.safeDept.status == '0'" disabled style="height: 71%"></textarea>
          日期/时间：<input :disabled ="-1 == post.findIndex(item => item === 7) || flareUp.auditing.safeDept.status !='0'" v-model="flareUp.auditing.safeDept.date" class="editInput" style="height: 14px;width: 88px"/>
        </td>
        <td colspan="3" style="text-align: left">
          <div>签名：</div>
          <Esign :resultImg.sync="flareUp.auditing.factory.sign" v-if ="-1 != post.findIndex(item => item === 8) || flareUp.auditing.factory.status != '0'" :height="100" :width="135"/>
          <textarea v-if ="-1 == post.findIndex(item => item === 8) && flareUp.auditing.factory.status == '0'" disabled style="height: 71%"></textarea>
          日期/时间：<input :disabled ="-1 == post.findIndex(item => item === 8) || flareUp.auditing.factory.status !='0'" v-model="flareUp.auditing.factory.date" class="editInput" style="height: 14px;width: 88px"/>
        </td>
        <td colspan="3" style="text-align: left">
          <div>签名：</div>
          <Esign :resultImg.sync="flareUp.auditing.produce.sign" v-if ="-1 != post.findIndex(item => item === 9) || flareUp.auditing.produce.status != '0'" :height="100" :width="135"/>
          <textarea v-if ="-1 == post.findIndex(item => item === 9) && flareUp.auditing.produce.status == '0'" disabled style="height: 71%"></textarea>
          日期/时间：<input :disabled ="-1 == post.findIndex(item => item === 9) || flareUp.auditing.produce.status !='0'" v-model="flareUp.auditing.produce.date" class="editInput" style="height: 14px;width: 88px"/>
        </td>
        <td colspan="2" style="text-align: left">
          <div>签名：</div>
          <Esign :resultImg.sync="flareUp.auditing.complete.sign" v-if ="-1 != post.findIndex(item => item === -2) || flareUp.auditing.complete.status != '0'" :height="100" :width="135"/>
          <textarea v-if ="-1 == post.findIndex(item => item === -2) && flareUp.auditing.complete.status == '0'" disabled style="height: 71%"></textarea>
          日期/时间：<input :disabled ="-1 == post.findIndex(item => item === -2) || flareUp.auditing.complete.status !='0'" v-model="flareUp.auditing.complete.date" class="editInput" style="height: 14px;width: 32px"/>
        </td>
      </tr>
    </table>
    <div style="text-align: right;margin-top: 10px"
         v-if="(applyStatus == '0' && -1 != post.findIndex(item => item === -1) && flareUp.auditing.apply.status == '0') ||
         (applyStatus == '0' && -1 != post.findIndex(item => item === 11) && flareUp.auditing.major.status == '0') ||
         (applyStatus == '0' && -1 != post.findIndex(item => item === 7) && flareUp.auditing.safeDept.status == '0') ||
         (applyStatus == '0' && -1 != post.findIndex(item => item === 8) && flareUp.auditing.factory.status == '0') ||
         (applyStatus == '0' && -1 != post.findIndex(item => item === 9) && flareUp.auditing.produce.status == '0') ||
         (applyStatus == '0' && -1 != post.findIndex(item => item === -2) && flareUp.auditing.complete.status == '0')">
      <el-button type="primary" @click="suggestion('1')">同意</el-button>
      <el-button @click="suggestion('2')">驳回</el-button>
    </div>
  </div>
</template>

<script>
  import Esign from "./Esign";
    export default {
      name: "flare-up",
      props:{
        flareUp:{
          type:Object
        },
        //作业单申请状态
        applyStatus:{
          type:String,
          default: "0"
        },
        //岗位
        post:{
          type:Array
        }
      },
      components:{
        Esign
      },
      watch:{
        startMinute(newValue){
          if(this.startYear && this.startMonth && this.startDay &&  this.startTime && this.startMinute){
            this.flareUp.workStartTime = this.getStartTime();
          }
        },
        endMinute(newValue){
          if(this.endYear && this.endMonth && this.endDay &&  this.endTime && this.endMinute){
            this.flareUp.workEndTime = this.getEndTime();
          }
        },
        firstMinute(newValue){
          if(this.firstDay && this.firstTime && this.firstMinute){
            this.flareUp.firstFlareUpAnalyse.date = this.getdate(this.firstDay,this.firstTime,this.firstMinute);
          }
        },
        secondMinute(newValue){
          if(this.secondDay && this.secondTime && this.secondMinute){
            this.flareUp.secondFlareUpAnalyse.date = this.getdate(this.secondDay,this.secondTime,this.secondMinute);
          }
        },
        thirdMinute(newValue){
          if(this.thirdDay && this.thirdTime && this.thirdMinute){
            this.flareUp.thirdFlareUpAnalyse.date =  this.getdate(this.thirdDay,this.thirdTime,this.thirdMinute);
          }
        },
        fourthMinute(newValue){
          if(this.fourthDay && this.fourthTime && this.fourthMinute){
            this.flareUp.fourthFlareUpAnalyse.date =  this.getdate(this.fourthDay,this.fourthTime,this.fourthMinute);
          }
        },
        fifthMinute(newValue){
          if(this.fifthDay && this.fifthTime && this.fifthMinute){
            this.flareUp.fifthFlareUpAnalyse.date =  this.getdate(this.fifthDay,this.fifthTime,this.fifthMinute);
          }
        },
        sixthMinute(newValue){
          if(this.sixthDay && this.sixthTime && this.sixthMinute){
            this.flareUp.sixthFlareUpAnalyse.date = this.getdate(this.sixthDay,this.sixthTime,this.sixthMinute);
          }
        },
        seventhMinute(newValue){
          if(this.seventhDay && this.seventhTime && this.seventhMinute){
            this.flareUp.seventhFlareUpAnalyse.date =this.getdate(this.seventhDay,this.seventhTime,this.seventhMinute);
          }
        },
      },
      data(){
        return{
          startYear:"",
          startMonth:"",
          startDay:"",
          startTime:"",
          startMinute:"",
          endYear:"",
          endMonth:"",
          endDay:"",
          endTime:"",
          endMinute:"",
          firstDay:"",
          firstTime:"",
          firstMinute:"",
          secondDay:"",
          secondTime:"",
          secondMinute:"",
          thirdDay:"",
          thirdTime:"",
          thirdMinute:"",
          fourthDay:"",
          fourthTime:"",
          fourthMinute:"",
          fifthDay:"",
          fifthTime:"",
          fifthMinute:"",
          sixthDay:"",
          sixthTime:"",
          sixthMinute:"",
          seventhDay:"",
          seventhTime:"",
          seventhMinute:""
        }
      },
      methods:{
        //获取开始时间
        getStartTime(){
          return this.startYear + "-" +this.startMonth + "-" + this.startDay + " " + this.startTime + " : " + this.startMinute;
        },
        //获取结束时间
        getEndTime(){
          return this.endYear + "-" +this.endMonth + "-" + this.endDay + " " + this.endTime + " :  " + this.endMinute;
        },
        getdate(day,time,minute){
          return day + " " + time + " : " + minute;
        },
        //同意
        suggestion(type){
          if(-1 != this.post.findIndex(item => item === -1) && this.flareUp.auditing.apply.sign != "" && this.flareUp.auditing.apply.status == "0"){
            this.flareUp.auditing.apply.status = type;
          }
          if(-1 != this.post.findIndex(item => item === 11) && this.flareUp.auditing.major.sign != "" && this.flareUp.auditing.major.status == "0"){
            this.flareUp.auditing.major.status = type;
          }
          if(-1 != this.post.findIndex(item => item === 7) && this.flareUp.auditing.safeDept.sign != "" && this.flareUp.auditing.safeDept.status == "0"){
            this.flareUp.auditing.safeDept.status = type;
          }
          if(-1 != this.post.findIndex(item => item === 8) && this.flareUp.auditing.factory.sign != "" && this.flareUp.auditing.factory.status == "0"){
            this.flareUp.auditing.factory.status = type;
          }
          if(-1 != this.post.findIndex(item => item === 9) && this.flareUp.auditing.produce.sign != "" && this.flareUp.auditing.produce.status == "0"){
            this.flareUp.auditing.produce.status = type;
          }
          if(-1 != this.post.findIndex(item => item === -2) && this.flareUp.auditing.complete.sign != "" && this.flareUp.auditing.complete.status == "0"){
            this.flareUp.auditing.complete.status = type;
          }
          this.$emit("suggestion","flareUp",this.flareUp);
        },
      }
    }
</script>

<style scoped lang="scss">
  table{
    border-collapse: collapse;
    table-layout: fixed;
    text-align: center;
    width: 100%;
  }
  table td, table th{
    border: 1px solid;
    height: 30px;
  }

  .editInput{
    border: none;
    width: 100%;
    height: 100%;
    text-align: center;
  }

  .editInput:focus{
    outline: none;
  }

  .editLine{
    border-bottom: 1px solid;
    border-top: none;
    border-left: none;
    border-right: none;
    text-align: center;
  }

  .editLine:focus{
    outline: none;
  }


  textarea{
    height: 100%;
    width: 100%;
    border: none;
    resize:none;
  }

  textarea:focus{
    outline: none;
  }


</style>
