From 69b16c271110dfceb8b38e835dad0fdc0730a90b Mon Sep 17 00:00:00 2001
From: tqs <56479841@qq.com>
Date: 星期二, 05 十二月 2023 08:17:58 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/locSync/locSync.js | 39 +++++++++++++++++++++++++++++++++++++++
1 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/src/main/webapp/static/js/locSync/locSync.js b/src/main/webapp/static/js/locSync/locSync.js
index 00e4f42..e6bf0ab 100644
--- a/src/main/webapp/static/js/locSync/locSync.js
+++ b/src/main/webapp/static/js/locSync/locSync.js
@@ -54,6 +54,44 @@
// 鐩戝惉澶村伐鍏锋爮浜嬩欢
table.on('toolbar(locSum)', function (obj) {
switch (obj.event) {
+ case 'otherExportData':
+ layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){
+ var titles=[];
+ var fields=[];
+ obj.config.cols[0].map(function (col) {
+ if (col.type === 'normal' && col.hide === false && col.toolbar == null) {
+ titles.push(col.title);
+ fields.push(col.field);
+ }
+ });
+ var exportData = {};
+ $.each($('#search-box [name]').serializeArray(), function() {
+ exportData[this.name] = this.value;
+ });
+ var param = {
+ 'pakin': exportData,
+ 'fields': fields
+ };
+ $.ajax({
+ url: baseUrl+"/locsync/export/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: JSON.stringify(param),
+ dataType:'json',
+ contentType:'application/json;charset=UTF-8',
+ method: 'POST',
+ success: function (res) {
+ layer.closeAll();
+ if (res.code === 200) {
+ table.exportFile(titles,res.data,'xls');
+ } else if (res.code === 403) {
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg, {icon: 2})
+ }
+ }
+ });
+ });
+ break;
case 'btnSync':
$.ajax({
url: baseUrl + "/locSync/syncLocWrkCount",
@@ -133,6 +171,7 @@
}
});
break;
+
default:
break;
}
--
Gitblit v1.9.1