diff --git a/src/views/cost/energyCostHis/index.vue b/src/views/cost/energyCostHis/index.vue
index 685896ac..44287284 100644
--- a/src/views/cost/energyCostHis/index.vue
+++ b/src/views/cost/energyCostHis/index.vue
@@ -111,6 +111,7 @@ export default {
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'searchTime',
+ defaultSelect: [],
},
{
type: 'button',
@@ -132,6 +133,14 @@ export default {
},
components: {},
created() {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+ this.formConfig[2].defaultSelect = [start, end];
+ this.listQuery.reportTime = [
+ moment(start).startOf('day').format('x'),
+ moment(end).endOf('day').format('x'),
+ ];
getEnergyTypeListAll().then((response) => {
this.formConfig[1].selectOptions = response.data;
});
diff --git a/src/views/cost/rawMaterialCostHis/index.vue b/src/views/cost/rawMaterialCostHis/index.vue
index 2e22c970..05636063 100644
--- a/src/views/cost/rawMaterialCostHis/index.vue
+++ b/src/views/cost/rawMaterialCostHis/index.vue
@@ -110,6 +110,7 @@ export default {
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'searchTime',
+ defaultSelect: [],
},
{
type: 'button',
@@ -131,6 +132,14 @@ export default {
},
components: {},
created() {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+ this.formConfig[2].defaultSelect = [start, end];
+ this.listQuery.times = [
+ moment(start).startOf('day').format('x'),
+ moment(end).endOf('day').format('x'),
+ ];
getHotMaterialList().then((response) => {
this.formConfig[1].selectOptions = response.data;
});
diff --git a/src/views/energy/analysis/yoyAnalysis/components/lineChart.vue b/src/views/energy/analysis/yoyAnalysis/components/lineChart.vue
index b7e4f9a3..ae20f590 100644
--- a/src/views/energy/analysis/yoyAnalysis/components/lineChart.vue
+++ b/src/views/energy/analysis/yoyAnalysis/components/lineChart.vue
@@ -1,8 +1,5 @@
-
+