数据库文件更新
This commit is contained in:
59
public/static/common/js/require-xlsx.js
Normal file
59
public/static/common/js/require-xlsx.js
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
require(['jquery', 'sheetjs'], function($, XLSX) {
|
||||||
|
|
||||||
|
// var wopts = { bookType: 'csv', bookSST: false, type: 'binary' };//ods格式
|
||||||
|
var wopts = { bookType: 'xlsx', bookSST: false, type: 'binary' };//这里的数据是用来定义导出的格式类型
|
||||||
|
// var wopts = { bookType: 'ods', bookSST: false, type: 'binary' };//ods格式
|
||||||
|
// var wopts = { bookType: 'xlsb', bookSST: false, type: 'binary' };//xlsb格式
|
||||||
|
// var wopts = { bookType: 'fods', bookSST: false, type: 'binary' };//fods格式
|
||||||
|
// var wopts = { bookType: 'biff2', bookSST: false, type: 'binary' };//xls格式
|
||||||
|
|
||||||
|
var xls = {
|
||||||
|
downloadExl: function (data, fileName) {
|
||||||
|
checkFileIn();
|
||||||
|
var wb = { SheetNames: ['Sheet1'], Sheets: {}, Props: {} };
|
||||||
|
wb.Sheets['Sheet1'] = XLSX.utils.json_to_sheet(data);//通过json_to_sheet转成单页(Sheet)数据
|
||||||
|
this.saveAs(new Blob([this.s2ab(XLSX.write(wb, wopts))], { type: "application/octet-stream" }), fileName + '.' + (wopts.bookType=="biff2"?"xls":wopts.bookType));
|
||||||
|
},
|
||||||
|
|
||||||
|
//如果使用 FileSaver.js 就不要同时使用以下函数
|
||||||
|
saveAs: function(obj, fileName) {
|
||||||
|
//当然可以自定义简单的下载文件实现方式
|
||||||
|
var tmpa = document.createElement("a");
|
||||||
|
tmpa.download = fileName || "下载";
|
||||||
|
//绑定a标签
|
||||||
|
tmpa.href = URL.createObjectURL(obj);
|
||||||
|
tmpa.click(); //模拟点击实现下载
|
||||||
|
setTimeout(function () { //延时释放
|
||||||
|
URL.revokeObjectURL(obj); //用URL.revokeObjectURL()来释放这个object URL
|
||||||
|
}, 100);
|
||||||
|
},
|
||||||
|
|
||||||
|
s2ab: function(s) {
|
||||||
|
if (typeof ArrayBuffer !== 'undefined') {
|
||||||
|
var buf = new ArrayBuffer(s.length);
|
||||||
|
var view = new Uint8Array(buf);
|
||||||
|
for (var i = 0; i != s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;
|
||||||
|
return buf;
|
||||||
|
} else {
|
||||||
|
var buf = new Array(s.length);
|
||||||
|
for (var i = 0; i != s.length; ++i) buf[i] = s.charCodeAt(i) & 0xFF;
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
checkFileIn = function(){
|
||||||
|
if($("script[src='/static/js/js-xlsx/xlsx.full.min.js']").length > 0){
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
var body = $("body");
|
||||||
|
var script = $("<script>");
|
||||||
|
$(script).attr('type','text/javascript');
|
||||||
|
$(script).attr('src','/static/js/js-xlsx/xlsx.full.min.js');
|
||||||
|
$(body).append(script);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.xls = xls;
|
||||||
|
return xls;
|
||||||
|
});
|
||||||
1505
public/static/plugins/sheetjs/cpexcel.js
Normal file
1505
public/static/plugins/sheetjs/cpexcel.js
Normal file
File diff suppressed because it is too large
Load Diff
8999
public/static/plugins/sheetjs/jszip.js
Normal file
8999
public/static/plugins/sheetjs/jszip.js
Normal file
File diff suppressed because it is too large
Load Diff
2
public/static/plugins/sheetjs/shim.min.js
vendored
Normal file
2
public/static/plugins/sheetjs/shim.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
17
public/static/plugins/sheetjs/xlsx.core.min.js
vendored
Normal file
17
public/static/plugins/sheetjs/xlsx.core.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
30544
public/static/plugins/sheetjs/xlsx.extendscript.js
Normal file
30544
public/static/plugins/sheetjs/xlsx.extendscript.js
Normal file
File diff suppressed because it is too large
Load Diff
23
public/static/plugins/sheetjs/xlsx.full.min.js
vendored
Normal file
23
public/static/plugins/sheetjs/xlsx.full.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
21388
public/static/plugins/sheetjs/xlsx.js
Normal file
21388
public/static/plugins/sheetjs/xlsx.js
Normal file
File diff suppressed because it is too large
Load Diff
14
public/static/plugins/sheetjs/xlsx.min.js
vendored
Normal file
14
public/static/plugins/sheetjs/xlsx.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
public/static/plugins/sheetjs/xlsx.mini.min.js
vendored
Normal file
7
public/static/plugins/sheetjs/xlsx.mini.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -448,6 +448,7 @@ CREATE TABLE `sent_member` (
|
|||||||
`nickname` char(16) NOT NULL DEFAULT '' COMMENT '昵称',
|
`nickname` char(16) NOT NULL DEFAULT '' COMMENT '昵称',
|
||||||
`email` varchar(100) DEFAULT NULL COMMENT '邮箱地址',
|
`email` varchar(100) DEFAULT NULL COMMENT '邮箱地址',
|
||||||
`mobile` varchar(20) DEFAULT NULL COMMENT '手机号码',
|
`mobile` varchar(20) DEFAULT NULL COMMENT '手机号码',
|
||||||
|
`avatar` varchar(200) DEFAULT NULL COMMENT '用户头像',
|
||||||
`sex` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '性别',
|
`sex` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '性别',
|
||||||
`department` int(11) NOT NULL DEFAULT '0' COMMENT '所属部门',
|
`department` int(11) NOT NULL DEFAULT '0' COMMENT '所属部门',
|
||||||
`birthday` date NOT NULL DEFAULT '1917-01-01' COMMENT '生日',
|
`birthday` date NOT NULL DEFAULT '1917-01-01' COMMENT '生日',
|
||||||
@@ -530,7 +531,7 @@ CREATE TABLE `sent_member_log` (
|
|||||||
`title` varchar(100) NOT NULL DEFAULT '' COMMENT '操作名称',
|
`title` varchar(100) NOT NULL DEFAULT '' COMMENT '操作名称',
|
||||||
`method` varchar(20) NOT NULL DEFAULT 'GET' COMMENT '操作类型',
|
`method` varchar(20) NOT NULL DEFAULT 'GET' COMMENT '操作类型',
|
||||||
`url` varchar(150) NOT NULL DEFAULT '' COMMENT '操作地址',
|
`url` varchar(150) NOT NULL DEFAULT '' COMMENT '操作地址',
|
||||||
`param` text DEFAULT '' COMMENT '操作参数',
|
`param` text COMMENT '操作参数',
|
||||||
`client_ip` varchar(30) NOT NULL DEFAULT '' COMMENT '客户端IP',
|
`client_ip` varchar(30) NOT NULL DEFAULT '' COMMENT '客户端IP',
|
||||||
`visite_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '访问时间',
|
`visite_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '访问时间',
|
||||||
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
|
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||||
|
|||||||
Reference in New Issue
Block a user