diff --git a/src/views/modules/heart/actinfo-add-or-update.vue b/src/views/modules/heart/actinfo-add-or-update.vue index e3b20f4..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'"> + + + + + + + + -
+
-
+
{ @@ -446,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' } ], @@ -572,9 +594,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 +667,24 @@ 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 + } + this.dataForm.signinStartTime = this.dataForm.actStartTime + this.dataForm.signinAddress = this.dataForm.actAddress + this.dataForm.signinLatitude = this.dataForm.actLatitude + this.dataForm.signinLongitude = this.dataForm.actLongitude + //设置为志愿活动 + this.dataForm.actType = '1' + }).catch(() => { }) + }, // 上传图片ends // 获取信息 getInfo () { @@ -688,6 +735,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 +754,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-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'"> + + + + + + + + + + + +
+ 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 @@ - - -