feature: 面板
This commit is contained in:
parent
adf7bd959e
commit
ba346a4520
|
|
@ -27,7 +27,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'editable'], function
|
|||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'admin.nickname', title: __('Admin.nickname'), operate: 'LIKE'},
|
||||
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3'),"4":__('Type 4')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'date', title: __('Date'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
|
|
@ -65,14 +65,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'editable'], function
|
|||
"visible":false
|
||||
});
|
||||
|
||||
const startDate = new Date(new Date().setDate(1));
|
||||
const endDate = new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0);
|
||||
const startDate = new Date();
|
||||
startDate.setDate(1);
|
||||
startDate.setHours(0, 0, 0, 0);
|
||||
|
||||
console.log('Start Date:', startDate);
|
||||
console.log('End Date:', endDate);
|
||||
const endDate = new Date(startDate.getFullYear(), startDate.getMonth() + 1, 0);
|
||||
endDate.setHours(0, 0, 0, 0);
|
||||
|
||||
for (let d = new Date(startDate); d <= endDate; ) {
|
||||
const current = new Date(d); // 深拷贝
|
||||
const tmpDate = current.toLocaleDateString('sv-SE');
|
||||
|
||||
for (let d = new Date(startDate); d <= endDate; d.setDate(d.getDate() + 1)) {
|
||||
let tmpDate = d.toISOString().split('T')[0];
|
||||
console.log('Current Date:', tmpDate);
|
||||
defaultColumnArr.push({
|
||||
"title": tmpDate,
|
||||
|
|
@ -96,6 +99,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'editable'], function
|
|||
},
|
||||
}
|
||||
});
|
||||
|
||||
d.setDate(d.getDate() + 1); // 最后再改 d 的值
|
||||
}
|
||||
|
||||
// 初始化表格
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user