优化导出数据
This commit is contained in:
parent
91df3a5dfe
commit
8dd49b3300
@ -21,6 +21,7 @@
|
|||||||
layui.pageTable = table.render({
|
layui.pageTable = table.render({
|
||||||
elem: '#test'
|
elem: '#test'
|
||||||
,toolbar: '#toolbarDemo'
|
,toolbar: '#toolbarDemo'
|
||||||
|
,defaultToolbar: false
|
||||||
,title:'车辆类型列表'
|
,title:'车辆类型列表'
|
||||||
,url: "/home/cate/car_cate"
|
,url: "/home/cate/car_cate"
|
||||||
,page: false
|
,page: false
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
layui.pageTable = table.render({
|
layui.pageTable = table.render({
|
||||||
elem: '#test'
|
elem: '#test'
|
||||||
,toolbar: '#toolbarDemo'
|
,toolbar: '#toolbarDemo'
|
||||||
|
,defaultToolbar: false
|
||||||
,title:'费用类型列表'
|
,title:'费用类型列表'
|
||||||
,url: "/home/cate/cost_cate"
|
,url: "/home/cate/cost_cate"
|
||||||
,page: false
|
,page: false
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
layui.pageTable = table.render({
|
layui.pageTable = table.render({
|
||||||
elem: '#test'
|
elem: '#test'
|
||||||
,toolbar: '#toolbarDemo'
|
,toolbar: '#toolbarDemo'
|
||||||
|
,defaultToolbar: false
|
||||||
,title:'报销类别列表'
|
,title:'报销类别列表'
|
||||||
,url: "/home/cate/expense_cate"
|
,url: "/home/cate/expense_cate"
|
||||||
,page: false
|
,page: false
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
layui.pageTable = table.render({
|
layui.pageTable = table.render({
|
||||||
elem: '#test'
|
elem: '#test'
|
||||||
,toolbar: '#toolbarDemo'
|
,toolbar: '#toolbarDemo'
|
||||||
|
,defaultToolbar: false
|
||||||
,title:'审批模块列表'
|
,title:'审批模块列表'
|
||||||
,url: "/home/cate/flow_type"
|
,url: "/home/cate/flow_type"
|
||||||
,page: false
|
,page: false
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
layui.pageTable = table.render({
|
layui.pageTable = table.render({
|
||||||
elem: '#test'
|
elem: '#test'
|
||||||
,toolbar: '#toolbarDemo'
|
,toolbar: '#toolbarDemo'
|
||||||
|
,defaultToolbar: false
|
||||||
,title:'工作类型列表'
|
,title:'工作类型列表'
|
||||||
,url: "/home/cate/industry_cate"
|
,url: "/home/cate/industry_cate"
|
||||||
,page: false
|
,page: false
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
layui.pageTable = table.render({
|
layui.pageTable = table.render({
|
||||||
elem: '#test'
|
elem: '#test'
|
||||||
,toolbar: '#toolbarDemo'
|
,toolbar: '#toolbarDemo'
|
||||||
|
,defaultToolbar: false
|
||||||
,title:'印章类型列表'
|
,title:'印章类型列表'
|
||||||
,url: "/home/cate/seal_cate"
|
,url: "/home/cate/seal_cate"
|
||||||
,page: false
|
,page: false
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
layui.pageTable = table.render({
|
layui.pageTable = table.render({
|
||||||
elem: '#test'
|
elem: '#test'
|
||||||
,toolbar: '#toolbarDemo'
|
,toolbar: '#toolbarDemo'
|
||||||
|
,defaultToolbar: false
|
||||||
,title:'工作类型列表'
|
,title:'工作类型列表'
|
||||||
,url: "/home/cate/services_cate"
|
,url: "/home/cate/services_cate"
|
||||||
,page: false
|
,page: false
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
layui.pageTable = table.render({
|
layui.pageTable = table.render({
|
||||||
elem: '#test'
|
elem: '#test'
|
||||||
,toolbar: '#toolbarDemo'
|
,toolbar: '#toolbarDemo'
|
||||||
|
,defaultToolbar: false
|
||||||
,title:'报销类别列表'
|
,title:'报销类别列表'
|
||||||
,url: "/home/cate/subject"
|
,url: "/home/cate/subject"
|
||||||
,page: false
|
,page: false
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
layui.pageTable = table.render({
|
layui.pageTable = table.render({
|
||||||
elem: '#test'
|
elem: '#test'
|
||||||
,toolbar: '#toolbarDemo'
|
,toolbar: '#toolbarDemo'
|
||||||
|
,defaultToolbar: false
|
||||||
,title:'工作类型列表'
|
,title:'工作类型列表'
|
||||||
,url: "/home/cate/work_cate"
|
,url: "/home/cate/work_cate"
|
||||||
,page: false
|
,page: false
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
elem: '#conf',
|
elem: '#conf',
|
||||||
title: '配置列表',
|
title: '配置列表',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
|
defaultToolbar: false,
|
||||||
url: "/home/conf/index",
|
url: "/home/conf/index",
|
||||||
cellMinWidth: 360,
|
cellMinWidth: 360,
|
||||||
page: false, //开启分页
|
page: false, //开启分页
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
elem: '#backup',
|
elem: '#backup',
|
||||||
title: '数据备份',
|
title: '数据备份',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
|
defaultToolbar: false,
|
||||||
url: "/home/database/database", //数据接口
|
url: "/home/database/database", //数据接口
|
||||||
page: false,
|
page: false,
|
||||||
cols: [
|
cols: [
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
layui.pageTable = table.render({
|
layui.pageTable = table.render({
|
||||||
elem: '#test'
|
elem: '#test'
|
||||||
,toolbar: '#toolbarDemo'
|
,toolbar: '#toolbarDemo'
|
||||||
|
,defaultToolbar: false
|
||||||
,title:'审批流程列表'
|
,title:'审批流程列表'
|
||||||
,url: "/home/flow/index"
|
,url: "/home/flow/index"
|
||||||
,page: false //开启分页
|
,page: false //开启分页
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
title: '关键字列表',
|
title: '关键字列表',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
|
defaultToolbar: false,
|
||||||
url: "/home/keywords/index",
|
url: "/home/keywords/index",
|
||||||
page: true, //开启分页
|
page: true, //开启分页
|
||||||
limit: 20,
|
limit: 20,
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
layui.pageTable = table.render({
|
layui.pageTable = table.render({
|
||||||
elem: '#role',
|
elem: '#role',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
|
defaultToolbar: false,
|
||||||
url: "/home/role/index", //数据接口
|
url: "/home/role/index", //数据接口
|
||||||
page: false, //开启分页
|
page: false, //开启分页
|
||||||
limit: 20,
|
limit: 20,
|
||||||
|
13
app/user/model/IndustryCate.php
Normal file
13
app/user/model/IndustryCate.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @copyright Copyright (c) 2021 勾股工作室
|
||||||
|
* @license https://opensource.org/licenses/GPL-3.0
|
||||||
|
* @link https://www.gougucms.com
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace app\user\model;
|
||||||
|
use think\Model;
|
||||||
|
class IndustryCate extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
@ -24,7 +24,7 @@
|
|||||||
<div id="depament"></div>
|
<div id="depament"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="body-table" style="margin-left:228px;">
|
<div class="body-table" style="margin-left:228px;">
|
||||||
<form class="layui-form gg-form-bar border-t border-x">
|
<form class="layui-form gg-form-bar border-t border-x" lay-filter="seachform">
|
||||||
<div class="layui-input-inline" style="width:136px">
|
<div class="layui-input-inline" style="width:136px">
|
||||||
<select name="status">
|
<select name="status">
|
||||||
<option value="">选择员工状态</option>
|
<option value="">选择员工状态</option>
|
||||||
@ -53,10 +53,10 @@
|
|||||||
<img src="{{d.thumb}}" width="30" height="30" />
|
<img src="{{d.thumb}}" width="30" height="30" />
|
||||||
</script>
|
</script>
|
||||||
<script type="text/html" id="toolbara">
|
<script type="text/html" id="toolbara">
|
||||||
<div class="layui-btn-container">
|
<div class="layui-btn-group">
|
||||||
<button class="layui-btn layui-btn-normal layui-btn-sm" lay-event="add"><i class="layui-icon"></i>添加员工</button>
|
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon"></i>添加员工</button>
|
||||||
<button class="layui-btn layui-btn-danger layui-btn-sm" lay-event="disable"><i class="layui-icon">ဆ</i>禁止登录</button>
|
<button class="layui-btn layui-btn-danger layui-btn-sm" lay-event="disable"><i class="layui-icon">ဆ</i>禁止登录</button>
|
||||||
<button class="layui-btn layui-btn-sm" lay-event="recovery"><i class="layui-icon"></i>恢复正常</button>
|
<button class="layui-btn layui-btn-warm layui-btn-sm" lay-event="recovery"><i class="layui-icon"></i>恢复正常</button>
|
||||||
<button class="layui-btn layui-btn-normal layui-btn-sm" lay-event="import"><i class="layui-icon"></i>批量导入</button>
|
<button class="layui-btn layui-btn-normal layui-btn-sm" lay-event="import"><i class="layui-icon"></i>批量导入</button>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
@ -185,7 +185,8 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
title: '员工列表',
|
title: '员工列表',
|
||||||
toolbar: '#toolbara',
|
toolbar: '#toolbara',
|
||||||
url: "/user/user/index", //数据接口
|
url: "/user/user/index", //数据接口
|
||||||
|
defaultToolbar:['filter', {title:'导出EXCEL',layEvent: 'LAYTABLE_EXCEL',icon: 'layui-icon-export'}],
|
||||||
page: true, //开启分页
|
page: true, //开启分页
|
||||||
limit: 20,
|
limit: 20,
|
||||||
cols: [
|
cols: [
|
||||||
@ -319,6 +320,19 @@
|
|||||||
table.on('toolbar(test)', function(obj){
|
table.on('toolbar(test)', function(obj){
|
||||||
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
||||||
var data = checkStatus.data;
|
var data = checkStatus.data;
|
||||||
|
console.log(obj.event);
|
||||||
|
if(obj.event === 'LAYTABLE_EXCEL'){
|
||||||
|
var formSelect = form.val('seachform');
|
||||||
|
formSelect.limit=99999;
|
||||||
|
$.ajax({
|
||||||
|
url: '/user/user/index',
|
||||||
|
data: formSelect,
|
||||||
|
success:function(res){
|
||||||
|
table.exportFile('test', res.data,'xls');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
tool.side("/user/user/add");
|
tool.side("/user/user/add");
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user