guhongwei 3 years ago
parent
commit
ce3f917ad7

+ 6 - 0
src/router/index.js

@@ -366,6 +366,12 @@ const zlyy = [
     meta: { title: '专利申请-审核结果' },
     component: () => import('../views/service/patent/user/apply/apply/result.vue'),
   },
+  {
+    path: '/service/patent/user/apply/apply/gzjDetail',
+    meta: { title: '专利申请-国知局信息' },
+    component: () => import('../views/service/patent/user/apply/apply/gzjDetail.vue'),
+  },
+
   // 用户-专利分析
   {
     path: '/service/patent/user/apply/analysis',

+ 66 - 0
src/views/service/patent/user/apply/apply/gzjDetail.vue

@@ -0,0 +1,66 @@
+<template>
+  <div id="detail">
+    <admin-frame @search="search" :limit="limit" :total="total" topType="2" @back="back" :rightArrow="false" :useNav="false">
+      <template v-slot:info>
+        <list-2 :list="list"></list-2>
+      </template>
+    </admin-frame>
+  </div>
+</template>
+
+<script>
+import list2 from './parts/list-2.vue';
+import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: patentwarning } = createNamespacedHelpers('patentwarning');
+export default {
+  name: 'detail',
+  props: {},
+  components: {
+    adminFrame,
+    list2,
+  },
+  data: function () {
+    return {
+      list: [],
+      limit: 5,
+      total: 0,
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...patentwarning(['query']),
+    async search({ skip = 0, limit = this.limit, ...info } = {}) {
+      info.patnet_id = this.id;
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+      }
+    },
+    // 返回
+    back() {
+      this.$router.push({ path: '/service/patent/user/apply/apply' });
+    },
+  },
+  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>

+ 5 - 1
src/views/service/patent/user/apply/apply/index.vue

@@ -2,7 +2,7 @@
   <div id="index">
     <admin-frame @search="search" :limit="limit" :total="total" topType="2" @back="back" @add="add" :useNav="false">
       <template v-slot:info>
-        <list-1 :list="list" @result="result"></list-1>
+        <list-1 :list="list" @result="result" @gzjBtn="gzjBtn"></list-1>
       </template>
     </admin-frame>
   </div>
@@ -48,6 +48,10 @@ export default {
     result(data) {
       this.$router.push({ path: '/service/patent/user/apply/apply/result', query: { id: data.id } });
     },
+    // 查看国知局反馈信息
+    gzjBtn(data) {
+      this.$router.push({ path: '/service/patent/user/apply/apply/gzjDetail', query: { id: data.id } });
+    },
     // 返回
     back() {
       this.$router.push({ path: '/service/patent/index' });

+ 5 - 0
src/views/service/patent/user/apply/apply/parts/list-1.vue

@@ -19,6 +19,7 @@
           </van-col>
           <van-col span="24" class="btn">
             <van-button size="small" type="info" @click="result(item)">查看审核结果</van-button>
+            <van-button size="small" type="info" @click="gzjBtn(item)">国知局反馈信息</van-button>
           </van-col>
         </van-col>
       </van-col>
@@ -42,6 +43,10 @@ export default {
     result(data) {
       this.$emit('result', data);
     },
+    // 国知局反馈信息
+    gzjBtn(data) {
+      this.$emit('gzjBtn', data);
+    },
     // 整理状态
     getStu(status) {
       if (status == '0') return '已提交给相应机构,请等待审核';

+ 99 - 0
src/views/service/patent/user/apply/apply/parts/list-2.vue

@@ -0,0 +1,99 @@
+<template>
+  <div id="list-2">
+    <van-row>
+      <van-col span="24" class="main">
+        <van-col span="24" class="list" v-for="(item, index) in list" :key="index">
+          <van-col span="24" class="title textOver">
+            {{ item.patent_name }}
+          </van-col>
+          <van-col span="24" class="other">
+            <van-col span="24" class="otherInfo">
+              发送时间:<span>{{ getDate(item.meta) }}</span>
+            </van-col>
+          </van-col>
+          <van-col span="24" class="btn">
+            <van-button size="small" type="info" @click="download(item)">下载文件</van-button>
+          </van-col>
+        </van-col>
+      </van-col>
+    </van-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+var moment = require('moment');
+export default {
+  name: 'list-2',
+  props: {
+    list: { type: Array },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {
+    download(data) {
+      if (data.file_url.length > 0) {
+        let url = data.file_url.map((i) => i.url);
+        window.location.href = `${process.env.VUE_APP_HOST}/${url[0]}`;
+      } else {
+        this.$toast({ type: `fail`, message: `未上传文件` });
+      }
+      console.log(data);
+    },
+    getDate(val) {
+      let newDate = moment(val.createdAt).format('YYYY-MM-DD hh:mm:ss');
+      if (newDate) return newDate;
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  padding: 8px 8px 0 8px;
+  .list {
+    background-color: #fff;
+    margin: 0 0 8px 0;
+    padding: 8px;
+    border-radius: 5px;
+    .title {
+      font-size: 16px;
+      font-weight: bold;
+      margin: 0 0 5px 0;
+    }
+    .other {
+      margin: 0 0 5px 0;
+      .otherInfo {
+        font-size: 14px;
+        color: #666;
+        margin: 0 0 5px 0;
+        span {
+          color: #000;
+        }
+      }
+    }
+    .btn {
+      text-align: center;
+      .van-button {
+        margin: 0 5px;
+      }
+    }
+  }
+}
+</style>