guhongwei %!s(int64=4) %!d(string=hai) anos
pai
achega
2b11a93454

+ 24 - 6
src/views/hallList/index.vue

@@ -5,13 +5,13 @@
         <div class="w_1200">
           <el-tabs type="border-card" class="tabs">
             <el-tab-pane label="科技成果在线">
-              <product></product>
+              <product :province="province" :place="place"></product>
             </el-tab-pane>
             <el-tab-pane label="人才对接在线">
-              <personal></personal>
+              <personal :province="province" :place="place"></personal>
             </el-tab-pane>
             <el-tab-pane label="专家培训在线">
-              <exports></exports>
+              <exports :province="province" :place="place"></exports>
             </el-tab-pane>
           </el-tabs>
         </div>
@@ -25,6 +25,7 @@ import product from './parts/product.vue';
 import personal from './parts/personal.vue';
 import exports from './parts/export.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: place } = createNamespacedHelpers('place');
 export default {
   name: 'index',
   props: {},
@@ -34,10 +35,27 @@ export default {
     exports,
   },
   data: function() {
-    return {};
+    return {
+      // 省
+      province: [],
+      // 市
+      place: [],
+    };
+  },
+  async created() {
+    await this.searchplace();
+  },
+  methods: {
+    ...place({ palcequery: 'query', transactiondtetle: 'delete' }),
+    async searchplace() {
+      let res = await this.palcequery({ level: 1 });
+      let arr = await this.palcequery({ level: 2 });
+      if (res || arr) {
+        this.$set(this, `province`, res.data);
+        this.$set(this, `place`, arr.data);
+      }
+    },
   },
-  created() {},
-  methods: {},
   computed: {
     ...mapState(['user']),
   },

+ 6 - 16
src/views/hallList/parts/export.vue

@@ -24,10 +24,14 @@ import _ from 'lodash';
 import exportlist from './exportlist.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: dock } = createNamespacedHelpers('dock');
-const { mapActions: place } = createNamespacedHelpers('place');
 export default {
   name: 'export',
-  props: {},
+  props: {
+    // 省
+    province: { type: Array, default: () => [] },
+    // 市
+    place: { type: Array, default: () => [] },
+  },
   components: {
     exportlist,
   },
@@ -70,30 +74,16 @@ export default {
         },
       ],
       pastTotal: 0,
-      // 省
-      province: [],
-      // 市
-      place: [],
     };
   },
   async created() {
     await this.searchList({ status: '0' });
     await this.searchList({ status: '1' });
     await this.searchList({ status: '2' });
-    await this.searchplace();
   },
   methods: {
-    ...place({ palcequery: 'query', transactiondtetle: 'delete' }),
     ...dock({ dockQuery: 'query' }),
     async searchList({ skip = 0, limit = 10, status, ...info } = {}) {},
-    async searchplace() {
-      let res = await this.palcequery({ level: 1 });
-      let arr = await this.palcequery({ level: 2 });
-      if (res || arr) {
-        this.$set(this, `province`, res.data);
-        this.$set(this, `place`, arr.data);
-      }
-    },
   },
   computed: {
     ...mapState(['user']),

+ 6 - 16
src/views/hallList/parts/personal.vue

@@ -24,10 +24,14 @@ import _ from 'lodash';
 import personallist from './personallist.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: dock } = createNamespacedHelpers('dock');
-const { mapActions: place } = createNamespacedHelpers('place');
 export default {
   name: 'personal',
-  props: {},
+  props: {
+    // 省
+    province: { type: Array, default: () => [] },
+    // 市
+    place: { type: Array, default: () => [] },
+  },
   components: {
     personallist,
   },
@@ -70,30 +74,16 @@ export default {
         },
       ],
       pastTotal: 0,
-      // 省
-      province: [],
-      // 市
-      place: [],
     };
   },
   async created() {
     await this.searchList({ status: '0' });
     await this.searchList({ status: '1' });
     await this.searchList({ status: '2' });
-    await this.searchplace();
   },
   methods: {
-    ...place({ palcequery: 'query', transactiondtetle: 'delete' }),
     ...dock({ dockQuery: 'query' }),
     async searchList({ skip = 0, limit = 10, status, ...info } = {}) {},
-    async searchplace() {
-      let res = await this.palcequery({ level: 1 });
-      let arr = await this.palcequery({ level: 2 });
-      if (res || arr) {
-        this.$set(this, `province`, res.data);
-        this.$set(this, `place`, arr.data);
-      }
-    },
   },
   computed: {
     ...mapState(['user']),

+ 6 - 16
src/views/hallList/parts/product.vue

@@ -24,10 +24,14 @@ import _ from 'lodash';
 import productlist from './productlist.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: dock } = createNamespacedHelpers('dock');
-const { mapActions: place } = createNamespacedHelpers('place');
 export default {
   name: 'product',
-  props: {},
+  props: {
+    // 省
+    province: { type: Array, default: () => [] },
+    // 市
+    place: { type: Array, default: () => [] },
+  },
   components: {
     productlist,
   },
@@ -43,20 +47,14 @@ export default {
       // 往期直播
       listPast: [],
       pastTotal: 0,
-      // 省
-      province: [],
-      // 市
-      place: [],
     };
   },
   async created() {
     await this.searchList({ status: '0' });
     await this.searchList({ status: '1' });
     await this.searchList({ status: '2' });
-    await this.searchplace();
   },
   methods: {
-    ...place({ palcequery: 'query', transactiondtetle: 'delete' }),
     ...dock({ dockQuery: 'query' }),
     async searchList({ skip = 0, limit = 10, status, ...info } = {}) {
       let res = await this.dockQuery({ is_allowed: 1, skip, status, ...info });
@@ -73,14 +71,6 @@ export default {
         }
       }
     },
-    async searchplace() {
-      let res = await this.palcequery({ level: 1 });
-      let arr = await this.palcequery({ level: 2 });
-      if (res || arr) {
-        this.$set(this, `province`, res.data);
-        this.$set(this, `place`, arr.data);
-      }
-    },
   },
   computed: {
     ...mapState(['user']),