BootStrap Table 添加序列號


js

            $('#table').bootstrapTable({
                striped: true,//隔行換色
                columns: [
                    {
                        field: '',
                        title: '序號',
                        sortable: true,
                        align: "center",
                        width: 40,
                        formatter: function (value, row, index) {
                            return index + 1;
                        }
                    },
                    { field: 'ID', title: '內碼', visible: false },
                    { field: 'TIID', title: '任務明細狀態表內碼', visible: false },
                    { field: 'TASK_ID', title: '任務內碼', visible: false },
                    { field: 'PROJ_ID', title: '船號',width:100,align:'center' },
                    { field: 'SECTION_NO', title: '分段號',width:150,align:'center' },
                    { field: 'NEST_NAME', title: '切割版圖號',width:200,align:'center' }
                ],
                pagination: true, //分頁
                pageNumber: 1, //首頁碼
                pageSize: 10, //頁面大小
                pageList:[10,20,50],
                onClickRow: function (row) {
                    curRow = row;
                    $("#infoPanel").popup();//顯示明細面板
                    LoadInfoTable(row.ID);
                }
            })

效果

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM