<template>
  <div>
    <table>
      <tr>
        <td colspan="13" style="background-color: #fff70036">
          <font style="color: red">注意：安全措施没有落实之前，不得执行任何工作！ 如果签发许可证后超过2小时仍未开工作业，必须重新办理。 </font>
        </td>
      </tr>
      <tr>
        <td colspan="2">申请单位</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.applyUnit" class="editInput"/></td>
        <td>申请人</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.proposer" class="editInput"/></td>
        <td colspan="2">作业编号</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.licenceNum" class="editInput"/></td>
      </tr>

      <tr>
        <td colspan="2">吊装作业级别</td>
        <td colspan="3">
          <input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.firstWorkType" type="checkbox"/>一级
          <input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.secondWorkType" type="checkbox"/>二级
          <input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.thirdWorkType" type="checkbox"/>三级
        </td>
        <td colspan="4">涉及的其它特殊作业/作业证编号</td>
        <td colspan="4"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.otherLicenceNum" class="editInput"/></td>
      </tr>
      <tr>
        <td colspan="2">吊装作业地点</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.hoistingLocation" class="editInput"/></td>
        <td colspan="2">起吊重物质量(T)</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.hoistingWight" class="editInput"/></td>
        <td colspan="2">起吊工具名称</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.hoistingToolsName" class="editInput"/></td>
      </tr>

      <tr>
        <td colspan="2">吊装人员证号</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.personNum" class="editInput"/></td>
        <td colspan="2">指挥人员证号</td>
        <td colspan="6"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.commondNum" class="editInput"/></td>
      </tr>

      <tr>
        <td colspan="2">吊装作业内容描述</td>
        <td colspan="11"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.content" class="editInput"/></td>
      </tr>

      <tr>
        <td colspan="2">作业日期/时间</td>
        <td colspan="11">自<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="2" style="background-color: #67f60e70">作业负责人</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.leader" class="editInput"/></td>
        <td colspan="2" style="background-color: #67f60e70">监护人</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.guardian" class="editInput"/></td>
        <td style="background-color: #67f60e70">作业人</td>
        <td colspan="3"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.worker" class="editInput"/></td>
      </tr>
      <tr>
        <td colspan="13" style="background-color: #fff70036">危害辨识与安全措施</td>
      </tr>
      <tr>
        <td>序号</td>
        <td colspan="2">危害辨识</td>
        <td colspan="8">安全措施</td>
        <td>选项</td>
        <td>确认人</td>
      </tr>
      <tr>
        <td>1</td>
        <td rowspan="30" colspan="2">
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.qualifications"/>吊装设备及资质<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.qualificationsDetail" class="editLine" style="width: 125px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.brace"/>吊具支撑<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.braceDetail" class="editLine" style="width: 125px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.load"/>吊物荷重与吊机距离起重荷重<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.loadDetail" class="editLine" style="width: 125px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.hoistingStatus"/>吊具状态<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.hoistingStausDetail" class="editLine" style="width: 125px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.hoistingSafeDistance"/>与电气线路安全距离<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.hoistingSafeDistanceDetail" class="editLine" style="width: 125px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.importantDevice"/>起吊路线下方无人员和重要设备<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.importantDeviceDetail" class="editLine" style="width: 125px"/>
          <input type="checkbox" :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.other"/>其它<input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.otherDetail" class="editLine" style="width: 125px"/>
        </td>
        <td colspan="8">吊装质量大于等于40t的重物和土建工程主体结构；吊装物体虽不足40t，但形状复杂、刚度小、长径比大、精密贵重，作业条件特殊，已编制吊装作业方案，且经作业主管部门和安全管理部门审查，报主管（副总经理/总工程师批准）</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.quality.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.quality.comfir" class="editInput"/></td>
      </tr>
      <tr>
        <td>2</td>
        <td colspan="8">指派专人监护，并坚守岗位，非作业人员禁止入内</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.post.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.post.comfir" class="editInput"/></td>
      </tr>
      <tr>
        <td>3</td>
        <td colspan="8">作业人员已按规定佩戴防护器具和个体防护用品</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.protect.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.protect.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>4</td>
        <td colspan="8">已与工艺负责人取得联系，建立联系信号</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.signal.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.signal.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>5</td>
        <td colspan="8">已在吊装现场设置安全警戒标志，无关人员不许进入作业现场；夜间作业采用足够的照明</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.warnMark.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.warnMark.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>6</td>
        <td colspan="8">室外作业遇到（大雪/暴雨/大雾/六级以上大风），已停止作业</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.weather.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.weather.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>7</td>
        <td colspan="8">检查起重吊装设备、钢丝绳、缆风绳、链条、吊钩等各种机具，保证安全可靠</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.check.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.check.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>8</td>
        <td colspan="8">明确分工、坚守岗位、并按规定的联络信号，统一指挥</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.command.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.command.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>9</td>
        <td colspan="8">将建筑物、构筑物作为锚点，需经工程处审查核算并批准</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.approval.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.approval.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>10</td>
        <td colspan="8">吊装绳索、缆风绳、拖拉绳等避免同带电线路接触，并保持安全距离</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.safeDistance.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.safeDistance.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>11</td>
        <td colspan="8">人员随同吊装重物或吊装机械升降，应采取可靠的安全措施，并经过现场指挥人员批准</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.measure.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.measure.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>12</td>
        <td colspan="8">利用管道、管架、电杆、机电设备等作吊装锚点，不准吊装</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.pipe.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.pipe.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>13</td>
        <td colspan="8">悬吊重物下方站人、通行和工作，不准吊装</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.underHosting.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.underHosting.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>14</td>
        <td colspan="8">超负荷或重物质量不明，不准吊装</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.overLoad.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.overLoad.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>15</td>
        <td colspan="8">斜拉重物、重物埋在地下或重物坚固不牢，绳打结、绳不齐，不准吊装</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.rope.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.rope.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>16</td>
        <td colspan="8">棱角重物没有衬垫措施，不准吊装</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.corners.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.corners.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>17</td>
        <td colspan="8">安全装置失灵，不准吊装</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.loseMeasure.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.loseMeasure.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>18</td>
        <td colspan="8">用定型起重吊装机械（履带吊车/轮胎吊车/轿式吊车等）进行吊装作业，遵守该定型机械的操作规程</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.standerOperator.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.standerOperator.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>19</td>
        <td colspan="8">作业过程中应先用低高度、短行程试吊</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.process.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.process.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>20</td>
        <td colspan="8">作业现场出现危险品泄漏，立即停止作业，撤离人员</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.leak.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.leak.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>21</td>
        <td colspan="8">作业完成后现场杂物已清理</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.clean.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.clean.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>22</td>
        <td colspan="8">吊装作业人员持有法定的有效的证件</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.licence.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.licence.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>23</td>
        <td colspan="8">地下通讯电（光）缆、局域网络（光）缆、排水沟的盖板，承重吊装机械的负重量已确认，保护措施已落实</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.underElestic.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.underElestic.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>24</td>
        <td colspan="8">起吊物的质量<input class="editLine" style="width: 30px"/>t，已确认，在吊装机械的承重范围</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.hoistingRange.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.hoistingRange.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>25</td>
        <td colspan="8">在吊装高度的管线、电缆桥架已做好防护措施</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.hoistingRange.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.hoistingRange.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>26</td>
        <td colspan="8">作业现场围栏、警戒线、警告牌、夜间警示灯已按要求设置</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.warnSetting.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.warnSetting.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>27</td>
        <td colspan="8">作业高度和转臂范围内，无架空线路</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.swivelArm.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.swivelArm.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>28</td>
        <td colspan="8">人员出入口和撤离安全措施已落实：A.指示牌；B.指示灯</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.export.choice" class="editInput"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.export.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>29</td>
        <td colspan="8">在爆炸危险生产区域内作业，机动车排气管已装火星熄灭器</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.flameout.isChecked" type="checkbox"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.flameout.comfir" class="editInput"/></td>
      </tr>

      <tr>
        <td>30</td>
        <td colspan="8">现场夜间有充足的照明：36V、24V、12V防水型灯；36V、24V、12V防爆型灯</td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.light.choice" class="editInput"/></td>
        <td><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.light.comfir" class="editInput"/></td>
      </tr>
      <tr>
        <td>31</td>
        <td colspan="2">其他安全措施：</td>
        <td colspan="6"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.otherSafetyMeasures" class="editInput"/></td>
        <td colspan="2">实施安全教育人</td>
        <td colspan="2"><input :disabled= "!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))" v-model="hoisting.educator" class="editInput"/></td>
      </tr>

      <tr v-if="!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))">
        <td colspan="3" style="text-align: left">工厂专业部门意见：<textarea :disabled="-1 == post.findIndex(item => item === 12) || hoisting.auditing.factoryMajor.status != '0'" v-model="hoisting.auditing.factoryMajor.opinion" style="height: 70%"></textarea></td>
        <td colspan="2" style="text-align: left">专业主管批准人意见：<textarea :disabled="-1 == post.findIndex(item => item === 6) || hoisting.auditing.professionalMajor.status != '0'" v-model="hoisting.auditing.professionalMajor.opinion" style="height: 50%"></textarea></td>
        <td colspan="2" style="text-align: left">安全部批准人审批意见：<textarea :disabled="-1 == post.findIndex(item => item === 7) || hoisting.auditing.safeDept.status != '0'" v-model="hoisting.auditing.safeDept.opinion" style="height: 50%"></textarea></td>
        <td colspan="2" style="text-align: left">经理审批意见：<textarea :disabled="-1 == post.findIndex(item => item === 11) || hoisting.auditing.major.status != '0'" v-model="hoisting.auditing.major.opinion" style="height: 70%"></textarea></td>
        <td colspan="2" style="text-align: left">生产班组长验票确认：<textarea :disabled="-1 == post.findIndex(item => item === 9) || hoisting.auditing.produce.status != '0'" v-model="hoisting.auditing.produce.opinion" style="height: 50%"></textarea></td>
        <td colspan="2" style="text-align: left">完工验收：<textarea :disabled="-1 == post.findIndex(item => item === -2) || hoisting.auditing.complete.status != '0'" v-model="hoisting.auditing.complete.opinion" style="height: 70%"></textarea></td>
      </tr>

      <tr v-if="!((applyStatus == '' || applyStatus == '2') && -1 != post.findIndex(item => item === -1))">
        <td colspan="3" style="text-align: left">
          <div>签名：</div>
          <Esign :resultImg.sync="hoisting.auditing.factoryMajor.sign" v-if ="-1 != post.findIndex(item => item === 12) || hoisting.auditing.factoryMajor.status != '0'" :height="100" :width="135"/>
          <textarea v-if ="-1 == post.findIndex(item => item === 12) && hoisting.auditing.factoryMajor.status == '0'" disabled style="height: 72%"></textarea>
          日期/时间：<input  :disabled ="-1 == post.findIndex(item => item === 12) || hoisting.auditing.factoryMajor.status !='0'" v-model="hoisting.auditing.factoryMajor.date" class="editInput" style="height: 10px;width: 120px"/>
        </td>
        <td colspan="2" style="text-align: left">
          <div>签名：</div>
          <Esign :resultImg.sync="hoisting.auditing.professionalMajor.sign" v-if ="-1 != post.findIndex(item => item === 6) || hoisting.auditing.professionalMajor.status != '0'" :height="100" :width="135"/>
          <textarea v-if ="-1 == post.findIndex(item => item === 6) && hoisting.auditing.professionalMajor.status == '0'" disabled style="height: 72%"></textarea>
          日期/时间：<input :disabled ="-1 == post.findIndex(item => item === 6) || hoisting.auditing.professionalMajor.status !='0'" v-model="hoisting.auditing.professionalMajor.date" class="editInput" style="height: 10px;width: 58px"/>
        </td>
        <td colspan="2" style="text-align: left">
          <div>签名：</div>
          <Esign :resultImg.sync="hoisting.auditing.safeDept.sign" v-if ="-1 != post.findIndex(item => item === 7) || hoisting.auditing.safeDept.status != '0'" :height="100" :width="135"/>
          <textarea v-if ="-1 == post.findIndex(item => item === 7) && hoisting.auditing.safeDept.status == '0'" disabled style="height: 72%"></textarea>
          日期/时间：<input :disabled ="-1 == post.findIndex(item => item === 7) || hoisting.auditing.safeDept.status !='0'" v-model="hoisting.auditing.safeDept.date" class="editInput" style="height: 10px;width: 58px"/>
        </td>
        <td colspan="2" style="text-align: left">
          <div>签名：</div>
          <Esign :resultImg.sync="hoisting.auditing.major.sign" v-if ="-1 != post.findIndex(item => item === 11) || hoisting.auditing.major.status != '0'" :height="100" :width="135"/>
          <textarea v-if ="-1 == post.findIndex(item => item === 11) && hoisting.auditing.major.status == '0'" disabled style="height: 72%"></textarea>
          日期/时间：<input :disabled ="-1 == post.findIndex(item => item === 11) || hoisting.auditing.major.status !='0'" v-model="hoisting.auditing.major.date" class="editInput" style="height: 10px;width: 58px"/>
        </td>
        <td colspan="2" style="text-align: left">
          <div>签名：</div>
          <Esign :resultImg.sync="hoisting.auditing.produce.sign" v-if ="-1 != post.findIndex(item => item === 9) || hoisting.auditing.produce.status != '0'" :height="100" :width="135"/>
          <textarea v-if ="-1 == post.findIndex(item => item === 9) && hoisting.auditing.produce.status == '0'" disabled style="height: 72%"></textarea>
          日期/时间：<input :disabled ="-1 == post.findIndex(item => item === 9) || hoisting.auditing.produce.status !='0'" v-model="hoisting.auditing.produce.date" class="editInput" style="height: 10px;width: 58px"/>
        </td>
        <td colspan="2" style="text-align: left">
          <div>签名：</div>
          <Esign :resultImg.sync="hoisting.auditing.complete.sign" v-if ="-1 != post.findIndex(item => item === -2) || hoisting.auditing.complete.status != '0'" :height="100" :width="135"/>
          <textarea v-if ="-1 == post.findIndex(item => item === -2) && hoisting.auditing.complete.status == '0'" disabled style="height: 72%"></textarea>
          日期/时间：<input :disabled ="-1 == post.findIndex(item => item === -2) || hoisting.auditing.complete.status !='0'" v-model="hoisting.auditing.complete.date" class="editInput" style="height: 10px;width: 58px"/>
        </td>
      </tr>
    </table>
    <div style="text-align: right;margin-top: 10px"
         v-if="(applyStatus == '0' && -1 != post.findIndex(item => item === 12) && hoisting.auditing.factoryMajor.status == '0') ||
         (applyStatus == '0' && -1 != post.findIndex(item => item === 6) && hoisting.auditing.professionalMajor.status == '0') ||
         (applyStatus == '0' && -1 != post.findIndex(item => item === 7) && hoisting.auditing.safeDept.status == '0') ||
         (applyStatus == '0' && -1 != post.findIndex(item => item === 11) && hoisting.auditing.major.status == '0') ||
         (applyStatus == '0' && -1 != post.findIndex(item => item === 9) && hoisting.auditing.produce.status == '0') ||
         (applyStatus == '0' && -1 != post.findIndex(item => item === -2) && hoisting.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: "hoisting-work",
      props:{
        hoisting:{
          type:Object
        },
        //作业单申请状态
        applyStatus:{
          type:String,
          default: "0"
        },
        //岗位
        post:{
          type:Array
        }
      },
      components:{
        Esign
      },
      data(){
        return{
          startYear:"",
          startMonth:"",
          startDay:"",
          startTime:"",
          startMinute:"",
          endYear:"",
          endMonth:"",
          endDay:"",
          endTime:"",
          endMinute:""
        }
      },
      watch:{
        startMinute(newValue){
          if(this.startYear && this.startMonth && this.startDay &&  this.startTime && this.startMinute){
            this.hoisting.workStartTime = this.getStartTime();
          }
        },
        endMinute(newValue){
          if(this.endYear && this.endMonth && this.endDay &&  this.endTime && this.endMinute){
            this.hoisting.workEndTime = this.getEndTime();
          }
        }
      },
      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;
        },
        //同意
        suggestion(type){
          if(-1 != this.post.findIndex(item => item === 12) && this.hoisting.auditing.factoryMajor.sign != '' && this.hoisting.auditing.factoryMajor.status == '0'){
            this.hoisting.auditing.factoryMajor.status = type;
          }
          if(-1 != this.post.findIndex(item => item === 6) && this.hoisting.auditing.professionalMajor.sign != '' && this.hoisting.auditing.professionalMajor.status == '0'){
            this.hoisting.auditing.professionalMajor.status = type;
          }
          if(-1 != this.post.findIndex(item => item === 7) && this.hoisting.auditing.safeDept.sign != '' && this.hoisting.auditing.safeDept.status == '0'){
            this.hoisting.auditing.safeDept.status = type;
          }
          if(-1 != this.post.findIndex(item => item === 11) && this.hoisting.auditing.major.sign != '' && this.hoisting.auditing.major.status == '0'){
            this.hoisting.auditing.major.status = type;
          }
          if(-1 != this.post.findIndex(item => item === 9) && this.hoisting.auditing.produce.sign != '' && this.hoisting.auditing.produce.status == '0'){
            this.hoisting.auditing.produce.status = type;
          }
          if(-1 != this.post.findIndex(item => item === -2) && this.hoisting.auditing.complete.sign != '' && this.hoisting.auditing.complete.status == '0'){
            this.hoisting.auditing.complete.status = type;
          }
          this.$emit("suggestion","hoisting",this.hoisting);
        },
      }
    }
</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>
