@indfnd/common 1.0.116 → 1.0.118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/ind-common.es.js +718 -404
- package/dist/ind-common.umd.cjs +92 -92
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
- package/src/styles/components/table.less +3 -0
package/dist/ind-common.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Button as Button$1, ButtonGroup as ButtonGroup$1, Input, Drawer as Drawer$1, Dropdown as Dropdown$1, Modal as Modal$1, Form, FormItem, Select as Select$1, Option, Row, Col, Menu, MenuItem, Submenu, Badge, DropdownMenu, DropdownItem, Tag, Header, Layout, Content, Spin, Poptip as Poptip$1, CheckboxGroup, Checkbox, RadioGroup, Radio, Card, Message, LoadingBar } from "view-design";
|
|
2
|
-
import { isNil, putOssFileApi, formatDate as formatDate$1, useConfig, getQuarterNum, formatQuarter, str2Date, isDate, isArray, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, getPreviewUrlApi, isFunction, isString, uuid, exportJsonToExcel as exportJsonToExcel$1, importJsonFromExcel, on, off, deleteMenuHistoryApi, deleteMenuCollectApi, getMenuHistoryApi, getMenuCollectApi, getPermissionCache, getLocalStorage,
|
|
2
|
+
import { isNil, getSessionStorage, putOssFileApi, formatDate as formatDate$1, useConfig, getQuarterNum, formatQuarter, str2Date, isDate, isArray, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, getPreviewUrlApi, isFunction, isString, uuid, exportJsonToExcel as exportJsonToExcel$1, importJsonFromExcel, on, off, deleteMenuHistoryApi, deleteMenuCollectApi, getMenuHistoryApi, getMenuCollectApi, getPermissionCache, getLocalStorage, listItemTreeApi, getPriceInfo, MIME_TYPE, base64ToBlob, isEqual, getCaptchaURL, guid, setLocalStorage, removeLocalStorage, clearSessionStorage, cryptor, getToken, putOssFileUrl, getOssFileUrl, responseInterceptors, listComTreeApi, listUserTreeApi, UC_ENUM, config as config$1, setToken, loginApi, clearUserInfoCache, clearPermissionCache, logoutApi, getUserInfoCache, getUserInfoApi, setUserInfoCache, setSessionStorage, getAppListApi, getPermissionApi, setPermissionCache, menuHistoryApi, addMenuCollectApi, removeMenuCollectApi, getIndexDescCache, listIndexDescApi, setIndexDescCache } from "@indfnd/utils";
|
|
3
3
|
import Vue$1 from "vue";
|
|
4
4
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
5
5
|
function getAugmentedNamespace(n) {
|
|
@@ -5460,7 +5460,7 @@ var lodash = { exports: {} };
|
|
|
5460
5460
|
})(lodash, lodash.exports);
|
|
5461
5461
|
var _ = lodash.exports;
|
|
5462
5462
|
const name$1 = "@indfnd/common";
|
|
5463
|
-
const version = "1.0.
|
|
5463
|
+
const version = "1.0.117";
|
|
5464
5464
|
const author = "huxuetong";
|
|
5465
5465
|
const publishConfig = {
|
|
5466
5466
|
registry: "https://registry.npmjs.org/"
|
|
@@ -42989,6 +42989,369 @@ function recursive_children(paramData, result) {
|
|
|
42989
42989
|
}
|
|
42990
42990
|
}
|
|
42991
42991
|
}
|
|
42992
|
+
var FileSaver_min = { exports: {} };
|
|
42993
|
+
(function(module2, exports2) {
|
|
42994
|
+
(function(a, b) {
|
|
42995
|
+
b();
|
|
42996
|
+
})(commonjsGlobal, function() {
|
|
42997
|
+
function b(a2, b2) {
|
|
42998
|
+
return "undefined" == typeof b2 ? b2 = { autoBom: false } : "object" != typeof b2 && (console.warn("Deprecated: Expected third argument to be a object"), b2 = { autoBom: !b2 }), b2.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a2.type) ? new Blob(["\uFEFF", a2], { type: a2.type }) : a2;
|
|
42999
|
+
}
|
|
43000
|
+
function c(a2, b2, c2) {
|
|
43001
|
+
var d2 = new XMLHttpRequest();
|
|
43002
|
+
d2.open("GET", a2), d2.responseType = "blob", d2.onload = function() {
|
|
43003
|
+
g(d2.response, b2, c2);
|
|
43004
|
+
}, d2.onerror = function() {
|
|
43005
|
+
console.error("could not download file");
|
|
43006
|
+
}, d2.send();
|
|
43007
|
+
}
|
|
43008
|
+
function d(a2) {
|
|
43009
|
+
var b2 = new XMLHttpRequest();
|
|
43010
|
+
b2.open("HEAD", a2, false);
|
|
43011
|
+
try {
|
|
43012
|
+
b2.send();
|
|
43013
|
+
} catch (a3) {
|
|
43014
|
+
}
|
|
43015
|
+
return 200 <= b2.status && 299 >= b2.status;
|
|
43016
|
+
}
|
|
43017
|
+
function e(a2) {
|
|
43018
|
+
try {
|
|
43019
|
+
a2.dispatchEvent(new MouseEvent("click"));
|
|
43020
|
+
} catch (c2) {
|
|
43021
|
+
var b2 = document.createEvent("MouseEvents");
|
|
43022
|
+
b2.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null), a2.dispatchEvent(b2);
|
|
43023
|
+
}
|
|
43024
|
+
}
|
|
43025
|
+
var f = "object" == typeof window && window.window === window ? window : "object" == typeof self && self.self === self ? self : "object" == typeof commonjsGlobal && commonjsGlobal.global === commonjsGlobal ? commonjsGlobal : void 0, a = f.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), g = f.saveAs || ("object" != typeof window || window !== f ? function() {
|
|
43026
|
+
} : "download" in HTMLAnchorElement.prototype && !a ? function(b2, g2, h) {
|
|
43027
|
+
var i = f.URL || f.webkitURL, j = document.createElement("a");
|
|
43028
|
+
g2 = g2 || b2.name || "download", j.download = g2, j.rel = "noopener", "string" == typeof b2 ? (j.href = b2, j.origin === location.origin ? e(j) : d(j.href) ? c(b2, g2, h) : e(j, j.target = "_blank")) : (j.href = i.createObjectURL(b2), setTimeout(function() {
|
|
43029
|
+
i.revokeObjectURL(j.href);
|
|
43030
|
+
}, 4e4), setTimeout(function() {
|
|
43031
|
+
e(j);
|
|
43032
|
+
}, 0));
|
|
43033
|
+
} : "msSaveOrOpenBlob" in navigator ? function(f2, g2, h) {
|
|
43034
|
+
if (g2 = g2 || f2.name || "download", "string" != typeof f2)
|
|
43035
|
+
navigator.msSaveOrOpenBlob(b(f2, h), g2);
|
|
43036
|
+
else if (d(f2))
|
|
43037
|
+
c(f2, g2, h);
|
|
43038
|
+
else {
|
|
43039
|
+
var i = document.createElement("a");
|
|
43040
|
+
i.href = f2, i.target = "_blank", setTimeout(function() {
|
|
43041
|
+
e(i);
|
|
43042
|
+
});
|
|
43043
|
+
}
|
|
43044
|
+
} : function(b2, d2, e2, g2) {
|
|
43045
|
+
if (g2 = g2 || open("", "_blank"), g2 && (g2.document.title = g2.document.body.innerText = "downloading..."), "string" == typeof b2)
|
|
43046
|
+
return c(b2, d2, e2);
|
|
43047
|
+
var h = "application/octet-stream" === b2.type, i = /constructor/i.test(f.HTMLElement) || f.safari, j = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
43048
|
+
if ((j || h && i || a) && "undefined" != typeof FileReader) {
|
|
43049
|
+
var k = new FileReader();
|
|
43050
|
+
k.onloadend = function() {
|
|
43051
|
+
var a2 = k.result;
|
|
43052
|
+
a2 = j ? a2 : a2.replace(/^data:[^;]*;/, "data:attachment/file;"), g2 ? g2.location.href = a2 : location = a2, g2 = null;
|
|
43053
|
+
}, k.readAsDataURL(b2);
|
|
43054
|
+
} else {
|
|
43055
|
+
var l = f.URL || f.webkitURL, m = l.createObjectURL(b2);
|
|
43056
|
+
g2 ? g2.location = m : location.href = m, g2 = null, setTimeout(function() {
|
|
43057
|
+
l.revokeObjectURL(m);
|
|
43058
|
+
}, 4e4);
|
|
43059
|
+
}
|
|
43060
|
+
});
|
|
43061
|
+
f.saveAs = g.saveAs = g, module2.exports = g;
|
|
43062
|
+
});
|
|
43063
|
+
})(FileSaver_min);
|
|
43064
|
+
var dayjs_min = { exports: {} };
|
|
43065
|
+
(function(module2, exports2) {
|
|
43066
|
+
!function(t2, e) {
|
|
43067
|
+
module2.exports = e();
|
|
43068
|
+
}(commonjsGlobal, function() {
|
|
43069
|
+
var t2 = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $2 = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
|
|
43070
|
+
var e2 = ["th", "st", "nd", "rd"], n2 = t3 % 100;
|
|
43071
|
+
return "[" + t3 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
|
|
43072
|
+
} }, m = function(t3, e2, n2) {
|
|
43073
|
+
var r2 = String(t3);
|
|
43074
|
+
return !r2 || r2.length >= e2 ? t3 : "" + Array(e2 + 1 - r2.length).join(n2) + t3;
|
|
43075
|
+
}, v = { s: m, z: function(t3) {
|
|
43076
|
+
var e2 = -t3.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
|
|
43077
|
+
return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
|
|
43078
|
+
}, m: function t3(e2, n2) {
|
|
43079
|
+
if (e2.date() < n2.date())
|
|
43080
|
+
return -t3(n2, e2);
|
|
43081
|
+
var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c);
|
|
43082
|
+
return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
|
|
43083
|
+
}, a: function(t3) {
|
|
43084
|
+
return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
|
|
43085
|
+
}, p: function(t3) {
|
|
43086
|
+
return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
|
|
43087
|
+
}, u: function(t3) {
|
|
43088
|
+
return void 0 === t3;
|
|
43089
|
+
} }, g = "en", D = {};
|
|
43090
|
+
D[g] = M;
|
|
43091
|
+
var p = "$isDayjsObject", S = function(t3) {
|
|
43092
|
+
return t3 instanceof _2 || !(!t3 || !t3[p]);
|
|
43093
|
+
}, w = function t3(e2, n2, r2) {
|
|
43094
|
+
var i2;
|
|
43095
|
+
if (!e2)
|
|
43096
|
+
return g;
|
|
43097
|
+
if ("string" == typeof e2) {
|
|
43098
|
+
var s2 = e2.toLowerCase();
|
|
43099
|
+
D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
|
|
43100
|
+
var u2 = e2.split("-");
|
|
43101
|
+
if (!i2 && u2.length > 1)
|
|
43102
|
+
return t3(u2[0]);
|
|
43103
|
+
} else {
|
|
43104
|
+
var a2 = e2.name;
|
|
43105
|
+
D[a2] = e2, i2 = a2;
|
|
43106
|
+
}
|
|
43107
|
+
return !r2 && i2 && (g = i2), i2 || !r2 && g;
|
|
43108
|
+
}, O = function(t3, e2) {
|
|
43109
|
+
if (S(t3))
|
|
43110
|
+
return t3.clone();
|
|
43111
|
+
var n2 = "object" == typeof e2 ? e2 : {};
|
|
43112
|
+
return n2.date = t3, n2.args = arguments, new _2(n2);
|
|
43113
|
+
}, b = v;
|
|
43114
|
+
b.l = w, b.i = S, b.w = function(t3, e2) {
|
|
43115
|
+
return O(t3, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
|
|
43116
|
+
};
|
|
43117
|
+
var _2 = function() {
|
|
43118
|
+
function M2(t3) {
|
|
43119
|
+
this.$L = w(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p] = true;
|
|
43120
|
+
}
|
|
43121
|
+
var m2 = M2.prototype;
|
|
43122
|
+
return m2.parse = function(t3) {
|
|
43123
|
+
this.$d = function(t4) {
|
|
43124
|
+
var e2 = t4.date, n2 = t4.utc;
|
|
43125
|
+
if (null === e2)
|
|
43126
|
+
return new Date(NaN);
|
|
43127
|
+
if (b.u(e2))
|
|
43128
|
+
return new Date();
|
|
43129
|
+
if (e2 instanceof Date)
|
|
43130
|
+
return new Date(e2);
|
|
43131
|
+
if ("string" == typeof e2 && !/Z$/i.test(e2)) {
|
|
43132
|
+
var r2 = e2.match($2);
|
|
43133
|
+
if (r2) {
|
|
43134
|
+
var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
|
|
43135
|
+
return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
|
|
43136
|
+
}
|
|
43137
|
+
}
|
|
43138
|
+
return new Date(e2);
|
|
43139
|
+
}(t3), this.init();
|
|
43140
|
+
}, m2.init = function() {
|
|
43141
|
+
var t3 = this.$d;
|
|
43142
|
+
this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
|
|
43143
|
+
}, m2.$utils = function() {
|
|
43144
|
+
return b;
|
|
43145
|
+
}, m2.isValid = function() {
|
|
43146
|
+
return !(this.$d.toString() === l);
|
|
43147
|
+
}, m2.isSame = function(t3, e2) {
|
|
43148
|
+
var n2 = O(t3);
|
|
43149
|
+
return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
|
|
43150
|
+
}, m2.isAfter = function(t3, e2) {
|
|
43151
|
+
return O(t3) < this.startOf(e2);
|
|
43152
|
+
}, m2.isBefore = function(t3, e2) {
|
|
43153
|
+
return this.endOf(e2) < O(t3);
|
|
43154
|
+
}, m2.$g = function(t3, e2, n2) {
|
|
43155
|
+
return b.u(t3) ? this[e2] : this.set(n2, t3);
|
|
43156
|
+
}, m2.unix = function() {
|
|
43157
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
43158
|
+
}, m2.valueOf = function() {
|
|
43159
|
+
return this.$d.getTime();
|
|
43160
|
+
}, m2.startOf = function(t3, e2) {
|
|
43161
|
+
var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t3), l2 = function(t4, e3) {
|
|
43162
|
+
var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t4) : new Date(n2.$y, e3, t4), n2);
|
|
43163
|
+
return r2 ? i2 : i2.endOf(a);
|
|
43164
|
+
}, $3 = function(t4, e3) {
|
|
43165
|
+
return b.w(n2.toDate()[t4].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
|
|
43166
|
+
}, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
|
|
43167
|
+
switch (f2) {
|
|
43168
|
+
case h:
|
|
43169
|
+
return r2 ? l2(1, 0) : l2(31, 11);
|
|
43170
|
+
case c:
|
|
43171
|
+
return r2 ? l2(1, M3) : l2(0, M3 + 1);
|
|
43172
|
+
case o:
|
|
43173
|
+
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
|
|
43174
|
+
return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
|
|
43175
|
+
case a:
|
|
43176
|
+
case d:
|
|
43177
|
+
return $3(v2 + "Hours", 0);
|
|
43178
|
+
case u:
|
|
43179
|
+
return $3(v2 + "Minutes", 1);
|
|
43180
|
+
case s:
|
|
43181
|
+
return $3(v2 + "Seconds", 2);
|
|
43182
|
+
case i:
|
|
43183
|
+
return $3(v2 + "Milliseconds", 3);
|
|
43184
|
+
default:
|
|
43185
|
+
return this.clone();
|
|
43186
|
+
}
|
|
43187
|
+
}, m2.endOf = function(t3) {
|
|
43188
|
+
return this.startOf(t3, false);
|
|
43189
|
+
}, m2.$set = function(t3, e2) {
|
|
43190
|
+
var n2, o2 = b.p(t3), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $3 = o2 === a ? this.$D + (e2 - this.$W) : e2;
|
|
43191
|
+
if (o2 === c || o2 === h) {
|
|
43192
|
+
var y2 = this.clone().set(d, 1);
|
|
43193
|
+
y2.$d[l2]($3), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
|
|
43194
|
+
} else
|
|
43195
|
+
l2 && this.$d[l2]($3);
|
|
43196
|
+
return this.init(), this;
|
|
43197
|
+
}, m2.set = function(t3, e2) {
|
|
43198
|
+
return this.clone().$set(t3, e2);
|
|
43199
|
+
}, m2.get = function(t3) {
|
|
43200
|
+
return this[b.p(t3)]();
|
|
43201
|
+
}, m2.add = function(r2, f2) {
|
|
43202
|
+
var d2, l2 = this;
|
|
43203
|
+
r2 = Number(r2);
|
|
43204
|
+
var $3 = b.p(f2), y2 = function(t3) {
|
|
43205
|
+
var e2 = O(l2);
|
|
43206
|
+
return b.w(e2.date(e2.date() + Math.round(t3 * r2)), l2);
|
|
43207
|
+
};
|
|
43208
|
+
if ($3 === c)
|
|
43209
|
+
return this.set(c, this.$M + r2);
|
|
43210
|
+
if ($3 === h)
|
|
43211
|
+
return this.set(h, this.$y + r2);
|
|
43212
|
+
if ($3 === a)
|
|
43213
|
+
return y2(1);
|
|
43214
|
+
if ($3 === o)
|
|
43215
|
+
return y2(7);
|
|
43216
|
+
var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t2, d2)[$3] || 1, m3 = this.$d.getTime() + r2 * M3;
|
|
43217
|
+
return b.w(m3, this);
|
|
43218
|
+
}, m2.subtract = function(t3, e2) {
|
|
43219
|
+
return this.add(-1 * t3, e2);
|
|
43220
|
+
}, m2.format = function(t3) {
|
|
43221
|
+
var e2 = this, n2 = this.$locale();
|
|
43222
|
+
if (!this.isValid())
|
|
43223
|
+
return n2.invalidDate || l;
|
|
43224
|
+
var r2 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t4, n3, i3, s3) {
|
|
43225
|
+
return t4 && (t4[n3] || t4(e2, r2)) || i3[n3].slice(0, s3);
|
|
43226
|
+
}, d2 = function(t4) {
|
|
43227
|
+
return b.s(s2 % 12 || 12, t4, "0");
|
|
43228
|
+
}, $3 = f2 || function(t4, e3, n3) {
|
|
43229
|
+
var r3 = t4 < 12 ? "AM" : "PM";
|
|
43230
|
+
return n3 ? r3.toLowerCase() : r3;
|
|
43231
|
+
};
|
|
43232
|
+
return r2.replace(y, function(t4, r3) {
|
|
43233
|
+
return r3 || function(t5) {
|
|
43234
|
+
switch (t5) {
|
|
43235
|
+
case "YY":
|
|
43236
|
+
return String(e2.$y).slice(-2);
|
|
43237
|
+
case "YYYY":
|
|
43238
|
+
return b.s(e2.$y, 4, "0");
|
|
43239
|
+
case "M":
|
|
43240
|
+
return a2 + 1;
|
|
43241
|
+
case "MM":
|
|
43242
|
+
return b.s(a2 + 1, 2, "0");
|
|
43243
|
+
case "MMM":
|
|
43244
|
+
return h2(n2.monthsShort, a2, c2, 3);
|
|
43245
|
+
case "MMMM":
|
|
43246
|
+
return h2(c2, a2);
|
|
43247
|
+
case "D":
|
|
43248
|
+
return e2.$D;
|
|
43249
|
+
case "DD":
|
|
43250
|
+
return b.s(e2.$D, 2, "0");
|
|
43251
|
+
case "d":
|
|
43252
|
+
return String(e2.$W);
|
|
43253
|
+
case "dd":
|
|
43254
|
+
return h2(n2.weekdaysMin, e2.$W, o2, 2);
|
|
43255
|
+
case "ddd":
|
|
43256
|
+
return h2(n2.weekdaysShort, e2.$W, o2, 3);
|
|
43257
|
+
case "dddd":
|
|
43258
|
+
return o2[e2.$W];
|
|
43259
|
+
case "H":
|
|
43260
|
+
return String(s2);
|
|
43261
|
+
case "HH":
|
|
43262
|
+
return b.s(s2, 2, "0");
|
|
43263
|
+
case "h":
|
|
43264
|
+
return d2(1);
|
|
43265
|
+
case "hh":
|
|
43266
|
+
return d2(2);
|
|
43267
|
+
case "a":
|
|
43268
|
+
return $3(s2, u2, true);
|
|
43269
|
+
case "A":
|
|
43270
|
+
return $3(s2, u2, false);
|
|
43271
|
+
case "m":
|
|
43272
|
+
return String(u2);
|
|
43273
|
+
case "mm":
|
|
43274
|
+
return b.s(u2, 2, "0");
|
|
43275
|
+
case "s":
|
|
43276
|
+
return String(e2.$s);
|
|
43277
|
+
case "ss":
|
|
43278
|
+
return b.s(e2.$s, 2, "0");
|
|
43279
|
+
case "SSS":
|
|
43280
|
+
return b.s(e2.$ms, 3, "0");
|
|
43281
|
+
case "Z":
|
|
43282
|
+
return i2;
|
|
43283
|
+
}
|
|
43284
|
+
return null;
|
|
43285
|
+
}(t4) || i2.replace(":", "");
|
|
43286
|
+
});
|
|
43287
|
+
}, m2.utcOffset = function() {
|
|
43288
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
43289
|
+
}, m2.diff = function(r2, d2, l2) {
|
|
43290
|
+
var $3, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
|
|
43291
|
+
return b.m(y2, m3);
|
|
43292
|
+
};
|
|
43293
|
+
switch (M3) {
|
|
43294
|
+
case h:
|
|
43295
|
+
$3 = D2() / 12;
|
|
43296
|
+
break;
|
|
43297
|
+
case c:
|
|
43298
|
+
$3 = D2();
|
|
43299
|
+
break;
|
|
43300
|
+
case f:
|
|
43301
|
+
$3 = D2() / 3;
|
|
43302
|
+
break;
|
|
43303
|
+
case o:
|
|
43304
|
+
$3 = (g2 - v2) / 6048e5;
|
|
43305
|
+
break;
|
|
43306
|
+
case a:
|
|
43307
|
+
$3 = (g2 - v2) / 864e5;
|
|
43308
|
+
break;
|
|
43309
|
+
case u:
|
|
43310
|
+
$3 = g2 / n;
|
|
43311
|
+
break;
|
|
43312
|
+
case s:
|
|
43313
|
+
$3 = g2 / e;
|
|
43314
|
+
break;
|
|
43315
|
+
case i:
|
|
43316
|
+
$3 = g2 / t2;
|
|
43317
|
+
break;
|
|
43318
|
+
default:
|
|
43319
|
+
$3 = g2;
|
|
43320
|
+
}
|
|
43321
|
+
return l2 ? $3 : b.a($3);
|
|
43322
|
+
}, m2.daysInMonth = function() {
|
|
43323
|
+
return this.endOf(c).$D;
|
|
43324
|
+
}, m2.$locale = function() {
|
|
43325
|
+
return D[this.$L];
|
|
43326
|
+
}, m2.locale = function(t3, e2) {
|
|
43327
|
+
if (!t3)
|
|
43328
|
+
return this.$L;
|
|
43329
|
+
var n2 = this.clone(), r2 = w(t3, e2, true);
|
|
43330
|
+
return r2 && (n2.$L = r2), n2;
|
|
43331
|
+
}, m2.clone = function() {
|
|
43332
|
+
return b.w(this.$d, this);
|
|
43333
|
+
}, m2.toDate = function() {
|
|
43334
|
+
return new Date(this.valueOf());
|
|
43335
|
+
}, m2.toJSON = function() {
|
|
43336
|
+
return this.isValid() ? this.toISOString() : null;
|
|
43337
|
+
}, m2.toISOString = function() {
|
|
43338
|
+
return this.$d.toISOString();
|
|
43339
|
+
}, m2.toString = function() {
|
|
43340
|
+
return this.$d.toUTCString();
|
|
43341
|
+
}, M2;
|
|
43342
|
+
}(), k = _2.prototype;
|
|
43343
|
+
return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t3) {
|
|
43344
|
+
k[t3[1]] = function(e2) {
|
|
43345
|
+
return this.$g(e2, t3[0], t3[1]);
|
|
43346
|
+
};
|
|
43347
|
+
}), O.extend = function(t3, e2) {
|
|
43348
|
+
return t3.$i || (t3(e2, _2, O), t3.$i = true), O;
|
|
43349
|
+
}, O.locale = w, O.isDayjs = S, O.unix = function(t3) {
|
|
43350
|
+
return O(1e3 * t3);
|
|
43351
|
+
}, O.en = D[g], O.Ls = D, O.p = {}, O;
|
|
43352
|
+
});
|
|
43353
|
+
})(dayjs_min);
|
|
43354
|
+
var dayjs = dayjs_min.exports;
|
|
42992
43355
|
const titleStyle = {
|
|
42993
43356
|
bold: true,
|
|
42994
43357
|
fontSize: "14",
|
|
@@ -43346,127 +43709,339 @@ function initRowSpanInfosNew(options) {
|
|
|
43346
43709
|
}
|
|
43347
43710
|
}
|
|
43348
43711
|
function exportJsonToExcel(excelData) {
|
|
43349
|
-
|
|
43350
|
-
|
|
43351
|
-
|
|
43352
|
-
|
|
43353
|
-
|
|
43354
|
-
|
|
43355
|
-
|
|
43356
|
-
|
|
43357
|
-
|
|
43358
|
-
|
|
43359
|
-
|
|
43360
|
-
|
|
43361
|
-
|
|
43362
|
-
|
|
43363
|
-
var
|
|
43712
|
+
try {
|
|
43713
|
+
if (!excelData || !excelData.title) {
|
|
43714
|
+
throw new Error("\u5BFC\u51FAExcel\u5931\u8D25: \u7F3A\u5C11\u5FC5\u8981\u7684\u5BFC\u51FA\u6570\u636E");
|
|
43715
|
+
}
|
|
43716
|
+
var calcExportDatas = getAgColumnTitleAndData(excelData);
|
|
43717
|
+
var title = excelData.title;
|
|
43718
|
+
var titleDeepth = calcExportDatas.deepth;
|
|
43719
|
+
var columnAlign = excelData.columnAlign || calcExportDatas.columnAlign;
|
|
43720
|
+
var columnType = excelData.columnType || calcExportDatas.columnType;
|
|
43721
|
+
var columnTitle = calcExportDatas.columnTitle;
|
|
43722
|
+
var columnWidth = excelData.columnWidth || calcExportDatas.columnWidth;
|
|
43723
|
+
var columnCount = columnAlign.length;
|
|
43724
|
+
var paramLeft = excelData.paramLeft;
|
|
43725
|
+
var paramRight = excelData.paramRight;
|
|
43726
|
+
var jsonData = calcExportDatas.exportData;
|
|
43727
|
+
var numberFormat = excelData.numberFormat || calcExportDatas.numberFormat;
|
|
43728
|
+
const workbook = new ExcelJS.Workbook();
|
|
43729
|
+
const worksheet = workbook.addWorksheet("Sheet1");
|
|
43364
43730
|
for (var i = 0; i < columnCount; i++) {
|
|
43365
|
-
|
|
43731
|
+
worksheet.getColumn(i + 1).width = columnWidth[i] == 0 ? 10 : columnWidth[i];
|
|
43366
43732
|
}
|
|
43367
|
-
|
|
43368
|
-
|
|
43369
|
-
|
|
43370
|
-
|
|
43371
|
-
|
|
43733
|
+
const titleStyle2 = {
|
|
43734
|
+
font: { name: "\u5B8B\u4F53", size: 16, bold: true },
|
|
43735
|
+
alignment: { vertical: "middle", horizontal: "center" }
|
|
43736
|
+
};
|
|
43737
|
+
const paramLeftStyle2 = {
|
|
43738
|
+
font: { name: "\u5B8B\u4F53", size: 10 },
|
|
43739
|
+
alignment: { vertical: "middle", horizontal: "left" }
|
|
43740
|
+
};
|
|
43741
|
+
const paramRightStyle2 = {
|
|
43742
|
+
font: { name: "\u5B8B\u4F53", size: 10 },
|
|
43743
|
+
alignment: { vertical: "middle", horizontal: "right" }
|
|
43744
|
+
};
|
|
43745
|
+
const columnTitleStyle2 = {
|
|
43746
|
+
font: { name: "\u5B8B\u4F53", size: 10, bold: true },
|
|
43747
|
+
alignment: { vertical: "middle", horizontal: "center" },
|
|
43748
|
+
border: {
|
|
43749
|
+
top: { style: "thin" },
|
|
43750
|
+
left: { style: "thin" },
|
|
43751
|
+
bottom: { style: "thin" },
|
|
43752
|
+
right: { style: "thin" }
|
|
43753
|
+
},
|
|
43754
|
+
fill: {
|
|
43755
|
+
type: "pattern",
|
|
43756
|
+
pattern: "solid",
|
|
43757
|
+
fgColor: { argb: "bdc3c7" }
|
|
43758
|
+
}
|
|
43759
|
+
};
|
|
43760
|
+
const dataCellStyle2 = {
|
|
43761
|
+
font: { name: "\u5B8B\u4F53", size: 10 },
|
|
43762
|
+
alignment: { vertical: "middle" },
|
|
43763
|
+
border: {
|
|
43764
|
+
top: { style: "thin" },
|
|
43765
|
+
left: { style: "thin" },
|
|
43766
|
+
bottom: { style: "thin" },
|
|
43767
|
+
right: { style: "thin" }
|
|
43768
|
+
}
|
|
43769
|
+
};
|
|
43770
|
+
var titleHeight2 = 30;
|
|
43771
|
+
var paramHeight2 = 25;
|
|
43772
|
+
var columnTitleHeight2 = 25;
|
|
43773
|
+
var dataRowHeight2 = 22;
|
|
43774
|
+
const titleRow = worksheet.getRow(1);
|
|
43775
|
+
titleRow.height = titleHeight2;
|
|
43776
|
+
titleRow.getCell(1).value = title;
|
|
43777
|
+
titleRow.getCell(1).style = titleStyle2;
|
|
43778
|
+
worksheet.mergeCells(1, 1, 1, columnCount);
|
|
43372
43779
|
var rowsNow = 2;
|
|
43373
43780
|
if (!!excelData.paramLeft || !!excelData.paramRight) {
|
|
43374
|
-
|
|
43375
|
-
|
|
43376
|
-
|
|
43377
|
-
|
|
43378
|
-
|
|
43379
|
-
|
|
43380
|
-
|
|
43381
|
-
|
|
43382
|
-
sheet.row(2).height(paramHeight);
|
|
43781
|
+
const paramRow = worksheet.getRow(2);
|
|
43782
|
+
paramRow.height = paramHeight2;
|
|
43783
|
+
paramRow.getCell(1).value = paramLeft || "";
|
|
43784
|
+
paramRow.getCell(1).style = paramLeftStyle2;
|
|
43785
|
+
worksheet.mergeCells(2, 1, 2, Math.round(columnCount / 2));
|
|
43786
|
+
paramRow.getCell(Math.round(columnCount / 2) + 1).value = paramRight || "";
|
|
43787
|
+
paramRow.getCell(Math.round(columnCount / 2) + 1).style = paramRightStyle2;
|
|
43788
|
+
worksheet.mergeCells(2, Math.round(columnCount / 2) + 1, 2, columnCount);
|
|
43383
43789
|
rowsNow += 1;
|
|
43384
43790
|
}
|
|
43385
43791
|
columnTitle.forEach((d) => {
|
|
43386
|
-
|
|
43387
|
-
|
|
43388
|
-
|
|
43389
|
-
|
|
43390
|
-
|
|
43391
|
-
|
|
43392
|
-
);
|
|
43393
|
-
|
|
43394
|
-
|
|
43395
|
-
columnTitleRange.cell(0, 0).value((_a = d.text) == null ? void 0 : _a.replace(/<br\/>/g, ""));
|
|
43792
|
+
const srow = d.srow + rowsNow - 1;
|
|
43793
|
+
const scol = d.scol;
|
|
43794
|
+
const erow = d.erow + rowsNow - 1;
|
|
43795
|
+
const ecol = d.ecol;
|
|
43796
|
+
worksheet.mergeCells(srow, scol, erow, ecol);
|
|
43797
|
+
const cell = worksheet.getCell(srow, scol);
|
|
43798
|
+
cell.value = d.text && d.text.replace(/<br\/>/g, "");
|
|
43799
|
+
cell.style = columnTitleStyle2;
|
|
43800
|
+
applyBorderToMergedCell(worksheet, srow, scol, erow, ecol, columnTitleStyle2.border);
|
|
43396
43801
|
});
|
|
43397
43802
|
for (let i2 = 0; i2 < titleDeepth; i2++) {
|
|
43398
|
-
|
|
43803
|
+
worksheet.getRow(rowsNow + i2).height = columnTitleHeight2;
|
|
43399
43804
|
}
|
|
43400
43805
|
rowsNow += titleDeepth;
|
|
43806
|
+
const mergedCells = /* @__PURE__ */ new Set();
|
|
43807
|
+
const columnsCalc = calcExportDatas.columnsCalc;
|
|
43401
43808
|
for (var i = 0; i < jsonData.length; i++) {
|
|
43402
43809
|
var lineData = jsonData[i];
|
|
43810
|
+
const tableData = excelData.datas[i];
|
|
43403
43811
|
for (var j = 0; j < lineData.length; j++) {
|
|
43404
|
-
|
|
43405
|
-
|
|
43406
|
-
|
|
43407
|
-
|
|
43408
|
-
|
|
43409
|
-
|
|
43410
|
-
|
|
43411
|
-
|
|
43412
|
-
|
|
43413
|
-
|
|
43414
|
-
|
|
43415
|
-
|
|
43416
|
-
|
|
43417
|
-
|
|
43812
|
+
try {
|
|
43813
|
+
const rowSpan = tableData.rowSpan || 1;
|
|
43814
|
+
const colSpan = tableData.colSpan || 1;
|
|
43815
|
+
const cellKey = `${rowsNow + i}-${j + 1}`;
|
|
43816
|
+
if (!mergedCells.has(cellKey) && (rowSpan > 1 || colSpan > 1) && columnsCalc[j].rowSpan) {
|
|
43817
|
+
const mergeEndRow = rowsNow + i + rowSpan - 1;
|
|
43818
|
+
const mergeEndCol = j + 1 + colSpan - 1;
|
|
43819
|
+
if (mergeEndRow < rowsNow + jsonData.length && mergeEndCol <= columnCount) {
|
|
43820
|
+
worksheet.mergeCells(rowsNow + i, j + 1, mergeEndRow, mergeEndCol);
|
|
43821
|
+
if (columnType[j] === "s") {
|
|
43822
|
+
if (lineData[j] === "0") {
|
|
43823
|
+
worksheet.getCell(rowsNow + i, j + 1).value = 0;
|
|
43824
|
+
} else if (lineData[j] !== void 0 && lineData[j] !== null) {
|
|
43825
|
+
const safeValue = typeof lineData[j].value === "string" ? lineData[j].value.replace(/[\u2028\u2029]/g, " ") : lineData[j].value;
|
|
43826
|
+
worksheet.getCell(rowsNow + i, j + 1).value = safeValue;
|
|
43827
|
+
} else {
|
|
43828
|
+
worksheet.getCell(rowsNow + i, j + 1).value = "";
|
|
43829
|
+
}
|
|
43830
|
+
dataCellStyle2.numFmt = "";
|
|
43831
|
+
} else if (columnType[j] === "n" && lineData[j]) {
|
|
43832
|
+
const numericValue = typeof lineData[j].value === "string" ? parseFloat(lineData[j].value.replace(/,/g, "")) : lineData[j].value;
|
|
43833
|
+
worksheet.getCell(rowsNow + i, j + 1).value = isNaN(numericValue) ? 0 : numericValue;
|
|
43834
|
+
dataCellStyle2.numFmt = numberFormat[j];
|
|
43835
|
+
} else {
|
|
43836
|
+
worksheet.getCell(rowsNow + i, j + 1).value = "";
|
|
43837
|
+
}
|
|
43838
|
+
if (lineData[j] && lineData[j].formula) {
|
|
43839
|
+
try {
|
|
43840
|
+
if (/^[A-Za-z]+\(.*\)$/.test(lineData[j].formula)) {
|
|
43841
|
+
worksheet.getCell(rowsNow + i, j + 1).value = { formula: lineData[j].formula };
|
|
43842
|
+
} else {
|
|
43843
|
+
console.warn(
|
|
43844
|
+
`\u65E0\u6548\u516C\u5F0F: ${lineData[j].formula}\uFF0C\u4F4D\u4E8E\u7B2C ${i + 1} \u884C\uFF0C\u7B2C ${j + 1} \u5217`
|
|
43845
|
+
);
|
|
43846
|
+
worksheet.getCell(rowsNow + i, j + 1).value = "#FORMULA_ERROR";
|
|
43847
|
+
}
|
|
43848
|
+
} catch (e) {
|
|
43849
|
+
console.error(`\u8BBE\u7F6E\u516C\u5F0F\u65F6\u51FA\u9519: ${e.message}\uFF0C\u516C\u5F0F\u5185\u5BB9: ${lineData[j].formula}`);
|
|
43850
|
+
worksheet.getCell(rowsNow + i, j + 1).value = "#ERROR!";
|
|
43851
|
+
}
|
|
43852
|
+
}
|
|
43853
|
+
dataCellStyle2.alignment.horizontal = columnAlign[j];
|
|
43854
|
+
worksheet.getCell(rowsNow + i, j + 1).style = dataCellStyle2;
|
|
43855
|
+
for (let r = 0; r < rowSpan; r++) {
|
|
43856
|
+
for (let c = 0; c < colSpan; c++) {
|
|
43857
|
+
mergedCells.add(`${rowsNow + i + r}-${j + 1 + c}`);
|
|
43858
|
+
}
|
|
43859
|
+
}
|
|
43860
|
+
applyBorderToMergedCell(
|
|
43861
|
+
worksheet,
|
|
43862
|
+
rowsNow + i,
|
|
43863
|
+
j + 1,
|
|
43864
|
+
mergeEndRow,
|
|
43865
|
+
mergeEndCol,
|
|
43866
|
+
dataCellStyle2.border
|
|
43867
|
+
);
|
|
43868
|
+
}
|
|
43418
43869
|
}
|
|
43870
|
+
if (!mergedCells.has(cellKey)) {
|
|
43871
|
+
if (columnType[j] === "s") {
|
|
43872
|
+
if (lineData[j] === "0") {
|
|
43873
|
+
worksheet.getCell(rowsNow + i, j + 1).value = 0;
|
|
43874
|
+
} else if (lineData[j] !== void 0 && lineData[j] !== null) {
|
|
43875
|
+
const safeValue = typeof lineData[j].value === "string" ? lineData[j].value.replace(/[\u2028\u2029]/g, " ") : lineData[j].value;
|
|
43876
|
+
worksheet.getCell(rowsNow + i, j + 1).value = safeValue;
|
|
43877
|
+
} else {
|
|
43878
|
+
worksheet.getCell(rowsNow + i, j + 1).value = "";
|
|
43879
|
+
}
|
|
43880
|
+
dataCellStyle2.numFmt = "";
|
|
43881
|
+
} else if (columnType[j] === "n" && lineData[j]) {
|
|
43882
|
+
const numericValue = typeof lineData[j].value === "string" ? parseFloat(lineData[j].value.replace(/,/g, "")) : lineData[j].value;
|
|
43883
|
+
worksheet.getCell(rowsNow + i, j + 1).value = isNaN(numericValue) ? 0 : numericValue;
|
|
43884
|
+
dataCellStyle2.numFmt = numberFormat[j];
|
|
43885
|
+
} else {
|
|
43886
|
+
worksheet.getCell(rowsNow + i, j + 1).value = "";
|
|
43887
|
+
}
|
|
43888
|
+
if (lineData[j] && lineData[j].formula) {
|
|
43889
|
+
try {
|
|
43890
|
+
if (/^[A-Za-z]+\(.*\)$/.test(lineData[j].formula)) {
|
|
43891
|
+
worksheet.getCell(rowsNow + i, j + 1).value = { formula: lineData[j].formula };
|
|
43892
|
+
} else {
|
|
43893
|
+
console.warn(
|
|
43894
|
+
`\u65E0\u6548\u516C\u5F0F: ${lineData[j].formula}\uFF0C\u4F4D\u4E8E\u7B2C ${i + 1} \u884C\uFF0C\u7B2C ${j + 1} \u5217`
|
|
43895
|
+
);
|
|
43896
|
+
worksheet.getCell(rowsNow + i, j + 1).value = "#FORMULA_ERROR";
|
|
43897
|
+
}
|
|
43898
|
+
} catch (e) {
|
|
43899
|
+
console.error(`\u8BBE\u7F6E\u516C\u5F0F\u65F6\u51FA\u9519: ${e.message}\uFF0C\u516C\u5F0F\u5185\u5BB9: ${lineData[j].formula}`);
|
|
43900
|
+
worksheet.getCell(rowsNow + i, j + 1).value = "#ERROR!";
|
|
43901
|
+
}
|
|
43902
|
+
}
|
|
43903
|
+
worksheet.getCell(rowsNow + i, j + 1).border = dataCellStyle2.border;
|
|
43904
|
+
}
|
|
43905
|
+
} catch (cellError) {
|
|
43906
|
+
console.error(`\u5904\u7406\u5355\u5143\u683C\u6570\u636E\u65F6\u51FA\u9519 (\u884C: ${i + 1}, \u5217: ${j + 1}):`, cellError);
|
|
43907
|
+
worksheet.getCell(rowsNow + i, j + 1).value = "#CELL_ERROR";
|
|
43419
43908
|
}
|
|
43420
|
-
dataCellStyle.horizontalAlignment = columnAlign[j];
|
|
43421
|
-
sheet.cell(rowsNow + i, j + 1).style(dataCellStyle);
|
|
43422
43909
|
}
|
|
43423
43910
|
if (excelData.rowColor && i % 2 != 0) {
|
|
43424
|
-
|
|
43425
|
-
|
|
43911
|
+
for (let j2 = 1; j2 <= columnCount; j2++) {
|
|
43912
|
+
worksheet.getCell(rowsNow + i, j2).style.fill = {
|
|
43913
|
+
type: "pattern",
|
|
43914
|
+
pattern: "solid",
|
|
43915
|
+
fgColor: { argb: "F8F8F9" }
|
|
43916
|
+
};
|
|
43917
|
+
}
|
|
43426
43918
|
}
|
|
43427
|
-
|
|
43919
|
+
worksheet.getRow(rowsNow + i).height = dataRowHeight2;
|
|
43428
43920
|
}
|
|
43429
43921
|
if (!!excelData.rowSpanDefs) {
|
|
43430
|
-
|
|
43431
|
-
|
|
43432
|
-
|
|
43433
|
-
rowSpanInfo.mergeRowS + rowsNow
|
|
43434
|
-
rowSpanInfo.megerColS + 1
|
|
43435
|
-
rowSpanInfo.mergeRowE + rowsNow
|
|
43436
|
-
rowSpanInfo.megerColE + 1
|
|
43437
|
-
|
|
43438
|
-
|
|
43439
|
-
|
|
43922
|
+
try {
|
|
43923
|
+
initRowSpanInfosNew({ ...excelData, columns: calcExportDatas.columnsCalc });
|
|
43924
|
+
_.forEach(rowSpanExcelInfos, function(rowSpanInfo) {
|
|
43925
|
+
const srow = rowSpanInfo.mergeRowS + rowsNow;
|
|
43926
|
+
const scol = rowSpanInfo.megerColS + 1;
|
|
43927
|
+
const erow = rowSpanInfo.mergeRowE + rowsNow;
|
|
43928
|
+
const ecol = rowSpanInfo.megerColE + 1;
|
|
43929
|
+
worksheet.mergeCells(srow, scol, erow, ecol);
|
|
43930
|
+
applyBorderToMergedCell(worksheet, srow, scol, erow, ecol, dataCellStyle2.border);
|
|
43931
|
+
});
|
|
43932
|
+
} catch (spanError) {
|
|
43933
|
+
console.error("\u5408\u5E76\u5355\u5143\u683C\u65F6\u51FA\u9519:", spanError);
|
|
43934
|
+
}
|
|
43440
43935
|
} else if (!!excelData.rowSpanColumns) {
|
|
43441
|
-
|
|
43442
|
-
|
|
43443
|
-
|
|
43444
|
-
rowSpanInfo.mergeRowS + rowsNow
|
|
43445
|
-
rowSpanInfo.megerColS + 1
|
|
43446
|
-
rowSpanInfo.mergeRowE + rowsNow
|
|
43447
|
-
rowSpanInfo.megerColE + 1
|
|
43448
|
-
|
|
43449
|
-
|
|
43450
|
-
|
|
43936
|
+
try {
|
|
43937
|
+
initRowSpanInfos({ ...excelData, columns: calcExportDatas.columnsCalc });
|
|
43938
|
+
_.forEach(rowSpanExcelInfos, function(rowSpanInfo) {
|
|
43939
|
+
const srow = rowSpanInfo.mergeRowS + rowsNow;
|
|
43940
|
+
const scol = rowSpanInfo.megerColS + 1;
|
|
43941
|
+
const erow = rowSpanInfo.mergeRowE + rowsNow;
|
|
43942
|
+
const ecol = rowSpanInfo.megerColE + 1;
|
|
43943
|
+
worksheet.mergeCells(srow, scol, erow, ecol);
|
|
43944
|
+
applyBorderToMergedCell(worksheet, srow, scol, erow, ecol, dataCellStyle2.border);
|
|
43945
|
+
});
|
|
43946
|
+
} catch (spanError) {
|
|
43947
|
+
console.error("\u5408\u5E76\u5355\u5143\u683C\u65F6\u51FA\u9519:", spanError);
|
|
43948
|
+
}
|
|
43451
43949
|
}
|
|
43452
43950
|
if (excelData.leftColumns || excelData.topRows) {
|
|
43453
|
-
|
|
43454
|
-
|
|
43455
|
-
|
|
43456
|
-
|
|
43457
|
-
|
|
43458
|
-
|
|
43459
|
-
|
|
43460
|
-
|
|
43461
|
-
|
|
43462
|
-
|
|
43463
|
-
a.download = title + ".xlsx";
|
|
43464
|
-
a.click();
|
|
43465
|
-
window.URL.revokeObjectURL(url);
|
|
43466
|
-
document.body.removeChild(a);
|
|
43951
|
+
try {
|
|
43952
|
+
worksheet.views = [
|
|
43953
|
+
{
|
|
43954
|
+
xSplit: excelData.leftColumns || 0,
|
|
43955
|
+
ySplit: (excelData.topRows || 0) + rowsNow - 1,
|
|
43956
|
+
state: "frozen"
|
|
43957
|
+
}
|
|
43958
|
+
];
|
|
43959
|
+
} catch (viewError) {
|
|
43960
|
+
console.error("\u8BBE\u7F6E\u51BB\u7ED3\u7A97\u683C\u65F6\u51FA\u9519:", viewError);
|
|
43467
43961
|
}
|
|
43962
|
+
}
|
|
43963
|
+
return createWatermarkImage(excelData.watermark).then((imageBase64) => {
|
|
43964
|
+
const imageId = workbook.addImage({
|
|
43965
|
+
base64: imageBase64,
|
|
43966
|
+
extension: "png"
|
|
43967
|
+
});
|
|
43968
|
+
worksheet.addBackgroundImage(imageId);
|
|
43969
|
+
return workbook.xlsx.writeBuffer().then((buffer) => {
|
|
43970
|
+
FileSaver_min.exports.saveAs(
|
|
43971
|
+
new Blob([buffer], {
|
|
43972
|
+
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
43973
|
+
}),
|
|
43974
|
+
sanitizeFilename(title) + ".xlsx"
|
|
43975
|
+
);
|
|
43976
|
+
return true;
|
|
43977
|
+
}).catch((err) => {
|
|
43978
|
+
console.error("\u5199\u5165Excel\u6587\u4EF6\u65F6\u51FA\u9519:", err);
|
|
43979
|
+
throw new Error("\u5BFC\u51FAExcel\u5931\u8D25: " + err.message);
|
|
43980
|
+
});
|
|
43468
43981
|
});
|
|
43469
|
-
}
|
|
43982
|
+
} catch (error) {
|
|
43983
|
+
console.error("\u5BFC\u51FAExcel\u8FC7\u7A0B\u4E2D\u53D1\u751F\u610F\u5916\u9519\u8BEF:", error);
|
|
43984
|
+
throw error;
|
|
43985
|
+
}
|
|
43986
|
+
}
|
|
43987
|
+
function sanitizeFilename(filename) {
|
|
43988
|
+
return filename.replace(/[\\/:*?"<>|]/g, "_");
|
|
43989
|
+
}
|
|
43990
|
+
function createWatermarkImage(watermark) {
|
|
43991
|
+
return new Promise((resolve, reject) => {
|
|
43992
|
+
try {
|
|
43993
|
+
const canvas = document.createElement("canvas");
|
|
43994
|
+
const ctx = canvas.getContext("2d");
|
|
43995
|
+
const scale = 2;
|
|
43996
|
+
canvas.width = 1600 * scale;
|
|
43997
|
+
canvas.height = 1200 * scale;
|
|
43998
|
+
ctx.scale(scale, scale);
|
|
43999
|
+
ctx.fillStyle = "rgba(180, 180, 180, 0.3)";
|
|
44000
|
+
ctx.font = "20px Arial";
|
|
44001
|
+
ctx.rotate(-30 * Math.PI / 180);
|
|
44002
|
+
for (let x = -200; x < canvas.width; x += 300) {
|
|
44003
|
+
for (let y = 0; y < canvas.height; y += 200) {
|
|
44004
|
+
const text = watermark ? watermark : (getSessionStorage("userInfo").userName || "") + " " + dayjs().format("YYYYMMDD");
|
|
44005
|
+
ctx.fillText(text, x, y);
|
|
44006
|
+
}
|
|
44007
|
+
}
|
|
44008
|
+
canvas.toBlob((blob) => {
|
|
44009
|
+
const reader = new FileReader();
|
|
44010
|
+
reader.onload = () => {
|
|
44011
|
+
const base64Data = reader.result.split(",")[1];
|
|
44012
|
+
resolve(base64Data);
|
|
44013
|
+
};
|
|
44014
|
+
reader.onerror = () => reject(new Error("Failed to read watermark image"));
|
|
44015
|
+
reader.readAsDataURL(blob);
|
|
44016
|
+
}, "image/png");
|
|
44017
|
+
} catch (error) {
|
|
44018
|
+
console.error("Error creating watermark image:", error);
|
|
44019
|
+
reject(error);
|
|
44020
|
+
}
|
|
44021
|
+
});
|
|
44022
|
+
}
|
|
44023
|
+
function applyBorderToMergedCell(worksheet, srow, scol, erow, ecol, borderStyle) {
|
|
44024
|
+
for (let row = srow; row <= erow; row++) {
|
|
44025
|
+
for (let col = scol; col <= ecol; col++) {
|
|
44026
|
+
const cell = worksheet.getCell(row, col);
|
|
44027
|
+
if (!cell.border) {
|
|
44028
|
+
cell.border = {
|
|
44029
|
+
top: null,
|
|
44030
|
+
left: null,
|
|
44031
|
+
bottom: null,
|
|
44032
|
+
right: null
|
|
44033
|
+
};
|
|
44034
|
+
}
|
|
44035
|
+
if (row === srow)
|
|
44036
|
+
cell.border.top = borderStyle.top;
|
|
44037
|
+
if (row === erow)
|
|
44038
|
+
cell.border.bottom = borderStyle.bottom;
|
|
44039
|
+
if (col === scol)
|
|
44040
|
+
cell.border.left = borderStyle.left;
|
|
44041
|
+
if (col === ecol)
|
|
44042
|
+
cell.border.right = borderStyle.right;
|
|
44043
|
+
}
|
|
44044
|
+
}
|
|
43470
44045
|
}
|
|
43471
44046
|
function previewJsonToExcel(excelData) {
|
|
43472
44047
|
return new Promise((resolve, reject) => {
|
|
@@ -43591,297 +44166,6 @@ function previewJsonToExcel(excelData) {
|
|
|
43591
44166
|
});
|
|
43592
44167
|
});
|
|
43593
44168
|
}
|
|
43594
|
-
var dayjs_min = { exports: {} };
|
|
43595
|
-
(function(module2, exports2) {
|
|
43596
|
-
!function(t2, e) {
|
|
43597
|
-
module2.exports = e();
|
|
43598
|
-
}(commonjsGlobal, function() {
|
|
43599
|
-
var t2 = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $2 = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
|
|
43600
|
-
var e2 = ["th", "st", "nd", "rd"], n2 = t3 % 100;
|
|
43601
|
-
return "[" + t3 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
|
|
43602
|
-
} }, m = function(t3, e2, n2) {
|
|
43603
|
-
var r2 = String(t3);
|
|
43604
|
-
return !r2 || r2.length >= e2 ? t3 : "" + Array(e2 + 1 - r2.length).join(n2) + t3;
|
|
43605
|
-
}, v = { s: m, z: function(t3) {
|
|
43606
|
-
var e2 = -t3.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
|
|
43607
|
-
return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
|
|
43608
|
-
}, m: function t3(e2, n2) {
|
|
43609
|
-
if (e2.date() < n2.date())
|
|
43610
|
-
return -t3(n2, e2);
|
|
43611
|
-
var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c);
|
|
43612
|
-
return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
|
|
43613
|
-
}, a: function(t3) {
|
|
43614
|
-
return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
|
|
43615
|
-
}, p: function(t3) {
|
|
43616
|
-
return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
|
|
43617
|
-
}, u: function(t3) {
|
|
43618
|
-
return void 0 === t3;
|
|
43619
|
-
} }, g = "en", D = {};
|
|
43620
|
-
D[g] = M;
|
|
43621
|
-
var p = "$isDayjsObject", S = function(t3) {
|
|
43622
|
-
return t3 instanceof _2 || !(!t3 || !t3[p]);
|
|
43623
|
-
}, w = function t3(e2, n2, r2) {
|
|
43624
|
-
var i2;
|
|
43625
|
-
if (!e2)
|
|
43626
|
-
return g;
|
|
43627
|
-
if ("string" == typeof e2) {
|
|
43628
|
-
var s2 = e2.toLowerCase();
|
|
43629
|
-
D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
|
|
43630
|
-
var u2 = e2.split("-");
|
|
43631
|
-
if (!i2 && u2.length > 1)
|
|
43632
|
-
return t3(u2[0]);
|
|
43633
|
-
} else {
|
|
43634
|
-
var a2 = e2.name;
|
|
43635
|
-
D[a2] = e2, i2 = a2;
|
|
43636
|
-
}
|
|
43637
|
-
return !r2 && i2 && (g = i2), i2 || !r2 && g;
|
|
43638
|
-
}, O = function(t3, e2) {
|
|
43639
|
-
if (S(t3))
|
|
43640
|
-
return t3.clone();
|
|
43641
|
-
var n2 = "object" == typeof e2 ? e2 : {};
|
|
43642
|
-
return n2.date = t3, n2.args = arguments, new _2(n2);
|
|
43643
|
-
}, b = v;
|
|
43644
|
-
b.l = w, b.i = S, b.w = function(t3, e2) {
|
|
43645
|
-
return O(t3, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
|
|
43646
|
-
};
|
|
43647
|
-
var _2 = function() {
|
|
43648
|
-
function M2(t3) {
|
|
43649
|
-
this.$L = w(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p] = true;
|
|
43650
|
-
}
|
|
43651
|
-
var m2 = M2.prototype;
|
|
43652
|
-
return m2.parse = function(t3) {
|
|
43653
|
-
this.$d = function(t4) {
|
|
43654
|
-
var e2 = t4.date, n2 = t4.utc;
|
|
43655
|
-
if (null === e2)
|
|
43656
|
-
return new Date(NaN);
|
|
43657
|
-
if (b.u(e2))
|
|
43658
|
-
return new Date();
|
|
43659
|
-
if (e2 instanceof Date)
|
|
43660
|
-
return new Date(e2);
|
|
43661
|
-
if ("string" == typeof e2 && !/Z$/i.test(e2)) {
|
|
43662
|
-
var r2 = e2.match($2);
|
|
43663
|
-
if (r2) {
|
|
43664
|
-
var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
|
|
43665
|
-
return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
|
|
43666
|
-
}
|
|
43667
|
-
}
|
|
43668
|
-
return new Date(e2);
|
|
43669
|
-
}(t3), this.init();
|
|
43670
|
-
}, m2.init = function() {
|
|
43671
|
-
var t3 = this.$d;
|
|
43672
|
-
this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
|
|
43673
|
-
}, m2.$utils = function() {
|
|
43674
|
-
return b;
|
|
43675
|
-
}, m2.isValid = function() {
|
|
43676
|
-
return !(this.$d.toString() === l);
|
|
43677
|
-
}, m2.isSame = function(t3, e2) {
|
|
43678
|
-
var n2 = O(t3);
|
|
43679
|
-
return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
|
|
43680
|
-
}, m2.isAfter = function(t3, e2) {
|
|
43681
|
-
return O(t3) < this.startOf(e2);
|
|
43682
|
-
}, m2.isBefore = function(t3, e2) {
|
|
43683
|
-
return this.endOf(e2) < O(t3);
|
|
43684
|
-
}, m2.$g = function(t3, e2, n2) {
|
|
43685
|
-
return b.u(t3) ? this[e2] : this.set(n2, t3);
|
|
43686
|
-
}, m2.unix = function() {
|
|
43687
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
43688
|
-
}, m2.valueOf = function() {
|
|
43689
|
-
return this.$d.getTime();
|
|
43690
|
-
}, m2.startOf = function(t3, e2) {
|
|
43691
|
-
var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t3), l2 = function(t4, e3) {
|
|
43692
|
-
var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t4) : new Date(n2.$y, e3, t4), n2);
|
|
43693
|
-
return r2 ? i2 : i2.endOf(a);
|
|
43694
|
-
}, $3 = function(t4, e3) {
|
|
43695
|
-
return b.w(n2.toDate()[t4].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
|
|
43696
|
-
}, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
|
|
43697
|
-
switch (f2) {
|
|
43698
|
-
case h:
|
|
43699
|
-
return r2 ? l2(1, 0) : l2(31, 11);
|
|
43700
|
-
case c:
|
|
43701
|
-
return r2 ? l2(1, M3) : l2(0, M3 + 1);
|
|
43702
|
-
case o:
|
|
43703
|
-
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
|
|
43704
|
-
return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
|
|
43705
|
-
case a:
|
|
43706
|
-
case d:
|
|
43707
|
-
return $3(v2 + "Hours", 0);
|
|
43708
|
-
case u:
|
|
43709
|
-
return $3(v2 + "Minutes", 1);
|
|
43710
|
-
case s:
|
|
43711
|
-
return $3(v2 + "Seconds", 2);
|
|
43712
|
-
case i:
|
|
43713
|
-
return $3(v2 + "Milliseconds", 3);
|
|
43714
|
-
default:
|
|
43715
|
-
return this.clone();
|
|
43716
|
-
}
|
|
43717
|
-
}, m2.endOf = function(t3) {
|
|
43718
|
-
return this.startOf(t3, false);
|
|
43719
|
-
}, m2.$set = function(t3, e2) {
|
|
43720
|
-
var n2, o2 = b.p(t3), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $3 = o2 === a ? this.$D + (e2 - this.$W) : e2;
|
|
43721
|
-
if (o2 === c || o2 === h) {
|
|
43722
|
-
var y2 = this.clone().set(d, 1);
|
|
43723
|
-
y2.$d[l2]($3), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
|
|
43724
|
-
} else
|
|
43725
|
-
l2 && this.$d[l2]($3);
|
|
43726
|
-
return this.init(), this;
|
|
43727
|
-
}, m2.set = function(t3, e2) {
|
|
43728
|
-
return this.clone().$set(t3, e2);
|
|
43729
|
-
}, m2.get = function(t3) {
|
|
43730
|
-
return this[b.p(t3)]();
|
|
43731
|
-
}, m2.add = function(r2, f2) {
|
|
43732
|
-
var d2, l2 = this;
|
|
43733
|
-
r2 = Number(r2);
|
|
43734
|
-
var $3 = b.p(f2), y2 = function(t3) {
|
|
43735
|
-
var e2 = O(l2);
|
|
43736
|
-
return b.w(e2.date(e2.date() + Math.round(t3 * r2)), l2);
|
|
43737
|
-
};
|
|
43738
|
-
if ($3 === c)
|
|
43739
|
-
return this.set(c, this.$M + r2);
|
|
43740
|
-
if ($3 === h)
|
|
43741
|
-
return this.set(h, this.$y + r2);
|
|
43742
|
-
if ($3 === a)
|
|
43743
|
-
return y2(1);
|
|
43744
|
-
if ($3 === o)
|
|
43745
|
-
return y2(7);
|
|
43746
|
-
var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t2, d2)[$3] || 1, m3 = this.$d.getTime() + r2 * M3;
|
|
43747
|
-
return b.w(m3, this);
|
|
43748
|
-
}, m2.subtract = function(t3, e2) {
|
|
43749
|
-
return this.add(-1 * t3, e2);
|
|
43750
|
-
}, m2.format = function(t3) {
|
|
43751
|
-
var e2 = this, n2 = this.$locale();
|
|
43752
|
-
if (!this.isValid())
|
|
43753
|
-
return n2.invalidDate || l;
|
|
43754
|
-
var r2 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t4, n3, i3, s3) {
|
|
43755
|
-
return t4 && (t4[n3] || t4(e2, r2)) || i3[n3].slice(0, s3);
|
|
43756
|
-
}, d2 = function(t4) {
|
|
43757
|
-
return b.s(s2 % 12 || 12, t4, "0");
|
|
43758
|
-
}, $3 = f2 || function(t4, e3, n3) {
|
|
43759
|
-
var r3 = t4 < 12 ? "AM" : "PM";
|
|
43760
|
-
return n3 ? r3.toLowerCase() : r3;
|
|
43761
|
-
};
|
|
43762
|
-
return r2.replace(y, function(t4, r3) {
|
|
43763
|
-
return r3 || function(t5) {
|
|
43764
|
-
switch (t5) {
|
|
43765
|
-
case "YY":
|
|
43766
|
-
return String(e2.$y).slice(-2);
|
|
43767
|
-
case "YYYY":
|
|
43768
|
-
return b.s(e2.$y, 4, "0");
|
|
43769
|
-
case "M":
|
|
43770
|
-
return a2 + 1;
|
|
43771
|
-
case "MM":
|
|
43772
|
-
return b.s(a2 + 1, 2, "0");
|
|
43773
|
-
case "MMM":
|
|
43774
|
-
return h2(n2.monthsShort, a2, c2, 3);
|
|
43775
|
-
case "MMMM":
|
|
43776
|
-
return h2(c2, a2);
|
|
43777
|
-
case "D":
|
|
43778
|
-
return e2.$D;
|
|
43779
|
-
case "DD":
|
|
43780
|
-
return b.s(e2.$D, 2, "0");
|
|
43781
|
-
case "d":
|
|
43782
|
-
return String(e2.$W);
|
|
43783
|
-
case "dd":
|
|
43784
|
-
return h2(n2.weekdaysMin, e2.$W, o2, 2);
|
|
43785
|
-
case "ddd":
|
|
43786
|
-
return h2(n2.weekdaysShort, e2.$W, o2, 3);
|
|
43787
|
-
case "dddd":
|
|
43788
|
-
return o2[e2.$W];
|
|
43789
|
-
case "H":
|
|
43790
|
-
return String(s2);
|
|
43791
|
-
case "HH":
|
|
43792
|
-
return b.s(s2, 2, "0");
|
|
43793
|
-
case "h":
|
|
43794
|
-
return d2(1);
|
|
43795
|
-
case "hh":
|
|
43796
|
-
return d2(2);
|
|
43797
|
-
case "a":
|
|
43798
|
-
return $3(s2, u2, true);
|
|
43799
|
-
case "A":
|
|
43800
|
-
return $3(s2, u2, false);
|
|
43801
|
-
case "m":
|
|
43802
|
-
return String(u2);
|
|
43803
|
-
case "mm":
|
|
43804
|
-
return b.s(u2, 2, "0");
|
|
43805
|
-
case "s":
|
|
43806
|
-
return String(e2.$s);
|
|
43807
|
-
case "ss":
|
|
43808
|
-
return b.s(e2.$s, 2, "0");
|
|
43809
|
-
case "SSS":
|
|
43810
|
-
return b.s(e2.$ms, 3, "0");
|
|
43811
|
-
case "Z":
|
|
43812
|
-
return i2;
|
|
43813
|
-
}
|
|
43814
|
-
return null;
|
|
43815
|
-
}(t4) || i2.replace(":", "");
|
|
43816
|
-
});
|
|
43817
|
-
}, m2.utcOffset = function() {
|
|
43818
|
-
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
43819
|
-
}, m2.diff = function(r2, d2, l2) {
|
|
43820
|
-
var $3, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
|
|
43821
|
-
return b.m(y2, m3);
|
|
43822
|
-
};
|
|
43823
|
-
switch (M3) {
|
|
43824
|
-
case h:
|
|
43825
|
-
$3 = D2() / 12;
|
|
43826
|
-
break;
|
|
43827
|
-
case c:
|
|
43828
|
-
$3 = D2();
|
|
43829
|
-
break;
|
|
43830
|
-
case f:
|
|
43831
|
-
$3 = D2() / 3;
|
|
43832
|
-
break;
|
|
43833
|
-
case o:
|
|
43834
|
-
$3 = (g2 - v2) / 6048e5;
|
|
43835
|
-
break;
|
|
43836
|
-
case a:
|
|
43837
|
-
$3 = (g2 - v2) / 864e5;
|
|
43838
|
-
break;
|
|
43839
|
-
case u:
|
|
43840
|
-
$3 = g2 / n;
|
|
43841
|
-
break;
|
|
43842
|
-
case s:
|
|
43843
|
-
$3 = g2 / e;
|
|
43844
|
-
break;
|
|
43845
|
-
case i:
|
|
43846
|
-
$3 = g2 / t2;
|
|
43847
|
-
break;
|
|
43848
|
-
default:
|
|
43849
|
-
$3 = g2;
|
|
43850
|
-
}
|
|
43851
|
-
return l2 ? $3 : b.a($3);
|
|
43852
|
-
}, m2.daysInMonth = function() {
|
|
43853
|
-
return this.endOf(c).$D;
|
|
43854
|
-
}, m2.$locale = function() {
|
|
43855
|
-
return D[this.$L];
|
|
43856
|
-
}, m2.locale = function(t3, e2) {
|
|
43857
|
-
if (!t3)
|
|
43858
|
-
return this.$L;
|
|
43859
|
-
var n2 = this.clone(), r2 = w(t3, e2, true);
|
|
43860
|
-
return r2 && (n2.$L = r2), n2;
|
|
43861
|
-
}, m2.clone = function() {
|
|
43862
|
-
return b.w(this.$d, this);
|
|
43863
|
-
}, m2.toDate = function() {
|
|
43864
|
-
return new Date(this.valueOf());
|
|
43865
|
-
}, m2.toJSON = function() {
|
|
43866
|
-
return this.isValid() ? this.toISOString() : null;
|
|
43867
|
-
}, m2.toISOString = function() {
|
|
43868
|
-
return this.$d.toISOString();
|
|
43869
|
-
}, m2.toString = function() {
|
|
43870
|
-
return this.$d.toUTCString();
|
|
43871
|
-
}, M2;
|
|
43872
|
-
}(), k = _2.prototype;
|
|
43873
|
-
return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t3) {
|
|
43874
|
-
k[t3[1]] = function(e2) {
|
|
43875
|
-
return this.$g(e2, t3[0], t3[1]);
|
|
43876
|
-
};
|
|
43877
|
-
}), O.extend = function(t3, e2) {
|
|
43878
|
-
return t3.$i || (t3(e2, _2, O), t3.$i = true), O;
|
|
43879
|
-
}, O.locale = w, O.isDayjs = S, O.unix = function(t3) {
|
|
43880
|
-
return O(1e3 * t3);
|
|
43881
|
-
}, O.en = D[g], O.Ls = D, O.p = {}, O;
|
|
43882
|
-
});
|
|
43883
|
-
})(dayjs_min);
|
|
43884
|
-
var dayjs = dayjs_min.exports;
|
|
43885
44169
|
const isDev = false;
|
|
43886
44170
|
var config = useConfig(isDev);
|
|
43887
44171
|
_.isObject;
|
|
@@ -47041,11 +47325,11 @@ var Mixin = {
|
|
|
47041
47325
|
handleConfirm(visible, type) {
|
|
47042
47326
|
this.$emit("on-pick", this.dates, visible, type || this.type);
|
|
47043
47327
|
},
|
|
47044
|
-
onToggleVisibility(
|
|
47328
|
+
onToggleVisibility(open2) {
|
|
47045
47329
|
const { timeSpinner, timeSpinnerEnd } = this.$refs;
|
|
47046
|
-
if (
|
|
47330
|
+
if (open2 && timeSpinner)
|
|
47047
47331
|
timeSpinner.updateScroll();
|
|
47048
|
-
if (
|
|
47332
|
+
if (open2 && timeSpinnerEnd)
|
|
47049
47333
|
timeSpinnerEnd.updateScroll();
|
|
47050
47334
|
}
|
|
47051
47335
|
}
|
|
@@ -50464,7 +50748,7 @@ var render$18 = function() {
|
|
|
50464
50748
|
var _c = _vm._self._c || _h;
|
|
50465
50749
|
return _c("div", { staticClass: "export-data" }, [_c("Row", [_c("Form", { attrs: { "label-width": 80, "label-colon": "" } }, [_c("FormItem", { attrs: { "label": "\u5BFC\u51FA\u683C\u5F0F" } }, [_vm._v("xlsx")]), _c("FormItem", { attrs: { "label": "\u6587\u4EF6\u540D" } }, [_c("Input", { staticStyle: { "width": "270px" }, attrs: { "maxlength": "30", "icon": "document", "placeholder": "\u8868\u683C\u6570\u636E" }, model: { value: _vm.fileName, callback: function($$v) {
|
|
50466
50750
|
_vm.fileName = typeof $$v === "string" ? $$v.trim() : $$v;
|
|
50467
|
-
}, expression: "fileName" } })], 1), _c("FormItem", [_c("Button", { staticStyle: { "margin-bottom": "var(--search-margin-bottom)" }, attrs: { "type": "default", "loading": _vm.exportCurrentLoading }, on: { "click": _vm.exportCurrentPage } }, [_vm._v("\u5BFC\u51FA\u5F53\u524D\u9875")]), _vm._v(" \xA0 "), _c("Button", { staticStyle: { "margin-bottom": "var(--search-margin-bottom)" }, attrs: { "type": "default", "loading": _vm.exportAllLoading }, on: { "click": _vm.exportAllData } }, [_vm._v("\u5BFC\u51FA\u5168\u90E8")]), _vm._v(" \xA0 "), _c("Button", { staticStyle: { "margin-bottom": "var(--search-margin-bottom)" }, attrs: { "type": "default", "loading": _vm.exportCurrentLoading }, on: { "click": _vm.previewCurrentPage } }, [_vm._v("\u9884\u89C8\u5F53\u524D\u9875")]), _vm._v(" \xA0 "), _c("Button", { staticStyle: { "margin-bottom": "var(--search-margin-bottom)" }, attrs: { "type": "default", "loading": _vm.exportAllLoading }, on: { "click": _vm.previewAllData } }, [_vm._v("\u9884\u89C8\u5168\u90E8")])], 1)], 1)], 1), _c("Modal", { staticClass: "ind-file-preview-modal", attrs: { "width": "80" }, on: { "on-cancel": _vm.onCancel }, model: { value: _vm.boxShow, callback: function($$v) {
|
|
50751
|
+
}, expression: "fileName" } })], 1), _c("FormItem", [!_vm.disablePage ? _c("Button", { staticStyle: { "margin-bottom": "var(--search-margin-bottom)" }, attrs: { "type": "default", "loading": _vm.exportCurrentLoading }, on: { "click": _vm.exportCurrentPage } }, [_vm._v("\u5BFC\u51FA\u5F53\u524D\u9875")]) : _vm._e(), _vm._v(" \xA0 "), _c("Button", { staticStyle: { "margin-bottom": "var(--search-margin-bottom)" }, attrs: { "type": "default", "loading": _vm.exportAllLoading }, on: { "click": _vm.exportAllData } }, [_vm._v("\u5BFC\u51FA\u5168\u90E8")]), _vm._v(" \xA0 "), !_vm.disablePage ? _c("Button", { staticStyle: { "margin-bottom": "var(--search-margin-bottom)" }, attrs: { "type": "default", "loading": _vm.exportCurrentLoading }, on: { "click": _vm.previewCurrentPage } }, [_vm._v("\u9884\u89C8\u5F53\u524D\u9875")]) : _vm._e(), _vm._v(" \xA0 "), _c("Button", { staticStyle: { "margin-bottom": "var(--search-margin-bottom)" }, attrs: { "type": "default", "loading": _vm.exportAllLoading }, on: { "click": _vm.previewAllData } }, [_vm._v("\u9884\u89C8\u5168\u90E8")])], 1)], 1)], 1), _c("Modal", { staticClass: "ind-file-preview-modal", attrs: { "width": "80" }, on: { "on-cancel": _vm.onCancel }, model: { value: _vm.boxShow, callback: function($$v) {
|
|
50468
50752
|
_vm.boxShow = $$v;
|
|
50469
50753
|
}, expression: "boxShow" } }, [_c("div", { staticStyle: { "width": "100%", "height": "100%", "display": "flex", "justify-content": "center" } }, [_vm.boxShow ? _c("div", { staticClass: "ind-file-preview-content", attrs: { "id": _vm.id } }) : _vm._e()]), _c("div", { attrs: { "slot": "footer" }, slot: "footer" })])], 1);
|
|
50470
50754
|
};
|
|
@@ -50540,7 +50824,12 @@ const __vue2_script$1l = {
|
|
|
50540
50824
|
},
|
|
50541
50825
|
defaultUnitType: String,
|
|
50542
50826
|
unitType: String,
|
|
50543
|
-
switchCols: Array
|
|
50827
|
+
switchCols: Array,
|
|
50828
|
+
watermark: String,
|
|
50829
|
+
disablePage: {
|
|
50830
|
+
type: Boolean,
|
|
50831
|
+
default: false
|
|
50832
|
+
}
|
|
50544
50833
|
},
|
|
50545
50834
|
data() {
|
|
50546
50835
|
return {
|
|
@@ -50770,7 +51059,8 @@ const __vue2_script$1l = {
|
|
|
50770
51059
|
rowSpanIndexCol: this.rowSpanIndexCol,
|
|
50771
51060
|
topRows: 0,
|
|
50772
51061
|
leftColumns: 0,
|
|
50773
|
-
rowSpanDefs: this.rowSpanDefs
|
|
51062
|
+
rowSpanDefs: this.rowSpanDefs,
|
|
51063
|
+
watermark: this.watermark
|
|
50774
51064
|
};
|
|
50775
51065
|
exportJsonToExcel(params);
|
|
50776
51066
|
} else {
|
|
@@ -50871,6 +51161,7 @@ function deepEach$6(parentNode, list, callback) {
|
|
|
50871
51161
|
}
|
|
50872
51162
|
}
|
|
50873
51163
|
const __vue2_script$1k = {
|
|
51164
|
+
name: "IndexManage",
|
|
50874
51165
|
props: {
|
|
50875
51166
|
funId: String,
|
|
50876
51167
|
tableRef: Object
|
|
@@ -50910,8 +51201,11 @@ const __vue2_script$1k = {
|
|
|
50910
51201
|
this.renderManageColumns();
|
|
50911
51202
|
}
|
|
50912
51203
|
},
|
|
50913
|
-
|
|
50914
|
-
let cacheData
|
|
51204
|
+
mounted() {
|
|
51205
|
+
let cacheData;
|
|
51206
|
+
if (typeof window !== "undefined") {
|
|
51207
|
+
cacheData = localStorage.getItem("index-cache" + this.funId);
|
|
51208
|
+
}
|
|
50915
51209
|
if (cacheData) {
|
|
50916
51210
|
let cacheList = JSON.parse(cacheData);
|
|
50917
51211
|
cacheList.forEach((d) => {
|
|
@@ -50937,7 +51231,9 @@ const __vue2_script$1k = {
|
|
|
50937
51231
|
}
|
|
50938
51232
|
});
|
|
50939
51233
|
});
|
|
50940
|
-
|
|
51234
|
+
if (typeof window !== "undefined") {
|
|
51235
|
+
localStorage.setItem("index-cache" + this.funId, JSON.stringify(dataToCache));
|
|
51236
|
+
}
|
|
50941
51237
|
await this.$nextTick();
|
|
50942
51238
|
},
|
|
50943
51239
|
renderManageColumns() {
|
|
@@ -52757,11 +53053,11 @@ var render$13 = function() {
|
|
|
52757
53053
|
_vm.showZero = $$v;
|
|
52758
53054
|
}, expression: "showZero" } }) : _vm._e(), _vm.showUnitSwitch && _vm.isShowUnitSwitch ? _c("IndUnitRadio", { staticStyle: { "margin-bottom": "var(--ind-unit-switch-bottom)", "line-height": "1" }, attrs: { "isShowWX": _vm.isShowWX, "isShowJ": _vm.isShowJ }, model: { value: _vm.unitType, callback: function($$v) {
|
|
52759
53055
|
_vm.unitType = $$v;
|
|
52760
|
-
}, expression: "unitType" } }) : _vm._e(), _c("Dropdown", { directives: [{ name: "show", rawName: "v-show", value: _vm.showTableOption, expression: "showTableOption" }], staticClass: "table-option-dropdown", staticStyle: { "float": "right", "margin-bottom": "var(--ind-table-button-padding)" }, attrs: { "trigger": "custom", "visible": _vm.optionDropdownVisible, "placement": "bottom-end" }, on: { "on-click": _vm.resetTableSize } }, [_c("IndButtonGroup", { staticStyle: { "display": "flex" }, attrs: { "split": false, "mb": "" } }, [_c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": _vm.toggleFullScreen } }, [_vm._v(" " + _vm._s(_vm.
|
|
53056
|
+
}, expression: "unitType" } }) : _vm._e(), _c("Dropdown", { directives: [{ name: "show", rawName: "v-show", value: _vm.showTableOption, expression: "showTableOption" }], staticClass: "table-option-dropdown", staticStyle: { "float": "right", "margin-bottom": "var(--ind-table-button-padding)" }, attrs: { "trigger": "custom", "visible": _vm.optionDropdownVisible, "placement": "bottom-end" }, on: { "on-click": _vm.resetTableSize } }, [_c("IndButtonGroup", { staticStyle: { "display": "flex" }, attrs: { "split": false, "mb": "" } }, [_c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": _vm.toggleFullScreen } }, [_vm._v(" " + _vm._s(_vm.shareFullSreen ? "\u53D6\u6D88\u5168\u5C4F" : "\u5168\u5C4F") + " ")]), _vm.revertBtn ? _c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": function($event) {
|
|
52761
53057
|
return _vm.$emit("revertColumnRow");
|
|
52762
|
-
} } }, [_vm._v(" \u8F6C\u7F6E ")]) : _vm._e(), _c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": function($event) {
|
|
53058
|
+
} } }, [_vm._v(" \u8F6C\u7F6E ")]) : _vm._e(), !_vm.isIndexManageTable && _vm.$config.indexManage ? _c("IndexManage", { attrs: { "tableRef": _vm.tableRef, "funId": (_vm.funId || "") + "-" + _vm.$route.meta.permissionId }, on: { "resetColumns": _vm.resetColumns } }) : _vm._e(), _c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": function($event) {
|
|
52763
53059
|
return _vm.tableSettingToggle("3");
|
|
52764
|
-
} } }, [_vm._v(" \u5BFC\u51FA ")])], 1), _c("DropdownMenu", { style: { width: _vm.btnSel != "1" ? "400px" : "200px", padding: "5px 10px" }, attrs: { "slot": "list" }, slot: "list" }, [_c("ExportData", { directives: [{ name: "show", rawName: "v-show", value: _vm.btnSel == "3", expression: "btnSel == '3'" }], ref: "exportData", attrs: { "rowSpanDefs": _vm.rowSpanDefs, "exportFileName": _vm.exportFileName, "paramLeft": _vm.paramLeft, "paramRight": _vm.paramRight || _vm.paramRightUnit, "rowSpanColumns": _vm.rowSpanColumns || _vm.mergeColumns, "rowSpanIndexCol": _vm.rowSpanIndexCol || _vm.mergeIndexCol, "pinnedTopRowData": _vm.topRows, "tableColumns": _vm.tableColumns, "data": _vm.tableData, "dataApi": _vm.dataApi, "searchParams": _vm.searchParams, "sortParams": _vm.sortParams, "paginationParams": _vm.paginationParams, "show-summary": _vm.tableShowSummary, "summary-method": _vm.tableSummaryMethod, "parsedColumns": _vm.parsedColumns, "exportEnum": _vm.exportEnum, "data-children": _vm.dataChildren, "defaultUnitType": _vm.defaultUnitType, "unitType": _vm.unitType, "switchCols": _vm.switchCols }, on: { "doExport": function($event) {
|
|
53060
|
+
} } }, [_vm._v(" \u5BFC\u51FA ")])], 1), _c("DropdownMenu", { style: { width: _vm.btnSel != "1" ? "400px" : "200px", padding: "5px 10px" }, attrs: { "slot": "list" }, slot: "list" }, [_c("ExportData", { directives: [{ name: "show", rawName: "v-show", value: _vm.btnSel == "3", expression: "btnSel == '3'" }], ref: "exportData", attrs: { "rowSpanDefs": _vm.rowSpanDefs, "exportFileName": _vm.exportFileName, "paramLeft": _vm.paramLeft, "paramRight": _vm.paramRight || _vm.paramRightUnit, "rowSpanColumns": _vm.rowSpanColumns || _vm.mergeColumns, "rowSpanIndexCol": _vm.rowSpanIndexCol || _vm.mergeIndexCol, "pinnedTopRowData": _vm.topRows, "tableColumns": _vm.tableColumns, "data": _vm.tableData, "dataApi": _vm.dataApi, "searchParams": _vm.searchParams, "sortParams": _vm.sortParams, "paginationParams": _vm.paginationParams, "show-summary": _vm.tableShowSummary, "summary-method": _vm.tableSummaryMethod, "parsedColumns": _vm.parsedColumns, "exportEnum": _vm.exportEnum, "data-children": _vm.dataChildren, "defaultUnitType": _vm.defaultUnitType, "unitType": _vm.unitType, "switchCols": _vm.switchCols, "watermark": _vm.watermark, "disablePage": _vm.disablePage }, on: { "doExport": function($event) {
|
|
52765
53061
|
_vm.optionDropdownVisible = false;
|
|
52766
53062
|
}, "doPreview": function($event) {
|
|
52767
53063
|
_vm.optionDropdownVisible = false;
|
|
@@ -53036,7 +53332,8 @@ const __vue2_script$14 = {
|
|
|
53036
53332
|
type: String,
|
|
53037
53333
|
default: "Y"
|
|
53038
53334
|
},
|
|
53039
|
-
noRowsTemplate: String
|
|
53335
|
+
noRowsTemplate: String,
|
|
53336
|
+
watermark: String
|
|
53040
53337
|
},
|
|
53041
53338
|
data() {
|
|
53042
53339
|
function isPC() {
|
|
@@ -53245,6 +53542,9 @@ const __vue2_script$14 = {
|
|
|
53245
53542
|
} else {
|
|
53246
53543
|
return this.tableData;
|
|
53247
53544
|
}
|
|
53545
|
+
},
|
|
53546
|
+
shareFullSreen() {
|
|
53547
|
+
return this.$store.state.app.isFullSreen;
|
|
53248
53548
|
}
|
|
53249
53549
|
},
|
|
53250
53550
|
watch: {
|
|
@@ -53654,7 +53954,13 @@ const __vue2_script$14 = {
|
|
|
53654
53954
|
toggleFullScreen() {
|
|
53655
53955
|
if (top !== self) {
|
|
53656
53956
|
top.toggleFullScreen();
|
|
53957
|
+
if (!this.shareFullSreen) {
|
|
53958
|
+
this.$nextTick(() => {
|
|
53959
|
+
top.document.getElementsByClassName("fullscreen-fixed")[0].style.zIndex = 1e5;
|
|
53960
|
+
});
|
|
53961
|
+
}
|
|
53657
53962
|
}
|
|
53963
|
+
this.$store.dispatch("updateIsFullSreen", !this.shareFullSreen);
|
|
53658
53964
|
this.fullSreen = !this.fullSreen;
|
|
53659
53965
|
},
|
|
53660
53966
|
getRowHeight() {
|
|
@@ -53751,6 +54057,7 @@ const __vue2_script$14 = {
|
|
|
53751
54057
|
minWidth: column.minWidth ? parseInt(column.minWidth) - (this.getTheme == "ind-small-theme" ? 10 : 0) : column.minWidth,
|
|
53752
54058
|
maxWidth: column.maxWidth ? parseInt(column.maxWidth) - (this.getTheme == "ind-small-theme" ? 10 : 0) : column.maxWidth,
|
|
53753
54059
|
pinned: column.fixed || column.pinned,
|
|
54060
|
+
align: column.align || "left",
|
|
53754
54061
|
cellDataType: column.cellDataType || "text",
|
|
53755
54062
|
headerTooltip: (_c = (_b = (_a = this.$store) == null ? void 0 : _a.getters) == null ? void 0 : _b.getIndexDesc) == null ? void 0 : _c[column.standardField || column.key || column.field],
|
|
53756
54063
|
suppressStickyLabel: true,
|
|
@@ -61990,8 +62297,8 @@ const __vue2_script$v = {
|
|
|
61990
62297
|
this.$refs.dropdown.$el.scrollTop += topOverflowDistance;
|
|
61991
62298
|
}
|
|
61992
62299
|
},
|
|
61993
|
-
dropVisible(
|
|
61994
|
-
this.broadcast("IndDrop",
|
|
62300
|
+
dropVisible(open2) {
|
|
62301
|
+
this.broadcast("IndDrop", open2 ? "on-update-popper" : "on-destroy-popper");
|
|
61995
62302
|
},
|
|
61996
62303
|
selectOptions() {
|
|
61997
62304
|
if (this.hasExpectedValue && this.selectOptions.length > 0) {
|
|
@@ -71623,7 +71930,8 @@ var app = {
|
|
|
71623
71930
|
collectMenuList: [],
|
|
71624
71931
|
maxTabNum: 5,
|
|
71625
71932
|
theme: getDefaultTheme(),
|
|
71626
|
-
indexDesc: {}
|
|
71933
|
+
indexDesc: {},
|
|
71934
|
+
isFullSreen: false
|
|
71627
71935
|
},
|
|
71628
71936
|
getters: {
|
|
71629
71937
|
getAppInfo(state) {
|
|
@@ -71769,6 +72077,9 @@ var app = {
|
|
|
71769
72077
|
},
|
|
71770
72078
|
setIndexDesc(state, indexDesc) {
|
|
71771
72079
|
state.indexDesc = indexDesc;
|
|
72080
|
+
},
|
|
72081
|
+
setIsFullSreen(state, value) {
|
|
72082
|
+
state.isFullSreen = value;
|
|
71772
72083
|
}
|
|
71773
72084
|
},
|
|
71774
72085
|
actions: {
|
|
@@ -71892,6 +72203,9 @@ var app = {
|
|
|
71892
72203
|
)
|
|
71893
72204
|
);
|
|
71894
72205
|
return data;
|
|
72206
|
+
},
|
|
72207
|
+
updateIsFullSreen({ commit: commit2 }, value) {
|
|
72208
|
+
commit2("setIsFullSreen", value);
|
|
71895
72209
|
}
|
|
71896
72210
|
}
|
|
71897
72211
|
};
|