guhongwei 3 years ago
parent
commit
b9fcc31182

+ 14 - 8
src/router/index.js

@@ -201,39 +201,45 @@ const zlyy = [
   // 管理员-专利审核
   {
     path: '/service/patent/admin/examine/patent',
-    meta: { title: '专利申请管理' },
+    meta: { title: '专利申请' },
     component: () => import('../views/service/patent/admin/examine/patent.vue'),
   },
+  // 国知局分发消息
+  {
+    path: '/service/patent/admin/examine/hairmess',
+    meta: { title: '分发消息' },
+    component: () => import('../views/service/patent/admin/examine/hairmess.vue'),
+  },
   {
     path: '/service/patent/admin/examine/analysis',
-    meta: { title: '专利分析管理' },
+    meta: { title: '专利分析' },
     component: () => import('../views/service/patent/admin/examine/analysis.vue'),
   },
   // 管理员-专利申请管理
   {
     path: '/service/patent/admin/patent/info',
-    meta: { title: '专利管理' },
+    meta: { title: '专利信息' },
     component: () => import('../views/service/patent/admin/patent/info.vue'),
   },
   {
     path: '/service/patent/admin/patent/info_create',
-    meta: { title: '专利管理-添加专利' },
+    meta: { title: '专利信息-添加专利' },
     component: () => import('../views/service/patent/admin/patent/info_create.vue'),
   },
   {
     path: '/service/patent/admin/patent/info_import',
-    meta: { title: '专利管理-导入专利' },
+    meta: { title: '专利信息-导入专利' },
     component: () => import('../views/service/patent/admin/patent/info_import.vue'),
   },
   {
     path: '/service/patent/admin/patent/info_result',
-    meta: { title: '专利管理-导出结果' },
+    meta: { title: '专利信息-导出结果' },
     component: () => import('../views/service/patent/admin/patent/info_result.vue'),
   },
   // 管理员-专利评估管理
   {
     path: '/service/patent/admin/patent/assessment',
-    meta: { title: '专利评估管理' },
+    meta: { title: '专利评估' },
     component: () => import('../views/service/patent/admin/patent/assessment.vue'),
   },
   {
@@ -244,7 +250,7 @@ const zlyy = [
   // 管理员-专利交易管理
   {
     path: '/service/patent/admin/patent/trans',
-    meta: { title: '专利交易管理' },
+    meta: { title: '专利交易' },
     component: () => import('../views/service/patent/admin/patent/trans.vue'),
   },
   {

+ 9 - 8
src/views/service/patent/admin/adminBtn.vue

@@ -5,25 +5,26 @@
         <van-col span="24" class="one">
           <van-divider content-position="left" :style="{ color: '#1989fa', borderColor: '#1989fa' }">我的消息</van-divider>
           <van-col span="24" class="one_1">
-            <van-cell title="咨询服务管理" @click="pathBtn('admin/message', 'service')" is-link />
+            <van-cell title="咨询服务" @click="pathBtn('admin/message', 'service')" is-link />
             <van-cell title="通知管理" @click="pathBtn('admin/message', 'notice')" is-link />
-            <van-cell title="审核通知管理" @click="pathBtn('admin/message', 'examine')" is-link />
-            <van-cell title="专利预警管理" @click="pathBtn('admin/message', 'warning')" is-link />
+            <van-cell title="审核通知" @click="pathBtn('admin/message', 'examine')" is-link />
+            <van-cell title="专利预警" @click="pathBtn('admin/message', 'warning')" is-link />
           </van-col>
         </van-col>
         <van-col span="24" class="one">
           <van-divider content-position="left" :style="{ color: '#1989fa', borderColor: '#1989fa' }">专利审核</van-divider>
           <van-col span="24" class="one_1">
-            <van-cell title="专利申请管理" @click="pathBtn('admin/examine', 'patent')" is-link />
-            <van-cell title="专利分析管理" @click="pathBtn('admin/examine', 'analysis')" is-link />
+            <van-cell title="专利申请" @click="pathBtn('admin/examine', 'patent')" is-link />
+            <van-cell title="国知局分发消息" @click="pathBtn('admin/examine', 'hairmess')" is-link />
+            <van-cell title="专利分析" @click="pathBtn('admin/examine', 'analysis')" is-link />
           </van-col>
         </van-col>
         <van-col span="24" class="one">
           <van-divider content-position="left" :style="{ color: '#1989fa', borderColor: '#1989fa' }">专利管理</van-divider>
           <van-col span="24" class="one_1">
-            <van-cell title="专利管理" @click="pathBtn('admin/patent', 'info')" is-link />
-            <van-cell title="专利评估管理" @click="pathBtn('admin/patent', 'assessment')" is-link />
-            <van-cell title="专利交易管理" @click="pathBtn('admin/patent', 'trans')" is-link />
+            <van-cell title="专利信息" @click="pathBtn('admin/patent', 'info')" is-link />
+            <van-cell title="专利评估" @click="pathBtn('admin/patent', 'assessment')" is-link />
+            <van-cell title="专利交易" @click="pathBtn('admin/patent', 'trans')" is-link />
           </van-col>
         </van-col>
       </van-col>

+ 3 - 3
src/views/service/patent/admin/examine/analysis/list-1.vue

@@ -48,9 +48,9 @@ export default {
     },
     // 整理状态
     getStu(status) {
-      if (status == '0') return '待审核';
-      else if (status == '1') return '审核通过';
-      else if (status == '-1') return '审核拒绝';
+      if (status == '0') return '已提交给相应机构,请等待审核';
+      else if (status == '1') return '管理员审核通过';
+      else if (status == '-1') return '管理员审核未通过,请查看审核意见,并重新提交申请';
     },
   },
   computed: {

+ 151 - 0
src/views/service/patent/admin/examine/hairmess.vue

@@ -0,0 +1,151 @@
+<template>
+  <div id="hairmess">
+    <admin-frame @search="search" :limit="limit" :total="total" topType="2" @back="back" @add="add" :useNav="false">
+      <template v-slot:info>
+        <list-1 :list="list"></list-1>
+      </template>
+    </admin-frame>
+    <van-dialog class="dialog" v-model="show" title="分发消息" :show-confirm-button="false" :show-cancel-button="false">
+      <van-form>
+        <van-field v-model="form.create_number" center clearable label="专利申请号" placeholder="请输入专利申请号">
+          <template #button>
+            <van-button size="small" type="primary" @click="searchPatent">查询</van-button>
+          </template>
+        </van-field>
+        <van-field v-model="form.patent_name" name="专利名称" label="专利名称" />
+        <van-field v-model="form.to_name" name="接收人" label="接收人" />
+        <van-field name="file_url" label="预警文件">
+          <template #input>
+            <van-uploader
+              :fileList="form.file_url"
+              :max-count="1"
+              :after-read="(file) => toUpload(file, 'file_url')"
+              @delete="(file) => toDelete(file, 'file_url')"
+              accept="file"
+            />
+          </template>
+        </van-field>
+        <van-col span="24" class="btn">
+          <van-button type="danger" size="small" @click="show = false">取消发送</van-button>
+          <van-button type="info" size="small" @click="onSubmit">确认发送</van-button>
+        </van-col>
+      </van-form>
+    </van-dialog>
+  </div>
+</template>
+
+<script>
+import list1 from './hairmess/list-1.vue';
+import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: patentwarning } = createNamespacedHelpers('patentwarning');
+const { mapActions: patentapply } = createNamespacedHelpers('patentapply');
+const { mapActions: upload } = createNamespacedHelpers('upload');
+export default {
+  name: 'hairmess',
+  props: {},
+  components: {
+    adminFrame,
+    list1,
+  },
+  data: function () {
+    return {
+      limit: 5,
+      total: 0,
+      list: [],
+      // 添加预警信息
+      show: false,
+      form: {},
+    };
+  },
+  async created() {
+    this.search();
+  },
+  methods: {
+    ...upload(['upload']),
+    ...patentwarning(['query', 'create']),
+    ...patentapply({ patentapplyQuery: 'query' }),
+    async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 分发消息创建
+    add() {
+      this.show = true;
+    },
+    async onSubmit() {
+      let data = this.form;
+      let res = await this.create(data);
+      if (this.$checkRes(res)) {
+        this.$toast({ type: `success`, message: `操作成功` });
+        this.show = false;
+      } else {
+        this.$toast({ type: `success`, message: `${res.errmsg}` });
+      }
+    },
+    async searchPatent() {
+      let data = this.form;
+      if (data.create_number) {
+        let res = await this.patentapplyQuery({ create_number: data.create_number });
+        if (this.$checkRes(res)) {
+          for (const val of res.data) {
+            let data = {
+              create_number: val.create_number,
+              patent_id: val.id,
+              patent_name: val.name,
+              to_id: val.user_id,
+              to_name: val.apply_name,
+            };
+            this.$set(this, `form`, data);
+          }
+        }
+      } else {
+        this.$toast({ type: `fail`, message: `缺少关键信息` });
+      }
+    },
+    // 返回
+    back() {
+      this.$router.push({ path: '/service/patent/index' });
+    },
+    async toUpload({ file }, model) {
+      // 上传,赋值
+      const res = await this.upload({ file, dir: 'file' });
+      if (this.$checkRes(res)) {
+        this.$set(this.form, model, [{ name: res.name, url: res.uri }]);
+      }
+    },
+    toDelete(file, model) {
+      const index = this.form[model].findIndex((f) => _.isEqual(f, file));
+      this.form[model].splice(index, 1);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.dialog {
+  .btn {
+    margin: 10px 0;
+    text-align: center;
+    .van-button {
+      margin: 0 10px;
+    }
+  }
+}
+</style>

+ 97 - 0
src/views/service/patent/admin/examine/hairmess/list-1.vue

@@ -0,0 +1,97 @@
+<template>
+  <div id="list-1">
+    <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.create_number }}
+          </van-col>
+          <van-col span="24" class="other">
+            <van-col span="24" class="otherInfo">
+              专利名称:<span>{{ item.patent_name || '暂无' }}</span>
+            </van-col>
+            <van-col span="24" class="otherInfo">
+              接收人:<span>{{ item.to_name || '暂无' }}</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';
+export default {
+  name: 'list-1',
+  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: `未上传文件` });
+      }
+    },
+  },
+  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: 5px;
+      }
+    }
+  }
+}
+</style>

+ 1 - 64
src/views/service/patent/admin/examine/patent.vue

@@ -2,7 +2,7 @@
   <div id="patent">
     <admin-frame @search="search" :limit="limit" :total="total" topType="2" @back="back" :rightArrow="false" :useNav="false">
       <template v-slot:info>
-        <list-1 :list="list" @view="view" @relation="relation" @warning="warning" @examine="toExamine"></list-1>
+        <list-1 :list="list" @view="view" @relation="relation" @examine="toExamine"></list-1>
       </template>
     </admin-frame>
     <van-dialog class="dialog" v-model="show" title="详细信息" :show-confirm-button="false" show-cancel-button>
@@ -18,26 +18,6 @@
         <van-button type="info" size="small" @click="relationSubmit">确认关联</van-button>
       </van-col>
     </van-dialog>
-    <van-dialog class="thrDialog" v-model="fourShow" title="专利预警信息" :show-confirm-button="false" :show-cancel-button="false">
-      <van-form>
-        <van-field v-model="warningForm.create_number" name="专利申请号" label="专利申请号" readonly />
-        <van-field name="file_url" label="预警文件">
-          <template #input>
-            <van-uploader
-              :fileList="warningForm.file_url"
-              :max-count="1"
-              :after-read="(file) => toUpload(file, 'file_url')"
-              @delete="(file) => toDelete(file, 'file_url')"
-              accept="file"
-            />
-          </template>
-        </van-field>
-        <van-col span="24" class="btn">
-          <van-button type="danger" size="small" @click="fourShow = false">取消发送</van-button>
-          <van-button type="info" size="small" @click="warningSubmit">确认发送</van-button>
-        </van-col>
-      </van-form>
-    </van-dialog>
   </div>
 </template>
 
@@ -48,9 +28,6 @@ import checkForm from './patent/checkForm.vue';
 import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: patentapply } = createNamespacedHelpers('patentapply');
-const { mapActions: patentwarning } = createNamespacedHelpers('patentwarning');
-const { mapActions: upload } = createNamespacedHelpers('upload');
-var moment = require('moment');
 export default {
   name: 'patent',
   props: {},
@@ -74,18 +51,13 @@ export default {
       // 关联申请号
       thrShow: false,
       relationForm: {},
-      // 专利预警信息
-      fourShow: false,
-      warningForm: {},
     };
   },
   async created() {
     await this.search();
   },
   methods: {
-    ...upload(['upload']),
     ...patentapply(['query', 'update', 'check']),
-    ...patentwarning({ warningQuery: 'query', warningCreate: 'create' }),
     async search({ skip = 0, limit = this.limit, ...info } = {}) {
       info.admin_id = this.user._id;
       let res = await this.query({ skip, limit, ...info });
@@ -116,30 +88,6 @@ export default {
         this.$toast({ type: `success`, message: `${res.errmsg}` });
       }
     },
-    // 专利申请预警
-    warning(data) {
-      this.$set(this, `warningForm`, data);
-      this.fourShow = true;
-    },
-    // 确认发送
-    async warningSubmit() {
-      let data = this.warningForm;
-      let arr = {
-        to_id: data.user_id,
-        to_name: data.apply_name,
-        patent_id: data.id,
-        patent_name: data.name,
-        content: data.content,
-        file_url: data.file_url,
-      };
-      let res = await this.warningCreate(arr);
-      if (this.$checkRes(res)) {
-        this.$toast({ type: `success`, message: `操作成功` });
-        this.fourShow = false;
-      } else {
-        this.$toast({ type: `success`, message: `${res.errmsg}` });
-      }
-    },
     // 审核
     toExamine(data) {
       this.$set(this, `form`, data);
@@ -158,17 +106,6 @@ export default {
         this.$toast({ type: `fail`, message: `${res.errmsg}` });
       }
     },
-    async toUpload({ file }, model) {
-      // 上传,赋值
-      const res = await this.upload({ file, dir: 'file' });
-      if (this.$checkRes(res)) {
-        this.$set(this.warningForm, model, [{ name: res.name, url: res.uri }]);
-      }
-    },
-    toDelete(file, model) {
-      const index = this.warningForm[model].findIndex((f) => _.isEqual(f, file));
-      this.warningForm[model].splice(index, 1);
-    },
     // 返回
     back() {
       this.$router.push({ path: '/service/patent/index' });

+ 0 - 5
src/views/service/patent/admin/examine/patent/list-1.vue

@@ -26,7 +26,6 @@
           <van-col span="24" class="btn">
             <van-button size="small" type="info" @click="view(item)">查看信息</van-button>
             <van-button size="small" type="info" @click="relation(item)" v-if="item.create_number == undefined">关联申请号</van-button>
-            <van-button size="small" type="info" @click="warning(item)">国知局反馈信息</van-button>
             <van-button size="small" type="info" @click="examine(item)" v-if="item.status == '1'">审核申请</van-button>
           </van-col>
         </van-col>
@@ -56,10 +55,6 @@ export default {
     relation(data) {
       this.$emit('relation', data);
     },
-    // 专利预警
-    warning(data) {
-      this.$emit('warning', data);
-    },
     // 审核专利
     examine(data) {
       this.$emit('examine', data);

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

@@ -4,9 +4,15 @@
       <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 }}
+            {{ item.create_number }}
           </van-col>
           <van-col span="24" class="other">
+            <van-col span="24" class="otherInfo">
+              专利名称:<span>{{ item.patent_name || '暂无' }}</span>
+            </van-col>
+            <!-- <van-col span="24" class="otherInfo">
+              接收人:<span>{{ item.to_name || '暂无' }}</span>
+            </van-col> -->
             <van-col span="24" class="otherInfo">
               发送时间:<span>{{ getDate(item.meta) }}</span>
             </van-col>
@@ -41,7 +47,6 @@ export default {
       } else {
         this.$toast({ type: `fail`, message: `未上传文件` });
       }
-      console.log(data);
     },
     getDate(val) {
       let newDate = moment(val.createdAt).format('YYYY-MM-DD hh:mm:ss');