优化导出数据
This commit is contained in:
parent
91df3a5dfe
commit
8dd49b3300
@ -21,6 +21,7 @@
|
||||
layui.pageTable = table.render({
|
||||
elem: '#test'
|
||||
,toolbar: '#toolbarDemo'
|
||||
,defaultToolbar: false
|
||||
,title:'车辆类型列表'
|
||||
,url: "/home/cate/car_cate"
|
||||
,page: false
|
||||
|
@ -21,6 +21,7 @@
|
||||
layui.pageTable = table.render({
|
||||
elem: '#test'
|
||||
,toolbar: '#toolbarDemo'
|
||||
,defaultToolbar: false
|
||||
,title:'费用类型列表'
|
||||
,url: "/home/cate/cost_cate"
|
||||
,page: false
|
||||
|
@ -21,6 +21,7 @@
|
||||
layui.pageTable = table.render({
|
||||
elem: '#test'
|
||||
,toolbar: '#toolbarDemo'
|
||||
,defaultToolbar: false
|
||||
,title:'报销类别列表'
|
||||
,url: "/home/cate/expense_cate"
|
||||
,page: false
|
||||
|
@ -21,6 +21,7 @@
|
||||
layui.pageTable = table.render({
|
||||
elem: '#test'
|
||||
,toolbar: '#toolbarDemo'
|
||||
,defaultToolbar: false
|
||||
,title:'审批模块列表'
|
||||
,url: "/home/cate/flow_type"
|
||||
,page: false
|
||||
|
@ -21,6 +21,7 @@
|
||||
layui.pageTable = table.render({
|
||||
elem: '#test'
|
||||
,toolbar: '#toolbarDemo'
|
||||
,defaultToolbar: false
|
||||
,title:'工作类型列表'
|
||||
,url: "/home/cate/industry_cate"
|
||||
,page: false
|
||||
|
@ -21,6 +21,7 @@
|
||||
layui.pageTable = table.render({
|
||||
elem: '#test'
|
||||
,toolbar: '#toolbarDemo'
|
||||
,defaultToolbar: false
|
||||
,title:'印章类型列表'
|
||||
,url: "/home/cate/seal_cate"
|
||||
,page: false
|
||||
|
@ -21,6 +21,7 @@
|
||||
layui.pageTable = table.render({
|
||||
elem: '#test'
|
||||
,toolbar: '#toolbarDemo'
|
||||
,defaultToolbar: false
|
||||
,title:'工作类型列表'
|
||||
,url: "/home/cate/services_cate"
|
||||
,page: false
|
||||
|
@ -21,6 +21,7 @@
|
||||
layui.pageTable = table.render({
|
||||
elem: '#test'
|
||||
,toolbar: '#toolbarDemo'
|
||||
,defaultToolbar: false
|
||||
,title:'报销类别列表'
|
||||
,url: "/home/cate/subject"
|
||||
,page: false
|
||||
|
@ -21,6 +21,7 @@
|
||||
layui.pageTable = table.render({
|
||||
elem: '#test'
|
||||
,toolbar: '#toolbarDemo'
|
||||
,defaultToolbar: false
|
||||
,title:'工作类型列表'
|
||||
,url: "/home/cate/work_cate"
|
||||
,page: false
|
||||
|
@ -26,6 +26,7 @@
|
||||
elem: '#conf',
|
||||
title: '配置列表',
|
||||
toolbar: '#toolbarDemo',
|
||||
defaultToolbar: false,
|
||||
url: "/home/conf/index",
|
||||
cellMinWidth: 360,
|
||||
page: false, //开启分页
|
||||
|
@ -21,6 +21,7 @@
|
||||
elem: '#backup',
|
||||
title: '数据备份',
|
||||
toolbar: '#toolbarDemo',
|
||||
defaultToolbar: false,
|
||||
url: "/home/database/database", //数据接口
|
||||
page: false,
|
||||
cols: [
|
||||
|
@ -21,6 +21,7 @@
|
||||
layui.pageTable = table.render({
|
||||
elem: '#test'
|
||||
,toolbar: '#toolbarDemo'
|
||||
,defaultToolbar: false
|
||||
,title:'审批流程列表'
|
||||
,url: "/home/flow/index"
|
||||
,page: false //开启分页
|
||||
|
@ -31,6 +31,7 @@
|
||||
elem: '#test',
|
||||
title: '关键字列表',
|
||||
toolbar: '#toolbarDemo',
|
||||
defaultToolbar: false,
|
||||
url: "/home/keywords/index",
|
||||
page: true, //开启分页
|
||||
limit: 20,
|
||||
|
@ -25,6 +25,7 @@
|
||||
layui.pageTable = table.render({
|
||||
elem: '#role',
|
||||
toolbar: '#toolbarDemo',
|
||||
defaultToolbar: false,
|
||||
url: "/home/role/index", //数据接口
|
||||
page: false, //开启分页
|
||||
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>
|
||||
<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">
|
||||
<select name="status">
|
||||
<option value="">选择员工状态</option>
|
||||
@ -53,10 +53,10 @@
|
||||
<img src="{{d.thumb}}" width="30" height="30" />
|
||||
</script>
|
||||
<script type="text/html" id="toolbara">
|
||||
<div class="layui-btn-container">
|
||||
<button class="layui-btn layui-btn-normal layui-btn-sm" lay-event="add"><i class="layui-icon"></i>添加员工</button>
|
||||
<div class="layui-btn-group">
|
||||
<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-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>
|
||||
</div>
|
||||
</script>
|
||||
@ -185,7 +185,8 @@
|
||||
elem: '#test',
|
||||
title: '员工列表',
|
||||
toolbar: '#toolbara',
|
||||
url: "/user/user/index", //数据接口
|
||||
url: "/user/user/index", //数据接口
|
||||
defaultToolbar:['filter', {title:'导出EXCEL',layEvent: 'LAYTABLE_EXCEL',icon: 'layui-icon-export'}],
|
||||
page: true, //开启分页
|
||||
limit: 20,
|
||||
cols: [
|
||||
@ -319,6 +320,19 @@
|
||||
table.on('toolbar(test)', function(obj){
|
||||
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
||||
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') {
|
||||
tool.side("/user/user/add");
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user