瀏覽代碼

获奖情况

guhongwei 3 年之前
父節點
當前提交
17b3449b50
共有 2 個文件被更改,包括 13 次插入72 次删除
  1. 3 0
      src/store/index.js
  2. 10 72
      src/views/scientific/award/index.vue

+ 3 - 0
src/store/index.js

@@ -34,6 +34,8 @@ import times from '@common/src/store/times';
 import other from '@common/src/store/other';
 // 论文发表
 import paper from '@common/src/store/paper';
+// 获奖情况
+import patent from '@common/src/store/patent';
 
 Vue.use(Vuex);
 
@@ -59,5 +61,6 @@ export default new Vuex.Store({
     times,
     other,
     paper,
+    patent,
   },
 });

+ 10 - 72
src/views/scientific/award/index.vue

@@ -18,6 +18,8 @@ import info1 from '@/layout/scientific/award/info-1.vue';
 import search1 from '@/layout/scientific/award/search-1.vue';
 import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('patent');
+
 export default {
   name: 'index',
   props: {},
@@ -29,75 +31,7 @@ export default {
   },
   data: function () {
     return {
-      list: [
-        {
-          createBy: '1',
-          createTime: '2021-10-11 23:11:01',
-          delFlag: '0',
-          direction: 'direction001',
-          directionName: '开创视觉光刺激治疗癫痫研究',
-          id: '45b54288eb0c40abbf6b123735da1445',
-          level: '1',
-          name: '这里是成果名称',
-          params: {},
-          person: [
-            {
-              createBy: '1',
-              createTime: '2021-10-11 23:53:48',
-              delFlag: '0',
-              id: '66da7d92145748f0a8a7b04b8cad4180',
-              level: '1',
-              params: {},
-              patentId: '45b54288eb0c40abbf6b123735da1445',
-              remark: null,
-              searchValue: null,
-              updateBy: null,
-              updateTime: null,
-              userId: 'person003',
-              userName: '付学奇',
-            },
-            {
-              createBy: '1',
-              createTime: '2021-10-11 23:53:48',
-              delFlag: '0',
-              id: '848422552bdc4bcda6e24897c1311362',
-              level: '2',
-              params: {},
-              patentId: '45b54288eb0c40abbf6b123735da1445',
-              remark: null,
-              searchValue: null,
-              updateBy: null,
-              updateTime: null,
-              userId: 'person001',
-              userName: '王江涛',
-            },
-            {
-              createBy: '1',
-              createTime: '2021-10-11 23:53:48',
-              delFlag: '0',
-              id: '109e43caf78d4fe3ae977c2467926548',
-              level: '3',
-              params: {},
-              patentId: '45b54288eb0c40abbf6b123735da1445',
-              remark: null,
-              searchValue: null,
-              updateBy: null,
-              updateTime: null,
-              userId: 'person002',
-              userName: '刘光耀',
-            },
-          ],
-          personlevel: null,
-          remark: null,
-          resulnumber: '这里是成果编号',
-          searchValue: null,
-          type: '2',
-          updateBy: null,
-          updateTime: '2021-10-11 23:53:48',
-          userId: null,
-          userName: null,
-        },
-      ],
+      list: [],
       total: 0,
       limit: 5,
       // 查询
@@ -112,9 +46,13 @@ export default {
     await this.search();
   },
   methods: {
-    async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
-      if (searchName) info.name = searchName;
-      console.log(this.searhForm);
+    ...mapActions(['query', 'fetch']),
+    async search({ skip = 0, limit = this.limit, ...info } = {}) {
+      const res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.rows);
+        this.$set(this, `total`, res.total);
+      }
     },
     // 查看信息
     async toView(data) {