|
@@ -25,7 +25,7 @@
|
|
|
|
|
|
<script>
|
|
|
import enterprisedgDetail from '@/components/enterprise/enterpisedg.vue';
|
|
|
-import { createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
+import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
|
|
|
|
|
|
const { mapActions: transaction } = createNamespacedHelpers('transaction');
|
|
|
const { mapActions: login } = createNamespacedHelpers('login');
|
|
@@ -62,16 +62,18 @@ export default {
|
|
|
this.jiaoyi3();
|
|
|
this.faqijiaoyi();
|
|
|
},
|
|
|
- computed: {},
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ },
|
|
|
methods: {
|
|
|
...transaction({ transactionList: 'query', transactiondtetle: 'delete', shenheupdate: 'update' }),
|
|
|
...login({ logout: 'logout', transactiondtetle: 'delete' }),
|
|
|
// 查询
|
|
|
async faqijiaoyi({ skip = 0, limit = 3, ...info } = {}) {
|
|
|
let status = 0;
|
|
|
+ let market_userid = this.user.uid;
|
|
|
skip = this.skip;
|
|
|
- const res = await this.transactionList({ skip, limit, status, ...info });
|
|
|
- console.log(res.total);
|
|
|
+ const res = await this.transactionList({ skip, limit, market_userid, status, ...info });
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$set(this, `faqilist`, res.data);
|
|
|
this.$set(this, `totalfaqi`, res.total);
|
|
@@ -79,10 +81,9 @@ export default {
|
|
|
},
|
|
|
async jiaoyi1({ skip = 0, limit = 3, ...info } = {}) {
|
|
|
let status = 1;
|
|
|
+ let market_userid = this.user.uid;
|
|
|
skip = this.skip;
|
|
|
- console.log();
|
|
|
- const res = await this.transactionList({ skip, limit, status, ...info });
|
|
|
- console.log(res);
|
|
|
+ const res = await this.transactionList({ skip, limit, market_userid, status, ...info });
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$set(this, `dinggou1`, res.data);
|
|
|
this.$set(this, `total1`, res.total);
|
|
@@ -90,10 +91,9 @@ export default {
|
|
|
},
|
|
|
async jiaoyi2({ skip = 0, limit = 3, ...info } = {}) {
|
|
|
let status = 2;
|
|
|
+ let market_userid = this.user.uid;
|
|
|
skip = this.skip;
|
|
|
- console.log();
|
|
|
- const res = await this.transactionList({ skip, limit, status, ...info });
|
|
|
- console.log(res);
|
|
|
+ const res = await this.transactionList({ skip, limit, market_userid, status, ...info });
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$set(this, `dinggou2`, res.data);
|
|
|
this.$set(this, `total2`, res.total);
|
|
@@ -101,9 +101,7 @@ export default {
|
|
|
},
|
|
|
async jiaoyi3({ skip = 0, limit = 3, ...info } = {}) {
|
|
|
skip = this.skip;
|
|
|
- console.log();
|
|
|
const res = await this.transactionList({ skip, limit, ...info });
|
|
|
- console.log(res);
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$set(this, `dinggou3`, res.data);
|
|
|
this.$set(this, `total3`, res.total);
|
|
@@ -145,7 +143,6 @@ export default {
|
|
|
this.$set(this, `skip`, skip);
|
|
|
this.jiaoyi3();
|
|
|
},
|
|
|
-
|
|
|
async deleteData({ item }) {
|
|
|
const res = await this.transactiondtetle(item.id);
|
|
|
this.$checkRes(res, '删除成功', '删除失败');
|