<template>
  <div id="model-0">
    <el-row>
      <el-col :span="24" class="main">
        <el-col :span="24" class="btn">
          <slot></slot>
        </el-col>
        <el-col :span="24" class="info">
          <el-col :span="24" class="top">
            <el-col :span="7" class="left">
              <el-col :span="24" class="noImage">
                <p>专利有效性</p>
                <p>{{ data.term }}</p>
              </el-col>
            </el-col>
            <el-col :span="17" class="right">
              <el-col :span="24" class="name textOver">
                {{ data.name }}
              </el-col>
              <el-col :span="12">
                <el-col :span="8" class="otherInfo textOver"> 申请号 </el-col>
                <el-col :span="16" class="otherInfo textOver">
                  {{ data.create_number || '暂无' }}
                </el-col>
              </el-col>
              <el-col :span="12">
                <el-col :span="8" class="otherInfo textOver"> 申请日 </el-col>
                <el-col :span="16" class="otherInfo textOver">
                  {{ data.create_date || '暂无' }}
                </el-col>
              </el-col>
              <el-col :span="12">
                <el-col :span="8" class="otherInfo textOver"> 公开(公告)号 </el-col>
                <el-col :span="16" class="otherInfo textOver">
                  {{ data.success_number || '暂无' }}
                </el-col>
              </el-col>
              <el-col :span="12">
                <el-col :span="8" class="otherInfo textOver"> 公开(公告)日 </el-col>
                <el-col :span="16" class="otherInfo textOver">
                  {{ data.success_date || '暂无' }}
                </el-col>
              </el-col>
              <el-col :span="12">
                <el-col :span="8" class="otherInfo textOver"> 申请人 </el-col>
                <el-col :span="16" class="otherInfo textOver">
                  {{ data.apply_personal || '暂无' }}
                </el-col>
              </el-col>
              <el-col :span="12">
                <el-col :span="8" class="otherInfo textOver"> 专利类型 </el-col>
                <el-col :span="16" class="otherInfo textOver">
                  {{ data.type || '暂无' }}
                </el-col>
              </el-col>
              <el-col :span="24">
                <el-col :span="4" class="otherInfo textOver"> 发明人 </el-col>
                <el-col :span="20" class="otherInfo textOver">
                  {{ data.inventor || '暂无' }}
                </el-col>
              </el-col>

              <el-col :span="24">
                <el-col :span="4" class="otherInfo textOver"> 代理人 </el-col>
                <el-col :span="20" class="otherInfo textOver">
                  {{ data.agent_personal || '暂无' }}
                </el-col>
              </el-col>
              <el-col :span="24">
                <el-col :span="4" class="otherInfo textOver"> 代理机构 </el-col>
                <el-col :span="20" class="otherInfo textOver">
                  {{ data.agent || '暂无' }}
                </el-col>
              </el-col>
              <el-col :span="24">
                <el-col :span="4" class="otherInfo textOver"> 地址 </el-col>
                <el-col :span="20" class="otherInfo textOver">
                  {{ data.address || '暂无' }}
                </el-col>
              </el-col>
            </el-col>
          </el-col>
          <el-col :span="24" class="down">
            <el-col :span="24" class="downInfo">
              <h1>摘要</h1>
              <p>{{ data.abstract || '暂无' }}</p>
            </el-col>
            <el-col :span="24" class="downInfo" v-if="data.img_url && data.img_url.length > 0">
              <h1>专利图鉴</h1>
              <el-image :src="data.img_url[0].url"></el-image>
            </el-col>
          </el-col>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { mapState, createNamespacedHelpers } from 'vuex';
export default {
  name: 'model-0',
  props: {
    data: { type: Object },
  },
  components: {},
  data: function () {
    return {};
  },
  created() {},
  methods: {},
  computed: {
    ...mapState(['user']),
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
  watch: {
    test: {
      deep: true,
      immediate: true,
      handler(val) {},
    },
  },
};
</script>

<style lang="less" scoped>
.main {
  .btn {
    text-align: right;
    margin: 0 0 10px 0;
  }
  .info {
    .top {
      margin: 0 0 10px 0;
      .left {
        margin: 0 10px 0 0;
        border: 1px solid #ccc;
        .el-image {
          width: 100%;
          height: 320px;
        }
        .noImage {
          height: 320px;
          p:nth-child(1) {
            font-size: 25px;
            text-align: left;
            padding: 10px;
          }
          p:nth-child(2) {
            text-align: center;
            padding: 30% 0;
            font-size: 35px;
            font-weight: bold;
            color: #ff0000;
          }
        }
      }
      .right {
        width: 638px;
        border: 1px solid #ccc;
        .name {
          height: 40px;
          line-height: 40px;
          padding: 0 10px;
          border-bottom: 1px solid #ccc;
          font-size: 18px;
          font-weight: bold;
          text-align: center;
        }
        .otherInfo {
          height: 40px;
          line-height: 40px;
          padding: 0 0 0 10px;
          border-right: 1px solid #ccc;
          border-bottom: 1px solid #ccc;
          font-size: 16px;
          .tooltip {
            float: left;
            width: 98%;
          }
        }
      }
    }
    .down {
      border: 1px solid #cccccc;
      padding: 10px;
      .downInfo {
        margin: 0 0 15px 0;
        border-bottom: 1px dashed #ccc;
        p {
          font-size: 18px;
          line-height: 38px;
          text-indent: 2rem;
        }
        h1 {
          font-weight: 400;
          font-size: 24px;
          margin: 0 0 10px 0;
        }
      }
    }
  }
}
</style>
