diff --git a/src/views/modules/activity/activityinfo-add-or-update.vue b/src/views/modules/activity/activityinfo-add-or-update.vue
index 0489df7..c020ed5 100644
--- a/src/views/modules/activity/activityinfo-add-or-update.vue
+++ b/src/views/modules/activity/activityinfo-add-or-update.vue
@@ -40,6 +40,19 @@
+
+
+
+
+
+
+
+
@@ -53,13 +66,23 @@
-
-
+
+
+
+
+
@@ -88,7 +111,6 @@
type="datetime"
value-format="yyyy-MM-dd HH:mm"
format="yyyy-MM-dd HH:mm"
- @change="dateChangeTime"
placeholder="选择日期时间">
@@ -165,19 +187,47 @@
-
- {{$t("confirm")}}
- 返回
+
+
+ 上架
+ 下架
+
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+ {{$t("confirm")}}
+ 返回
@@ -202,19 +252,14 @@
id: '',
title: '',
headPic: '',
- signupStartTime: '',
- signupEndTime: '',
+ signUpStartTime: '',
+ signUpEndTime: '',
actQuotaFlag: '1',
actStartTime: '',
actEndTime: '',
actAddress: '',
actLongitude: '',
actLatitude: '',
- signinStartTime: '',
- signinEndTime: '',
- signinAddress: '',
- signinLongitude: '',
- signinLatitude: '',
clockRadius: 200,
actQuota: '',
contacts: '',
@@ -229,9 +274,15 @@
reward: '',
isBanner: '1',
actUserDefaultState: '1',
- bannerUrl: ''
+ bannerUrl: '',
+ cancelReason: '',
+ signUpNum: 0,
+ sectionCode: '',
+ categoryCode: '',
+ categoryName: ''
},
- isSignupEndTime: {
+ options: [],
+ issignUpEndTime: {
disabledDate (time) {
return time < Date.now() - 8.64e7 // 8.64e7=1000*60*60*24一天
}
@@ -267,14 +318,6 @@
}
}
},
- pickerBeginSignInDateAfter: {
- disabledDate: (time) => {
- let EndDateVal = this.dataForm.signinEndTime
- if (EndDateVal) {
- return time.getTime() < new Date(EndDateVal).getTime()
- }
- }
- },
pickerBeginDateAfter: {
disabledDate: (time) => {
let EndDateVal = this.dataForm.actEndTime
@@ -286,15 +329,6 @@
}
},
created () {
- this.$http
- .get(`/sys/user/deptOptions/getByLoginUser`)
- .then(({ data: res }) => {
- if (res.code !== 0) {
- return this.$message.error(res.msg)
- }
- this.options = res.data.options
- })
- .catch(() => { })
this.visible = true
this.$nextTick(() => {
// 富文本
@@ -308,6 +342,9 @@
// 富文本end
})
},
+ mounted() {
+ this.getOptions()
+ },
computed: {
dataRule () {
return {
@@ -317,16 +354,10 @@
headPic: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
- signupStartTime: [
- { required: true, message: this.$t('validate.required'), trigger: 'blur' }
- ],
- signupEndTime: [
- { required: true, message: this.$t('validate.required'), trigger: 'blur' }
- ],
- signinStartTime: [
+ signUpStartTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
- signinEndTime: [
+ signUpEndTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
actStartTime: [
@@ -344,22 +375,13 @@
actLatitude: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
- signinAddress: [
- { required: true, message: this.$t('validate.required'), trigger: 'blur' }
- ],
- signinLongitude: [
- { required: true, message: this.$t('validate.required'), trigger: 'blur' }
- ],
- signinLatitude: [
- { required: true, message: this.$t('validate.required'), trigger: 'blur' }
- ],
clockRadius: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
- actQuota: [
+ actQuotaFlag: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
- signupNum: [
+ actQuota: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
clockNum: [
@@ -395,6 +417,9 @@
deptId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
+ categoryCode: [
+ { required: true, message: this.$t('validate.required'), trigger: 'blur' }
+ ],
punishmentPoints: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
@@ -423,8 +448,15 @@
}
},
methods: {
- dateChangeTime () {
- this.dataForm.signinStartTime = this.dataForm.actStartTime
+ getOptions () {
+ this.$http
+ .get(`/property/sectioncategory/list`, { params: { sectionCode: 'community_forum' } }).then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.options = res.data
+ })
+ .catch(() => { })
},
changeHandler (value) {
if (value === 1) {
@@ -452,13 +484,6 @@
this.dataForm.actAddress = position.address
this.dataForm.actLatitude = position.latitude
this.dataForm.actLongitude = position.longitude
- this.dataForm.signinAddress = position.address
- this.dataForm.signinLatitude = position.latitude
- this.dataForm.signinLongitude = position.longitude
- } else {
- this.dataForm.signinAddress = position.address
- this.dataForm.signinLatitude = position.latitude
- this.dataForm.signinLongitude = position.longitude
}
},
// 富文本编辑器
@@ -515,18 +540,15 @@
},
// 表单提交
dataFormSubmitHandle: debounce(function () {
- if (new Date() >= new Date(this.dataForm.signupEndTime)) {
+ if (new Date() >= new Date(this.dataForm.signUpEndTime)) {
return this.$message.error('报名截止时间必须大于当前时间')
}
if (this.dataForm.actStartTime >= this.dataForm.actEndTime) {
return this.$message.error('活动结束时间必须大于活动开始时间')
}
- if (this.dataForm.actStartTime <= this.dataForm.signupEndTime) {
+ if (this.dataForm.actStartTime <= this.dataForm.signUpEndTime) {
return this.$message.error('活动开始时间必须大于报名截止时间')
}
- if (this.dataForm.actEndTime > this.dataForm.signinEndTime) {
- return this.$message.error('打卡结束时间必须大于或等于活动结束时间')
- }
if ((this.dataForm.actContent).length > 10000) {
return this.$message.error('您输入的的内容已超过字数')
}
@@ -537,19 +559,15 @@
if (!valid) {
return false
}
- var signUpEndTime = new Date(Date.parse(this.dataForm.signupEndTime))
+ var signUpEndTime = new Date(Date.parse(this.dataForm.signUpEndTime))
var actStarTime = new Date(Date.parse(this.dataForm.actStartTime))
var actEndTime = new Date(Date.parse(this.dataForm.actEndTime))
- var signinEndTime = new Date(Date.parse(this.dataForm.signinEndTime))
if (signUpEndTime > actStarTime) {
return this.$message.error('活动开始时间必须大于报名截止时间.')
}
if (actEndTime < actStarTime) {
return this.$message.error('活动结束时间必须大于活动开始时间.')
}
- if (signinEndTime < actEndTime) {
- return this.$message.error('签到结束时间必须大于活动结束时间.')
- }
this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/property/activityinfo/', this.dataForm).then(({ data: res }) => {
this.isAble = false
diff --git a/src/views/modules/activity/activityinfo.vue b/src/views/modules/activity/activityinfo.vue
index 683aadd..716a1e7 100644
--- a/src/views/modules/activity/activityinfo.vue
+++ b/src/views/modules/activity/activityinfo.vue
@@ -18,26 +18,40 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
-
-
-
-
+
+
+ 下架
+ 上架
+
+
@@ -83,6 +97,9 @@ export default {
components: {
AddOrUpdate
},
+ mounted() {
+ this.getDataList();
+ },
methods: {
addAction () {
this.$parent.selectComponent = 'ActInfoAdd'
@@ -93,3 +110,9 @@ export default {
}
}
+
diff --git a/src/views/modules/section/sectioncategory-add-or-update.vue b/src/views/modules/section/sectioncategory-add-or-update.vue
index 651ef9d..80455ac 100644
--- a/src/views/modules/section/sectioncategory-add-or-update.vue
+++ b/src/views/modules/section/sectioncategory-add-or-update.vue
@@ -137,7 +137,6 @@ export default {
return this.$message.error(res.msg)
}
this.options = res.data
- console.log(this.options)
}).catch(() => {})
},
// 表单提交
diff --git a/src/views/modules/section/sectioncategory.vue b/src/views/modules/section/sectioncategory.vue
index 5dec6c6..8424a9c 100644
--- a/src/views/modules/section/sectioncategory.vue
+++ b/src/views/modules/section/sectioncategory.vue
@@ -86,7 +86,6 @@ export default {
return this.$message.error(res.msg)
}
this.options = res.data
- console.log(this.options)
}).catch(() => {})
}
}