|
@@ -13,6 +13,9 @@
|
|
|
|
|
|
<script>
|
|
|
import supermarketDetail from '@/components/supermaket/supermarket.vue';
|
|
|
+import { createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
+const { mapActions: mapSite } = createNamespacedHelpers('site');
|
|
|
+const { mapActions: mapProduct } = createNamespacedHelpers('enterpriseproject');
|
|
|
export default {
|
|
|
name: 'supermarket',
|
|
|
props: {},
|
|
@@ -72,26 +75,7 @@ export default {
|
|
|
date: '2019-12-26',
|
|
|
},
|
|
|
],
|
|
|
- fabuList: [
|
|
|
- {
|
|
|
- pic: require('@/assets/fabu.jpg'),
|
|
|
- title: '标题',
|
|
|
- num: '供',
|
|
|
- company: '福瑞科技',
|
|
|
- status: '已认证',
|
|
|
- type: 'LS',
|
|
|
- date: '2019-12-26',
|
|
|
- },
|
|
|
- {
|
|
|
- pic: require('@/assets/fabu.jpg'),
|
|
|
- title: '六条数据',
|
|
|
- num: '供',
|
|
|
- company: '福瑞科技',
|
|
|
- status: '已认证',
|
|
|
- type: 'LS',
|
|
|
- date: '2019-12-26',
|
|
|
- },
|
|
|
- ],
|
|
|
+ fabuList: [],
|
|
|
tableData: [
|
|
|
{
|
|
|
market: '系统管理员',
|
|
@@ -107,9 +91,29 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
}),
|
|
|
- created() {},
|
|
|
+ created() {
|
|
|
+ this.searchSite();
|
|
|
+ this.searchInfo();
|
|
|
+ },
|
|
|
computed: {},
|
|
|
- methods: {},
|
|
|
+ methods: {
|
|
|
+ ...mapSite(['showInfo']),
|
|
|
+ ...mapProduct({ ProductQuery: 'query', ProductFetch: 'fetch', ProductDelete: 'delete' }),
|
|
|
+ // 查询站点信息
|
|
|
+ async searchSite() {
|
|
|
+ let res = await this.showInfo();
|
|
|
+ let object = JSON.parse(JSON.stringify(res.data));
|
|
|
+ if (object) {
|
|
|
+ this.$set(this, `info`, res.data);
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.errmsg ? res.errmsg : 'error');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async searchInfo({ skip = 0, limit = 6, ...info } = {}) {
|
|
|
+ const res = await this.ProductQuery({ skip, limit, ...info });
|
|
|
+ this.$set(this, `fabuList`, res.data);
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|