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'">
+
+
+
+ {{
+ dataForm.actType == 0
+ ? "社区活动"
+ : dataForm.actType == 1
+ ? "志愿活动"
+ : ""
+ }}
+
+
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('cancel') }}
+ {{ $t('confirm') }}
+
+
+
+
+
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 @@
+
+
+
+
+ {{dataForm.title}}
+
+
+
+
+
+
+
+
+ {{dataForm.actStartTime}}
+
+
+ {{dataForm.actEndTime}}
+
+
+ {{dataForm.actAddress}}
+
+
+ {{dataForm.requirement}}
+
+
+ {{dataForm.actContent}}
+
+
+
+ {{
+ dataForm.volunteerFlag == 0
+ ? "否"
+ : dataForm.volunteerFlag == 1
+ ? "是"
+ : ""
+ }}
+
+
+
+ {{dataForm.contacts}}
+
+
+ {{dataForm.tel}}
+
+
+
+ {{
+ dataForm.state == 0
+ ? "审核中"
+ : dataForm.state == 5
+ ? "未通过"
+ : dataForm.state == 10
+ ? "待发布"
+ : dataForm.state == 15
+ ? "已发布"
+ : ""
+ }}
+
+
+
+ {{dataForm.reason}}
+
+
+ {{dataForm.updatedTime}}
+
+
+
+ {{ $t('返回') }}
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('query') }}
+
+
+ 导出
+
+
+ {{ $t('add') }}
+
+
+ {{ $t('deleteBatch') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('详情') }}
+ {{ $t('审核') }}
+ {{ $t('发布') }}
+ {{ $t('delete') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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 @@
-
-
-
-
-
-
-
-
- {{ $t('query') }}
-
-
- {{ $t('add') }}
-
-
- {{ $t('deleteBatch') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('update') }}
- {{ $t('delete') }}
-
-
-
-
-
-
-
-
-
-
-
-