<template>
  <div>
    <table>
      <tr>
        <td colspan="21" style="background-color: #fff70036">
          <font style="color: red">注意：安全措施没有落实之前，不得执行任何工作！ 作业前30min内应对受限空间进行气体采样分析，分析合格后方可进入；作业中2h分析一次，作业中断30min应重新监测分析</font>
        </td>
      </tr>
      <tr>
        <td colspan="3">申请单位</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.applyUnit" class="editInput"/></td>
        <td colspan="3">申请人</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.proposer" class="editInput"/></td>
        <td colspan="3">作业编号</td>
        <td colspan="6"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.licenceNum" class="editInput"/></td>
      </tr>
      <tr>
        <td colspan="3">受限空间位置所属</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.beyongSpace" class="editInput"/></td>
        <td colspan="3">受限空间名称</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.spaceName" class="editInput"/></td>
        <td colspan="5">受限空间等级（降级/特殊)</td>
        <td colspan="4"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.spaceLevel" class="editInput"/></td>
      </tr>

      <tr>
        <td colspan="3">作业内容描述</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.workContent" class="editInput"/></td>
        <td colspan="3">受限空间内原有介</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.medium" class="editInput"/></td>
        <td colspan="5">涉及的其它特殊作业/作业证编</td>
        <td colspan="4"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.otherLicenceNum" class="editInput"/></td>
      </tr>
      <tr>
        <td colspan="3">作业日期/时间</td>
        <td colspan="18">
          自<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="startYear" class="editLine" style="width: 45px;"/>年<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="startMonth" class="editLine" style="width: 45px;"/>月<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="startDay" class="editLine" 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="3" style="background-color: #67f60e70">作业负责人</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.leader" class="editInput"/></td>
        <td colspan="3" style="background-color: #67f60e70">监护人</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.guardian" class="editInput"/></td>
        <td colspan="3" style="background-color: #67f60e70">作业人</td>
        <td colspan="6"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.worker" class="editInput"/></td>
      </tr>

      <tr>
        <td colspan="3" style="background-color: #8080801c;">分析时间</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="firstDay" class="editLine" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="firstTime" class="editLine" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="firstMinute" class="editLine" style="width: 20px"/>分</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="secondDay" class="editLine" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="secondTime" class="editLine" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="secondMinute" class="editLine" style="width: 20px"/>分</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="thirdDay" class="editLine" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="thirdTime" class="editLine" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="thirdMinute" class="editLine" style="width: 20px"/>分</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="fourthDay" class="editLine" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="fourthTime" class="editLine" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="fourthMinute" class="editLine" style="width: 20px"/>分</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="fifthDay" class="editLine" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="fifthTime" class="editLine" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="fifthMinute" class="editLine" style="width: 20px"/>分</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="sixthDay" class="editLine" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="sixthTime" class="editLine" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="sixthMinute" class="editLine" style="width: 20px"/>分</td>
      </tr>
      <tr>
        <td colspan="3" style="background-color: #8080801c;">分析项目O2/LEL/有毒</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.firstSpaceAnalyse.name" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.secondSpaceAnalyse.name" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.thirdSpaceAnalyse.name" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.fourthSpaceAnalyse.name" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.fifthSpaceAnalyse.name" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.sixthSpaceAnalyse.name" class="editInput"/></td>
      </tr>
      <tr>
        <td colspan="3" style="background-color: #8080801c;">分析数据</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.firstSpaceAnalyse.analyseData" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.secondSpaceAnalyse.analyseData" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.thirdSpaceAnalyse.analyseData" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.fourthSpaceAnalyse.analyseData" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.fifthSpaceAnalyse.analyseData" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.sixthSpaceAnalyse.analyseData" class="editInput"/></td>
      </tr>
      <tr>
        <td colspan="3" style="background-color: #8080801c;">分析人</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.firstSpaceAnalyse.person" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.secondSpaceAnalyse.person" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.thirdSpaceAnalyse.person" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.fourthSpaceAnalyse.person" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.fifthSpaceAnalyse.person" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.sixthSpaceAnalyse.person" class="editInput"/></td>
      </tr>

      <tr>
        <td colspan="3" style="background-color: #8080801c;">分析时间</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="seventhDay" class="editLine" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="seventhTime" class="editLine" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="seventhMinute" class="editLine" style="width: 20px"/>分</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="eighthDay" class="editLine" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="eighthTime" class="editLine" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="eighthMinute" class="editLine" style="width: 20px"/>分</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="ninethDay" class="editLine" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="ninethTime" class="editLine" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="ninethMinute" class="editLine" style="width: 20px"/>分</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="tenthDay" class="editLine" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="tenthTime" class="editLine" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="tenthMinute" class="editLine" style="width: 20px"/>分</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="elevenDay" class="editLine" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="elevenTime" class="editLine" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="elevenMinute" class="editLine" style="width: 20px"/>分</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="twelfthDay" class="editLine" style="width: 20px"/>日<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="twelfthTime" class="editLine" style="width: 20px"/>时<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="twelfthMinute" class="editLine" style="width: 20px"/>分</td>
      </tr>
      <tr>
        <td colspan="3" style="background-color: #8080801c;">分析项目O2/LEL/有毒</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.seventhSpaceAnalyse.name" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.eighthSpaceAnalyse.name" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.ninethSpaceAnalyse.name" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.tenthSpaceAnalyse.name" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.elevenSpaceAnalyse.name" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.twelfthSpaceAnalyse.name" class="editInput"/></td>
      </tr>
      <tr>
        <td colspan="3" style="background-color: #8080801c;">分析数据</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.seventhSpaceAnalyse.analyseData" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.eighthSpaceAnalyse.analyseData" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.ninethSpaceAnalyse.analyseData" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.tenthSpaceAnalyse.analyseData" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.elevenSpaceAnalyse.analyseData" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.twelfthSpaceAnalyse.analyseData" class="editInput"/></td>
      </tr>
      <tr>
        <td colspan="3" style="background-color: #8080801c;">分析人</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.seventhSpaceAnalyse.person" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.eighthSpaceAnalyse.person" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.ninethSpaceAnalyse.person" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.tenthSpaceAnalyse.person" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.elevenSpaceAnalyse.person" class="editInput"/></td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.twelfthSpaceAnalyse.person" class="editInput"/></td>
      </tr>

      <tr>
        <td colspan="21" style="background-color: #fff70036">危害辨识与安全措施</td>
      </tr>
      <tr>
        <td>序号</td>
        <td colspan="3">危害辨识</td>
        <td colspan="13">安全措施</td>
        <td colspan="2">选项</td>
        <td colspan="2">确认人</td>
      </tr>

      <tr>
        <td>1</td>
        <td rowspan="10" colspan="3">
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.poisonous"/>有毒有害介质<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.poisonousDetail" class="editLine" style="width: 115px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.combustible"/>可燃气<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.combustibleDetail" class="editLine" style="width: 115px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.oxygen"/>氧含量<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.oxygenDetail" class="editLine" style="width: 115px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.hit"/>物体打击<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.hitDetail" class="editLine" style="width: 115px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.elestic"/>电击<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.elesticDetail" class="editLine" style="width: 115px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.drop"/>坠落<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.dropDetail" class="editLine" style="width: 115"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.foreignMatter"/>异物遗留<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.foreignMatterDetail" class="editLine" style="width: 115px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.danger"/>不利环境条件<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.dangerDetail" class="editLine" style="width: 115px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.other"/>其它<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.otherDetail" class="editLine" style="width: 115px"/>
        </td>
        <td colspan="13">对进入受限空间危险性进行分析</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.dangerousAnalyse.isChecked" type="checkbox"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.dangerousAnalyse.comfir" class="editInput"/></td>
      </tr>
      <tr>
        <td>2</td>
        <td colspan="13">所有与受限空间有联系的阀门、管线加盲板隔离，列出盲板清单，落实抽堵盲板责任人，并确认已同时办理“盲板抽堵安全作业证”</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.blindPlate.isChecked" type="checkbox"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.blindPlate.comfir" class="editInput"/></td>
      </tr>
      <tr>
        <td>3</td>
        <td colspan="13">设备经过置换、吹扫、蒸煮</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.deviceDeal.isChecked" type="checkbox"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.deviceDeal.comfir" class="editInput"/></td>
      </tr>
      <tr>
        <td>4</td>
        <td colspan="13">设备打开通风孔进行自然通风，湿度适宜人员作业；必要时采用强制通风或佩戴空气呼吸器，不能用通氧气或富氧空气的方法补充氧</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.air.isChecked" type="checkbox"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.air.comfir" class="editInput"/></td>
      </tr>
      <tr>
        <td>5</td>
        <td colspan="13">相关设备进行处理，带搅拌机的设备已切断电源，电源开关处加锁或挂“禁止合闸”标示牌，设专人监护，（见《锁定挂牌记录表》）</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.cutPower.isChecked" type="checkbox"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.cutPower.comfir" class="editInput"/></td>
      </tr>
      <tr>
        <td>6</td>
        <td colspan="13">检查受限空间内部已具备作业条件，清罐时（无需用/已采用）防爆工具</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.proof.isChecked" type="checkbox"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.proof.comfir" class="editInput"/></td>
      </tr>
      <tr>
        <td>7</td>
        <td colspan="13">检查受限空间进出口通道，无阻碍人员进出的障碍物</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.obstacle.isChecked" type="checkbox"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.obstacle.comfir" class="editInput"/></td>
      </tr>
      <tr>
        <td>8</td>
        <td colspan="13">分析盛装过可燃有毒液体、气体的受限空间内的可燃、有毒有害气体含量</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.contents.isChecked" type="checkbox"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.contents.comfir" class="editInput"/></td>
      </tr>
      <tr>
        <td>9</td>
        <td colspan="13">作业人员清楚受限空间内存在的其他危险因素，如内部附件、集渣坑等</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.otherDangerous.isChecked" type="checkbox"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.otherDangerous.comfir" class="editInput"/></td>
      </tr>
      <tr>
        <td>10</td>
        <td colspan="13">作业监护措施：消防器材<input v-model="limitSpace.guardianMeasure.fire" class="editLine" style="width: 45px"/>、气防装备<input v-model="limitSpace.guardianMeasure.gas" class="editLine" style="width: 45px"/>、氧含量分析仪<input v-model="limitSpace.guardianMeasure.oxygen" class="editLine" style="width: 45px"/>及其它器材</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.guardianMeasure.isChecked" type="checkbox"/></td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.guardianMeasure.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>11</td>
        <td colspan="3">其他安全措施：</td>
        <td colspan="10"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.otherSafetyMeasures" class="editInput"/></td>
        <td colspan="3">实施安全教育人</td>
        <td colspan="4"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="limitSpace.educator" class="editInput"/></td>
      </tr>

      <tr v-if="!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))">
        <td colspan="4" style="text-align: left">专业主管意见：<textarea :disabled="-1 == post.findIndex(item => item === 6) || limitSpace.auditing.professionalMajor.status != '0'" v-model="limitSpace.auditing.professionalMajor.opinion" style="height: 70%"></textarea></td>
        <td colspan="5" style="text-align: left">安全部批准人审批意见：（降级受限空间）<textarea :disabled="-1 == post.findIndex(item => item === 7) || limitSpace.auditing.safeDept.status != '0'" v-model="limitSpace.auditing.safeDept.opinion" style="height: 50%"></textarea></td>
        <td colspan="4" style="text-align: left">工厂经理审批意见：（特殊许可受限空间）<textarea :disabled="-1 == post.findIndex(item => item === 12) || limitSpace.auditing.factoryMajor.status != '0'" v-model="limitSpace.auditing.factoryMajor.opinion" style="height: 50%"></textarea></td>
        <td colspan="4" style="text-align: left">生产班组长验票确认：<textarea :disabled="-1 == post.findIndex(item => item === 9) || limitSpace.auditing.produce.status != '0'" v-model="limitSpace.auditing.produce.opinion" style="height: 70%"></textarea></td>
        <td colspan="4" style="text-align: left">完工验收：<textarea :disabled="-1 == post.findIndex(item => item === -2) || limitSpace.auditing.complete.status != '0'" v-model="limitSpace.auditing.complete.opinion" style="height: 70%"></textarea></td>
      </tr>

      <tr v-if="!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))">
        <td colspan="4" style="text-align: left">
          <div>签名：</div>
          <Esign :resultImg.sync="limitSpace.auditing.professionalMajor.sign" v-if ="-1 != post.findIndex(item => item === 6) || limitSpace.auditing.professionalMajor.status != '0'" :height="100" :width="135"/>
          <textarea v-if ="-1 == post.findIndex(item => item === 6) && limitSpace.auditing.professionalMajor.status == '0'" disabled style="height: 72%"></textarea>
          日期/时间：<input :disabled ="-1 == post.findIndex(item => item === 6) || limitSpace.auditing.professionalMajor.status !='0'" v-model="limitSpace.auditing.professionalMajor.date" class="editInput" style="height: 16px;width: 85px"/>
        </td>
        <td colspan="5" style="text-align: left">
          <div>签名：</div>
          <Esign :resultImg.sync="limitSpace.auditing.safeDept.sign" v-if ="-1 != post.findIndex(item => item === 7) || limitSpace.auditing.safeDept.status != '0'" :height="100" :width="135"/>
          <textarea v-if ="-1 == post.findIndex(item => item === 7) && limitSpace.auditing.safeDept.status == '0'" disabled style="height: 72%"></textarea>
          日期/时间：<input :disabled ="-1 == post.findIndex(item => item === 7) || limitSpace.auditing.safeDept.status !='0'" v-model="limitSpace.auditing.safeDept.date" class="editInput" style="height: 14px;width: 120px"/>
        </td>
        <td colspan="4" style="text-align: left">
          <div>签名：</div>
          <Esign :resultImg.sync="limitSpace.auditing.factoryMajor.sign" v-if ="-1 != post.findIndex(item => item === 12) || limitSpace.auditing.factoryMajor.status != '0'" :height="100" :width="135"/>
          <textarea v-if ="-1 == post.findIndex(item => item === 12) && limitSpace.auditing.factoryMajor.status == '0'" disabled style="height: 72%"></textarea>
          日期/时间：<input :disabled ="-1 == post.findIndex(item => item === 12) || limitSpace.auditing.factoryMajor.status !='0'" v-model="limitSpace.auditing.factoryMajor.date" class="editInput" style="height: 14px;width: 90px"/>
        </td>
        <td colspan="4" style="text-align: left">
          <div>签名：</div>
          <Esign :resultImg.sync="limitSpace.auditing.produce.sign" v-if ="-1 != post.findIndex(item => item === 9) || limitSpace.auditing.produce.status != '0'" :height="100" :width="135"/>
          <textarea v-if ="-1 == post.findIndex(item => item === 9) && limitSpace.auditing.produce.status == '0'" disabled style="height: 72%"></textarea>
          日期/时间：<input :disabled ="-1 == post.findIndex(item => item === 9) || limitSpace.auditing.produce.status !='0'" v-model="limitSpace.auditing.produce.date" class="editInput" style="height: 14px;width: 90px"/>
        </td>
        <td colspan="4" style="text-align: left">
          <div>签名：</div>
          <Esign :resultImg.sync="limitSpace.auditing.complete.sign" v-if ="-1 != post.findIndex(item => item === -2) || limitSpace.auditing.complete.status != '0'" :height="100" :width="135"/>
          <textarea v-if ="-1 == post.findIndex(item => item === -2) && limitSpace.auditing.complete.status == '0'" disabled style="height: 72%"></textarea>
          日期/时间：<input :disabled ="-1 == post.findIndex(item => item === -2) || limitSpace.auditing.complete.status !='0'" v-model="limitSpace.auditing.complete.date" class="editInput" style="height: 14px;width: 90px"/>
        </td>
      </tr>

    </table>
    <div style="text-align: right;margin-top: 10px"
         v-if="(applyStatus == '0' && -1 != post.findIndex(item => item === 6) && limitSpace.auditing.professionalMajor.status == '0') ||
         (applyStatus == '0' && -1 != post.findIndex(item => item === 7) && limitSpace.auditing.safeDept.status == '0') ||
         (applyStatus == '0' && -1 != post.findIndex(item => item === 12) && limitSpace.auditing.factoryMajor.status == '0') ||
         (applyStatus == '0' && -1 != post.findIndex(item => item === 9) && limitSpace.auditing.produce.status == '0') ||
         (applyStatus == '0' && -1 != post.findIndex(item => item === -2) && limitSpace.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: "limit-space",
      props:{
          limitSpace:{
            type:Object
          },
        //作业单申请状态
          applyStatus:{
            type:String,
            default: "0"
          },
          //岗位
          post:{
            type:Array
          }
      },
      components:{
        Esign
      },
      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:"",
          eighthDay:"",
          eighthTime:"",
          eighthMinute:"",
          ninethDay:"",
          ninethTime:"",
          ninethMinute:"",
          tenthDay:"",
          tenthTime:"",
          tenthMinute:"",
          elevenDay:"",
          elevenTime:"",
          elevenMinute:"",
          twelfthDay:"",
          twelfthTime:"",
          twelfthMinute:""
        }
      },
      watch:{
        startMinute(newValue){
          if(this.startYear && this.startMonth && this.startDay &&  this.startTime && this.startMinute){
            this.limitSpace.workStartTime = this.getStartTime();
          }
        },
        endMinute(newValue){
          if(this.endYear && this.endMonth && this.endDay &&  this.endTime && this.endMinute){
            this.limitSpace.workEndTime = this.getEndTime();
          }
        },
        firstMinute(newValue){
          if(this.firstDay && this.firstTime && this.firstMinute){
            this.limitSpace.firstSpaceAnalyse.date = this.getdate(this.firstDay,this.firstTime,this.firstMinute);
          }
        },
        secondMinute(newValue){
          if(this.secondDay && this.secondTime && this.secondMinute){
            this.limitSpace.secondSpaceAnalyse.date = this.getdate(this.secondDay,this.secondTime,this.secondMinute);
          }
        },
        thirdMinute(newValue){
          if(this.thirdDay && this.thirdTime && this.thirdMinute){
            this.limitSpace.thirdSpaceAnalyse.date =  this.getdate(this.thirdDay,this.thirdTime,this.thirdMinute);
          }
        },
        fourthMinute(newValue){
          if(this.fourthDay && this.fourthTime && this.fourthMinute){
            this.limitSpace.fourthSpaceAnalyse.date =  this.getdate(this.fourthDay,this.fourthTime,this.fourthMinute);
          }
        },
        fifthMinute(newValue){
          if(this.fifthDay && this.fifthTime && this.fifthMinute){
            this.limitSpace.fifthSpaceAnalyse.date =  this.getdate(this.fifthDay,this.fifthTime,this.fifthMinute);
          }
        },
        sixthMinute(newValue){
          if(this.sixthDay && this.sixthTime && this.sixthMinute){
            this.limitSpace.sixthSpaceAnalyse.date = this.getdate(this.sixthDay,this.sixthTime,this.sixthMinute);
          }
        },
        seventhMinute(newValue){
          if(this.seventhDay && this.seventhTime && this.seventhMinute){
            this.limitSpace.seventhSpaceAnalyse.date =this.getdate(this.seventhDay,this.seventhTime,this.seventhMinute);
          }
        },
        eighthMinute(newValue){
          if(this.eighthDay && this.eighthTime && this.eighthMinute){
            this.limitSpace.eighthSpaceAnalyse.date =this.getdate(this.eighthDay,this.eighthTime,this.eighthMinute);
          }
        },
        ninethMinute(newValue){
          if(this.ninethDay && this.ninethTime && this.ninethMinute){
            this.limitSpace.ninethSpaceAnalyse.date =this.getdate(this.ninethDay,this.ninethTime,this.ninethMinute);
          }
        },
        tenthMinute(newValue){
          if(this.tenthDay && this.tenthTime && this.tenthMinute){
            this.limitSpace.tenthSpaceAnalyse.date =this.getdate(this.tenthDay,this.tenthTime,this.tenthMinute);
          }
        },
        elevenMinute(newValue){
          if(this.elevenDay && this.elevenTime && this.elevenMinute){
            this.limitSpace.elevenSpaceAnalyse.date =this.getdate(this.elevenDay,this.elevenTime,this.elevenMinute);
          }
        },
        twelfthMinute(newValue){
          if(this.twelfthDay && this.twelfthTime && this.twelfthMinute){
            this.limitSpace.twelfthSpaceAnalyse.date =this.getdate(this.twelfthDay,this.twelfthTime,this.twelfthMinute);
          }
        },

      },
      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 === 6) && this.limitSpace.auditing.professionalMajor.sign != "" && this.limitSpace.auditing.professionalMajor.status == "0"){
            this.limitSpace.auditing.professionalMajor.status = type;
          }
          if(-1 != this.post.findIndex(item => item === 7) && this.limitSpace.auditing.safeDept.sign != "" && this.limitSpace.auditing.safeDept.status == "0"){
            this.limitSpace.auditing.safeDept.status = type;
          }
          if(-1 != this.post.findIndex(item => item === 12) && this.limitSpace.auditing.factoryMajor != "" && this.limitSpace.auditing.factoryMajor.status == "0"){
            this.limitSpace.auditing.factoryMajor.status = type;
          }
          if(-1 != this.post.findIndex(item => item === 9) && this.limitSpace.auditing.produce.sign != "" && this.limitSpace.auditing.produce.status == "0"){
            this.limitSpace.auditing.produce.status = type;
          }
          if(-1 != this.post.findIndex(item => item === -2) && this.limitSpace.auditing.complete.sign != "" && this.limitSpace.auditing.complete.status == "0"){
            this.limitSpace.auditing.complete.status = type;
          }
          this.$emit("suggestion","limitSpace",this.limitSpace);
        },
      }
    }
</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>
