fix(addDirect): 活动及展示时间补时分秒

This commit is contained in:
woody 2025-09-24 10:54:40 +08:00
parent 3f62cfad14
commit ac48a7e158
1 changed files with 22 additions and 9 deletions

View File

@ -204,6 +204,9 @@ export default {
} }
}, },
methods: { methods: {
splitDate(date) {
return date.split(' ')[0]
},
getDetails() { getDetails() {
api api
.recommendDetail({ .recommendDetail({
@ -223,13 +226,17 @@ export default {
this.ruleForm.actEndDate = res.data.activityParam.actEndDate this.ruleForm.actEndDate = res.data.activityParam.actEndDate
this.ruleForm.disStartDate = res.data.activityParam.disStartDate this.ruleForm.disStartDate = res.data.activityParam.disStartDate
this.ruleForm.disEndDate = res.data.activityParam.disEndDate this.ruleForm.disEndDate = res.data.activityParam.disEndDate
const actStartDate = this.splitDate(res.data.activityParam.actStartDate)
const actEndDate = this.splitDate(res.data.activityParam.actEndDate)
const disStartDate = this.splitDate(res.data.activityParam.disStartDate)
const disEndDate = this.splitDate(res.data.activityParam.disEndDate)
this.$set(this.ruleForm, 'ruleFormTime', [ this.$set(this.ruleForm, 'ruleFormTime', [
res.data.activityParam.actStartDate, actStartDate,
res.data.activityParam.actEndDate actEndDate
]) ])
this.$set(this.ruleForm, 'ruleFormTime1', [ this.$set(this.ruleForm, 'ruleFormTime1', [
res.data.activityParam.disStartDate, disStartDate,
res.data.activityParam.disEndDate disEndDate
]) ])
const arr1 = [] const arr1 = []
const arr2 = [] const arr2 = []
@ -267,12 +274,12 @@ export default {
) )
this.$set(this.ruleForm, 'actCover', this.addData.activityParam.actCover) this.$set(this.ruleForm, 'actCover', this.addData.activityParam.actCover)
this.$set(this.ruleForm, 'ruleFormTime', [ this.$set(this.ruleForm, 'ruleFormTime', [
this.addData.activityParam.actStartDate, this.splitDate(this.addData.activityParam.actStartDate),
this.addData.activityParam.actEndDate this.splitDate(this.addData.activityParam.actEndDate)
]) ])
this.$set(this.ruleForm, 'ruleFormTime1', [ this.$set(this.ruleForm, 'ruleFormTime1', [
this.addData.activityParam.disStartDate, this.splitDate(this.addData.activityParam.disStartDate),
this.addData.activityParam.disEndDate this.splitDate(this.addData.activityParam.disEndDate)
]) ])
const arr1 = [] const arr1 = []
const arr2 = [] const arr2 = []
@ -400,7 +407,13 @@ export default {
{}, {},
{ {
controlType: this.controlType, controlType: this.controlType,
activityParam: this.ruleForm, activityParam: {
...this.ruleForm,
actStartDate: this.ruleForm.actStartDate + ' 00:00:00',
actEndDate: this.ruleForm.actEndDate + ' 23:59:59',
disStartDate: this.ruleForm.disStartDate + ' 00:00:00',
disEndDate: this.ruleForm.disEndDate + ' 23:59:59'
},
recommendUpgradeList: recommendUpgradeList:
this.$refs.directUpdata.recommendUpgradeList, this.$refs.directUpdata.recommendUpgradeList,
authorityList: this.$refs.directUpdata.form.waresAuthorityList authorityList: this.$refs.directUpdata.form.waresAuthorityList