<!--整改报告-->
<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.deptName}}</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>{{documentData.checkNickName}}</p>
          <p></p>
        </div>
        <p class="title-3-p">{{documentData.subName}}（{{documentData.checkRoom}}）</p>
        <p class="title-4-p">{{documentData.nowYear}}年{{documentData.nowMonth}}月{{documentData.nowDay}}日</p>
      </div>
      <div class="title-2-max-box">
        <p class="title-1-p">实验室安全现场检查整改报告</p>
        <p class="title-2-p">{{documentData.checkYear}}年{{documentData.checkMonth}}月{{documentData.checkDay}}日，学院对本实验室进行了安全管理现场检查，发现了 {{documentData.count}} 个不符合项，需要进行整改，具体条款和内容如下表：</p>
        <div class="table-box">
          <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.option_code}}</p>
            <p>{{item.check_desc}}</p>
          </div>
        </div>
        <p class="title-3-p">实验室负责人于 {{documentData.checkMonth}}月{{documentData.checkDay}}日 召开了全体（或相关）实验人员会议，就现场检查发现的问题进行了研究讨论，布置落实了整改方案和责任人。经大家的努力，现已完成整改工作，具体情况汇报如下：</p>
        <div class="for-big-box" v-for="(item,index) in documentData.descsList" :key="index">
          <div class="for-big-title-box-1">
            <p>{{item.index}}</p>
            <p>、</p>
            <p>{{item.check_option_name}}</p>
            <p>问题的整改</p>
          </div>
          <p class="for-big-title-p-1">（1）存在问题描述：{{item.check_desc}}</p>
          <p class="for-big-title-p-1">（2）原因分析：{{item.check_cause}}</p>
          <p class="for-big-title-p-1">（3）整改措施与结果：{{item.check_result}}</p>
          <p class="for-big-title-p-1">（4）证明材料（文字或图片）：立整立改的条款应附相关文字或整改前后照片对比及注解等；不能立整立改的条款应附整改计划、措施等材料：</p>
          <div class="for-big-img-box">
            <img class="for-big-img" :src="item.check_img1" v-if="item.check_img1" @click="lookImgButton(item.check_img1)">
            <img class="for-big-img" :src="item.check_img2" v-if="item.check_img2" @click="lookImgButton(item.check_img2)">
            <img class="for-big-img" :src="item.check_img3" v-if="item.check_img3" @click="lookImgButton(item.check_img3)">
            <img class="for-big-img" :src="item.check_img4" v-if="item.check_img4" @click="lookImgButton(item.check_img4)">
            <img class="for-big-img" :src="item.check_img5" v-if="item.check_img5" @click="lookImgButton(item.check_img5)">
          </div>
        </div>
        <p class="title-4-p">综上所述，我实验室已完成了本次安全现场检查发现问题的全部整改<span>（或：已完成了{{documentData.finishCount}}个问题条款的整改，<span class="bottom_span">尚有{{documentData.unCount}}个条款因时间、政策等限制不能马上完成，已说明原因，向学校汇报</span>）</span>。我实验室将举一反三，进一步加强实验室安全建设，提升管理水平和安全业务能力，努力创建适宜人才培养的平安和谐校园。</p>
        <div class="bottom-title-box">
          <div></div>
          <div>
            <p>{{documentData.subName}}（{{documentData.checkRoom}}）</p>
            <p>{{documentData.checkYear}}年{{documentData.checkMonth}}月{{documentData.checkDay}}日</p>
            <img :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 { viewReport } from '@/api/safetyCheck/index'
  export default {
    name: 'rectificationReportDom',
    props:{
      propsRectificationReportData:{},
    },
    data(){
      return{
        pageType:false,
        documentData:{},
        lookImgType:false,
        lookImg:"",
      }
    },
    created(){
      this.viewReport();
    },
    mounted(){},
    methods:{
      viewReport(){
        viewReport(this.propsRectificationReportData.id).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, );
      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;
          }
        }
        .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{
          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>
