|
|
@@ -209,7 +209,7 @@ export default {
|
|
|
source: null,
|
|
|
trainingCampId: null,
|
|
|
periodId: null,
|
|
|
- dimension: 'company'
|
|
|
+ dimension: 'camp'
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
@@ -218,6 +218,18 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
+ // 设置默认时间为前一天
|
|
|
+ const yesterday = new Date();
|
|
|
+ yesterday.setDate(yesterday.getDate() - 1);
|
|
|
+ const formatDate = (date) => {
|
|
|
+ const year = date.getFullYear();
|
|
|
+ const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
|
+ const day = String(date.getDate()).padStart(2, '0');
|
|
|
+ return `${year}-${month}-${day}`;
|
|
|
+ };
|
|
|
+ this.createTime = [formatDate(yesterday), formatDate(yesterday)];
|
|
|
+ this.queryParams.sTime = this.createTime[0];
|
|
|
+ this.queryParams.eTime = this.createTime[1];
|
|
|
getCampList().then(response => {
|
|
|
this.camps = response.data.list
|
|
|
if (this.camps != null && this.camps.length > 0) {
|