* Add test data.

This commit is contained in:
孙广明
2023-02-08 20:53:23 +08:00
parent 7d5d82693a
commit 1a9c76cfaf
+9 -7
View File
@@ -1,6 +1,10 @@
<?php include '../../common/view/header.html.php';?>
<?php js::import($jsRoot . 'dtable/min.js'); ?>
<?php css::import($jsRoot . 'dtable/min.css'); ?>
<?php
$setting = $this->datatable->getSetting('execution');
$widths = $this->datatable->setFixedFieldWidth($setting);
?>
<div id="myTable"></div>
<script>
@@ -21,22 +25,20 @@ const options = {
striped: true,
cols: [
{name: 'id', title: 'ID', width: 60, fixed: 'left', sortType: true},
{name: 'project', title: '项目名称', width: 200, fixed: 'left'},
{name: 'manager', title: '负责人', width: 60, flex: 1},
{name: 'project', title: '项目名称', width: 600, fixed: 'left'},
{name: 'manager', title: '负责人', width: 60},
{name: 'storyPoints', title: '需求规模', width: 80, align: 'center'},
{name: 'executionCounts', title: '执行数', width: 70, align: 'center'},
{name: 'investedDays', title: '已投入', width: 70, align: 'center'},
{name: 'startDate', title: '开始日期', width: 90, align: 'center'},
{name: 'finishDate', title: '完成日期', width: 90, align: 'center'},
{name: 'progress', title: '进度', width: 65, align: 'center'},
{name: 'actions', title: '操作', width: 100, fixed: 'right'}, // renderActions 为单元格自定义渲染方法
],
data: [
{id: 1, project: '禅道开源版', manager: '李明', storyPoints: 1024, executionCounts: 42, investedDays: 32, startDate: '2022-05-03', finishDate: '2022-09-20', progress: 55, actions: ''},
{id: 2, project: '禅道企业版', manager: 'Zhang Giao', storyPoints: 1024, executionCounts: 42, investedDays: 32, startDate: '2022-05-03', finishDate: '2022-09-20', progress: 55, actions: ''},
{id: 2, project: '禅道旗舰版', manager: 'HAHAHA', storyPoints: 1024, executionCounts: 42, investedDays: 32, startDate: '2022-05-03', finishDate: '2022-09-20', progress: 55, actions: ''},
{id: 1, project: '禅道开源版', manager: '李明', storyPoints: 1024, executionCounts: 42, investedDays: 32, startDate: '2022-05-03', finishDate: '2022-09-20', progress: 55},
{id: 2, project: '禅道企业版', manager: 'Zhang Giao', storyPoints: 1024, executionCounts: 42, investedDays: 32, startDate: '2022-05-03', finishDate: '2022-09-20', progress: 55},
{id: 2, project: '禅道旗舰版', manager: 'HAHAHA', storyPoints: 1024, executionCounts: 42, investedDays: 32, startDate: '2022-05-03', finishDate: '2022-09-20', progress: 55},
],
striped: false
};
// 初始化数据表格