guhongwei 2 年 前
コミット
4956d07f3b

+ 2 - 2
src/layout/login/login-1.vue

@@ -23,8 +23,8 @@
           </div>
         </van-form>
         <van-col span="24" class="register">
-          <span class="text">还没有账号?</span>
-          <van-button type="info" size="mini" plain @click="regBtn">现在注册</van-button>
+          <!-- <span class="text">还没有账号?</span> -->
+          <!-- <van-button type="info" size="mini" plain @click="regBtn">现在注册</van-button> -->
         </van-col>
       </van-col>
     </van-row>

+ 1 - 1
src/layout/patentInfo/list-1.vue

@@ -23,7 +23,7 @@
             <template v-else-if="user.role == '3'">
               <van-button type="info" size="small" @click="toAssess(item)" v-if="item.term != '失效'">价值评估</van-button>
               <van-button type="info" size="small" @click="toTrans(item)" v-if="item.trans_status == '0' && item.term != '失效'">专利交易</van-button>
-              <van-button type="info" size="small" @click="toGzj(item)">反馈信息</van-button>
+              <!-- <van-button type="info" size="small" @click="toGzj(item)">反馈信息</van-button> -->
             </template>
           </van-col>
         </van-col>

+ 7 - 1
src/router/index.js

@@ -190,7 +190,7 @@ const patent = [
   },
   {
     path: '/patent/user/message/read',
-    meta: { title: '已读信息查看' },
+    meta: { title: 'CPC消息' },
     component: () => import('../views/patent/user/message/read.vue'),
   },
   {
@@ -246,6 +246,12 @@ const patent = [
     meta: { title: '专利预警' },
     component: () => import('../views/patent/user/patent/early/index.vue'),
   },
+  // 国知局反馈信息
+  {
+    path: '/patent/user/patent/gzj',
+    meta: { title: '国知局反馈信息' },
+    component: () => import('../views/patent/user/patent/gzj/index.vue'),
+  },
   // 我的交易
   {
     path: '/patent/user/transaction/index',

+ 74 - 10
src/views/account/users/index.vue

@@ -1,15 +1,38 @@
 <template>
   <div id="index">
-    <admin-frame @search="search" :limit="limit" :total="total" topType="3" @back="back" :rightArrow="false" :useNav="false">
+    <admin-frame @search="search" :limit="limit" :total="total" topType="2" @back="back" :rightArrow="false" :useNav="false">
       <template v-slot:info>
         <van-col span="24" v-if="user.role == '1'" class="one">
+          <van-button type="info" size="small" @click="toSearch()">查询条件</van-button>
           <van-button type="info" size="small" @click="toAdd()">添加用戶</van-button>
-          <van-button type="info" size="small" @click="toImport()">批量注册用户</van-button>
-          <van-button type="info" size="small" @click="tpExport()">批量导出用户</van-button>
+          <van-button type="info" size="small" @click="toImport()">批量注册</van-button>
+          <van-button type="info" size="small" @click="tpExport()">批量导出</van-button>
+        </van-col>
+        <van-col span="24" class="two">
+          <list-1 :list="list" @toEdit="toEdit" @toDel="toDel" @toPatent="toPatent" @toPsd="toPsd"></list-1>
         </van-col>
-        <van-col span="24" class="two"> <list-1 :list="list" @toEdit="toEdit" @toDel="toDel" @toPatent="toPatent" @toPsd="toPsd"></list-1> </van-col>
       </template>
     </admin-frame>
+    <van-dialog
+      class="dialog"
+      v-model="dialog.show"
+      :title="dialog.title"
+      @confirm="onSearch"
+      @cancel="unSearch"
+      show-cancel-button
+      cancelButtonText="重置查询"
+      confirmButtonText="确认查询"
+    >
+      <div v-if="dialog.type == '1'">
+        <van-form label-width="3em">
+          <van-field v-model="searchInfo.phone" name="账号" label="账号" placeholder="请输入账号" />
+          <van-field readonly clickable name="code" :value="searchInfo.code" label="邀请码" placeholder="点击选择邀请码" @click="oneShow = true" />
+        </van-form>
+      </div>
+    </van-dialog>
+    <van-popup v-model="oneShow" position="bottom">
+      <van-picker show-toolbar :columns="adminList" value-key="name" @confirm="oneFim" @cancel="oneShow = false" />
+    </van-popup>
   </div>
 </template>
 
@@ -18,6 +41,7 @@ import list1 from './parts/list-1.vue';
 import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: personal } = createNamespacedHelpers('personal');
+const { mapActions: adminLogin } = createNamespacedHelpers('adminLogin');
 export default {
   name: 'index',
   props: {},
@@ -27,22 +51,48 @@ export default {
       list: [],
       limit: 4,
       total: 0,
+      searchInfo: {},
+      // 邀请码
+      adminList: [],
+      oneShow: false,
+      // 弹框
+      dialog: { title: '查询条件', show: false, type: '1' },
     };
   },
-  created() {
-    this.search();
+  async created() {
+    // 查询其他信息
+    await this.searchOther();
+    await this.search();
   },
   methods: {
     ...personal(['query', 'delete', 'export', 'updatePassword']),
-    async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
-      if (searchName) info.name = searchName;
+    ...adminLogin({ aQuery: 'query' }),
+    async search({ skip = 0, limit = this.limit, ...info } = {}) {
       if (this.user.role == '1') info.role = this.user.role;
-      let res = await this.query({ skip, limit, code: this.user.code, ...info });
+      let res = await this.query({ skip, limit, code: this.user.code, ...this.searchInfo, ...info });
       if (this.$checkRes(res)) {
         this.$set(this, `list`, res.data);
         this.$set(this, `total`, res.total);
       }
     },
+    // 添加查询条件
+    toSearch() {
+      this.dialog = { show: true, title: '查询条件', type: '1' };
+    },
+    // 确认选择
+    oneFim(data) {
+      this.$set(this.searchInfo, `code`, data.code);
+      this.oneShow = false;
+    },
+    // 确认查询
+    onSearch() {
+      this.search();
+    },
+    // 重置查询
+    unSearch() {
+      this.$set(this, `searchInfo`, {});
+      this.search();
+    },
     // 添加用户
     toAdd() {
       this.$router.push({ path: `/account/users/detail` });
@@ -86,6 +136,20 @@ export default {
     back() {
       this.$router.push({ path: `/account/index` });
     },
+    // 查询其他信息
+    async searchOther() {
+      let p1 = await this.aQuery({ role: '1' });
+      if (this.$checkRes(p1)) {
+        let data = [];
+        for (const val of p1.data) {
+          let p2 = await this.aQuery({ role: '2', pid: val.id });
+          if (this.$checkRes(p2)) {
+            data.push(...p2.data);
+          }
+        }
+        this.$set(this, `adminList`, data);
+      }
+    },
   },
   computed: {
     ...mapState(['user']),
@@ -110,7 +174,7 @@ export default {
   padding: 10px 0;
   margin: 0 0 10px 0;
   .van-button {
-    margin: 0 10px;
+    margin: 0 10px 5px 10px;
   }
 }
 </style>

+ 94 - 0
src/views/patent/user/message/parts/list-4.vue

@@ -0,0 +1,94 @@
+<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="name">{{ item.patent_name }}</van-col>
+          <van-col span="24" class="other">
+            <van-col span="24" class="other_1">
+              <span>专利号:</span>
+              <span>{{ item.create_number }}</span>
+            </van-col>
+            <van-col span="24" class="other_1">
+              <span>发送时间:</span>
+              <span>{{ getDate(item.meta.createdAt) }}</span>
+            </van-col>
+          </van-col>
+          <van-col span="24" class="btn">
+            <van-button type="primary" size="small" @click="toView(item)">文件下载</van-button>
+          </van-col>
+        </van-col>
+      </van-col>
+    </van-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+import moment from 'moment';
+export default {
+  name: 'list-1',
+  props: {
+    list: { type: Array },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {
+    // 详细信息
+    toView(value) {
+      this.$emit('toView', { data: value });
+    },
+    // 过滤时间
+    getDate(val) {
+      let newDate = moment(val).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: #ffffff;
+    margin: 0 0 10px 0;
+    padding: 8px;
+    border-radius: 5px;
+    .name {
+      font-size: 18px;
+      font-weight: bold;
+      margin: 0 0 5px 0;
+    }
+    .other {
+      margin: 0 0 5px 0;
+      .other_1 {
+        font-size: 16px;
+        margin: 0 0 5px 0;
+        span:first-child {
+          color: #858585;
+        }
+      }
+    }
+    .btn {
+      text-align: center;
+    }
+  }
+}
+</style>

+ 74 - 0
src/views/patent/user/message/read copy.vue

@@ -0,0 +1,74 @@
+<template>
+  <div id="index">
+    <admin-frame @search="search" :limit="limit" :total="total" topType="2" @back="back" :rightArrow="false" :useNav="false">
+      <template v-slot:info>
+        <list-1 :list="oneList" @toDel="toDel"></list-1>
+      </template>
+    </admin-frame>
+  </div>
+</template>
+
+<script>
+import list1 from './parts/list-1.vue';
+import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: patentexamine } = createNamespacedHelpers('patentexamine');
+export default {
+  name: 'index',
+  props: {},
+  components: {
+    adminFrame,
+    list1,
+  },
+  data: function () {
+    return {
+      limit: 5,
+      total: 0,
+      // 审核信息
+      oneList: [],
+    };
+  },
+  async created() {
+    this.search();
+  },
+  methods: {
+    ...patentexamine(['query', 'update', 'delete']),
+    async search({ skip = 0, limit = this.limit, ...info } = {}) {
+      info.to = this.user.id;
+      info.is_read = true;
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `oneList`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 删除信息
+    async toDel(data) {
+      let res = await this.delete(data.id);
+      if (this.$checkRes(res)) {
+        this.$toast({ type: 'success', message: '删除信息成功' });
+        this.search();
+      }
+    },
+    // 返回
+    back() {
+      this.$router.push({ path: '/patent/index' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 56 - 16
src/views/patent/user/message/read.vue

@@ -2,17 +2,27 @@
   <div id="index">
     <admin-frame @search="search" :limit="limit" :total="total" topType="2" @back="back" :rightArrow="false" :useNav="false">
       <template v-slot:info>
-        <list-1 :list="oneList" @toDel="toDel"></list-1>
+        <list-1 :list="list" @toView="toView"></list-1>
       </template>
     </admin-frame>
+    <van-dialog class="dialog" v-model="show" title="文件下载" :show-confirm-button="false" :show-cancel-button="true" cancel-button-text="返回">
+      <van-col span="24" class="list" v-for="(item, index) in fileList" :key="index">
+        <van-col span="24" class="name"
+          >文件路径:<span>{{ item }}</span>
+        </van-col>
+        <van-col span="24" class="btn">
+          <van-button type="info" size="small" @click="download(item)">下载文件</van-button>
+        </van-col>
+      </van-col>
+    </van-dialog>
   </div>
 </template>
 
 <script>
-import list1 from './parts/list-1.vue';
+import list1 from './parts/list-4.vue';
 import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: patentexamine } = createNamespacedHelpers('patentexamine');
+const { mapActions: patentwarning } = createNamespacedHelpers('patentwarning');
 export default {
   name: 'index',
   props: {},
@@ -24,30 +34,38 @@ export default {
     return {
       limit: 5,
       total: 0,
-      // 审核信息
-      oneList: [],
+      list: [],
+      // 文件下载
+      show: false,
+      fileList: [],
     };
   },
   async created() {
     this.search();
   },
   methods: {
-    ...patentexamine(['query', 'update', 'delete']),
-    async search({ skip = 0, limit = this.limit, ...info } = {}) {
-      info.to = this.user.id;
-      info.is_read = true;
+    ...patentwarning(['query', 'fetch']),
+    async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
+      info.to_id = this.user._id;
       let res = await this.query({ skip, limit, ...info });
       if (this.$checkRes(res)) {
-        this.$set(this, `oneList`, res.data);
+        this.$set(this, `list`, res.data);
         this.$set(this, `total`, res.total);
       }
     },
-    // 删除信息
-    async toDel(data) {
-      let res = await this.delete(data.id);
+    // 查看详细信息
+    async toView({ data }) {
+      let res = await this.fetch(data._id);
       if (this.$checkRes(res)) {
-        this.$toast({ type: 'success', message: '删除信息成功' });
-        this.search();
+        this.$set(this, `fileList`, res.data.file_url);
+        this.show = true;
+      }
+    },
+    download(data) {
+      if (data) {
+        window.location.href = `${process.env.VUE_APP_HOST}/${data}`;
+      } else {
+        this.$toast({ type: `fail`, message: `未上传文件` });
       }
     },
     // 返回
@@ -71,4 +89,26 @@ export default {
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.dialog {
+  padding: 0 8px;
+  /deep/.van-dialog__content {
+    height: 350px;
+    overflow-y: auto;
+  }
+  .list {
+    .name {
+      font-size: 14px;
+      word-break: break-all;
+      color: #666;
+      margin: 0 0 5px 0;
+      span {
+        color: #000;
+      }
+    }
+    .btn {
+      text-align: center;
+    }
+  }
+}
+</style>

+ 114 - 0
src/views/patent/user/patent/gzj/index.vue

@@ -0,0 +1,114 @@
+<template>
+  <div id="index">
+    <admin-frame @search="search" :limit="limit" :total="total" topType="2" @back="back" :rightArrow="false" :useNav="false">
+      <template v-slot:info>
+        <list-1 :list="list" @toView="toView"></list-1>
+      </template>
+    </admin-frame>
+    <van-dialog class="dialog" v-model="show" title="文件下载" :show-confirm-button="false" :show-cancel-button="true" cancel-button-text="返回">
+      <van-col span="24" class="list" v-for="(item, index) in fileList" :key="index">
+        <van-col span="24" class="name"
+          >文件路径:<span>{{ item }}</span>
+        </van-col>
+        <van-col span="24" class="btn">
+          <van-button type="info" size="small" @click="download(item)">下载文件</van-button>
+        </van-col>
+      </van-col>
+    </van-dialog>
+  </div>
+</template>
+
+<script>
+import list1 from './parts/list-1.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: 'index',
+  props: {},
+  components: {
+    adminFrame,
+    list1,
+  },
+  data: function () {
+    return {
+      limit: 5,
+      total: 0,
+      list: [],
+      // 文件下载
+      show: false,
+      fileList: [],
+    };
+  },
+  async created() {
+    this.search();
+  },
+  methods: {
+    ...patentwarning(['query', 'fetch']),
+    async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
+      info.to_id = this.user._id;
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 查看详细信息
+    async toView({ data }) {
+      let res = await this.fetch(data._id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `fileList`, res.data.file_url);
+        this.show = true;
+      }
+    },
+    download(data) {
+      if (data) {
+        window.location.href = `${process.env.VUE_APP_HOST}/${data}`;
+      } else {
+        this.$toast({ type: `fail`, message: `未上传文件` });
+      }
+    },
+    // 返回
+    back() {
+      this.$router.push({ path: '/patent/index' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.dialog {
+  padding: 0 8px;
+  /deep/.van-dialog__content {
+    height: 350px;
+    overflow-y: auto;
+  }
+  .list {
+    .name {
+      font-size: 14px;
+      word-break: break-all;
+      color: #666;
+      margin: 0 0 5px 0;
+      span {
+        color: #000;
+      }
+    }
+    .btn {
+      text-align: center;
+    }
+  }
+}
+</style>

+ 94 - 0
src/views/patent/user/patent/gzj/parts/list-1.vue

@@ -0,0 +1,94 @@
+<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="name">{{ item.patent_name }}</van-col>
+          <van-col span="24" class="other">
+            <van-col span="24" class="other_1">
+              <span>专利号:</span>
+              <span>{{ item.create_number }}</span>
+            </van-col>
+            <van-col span="24" class="other_1">
+              <span>发送时间:</span>
+              <span>{{ getDate(item.meta.createdAt) }}</span>
+            </van-col>
+          </van-col>
+          <van-col span="24" class="btn">
+            <van-button type="primary" size="small" @click="toView(item)">文件下载</van-button>
+          </van-col>
+        </van-col>
+      </van-col>
+    </van-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+import moment from 'moment';
+export default {
+  name: 'list-1',
+  props: {
+    list: { type: Array },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {
+    // 详细信息
+    toView(value) {
+      this.$emit('toView', { data: value });
+    },
+    // 过滤时间
+    getDate(val) {
+      let newDate = moment(val).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: #ffffff;
+    margin: 0 0 10px 0;
+    padding: 8px;
+    border-radius: 5px;
+    .name {
+      font-size: 18px;
+      font-weight: bold;
+      margin: 0 0 5px 0;
+    }
+    .other {
+      margin: 0 0 5px 0;
+      .other_1 {
+        font-size: 16px;
+        margin: 0 0 5px 0;
+        span:first-child {
+          color: #858585;
+        }
+      }
+    }
+    .btn {
+      text-align: center;
+    }
+  }
+}
+</style>

+ 7 - 2
src/views/patent/user/userBtn.vue

@@ -11,7 +11,7 @@
               </van-goods-action-icon>
             </van-col>
             <van-col span="8" class="one_1action" @click.native="pathBtn('user/message', 'read')">
-              <van-goods-action-icon text="已读" badge="">
+              <van-goods-action-icon text="CPC消息" :badge="numData.message ? numData.message.cpc : ''">
                 <template #icon><i class="iconfont icon-xiaoxi"></i></template>
               </van-goods-action-icon>
             </van-col>
@@ -60,6 +60,11 @@
                 <template #icon><i class="iconfont icon-pinggu"></i></template>
               </van-goods-action-icon>
             </van-col>
+            <!-- <van-col span="6" class="one_1action" @click.native="pathBtn('user/patent', 'gzj')">
+              <van-goods-action-icon text="国知局信息" badge="">
+                <template #icon><i class="iconfont icon-fankuixinxi"></i></template>
+              </van-goods-action-icon>
+            </van-col> -->
           </van-col>
         </van-col>
         <van-col span="24" class="one">
@@ -274,7 +279,7 @@ export default {
 }
 .onlyColor {
   /deep/.van-info {
-    background-color: #ff0000 !important;
+    background-color: #409eff !important;
   }
 }
 </style>

+ 73 - 3
src/views/test.vue

@@ -7,18 +7,24 @@
           <el-button type="primary" size="mini">导出</el-button>
         </download-excel>
       </van-col>
+      <van-col span="24">
+        <van-button @click="toEdit()">修改数据</van-button>
+        <van-button @click="toNotcie()">查询通知信息</van-button>
+        <van-button @click="toView()">查看信息</van-button>
+      </van-col>
     </van-row>
   </div>
 </template>
 
 <script>
 const { textname } = require('@frame/src/layout/test');
+const { list } = require('../util/test');
 import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: statistics } = createNamespacedHelpers('statistics');
 const { mapActions: personal } = createNamespacedHelpers('personal');
 const { mapActions: patentearly } = createNamespacedHelpers('patentearly');
-
+const { mapActions: patentnotice } = createNamespacedHelpers('patentnotice');
 const moment = require('moment');
 export default {
   name: 'test',
@@ -36,16 +42,24 @@ export default {
         },
         name: '申请人单位导出',
       },
+      // 替换数据
+      // 用户信息
+      userList: [],
+      userList1: [],
+      userList2: [],
+      // 通知信息
+      noticeList: [],
     };
   },
   created() {
     // this.oneSearch();
-    this.twoSearch();
+    // this.twoSearch();
   },
   methods: {
     ...statistics(['patentInfoByApplyPerson']),
-    ...personal({ personalQuery: 'query', personalUpdate: 'update' }),
+    ...personal({ personalQuery: 'query', personalUpdate: 'update', personalDelete: 'delete' }),
     ...patentearly({ patentearlyQuery: 'query' }),
+    ...patentnotice({ patentnoticeQuery: 'query', patentnoticeUpdate: 'update' }),
     // 添加用户
     async toAdd() {
       console.log(this.textname);
@@ -85,6 +99,62 @@ export default {
         // }
       }
     },
+    // 修改数据
+    async toEdit() {
+      // 重名数据
+      let user = [];
+      let p1 = list;
+      for (const val of p1) {
+        let p2 = list.filter((i) => i.name == val.name);
+        if (p2.length >= 2) {
+          user.push(...p2);
+        }
+      }
+      this.$set(this, `userList`, user);
+      console.log('1');
+    },
+    // 查询通知信息
+    async toNotcie() {
+      let notice = [];
+      let user = this.userList;
+      // 手机号数据,查询通知信息
+      let p1 = user.filter((i) => i.phone != i.name);
+      this.$set(this, `userList1`, p1);
+      // 姓名数据
+      let p2 = user.filter((i) => i.phone == i.name);
+      this.$set(this, `userList2`, p2);
+      for (const val of p1) {
+        let res = await this.patentnoticeQuery({ skip: 0, limit: 10000, to_type: '4', to_id: val._id });
+        if (res.errcode == '0' && res.total > 0) {
+          notice.push(...res.data);
+        }
+      }
+      this.$set(this, `noticeList`, notice);
+      console.log('2');
+    },
+    // 查看信息
+    async toView() {
+      // 重名信息,利用手机号的账号查询通知信息
+      // 修改通知信息,把to_id改成手机号是姓名的账号身上
+      // 重名数据
+      console.log(this.userList);
+      // 手机号数据
+      console.log(this.userList1);
+      // 姓名数据
+      console.log(this.userList2);
+      // 通知数据
+      console.log(this.noticeList);
+      // 修改数据
+      // for (const val of this.noticeList) {
+      //   let user = this.userList2.find((i) => i.phone == val.to_name);
+      //   if (user) {
+      //     let obj = { id: val.id, _id: val._id, to_id: [user._id] };
+      //     let res = await this.patentnoticeUpdate(obj);
+      //     console.log(res);
+      //   }
+      // }
+      // console.log('3');
+    },
   },
   computed: {
     ...mapState(['user']),