<template>
    <div>
      <div class="limit-space">受限空间安全作业许可证</div>
      <table style="width: 100%" border="1" cellpadding="5" cellspacing="0">
        <tr>
          <td colspan="2">申请部门</td>
          <td colspan="2">{{ dataInfo.applyDeptName }}</td>
          <td>申请人</td>
          <td>{{ dataInfo.applyName }}</td>
          <td>作业证编号</td>
          <td colspan="2">{{ dataInfo.documentNum }}</td>
        </tr>

        <tr>
          <td colspan="2">受限空间所属部门</td>
          <td colspan="2">{{ baseInfo.dept }}</td>
          <td colspan="2">受限空间名称</td>
          <td colspan="3">{{ baseInfo.name }}</td>
        </tr>

        <tr>
          <td colspan="2">作业内容</td>
          <td colspan="2">{{ baseInfo.content }}</td>
          <td colspan="2">受限空间内原有介质名称</td>
          <td colspan="3">{{ baseInfo.jiezhi }}</td>
        </tr>

        <tr>
          <td colspan="2">作业时间</td>
          <td colspan="7">
            <span v-if="baseInfo.startTime && baseInfo.endTime">
            自 {{ $parent.$parent.dateFormatter(baseInfo.startTime) }}始 至 {{ $parent.$parent.dateFormatter(baseInfo.endTime) }}止
          </span>
            <span v-else>自   年   月   日   时   分始   至   年   月   日   时   分止</span>
          </td>
        </tr>

        <tr>
          <td colspan="2">作业单位负责人</td>
          <td colspan="7">{{ baseInfo.head }}</td>
        </tr>

        <tr>
          <td colspan="2">监护人</td>
          <td colspan="2">{{ baseInfo.jianhu }}</td>
          <td>作业人</td>
          <td colspan="4">{{ baseInfo.operator }}</td>
        </tr>

        <tr>
          <td colspan="2">其他特殊作业</td>
          <td colspan="7">{{ baseInfo.otherNum }}</td>
        </tr>

        <tr>
          <td colspan="2">危害辨识</td>
          <td colspan="7">{{ baseInfo.danger }}</td>
        </tr>

        <tr>
          <td rowspan="5">分析</td>
          <td>分析项目</td>
          <td style="width: 11%;">CH4</td>
          <td style="width: 11%;">氧含量</td>
          <td style="width: 11%;">硫化氢</td>
          <td style="width: 11%;">一氧化碳</td>
          <td style="width: 11%;" rowspan="2">时间</td>
          <td style="width: 11%;" rowspan="2">部位</td>
          <td style="width: 11%" rowspan="2">分析人</td>
        </tr>

        <tr>
          <td>分析标准</td>
          <td>{{ analysisInfo.fenxi.CH4 }}</td>
          <td>{{ analysisInfo.fenxi.hanyang }}</td>
          <td>{{ analysisInfo.fenxi.liuhua }}</td>
          <td>{{ analysisInfo.fenxi.yiyang }}</td>
        </tr>

        <tr>
          <td rowspan="3">分析数据</td>
          <td>{{ analysisInfo.fenxi.CH4Num }}</td>
          <td>{{ analysisInfo.fenxi.hanyangNum }}</td>
          <td>{{ analysisInfo.fenxi.liuhuaNum }}</td>
          <td>{{ analysisInfo.fenxi.yiyangNum }}</td>
          <td>{{ baseInfo.analysisTime }}</td>
          <td>{{ analysisInfo.fenxi.dept }}</td>
          <td>{{ analysisInfo.fenxi.people }}</td>
        </tr>

        <tr>
          <td>
            <span v-if="analysisInfo.fenxi.fenxiList && analysisInfo.fenxi.fenxiList.length > 0">{{ analysisInfo.fenxi.fenxiList[0].CH4Num }}</span>
          </td>
          <td>
            <span v-if="analysisInfo.fenxi.fenxiList && analysisInfo.fenxi.fenxiList.length > 0">{{ analysisInfo.fenxi.fenxiList[0].hanyangNum }}</span>
          </td>
          <td>
            <span v-if="analysisInfo.fenxi.fenxiList && analysisInfo.fenxi.fenxiList.length > 0">{{ analysisInfo.fenxi.fenxiList[0].liuhuaNum }}</span>
          </td>
          <td>
            <span v-if="analysisInfo.fenxi.fenxiList && analysisInfo.fenxi.fenxiList.length > 0">{{ analysisInfo.fenxi.fenxiList[0].yiyangNum }}</span>
          </td>
          <td>
            <span v-if="analysisInfo.fenxi.fenxiList && analysisInfo.fenxi.fenxiList.length > 0">{{ analysisInfo.fenxi.fenxiList[0].date }}</span>
          </td>
          <td>
            <span v-if="analysisInfo.fenxi.fenxiList && analysisInfo.fenxi.fenxiList.length > 0">{{ analysisInfo.fenxi.fenxiList[0].dept }}</span>
          </td>
          <td>
            <span v-if="analysisInfo.fenxi.fenxiList && analysisInfo.fenxi.fenxiList.length > 0">{{ analysisInfo.fenxi.fenxiList[0].people }}</span>
          </td>
        </tr>

        <tr>
          <td>
            <span v-if="analysisInfo.fenxi.fenxiList && analysisInfo.fenxi.fenxiList.length > 1">{{ analysisInfo.fenxi.fenxiList[1].CH4Num }}</span>
            <div v-else style="height: 16px"></div>
          </td>
          <td>
            <span v-if="analysisInfo.fenxi.fenxiList && analysisInfo.fenxi.fenxiList.length > 1">{{ analysisInfo.fenxi.fenxiList[1].hanyangNum }}</span>
          </td>
          <td>
            <span v-if="analysisInfo.fenxi.fenxiList && analysisInfo.fenxi.fenxiList.length > 1">{{ analysisInfo.fenxi.fenxiList[1].liuhuaNum }}</span>
          </td>
          <td>
            <span v-if="analysisInfo.fenxi.fenxiList && analysisInfo.fenxi.fenxiList.length > 1">{{ analysisInfo.fenxi.fenxiList[1].yiyangNum }}</span>
          </td>
          <td>
            <span v-if="analysisInfo.fenxi.fenxiList && analysisInfo.fenxi.fenxiList.length > 1">{{ analysisInfo.fenxi.fenxiList[1].date }}</span>
          </td>
          <td>
            <span v-if="analysisInfo.fenxi.fenxiList && analysisInfo.fenxi.fenxiList.length > 1">{{ analysisInfo.fenxi.fenxiList[1].dept }}</span>
          </td>
          <td>
            <span v-if="analysisInfo.fenxi.fenxiList && analysisInfo.fenxi.fenxiList.length > 1">{{ analysisInfo.fenxi.fenxiList[1].people }}</span>
          </td>
        </tr>

        <tr>
          <td style="width: 7%;text-align: center">序号</td>
          <td colspan="7" style="text-align: center">安全措施</td>
          <td style="text-align: center">选项</td>
        </tr>

        <tr>
          <td style="text-align: center">1</td>
          <td colspan="7">对进入受限空间危险性进行分析</td>
          <td style="text-align: center"><span :class="analysisInfo.cuoshi.one?'sheji':'busheji'">{{analysisInfo.cuoshi.one?'涉及':'不涉及'}}</span></td>
        </tr>

        <tr>
          <td style="text-align: center">2</td>
          <td colspan="7">所有与受限空间有联系的阀门、管线加盲板隔离，列出盲板清单，落实抽堵盲板责任人</td>
          <td style="text-align: center"><span :class="analysisInfo.cuoshi.two?'sheji':'busheji'">{{analysisInfo.cuoshi.two?'涉及':'不涉及'}}</span></td>
        </tr>

        <tr>
          <td style="text-align: center">3</td>
          <td colspan="7">设备经过置换、吹扫、蒸煮</td>
          <td style="text-align: center"><span :class="analysisInfo.cuoshi.three?'sheji':'busheji'">{{analysisInfo.cuoshi.three?'涉及':'不涉及'}}</span></td>
        </tr>

        <tr>
          <td style="text-align: center">4</td>
          <td colspan="7">设备打开通风孔进行自然通风，温度适宜人员作业；必要时采用强制通风或佩戴空气呼吸器，不能用通氧气或富氧空气的方法补充氧</td>
          <td style="text-align: center"><span :class="analysisInfo.cuoshi.four?'sheji':'busheji'">{{analysisInfo.cuoshi.four?'涉及':'不涉及'}}</span></td>
        </tr>

        <tr>
          <td style="text-align: center">5</td>
          <td colspan="7">相关设备进行处理，带搅拌机的设备已切断电源，电源开关处加锁或挂“禁止合闸”标志牌，设专人监护</td>
          <td style="text-align: center"><span :class="analysisInfo.cuoshi.five?'sheji':'busheji'">{{analysisInfo.cuoshi.five?'涉及':'不涉及'}}</span></td>
        </tr>

        <tr>
          <td style="text-align: center">6</td>
          <td colspan="7">检查受限空间内部已具备作业条件，清罐时（无需用/已采用）防爆工具</td>
          <td style="text-align: center"><span :class="analysisInfo.cuoshi.six?'sheji':'busheji'">{{analysisInfo.cuoshi.six?'涉及':'不涉及'}}</span></td>
        </tr>

        <tr>
          <td style="text-align: center">7</td>
          <td colspan="7">检查受限空间进出口通道，无阻碍人员进出的障碍物</td>
          <td style="text-align: center"><span :class="analysisInfo.cuoshi.seven?'sheji':'busheji'">{{analysisInfo.cuoshi.seven?'涉及':'不涉及'}}</span></td>
        </tr>

        <tr>
          <td style="text-align: center">8</td>
          <td colspan="7">分析盛装过可燃有毒液体、气体的受限空间内的可燃、有毒有害气体含量</td>
          <td style="text-align: center"><span :class="analysisInfo.cuoshi.eight?'sheji':'busheji'">{{analysisInfo.cuoshi.eight?'涉及':'不涉及'}}</span></td>
        </tr>

        <tr>
          <td style="text-align: center">9</td>
          <td colspan="7">用于连续检测的移动式可燃、有毒气体、氧气检测仪已配备到位</td>
          <td style="text-align: center"><span :class="analysisInfo.cuoshi.nine?'sheji':'busheji'">{{analysisInfo.cuoshi.nine?'涉及':'不涉及'}}</span></td>
        </tr>

        <tr>
          <td style="text-align: center">10</td>
          <td colspan="7">受限空间内作业已配备通信设备</td>
          <td style="text-align: center"><span :class="analysisInfo.cuoshi.ten?'sheji':'busheji'">{{analysisInfo.cuoshi.ten?'涉及':'不涉及'}}</span></td>
        </tr>

        <tr>
          <td style="text-align: center">11</td>
          <td colspan="7">受限空间出入口四周已设立警戒区</td>
          <td style="text-align: center"><span :class="analysisInfo.cuoshi.eleven?'sheji':'busheji'">{{analysisInfo.cuoshi.eleven?'涉及':'不涉及'}}</span></td>
        </tr>

        <tr>
          <td style="text-align: center">12</td>
          <td colspan="7">其他相关特殊作业已办理相应安全作业票</td>
          <td style="text-align: center"><span :class="analysisInfo.cuoshi.twelve?'sheji':'busheji'">{{analysisInfo.cuoshi.twelve?'涉及':'不涉及'}}</span></td>
        </tr>

        <tr>
          <td style="text-align: center">13</td>
          <td colspan="7">作业人员清楚受限空间内存在的其他危险因素</td>
          <td style="text-align: center"><span :class="analysisInfo.cuoshi.thirteen?'sheji':'busheji'">{{analysisInfo.cuoshi.thirteen?'涉及':'不涉及'}}</span></td>
        </tr>


        <tr>
          <td style="text-align: center">14</td>
          <td colspan="7">作业监护措施；消防器材( {{ analysisInfo.cuoshi.fourteena }} )、救生绳( {{ analysisInfo.cuoshi.fourteenb }} )、气防装备( {{ analysisInfo.cuoshi.fourteenc }} )</td>
          <td style="text-align: center"><span :class="analysisInfo.cuoshi.fourteen?'sheji':'busheji'">{{analysisInfo.cuoshi.fourteen?'涉及':'不涉及'}}</span></td>
        </tr>

        <tr>
          <td style="text-align: center">15</td>
          <td colspan="7">
            <div>其他安全措施:</div>
            <div>{{ analysisInfo.cuoshi.fifteenContent }}</div>
            <div style="float: right">编制人: {{ analysisInfo.cuoshi.fifteenPeople }}</div>
          </td>
          <td style="text-align: center"><span :class="analysisInfo.cuoshi.fifteen?'sheji':'busheji'">{{analysisInfo.cuoshi.fifteen?'涉及':'不涉及'}}</span></td>
        </tr>

        <tr>
          <td style="text-align: center">确认人</td>
          <td colspan="8">
            <div style="width: 100px;height: 24px">
              <el-image
                v-if="analysisInfo.signUrl"
                :src="analysisInfo.signUrl"
                :preview-src-list="[analysisInfo.signUrl]"
                :z-index="9999"
                style="width: 24px;height: 100px;transform: rotate(-90deg);top: -39px;left: 39px;"
              >
              </el-image>
              <span v-else></span>
            </div>
          </td>
        </tr>

        <tr>
          <td colspan="2">实施安全教育人</td>
          <td colspan="7">
            <div style="width: 124px;height: 24px">
              <el-image
                v-if="$parent.$parent.getSignInfo(-1).signUrl"
                :src="$parent.$parent.getSignInfo(-1).signUrl"
                :preview-src-list="[$parent.$parent.getSignInfo(-1).signUrl]"
                :z-index="9999"
                style="width: 24px;height: 124px;transform: rotate(-90deg);top: -50px;left: 55px;"
              >
              </el-image>
              <span v-else></span>
            </div>
          </td>
        </tr>

        <tr>
          <td colspan="9">
            <div style="margin-bottom: 5px">作业负责人意见</div>
            <div>{{ $parent.$parent.getSignInfo(1).signOpinion }}</div>
            <div style="float: right;display: flex;margin-top: 5px">
              签字:
              <div style="width: 85px;height: 24px">
                <el-image
                  v-if="$parent.$parent.getSignInfo(1).signUrl"
                  :src="$parent.$parent.getSignInfo(1).signUrl"
                  :preview-src-list="[$parent.$parent.getSignInfo(1).signUrl]"
                  :z-index="9999"
                  style="width: 24px;height: 85px;transform: rotate(-90deg);top: -32px;left: 30px;"
                >
                </el-image>
                <span v-else></span>
              </div>
              <span v-if="$parent.$parent.getSignInfo(1).signTime">{{ $parent.$parent.dateFormatter($parent.$parent.getSignInfo(1).signTime) }}</span>
              <span v-else>年   月   日   时   分</span>
            </div>
          </td>
        </tr>

        <tr>
          <td colspan="9">
            <div style="margin-bottom: 5px">审批人意见</div>
            <div>{{ $parent.$parent.getSignInfo(2).signOpinion }}</div>
            <div style="float: right;display: flex;margin-top: 5px">
              签字:
              <div style="width: 85px;height: 24px">
                <el-image
                  v-if="$parent.$parent.getSignInfo(2).signUrl"
                  :src="$parent.$parent.getSignInfo(2).signUrl"
                  :preview-src-list="[$parent.$parent.getSignInfo(2).signUrl]"
                  :z-index="9999"
                  style="width: 24px;height: 85px;transform: rotate(-90deg);top: -32px;left: 30px;"
                >
                </el-image>
                <span v-else></span>
              </div>
              <span v-if="$parent.$parent.getSignInfo(2).signTime">{{ $parent.$parent.dateFormatter($parent.$parent.getSignInfo(2).signTime) }}</span>
              <span v-else>年   月   日   时   分</span>
            </div>
          </td>
        </tr>

        <tr>
          <td colspan="9">
            <div style="margin-bottom: 5px">完工（关闭）验收</div>
            <div>{{ $parent.$parent.getSignInfo(3).signOpinion }}</div>
            <div style="float: right;display: flex;margin-top: 5px">
              签字:
              <div style="width: 85px;height: 24px">
                <el-image
                  v-if="$parent.$parent.getSignInfo(3).signUrl"
                  :src="$parent.$parent.getSignInfo(3).signUrl"
                  :preview-src-list="[$parent.$parent.getSignInfo(3).signUrl]"
                  :z-index="9999"
                  style="width: 24px;height: 85px;transform: rotate(-90deg);top: -32px;left: 30px;"
                >
                </el-image>
                <span v-else></span>
              </div>
              <span v-if="$parent.$parent.getSignInfo(3).signTime">{{ $parent.$parent.dateFormatter($parent.$parent.getSignInfo(3).signTime) }}</span>
              <span v-else>年   月   日   时   分</span>
            </div>
          </td>
        </tr>

      </table>
    </div>
</template>

<script>
    export default {
        name: "limit-space",
      data(){
          return{
            dataInfo:{},
            baseInfo:{
              "dept": "",
              "name": "",
              "content": "",
              "jiezhi": "",
              "startTime": "",
              "endTime": "",
              "head": "",
              "jianhu": "",
              "operator": "",
              "otherNum": "",
              "danger": ""
            },
            analysisInfo:{
              "fenxi": {
                "CH4": "",
                "hanyang": "",
                "liuhua": "",
                "yiyang": "",
                "CH4Num": "",
                "hanyangNum": "",
                "liuhuaNum": "",
                "yiyangNum": "",
                "dept": "",
                "people": "",
                "fenxiList": [{
                  "CH4Num": "",
                  "hanyangNum": "",
                  "liuhuaNum": "",
                  "yiyangNum": "",
                  "dept": "",
                  "people": "",
                  "date": ""
                }]
              },
              "cuoshi": {
                "one": false,
                "two": false,
                "three": false,
                "four": false,
                "five": false,
                "six": false,
                "seven": false,
                "eight": false,
                "nine": false,
                "ten": false,
                "eleven":false,
                "twelve":false,
                "thirteen":false,
                "fourteen":false,
                "fourteena":'',
                "fourteenb":'',
                "fourteenc":'',
                "fifteen":false,
                "fifteenContent":'',
                "fifteenPeople":''
              },
              "signUrl": ""
            }
          }
      }
    }
</script>

<style scoped lang="scss">
  .limit-space{
    width: 100%;
    text-align: center;
    font-size: 25px;
    padding: 13px;
  }
  .sheji{
    color:red;
  }
  .busheji{
    color:#111111;
  }
</style>
