guhongwei 3 anni fa
parent
commit
bef9af4f60

+ 5 - 0
src/router/index.js

@@ -327,6 +327,11 @@ const zlyy = [
     meta: { title: '专利分析' },
     component: () => import('../views/service/patent/mech/patent/navigation/index.vue'),
   },
+  {
+    path: '/service/patent/mech/patent/navigation/info',
+    meta: { title: '专利分析-详细信息' },
+    component: () => import('../views/service/patent/mech/patent/navigation/info.vue'),
+  },
   {
     path: '/service/patent/mech/patent/early',
     meta: { title: '专利预警' },

+ 5 - 1
src/views/service/patent/mech/patent/navigation/index.vue

@@ -5,7 +5,7 @@
         <van-col span="24" class="one">
           <van-button type="info" size="small" @click="addSearch">添加查询</van-button>
         </van-col>
-        <van-col span="24"><list-1 :list="list"></list-1></van-col>
+        <van-col span="24"><list-1 :list="list" @detail="detail"></list-1></van-col>
       </template>
     </admin-frame>
     <van-dialog v-model="show" title="查询条件" class="dialog" :showConfirmButton="false">
@@ -65,6 +65,10 @@ export default {
       this.$set(this, `searchForm`, {});
       this.show = false;
     },
+    // 查看详情
+    detail(data) {
+      this.$router.push({ path: '/service/patent/mech/patent/navigation/info', query: { id: data.id } });
+    },
   },
   computed: {
     ...mapState(['user']),

+ 64 - 0
src/views/service/patent/mech/patent/navigation/info.vue

@@ -0,0 +1,64 @@
+<template>
+  <div id="info_create">
+    <admin-frame topType="2" @back="back" :rightArrow="false" :usePage="false" :useNav="false">
+      <template v-slot:info>
+        <detail-1 :form="form"></detail-1>
+      </template>
+    </admin-frame>
+  </div>
+</template>
+
+<script>
+import detail1 from './parts/detail-1.vue';
+import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: patentinfo } = createNamespacedHelpers('patentinfo');
+export default {
+  name: 'info_create',
+  props: {},
+  components: {
+    adminFrame,
+    detail1,
+  },
+  data: function () {
+    return {
+      form: {},
+    };
+  },
+  async created() {
+    if (this.id) await this.search();
+  },
+  methods: {
+    ...patentinfo(['fetch']),
+    async search() {
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `form`, res.data);
+      }
+    },
+
+    // 返回
+    back() {
+      this.$router.push({ path: '/service/patent/mech/patent/navigation' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 90 - 0
src/views/service/patent/mech/patent/navigation/parts/detail-1.vue

@@ -0,0 +1,90 @@
+<template>
+  <div id="detail-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>
+            <van-field v-model="form.term" name="term" label="专利有效性" />
+            <van-field v-model="form.name" name="name" label="名称" />
+            <van-field v-model="form.create_number" name="create_number" label="申请号" />
+            <van-field v-model="form.create_date" name="create_date" label="申请日" />
+            <van-field v-model="form.success_number" name="success_number" label="公开(公告)号" />
+            <van-field v-model="form.success_date" name="success_date" label="公开(公告)日" />
+            <van-field v-model="form.type" name="type" label="专利类型" />
+            <van-field v-model="form.inventor" name="inventor" label="发明人" />
+            <van-field v-model="form.address" name="address" label="发明人地址" />
+            <van-field v-model="form.apply_personal" name="apply_personal" label="申请人" />
+            <van-field v-model="form.agent_personal" name="agent_personal" label="代理人" />
+            <van-field v-model="form.agent" name="agent" label="代理机构" />
+            <van-field v-model="form.abstract" name="abstract" label="摘要" rows="1" autosize type="textarea" />
+            <van-field name="trans_status" label="是否交易">
+              <template #input>
+                <van-radio-group v-model="form.trans_status" direction="horizontal" disabled>
+                  <van-radio name="0">未交易</van-radio>
+                  <van-radio name="1">已交易</van-radio>
+                </van-radio-group>
+              </template>
+            </van-field>
+          </van-form>
+        </van-col>
+      </van-col>
+    </van-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'detail-1',
+  props: { form: { type: Object } },
+  components: {},
+  data: function () {
+    return {
+      img_url: '',
+    };
+  },
+  created() {},
+  methods: {
+    searchImg(data) {
+      if (data.img_url) {
+        var url = data.img_url.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: {
+    form: {
+      deep: true,
+      immediate: true,
+      handler(val) {
+        this.searchImg(val);
+      },
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .one {
+    height: 220px;
+    border-bottom: 1px solid #f1f1f1;
+    .van-image {
+      width: 100%;
+      height: 219px;
+    }
+  }
+}
+</style>