<!--告知书-->
<template>
  <div class="informDom" v-if="pageType">
    <div class="informDom-page" v-if="!lookImgType">
      <div class="informDom-box-1">
        <p class="title-p-1">实验室安全隐患告知书</p>
        <p class="title-p-2">{{documentData.checkYear}}年{{documentData.checkMonth}}月{{documentData.checkDay}}日，{{documentData.deptName}}开展了实验室安全检查，现将检查中发现的问题予以告知（详见附件）。</p>
        <p class="title-p-2">对于检查中发现的问题隐患，请各实验室负责人对照问题清单逐条整改、认真复核，并于{{documentData.rectifyYear}}年{{documentData.rectifyMonth}}月{{documentData.rectifyDay}}日在系统里提交整改证明材料，形成闭环管理台账；同时，要举一反三，认真排查并全面消除安全隐患。各实验室负责人应引以为戒，增强安全意识，履行安全工作职责，杜绝类似情况发生，切实保障实验室安全，维护校园安全稳定。</p>
        <p class="title-p-2">附件：{{documentData.checkDeptName}}实验室安全检查问题隐患汇总表</p>
        <div class="bottom-title-box">
          <div></div>
          <div>
            <p>{{documentData.deptName}}</p>
            <p>{{documentData.nowYear}}年{{documentData.nowMonth}}月{{documentData.nowDay}}日</p>
            <img :src="documentData.checkDeptSign">
          </div>
          <div></div>
        </div>
      </div>
      <div class="informDom-box-2">
        <p class="title-p-1">{{documentData.deptName}}实验室安全检查问题隐患汇总表</p>
        <div class="table-max-big-box">
          <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.checkManageNotifyDetailList" :key="index">
            <div class="table-for-index-box">
              <p></p>
              <p>{{item.index}}</p>
              <p></p>
            </div>
            <div class="table-for-sub-box">
              <p></p>
              <p>{{item.subName}}</p>
              <p></p>
            </div>
            <div class="table-for-text-box">
              <div class="table-for-text-min-box">
                <p>{{item.checkDesc}}</p>
                <div class="table-for-text-img-box">
                  <img :src="item.checkImg1" v-if="item.checkImg1" @click="lookImgButton(item.checkImg1)">
                  <img :src="item.checkImg2" v-if="item.checkImg2" @click="lookImgButton(item.checkImg2)">
                  <img :src="item.checkImg3" v-if="item.checkImg3" @click="lookImgButton(item.checkImg3)">
                  <img :src="item.checkImg4" v-if="item.checkImg4" @click="lookImgButton(item.checkImg4)">
                  <img :src="item.checkImg5" v-if="item.checkImg5" @click="lookImgButton(item.checkImg5)">
                </div>
              </div>
            </div>
            <div class="table-for-code-box">
              <p>{{item.checkOptionName}}</p>
            </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 { getRectifyNotificationView } from '@/apiDemo/safetyCheck/index'
  export default {
    name: 'informDom',
    props:{
      propsInformDomData:{},
    },
    data(){
      return{
        pageType:false,
        documentData:{
          dataList:[
            {
              dataListIndex:1,
              dataListSub:'实验室名称',
              dataListText:[
                {
                  dataListTextOne:"问题描述",
                  dataListTextImg:[
                    {
                      fileName:"图片1",
                      fileUrl:"https://img1.baidu.com/it/u=912147173,2159607158&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=889",
                    },
                    {
                      fileName:"图片2",
                      fileUrl:"https://img1.baidu.com/it/u=2841272410,4166724015&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500",
                    },
                    {
                      fileName:"图片3",
                      fileUrl:"https://img1.baidu.com/it/u=2841272410,4166724015&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500",
                    },
                    {
                      fileName:"图片4",
                      fileUrl:"https://img1.baidu.com/it/u=912147173,2159607158&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=889",
                    },
                    {
                      fileName:"图片5",
                      fileUrl:"https://img1.baidu.com/it/u=2841272410,4166724015&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500",
                    },
                  ],
                },
                {
                  dataListTextOne:"问题描述",
                  dataListTextImg:[
                    {
                      fileName:"图片1",
                      fileUrl:"https://img1.baidu.com/it/u=912147173,2159607158&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=889",
                    },
                    {
                      fileName:"图片2",
                      fileUrl:"https://img1.baidu.com/it/u=2841272410,4166724015&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500",
                    },
                    {
                      fileName:"图片3",
                      fileUrl:"https://img1.baidu.com/it/u=2841272410,4166724015&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500",
                    },
                    {
                      fileName:"图片4",
                      fileUrl:"https://img1.baidu.com/it/u=912147173,2159607158&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=889",
                    },
                    {
                      fileName:"图片5",
                      fileUrl:"https://img1.baidu.com/it/u=2841272410,4166724015&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500",
                    },
                  ],
                },
              ],
              dataListCode:[
                {
                  dataListCodeName:'（1）对应条款1'
                },
                {
                  dataListCodeName:'（2）对应条款1对应条款1对应条款1'
                },
                {
                  dataListCodeName:'（3）对应条款1对应条款1对应条款1对应条款1对应条款1对应条款1'
                },
              ],
            },
            {
              dataListIndex:1,
              dataListSub:'实验室名称实验室名称实验室名称实验室名称',
              dataListText:[
                {
                  dataListTextOne:"(1) 问题描述问题描述问题描述问题描述问题描述问题描述问题描述问题描述问题描述问题描述",
                  dataListTextImg:[
                    {
                      fileName:"图片1",
                      fileUrl:"https://img1.baidu.com/it/u=912147173,2159607158&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=889",
                    },
                    {
                      fileName:"图片2",
                      fileUrl:"https://img1.baidu.com/it/u=2841272410,4166724015&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500",
                    },
                    {
                      fileName:"图片3",
                      fileUrl:"https://img1.baidu.com/it/u=2841272410,4166724015&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500",
                    },
                    {
                      fileName:"图片4",
                      fileUrl:"https://img1.baidu.com/it/u=912147173,2159607158&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=889",
                    },
                    {
                      fileName:"图片5",
                      fileUrl:"https://img1.baidu.com/it/u=2841272410,4166724015&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500",
                    },
                  ],
                },
                {
                  dataListTextOne:"问题描述",
                  dataListTextImg:[
                    {
                      fileName:"图片1",
                      fileUrl:"https://img1.baidu.com/it/u=912147173,2159607158&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=889",
                    },
                    {
                      fileName:"图片2",
                      fileUrl:"https://img1.baidu.com/it/u=2841272410,4166724015&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500",
                    },
                    {
                      fileName:"图片3",
                      fileUrl:"https://img1.baidu.com/it/u=2841272410,4166724015&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500",
                    },
                    {
                      fileName:"图片4",
                      fileUrl:"https://img1.baidu.com/it/u=912147173,2159607158&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=889",
                    },
                    {
                      fileName:"图片5",
                      fileUrl:"https://img1.baidu.com/it/u=2841272410,4166724015&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500",
                    },
                  ],
                },
              ],
              dataListCode:[
                {
                  dataListCodeName:'（1）对应条款1'
                },
                {
                  dataListCodeName:'（2）对应条款1对应条款1对应条款1'
                },
                {
                  dataListCodeName:'（3）对应条款1对应条款1对应条款1对应条款1对应条款1对应条款1'
                },
              ],
            }
          ]
        },
        lookImgType:false,
        lookImg:"",
      }
    },
    created(){},
    mounted(){
      this.getRectifyNotificationView();
    },
    methods:{
      getRectifyNotificationView(){
        getRectifyNotificationView(this.propsInformDomData.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">
  .informDom{
    width:790px;
    margin:0 auto;
    .informDom-page{
      color:#333;
      background-image: url(data:image/png;base64, );
      background-color: #fff;
      padding: 80px;
      width:790px;
      .informDom-box-1{
        overflow: hidden;
        p{
          color:#000;
          font-family: '宋体';
        }
        .title-p-1{
          line-height:72px;
          font-size:24px;
          text-align: center;
          margin-bottom:21px;
          font-family: '宋体';
          font-weight:700;
        }
        .title-p-2{
          font-size:18px;
          line-height:42px;
          text-indent:40px;
        }
        .bottom-title-box{
          margin:40px 0;
          position: relative;
          display: flex;
          padding:40px 0;
          div:nth-child(1){
            flex: 1;
          }
          div:nth-child(2){
            p{
              text-align: center;
              line-height:36px;
              font-size:18px;
            }
          }
          div:nth-child(3){
            width:50px;
          }
          img{
            width:150px;
            height:150px;
            position: absolute;
            left:400px;
            top:0;
          }
        }
      }
      .informDom-box-2{
        overflow: hidden;
        margin-top:50px;
        .title-p-1{
          color:#333;
          font-size:16px;
          font-weight:600;
          line-height:24px;
          text-indent:40px;
          padding:13px 0;
        }
        .table-max-big-box{
          .table-title-box{
            display: flex;
            border:1px solid #333;
            p{
              font-size:14px;
              font-weight:700;
              color:#333;
              text-align: center;
              line-height:53px;
            }
            p:nth-child(1){
              width:66px;
            }
            p:nth-child(2){
              line-height:20px;
              padding:6px 35px;
              width:122px;
              border-left:1px solid #333;
              border-right:1px solid #333;
            }
            p:nth-child(3){
              width:340px;
              border-right:1px solid #333;
            }
            p:nth-child(4){
              width:100px;
            }
          }
          .table-for-box:nth-child(1){
            border-bottom:none;
          }
          .table-for-box{
            border-left:1px solid #333;
            border-right:1px solid #333;
            border-bottom:1px solid #333;
            display: flex;
            .table-for-index-box{
              width:66px;
              display: flex;
              flex-direction: column;
              p:nth-child(1){
                flex:1;
              }
              p:nth-child(2){
                font-size:14px;
                line-height:18px;
                padding:3px 10px;
                text-align: center;
              }
              p:nth-child(3){
                flex:1;
              }
            }
            .table-for-sub-box{
              width:122px;
              border-left:1px solid #333;
              border-right:1px solid #333;
              display: flex;
              flex-direction: column;
              p:nth-child(1){
                flex:1;
              }
              p:nth-child(2){
                font-size:14px;
                line-height:18px;
                padding:3px 10px;
                text-align: center;
              }
              p:nth-child(3){
                flex:1;
              }

            }
            .table-for-text-box{
              width:340px;
              border-right:1px solid #333;
              padding:10px;
              .table-for-text-min-box{
                p{
                  padding:4px 0;
                  font-size:14px;
                  line-height:18px;
                }
                .table-for-text-img-box{
                  margin-top:4px;
                  img{
                    display: inline-block;
                    width:99px;
                    height:56px;
                    cursor: pointer;
                  }
                  img:nth-child(1){
                    margin-right:10px;
                  }
                  img:nth-child(2){
                    margin-right:10px;
                  }
                  img:nth-child(4){
                    margin-top:10px;
                    margin-right:10px;
                  }
                  img:nth-child(5){
                    margin-top:10px;
                    margin-right:10px;
                  }
                }
              }
            }
            .table-for-code-box{
              width:100px;
              padding:10px;
              p{
                padding:4px 0;
                font-size:14px;
                line-height:18px;
              }
            }
          }
        }
      }
    }
    .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>
