From bd1fc8cc0fc0450d8a72fdcd37025c658b29837f Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Thu, 22 Aug 2024 18:30:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mixin/selectMixin.js | 2 +- src/views/book/components/checkBook.vue | 2 +- src/views/component/imports.vue | 34 ++++++-- src/views/course/apply.vue | 6 +- src/views/course/components/addCourse.vue | 10 +-- src/views/course/components/checkPay.vue | 2 +- .../course/components/setMainTeacher.vue | 3 +- src/views/course/components/showCode.vue | 14 ++-- src/views/course/pay.vue | 4 +- src/views/student/index.vue | 82 +++++++++++-------- src/views/student/search.vue | 31 ++++++- 11 files changed, 127 insertions(+), 63 deletions(-) diff --git a/src/mixin/selectMixin.js b/src/mixin/selectMixin.js index 7877315..7078bc1 100644 --- a/src/mixin/selectMixin.js +++ b/src/mixin/selectMixin.js @@ -153,7 +153,7 @@ export default { type: 'success' }, { id: 2, - value: '驳回', + value: '审核不通过', type: 'warning' }, { id: 3, diff --git a/src/views/book/components/checkBook.vue b/src/views/book/components/checkBook.vue index 657d5fd..3e9be49 100644 --- a/src/views/book/components/checkBook.vue +++ b/src/views/book/components/checkBook.vue @@ -69,7 +69,7 @@
审核通过 - 驳回 + 审核不通过 取消预约
diff --git a/src/views/component/imports.vue b/src/views/component/imports.vue index 87cbcc8..5cf4248 100644 --- a/src/views/component/imports.vue +++ b/src/views/component/imports.vue @@ -75,7 +75,9 @@ this.dialogVisible = false; }, // 获取表头 - async getHeaders() { + async getHeaders() { + + // const res = await realTableShow({ table_name: this.tableName }) @@ -192,7 +194,8 @@ }, computed: {}, watch: { - formInfo(newVal) { + formInfo(newVal) { + console.log("formInfo", newVal) if (newVal && newVal instanceof Array) { this.table = this.headers = newVal.map((i) => { return { @@ -203,12 +206,29 @@ } }, dialogVisible(newval) { - console.log("newval", newval, this.tableName) + console.log("newval", newval, this.tableName,this.formInfo) if (newval) { - let changeTableName = this.tableName.replace('_', '-') - this.action = `${process.env.VUE_APP_BASE_API}/api/admin/${changeTableName}/excel-show` - this.import_action = `/api/admin/${changeTableName}/import` - this.getHeaders() + let changeTableName = this.tableName.replace('_', '-') + this.action = `${process.env.VUE_APP_BASE_API}/api/admin/${changeTableName}/excel-show` + this.import_action = `/api/admin/${changeTableName}/import` + + // 学员导入 + if(this.tableName==='users'){ + this.import_action = `/api/admin/${changeTableName}/import-study` + this.table = this.headers = this.formInfo.map((i) => { + if(i.prop){ + return { + key: i.prop, + title: i.label, + }; + } + + }); + console.log("this.table",this.headers) + }else{ + this.getHeaders() + } + console.log("action", this.action, this.import_action) } else { this.tableList = [] diff --git a/src/views/course/apply.vue b/src/views/course/apply.vue index c213aaa..41a10a1 100644 --- a/src/views/course/apply.vue +++ b/src/views/course/apply.vue @@ -33,8 +33,10 @@