diff --git a/app/article/view/index/index.html b/app/article/view/index/index.html index 48a014d..0cb5977 100644 --- a/app/article/view/index/index.html +++ b/app/article/view/index/index.html @@ -34,7 +34,7 @@ layui.pageTable = table.render({ elem: '#test', title: '文章列表', - toolbar: '#toolbarDemo', + defaultToolbar: false, url: "/article/index/index", //数据接口 cellMinWidth: 360, page: true, //开启分页 diff --git a/app/article/view/index/list.html b/app/article/view/index/list.html index aa3e5b8..6dbe5be 100644 --- a/app/article/view/index/list.html +++ b/app/article/view/index/list.html @@ -46,6 +46,7 @@ elem: '#test', title: '文章列表', toolbar: '#toolbarDemo', + defaultToolbar: false, url: "/article/index/list", //数据接口 cellMinWidth: 300, page: true, //开启分页 diff --git a/app/project/view/document/index.html b/app/project/view/document/index.html index dfac7d1..e45741d 100644 --- a/app/project/view/document/index.html +++ b/app/project/view/document/index.html @@ -47,6 +47,7 @@ elem: '#document', title: '文档列表', toolbar: '#toolbarDemo', + defaultToolbar: false, cellMinWidth: 240, url: "/project/document/index", page: true, //开启分页 diff --git a/app/project/view/index/index.html b/app/project/view/index/index.html index 3021275..e889e3d 100644 --- a/app/project/view/index/index.html +++ b/app/project/view/index/index.html @@ -21,8 +21,9 @@ layui.pageTable = table.render({ elem: '#projectList', toolbar: '#toolbarDemo', + defaultToolbar:['filter', {title:'导出EXCEL',layEvent: 'LAYTABLE_EXCEL',icon: 'layui-icon-export'}], title: '项目列表', - cellMinWidth: 220, + cellMinWidth: 80, page: true, //开启分页 limit: 20, height: 'full-24', @@ -59,12 +60,20 @@ //触发事件 table.on('toolbar(project)', function(obj){ - var checkStatus = table.checkStatus(obj.config.id); - switch(obj.event){ - case 'add': - tool.side('/project/index/add'); - break; - }; + if(obj.event === 'LAYTABLE_EXCEL'){ + $.ajax({ + url: '/project/index/index', + data: {limit:99999}, + success:function(res){ + table.exportFile('projectList', res.data,'xls'); + } + }); + return; + } + else if(obj.event === 'add'){ + tool.side('/project/index/add'); + return; + } }); } diff --git a/app/project/view/task/index.html b/app/project/view/task/index.html index 9889336..1142cce 100644 --- a/app/project/view/task/index.html +++ b/app/project/view/task/index.html @@ -10,7 +10,7 @@ {block name="body"}