<template>
  <div id="info-1">
    <van-row>
      <van-col span="24" class="main">
        <van-col span="24" class="one">
          <van-image :src="img_url"></van-image>
        </van-col>
        <van-col span="24" class="two">
          <van-form label-width="6em">
            <van-field v-model="info.create_number" label="申请号" readonly />
            <van-field v-model="info.create_date" label="申请日" readonly />
            <van-field v-model="info.success_number" label="公开(公告)号" readonly />
            <van-field v-model="info.success_date" label="公开(公告)日" readonly />
            <van-field v-model="info.inventor" label="发明人" type="textarea" autosize rows="1" readonly />
            <van-field v-model="info.agent" label="代理机构" type="textarea" rows="1" autosize readonly />
            <van-field v-model="info.agent_personal" label="代理人" type="textarea" rows="1" autosize readonly />
            <van-field v-model="info.abstract" label="摘要" type="textarea" autosize rows="1" readonly />
            <van-field v-model="info.address" label="发明人地址" type="textarea" autosize rows="1" readonly />
            <van-field v-model="info.name" label="专利名称" type="textarea" autosize rows="1" readonly />
            <van-field v-model="info.apply_personal" label="申请人" type="textarea" autosize rows="1" readonly />
            <van-field v-model="info.term" label="专利有效性" readonly />
            <van-field v-model="info.type" label="专利类型" readonly />
            <van-field v-model="info.nationality" label="公开国别" readonly />
            <van-field v-model="info.ipc_type" label="IPC主分类" readonly />
            <van-field v-model="info.onlegal_status" label="当前法律状态" type="textarea" autosize rows="1" readonly />
            <van-field v-model="info.legal_status" label="法律状态" type="textarea" autosize rows="1" readonly />
            <van-field v-model="info.law_date" label="法律文书日期" readonly />
            <van-field v-model="info.on_obligee" label="当前权利人" type="textarea" autosize rows="1" readonly />
            <van-field v-model="info.apply_address" label="申请人地址(其他)" type="textarea" autosize rows="1" readonly />
            <van-field v-model="info.apply_other" label="申请人(其他)" type="textarea" autosize rows="1" readonly />
            <van-field v-model="info.law_num" label="法律文书编号" readonly />
            <van-field v-model="info.first_opendate" label="首次公开日" readonly />
            <van-field v-model="info.empower_date" label="授权公告日" readonly />
            <van-field v-model="info.lose_date" label="失效日" readonly />
            <van-field v-model="info.examine_date" label="实质审查生效日" readonly />
            <van-field v-model="info.invention_design" label="发明(设计)人(其他)" type="textarea" autosize rows="1" readonly />
            <!-- <van-field v-model="info.incopat_link" label="链接到incoPat" readonly /> -->
            <van-field v-model="info.first_ask" label="首项权利要求" type="textarea" autosize rows="1" readonly />
            <van-field v-model="info.first_apply" label="第一申请人" type="textarea" autosize rows="1" readonly />
            <van-field v-model="info.apply_city" label="中国申请人地市" readonly />
            <van-field v-model="info.business_code" label="工商统一社会信用代码" type="textarea" autosize rows="1" readonly />
            <van-field v-model="info.business_address" label="工商注册地址" type="textarea" autosize rows="1" readonly />
            <van-field v-model="info.first_inventor" label="第一发明人" readonly />
            <van-field v-model="info.shared_value" label="合享价值度" type="textarea" autosize rows="1" readonly />
            <van-field v-model="info.techol_stable" label="技术稳定性" type="textarea" autosize rows="1" readonly />
            <van-field v-model="info.techol_advanced" label="技术先进性" type="textarea" autosize rows="1" readonly />
            <!-- <van-field v-model="info.pct_apply" label="PCT国际申请号" readonly />
            <van-field v-model="info.pct_publish" label="PCT国际公布号" readonly /> -->
          </van-form>
        </van-col>
      </van-col>
    </van-row>
  </div>
</template>

<script>
import { mapState, createNamespacedHelpers } from 'vuex';
export default {
  name: 'info-1',
  props: {
    info: { type: Object },
  },
  components: {},
  data: function () {
    return { img_url: '' };
  },
  created() {},
  methods: {
    searchImg(data) {
      if (data && data.length > 0) {
        var url = data.map((item) => item.url)[0];
        this.$set(this, `img_url`, url);
      } else {
        var url = require('@/assets/fmzl.jpg');
        this.$set(this, `img_url`, url);
      }
    },
  },
  computed: {
    ...mapState(['user']),
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
  watch: {
    info: {
      deep: true,
      immediate: true,
      handler(val) {
        this.searchImg(val.img_url);
      },
    },
  },
};
</script>

<style lang="less" scoped></style>
