From 9e8e0b24a4438dd6b03761e6ba25ba3cb0313d03 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Fri, 3 Sep 2021 09:12:03 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E5=BF=97=E6=84=BF?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/heart/actinfo-add-or-update.vue | 54 ++++- src/views/modules/heart/actinfo-list.vue | 8 + src/views/modules/heart/vact-handle.vue | 96 +++++++++ .../vactinfo-add-or-update.vue | 0 src/views/modules/heart/vactinfo-look.vue | 201 ++++++++++++++++++ src/views/modules/heart/vactinfo-route.vue | 28 +++ src/views/modules/heart/vactinfo.vue | 200 +++++++++++++++++ .../vactorgrelation-add-or-update.vue | 0 .../{news => heart}/vactorgrelation.vue | 0 src/views/modules/news/vactinfo.vue | 92 -------- 10 files changed, 577 insertions(+), 102 deletions(-) create mode 100644 src/views/modules/heart/vact-handle.vue rename src/views/modules/{news => heart}/vactinfo-add-or-update.vue (100%) create mode 100644 src/views/modules/heart/vactinfo-look.vue create mode 100644 src/views/modules/heart/vactinfo-route.vue create mode 100644 src/views/modules/heart/vactinfo.vue rename src/views/modules/{news => heart}/vactorgrelation-add-or-update.vue (100%) rename src/views/modules/{news => heart}/vactorgrelation.vue (100%) delete mode 100644 src/views/modules/news/vactinfo.vue diff --git a/src/views/modules/heart/actinfo-add-or-update.vue b/src/views/modules/heart/actinfo-add-or-update.vue index e3b20f4..641fa2c 100644 --- a/src/views/modules/heart/actinfo-add-or-update.vue +++ b/src/views/modules/heart/actinfo-add-or-update.vue @@ -257,9 +257,9 @@ -
+
-
+
{ @@ -572,9 +576,16 @@ export default { } }, backToActList () { - this.$emit('refreshDataList') - this.$parent.selectComponent = 'ActInfoList' - this.$router.push({ path: '/heart-actinfo' }) + if(this.dataForm.vactId==undefined){ + this.$emit('refreshDataList') + this.$parent.selectComponent = 'ActInfoList' + this.$router.push({ path: '/heart-actinfo' }) + }else{ + this.$emit('refreshDataList') + this.$parent.selectComponent = 'VactInfo' + this.$router.push({ path: '/heart-vactinfo-route' }) + } + }, init () { this.visible = true @@ -638,6 +649,19 @@ export default { this.dataForm.newsReleaseStartTime = this.time[0] this.dataForm.newsReleaseEndTime = this.time[1] }, + // 获取信息 + getVactInfo () { + this.$http.get(`/heart/vactinfo/${this.dataForm.vactId}`).then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.dataForm = { + ...this.dataForm, + ...res.data + } + console.log(this.dataForm) + }).catch(() => { }) + }, // 上传图片ends // 获取信息 getInfo () { @@ -688,6 +712,10 @@ export default { if (signinEndTime < actEndTime) { return this.$message.error('签到结束时间必须大于活动结束时间.') } + if(!(this.dataForm.vactId==undefined)){ + this.dataForm.actType = '1' + this.dataForm.id = '' + } this.isAble = true this.$http[!this.dataForm.id ? 'post' : 'put']('/heart/actinfo/', this.dataForm).then(({ data: res }) => { this.isAble = false @@ -703,10 +731,16 @@ export default { this.$emit('refreshDataList') } }) - this.$parent.selectComponent = 'ActInfoList' - this.$router.push({ - path: '/heart-actinfo' - }) + if(!(this.dataForm.vactId==undefined)){ + this.$parent.selectComponent = 'VactInfo' + this.$router.push({ path: '/heart-vactinfo-route' }) + }else{ + this.$parent.selectComponent = 'ActInfoList' + this.$router.push({ + path: '/heart-actinfo' + }) + } + }).catch(() => { }) }) }, 1000, { 'leading': true, 'trailing': false }), diff --git a/src/views/modules/heart/actinfo-list.vue b/src/views/modules/heart/actinfo-list.vue index 7e6d362..b4ed264 100644 --- a/src/views/modules/heart/actinfo-list.vue +++ b/src/views/modules/heart/actinfo-list.vue @@ -8,6 +8,13 @@ + + + + + + +
+ diff --git a/src/views/modules/heart/vact-handle.vue b/src/views/modules/heart/vact-handle.vue new file mode 100644 index 0000000..c48452c --- /dev/null +++ b/src/views/modules/heart/vact-handle.vue @@ -0,0 +1,96 @@ + + + diff --git a/src/views/modules/news/vactinfo-add-or-update.vue b/src/views/modules/heart/vactinfo-add-or-update.vue similarity index 100% rename from src/views/modules/news/vactinfo-add-or-update.vue rename to src/views/modules/heart/vactinfo-add-or-update.vue diff --git a/src/views/modules/heart/vactinfo-look.vue b/src/views/modules/heart/vactinfo-look.vue new file mode 100644 index 0000000..ad24615 --- /dev/null +++ b/src/views/modules/heart/vactinfo-look.vue @@ -0,0 +1,201 @@ + + + + \ No newline at end of file diff --git a/src/views/modules/heart/vactinfo-route.vue b/src/views/modules/heart/vactinfo-route.vue new file mode 100644 index 0000000..be5153c --- /dev/null +++ b/src/views/modules/heart/vactinfo-route.vue @@ -0,0 +1,28 @@ + + + + diff --git a/src/views/modules/heart/vactinfo.vue b/src/views/modules/heart/vactinfo.vue new file mode 100644 index 0000000..58fb920 --- /dev/null +++ b/src/views/modules/heart/vactinfo.vue @@ -0,0 +1,200 @@ + + + diff --git a/src/views/modules/news/vactorgrelation-add-or-update.vue b/src/views/modules/heart/vactorgrelation-add-or-update.vue similarity index 100% rename from src/views/modules/news/vactorgrelation-add-or-update.vue rename to src/views/modules/heart/vactorgrelation-add-or-update.vue diff --git a/src/views/modules/news/vactorgrelation.vue b/src/views/modules/heart/vactorgrelation.vue similarity index 100% rename from src/views/modules/news/vactorgrelation.vue rename to src/views/modules/heart/vactorgrelation.vue diff --git a/src/views/modules/news/vactinfo.vue b/src/views/modules/news/vactinfo.vue deleted file mode 100644 index a065506..0000000 --- a/src/views/modules/news/vactinfo.vue +++ /dev/null @@ -1,92 +0,0 @@ - - - From b9a26d3a97f487516e9635de1fb4f2d8f6e1bf0b Mon Sep 17 00:00:00 2001 From: Jackwang Date: Mon, 6 Sep 2021 19:07:48 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/heart/actinfo-add-or-update.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/modules/heart/actinfo-add-or-update.vue b/src/views/modules/heart/actinfo-add-or-update.vue index 641fa2c..fd85f80 100644 --- a/src/views/modules/heart/actinfo-add-or-update.vue +++ b/src/views/modules/heart/actinfo-add-or-update.vue @@ -659,7 +659,10 @@ export default { ...this.dataForm, ...res.data } - console.log(this.dataForm) + this.dataForm.signinStartTime = this.dataForm.actStartTime + this.dataForm.signinAddress = this.dataForm.actAddress + this.dataForm.signinLatitude = this.dataForm.actLatitude + this.dataForm.signinLongitude = this.dataForm.actLongitude }).catch(() => { }) }, // 上传图片ends From 309e4620e9cab0453102f2ea84c2f7da19e793d7 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Mon, 6 Sep 2021 19:30:25 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/heart/actinfo-add-or-update.vue | 22 ++++++++++++++++++- .../modules/heart/actinfo-detail-view.vue | 13 +++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/views/modules/heart/actinfo-add-or-update.vue b/src/views/modules/heart/actinfo-add-or-update.vue index fd85f80..945d7d7 100644 --- a/src/views/modules/heart/actinfo-add-or-update.vue +++ b/src/views/modules/heart/actinfo-add-or-update.vue @@ -7,6 +7,14 @@ :model="dataForm" ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '120px' : '120px'"> + + + + + + + + { @@ -450,6 +465,9 @@ export default { computed: { dataRule () { return { + actType: [ + { required: true, message: this.$t('validate.required'), trigger: 'blur' } + ], title: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } ], @@ -663,6 +681,8 @@ export default { this.dataForm.signinAddress = this.dataForm.actAddress this.dataForm.signinLatitude = this.dataForm.actLatitude this.dataForm.signinLongitude = this.dataForm.actLongitude + //设置为志愿活动 + this.dataForm.actType = '1' }).catch(() => { }) }, // 上传图片ends diff --git a/src/views/modules/heart/actinfo-detail-view.vue b/src/views/modules/heart/actinfo-detail-view.vue index 98b9917..5cbf031 100644 --- a/src/views/modules/heart/actinfo-detail-view.vue +++ b/src/views/modules/heart/actinfo-detail-view.vue @@ -7,6 +7,19 @@ :rules="dataRule" ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '120px' : '120px'"> + + + + +