|
@@ -26,8 +26,8 @@
|
|
|
<script>
|
|
|
import enterprisedgDetail from '@/components/enterprise/enterpisedg.vue';
|
|
|
import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
|
|
|
-
|
|
|
const { mapActions: transaction } = createNamespacedHelpers('transaction');
|
|
|
+const { mapActions: expertsaudit } = createNamespacedHelpers('expertsaudit');
|
|
|
const { mapActions: login } = createNamespacedHelpers('login');
|
|
|
export default {
|
|
|
name: 'adviserList',
|
|
@@ -46,10 +46,10 @@ export default {
|
|
|
{ name: '修改密码' },
|
|
|
{ name: '注销账号' },
|
|
|
],
|
|
|
- total1: 1,
|
|
|
- total2: 1,
|
|
|
- total3: 1,
|
|
|
- totalfaqi: 1,
|
|
|
+ total1: 0,
|
|
|
+ total2: 0,
|
|
|
+ total3: 0,
|
|
|
+ totalfaqi: 0,
|
|
|
faqilist: [],
|
|
|
dinggou1: [],
|
|
|
dinggou2: [],
|
|
@@ -67,44 +67,77 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...transaction({ transactionList: 'query', transactiondtetle: 'delete', shenheupdate: 'update' }),
|
|
|
+ ...expertsaudit({ expertsauditList: 'query', expertsauditdtetle: 'delete', expertsauditupdate: 'update' }),
|
|
|
...login({ logout: 'logout', transactiondtetlse: '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, market_userid, status, ...info });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `faqilist`, res.data);
|
|
|
- this.$set(this, `totalfaqi`, res.total);
|
|
|
+ if (this.user.role == '2' || this.user.role == '3') {
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ } else if (this.role == '6') {
|
|
|
+ const res = await this.expertsauditList({ skip, limit, market_userid, status, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `faqilist`, res.data);
|
|
|
+ this.$set(this, `totalfaqi`, res.total);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
async jiaoyi1({ skip = 0, limit = 3, ...info } = {}) {
|
|
|
let status = 1;
|
|
|
let market_userid = this.user.uid;
|
|
|
skip = this.skip;
|
|
|
- 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);
|
|
|
+ if (this.user.role == '2' || this.user.role == '3') {
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ } else if (this.role == '6') {
|
|
|
+ const res = await this.expertsauditList({ skip, limit, market_userid, status, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `faqilist`, res.data);
|
|
|
+ this.$set(this, `totalfaqi`, res.total);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
async jiaoyi2({ skip = 0, limit = 3, ...info } = {}) {
|
|
|
let status = 2;
|
|
|
let market_userid = this.user.uid;
|
|
|
skip = this.skip;
|
|
|
- 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);
|
|
|
+ if (this.user.role == '2' || this.user.role == '3') {
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ } else if (this.role == '6') {
|
|
|
+ const res = await this.expertsauditList({ skip, limit, market_userid, status, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `faqilist`, res.data);
|
|
|
+ this.$set(this, `totalfaqi`, res.total);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
async jiaoyi3({ skip = 0, limit = 3, ...info } = {}) {
|
|
|
skip = this.skip;
|
|
|
- const res = await this.transactionList({ skip, limit, ...info });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `dinggou3`, res.data);
|
|
|
- this.$set(this, `total3`, res.total);
|
|
|
+ if (this.user.role == '2' || this.user.role == '3') {
|
|
|
+ const res = await this.transactionList({ skip, limit, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `dinggou3`, res.data);
|
|
|
+ this.$set(this, `total3`, res.total);
|
|
|
+ }
|
|
|
+ } else if (this.role == '6') {
|
|
|
+ const res = await this.expertsauditList({ skip, limit, market_userid, status, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `faqilist`, res.data);
|
|
|
+ this.$set(this, `totalfaqi`, res.total);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -145,8 +178,6 @@ export default {
|
|
|
this.jiaoyi3();
|
|
|
},
|
|
|
async deleteData({ item }) {
|
|
|
- console.log(item);
|
|
|
-
|
|
|
const res = await this.transactiondtetle(item.id);
|
|
|
this.$checkRes(res, '删除成功', '删除失败');
|
|
|
},
|