From 6d789a97cdd1df2d3a49f921b57fa91b0fb485dd Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 2 Jun 2021 15:49:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E4=BB=A3=E7=A0=81,=20?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=B8=80=E4=BA=9Bwarning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/marketing/coupon_edit.vue | 2 +- src/views/question/shop_puzzle_editor.vue | 2 +- src/views/question/shop_puzzles.vue | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/views/marketing/coupon_edit.vue b/src/views/marketing/coupon_edit.vue index ffce24a..ee10156 100644 --- a/src/views/marketing/coupon_edit.vue +++ b/src/views/marketing/coupon_edit.vue @@ -294,7 +294,7 @@ export default class extends Vue { } } - private async getRemoteDeptList(name: string) { + private async getRemoteDeptList(name?: string) { const { data } = await getShops({ key: name }) if (!data.records) return this.allDepts = data.records diff --git a/src/views/question/shop_puzzle_editor.vue b/src/views/question/shop_puzzle_editor.vue index 396b813..ae99a10 100644 --- a/src/views/question/shop_puzzle_editor.vue +++ b/src/views/question/shop_puzzle_editor.vue @@ -314,7 +314,7 @@ export default class extends Vue { private async getRemoteCategory() { try { - const { data } = await getShopCategory(this.postForm.shop) + const { data } = await getShopCategory(this.postForm.shop!) this.tagOptions = data this.$forceUpdate() } catch (err) { diff --git a/src/views/question/shop_puzzles.vue b/src/views/question/shop_puzzles.vue index f7b66eb..78ef501 100644 --- a/src/views/question/shop_puzzles.vue +++ b/src/views/question/shop_puzzles.vue @@ -65,6 +65,7 @@ type="success" icon="el-icon-upload2" @click="handleImport" + v-loading="loading" > 导入Excel @@ -248,6 +249,7 @@ export default class extends Vue { private listLoading = false private cateLoading = false private allDepts: IShopData[] = [] + private loading = false private listQuery = { page: 1, limit: 20, @@ -270,6 +272,7 @@ export default class extends Vue { results: null } + private filename: string|null = '' private deleteBtnName = '删除所有' private exportBtnName = '导出所有' private downloadLoading = false @@ -278,6 +281,7 @@ export default class extends Vue { $refs!: { filterForm: HTMLFormElement 'excel-upload-input': HTMLFormElement + 'question_table': HTMLTableElement } get userLevel() { @@ -447,7 +451,9 @@ export default class extends Vue { }) const ids: string[] = [] for (const s of this.multipleSelection) { - ids.push(s._id) + if (s._id) { + ids.push(s._id!) + } } const { data } = await deleteShopQuestion(this.listQuery.shop, ids); (this.$refs.question_table as any).clearSelection()