<!--整改报告-->
<template>
  <div class="rectificationReportDom" v-show="pageType">
    <div class="rectificationReportDom-page" v-if="!lookImgType">
      <div class="title-1-max-box">
        <p class="number-p">编号：{{documentData.code}}</p>
        <p class="title-1-p">{{documentData.deptName}} 实验室安全检查</p>
        <p class="title-2-p">整改报告</p>
        <div class="title-1-box">
          <p>编写人：</p>
          <p>{{documentData.deptName}}</p>
          <p></p>
        </div>
        <div class="title-1-box">
          <p>负责人：</p>
          <p v-if="propsReportDomData.checkCategory == 1">{{documentData.approveName}}</p>
          <p v-if="propsReportDomData.checkCategory == 2">{{documentData.adminName}}</p>
          <p></p>
          <img class="position-user-img" :src="documentData.userSign" v-if="documentData.userSign">
        </div>
        <p class="title-3-p" v-if="propsReportDomData.checkCategory == 2">{{documentData.subName}}{{documentData.roomNum?documentData.roomNum:''}}</p>
        <p class="title-4-p">{{documentData.reportYear}}年{{documentData.reportMonth}}月{{documentData.reportDay}}日</p>
      </div>
      <div class="title-2-max-box">
        <p class="title-1-p">实验室安全检查整改报告</p>
        <p class="title-2-p" v-if="propsReportDomData.checkCategory == 1">{{documentData.checkYear}}年{{documentData.checkMonth}}月{{documentData.checkDay}}日至{{documentData.endCheckYear}}年{{documentData.endCheckMonth}}月{{documentData.endCheckDay}}日，学校对本学院进行了{{documentData.planName}}，发现了 {{documentData.count}} 个不符合项，需要进行整改，具体条款和内容如下表：</p>
        <p class="title-2-p" v-if="propsReportDomData.checkCategory == 2">{{documentData.checkYear}}年{{documentData.checkMonth}}月{{documentData.checkDay}}日，学院对本实验室进行了{{documentData.planName}}，发现了 {{documentData.count}} 个不符合项，需要进行整改，具体条款和内容如下表：</p>
        <div class="table-box-one" v-if="propsReportDomData.checkCategory == 1">
          <div class="table-title-box">
            <p>序号</p>
            <p>条款号</p>
            <p>实验室</p>
            <p>问题事实描述</p>
          </div>
          <div class="table-for-box" v-for="(item,index) in documentData.detailList" :key="index">
            <p class="table-for-p">{{item.index}}</p>
            <p class="table-for-p">{{item.optionCode}}</p>
            <div class="table-min-for-max-box">
              <div class="table-min-for-box" v-for="(minItem,minIndex) in item.subDetailList" :key="minIndex">
                <p>{{minItem.subName}}{{minItem.roomNum?'('+minItem.roomNum+')':''}}</p>
                <p>{{minItem.checkDesc}}</p>
              </div>
            </div>
          </div>
        </div>
        <div class="table-box" v-if="propsReportDomData.checkCategory == 2">
          <div class="table-title-box">
            <p>序号</p>
            <p>条款号</p>
            <p>问题事实描述</p>
          </div>
          <div class="table-for-box" v-for="(item,index) in documentData.detailList" :key="index">
            <p>{{item.index}}</p>
            <p>{{item.optionCode}}</p>
            <p>{{item.checkDesc}}</p>
          </div>
        </div>
        <p class="title-3-p" v-if="propsReportDomData.checkCategory == 1">学院单位及各实验室负责人于 {{documentData.nowMonth}}月{{documentData.nowDay}}日 召开了全体（或相关）实验人员会议，就现场检查发现的问题进行了研究讨论，布置落实了整改方案和负责人。经大家的努力，现已完成整改工作，具体情况汇报如下：</p>
        <p class="title-3-p" v-if="propsReportDomData.checkCategory == 2">实验室负责人于 {{documentData.nowMonth}}月{{documentData.nowDay}}日 召开了全体（或相关）实验人员会议，就现场检查发现的问题进行了研究讨论，布置落实了整改方案和负责人。经大家的努力，现已完成整改工作，具体情况汇报如下：</p>
        <div v-if="propsReportDomData.checkCategory == 1">
          <div class="for-big-box" v-for="(item,index) in documentData.titleList" :key="index">
            <div class="for-big-title-box-1">
              <p>{{item.index}}</p>
              <p>、</p>
              <p>{{item.checkOptionName}}</p>
              <p>问题的整改</p>
            </div>
            <div v-for="(minItem,minIndex) in item.detailList" :key="minIndex">
              <p class="for-big-title-p-1" style="text-indent: 7px;">{{minItem.index}} {{minItem.subName}}{{minItem.roomNum?minItem.roomNum:''}}房间的问题整改</p>
              <p class="for-big-title-p-1">存在问题描述：{{minItem.checkDesc}}</p>
              <p class="for-big-title-p-1">整改结果：{{minItem.checkResult}}</p>
              <p class="for-big-title-p-1">整改措施：{{minItem.checkMeasure}}</p>
              <div class="for-big-img-box">
                <img class="for-big-img" :src="minItem.checkImg1" v-if="minItem.checkImg1" @click="lookImgButton(minItem.checkImg1)">
                <img class="for-big-img" :src="minItem.checkImg2" v-if="minItem.checkImg2" @click="lookImgButton(minItem.checkImg2)">
                <img class="for-big-img" :src="minItem.checkImg3" v-if="minItem.checkImg3" @click="lookImgButton(minItem.checkImg3)">
                <img class="for-big-img" :src="minItem.checkImg4" v-if="minItem.checkImg4" @click="lookImgButton(minItem.checkImg4)">
                <img class="for-big-img" :src="minItem.checkImg5" v-if="minItem.checkImg5" @click="lookImgButton(minItem.checkImg5)">
                <img class="for-big-img" :src="minItem.checkImg6" v-if="minItem.checkImg6" @click="lookImgButton(minItem.checkImg6)">
              </div>
            </div>
          </div>
        </div>
        <div v-if="propsReportDomData.checkCategory == 2">
          <div class="for-big-box" v-for="(item,index) in documentData.reportDetailList" :key="index">
            <div class="for-big-title-box-1">
              <p>{{item.index}}</p>
              <p>、</p>
              <p>{{item.checkOptionName}}</p>
              <p>问题的整改</p>
            </div>
            <p class="for-big-title-p-1">（1）存在问题描述：{{item.checkDesc}}</p>
            <p class="for-big-title-p-1">（2）整改结果：{{item.checkResult}}</p>
            <p class="for-big-title-p-1">（3）整改措施：{{item.checkMeasure}}</p>
            <div class="for-big-img-box">
              <img class="for-big-img" :src="item.checkImg1" v-if="item.checkImg1" @click="lookImgButton(item.checkImg1)">
              <img class="for-big-img" :src="item.checkImg2" v-if="item.checkImg2" @click="lookImgButton(item.checkImg2)">
              <img class="for-big-img" :src="item.checkImg3" v-if="item.checkImg3" @click="lookImgButton(item.checkImg3)">
              <img class="for-big-img" :src="item.checkImg4" v-if="item.checkImg4" @click="lookImgButton(item.checkImg4)">
              <img class="for-big-img" :src="item.checkImg5" v-if="item.checkImg5" @click="lookImgButton(item.checkImg5)">
              <img class="for-big-img" :src="item.checkImg6" v-if="item.checkImg6" @click="lookImgButton(item.checkImg6)">
            </div>
          </div>
        </div>
        <p class="title-4-p" v-if="documentData.unCount>0">综上所述，我实验室已完成了{{documentData.finishCount}}个问题条款的整改，尚有{{documentData.unCount}}个条款因时间、政策等限制不能马上完成，已说明原因，向学校汇报。我实验室将举一反三，进一步加强实验室安全建设，提升管理水平和安全业务能力，努力创建适宜人才培养的平安和谐校园。</p>
        <p class="title-4-p" v-if="documentData.unCount == 0">综上所述，我实验室已完成了本次安全现场检查发现问题的全部整改。我实验室将举一反三，进一步加强实验室安全建设，提升管理水平和安全业务能力，努力创建适宜人才培养的平安和谐校园。</p>
        <div class="bottom-title-box">
          <div></div>
          <div>
            <p v-if="propsReportDomData.checkCategory == 1">{{documentData.deptName}}</p>
            <p v-if="propsReportDomData.checkCategory == 2">{{documentData.subName}}{{documentData.roomNum?'（'+documentData.roomNum+'）':''}}</p>
            <p>{{documentData.nowYear}}年{{documentData.nowMonth}}月{{documentData.nowDay}}日</p>
            <img v-if="documentData.checkDeptSign" :src="documentData.checkDeptSign">
          </div>
          <div></div>
        </div>
      </div>
    </div>
    <div class="look-img-box" v-if="lookImgType">
      <img class="look-img" :src="lookImg">
      <p v-if="lookImgType" class="out-look-button" @click="outLookImgButton">退出查看</p>
    </div>
  </div>
</template>

<script>
  import {
    securityRectifyReportGetRectifyReportView
  } from "@/api/safetyCheck/index";
  export default {
    name: 'rectificationReportDom',
    props:{
      propsReportDomData:{},
    },
    data(){
      return{
        pageType:false,
        documentData:{},
        lookImgType:false,
        lookImg:"",
      }
    },
    created(){
      this.securityRectifyReportGetRectifyReportView();
    },
    mounted(){},
    methods:{
      securityRectifyReportGetRectifyReportView(){
        securityRectifyReportGetRectifyReportView({reportId:this.propsReportDomData.reportId}).then(response => {
          this.$set(this,'documentData',response.data);
          this.$set(this,'pageType',true);
        });
      },
      //查看图片
      lookImgButton(url){
        this.$set(this,'lookImg',url);
        this.$set(this,'lookImgType',true);
      },
      //退出查看图片
      outLookImgButton(){
        this.$set(this,'lookImg','');
        this.$set(this,'lookImgType',false);
      },
    }
  }
</script>

<style scoped lang="scss">
  .rectificationReportDom{
    width:790px;
    margin:0 auto;
    .rectificationReportDom-page{
      color:#333;
      background-image: url(data:image/png;base64,[encoded data, 8388 characters]);
      background-color: #fff;
      width:790px;
      padding: 80px;
      .title-1-max-box{
        .number-p{
          font-size:16px;
          line-height:16px;
          font-family: '楷体';
          font-weight:700;
        }
        .title-1-p{
          margin-top:90px;
          font-size:28px;
          line-height:30px;
          padding:0 40px;
          text-align: center;
        }
        .title-2-p{
          font-size:34px;
          line-height:56px;
          text-align: center;
          margin-bottom:130px;
        }
        .title-1-box{
          display: flex;
          position: relative;
          p{
            font-size:22px;
            line-height:52px;
          }
          p:nth-child(1){
            width:240px;
            text-align: right;
          }
          p:nth-child(2){
            margin-left:10px;
            text-align: left;
            flex:1;
          }
          p:nth-child(3){
            width: 290px;
            height:2px;
            background-color: #333;
            position: absolute;
            top: 40px;
            left: 240px;
          }
          .position-user-img{
            position: absolute;
            width:120px;
            height:40px;
            right: 100px;
            bottom:15px;
          }
        }
        .title-3-p{
          margin-top:150px;
          font-size:26px;
          line-height:45px;
          text-align: center;
          font-family: '楷体';
          font-weight:700;
        }
        .title-4-p{
          font-size:20px;
          line-height:38px;
          text-align: center;
          margin-bottom:95px;
        }
      }
      .title-2-max-box{
        .title-1-p{
          text-align: center;
          font-size:24px;
          line-height:34px;
        }
        .title-2-p{
          margin-top:30px;
          line-height:26px;
          font-size:16px;
          text-indent:30px;
        }
        .table-box-one{
          margin:10px 0;
          .table-title-box{
            display: flex;
            border:1px solid #333;
            p{
              font-family: '楷体';
              font-weight:700;
              text-align: center;
              line-height:26px;
            }
            p:nth-child(1){
              width:40px;
            }
            p:nth-child(2){
              width:60px;
              border-left:1px solid #333;
              border-right:1px solid #333;
            }
            p:nth-child(3){
              width:230px;
              border-right:1px solid #333;
            }
            p:nth-child(4){
              width:300px;
            }
          }
          .table-for-box{
            display: flex;
            border-left:1px solid #333;
            border-right:1px solid #333;
            border-bottom:1px solid #333;
            p{
              font-family: '楷体';
              font-weight:700;
              font-size:14px;
              line-height:18px;
              padding:4px 10px;
            }
            .table-for-p:nth-child(1){
              width:40px;
              text-align: center;
            }
            .table-for-p:nth-child(2){
              width:60px;
              border-left:1px solid #333;
              border-right:1px solid #333;
            }
            .table-min-for-max-box{
              flex:1;
              display: flex;
              flex-direction: column;
              overflow: hidden;
              .table-min-for-box:nth-child(1){
                border-top:none;
              }
              .table-min-for-box{
                flex:1;
                display: flex;
                border-top:1px solid #333;
                p:nth-child(1){
                  width:229px;
                  border-right:1px solid #333;
                }
                p:nth-child(2){
                  width:299px;
                }
              }
            }
          }
        }
        .table-box{
          margin:10px 0;
          .table-title-box{
            display: flex;
            border:1px solid #333;
            p{
              font-family: '楷体';
              font-weight:700;
              text-align: center;
              line-height:26px;
            }
            p:nth-child(1){
              width:67px;
            }
            p:nth-child(2){
              width:84px;
              border-left:1px solid #333;
              border-right:1px solid #333;
            }
            p:nth-child(3){
              width:336px;
            }
          }
          .table-for-box{
            display: flex;
            border-left:1px solid #333;
            border-right:1px solid #333;
            border-bottom:1px solid #333;
            p{
              font-family: '楷体';
              font-weight:700;
              font-size:14px;
              line-height:18px;
              padding:4px 10px;
            }
            p:nth-child(1){
              width:67px;
              text-align: center;
            }
            p:nth-child(2){
              width:84px;
              border-left:1px solid #333;
              border-right:1px solid #333;
            }
            p:nth-child(3){
              width:336px;
            }
          }
        }
        .title-3-p{
          line-height:26px;
          font-size:16px;
          text-indent:30px;
        }
        .for-big-box{
          .for-big-title-box-1{
            display: flex;
            line-height:40px;
            p{
              font-size:16px;
              font-family: '楷体';
              font-weight:700;
            }
          }
          .for-big-title-p-1{
            text-indent:30px;
            line-height:20px;
            padding:3px 0;
            font-size:16px;
          }
          .for-big-img-box{
            margin:20px 0;
            .for-big-img{
              display: inline-block;
              overflow: hidden;
              width:200px;
              height:113px;
              cursor: pointer;
            }
            .for-big-img:nth-child(1){
              margin-right:14px;
            }
            .for-big-img:nth-child(2){
              margin-right:14px;
            }
            .for-big-img:nth-child(4){
              margin-top:14px;
              margin-right:14px;
            }
            .for-big-img:nth-child(5){
              margin-top:14px;
              margin-right:14px;
            }
          }
        }
        .title-4-p{
          margin-top:20px;
          text-indent:30px;
          font-size:16px;
          line-height:26px;
          .bottom_span{

          }
        }
        .bottom-title-box{
          margin-top:10px;
          position: relative;
          display: flex;
          padding:40px 0;
          div:nth-child(1){
            flex: 1;
          }
          div:nth-child(2){
            p{
              text-align: center;
              line-height:30px;
              font-size:16px;
            }
          }
          div:nth-child(3){
            width:50px;
          }
          img{
            display: block;
            width:150px;
            height:150px;
            position: absolute;
            left:400px;
            top:0;
          }
        }
      }
    }
    .look-img-box{
      height:100%;
      display: flex;
      flex-direction: column;
      position: relative;
      .look-img{
        display: block;
        width: 790px;
      }
      .out-look-button{
        position: absolute;
        right:15px;
        top:15px;
        border:1px solid #0183fa;
        border-radius:4px;
        line-height:30px;
        width:100px;
        text-align: center;
        cursor: pointer;
        color:#0183fa;
        background-color: #fff;
      }
      .out-look-button:hover{
        background-color:#0183fa;
        color:#fff;
      }
    }
  }
</style>
