Commit 4e7027e5 authored by Y.H's avatar Y.H

Modify the task panel default folding, there is a task to start again

修改任务面板默认折叠,有任务再展开
parent f00d2706
// //
// 任务管理 模块 // 任务管理 模块
// //
/* /*
用法: 用法:
...@@ -18,6 +18,8 @@ class Tasks { ...@@ -18,6 +18,8 @@ class Tasks {
constructor(cell, manager) { constructor(cell, manager) {
cell.setText(`<i class="fa fa-tasks"></i> ${LANG['title']}`); cell.setText(`<i class="fa fa-tasks"></i> ${LANG['title']}`);
cell.setHeight(250); cell.setHeight(250);
// 默认折叠panel
cell.collapse();
// 创建表格 // 创建表格
let grid = cell.attachGrid(); let grid = cell.attachGrid();
...@@ -29,7 +31,7 @@ class Tasks { ...@@ -29,7 +31,7 @@ class Tasks {
${LANG['grid']['header']['stime']}, ${LANG['grid']['header']['stime']},
${LANG['grid']['header']['etime']} ${LANG['grid']['header']['etime']}
`); `);
grid.setColTypes("ro,ro,ro,ro,ro"); grid.setColTypes("ro,ro,ro,ro,ro");
grid.setInitWidths("100,*,150,150,150"); grid.setInitWidths("100,*,150,150,150");
grid.setColAlign("left,left,left,left,left"); grid.setColAlign("left,left,left,left,left");
...@@ -44,6 +46,8 @@ class Tasks { ...@@ -44,6 +46,8 @@ class Tasks {
// task.update('20%'); // task.update('20%');
// task.end('100%'); // task.end('100%');
new(name, desc, progress) { new(name, desc, progress) {
// 展开panel
this.cell.expand();
// 创建一个随机ID // 创建一个随机ID
const hash = String(+new Date() + Math.random()).replace('.', '_'); const hash = String(+new Date() + Math.random()).replace('.', '_');
this.grid.addRow( this.grid.addRow(
...@@ -81,4 +85,4 @@ class Tasks { ...@@ -81,4 +85,4 @@ class Tasks {
} }
export default Tasks; export default Tasks;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment