From 35ad7b031dab03d12a0032e8e72eff02b6e16c86 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Tue, 7 Feb 2023 15:46:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B2=E9=9D=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppCurriculumManage.vue | 15 +- .../AppCurriculumManage/components/Add.vue | 361 +++++++++--------- .../components/Comment.vue | 119 ++++++ .../AppCurriculumManage/components/Detail.vue | 280 +++----------- .../AppCurriculumManage/components/List.vue | 17 +- 5 files changed, 378 insertions(+), 414 deletions(-) create mode 100644 project/qujing/app/AppCurriculumManage/components/Comment.vue diff --git a/project/qujing/app/AppCurriculumManage/AppCurriculumManage.vue b/project/qujing/app/AppCurriculumManage/AppCurriculumManage.vue index 9e451393..f23bc436 100644 --- a/project/qujing/app/AppCurriculumManage/AppCurriculumManage.vue +++ b/project/qujing/app/AppCurriculumManage/AppCurriculumManage.vue @@ -7,9 +7,10 @@ diff --git a/project/qujing/app/AppCurriculumManage/components/Comment.vue b/project/qujing/app/AppCurriculumManage/components/Comment.vue new file mode 100644 index 00000000..b485cf82 --- /dev/null +++ b/project/qujing/app/AppCurriculumManage/components/Comment.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/project/qujing/app/AppCurriculumManage/components/Detail.vue b/project/qujing/app/AppCurriculumManage/components/Detail.vue index fd43e438..b3c1bb5d 100644 --- a/project/qujing/app/AppCurriculumManage/components/Detail.vue +++ b/project/qujing/app/AppCurriculumManage/components/Detail.vue @@ -1,154 +1,42 @@ @@ -160,96 +48,40 @@ props: { instance: Function, dict: Object, - params: Object + params: Object, + moduleId: String }, data () { return { - currIndex: 0, - tabList: ['基本信息', '报名记录', '抽奖记录'], - colConfigs: [ - { prop: 'name', label: '姓名', align: 'left', width: '200px' }, - { prop: 'phone', label: '手机号', align: 'center' }, - { prop: 'createTime', label: '报名时间', align: 'center' } - ], - prizeColConfigs: [ - { prop: 'name', label: '姓名', align: 'left', width: '200px' }, - { prop: 'phone', label: '手机号', align: 'center' }, - { prop: 'prizeName', label: '奖品名称', align: 'center' }, - { prop: 'createTime', label: '抽奖时间', align: 'center' } - ], - prizeList: [], - prizeSearch: { - size: 10, - current: 1, - name: '', - prizeId: '' - }, - search: { - size: 10, - name: '', - current: 1 - }, - prizes: [], - tableData: [], - total: 0, - info: {} + info: {}, + id: '' } }, created () { - this.getInfo() - this.getList() - this.getPrizeList() + if (this.params && this.params.id) { + this.id = this.params.id + this.getInfo(this.params.id) + } }, methods: { - getList() { - this.instance.post(`/app/appmarketingactivityinfo/signUpList?activityId=${this.params.id}`, null, { - params: { - ...this.search - } - }).then(res => { - if (res.code == 0) { - this.tableData = res.data.records - this.total = res.data.total + getInfo (id) { + this.instance.post(`/app/appcontentinfo/queryDetailById?id=${id}`).then(res => { + if (res.code === 0) { + this.info = res.data + this.info.pictureUrl = res.data.pictureUrl ? [{ + url: res.data.pictureUrl + }] : [] } }) }, - getPrizeList() { - this.instance.post(`/app/appmarketingactivityinfo/raffleList?activityId=${this.params.id}`, null, { - params: { - ...this.prizeSearch - } - }).then(res => { - if (res.code == 0) { - this.prizeList = res.data.records - this.prizeSearch.total = res.data.total - } - }) - }, - - getInfo () { - this.instance.post(`/app/appmarketingactivityinfo/queryDetailById?id=${this.params.id}`).then(res => { - if (res.code == 0) { - if (res.data) { - this.info = res.data - this.prizes = res.data.prizes.map(v => { - return { - dictValue: v.id, - dictName: v.name - } - }) - } - } - }) - }, - - cancel () { + cancel (isRefresh) { this.$emit('change', { type: 'List', - isRefresh: true + isRefresh: !!isRefresh }) } } @@ -257,14 +89,4 @@ diff --git a/project/qujing/app/AppCurriculumManage/components/List.vue b/project/qujing/app/AppCurriculumManage/components/List.vue index c3e98319..6b6a0257 100644 --- a/project/qujing/app/AppCurriculumManage/components/List.vue +++ b/project/qujing/app/AppCurriculumManage/components/List.vue @@ -1,8 +1,7 @@