|
|
@@ -49,10 +49,13 @@
|
|
|
<el-col :span="11">
|
|
|
<el-form-item prop="date" label="活动时间">
|
|
|
<el-date-picker
|
|
|
- v-model="item.date"
|
|
|
- type="date"
|
|
|
+ v-model="item.data"
|
|
|
+ type="daterange"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择日期"
|
|
|
+ start-placeholder="开始时间"
|
|
|
+ end-placeholder="结束时间"
|
|
|
+ range-separator="至"
|
|
|
+ style="width: 220px"
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
@@ -137,6 +140,7 @@ export default {
|
|
|
this.$http
|
|
|
.get('performance/backGet/' + this.$route.query.id)
|
|
|
.then(res => {
|
|
|
+ console.log(res);
|
|
|
this.formData = res;
|
|
|
if (res.programmeNum > 0) {
|
|
|
this.edit = true;
|
|
|
@@ -145,7 +149,6 @@ export default {
|
|
|
this.phones = res.performanceEnquiries;
|
|
|
}
|
|
|
this.dateRange = [res.startDate, res.endDate];
|
|
|
-
|
|
|
this.$http
|
|
|
.post(
|
|
|
'/performanceSchedule/all',
|
|
|
@@ -153,7 +156,17 @@ export default {
|
|
|
{ body: 'json' }
|
|
|
)
|
|
|
.then(res => {
|
|
|
- this.schedules = res.content;
|
|
|
+ this.schedules = res.content.map(item => {
|
|
|
+ return {
|
|
|
+ content: item.content,
|
|
|
+ data: [item.date, item.endDate],
|
|
|
+ address: item.address,
|
|
|
+ performanceId: item.performanceId,
|
|
|
+ id: item.id,
|
|
|
+ createdAt: item.createdAt,
|
|
|
+ del: item.del
|
|
|
+ };
|
|
|
+ });
|
|
|
});
|
|
|
})
|
|
|
.catch(e => {
|
|
|
@@ -192,6 +205,7 @@ export default {
|
|
|
delete res.id;
|
|
|
delete res.del;
|
|
|
this.formData = res;
|
|
|
+ console.log(this.formData);
|
|
|
} else {
|
|
|
this.$message.warning('暂无上一年信息');
|
|
|
}
|
|
|
@@ -212,6 +226,8 @@ export default {
|
|
|
{ label: '已结束', value: 'END' }
|
|
|
],
|
|
|
dateRange: [],
|
|
|
+ // dataTo: [],
|
|
|
+ value1: [],
|
|
|
eventTimeRange: '',
|
|
|
years: [],
|
|
|
schedules: [],
|
|
|
@@ -224,11 +240,14 @@ export default {
|
|
|
saveOtherJson() {
|
|
|
const schedules = [...this.schedules]
|
|
|
.filter(item => {
|
|
|
- return !!item.content || !!item.date || !!item.address;
|
|
|
+ return !!item.content || !!item.data || !!item.address;
|
|
|
})
|
|
|
.map(item => {
|
|
|
return {
|
|
|
- ...item,
|
|
|
+ content: item.content,
|
|
|
+ address: item.address,
|
|
|
+ date: item.data[0],
|
|
|
+ endDate: item.data[1],
|
|
|
performanceId: this.performanceId
|
|
|
};
|
|
|
});
|
|
|
@@ -255,7 +274,6 @@ export default {
|
|
|
.post('/performance/save', data, { body: 'json' })
|
|
|
.then(res => {
|
|
|
this.saving = false;
|
|
|
-
|
|
|
this.performanceId = res.id;
|
|
|
this.$nextTick(() => {
|
|
|
this.$http.post('/performanceSchedule/batchSave', {
|
|
|
@@ -290,7 +308,7 @@ export default {
|
|
|
onAddOtherForm() {
|
|
|
this.schedules.push({
|
|
|
content: '',
|
|
|
- date: '',
|
|
|
+ data: '',
|
|
|
address: ''
|
|
|
});
|
|
|
},
|