From 56fe4bcae4a43ab80b99b90aa7f009aa4b37fbaa Mon Sep 17 00:00:00 2001 From: zhl Date: Sat, 8 May 2021 16:36:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BC=98=E6=83=A0=E5=88=B8?= =?UTF-8?q?=E7=9A=84=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/marketing/coupon.vue | 16 ++++++++++++---- src/views/marketing/coupon_edit.vue | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/views/marketing/coupon.vue b/src/views/marketing/coupon.vue index 4e1bee8..710e44a 100644 --- a/src/views/marketing/coupon.vue +++ b/src/views/marketing/coupon.vue @@ -5,7 +5,7 @@ - + @@ -131,6 +132,7 @@ import Pagination from '@/components/Pagination/index.vue' import { getShops } from '@/api/shop' import { parseTime } from '@/utils' import { deleteCoupon, getCoupons } from '@/api/coupon' +import { UserModule } from '@/store/modules/user' @Component({ name: 'CouponList', @@ -177,9 +179,15 @@ export default class extends Vue { filterForm: HTMLFormElement } - created() { - this.getList() - this.getRemoteDeptList('') + get userLevel() { + return UserModule.level + } + + async created() { + await this.getList() + if (UserModule.level === 1) { + await this.getRemoteDeptList() + } } private async getList() { diff --git a/src/views/marketing/coupon_edit.vue b/src/views/marketing/coupon_edit.vue index 9d7033b..d58cf5c 100644 --- a/src/views/marketing/coupon_edit.vue +++ b/src/views/marketing/coupon_edit.vue @@ -7,7 +7,7 @@ label-width="121px" class="form-container" > - +