diff --git a/src/apps/AppResidentActivitie/Add.vue b/src/apps/AppResidentActivitie/Add.vue
index 07467382..484a600d 100644
--- a/src/apps/AppResidentActivitie/Add.vue
+++ b/src/apps/AppResidentActivitie/Add.vue
@@ -12,30 +12,20 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
@@ -46,24 +36,18 @@
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
-
+
+
@@ -87,32 +71,28 @@ export default {
forms: {
title: '',
content: '',
- fileIds: [],
- status: '',
- statusValue: '',
+ url: [],
+ areaId: '',
- fanwe: '',
- nums: '',
- startTime: '',
+ beginTime: '',
endTime: '',
+ address: '',
+ contactPerson: '',
- deadTime: '',
- areaNmae: '',
- people: '',
- phone: '',
+ contactPhone: '',
},
- showStstus: false,
+
showStartTime: false,
showEndTime: false,
- showDeadTime: false,
flag: false,
+ areaId: '',
params: {
year: true,
month: true,
day: true,
hour: true,
minute: true,
- second: true,
+ second: false,
timestamp: true,
},
}
@@ -120,9 +100,11 @@ export default {
computed: { ...mapState(['user']) },
onLoad(o) {
console.log(o)
- this.id = o.id
+ this.id = o.id ? o.id : ''
this.$dict.load('realityStatus').then(() => {
// this.getDetail()
+ this.areaId = this.user.areaId
+ this.forms.areaId = this.user.areaId
})
},
@@ -132,11 +114,7 @@ export default {
// this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.id}`).then((res) => {
// if (res?.data) {
// this.forms = res.data
- // this.forms.statusValue = res.data.status
- // this.forms.status = this.$dict.getLabel('realityStatus', res.data.status)
- // if (res.data.images) {
- // this.forms.images = JSON.parse(res.data.images || '[]')
- // }
+ //
// }
// })
// },
@@ -152,40 +130,28 @@ export default {
if (!this.forms.content) {
return this.$u.toast('请输入活动详情')
}
- if (this.forms.fileIds.length == 0) {
+ if (this.forms.url.length == 0) {
return this.$u.toast('请选择活动封面图')
}
- if (!this.forms.status) {
- return this.$u.toast('请选择活动类型')
- }
- if (!this.forms.fanwe) {
- return this.$u.toast('请选择报名范围')
- }
- if (!this.forms.nums) {
- return this.$u.toast('请输入活动名额')
- }
- if (!this.forms.startTime) {
+ if (!this.forms.beginTime) {
return this.$u.toast('请选择开始时间')
}
if (!this.forms.endTime) {
return this.$u.toast('请选择结束时间')
}
- if (!this.forms.deadTime) {
- return this.$u.toast('请选择报名截止时间')
- }
- if (!this.forms.areaNmae) {
+ if (!this.forms.address) {
return this.$u.toast('请输入活动地点')
}
- if (!this.forms.people) {
+ if (!this.forms.contactPerson) {
return this.$u.toast('请输入联系人')
}
- if (!this.forms.phone) {
+ if (!this.forms.contactPhone) {
return this.$u.toast('请输入联系方式')
}
const imgs = []
- if (this.forms.fileIds) {
- this.forms.fileIds.map((e) => {
+ if (this.forms.url) {
+ this.forms.url.map((e) => {
imgs.push({ url: e.url, id: e.id })
})
}
@@ -195,20 +161,15 @@ export default {
.post(`/app/appvillageactivityinfo/addOrUpdate`, {
title: this.forms.title,
content: this.forms.content,
- images: JSON.stringify(imgs) || [],
- // images: imgs || [],
+ url: JSON.stringify(imgs) || [],
+ areaId: this.forms.areaId,
- status: this.forms.statusValue ? this.forms.statusValue : this.forms.status,
- fanwe: this.forms.fanwe,
- nums: this.forms.fanumsnwe,
-
- startTime: this.forms.startTime,
+ beginTime: this.forms.beginTime,
endTime: this.forms.endTime,
- deadTime: this.forms.deadTime,
- areaNmae: this.forms.areaNmae,
+ address: this.forms.address,
+ contactPerson: this.forms.contactPerson,
- people: this.forms.people,
- phone: this.forms.phone,
+ contactPhone: this.forms.contactPhone,
id: this.id,
})
.then((res) => {
@@ -226,22 +187,22 @@ export default {
confirm(e) {
if (this.showStartTime == true) {
- console.log(1, e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second)
- this.forms.startTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second
+ console.log(1, e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + '00')
+ this.forms.beginTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + '00'
}
if (this.showEndTime == true) {
- console.log(2, e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second)
- this.forms.endTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second
- }
- if (this.showDeadTime == true) {
- console.log(3, e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second)
- this.forms.deadTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second
+ console.log(2, e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + '00')
+ this.forms.endTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + '00'
}
},
- selectStatus(e) {
- this.forms.status = e[0].label
- this.forms.statusValue = e[0].value
+ areaSelect(e) {
+ if (e.type == 5) {
+ this.forms.areaId = e.id
+ }
+ if (e.type == 4) {
+ this.forms.areaId = e.id
+ }
},
},
}
diff --git a/src/apps/AppResidentActivitie/AppResidentActivities.vue b/src/apps/AppResidentActivitie/AppResidentActivities.vue
index c8ad98fa..488c283e 100644
--- a/src/apps/AppResidentActivitie/AppResidentActivities.vue
+++ b/src/apps/AppResidentActivitie/AppResidentActivities.vue
@@ -96,6 +96,7 @@ export default {
this.datas.map((item) => {
if (item.url) {
item.url = JSON.parse(item.url || '[]')
+ console.log(item.url)
}
return item
})
diff --git a/src/apps/AppResidentActivitie/Detail.vue b/src/apps/AppResidentActivitie/Detail.vue
index 765ba0fd..f409bf37 100644
--- a/src/apps/AppResidentActivitie/Detail.vue
+++ b/src/apps/AppResidentActivitie/Detail.vue
@@ -2,7 +2,7 @@