guhongwei 4 éve
szülő
commit
d798df6202
2 módosított fájl, 20 hozzáadás és 63 törlés
  1. 4 0
      src/store/index.js
  2. 16 63
      src/views/market/index.vue

+ 4 - 0
src/store/index.js

@@ -5,6 +5,8 @@ import * as umutations from '@common/src/store/user/mutations';
 import login from '@common/src/store/login';
 import news from '@common/src/store/news';
 import product from '@common/src/store/product';
+import patent from '@common/src/store/patent';
+import roadShow from '@common/src/store/roadShow';
 
 Vue.use(Vuex);
 
@@ -16,5 +18,7 @@ export default new Vuex.Store({
     login,
     news,
     product,
+    patent,
+    roadShow,
   },
 });

+ 16 - 63
src/views/market/index.vue

@@ -45,35 +45,17 @@ import list from './parts/list.vue';
 const { productType } = require('@common/dict/index');
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: product } = createNamespacedHelpers('product');
+const { mapActions: patent } = createNamespacedHelpers('patent');
+const { mapActions: roadShow } = createNamespacedHelpers('roadShow');
+
 export default {
   name: 'index',
   props: {},
   components: { top, list },
   data: function () {
     return {
-      oneList: [
-        {
-          name: '成果名称',
-          achievebrief: '成果简介',
-          field: '所属领域',
-          contacts: '联系人',
-        },
-        {
-          name: '6条数据',
-          achievebrief: '成果简介',
-          field: '所属领域',
-          contacts: '联系人',
-        },
-      ],
-      twoList: [
-        {
-          name: '专利信息',
-          img_url: require('@a/news1.jpg'),
-        },
-        {
-          name: '6条数据',
-        },
-      ],
+      oneList: [],
+      twoList: [],
       thrList: [
         {
           img_path: require('@a/news1.jpg'),
@@ -87,46 +69,9 @@ export default {
           company: '工作动态',
         },
       ],
-      fourList: [
-        {
-          title: '信息标题',
-          publish_time: '2021-04-19',
-          titlejj: '信息简介',
-        },
-        {
-          title: '5条数据',
-          publish_time: '2021-04-19',
-          titlejj: '信息简介',
-        },
-      ],
-      fiveList: [
-        {
-          name: '信息标题',
-          create_time: '2021-04-19',
-          field: '所属领域',
-          cooperation: '合作方式',
-        },
-        {
-          name: '6条数据',
-          create_time: '2021-04-19',
-          field: '所属领域',
-          cooperation: '合作方式',
-        },
-      ],
-      sixList: [
-        {
-          name: '信息标题',
-          messattribute: '信息属性',
-          create_time: '2021-04-19',
-          informationdesc: '不知道是神呢',
-        },
-        {
-          name: '五条数据',
-          messattribute: '信息属性',
-          create_time: '2021-04-19',
-          informationdesc: '不知道是神呢',
-        },
-      ],
+      fourList: [],
+      fiveList: [],
+      sixList: [],
       productType: productType,
     };
   },
@@ -135,6 +80,8 @@ export default {
   },
   methods: {
     ...product({ productQuery: 'query' }),
+    ...patent({ patentQuery: 'query' }),
+    ...roadShow({ roadShowQuery: 'query' }),
     async search({ skip = 0, limit = 10, ...info } = {}) {
       for (const val of this.productType) {
         if (val.value == '0') {
@@ -151,6 +98,12 @@ export default {
           if (this.$checkRes(res)) this.$set(this, `sixList`, res.data);
         }
       }
+      // 专利信息
+      let res = await this.patentQuery({ skip, limit: 6, ...info });
+      if (this.$checkRes(res)) this.$set(this, `twoList`, res.data);
+      // 项目路演
+      res = await this.roadShowQuery({ skip, limit: 5, ...info });
+      if (this.$checkRes(res)) this.$set(this, `fourList`, res.data);
     },
   },
   computed: {