修改成本bug

This commit is contained in:
朱文强 2024-03-21 13:43:09 +08:00
parent 7bc5947a43
commit d70887fef0
2 changed files with 18 additions and 0 deletions

View File

@ -111,6 +111,7 @@ export default {
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
param: 'searchTime', param: 'searchTime',
defaultSelect: [],
}, },
{ {
type: 'button', type: 'button',
@ -132,6 +133,14 @@ export default {
}, },
components: {}, components: {},
created() { 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) => { getEnergyTypeListAll().then((response) => {
this.formConfig[1].selectOptions = response.data; this.formConfig[1].selectOptions = response.data;
}); });

View File

@ -110,6 +110,7 @@ export default {
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
param: 'searchTime', param: 'searchTime',
defaultSelect: [],
}, },
{ {
type: 'button', type: 'button',
@ -131,6 +132,14 @@ export default {
}, },
components: {}, components: {},
created() { 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) => { getHotMaterialList().then((response) => {
this.formConfig[1].selectOptions = response.data; this.formConfig[1].selectOptions = response.data;
}); });