From 5a74b0d3821d0e99b7092cb8487dcea4ad44dabd Mon Sep 17 00:00:00 2001
From: liushiwei <499672082@qq.com>
Date: Sun, 27 Oct 2024 18:30:18 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../dist/vue-plugin-hiprint.js | 55932 +---------------
src/router/index.js | 5 +
src/view/Home.vue | 3 +-
src/view/product/PriceDown.vue | 265 +
4 files changed, 274 insertions(+), 55931 deletions(-)
create mode 100644 src/view/product/PriceDown.vue
diff --git a/node_modules/vue-plugin-hiprint/dist/vue-plugin-hiprint.js b/node_modules/vue-plugin-hiprint/dist/vue-plugin-hiprint.js
index c023199..546f676 100644
--- a/node_modules/vue-plugin-hiprint/dist/vue-plugin-hiprint.js
+++ b/node_modules/vue-plugin-hiprint/dist/vue-plugin-hiprint.js
@@ -1,55930 +1,2 @@
-! function (t, e) {
- "object" == typeof exports && "object" == typeof module ? module.exports = e(require("jquery"), require("jsbarcode"), require("socket.io-client"), require("jspdf"), require("html2canvas"), require("canvg")) : "function" == typeof define && define.amd ? define("vue-plugin-hiprint", ["jquery", "jsbarcode", "socket.io-client", "jspdf", "html2canvas", "canvg"], e) : "object" == typeof exports ? exports["vue-plugin-hiprint"] = e(require("jquery"), require("jsbarcode"), require("socket.io-client"), require("jspdf"), require("html2canvas"), require("canvg")) : t["vue-plugin-hiprint"] = e(t.jQuery, t.JsBarcode, t.io, t.jspdf, t.html2canvas, t.canvg)
-}(window, function (__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__106__, __WEBPACK_EXTERNAL_MODULE__157__, __WEBPACK_EXTERNAL_MODULE__160__, __WEBPACK_EXTERNAL_MODULE__161__, __WEBPACK_EXTERNAL_MODULE__162__) {
- return function (i) {
- var n = {};
-
- function r(t) {
- var e;
- return (n[t] || (e = n[t] = {
- i: t,
- l: !1,
- exports: {}
- }, i[t].call(e.exports, e, e.exports, r), e.l = !0, e)).exports
- }
- return r.m = i, r.c = n, r.d = function (t, e, i) {
- r.o(t, e) || Object.defineProperty(t, e, {
- enumerable: !0,
- get: i
- })
- }, r.r = function (t) {
- "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
- value: "Module"
- }), Object.defineProperty(t, "__esModule", {
- value: !0
- })
- }, r.t = function (e, t) {
- if (1 & t && (e = r(e)), 8 & t) return e;
- if (4 & t && "object" == typeof e && e && e.__esModule) return e;
- var i = Object.create(null);
- if (r.r(i), Object.defineProperty(i, "default", {
- enumerable: !0,
- value: e
- }), 2 & t && "string" != typeof e)
- for (var n in e) r.d(i, n, function (t) {
- return e[t]
- }.bind(null, n));
- return i
- }, r.n = function (t) {
- var e = t && t.__esModule ? function () {
- return t.default
- } : function () {
- return t
- };
- return r.d(e, "a", e), e
- }, r.o = function (t, e) {
- return Object.prototype.hasOwnProperty.call(t, e)
- }, r.p = "/dist/", r(r.s = 165)
- }([function (t, e) {
- t.exports = __WEBPACK_EXTERNAL_MODULE__0__
- }, function (t, e, i) {
- "use strict";
- var i = i(56),
- n = Function.prototype,
- r = n.call,
- n = i && n.bind.bind(r, r);
- t.exports = i ? n : function (t) {
- return function () {
- return r.apply(t, arguments)
- }
- }
- }, function (t, e, i) {
- "use strict";
- t.exports = function (t) {
- try {
- return !!t()
- } catch (t) {
- return !0
- }
- }
- }, function (t, e, i) {
- "use strict";
- var l = i(4),
- p = i(36).f,
- d = i(24),
- u = i(15),
- f = i(80),
- h = i(84),
- m = i(86);
- t.exports = function (t, e) {
- var i, n, r, a = t.target,
- o = t.global,
- s = t.stat,
- c = o ? l : s ? l[a] || f(a, {}) : (l[a] || {}).prototype;
- if (c)
- for (i in e) {
- if (n = e[i], r = t.dontCallGetSet ? (r = p(c, i)) && r.value : c[i], !m(o ? i : a + (s ? "." : "#") + i, t.forced) && void 0 !== r) {
- if (typeof n == typeof r) continue;
- h(n, r)
- } (t.sham || r && r.sham) && d(n, "sham", !0), u(c, i, n, t)
- }
- }
- }, function (i, t, e) {
- "use strict";
- ! function (t) {
- function e(t) {
- return t && t.Math === Math && t
- }
- i.exports = e("object" == typeof globalThis && globalThis) || e("object" == typeof window && window) || e("object" == typeof self && self) || e("object" == typeof t && t) || function () {
- return this
- }() || this || Function("return this")()
- }.call(this, e(168))
- }, function (t, e, i) {
- "use strict";
- i = i(2);
- t.exports = !i(function () {
- return 7 !== Object.defineProperty({}, 1, {
- get: function () {
- return 7
- }
- })[1]
- })
- }, function (t, e, i) {
- "use strict";
- var n = i(4),
- r = i(39),
- a = i(9),
- o = i(81),
- s = i(37),
- i = i(110),
- c = n.Symbol,
- l = r("wks"),
- p = i ? c.for || c : c && c.withoutSetter || o;
- t.exports = function (t) {
- return a(l, t) || (l[t] = s && a(c, t) ? c[t] : p("Symbol." + t)), l[t]
- }
- }, function (t, e, i) {
- "use strict";
- var n = i(49),
- r = String;
- t.exports = function (t) {
- if ("Symbol" === n(t)) throw new TypeError("Cannot convert a Symbol value to a string");
- return r(t)
- }
- }, function (t, e, i) {
- "use strict";
- var i = i(109),
- n = i.all;
- t.exports = i.IS_HTMLDDA ? function (t) {
- return "function" == typeof t || t === n
- } : function (t) {
- return "function" == typeof t
- }
- }, function (t, e, i) {
- "use strict";
- var n = i(1),
- r = i(16),
- a = n({}.hasOwnProperty);
- t.exports = Object.hasOwn || function (t, e) {
- return a(r(t), e)
- }
- }, function (t, e, i) {
- "use strict";
- var i = i(56),
- n = Function.prototype.call;
- t.exports = i ? n.bind(n) : function () {
- return n.apply(n, arguments)
- }
- }, function (t, e, i) {
- "use strict";
- var n = i(13),
- r = String,
- a = TypeError;
- t.exports = function (t) {
- if (n(t)) return t;
- throw new a(r(t) + " is not an object")
- }
- }, function (t, e, i) {
- "use strict";
- var n = i(5),
- r = i(111),
- a = i(112),
- o = i(11),
- s = i(58),
- c = TypeError,
- l = Object.defineProperty,
- p = Object.getOwnPropertyDescriptor,
- d = "enumerable",
- u = "configurable",
- f = "writable";
- e.f = n ? a ? function (t, e, i) {
- var n;
- return o(t), e = s(e), o(i), "function" == typeof t && "prototype" === e && "value" in i && f in i && !i[f] && (n = p(t, e)) && n[f] && (t[e] = i.value, i = {
- configurable: (u in i ? i : n)[u],
- enumerable: (d in i ? i : n)[d],
- writable: !1
- }), l(t, e, i)
- } : l : function (t, e, i) {
- if (o(t), e = s(e), o(i), r) try {
- return l(t, e, i)
- } catch (t) { }
- if ("get" in i || "set" in i) throw new c("Accessors not supported");
- return "value" in i && (t[e] = i.value), t
- }
- }, function (t, e, i) {
- "use strict";
- var n = i(8),
- i = i(109),
- r = i.all;
- t.exports = i.IS_HTMLDDA ? function (t) {
- return "object" == typeof t ? null !== t : n(t) || t === r
- } : function (t) {
- return "object" == typeof t ? null !== t : n(t)
- }
- }, function (t, e, i) {
- "use strict";
- var n = i(4),
- r = i(8);
- t.exports = function (t, e) {
- return arguments.length < 2 ? (i = n[t], r(i) ? i : void 0) : n[t] && n[t][e];
- var i
- }
- }, function (t, e, i) {
- "use strict";
- var o = i(8),
- s = i(12),
- c = i(83),
- l = i(80);
- t.exports = function (t, e, i, n) {
- var r = (n = n || {}).enumerable,
- a = void 0 !== n.name ? n.name : e;
- if (o(i) && c(i, a, n), n.global) r ? t[e] = i : l(e, i);
- else {
- try {
- n.unsafe ? t[e] && (r = !0) : delete t[e]
- } catch (t) { }
- r ? t[e] = i : s.f(t, e, {
- value: i,
- enumerable: !1,
- configurable: !n.nonConfigurable,
- writable: !n.nonWritable
- })
- }
- return t
- }
- }, function (t, e, i) {
- "use strict";
- var n = i(17),
- r = Object;
- t.exports = function (t) {
- return r(n(t))
- }
- }, function (t, e, i) {
- "use strict";
- var n = i(32),
- r = TypeError;
- t.exports = function (t) {
- if (n(t)) throw new r("Can't call method on " + t);
- return t
- }
- }, function (t, e, i) {
- "use strict";
- t.exports = !1
- }, function (module, __webpack_exports__, __webpack_require__) {
- "use strict";
- ! function (jQuery) {
- __webpack_require__.d(__webpack_exports__, "b", function () {
- return hiprint
- }), __webpack_require__.d(__webpack_exports__, "a", function () {
- return defaultElementTypeProvider
- });
- var _home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(35),
- _home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23),
- _home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26),
- core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(166),
- core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_3___default = __webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_3__),
- core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(181),
- core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_4___default = __webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_4__),
- core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89),
- core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5___default = __webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__),
- core_js_modules_es_symbol_has_instance_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(183),
- core_js_modules_es_symbol_has_instance_js__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(core_js_modules_es_symbol_has_instance_js__WEBPACK_IMPORTED_MODULE_6__),
- core_js_modules_es_function_has_instance_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(184),
- core_js_modules_es_function_has_instance_js__WEBPACK_IMPORTED_MODULE_7___default = __webpack_require__.n(core_js_modules_es_function_has_instance_js__WEBPACK_IMPORTED_MODULE_7__),
- core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(186),
- core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_8___default = __webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_8__),
- core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(122),
- core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9___default = __webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__),
- core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(189),
- core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = __webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__),
- core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(190),
- core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_11___default = __webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_11__),
- core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(54),
- core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_12___default = __webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_12__),
- core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(131),
- core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_13___default = __webpack_require__.n(core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_13__),
- core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(192),
- core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_14___default = __webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_14__),
- core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(98),
- core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15___default = __webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15__),
- core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(194),
- core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_16___default = __webpack_require__.n(core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_16__),
- core_js_modules_es_regexp_dot_all_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(196),
- core_js_modules_es_regexp_dot_all_js__WEBPACK_IMPORTED_MODULE_17___default = __webpack_require__.n(core_js_modules_es_regexp_dot_all_js__WEBPACK_IMPORTED_MODULE_17__),
- core_js_modules_es_regexp_sticky_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(197),
- core_js_modules_es_regexp_sticky_js__WEBPACK_IMPORTED_MODULE_18___default = __webpack_require__.n(core_js_modules_es_regexp_sticky_js__WEBPACK_IMPORTED_MODULE_18__),
- core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(134),
- core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_19___default = __webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_19__),
- core_js_modules_es_symbol_to_string_tag_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(198),
- core_js_modules_es_symbol_to_string_tag_js__WEBPACK_IMPORTED_MODULE_20___default = __webpack_require__.n(core_js_modules_es_symbol_to_string_tag_js__WEBPACK_IMPORTED_MODULE_20__),
- core_js_modules_es_json_to_string_tag_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(199),
- core_js_modules_es_json_to_string_tag_js__WEBPACK_IMPORTED_MODULE_21___default = __webpack_require__.n(core_js_modules_es_json_to_string_tag_js__WEBPACK_IMPORTED_MODULE_21__),
- core_js_modules_es_math_to_string_tag_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(200),
- core_js_modules_es_math_to_string_tag_js__WEBPACK_IMPORTED_MODULE_22___default = __webpack_require__.n(core_js_modules_es_math_to_string_tag_js__WEBPACK_IMPORTED_MODULE_22__),
- core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(135),
- core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_23___default = __webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_23__),
- core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(201),
- core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_24___default = __webpack_require__.n(core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_24__),
- core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(138),
- core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_25___default = __webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_25__),
- core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(202),
- core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_26___default = __webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_26__),
- core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(120),
- core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_27___default = __webpack_require__.n(core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_27__),
- core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(203),
- core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_28___default = __webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_28__),
- core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(101),
- core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_29___default = __webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_29__),
- core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(139),
- core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_30___default = __webpack_require__.n(core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_30__),
- core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(204),
- core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_31___default = __webpack_require__.n(core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_31__),
- core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(206),
- core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_32___default = __webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_32__),
- core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(141),
- core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_33___default = __webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_33__),
- core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(207),
- core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_34___default = __webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_34__),
- core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(208),
- core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_35___default = __webpack_require__.n(core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_35__),
- core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(142),
- core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_36___default = __webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_36__),
- core_js_modules_es_string_fixed_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(209),
- core_js_modules_es_string_fixed_js__WEBPACK_IMPORTED_MODULE_37___default = __webpack_require__.n(core_js_modules_es_string_fixed_js__WEBPACK_IMPORTED_MODULE_37__),
- core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(210),
- core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_38___default = __webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_38__),
- core_js_modules_es_object_proto_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(211),
- core_js_modules_es_object_proto_js__WEBPACK_IMPORTED_MODULE_39___default = __webpack_require__.n(core_js_modules_es_object_proto_js__WEBPACK_IMPORTED_MODULE_39__),
- core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(212),
- core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_40___default = __webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_40__),
- core_js_modules_es_array_fill_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(213),
- core_js_modules_es_array_fill_js__WEBPACK_IMPORTED_MODULE_41___default = __webpack_require__.n(core_js_modules_es_array_fill_js__WEBPACK_IMPORTED_MODULE_41__),
- core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(147),
- core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_42___default = __webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_42__),
- core_js_modules_es_array_find_index_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(215),
- core_js_modules_es_array_find_index_js__WEBPACK_IMPORTED_MODULE_43___default = __webpack_require__.n(core_js_modules_es_array_find_index_js__WEBPACK_IMPORTED_MODULE_43__),
- core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(148),
- core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_44___default = __webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_44__),
- core_js_modules_es_string_ends_with_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(220),
- core_js_modules_es_string_ends_with_js__WEBPACK_IMPORTED_MODULE_45___default = __webpack_require__.n(core_js_modules_es_string_ends_with_js__WEBPACK_IMPORTED_MODULE_45__),
- core_js_modules_es_string_trim_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(221),
- core_js_modules_es_string_trim_js__WEBPACK_IMPORTED_MODULE_46___default = __webpack_require__.n(core_js_modules_es_string_trim_js__WEBPACK_IMPORTED_MODULE_46__),
- core_js_modules_es_string_link_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(223),
- core_js_modules_es_string_link_js__WEBPACK_IMPORTED_MODULE_47___default = __webpack_require__.n(core_js_modules_es_string_link_js__WEBPACK_IMPORTED_MODULE_47__),
- core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(224),
- core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_48___default = __webpack_require__.n(core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_48__),
- core_js_modules_web_btoa_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(228),
- core_js_modules_web_btoa_js__WEBPACK_IMPORTED_MODULE_49___default = __webpack_require__.n(core_js_modules_web_btoa_js__WEBPACK_IMPORTED_MODULE_49__),
- core_js_modules_web_dom_exception_constructor_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(229),
- core_js_modules_web_dom_exception_constructor_js__WEBPACK_IMPORTED_MODULE_50___default = __webpack_require__.n(core_js_modules_web_dom_exception_constructor_js__WEBPACK_IMPORTED_MODULE_50__),
- core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(233),
- core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_51___default = __webpack_require__.n(core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_51__),
- core_js_modules_web_dom_exception_to_string_tag_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(234),
- core_js_modules_web_dom_exception_to_string_tag_js__WEBPACK_IMPORTED_MODULE_52___default = __webpack_require__.n(core_js_modules_web_dom_exception_to_string_tag_js__WEBPACK_IMPORTED_MODULE_52__),
- core_js_modules_web_atob_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(235),
- core_js_modules_web_atob_js__WEBPACK_IMPORTED_MODULE_53___default = __webpack_require__.n(core_js_modules_web_atob_js__WEBPACK_IMPORTED_MODULE_53__),
- core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(236),
- core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_54___default = __webpack_require__.n(core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_54__),
- core_js_modules_web_url_search_params_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(245),
- core_js_modules_web_url_search_params_js__WEBPACK_IMPORTED_MODULE_55___default = __webpack_require__.n(core_js_modules_web_url_search_params_js__WEBPACK_IMPORTED_MODULE_55__),
- core_js_modules_web_url_search_params_delete_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(246),
- core_js_modules_web_url_search_params_delete_js__WEBPACK_IMPORTED_MODULE_56___default = __webpack_require__.n(core_js_modules_web_url_search_params_delete_js__WEBPACK_IMPORTED_MODULE_56__),
- core_js_modules_web_url_search_params_has_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(247),
- core_js_modules_web_url_search_params_has_js__WEBPACK_IMPORTED_MODULE_57___default = __webpack_require__.n(core_js_modules_web_url_search_params_has_js__WEBPACK_IMPORTED_MODULE_57__),
- core_js_modules_web_url_search_params_size_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(248),
- core_js_modules_web_url_search_params_size_js__WEBPACK_IMPORTED_MODULE_58___default = __webpack_require__.n(core_js_modules_web_url_search_params_size_js__WEBPACK_IMPORTED_MODULE_58__),
- core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(249),
- core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_59___default = __webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_59__),
- jquery__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(0),
- jquery__WEBPACK_IMPORTED_MODULE_60___default = __webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_60__),
- _claviska_jquery_minicolors_jquery_minicolors_min__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(252),
- _claviska_jquery_minicolors_jquery_minicolors_min__WEBPACK_IMPORTED_MODULE_61___default = __webpack_require__.n(_claviska_jquery_minicolors_jquery_minicolors_min__WEBPACK_IMPORTED_MODULE_61__),
- jsbarcode__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(106),
- jsbarcode__WEBPACK_IMPORTED_MODULE_62___default = __webpack_require__.n(jsbarcode__WEBPACK_IMPORTED_MODULE_62__),
- _plugins_qrcode_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(253),
- _plugins_qrcode_js__WEBPACK_IMPORTED_MODULE_63___default = __webpack_require__.n(_plugins_qrcode_js__WEBPACK_IMPORTED_MODULE_63__),
- bwip_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(107),
- bwip_js__WEBPACK_IMPORTED_MODULE_64___default = __webpack_require__.n(bwip_js__WEBPACK_IMPORTED_MODULE_64__),
- _plugins_watermark_js__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(77),
- socket_io_client__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(157),
- socket_io_client__WEBPACK_IMPORTED_MODULE_66___default = __webpack_require__.n(socket_io_client__WEBPACK_IMPORTED_MODULE_66__),
- _css_image_l_img_svg__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(158),
- _css_image_l_img_svg__WEBPACK_IMPORTED_MODULE_67___default = __webpack_require__.n(_css_image_l_img_svg__WEBPACK_IMPORTED_MODULE_67__),
- _css_image_v_img_svg__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(159),
- _css_image_v_img_svg__WEBPACK_IMPORTED_MODULE_68___default = __webpack_require__.n(_css_image_v_img_svg__WEBPACK_IMPORTED_MODULE_68__),
- jspdf__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(160),
- jspdf__WEBPACK_IMPORTED_MODULE_69___default = __webpack_require__.n(jspdf__WEBPACK_IMPORTED_MODULE_69__),
- html2canvas__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(161),
- html2canvas__WEBPACK_IMPORTED_MODULE_70___default = __webpack_require__.n(html2canvas__WEBPACK_IMPORTED_MODULE_70__),
- nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(27),
- nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default = __webpack_require__.n(nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71__),
- canvg__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(162),
- canvg__WEBPACK_IMPORTED_MODULE_72___default = __webpack_require__.n(canvg__WEBPACK_IMPORTED_MODULE_72__),
- _etypes_default_etyps_provider__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(163);
-
- function _instanceof(t, e) {
- return null != e && "undefined" != typeof Symbol && e[Symbol.hasInstance] ? !!e[Symbol.hasInstance](t) : t instanceof e
- }
-
- function _typeof(t) {
- return (_typeof = "function" == typeof Symbol && "symbol" === Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_2__.a)(Symbol.iterator) ? function (t) {
- return Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_2__.a)(t)
- } : function (t) {
- return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_2__.a)(t)
- })(t)
- }
- window.$ = window.jQuery = jquery__WEBPACK_IMPORTED_MODULE_60___default.a, window.autoConnect = !0, window.io = socket_io_client__WEBPACK_IMPORTED_MODULE_66__.io;
- var languages = {},
- ctx = __webpack_require__(254),
- i18n = (ctx.keys().forEach(function (t) {
- languages[t.match(/\.\/([^.]+)/)[1]] = ctx(t)
- }), {
- lang: "cn",
- languages: languages,
- __: function (t, e) {
- var i = this.languages[this.lang][t] || t;
- return e && e instanceof Object ? (Object.keys(e).forEach(function (t) {
- i = i.replace(new RegExp("{{".concat(t, "}}"), "g"), e[t])
- }), i) : e ? i = i.replace(/%s/g, e) : i
- },
- __n: function (t, e) {
- return this.languages[this.lang][t].replace(/%s/g, e)
- }
- }),
- hiprint = function (i) {
- var n = {};
-
- function r(t) {
- var e;
- return (n[t] || (e = n[t] = {
- i: t,
- l: !1,
- exports: {}
- }, i[t].call(e.exports, e, e.exports, r), e.l = !0, e)).exports
- }
- return r.m = i, r.c = n, r.d = function (t, e, i) {
- r.o(t, e) || Object.defineProperty(t, e, {
- enumerable: !0,
- get: i
- })
- }, r.r = function (t) {
- "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
- value: "Module"
- }), Object.defineProperty(t, "__esModule", {
- value: !0
- })
- }, r.t = function (e, t) {
- if (1 & t && (e = r(e)), 8 & t) return e;
- if (4 & t && "object" == _typeof(e) && e && e.__esModule) return e;
- var i = Object.create(null);
- if (r.r(i), Object.defineProperty(i, "default", {
- enumerable: !0,
- value: e
- }), 2 & t && "string" != typeof e)
- for (var n in e) r.d(i, n, function (t) {
- return e[t]
- }.bind(null, n));
- return i
- }, r.n = function (t) {
- var e = t && t.__esModule ? function () {
- return t.default
- } : function () {
- return t
- };
- return r.d(e, "a", e), e
- }, r.o = function (t, e) {
- return Object.prototype.hasOwnProperty.call(t, e)
- }, r.p = "/", r(r.s = 21)
- }([function (t, e, i) {
- var a;
- i.d(e, "a", function () {
- return hinnn
- }), window.hinnn = {}, hinnn.event = (a = {}, {
- on: function (t, e) {
- a[t] || (a[t] = []), a[t].push(e)
- },
- id: 0,
- off: function (t, e) {
- var i = a[t];
- if (i) {
- for (var n = -1, r = 0; r < i.length; r++)
- if (i[r] === e) {
- n = r;
- break
- } n < 0 || a[t].splice(n, 1)
- }
- },
- trigger: function (t) {
- var e = a[t];
- if (e && e.length)
- for (var i = Array.prototype.slice.call(arguments, 1), n = 0; n < e.length; n++) e[n].apply(this, i)
- },
- clear: function (t) {
- a[t] = []
- },
- getId: function () {
- return this.id += 1, this.id
- },
- getNameWithId: function (t) {
- return t + "-" + this.getId()
- }
- }), hinnn.form = {
- serialize: function (t) {
- var t = jquery__WEBPACK_IMPORTED_MODULE_60___default()(t).serializeArray(),
- e = {};
- return jquery__WEBPACK_IMPORTED_MODULE_60___default.a.each(t, function () {
- e[this.name] ? "[object Array]" == Object.prototype.toString.call(e[this.name]) ? e[this.name].push(this.value) : e[this.name] = [e[this.name], this.value] : e[this.name] = this.value
- }), e
- }
- }, hinnn.pt = {
- toPx: function (t) {
- return t * (this.getDpi() / 72)
- },
- toMm: function (t) {
- return hinnn.px.toMm(hinnn.pt.toPx(t))
- },
- dpi: 0,
- getDpi: function () {
- var t;
- return this.dpi || ((t = document.createElement("DIV")).style.cssText = "width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden", document.body.appendChild(t), this.dpi = t.offsetHeight), this.dpi
- }
- }, hinnn.px = {
- toPt: function (t) {
- return t * (72 / this.getDpi())
- },
- toMm: function (t) {
- return Math.round(t / this.getDpi() * 25.4 * 100) / 100
- },
- dpi: 0,
- getDpi: function () {
- var t;
- return this.dpi || ((t = document.createElement("DIV")).style.cssText = "width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden", document.body.appendChild(t), this.dpi = t.offsetHeight), this.dpi
- }
- }, hinnn.mm = {
- toPt: function (t) {
- return 72 / 25.4 * t
- },
- toPx: function (t) {
- return hinnn.pt.toPx(hinnn.mm.toPt(t))
- }
- }, hinnn.throttle = function (i, n, r) {
- function a() {
- p = !1 === r.leading ? 0 : _.now(), l = null, c = i.apply(o, s), l || (o = s = null)
- }
- var o, s, c, l = null,
- p = 0;
- r = r || {};
- return function () {
- var t = _.now(),
- e = (p || !1 !== r.leading || (p = t), n - (t - p));
- return o = this, s = arguments, e <= 0 || n < e ? (l && (clearTimeout(l), l = null), p = t, c = i.apply(o, s), l || (o = s = null)) : l || !1 === r.trailing || (l = setTimeout(a, e)), c
- }
- }, hinnn.debounce = function (e, i, n) {
- function r() {
- var t = _.now() - c;
- t < i && 0 <= t ? a = setTimeout(r, i - t) : (a = null, n || (l = e.apply(s, o), a) || (s = o = null))
- }
- var a, o, s, c, l;
- return function () {
- s = this, o = arguments, c = _.now();
- var t = n && !a;
- return a = a || setTimeout(r, i), t && (l = e.apply(s, o), s = o = null), l
- }
- }, hinnn.toUtf8 = function (t) {
- for (var e, i = "", n = t.length, r = 0; r < n; r++) 1 <= (e = t.charCodeAt(r)) && e <= 127 ? i += t.charAt(r) : (2047 < e ? i = (i += String.fromCharCode(224 | e >> 12 & 15)) + String.fromCharCode(128 | e >> 6 & 63) : i += String.fromCharCode(192 | e >> 6 & 31), i += String.fromCharCode(128 | e >> 0 & 63));
- return i
- }, hinnn.groupBy = function (t, n, r) {
- var a = {};
- return t.forEach(function (e) {
- var i = JSON.stringify(r(e));
- a[i] || (a[i] = {
- rows: []
- }, n.forEach(function (t) {
- a[i][t] = e[t]
- })), a[i].rows.push(e)
- }), Object.keys(a).map(function (t) {
- return a[t]
- })
- }, hinnn.orderBy = function (t, e) {
- if (t.length <= 1) return t;
- var i = Math.floor(t.length / 2),
- n = t.splice(i, 1)[0],
- r = [],
- a = [],
- o = !0,
- i = !1,
- s = void 0;
- try {
- for (var c, l = t[Symbol.iterator](); !(o = (c = l.next()).done); o = !0) {
- var p = c.value;
- (e(p) < e(n) ? r : a).push(p)
- }
- } catch (t) {
- i = !0, s = t
- } finally {
- try {
- o || null == l.return || l.return()
- } finally {
- if (i) throw s
- }
- }
- return this.orderBy(r, e).concat([n], this.orderBy(a, e))
- }, hinnn.dateFormat = function (t, e) {
- if (t) try {
- var i, n = "string" == typeof t ? new Date(t) : t,
- r = {
- "y+": n.getFullYear(),
- "M+": n.getMonth() + 1,
- "d+": n.getDate(),
- "H+": n.getHours(),
- "m+": n.getMinutes(),
- "s+": n.getSeconds(),
- "q+": Math.floor((n.getMonth() + 3) / 3),
- S: n.getMilliseconds()
- };
- for (i in /(y+)/.test(e) && (e = e.replace(RegExp.$1, (n.getFullYear() + "").substr(4 - RegExp.$1.length))), r) new RegExp("(" + i + ")").test(e) && (e = e.replace(RegExp.$1, 1 == RegExp.$1.length ? r[i] : ("00" + r[i]).substr(("" + r[i]).length)));
- return e
- } catch (t) { }
- return ""
- }, hinnn.numFormat = function (t, e) {
- if (null != t) try {
- var i = "string" == typeof t ? parseFloat(t) : t,
- n = parseInt(e);
- return 0 < n ? i.toFixed(n) : parseInt(i.toString())
- } catch (t) { }
- return ""
- }, hinnn.toUpperCase = function (t, e) {
- if (!nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a) return e;
- var i = e;
- switch (t) {
- case "0":
- i = nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a.cn.encodeS(e);
- break;
- case "1":
- i = nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a.cn.encodeS(e, {
- tenMin: !1
- });
- break;
- case "2":
- i = nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a.cn.encodeB(e, {
- tenMin: !0
- });
- break;
- case "3":
- i = nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a.cn.encodeB(e);
- break;
- case "4":
- i = nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a.cn.toMoney(e, {
- tenMin: !0
- });
- break;
- case "5":
- i = nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a.cn.toMoney(e);
- break;
- case "6":
- i = nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a.cn.toMoney(e, {
- complete: !0
- });
- break;
- case "7":
- i = nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a.cn.toMoney(e, {
- complete: !0,
- outSymbol: !1
- })
- }
- return i
- }
- }, function (t, e, i) {
- i.d(e, "a", function () {
- return r
- });
- var n = i(9),
- r = (a.prototype.init = function (t) {
- t && jquery__WEBPACK_IMPORTED_MODULE_60___default.a.extend(this, t)
- }, a.prototype.on = function (t, e) {
- hinnn.event.on(t, e)
- }, a.prototype.clear = function (t) {
- hinnn.event.clear(t)
- }, a.prototype.registerItems = function (t) {
- t.forEach(function (t) {
- n.a.registerItem(new t)
- })
- }, Object.defineProperty(a, "instance", {
- get: function () {
- return a._instance || (a._instance = new a, window.HIPRINT_CONFIG && jquery__WEBPACK_IMPORTED_MODULE_60___default.a.extend(a._instance, HIPRINT_CONFIG), a._instance.optionItems && a._instance.optionItems.forEach(function (t) {
- n.a.registerItem(new t)
- })), a._instance
- },
- enumerable: !0,
- configurable: !0
- }), a);
-
- function a() { }
- }, function (t, e, i) {
- r.prototype.updatePosition = function (t, e) {
- this.left = t, this.top = e
- };
- var n = r;
-
- function r(t) {
- this.printElement = t
- }
- i.d(e, "a", function () {
- return a
- });
- Object.defineProperty(o, "instance", {
- get: function () {
- return this._instance || (this._instance = new o), this._instance
- },
- enumerable: !0,
- configurable: !0
- }), o.prototype.getDragingPrintElement = function () {
- return o.instance.dragingPrintElement
- }, o.prototype.setDragingPrintElement = function (t) {
- o.instance.dragingPrintElement = new n(t)
- }, o.prototype.guid = function () {
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (t) {
- var e = 16 * Math.random() | 0;
- return ("x" == t ? e : 3 & e | 8).toString(16)
- })
- }, o.prototype.imageToBase64 = function (t) {
- if (-1 == jquery__WEBPACK_IMPORTED_MODULE_60___default()(t).attr("src").indexOf("base64")) try {
- var e = document.createElement("canvas"),
- i = new Image;
- i.src = t.attr("src"), e.width = i.width, e.height = i.height, e.getContext("2d").drawImage(i, 0, 0), t.attr("src", e.toDataURL("image/png"))
- } catch (e) {
- try {
- this.xhrLoadImage(t)
- } catch (t) { }
- }
- }, o.prototype.xhrLoadImage = function (t) { }, o.prototype.transformImg = function (t) {
- var i = this;
- t.map(function (t, e) {
- i.imageToBase64(jquery__WEBPACK_IMPORTED_MODULE_60___default()(e))
- })
- }, o.prototype.getPrintTemplateById = function (t) {
- return o.instance.printTemplateContainer[t]
- }, o.prototype.setPrintTemplateById = function (t, e) {
- return o.instance.printTemplateContainer[t] = e
- };
- var a = o;
-
- function o() {
- this.printTemplateContainer = {}, this.A1 = {
- width: 841,
- height: 594
- }, this.A2 = {
- width: 420,
- height: 594
- }, this.A3 = {
- width: 420,
- height: 297
- }, this.A4 = {
- width: 210,
- height: 297
- }, this.A5 = {
- width: 210,
- height: 148
- }, this.A6 = {
- width: 105,
- height: 148
- }, this.A7 = {
- width: 105,
- height: 74
- }, this.A8 = {
- width: 52,
- height: 74
- }, this.B1 = {
- width: 1e3,
- height: 707
- }, this.B2 = {
- width: 500,
- height: 707
- }, this.B3 = {
- width: 500,
- height: 353
- }, this.B4 = {
- width: 250,
- height: 353
- }, this.B5 = {
- width: 250,
- height: 176
- }, this.B6 = {
- width: 125,
- height: 176
- }, this.B7 = {
- width: 125,
- height: 88
- }, this.B8 = {
- width: 62,
- height: 88
- }, this.dragLengthCNum = function (t, e) {
- return Math.round(.75 * t / e) * e
- }
- }
- }, function (t, e, i) {
- var r = function () { },
- n = (i.d(e, "a", function () {
- return n
- }), a.prototype.setDefault = function (t) {
- var e = this;
- this.defaultOptions = t, this.initSize(), Object.keys(this.defaultOptions).forEach(function (t) {
- e[t] = e[t] || e.defaultOptions[t]
- })
- }, a.prototype.initSize = function () {
- this.width || this.setWidth(this.defaultOptions.width), this.height || this.setHeight(this.defaultOptions.height)
- }, a.prototype.initSizeByHtml = function (t, e) {
- this.width || this.setWidth(t), this.height || this.setHeight(e)
- }, a.prototype.getRectInfo = function () {
- var t, e, i, n, r, a, o = {
- w: 0,
- h: 0,
- diffW: 0,
- diffH: 0
- };
- return this.transform && (e = this.transform * Math.PI / 180, n = this.width, t = this.height, a = Math.sin(e), e = Math.cos(e), r = (n - (i = Math.abs(n * e) + Math.abs(t * a))) / 2, a = (t - (n = Math.abs(n * a) + Math.abs(t * e))) / 2, o.w = i, o.h = n, o.diffW = r, o.diffH = a), o
- }, a.prototype.getLeft = function () {
- return this.left
- }, a.prototype.posLeft = function () {
- var t = this.left;
- return this.transform && (t += this.getRectInfo().diffW), Math.floor(10 * t) / 10
- }, a.prototype.setRotate = function (t) {
- null != t && (this.transform = t)
- }, a.prototype.displayLeft = function (t) {
- return this.transform && t ? this.left + this.getRectInfo().diffW + "pt" : this.left + "pt"
- }, a.prototype.setLeft = function (t) {
- null != t && (this.left = t)
- }, a.prototype.getTop = function () {
- return this.top
- }, a.prototype.posTop = function () {
- var t = this.top;
- return this.transform && (t += this.getRectInfo().diffH), Math.floor(10 * t) / 10
- }, a.prototype.getTopInDesign = function () {
- return this.topInDesign
- }, a.prototype.displayTop = function (t) {
- return this.transform && t ? this.top + this.getRectInfo().diffH + "pt" : this.top + "pt"
- }, a.prototype.setTop = function (t) {
- null != t && (this.top = t)
- }, a.prototype.copyDesignTopFromTop = function () {
- this.topInDesign = this.top
- }, a.prototype.getHeight = function () {
- var t;
- return this.transform ? (t = this.getRectInfo()).h + t.diffH : this.height
- }, a.prototype.displayHeight = function () {
- return this.height + "pt"
- }, a.prototype.setHeight = function (t) {
- null != t && (this.height = t)
- }, a.prototype.getWidth = function () {
- var t;
- return this.transform ? (t = this.getRectInfo()).w + t.diffW : this.width
- }, a.prototype.displayWidth = function () {
- return this.width + "pt"
- }, a.prototype.setWidth = function (t) {
- null != t && (this.width = t)
- }, a.prototype.getValueFromOptionsOrDefault = function (t) {
- return (null == this[t] ? this.defaultOptions : this)[t]
- }, a.prototype.getPrintElementOptionEntity = function () {
- var i = new r,
- n = this;
- return Object.keys(this).filter(function (t) {
- return "topInDesign" != t
- }).forEach(function (t) {
- var e;
- "number" != typeof n[t] && "string" != typeof n[t] && !["fields"].includes(t) && _typeof(n[t]) != _typeof(!0) || (i[t] = n[t]), "style" == t && (i.style = {}, e = n[t]) && Object.keys(e).forEach(function (t) {
- "number" != typeof e[t] && "string" != typeof e[t] || (i.style[t] = e[t])
- })
- }), i
- }, a.prototype.init = function (e) {
- var i = this;
- e && Object.keys(e).forEach(function (t) {
- i[t] = e[t]
- })
- }, a);
-
- function a(t) {
- this.left = (t = t || {}).left, this.top = t.top, this.topInDesign = this.top, this.height = t.height, this.width = t.width, this.transform = t.transform, this.init(t)
- }
- }, function (module, __webpack_exports__, __webpack_require__) {
- __webpack_require__.d(__webpack_exports__, "a", function () {
- return BasePrintElement
- });
- var _entity_PrintElementEntity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17),
- _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1),
- _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9),
- _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6),
- _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0),
- _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8),
- _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2),
- BasePrintElement = function () {
- function BasePrintElement(t) {
- this.printElementType = t, this.id = _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.guid()
- }
- return BasePrintElement.prototype.getConfigOptionsByName = function (t) {
- return _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance[t]
- }, BasePrintElement.prototype.getProxyTarget = function (t) {
- t && this.SetProxyTargetOption(t);
- var t = this.getData(),
- e = this.createTarget(this.getTitle(), t);
- return this.updateTargetSize(e), this.css(e, t), e
- }, BasePrintElement.prototype.SetProxyTargetOption = function (t) {
- this.options.getPrintElementOptionEntity(), jquery__WEBPACK_IMPORTED_MODULE_60___default.a.extend(this.options, t), this.copyFromType()
- }, BasePrintElement.prototype.showInPage = function (t, e) {
- var i = this.options.showInPage,
- n = this.options.unShowInPage;
- if (i) {
- if ("first" == i) return 0 == t;
- if (t == e - 1 && "last" == n) return !1;
- if ("odd" == i) return (0 != t || "first" != n) && t % 2 == 0;
- if ("even" == i) return t % 2 == 1;
- if ("last" == i) return t == e - 1
- }
- return !(0 == t && "first" == n || t == e - 1 && "last" == n)
- }, BasePrintElement.prototype.setTemplateId = function (t) {
- this.templateId = t
- }, BasePrintElement.prototype.setPanel = function (t) {
- this.panel = t
- }, BasePrintElement.prototype.getField = function () {
- return this.options.field || this.printElementType.field
- }, BasePrintElement.prototype.getTitle = function () {
- return this.printElementType.title
- }, BasePrintElement.prototype.updateSizeAndPositionOptions = function (t, e, i, n) {
- this.options.setLeft(t), this.options.setTop(e), this.options.copyDesignTopFromTop(), this.options.setWidth(i), this.options.setHeight(n)
- }, BasePrintElement.prototype.initSizeByHtml = function (t) {
- t && t.length && (this.createTempContainer(), t = t.clone(), this.getTempContainer().append(t), this.options.initSizeByHtml(parseInt(hinnn.px.toPt(t.width()).toString()), parseInt(hinnn.px.toPt(t.height()).toString())), this.removeTempContainer())
- }, BasePrintElement.prototype.updateTargetSize = function (t) {
- t.css("width", this.options.displayWidth()), t.css("height", this.options.displayHeight())
- }, BasePrintElement.prototype.updateTargetWidth = function (t) {
- t.css("width", this.options.displayWidth())
- }, BasePrintElement.prototype.getDesignTarget = function (t) {
- var n = this,
- e = 0;
- return this.designTarget = this.getHtml(t)[0].target, this.designPaper = t, this.designTarget.click(function (t) {
- 500 < t.timeStamp - e && hinnn.event.trigger(n.getPrintElementSelectEventKey(), {
- printElement: n
- }), e = t.timeStamp
- }), this.designTarget.dblclick(function (t) {
- var e, i = n.designTarget.find(".hiprint-printElement-content");
- i && (e = n.designTarget.find(".resize-panel"), "text" != n.printElementType.type || n.options.textType && "text" != n.options.textType || (n._editing = !0, n.designTarget.hidraggable("update", {
- draggable: !1
- }), i.css("cursor", "text"), i.addClass("editing"), n.designTarget.addClass("editing"), i.click(function (t) {
- n._editing && t.stopPropagation()
- }), i.attr("contenteditable", !0), e && e.css("display", "none"), n.selectEnd(i)))
- }), this.designTarget
- }, BasePrintElement.prototype.selectEnd = function (t) {
- var e, i;
- t.focus(), void 0 !== window.getSelection && void 0 !== document.createRange ? ((i = document.createRange()).selectNodeContents(t[0]), i.collapse(!1), (e = window.getSelection()).removeAllRanges(), e.addRange(i)) : void 0 !== document.body.createTextRange && ((i = document.body.createTextRange()).moveToElementText(t[0]), i.collapse(!1), i.select())
- }, BasePrintElement.prototype.updateByContent = function (t) {
- var e, i = this,
- n = i.designTarget.find(".hiprint-printElement-content");
- i._editing && (n && n.css("cursor", "") && n.removeClass("editing") && n.removeAttr("contenteditable"), i.designTarget.removeClass("editing"), n = n.text(), e = i.options.title + ":", n.startsWith(e) && i.options.field ? n.length > e.length ? i.options.testData = n.split(":")[1] : (i.options.title = n, i.options.testData = "") : i.options.title = n, t || hinnn.event.trigger(i.getPrintElementSelectEventKey(), {
- printElement: i
- }), i.updateDesignViewFromOptions(), hinnn.event.trigger("hiprintTemplateDataChanged_" + i.templateId, "编辑修改"), i._editing = !1, e = null == i.options.draggable || 1 == i.options.draggable, i.designTarget.hidraggable("update", {
- draggable: e
- }))
- }, BasePrintElement.prototype.getPrintElementSelectEventKey = function () {
- return "PrintElementSelectEventKey_" + this.templateId
- }, BasePrintElement.prototype.design = function (t, c) {
- var l = this;
- this.designTarget.hidraggable({
- draggable: l.options.draggable,
- axis: l.options.axis || void 0,
- designTarget: l,
- onDrag: function (t, e, i) {
- var n, r, a = l.panel.printElements.filter(function (t) {
- return "block" == t.designTarget.children().last().css("display") && t.designTarget.children().last().hasClass("selected") && !t.printElementType.type.includes("table")
- }),
- o = 1 < a.length,
- s = !l.designTarget.children().last().hasClass("selected");
- o && (n = e - l.options.left, r = i - l.options.top, a.forEach(function (t) {
- t.updateSizeAndPositionOptions(n + t.options.getLeft(), r + t.options.getTop()), t.designTarget.css("left", t.options.displayLeft()), t.designTarget.css("top", t.options.displayTop()), t.createLineOfPosition(c)
- }), !s) || (l.updateSizeAndPositionOptions(e, i), l.createLineOfPosition(c)), _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.changed = !0
- },
- moveUnit: "pt",
- minMove: _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance,
- onBeforeDrag: function (t) {
- _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !0, l.designTarget.focus(), l.createLineOfPosition(c)
- },
- getScale: function () {
- return l.designPaper.scale || 1
- },
- onStopDrag: function (t) {
- _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.changed && hinnn.event.trigger("hiprintTemplateDataChanged_" + l.templateId, "移动"), _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !1, _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.changed = !1;
- var e = l.panel.printElements.filter(function (t) {
- return "block" == t.designTarget.children().last().css("display") && !t.printElementType.type.includes("table")
- });
- 1 < e.length ? e.forEach(function (t) {
- t.removeLineOfPosition()
- }) : l.removeLineOfPosition()
- }
- }), this.setResizePanel(), this.bingCopyEvent(this.designTarget), this.bingKeyboardMoveEvent(this.designTarget, c)
- }, BasePrintElement.prototype.getPrintElementEntity = function (t) {
- return t ? new _entity_PrintElementEntity__WEBPACK_IMPORTED_MODULE_0__.a(void 0, this.options.getPrintElementOptionEntity(), this.printElementType.getPrintElementTypeEntity()) : new _entity_PrintElementEntity__WEBPACK_IMPORTED_MODULE_0__.a(this.printElementType.tid, this.options.getPrintElementOptionEntity())
- }, BasePrintElement.prototype.submitOption = function () {
- var r = this,
- t = this.getConfigOptions();
- t && t.tabs && t.tabs.length ? this.getPrintElementOptionTabs().forEach(function (t) {
- t.list.forEach(function (t) {
- var e = t.getValue(),
- i = "textType" == t.name && r.options[t.name] !== e,
- n = "axis" == t.name && r.options[t.name] !== e;
- e && "object" == _typeof(e) ? Object.keys(e).forEach(function (t) {
- r.options[t] = e[t]
- }) : r.options[t.name] = e, i && r.setResizePanel(), n && r.designTarget.hidraggable("update", {
- axis: e
- })
- })
- }) : this.getPrintElementOptionItems().forEach(function (t) {
- var e = t.getValue(),
- i = "textType" == t.name && r.options[t.name] !== e,
- n = "axis" == t.name && r.options[t.name] !== e;
- e && "object" == _typeof(e) ? Object.keys(e).forEach(function (t) {
- r.options[t] = e[t]
- }) : r.options[t.name] = e, i && r.setResizePanel(), n && r.designTarget.hidraggable("update", {
- axis: e
- })
- }), this.updateDesignViewFromOptions(), hinnn.event.trigger("hiprintTemplateDataChanged_" + this.templateId, "元素修改")
- }, BasePrintElement.prototype.updateOption = function (t, e, i) {
- try {
- var n = this.getConfigOptions(),
- r = [];
- n && n.tabs && n.tabs.length ? n.tabs.forEach(function (t) {
- t.options.forEach(function (t) {
- r.push(t.name)
- })
- }) : r = n.supportOptions.map(function (t) {
- return t.name
- }), r && r.includes(t) && (this.options[t] = e, this.updateDesignViewFromOptions(), i || hinnn.event.trigger("hiprintTemplateDataChanged_" + this.templateId, "参数修改"))
- } catch (n) { }
- }, BasePrintElement.prototype.getReizeableShowPoints = function () {
- return ["barcode", "qrcode"].includes(this.options.textType) ? ["se", "r"] : ["s", "e", "r"]
- }, BasePrintElement.prototype.setResizePanel = function () {
- var o = this,
- s = this.designPaper;
- this.designTarget.hireizeable({
- showPoints: o.getReizeableShowPoints(),
- draggable: o.options.draggable,
- showSizeBox: _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.showSizeBox,
- getScale: function () {
- return o.designPaper.scale || 1
- },
- onBeforeResize: function () {
- _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !0
- },
- onResize: function (t, e, i, n, r, a) {
- null != a ? o.onRotate(t, a) : o.onResize(t, e, i, n, r), o.createLineOfPosition(s)
- },
- onStopResize: function (t) {
- hinnn.event.trigger("hiprintTemplateDataChanged_" + o.templateId, t ? "旋转" : "大小"), _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !1, o.removeLineOfPosition()
- }
- })
- }, BasePrintElement.prototype.onRotate = function (t, e) {
- this.options.setRotate(e)
- }, BasePrintElement.prototype.onResize = function (t, e, i, n, r) {
- this.updateSizeAndPositionOptions(r, n, i, e)
- }, BasePrintElement.prototype.getOrderIndex = function () {
- return this.options.getTop()
- }, BasePrintElement.prototype.getHtml = function (t, e, i) {
- this.setCurrenttemplateData(e);
- var n = [],
- r = this.getBeginPrintTopInPaperByReferenceElement(t),
- a = t.getPaperFooter(0),
- a = (this.isHeaderOrFooter() || this.isFixed() || a < r && "none" != t.panelPageRule && (n.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
- target: void 0,
- printLine: void 0
- })), r = r - a + t.paperHeader, t.getPaperFooter(1)), this.getData(e)),
- i = this.createTarget(this.getTitle(), a, i);
- return this.updateTargetSize(i), this.css(i, a), i.css("position", "absolute"), i.css("left", this.options.displayLeft()), i.css("top", r + "pt"), n.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
- target: i,
- printLine: r + this.options.getHeight(),
- referenceElement: new _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_5__.a({
- top: this.options.getTop(),
- left: this.options.getLeft(),
- height: this.options.getHeight(),
- width: this.options.getWidth(),
- beginPrintPaperIndex: t.index,
- bottomInLastPaper: r + this.options.getHeight(),
- printTopInPaper: r
- })
- })), e && this.options.pageBreak && (n[0].target.css("top", t.paperHeader + "pt"), n[0].referenceElement.top = this.options.getTop() - this.options.getHeight() - t.paperHeader, n[0].printLine = t.paperHeader, n[0].referenceElement.bottomInLastPaper = 0, n[0].referenceElement.printTopInPaper = t.paperHeader, n.unshift(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
- target: i,
- printLine: t.height,
- referenceElement: new _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_5__.a({
- top: 0,
- left: 0,
- height: 0,
- width: 0,
- beginPrintPaperIndex: t.index,
- bottomInLastPaper: t.height,
- printTopInPaper: t.paperHeader
- })
- }))), n
- }, BasePrintElement.prototype.getHtml2 = function (t, e, i) {
- var n = 0,
- r = (this.setCurrenttemplateData(e), []),
- a = this.getBeginPrintTopInPaperByReferenceElement(t),
- o = t.getPaperFooter(n),
- n = (this.isHeaderOrFooter() || this.isFixed() || ("none" != t.panelPageRule && o < a && (r.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
- target: void 0,
- printLine: void 0
- })), a = a - o + t.paperHeader, o = t.getPaperFooter(++n)), a <= o && e && a + this.options.getHeight() > o && "none" != t.panelPageRule && (r.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
- target: void 0,
- printLine: void 0
- })), a = t.paperHeader, o = t.getPaperFooter(++n))), this.getData(e)),
- s = this.createTarget(this.getTitle(), n);
- return "none" == t.panelPageRule && a + this.options.getHeight() > o && this.updatePanelHeight(a + this.options.getHeight(), t), this.updateTargetSize(s), this.css(s, n), s.css("position", "absolute"), s.css("left", this.options.displayLeft()), s.css("top", a + "pt"), r.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
- target: s,
- printLine: a + this.options.getHeight(),
- referenceElement: new _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_5__.a({
- top: this.options.getTop(),
- left: this.options.getLeft(),
- height: this.options.getHeight(),
- width: this.options.getWidth(),
- beginPrintPaperIndex: t.index,
- bottomInLastPaper: a + this.options.getHeight(),
- printTopInPaper: a
- })
- })), e && this.options.pageBreak && (r[0].target.css("top", t.paperHeader + "pt"), r[0].referenceElement.top = this.options.getTop() - this.options.getHeight() - t.paperHeader, r[0].printLine = t.paperHeader, r[0].referenceElement.bottomInLastPaper = 0, r[0].referenceElement.printTopInPaper = t.paperHeader, r.unshift(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
- target: s,
- printLine: t.height,
- referenceElement: new _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_5__.a({
- top: 0,
- left: 0,
- height: 0,
- width: 0,
- beginPrintPaperIndex: t.index,
- bottomInLastPaper: t.height,
- printTopInPaper: t.paperHeader
- })
- }))), r
- }, BasePrintElement.prototype.updatePanelHeight = function (t, e) {
- var i;
- "none" == this.panel.panelPageRule && (i = hinnn.pt.toMm(t), e.paperFooter = t, e.target.css("height", i + "mm"), e.target.attr("original-height", i))
- }, BasePrintElement.prototype.getBeginPrintTopInPaperByReferenceElement = function (t) {
- var e = this.options.getTop();
- return this.isHeaderOrFooter() || this.isFixed() ? e : t.referenceElement.isPositionLeftOrRight(e) ? t.referenceElement.printTopInPaper + (e - t.referenceElement.top) : t.referenceElement.bottomInLastPaper + (e - (t.referenceElement.top + t.referenceElement.height))
- }, BasePrintElement.prototype.css = function (i, t) {
- var e, n = this,
- r = [],
- a = this.getConfigOptions();
- a && (a.tabs && a.tabs.length ? (e = [], a.tabs.forEach(function (t) {
- e = e.concat(t.options)
- })) : e = a.supportOptions, e) && e.forEach(function (t) {
- var e = _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__.a.getItem(t.name);
- e && e.css && (e = e.css(i, n.options.getValueFromOptionsOrDefault(t.name))) && r.push(e)
- }), this.stylerCss(i, t)
- }, BasePrintElement.prototype.stylerCss = function (e, t) {
- var i, n = this.getStyler();
- n && (i = n(t, this.options, e, this._currenttemplateData)) && Object.keys(i).forEach(function (t) {
- e.css(t, i[t])
- })
- }, BasePrintElement.prototype.getData = function (i) {
- var t = this.getField();
- return i ? t && t.split(".").reduce(function (t, e) {
- return t ? t[e] : i ? i[e] : ""
- }, !1) || "" : this.printElementType.getData()
- }, BasePrintElement.prototype.copyFromType = function () {
- var e = this.options,
- i = this.printElementType,
- t = this.getConfigOptions(),
- n = [];
- return t && t.tabs && t.tabs.length ? t.tabs.forEach(function (t) {
- t.options.forEach(function (t) {
- n.push(t.name)
- })
- }) : n = t.supportOptions.map(function (t) {
- return t.name
- }), Object.keys(i).forEach(function (t) {
- i[t] && "columns" != t && -1 < n.indexOf(t) && (e[t] = "function" == _typeof(i[t]) ? i[t].toString() : i[t])
- }), e
- }, BasePrintElement.prototype.getPrintElementOptionTabs = function () {
- var i, t;
- return this._printElementOptionTabs || (i = [], (t = this.getConfigOptions()) && (t = t.tabs) && t.forEach(function (t, e) {
- i.push({
- name: t.name,
- list: []
- }), t.options.filter(function (t) {
- return !t.hidden
- }).forEach(function (t) {
- t = _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__.a.getItem(t.name);
- i[e].list.push(t)
- })
- }), this._printElementOptionTabs = i, this._printElementOptionItems = void 0), this._printElementOptionTabs
- }, BasePrintElement.prototype.getPrintElementOptionItems = function () {
- var e, t, i;
- return this._printElementOptionItems || (e = [], (t = this.getConfigOptions()) && (t.tabs && t.tabs.length ? (i = [], t.tabs.forEach(function (t) {
- t.concat(t.options)
- })) : i = t.supportOptions, i) && i.filter(function (t) {
- return !t.hidden
- }).forEach(function (t) {
- t = _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__.a.getItem(t.name);
- e.push(t)
- }), this._printElementOptionItems = this.filterOptionItems(e.concat()), this._printElementOptionTabs = void 0), this._printElementOptionItems
- }, BasePrintElement.prototype.getPrintElementOptionItemsByName = function (t) {
- var e, i = [],
- t = this.getConfigOptionsByName(t);
- return t && (t.tabs && t.tabs.length ? (e = [], t.tabs.forEach(function (t) {
- e = e.concat(t.options)
- })) : e = t.supportOptions, e) && e.filter(function (t) {
- return !t.hidden
- }).forEach(function (t) {
- t = _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__.a.getItem(t.name);
- i.push(t)
- }), i.concat()
- }, BasePrintElement.prototype.filterOptionItems = function (t) {
- return this.printElementType.field ? t.filter(function (t) {
- return "field" != t.name
- }) : t
- }, BasePrintElement.prototype.createTempContainer = function () {
- this.removeTempContainer(), jquery__WEBPACK_IMPORTED_MODULE_60___default()("body").append(jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'))
- }, BasePrintElement.prototype.removeTempContainer = function () {
- jquery__WEBPACK_IMPORTED_MODULE_60___default()(".hiprint_temp_Container").remove()
- }, BasePrintElement.prototype.getTempContainer = function () {
- return jquery__WEBPACK_IMPORTED_MODULE_60___default()(".hiprint_temp_Container")
- }, BasePrintElement.prototype.isHeaderOrFooter = function () {
- return this.options.getTopInDesign() < this.panel.paperHeader || this.options.getTopInDesign() >= this.panel.paperFooter
- }, BasePrintElement.prototype.delete = function () {
- this.designTarget && this.designTarget.remove()
- }, BasePrintElement.prototype.setCurrenttemplateData = function (t) {
- this._currenttemplateData = t
- }, BasePrintElement.prototype.isFixed = function () {
- return this.options.fixed
- }, BasePrintElement.prototype.onRendered = function (t, e) {
- this.printElementType && this.printElementType.onRendered && this.printElementType.onRendered(e, this.options, t.getTarget())
- }, BasePrintElement.prototype.createLineOfPosition = function (t) {
- var e = jquery__WEBPACK_IMPORTED_MODULE_60___default()(".toplineOfPosition.id" + this.id),
- i = jquery__WEBPACK_IMPORTED_MODULE_60___default()(".topPosition.id" + this.id),
- n = jquery__WEBPACK_IMPORTED_MODULE_60___default()(".leftlineOfPosition.id" + this.id),
- r = jquery__WEBPACK_IMPORTED_MODULE_60___default()(".leftPosition.id" + this.id),
- a = jquery__WEBPACK_IMPORTED_MODULE_60___default()(".rightlineOfPosition.id" + this.id),
- o = jquery__WEBPACK_IMPORTED_MODULE_60___default()(".bottomlineOfPosition.id" + this.id),
- s = _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance;
- e.length ? e.css("top", this.options.displayTop(!0)) : ((e = jquery__WEBPACK_IMPORTED_MODULE_60___default()('')).css("top", this.options.displayTop(!0)), e.css("width", t.displayWidth()), this.designTarget.parents(".hiprint-printPaper-content").append(e)), s.showPosition && (i.length ? (i.toggleClass("topPosition-lineMode", s.positionLineMode), i.text(this.options.posTop() + (s.positionUnit ? "pt" : "")), i.css("top", this.options.posTop() - i.height() + "pt"), s.positionLineMode ? i.css("left", this.options.posLeft() - i.width() / 2 + "pt") : i.css("left", this.options.posLeft() + 2 + "pt"), this.designTarget.find(".size-box") && this.designTarget.find(".size-box").toggleClass("hide", !0)) : ((i = jquery__WEBPACK_IMPORTED_MODULE_60___default()('')).toggleClass("topPosition-lineMode", s.positionLineMode), i.text(this.options.posTop() + (s.positionUnit ? "pt" : "")), s.positionLineMode ? i.css("left", this.options.posLeft() - i.width() / 2 + "pt") : i.css("left", this.options.posLeft() + 2 + "pt"), this.designTarget.find(".size-box") && this.designTarget.find(".size-box").toggleClass("hide", !0), this.designTarget.parents(".hiprint-printPaper-content").append(i), i.css("top", this.options.posTop() - i.height() + "pt"))), n.length ? n.css("left", this.options.displayLeft(!0)) : ((e = jquery__WEBPACK_IMPORTED_MODULE_60___default()('')).css("left", this.options.displayLeft(!0)), e.css("height", t.displayHeight()), this.designTarget.parents(".hiprint-printPaper-content").append(e)), s.showPosition && (r.length ? (r.text(this.options.posLeft() + (s.positionUnit ? "pt" : "")), r.toggleClass("leftPosition-lineMode", s.positionLineMode), r.css("left", this.options.posLeft() - r.width() + "pt"), s.positionLineMode ? r.css("top", this.options.posTop() - r.height() / 3 + "pt") : r.css("top", this.options.posTop() + 2 + "pt")) : ((r = jquery__WEBPACK_IMPORTED_MODULE_60___default()('')).text(this.options.posLeft() + (s.positionUnit ? "pt" : "")), r.toggleClass("leftPosition-lineMode", s.positionLineMode), s.positionLineMode ? r.css("top", this.options.posTop() - r.height() / 3 + "pt") : r.css("top", this.options.posTop() + 2 + "pt"), this.designTarget.parents(".hiprint-printPaper-content").append(r), r.css("left", this.options.posLeft() - r.width() + "pt"))), a.length ? a.css("left", this.options.getLeft() + this.options.getWidth() + "pt") : ((i = jquery__WEBPACK_IMPORTED_MODULE_60___default()('')).css("left", this.options.getLeft() + this.options.getWidth() + "pt"), i.css("height", t.displayHeight()), this.designTarget.parents(".hiprint-printPaper-content").append(i)), o.length ? o.css("top", this.options.getTop() + this.options.getHeight() + "pt") : ((n = jquery__WEBPACK_IMPORTED_MODULE_60___default()('')).css("top", this.options.getTop() + this.options.getHeight() + "pt"), n.css("width", t.displayWidth()), this.designTarget.parents(".hiprint-printPaper-content").append(n))
- }, BasePrintElement.prototype.removeLineOfPosition = function () {
- jquery__WEBPACK_IMPORTED_MODULE_60___default()(".toplineOfPosition.id" + this.id).remove(), jquery__WEBPACK_IMPORTED_MODULE_60___default()(".topPosition.id" + this.id).remove(), this.designTarget.find(".size-box") && this.designTarget.find(".size-box").toggleClass("hide", !1), jquery__WEBPACK_IMPORTED_MODULE_60___default()(".leftlineOfPosition.id" + this.id).remove(), jquery__WEBPACK_IMPORTED_MODULE_60___default()(".leftPosition.id" + this.id).remove(), jquery__WEBPACK_IMPORTED_MODULE_60___default()(".rightlineOfPosition.id" + this.id).remove(), jquery__WEBPACK_IMPORTED_MODULE_60___default()(".bottomlineOfPosition.id" + this.id).remove()
- }, BasePrintElement.prototype.getFontList = function () {
- var t = this.options.fontList;
- return t || _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.getPrintTemplateById(this.templateId).getFontList()
- }, BasePrintElement.prototype.getFields = function () {
- return "table" == this.printElementType.type ? this.options.tableFields : this.options.fields || _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.getPrintTemplateById(this.templateId).getFields()
- }, BasePrintElement.prototype.getOnImageChooseClick = function () {
- var t = this.options.onImageChooseClick;
- return t || _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.getPrintTemplateById(this.templateId).getOnImageChooseClick()
- }, BasePrintElement.prototype.bingCopyEvent = function (t) {
- var e = this;
- t.keydown(function (t) {
- e._editing && !t.altKey && 13 == t.keyCode ? e.updateByContent() : (t.ctrlKey || t.metaKey) && 67 == t.keyCode && (e.copyJson(), t.preventDefault())
- })
- }, BasePrintElement.prototype.copyJson = function () {
- try {
- var t = this,
- e = jquery__WEBPACK_IMPORTED_MODULE_60___default()("#copyArea"),
- i = (e.length || (e = jquery__WEBPACK_IMPORTED_MODULE_60___default()('')), jquery__WEBPACK_IMPORTED_MODULE_60___default()("body").append(e), JSON.stringify({
- options: t.options,
- printElementType: t.printElementType,
- id: t.id,
- templateId: t.templateId
- })),
- n = (e.text(i), e.css("visibility", "visible"), e.focus(), e.setSelectionRange ? e.setSelectionRange(0, e.value.length) : e.select(), !1),
- n = document.execCommand("copy");
- e.css("visibility", "hidden"), t.designTarget.focus()
- } catch (t) {
- n = !1
- }
- return n
- }, BasePrintElement.prototype.clone = function (t) {
- var e = this,
- i = e.printElementType.createPrintElement();
- return Object.keys(e.options).forEach(function (t) {
- i.options[t] = e.options[t]
- }), i
- }, BasePrintElement.prototype.getFormatter = function () {
- var formatter = void 0;
- formatter = this.printElementType.formatter || this.options.formatter
-
- if (!formatter) {
- return null
- }
- try {
- var s = "formatter=" + formatter;
- eval(s)
- } catch (err) {
- console.log(err)
- }
- // if (this.printElementType.formatter && (formatter = this.printElementType.formatter), this.options.formatter) try {
- // var s = "formatter=" + this.options.formatter;
- // eval(s)
- // } catch (t) {}
- return window.formatter
- }, BasePrintElement.prototype.getStyler = function () {
- var fnstyler = void 0;
- if (this.printElementType.styler && (fnstyler = this.printElementType.styler), this.options.styler) try {
- var s = "fnstyler=" + this.options.styler;
- eval(s)
- } catch (t) { }
- return fnstyler
- }, BasePrintElement.prototype.bingKeyboardMoveEvent = function (r, t) {
- var a = this,
- o = void 0,
- s = void 0;
- r.attr("tabindex", "1"), r.keydown(function (t) {
- if ("INPUT" != t.target.tagName && (!a._editing || t.altKey) && !1 !== a.options.draggable) {
- var e = a.panel.printElements.filter(function (t) {
- return "block" == t.designTarget.children().last().css("display") && !t.printElementType.type.includes("table")
- }),
- i = 1 < e.length,
- n = _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance;
- switch (t.keyCode) {
- case 8:
- case 46:
- _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.getPrintTemplateById(a.templateId).deletePrintElement(a), hinnn.event.trigger("hiprintTemplateDataChanged_" + a.templateId, "删除"), hinnn.event.trigger("clearSettingContainer");
- break;
- case 37:
- o = a.options.getLeft(), i ? e.forEach(function (t) {
- t.updatePositionByMultipleSelect(0 - n, 0)
- }) : (a.updateSizeAndPositionOptions(o - n), r.css("left", a.options.displayLeft())), t.preventDefault();
- break;
- case 38:
- s = a.options.getTop(), i ? e.forEach(function (t) {
- t.updatePositionByMultipleSelect(0, 0 - n)
- }) : (a.updateSizeAndPositionOptions(void 0, s - n), r.css("top", a.options.displayTop())), t.preventDefault();
- break;
- case 39:
- o = a.options.getLeft(), i ? e.forEach(function (t) {
- t.updatePositionByMultipleSelect(n, 0)
- }) : (a.updateSizeAndPositionOptions(o + n), r.css("left", a.options.displayLeft())), t.preventDefault();
- break;
- case 40:
- s = a.options.getTop(), i ? e.forEach(function (t) {
- t.updatePositionByMultipleSelect(0, n)
- }) : (a.updateSizeAndPositionOptions(void 0, s + n), r.css("top", a.options.displayTop())), t.preventDefault()
- }[37, 38, 39, 40].includes(t.keyCode) && hinnn.event.trigger("hiprintTemplateDataChanged_" + a.templateId, "键盘移动")
- }
- })
- }, BasePrintElement.prototype.inRect = function (t) {
- var e = this.designPaper.scale || 1,
- i = this.designTarget[0].offsetLeft,
- n = this.designTarget[0].offsetTop,
- r = this.designTarget[0].offsetHeight,
- a = i + this.designTarget[0].offsetWidth,
- r = n + r,
- o = jquery__WEBPACK_IMPORTED_MODULE_60___default()(t.target[0]).position().left / e,
- e = jquery__WEBPACK_IMPORTED_MODULE_60___default()(t.target[0]).position().top / e,
- s = t.target[0].offsetHeight,
- t = t.target[0].offsetWidth;
- return o < a && i < o + t && n < e + s && e < r
- }, BasePrintElement.prototype.multipleSelect = function (t) {
- t ? this.designTarget.addClass("multipleSelect") : this.designTarget.removeClass("multipleSelect")
- }, BasePrintElement.prototype.updatePositionByMultipleSelect = function (t, e) {
- !1 !== this.options.draggable && (this.updateSizeAndPositionOptions(t + this.options.getLeft(), e + this.options.getTop()), this.designTarget.css("left", this.options.displayLeft()), this.designTarget.css("top", this.options.displayTop()))
- }, BasePrintElement
- }()
- }, function (t, e, i) {
- A.prototype.init = function (t) {
- this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()(''), t.getTarget().append(this.target), this.target.focus()
- }, A.prototype.getValue = function () {
- return this.target.val()
- }, A.prototype.setValue = function (t) {
- this.target.val(t)
- }, A.prototype.destroy = function () {
- this.target.remove()
- };
- var n = A,
- r = (Object.defineProperty(I, "Instance", {
- get: function () {
- return I._instance = I._instance ? I._instance : new I
- },
- enumerable: !0,
- configurable: !0
- }), I),
- a = (b.prototype.init = function (t, i) {
- var n = '", this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()(n), i.getTarget().append(this.target), this.target.focus()
- }, b.prototype.getValue = function () {
- var t = this.target.val();
- return this.target.find('option[value="' + t + '"]').text() + "#" + t
- }, b.prototype.setValue = function (t) {
- t && !this.target.find('option[value="' + t + '"]').length && this.target.find("select").prepend('"), this.target.find("select").val(t)
- }, b.prototype.destroy = function () {
- this.target.remove()
- }, b),
- o = (Object.defineProperty(v, "Instance", {
- get: function () {
- return v._instance = v._instance ? v._instance : new v
- },
- enumerable: !0,
- configurable: !0
- }), v),
- s = (Object.defineProperty(g, "Instance", {
- get: function () {
- return g._instance = r._instance ? g._instance : new g
- },
- enumerable: !0,
- configurable: !0
- }), g.prototype.createEditor = function (t) {
- return jquery__WEBPACK_IMPORTED_MODULE_60___default.a.extend({}, r.Instance[t])
- }, g.prototype.createSelect = function (t) {
- return jquery__WEBPACK_IMPORTED_MODULE_60___default.a.extend({}, o.Instance[t])
- }, g),
- c = i(10),
- l = i(14),
- p = i(11),
- d = (m.prototype.init = function (t, e) {
- var i = this;
- this.tableOptions = e, this.title = t.title, this.field = t.field, t.getTarget().unbind("dblclick.hitable").bind("dblclick.hitable", function () {
- t.isEditing = !0, i.beginEdit(t)
- })
- }, m.prototype.getDisplayHtml = function () {
- return this.title
- }, m.prototype.beginEdit = function (e) {
- var i = this;
- i.tableOptions.options.fields && i.tableOptions.options.fields.length ? (this.editor = s.Instance.createSelect("select"), e.getTarget().html(""), this.editor.init(i.tableOptions.options.fields, e), this.editor.setValue(this.field || ""), jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.editor.target).keydown(function (t) {
- 13 == t.keyCode && i.endEdit(e)
- }), jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.editor.target).change(function (t) {
- i.endEdit(e)
- }), jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.editor.target).blur(function (t) {
- i.endEdit(e)
- })) : (this.editor = s.Instance.createEditor("text"), e.getTarget().html(""), this.editor.init(e), (this.title || this.field) && (this.tableOptions.options.isEnableEditField ? this.editor.setValue((this.title || "") + "#" + (this.field || "")) : this.editor.setValue(this.title || "")), jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.editor.target).keydown(function (t) {
- 13 == t.keyCode && i.endEdit(e)
- }), jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.editor.target).blur(function (t) {
- i.endEdit(e)
- }), this.tableOptions.editingCell && this.tableOptions.editingCell.id != e.id && this.tableOptions.editingCell.innerElement.endEdit(this.tableOptions.editingCell), this.tableOptions.editingCell = e)
- }, m.prototype.endEdit = function (t) {
- t.isEditing = 0;
- var e, i = this.editor.getValue();
- i ? this.tableOptions.options.isEnableEditField || this.tableOptions.options.fields ? (e = i.split("#"), t.title = this.title = e[0], 0 < e.length && (t.columnId = t.field = this.field = e[1]), t.id && t.target.attr("id", t.id), t.columnId && t.target.attr("column-id", t.columnId), hinnn.event.trigger("hiprintTemplateDataChanged_" + this.tableOptions.options.templateId, "调整表格列字段")) : t.title = this.title = i : this.tableOptions.options.isEnableEditField ? (t.title = this.title = "", t.field = this.field = "") : t.title = this.title = "", this.editor.destroy(), t.getTarget().html(this.title)
- }, m),
- u = function (t) {
- this.title = t.title, this.field = t.field, this.width = t.width, this.align = t.align, this.halign = t.halign, this.vAlign = t.vAlign, this.colspan = t.colspan, this.rowspan = t.rowspan, this.checked = t.checked, this.columnId = t.columnId, this.tableSummaryTitle = t.tableSummaryTitle, this.tableSummaryText = t.tableSummaryText, this.tableSummaryColspan = t.tableSummaryColspan, this.tableSummary = t.tableSummary, this.tableSummaryAlign = t.tableSummaryAlign, this.tableSummaryNumFormat = t.tableSummaryNumFormat, this.tableSummaryFormatter = t.tableSummaryFormatter, this.upperCase = t.upperCase, this.renderFormatter = t.renderFormatter && t.renderFormatter.toString(), this.formatter2 = t.formatter2 && t.formatter2.toString(), this.styler2 = t.styler2 && t.styler2.toString(), this.stylerHeader = t.stylerHeader && t.stylerHeader.toString(), this.tableColumnHeight = t.tableColumnHeight, this.tableTextType = t.tableTextType, this.tableBarcodeMode = t.tableBarcodeMode, this.tableQRCodeLevel = t.tableQRCodeLevel
- },
- f = (h.prototype.init = function (t, e, i, n) {
- this.isHead = n, this.rowId = i, this.isEditing = !1;
- n = /^[0-9]*$/, this.target = t, this.tableOptions = e, i = this.target.attr("colspan"), this.colspan = n.test(i) ? parseInt(i) : 1, t = this.target.attr("rowspan");
- this.rowspan = n.test(t) ? parseInt(t) : 1, this.initEvent(), this.isHead && this.initInnerEelement()
- }, h.prototype.beginEdit = function () {
- var t;
- !this.isEditing && this.tableOptions.isEnableEdit && this.tableOptions.onBeforEdit(this) && (t = this.getValue(), this.editor = s.Instance.createEditor("text"), this.isEditing = !0, (this.tableOptions.editingCell = this).target.html(""), this.editor.init(this), this.editor.setValue(t))
- }, h.prototype.endEdit = function () {
- this.isEditing = !1;
- var t = this.editor.getValue();
- this.editor.destroy(), this.target.html(t)
- }, h.prototype.getTarget = function () {
- return this.target
- }, h.prototype.getValue = function () {
- return this.target.html()
- }, h.prototype.setValue = function (t) { }, h.prototype.initInnerEelement = function () {
- this.innerElement = new d, this.innerElement.init(this, this.tableOptions)
- }, h.prototype.initEvent = function () { }, h.prototype.isXYinCell = function (t, e) {
- t = new c.b({
- x: t,
- y: e,
- height: 0,
- width: 0
- });
- return this.isOverlap(t)
- }, h.prototype.getTableRect = function () {
- return new c.b({
- x: this.target.offset().left,
- y: this.target.offset().top,
- height: this.target[0].offsetHeight,
- width: this.target[0].offsetWidth
- })
- }, h.prototype.isOverlap = function (t) {
- var e = this.getTableRect();
- return t.x + t.width > e.x && e.x + e.width > t.x && t.y + t.height > e.y && e.y + e.height > t.y
- }, h.prototype.isInRect = function (t) {
- var e = t.rect,
- i = this.getTableRect();
- return i.x >= e.x && i.x + i.width <= e.x + e.width && i.y >= e.y && i.y + i.height <= e.y + e.height && (i = l.a.mergeRect(e, i), JSON.stringify(e) == JSON.stringify(i) || (t.changed = !0, t.rect = i, !0))
- }, h.prototype.isSelected = function () {
- return this.target.hasClass("selected")
- }, h.prototype.select = function () {
- this.target.addClass("selected")
- }, h.prototype.isHeader = function () {
- return !1
- }, h.prototype.setAlign = function (t) {
- (this.align = t) ? this.target.css("text-align", t) : this.target[0].style.textAlign = ""
- }, h.prototype.setVAlign = function (t) {
- (this.vAlign = t) ? this.target.css("vertical-align", t) : this.target[0].style.verticalAlign = ""
- }, h.prototype.getEntity = function () {
- return new u(this)
- }, h);
-
- function h() {
- this.id = p.a.createId()
- }
-
- function m() { }
-
- function g() { }
-
- function v() {
- this.select = new a
- }
-
- function b() { }
-
- function I() {
- this.text = new n
- }
-
- function A() { }
- i.d(e, "a", function () {
- return x
- });
- (function (t, e) {
- (Object.setPrototypeOf || (_instanceof({
- __proto__: []
- }, Array) ? function (t, e) {
- t.__proto__ = e
- } : function (t, e) {
- for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
- }))(t, e)
- })(y = w, i = _ = f), y.prototype = null === i ? Object.create(i) : (M.prototype = i.prototype, new M), w.prototype.css = function (t) { };
- var _, y, x = w;
-
- function w(t) {
- var e = this;
- return t = t || {}, (e = _.call(this) || this).width = t.width ? parseFloat(t.width.toString()) : 100, e.title = t.title, e.descTitle = t.descTitle, e.field = t.field, e.fixed = t.fixed, e.rowspan = t.rowspan ? parseInt(t.rowspan) : 1, e.colspan = t.colspan ? parseInt(t.colspan) : 1, e.align = t.align, e.halign = t.halign, e.vAlign = t.vAlign, e.formatter = t.formatter, e.styler = t.styler, e.renderFormatter = t.renderFormatter, e.formatter2 = t.formatter2, e.styler2 = t.styler2, e.stylerHeader = t.stylerHeader, e.checkbox = t.checkbox, e.checked = 0 != t.checked, e.columnId = t.columnId || t.field, e.tableColumnHeight = t.tableColumnHeight, e.tableTextType = t.tableTextType, e.tableBarcodeMode = t.tableBarcodeMode, e.tableQRCodeLevel = t.tableQRCodeLevel, e.tableSummaryTitle = t.tableSummaryTitle, e.tableSummaryText = t.tableSummaryText, e.tableSummaryColspan = t.tableSummaryColspan, e.tableSummary = t.tableSummary, e.tableSummaryAlign = t.tableSummaryAlign, e.tableSummaryNumFormat = t.tableSummaryNumFormat, e.tableSummaryFormatter = t.tableSummaryFormatter, e.upperCase = t.upperCase, e
- }
-
- function M() {
- this.constructor = y
- }
- }, function (t, e, i) {
- i.d(e, "a", function () {
- return n
- });
- var n = function (t) {
- this.printLine = t.printLine, this.target = t.target, this.referenceElement = t.referenceElement
- }
- }, function (module, __webpack_exports__, __webpack_require__) {
- __webpack_require__.d(__webpack_exports__, "a", function () {
- return TableExcelHelper
- });
- var _ReconsitutionTableColumns__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19),
- _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0),
- TableExcelHelper = function () {
- function TableExcelHelper() { }
- return TableExcelHelper.createTableHead = function (t, e) {
- for (var i = TableExcelHelper.reconsitutionTableColumnTree(t), n = jquery__WEBPACK_IMPORTED_MODULE_60___default()(""), a = TableExcelHelper.getColumnsWidth(i, e), r = 0; r < i.totalLayer; r++) ! function (t) {
- var r = jquery__WEBPACK_IMPORTED_MODULE_60___default()("
");
- i[t].filter(function (t) {
- return t.checked
- }).forEach(function (t) {
- var e, i = jquery__WEBPACK_IMPORTED_MODULE_60___default()("
"),
- n = (t.id && i.attr("id", t.id), t.columnId && i.attr("column-id", t.columnId), (t.align || t.halign) && i.css("text-align", t.halign || t.align), t.vAlign && i.css("vertical-align", t.vAlign), 1 < t.colspan && i.attr("colspan", t.colspan), 1 < t.rowspan && i.attr("rowspan", t.rowspan), i.html(t.title), a[t.id] ? (t.hasWidth = !0, t.targetWidth = a[t.id], i.attr("haswidth", "haswidth"), i.css("width", a[t.id] + "pt")) : t.hasWidth = !1, TableExcelHelper.getHeaderStyler(t));
- n && (e = n(t)) && Object.keys(e).forEach(function (t) {
- i.css(t, e[t])
- }), r.append(i)
- }), n.append(r)
- }(r);
- return TableExcelHelper.syncTargetWidthToOption(t), n
- }, TableExcelHelper.createTableFooter = function (t, f, h, e, m, i) {
- var g, n = jquery__WEBPACK_IMPORTED_MODULE_60___default()(""),
- e = this.getFooterFormatter(h, e),
- v = this.tableSummaryTitle,
- b = "last" == h.tableFooterRepeat ? f : i,
- r = h.columns.length - 1,
- r = this.rowColumns || h.columns[r].columns;
- return "no" != h.tableFooterRepeat && r.some(function (t) {
- return t.tableSummary
- }) && (g = jquery__WEBPACK_IMPORTED_MODULE_60___default()("
"), r.filter(function (t) {
- return t.checked
- }).forEach(function (e) {
- var t = b.filter(function (t) {
- return t && t[e.field]
- }).map(function (t) {
- return new RegExp("^-?(0|[1-9]\\d*)(\\.\\d+)?").test(t[e.field]) ? Number(t[e.field]) : 0
- }),
- i = e.tableSummaryText,
- n = e.tableSummaryNumFormat || 2,
- r = "text-align: ".concat(e.tableSummaryAlign || "center"),
- a = null == e.tableSummaryColspan ? 1 : e.tableSummaryColspan,
- o = e.upperCase,
- s = _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_1__.a,
- c = s.toUpperCase,
- l = s.numFormat,
- s = TableExcelHelper.getColumnTableSummaryFormatter(e),
- s = s ? s(e, t, f, h) : "";
- if (s) g.append(s);
- else switch (e.tableSummary) {
- case "count":
- var p = v(e, i || "".concat(i18n.__("计数"), ":"), m),
- d = c(o, b.filter(function (t) {
- return t
- }).length || 0);
- g.append('
').concat(p).concat(d, "
"));
- break;
- case "sum":
- p = (u = c(o, l(u = parseFloat(Number(t.reduce(function (t, e) {
- return t + e
- }, 0))), n)), v(e, i || "".concat(i18n.__("合计"), ":"), m));
- g.append('
').concat(p).concat(u, "
"));
- break;
- case "avg":
- var u = parseFloat(Number(t.reduce(function (t, e) {
- return t + e
- }, 0))),
- d = c(o, l(parseFloat(Number(u / (t.length || 1))), n)),
- p = v(e, i || "".concat(i18n.__("平均值"), ":"), m);
- g.append('
').concat(p).concat(d, "
"));
- break;
- case "min":
- u = Math.min.apply(Math, Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(t)) || 0, p = (u = c(o, l(u = u == 1 / 0 ? 0 : u, n)), v(e, i || "".concat(i18n.__("最小值"), ":"), m));
- g.append('
').concat(p).concat(u || 0, "
"));
- break;
- case "max":
- d = Math.max.apply(Math, Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(t)), p = (d = c(o, l(d = d == -1 / 0 ? 0 : d, n)), v(e, i || "".concat(i18n.__("最大值"), ":"), m));
- g.append('
').concat(p).concat(d || 0, "
"));
- break;
- case "text":
- g.append('
').concat(i || "", "
"));
- break;
- default:
- 1 <= a && g.append('
').concat(i || "", "
"))
- }
- }), n.append(g)), e && n.append(e(h, f, m, i)), n
- }, TableExcelHelper.tableSummaryTitle = function (t, e, i) {
- return null == t.tableSummaryTitle || 1 == t.tableSummaryTitle ? "".concat(e) : i ? "" : ''.concat(e, "")
- }, TableExcelHelper.createTableRow = function (t, r, a, o, s) {
- var c = this,
- l = TableExcelHelper.reconsitutionTableColumnTree(t),
- p = jquery__WEBPACK_IMPORTED_MODULE_60___default()(""),
- t = c.getGroupFieldsFormatter(o, s),
- n = t ? o.groupFields = t(s, o, r) : s.groupFields || [];
- return r = r || [], n.length ? _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_1__.a.groupBy(r, n, function (e) {
- var i = {};
- return n.forEach(function (t) {
- return i[t] = e[t]
- }), i
- }).forEach(function (t) {
- var e, i = c.getGroupFormatter(o, s),
- i = (i && ((e = jquery__WEBPACK_IMPORTED_MODULE_60___default()("
")).append(i(l.colspan, r, a, t, o)), p.append(e)), c.getGroupFooterFormatter(o, s)),
- n = t;
- n.rows.forEach(function (t, e) {
- t = TableExcelHelper.createRowTarget(l, t, o, s, e, n.rows, a);
- p.append(t)
- }), i && ((e = jquery__WEBPACK_IMPORTED_MODULE_60___default()("
")).append(i(l.colspan, r, a, t, o)), p.append(e))
- }) : r.forEach(function (t, e) {
- t = TableExcelHelper.createRowTarget(l, t, o, s, e, r, a);
- p.append(t)
- }), p
- }, TableExcelHelper.createRowTarget = function (t, e, n, i, rowIndex, tableData, printData) {
- var o = jquery__WEBPACK_IMPORTED_MODULE_60___default()("
'), imagebox.find("img").attr("src", p), r.html(imagebox)), "qrcode" == t.tableTextType) {
- r.html("");
- try {
- var qrcodebox = jquery__WEBPACK_IMPORTED_MODULE_60___default()(""),
- l, u;
- p && (l = parseInt(t.width || t.targetWidth || 20), u = parseInt(t.tableColumnHeight || 20), qrcodebox.css("height", (u < l ? u : l) + "pt"), new QRCode(qrcodebox[0], {
- width: u < l ? u : l,
- height: u < l ? u : l,
- colorDark: "#000000",
- useSVG: !0,
- correctLevel: t.tableQRCodeLevel || 0
- }).makeCode(p), r.html(qrcodebox))
- } catch (t) {
- r.html("".concat(i18n.__("二维码生成失败")))
- }
- }
- "sequence" === t.tableTextType && r.html(rowIndex + 1)
- }
- var s = TableExcelHelper.getColumnStyler(t),
- l;
- s && (l = s(e[t.field], e, i, n), l) && Object.keys(l).forEach(function (t) {
- r.css(t, l[t])
- }), o.append(r)
- }
- }), TableExcelHelper.getRowStyler(n, i)),
- a;
- return r && (a = r(e, n), a) && Object.keys(a).forEach(function (t) {
- o.css(t, a[t])
- }), o
- }, TableExcelHelper.createEmptyRowTarget = function (t, e) {
- var t = TableExcelHelper.reconsitutionTableColumnTree(t),
- n = jquery__WEBPACK_IMPORTED_MODULE_60___default()("
");
- return t.rowColumns.filter(function (t) {
- return t.checked
- }).forEach(function (t, e) {
- var i = jquery__WEBPACK_IMPORTED_MODULE_60___default()("
");
- t.field && i.attr("field", t.field), t.align && i.css("text-align", t.align), t.vAlign && i.css("vertical-align", t.vAlign), n.append(i)
- }), e && e.options.tableBodyRowHeight && n.find("td:not([rowspan])").css("height", e.options.tableBodyRowHeight + "pt"), n
- }, TableExcelHelper.getColumnsWidth = function (t, i) {
- var n = {},
- r = TableExcelHelper.allAutoWidth(t),
- a = TableExcelHelper.allFixedWidth(t);
- return t.rowColumns.filter(function (t) {
- return t.checked
- }).forEach(function (t) {
- var e;
- t.fixed ? n[t.id] = t.width : (e = t.width / r * (0 < (e = i - a) ? e : 0), n[t.id] = e)
- }), n
- }, TableExcelHelper.resizeTableCellWidth = function (t, e, i) {
- var e = TableExcelHelper.reconsitutionTableColumnTree(e),
- n = TableExcelHelper.getColumnsWidth(e, i);
- t.find("thead tr td[haswidth]").map(function (t, e) {
- var i = jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).attr("id"),
- i = n[i];
- jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).css("width", i + "pt")
- })
- }, TableExcelHelper.allAutoWidth = function (t) {
- var e = 0,
- i = {};
- return t.rowColumns.filter(function (t) {
- return t.checked
- }).forEach(function (t) {
- i[t.id] ? i[t.id] = 0 : i[t.id] = t.width, e += t.fixed ? 0 : i[t.id]
- }), e
- }, TableExcelHelper.allFixedWidth = function (t) {
- var e = 0,
- i = {};
- return t.rowColumns.filter(function (t) {
- return t.checked
- }).forEach(function (t) {
- i[t.id] ? i[t.id] = 0 : i[t.id] = t.width, e += t.fixed ? i[t.id] : 0
- }), e
- }, TableExcelHelper.reconsitutionTableColumnTree = function (t, e, i) {
- for (var n = e || new _ReconsitutionTableColumns__WEBPACK_IMPORTED_MODULE_0__.a, r = n.colspan = 0; r < t.length; r++) ! function (e) {
- n.totalLayer = e + 1, n[e] = t[e].columns, 0 == e && t[e].columns.forEach(function (t) {
- 0 == e && (n.colspan += t.colspan)
- })
- }(r);
- return n.rowColumns = TableExcelHelper.getOrderdColumns(n), n
- }, TableExcelHelper.syncTargetWidthToOption = function (t) {
- t.forEach(function (t) {
- t.columns.forEach(function (t) {
- t.hasWidth && (t.width = t.targetWidth)
- })
- })
- }, TableExcelHelper.getGroupFieldsFormatter = function (options, tablePrintElementType) {
- var groupFieldsFormatter = void 0,
- arr;
- if (tablePrintElementType.groupFields && tablePrintElementType.groupFields.length && (arr = "string" == typeof tablePrintElementType.groupFields ? tablePrintElementType.groupFields : JSON.stringify(tablePrintElementType.groupFields), options.groupFieldsFormatter = "function(type,options,data){ return " + arr + " }"), tablePrintElementType.groupFieldsFormatter && (groupFieldsFormatter = tablePrintElementType.groupFieldsFormatter), options.groupFieldsFormatter) try {
- var s = "groupFieldsFormatter=" + options.groupFieldsFormatter;
- eval(s)
- } catch (t) { }
- return groupFieldsFormatter
- }, TableExcelHelper.getGroupFormatter = function (options, tablePrintElementType) {
- var groupFormatter = void 0;
- if (tablePrintElementType.groupFormatter && (groupFormatter = tablePrintElementType.groupFormatter), options.groupFormatter) try {
- var s = "groupFormatter=" + options.groupFormatter;
- eval(s)
- } catch (t) { }
- return groupFormatter
- }, TableExcelHelper.getGroupFooterFormatter = function (options, tablePrintElementType) {
- var groupFooterFormatter = void 0;
- if (tablePrintElementType.groupFooterFormatter && (groupFooterFormatter = tablePrintElementType.groupFooterFormatter), options.groupFooterFormatter) try {
- var s = "groupFooterFormatter=" + options.groupFooterFormatter;
- eval(s)
- } catch (t) { }
- return groupFooterFormatter
- }, TableExcelHelper.getFooterFormatter = function (options, tablePrintElementType) {
- var footerFormatter = void 0;
- if (tablePrintElementType.footerFormatter && (footerFormatter = tablePrintElementType.footerFormatter), options.footerFormatter) try {
- var s = "footerFormatter=" + options.footerFormatter;
- eval(s)
- } catch (t) { }
- return footerFormatter
- }, TableExcelHelper.getRowStyler = function (options, tablePrintElementType) {
- var rowStyler = void 0;
- if (tablePrintElementType.rowStyler && (rowStyler = tablePrintElementType.rowStyler), options.rowStyler) try {
- var s = "rowStyler=" + options.rowStyler;
- eval(s)
- } catch (t) { }
- return rowStyler
- }, TableExcelHelper.getColumnTableSummaryFormatter = function (column) {
- var tableSummaryFormatter = void 0;
- if (column.tableSummaryFormatter && (tableSummaryFormatter = column.tableSummaryFormatter), column.tableSummaryFormatter) try {
- var s = "tableSummaryFormatter=" + column.tableSummaryFormatter;
- eval(s)
- } catch (t) { }
- return tableSummaryFormatter
- }, TableExcelHelper.getColumnStyler = function (column) {
- var styler = void 0;
- if (column.styler && (styler = column.styler), column.styler2) try {
- var s = "styler=" + column.styler2;
- eval(s)
- } catch (t) { }
- return styler
- }, TableExcelHelper.getHeaderStyler = function (column) {
- var stylerHeader = void 0;
- if (column.stylerHeader && (stylerHeader = column.stylerHeader), column.stylerHeader) try {
- var s = "stylerHeader=" + column.stylerHeader;
- eval(s)
- } catch (t) { }
- return stylerHeader
- }, TableExcelHelper.getColumnRenderFormatter = function (column) {
- var renderFormatter = void 0;
- if (column.renderFormatter && (renderFormatter = column.renderFormatter), column.renderFormatter) try {
- var s = "renderFormatter=" + column.renderFormatter;
- eval(s)
- } catch (t) { }
- return renderFormatter
- }, TableExcelHelper.getColumnFormatter = function (column) {
- var formatter = void 0;
- if (column.formatter && (formatter = column.formatter), column.formatter2) try {
- var s = "formatter=" + column.formatter2;
- eval(s)
- } catch (t) { }
- return formatter
- }, TableExcelHelper.getOrderdColumns = function (t) {
- for (var r = {}, e = 0; e < t.totalLayer; e++) ! function (n) {
- r[n] = [], t[n].forEach(function (t, e) {
- var i;
- (i = r[n]).push.apply(i, Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(new Array(t.colspan).fill(Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__.a)(Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__.a)({}, t), {}, {
- colspan: 1
- }))))
- })
- }(e);
- for (var i = 0; i < t.totalLayer; i++) ! function (n) {
- r[n].forEach(function (t, e) {
- for (var i = 1; i < t.rowspan; i++) r[n + i].splice(e, 0, Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__.a)(Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__.a)({}, t), {}, {
- rowspan: 1
- }))
- })
- }(i);
- for (var n = [], a = 0; a < t.totalLayer; a++) ! function (i) {
- i >= t.totalLayer - 1 ? r[i].forEach(function (t, e) {
- t.field || (t.field = n[e])
- }) : r[i].forEach(function (t, e) {
- 0 == i ? n.push(t.field || "") : t.field && (n[e] = t.field)
- })
- }(a);
- return this.rowColumns = r[t.totalLayer - 1], r[t.totalLayer - 1]
- }, TableExcelHelper
- }()
- }, function (t, e, i) {
- i.d(e, "a", function () {
- return n
- });
- r.prototype.isPositionLeftOrRight = function (t) {
- return this.top <= t && this.top + this.height > t
- };
- var n = r;
-
- function r(t) {
- this.top = t.top, this.left = t.left, this.height = t.height, this.width = t.width, this.bottomInLastPaper = t.bottomInLastPaper, this.beginPrintPaperIndex = t.beginPrintPaperIndex, this.printTopInPaper = t.printTopInPaper, this.endPrintPaperIndex = t.endPrintPaperIndex
- }
- }, function (U, H, R) {
- ln.prototype.css = function (t, e) {
- if (t && t.length) {
- if (e) return t.css("line-height", e + "pt"), "line-height:" + e + "pt";
- t[0].style.lineHeight = ""
- }
- return null
- }, ln.prototype.createTarget = function () {
- return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("字体行高"), '\n
\n
\n \n
\n
')), this.target
- }, ln.prototype.getValue = function () {
- var t = this.target.find("select").val();
- if (t) return parseFloat(t.toString())
- }, ln.prototype.setValue = function (t) {
- t && !this.target.find('option[value="' + t + '"]').length && this.target.find("select").prepend('"), this.target.find("select").val(t)
- }, ln.prototype.destroy = function () {
- this.target.remove()
- };
- var z = ln,
- O = (cn.prototype.createTarget = function (t) {
- var i, e = void 0;
- return (e = t ? t.getFontList() : e) ? (i = '
").append(n.css("background", "blue")),
- length: e,
- height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(d),
- isEnd: !1
- }) : 0 == c.find("tr").length ? 0 == e && a ? {
- target: void 0,
- length: 0,
- height: 0,
- isEnd: !0
- } : {
- target: i.clone(),
- length: e,
- height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(d),
- isEnd: !0
- } : {
- target: i.clone(),
- length: e,
- height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(d),
- isEnd: !1
- }
- }, TablePrintElement.prototype.fixMergeSpan = function (t, e) {
- var i = this,
- n = 1,
- r = !1,
- a = 1,
- o = !1;
- return t.nextAll().each(function (t) {
- 0 < jquery__WEBPACK_IMPORTED_MODULE_60___default()(this).children().filter("td[rowspan=0]").length && !r ? n += 1 : r = !0, 0 < jquery__WEBPACK_IMPORTED_MODULE_60___default()(this).children().filter("td[colspan=0]").length && !o ? a += 1 : o = !0
- }), t.children().each(function (t, e) {
- jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).attr("rowspan") < 1 && (jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).attr("rowspan", n), jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).css("display", ""), i.options.rowsColumnsMergeClean) && jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).text(""), jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).attr("colspan") < 1 && (jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).attr("colspan", a), jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).css("display", ""), i.options.rowsColumnsMergeClean) && jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).text("")
- }), t
- }, TablePrintElement.prototype.autoCompletion = function (t, e, i) {
- for (var n, r = this.getEmptyRowTarget(), a = e.outerHeight() + i; a < t && (n = r.clone(), e.find("tbody").append(n), a = e.outerHeight() + i, !(this.options.maxRows && e.find("tbody").children().length > this.options.maxRows)););
- n && n.remove()
- }, TablePrintElement.prototype.getData = function (i) {
- if (!i) try {
- var t = this.options.testData || "[{}]";
- return JSON.parse(t)
- } catch (e) {
- return [{}]
- }
- var t = this.getField(),
- e = t && t.split(".").reduce(function (t, e) {
- return t ? t[e] : i ? i[e] : ""
- }, !1) || "";
- return e ? JSON.parse(JSON.stringify(e)) : []
- }, TablePrintElement.prototype.onResize = function (t, e, i, n, r) {
- _super.prototype.updateSizeAndPositionOptions.call(this, r, n, i, e), _table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.resizeTableCellWidth(this.designTarget, this.getColumns(), this.options.getWidth())
- }, TablePrintElement.prototype.getReizeableShowPoints = function () {
- return ["s", "e"]
- }, TablePrintElement.prototype.design = function (t, a) {
- var o = this;
- this.designTarget.hidraggable({
- handle: this.designTarget.find(".hiprint-printElement-table-handle"),
- axis: o.options.axis || void 0,
- designTarget: o,
- onDrag: function (t, e, i) {
- o.updateSizeAndPositionOptions(e, i), o.createLineOfPosition(a), _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.changed = !0
- },
- moveUnit: "pt",
- minMove: _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance,
- onBeforeDrag: function (t) {
- _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !0, o.createLineOfPosition(a)
- },
- getScale: function () {
- return o.designPaper.scale || 1
- },
- onStopDrag: function (t) {
- _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.changed && _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.trigger("hiprintTemplateDataChanged_" + o.templateId, "移动"), _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !1, _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.changed = !1, o.removeLineOfPosition()
- }
- }), this.printElementType.editable && this.setHitable(), this.setColumnsOptions(), this.designTarget.hireizeable({
- showPoints: o.getReizeableShowPoints(),
- showSizeBox: _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.showSizeBox,
- noContainer: !0,
- onBeforeResize: function () {
- _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !0
- },
- getScale: function () {
- return o.designPaper.scale || 1
- },
- onResize: function (t, e, i, n, r) {
- o.onResize(t, e, i, n, r), o.hitable && o.hitable.updateColumnGrips(), o.createLineOfPosition(a)
- },
- onStopResize: function (t) {
- _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.trigger("hiprintTemplateDataChanged_" + o.templateId, t ? "旋转" : "大小"), _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !1, o.removeLineOfPosition()
- }
- }), this.bingKeyboardMoveEvent(this.designTarget, a)
- }, TablePrintElement.prototype.setHitable = function () {
- var t = this;
- this.hitable = new _hitable_HiTale__WEBPACK_IMPORTED_MODULE_7__.a({
- templateId: t.templateId,
- table: this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)"),
- rows: this.getColumns(),
- resizeRow: !1,
- resizeColumn: !0,
- fields: this.options.fields,
- trs: this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("tbody tr"),
- handle: this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("thead"),
- isEnableEdit: this.printElementType.editable || !0,
- columnDisplayEditable: null == this.printElementType.columnDisplayEditable || this.printElementType.columnDisplayEditable,
- columnDisplayIndexEditable: null == this.printElementType.columnDisplayIndexEditable || this.printElementType.columnDisplayIndexEditable,
- columnResizable: null == this.printElementType.columnResizable || this.printElementType.columnResizable,
- columnAlignEditable: null == this.printElementType.columnAlignEditable || this.printElementType.columnAlignEditable,
- isEnableEditText: null == this.printElementType.columnTitleEditable || this.printElementType.columnTitleEditable,
- isEnableEditField: null == this.printElementType.isEnableEditField || this.printElementType.isEnableEditField,
- isEnableContextMenu: null == this.printElementType.isEnableContextMenu || this.printElementType.isEnableContextMenu,
- isEnableInsertRow: null == this.printElementType.isEnableInsertRow || this.printElementType.isEnableInsertRow,
- isEnableDeleteRow: null == this.printElementType.isEnableDeleteRow || this.printElementType.isEnableDeleteRow,
- isEnableInsertColumn: null == this.printElementType.isEnableInsertColumn || this.printElementType.isEnableInsertColumn,
- isEnableDeleteColumn: null == this.printElementType.isEnableDeleteColumn || this.printElementType.isEnableDeleteColumn,
- isEnableMergeCell: null == this.printElementType.isEnableMergeCell || this.printElementType.isEnableMergeCell
- }), _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.on("updateTable" + this.hitable.id, function () {
- t.updateDesignViewFromOptions(), _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.trigger("hiprintTemplateDataChanged_" + t.templateId, "调整表头")
- })
- }, TablePrintElement.prototype.setColumnsOptions = function () {
- var n = this;
- this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("thead td").bind("click.hiprint", function (t) {
- var e, t = jquery__WEBPACK_IMPORTED_MODULE_60___default()(t.target).attr("id") || jquery__WEBPACK_IMPORTED_MODULE_60___default()(t.target).attr("column-id"),
- i = n.getColumnByColumnId(t);
- i ? (e = n.getPrintElementOptionItemsByName("tableColumn"), _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.trigger(n.getPrintElementSelectEventKey(), {
- printElement: n,
- customOptionsInput: [{
- title: (i.title || "".concat(i.id, "(id)")) + "-".concat(i18n.__("列属性")),
- optionItems: e,
- options: i,
- callback: function (t) {
- e.forEach(function (t) {
- var e = t.getValue();
- "title" != t.name || !e || e.trim().endsWith("#") || e.trim().startsWith("#") ? i[t.name] = e : (e = e ? e.split("#") : "", i.title = e[0], 1 < e.length && (i.columnId = i.field = e[1]), i.columnId && i.target.attr("column-id", i.columnId), t.target.find("textarea").val(e[0]))
- })
- }
- }]
- })) : _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.trigger(n.getPrintElementSelectEventKey(), {
- printElement: n
- })
- })
- }, TablePrintElement.prototype.filterOptionItems = function (t) {
- var e = _super.prototype.filterOptionItems.call(this, t);
- return this.printElementType.editable && 1 == this.options.columns.length ? e : t.filter(function (t) {
- return "columns" != t.name
- })
- }, TablePrintElement.prototype.getFooterFormatter = function () {
- var footerFormatter = void 0;
- if (this.printElementType.footerFormatter && (footerFormatter = this.printElementType.footerFormatter), this.options.footerFormatter) try {
- var s = "footerFormatter=" + this.options.footerFormatter;
- eval(s)
- } catch (t) { }
- return footerFormatter
- }, TablePrintElement.prototype.getGridColumnsFooterFormatter = function () {
- var gridColumnsFooterFormatter = void 0;
- if (this.printElementType.gridColumnsFooterFormatter && (gridColumnsFooterFormatter = this.printElementType.gridColumnsFooterFormatter), this.options.gridColumnsFooterFormatter) try {
- var s = "gridColumnsFooterFormatter=" + this.options.gridColumnsFooterFormatter;
- eval(s)
- } catch (t) { }
- return gridColumnsFooterFormatter
- }, TablePrintElement
- }(_BasePrintElement__WEBPACK_IMPORTED_MODULE_0__.a)
- }, function (t, e, i) {
- var n = function (t) {
- this.table = t.table, this.templateId = t.templateId, this.fields = t.fields, this.isEnableEdit = t.isEnableEdit, this.trs = t.trs, this.resizeRow = t.resizeRow, this.resizeColumn = t.resizeColumn, this.isEnableEditField = t.isEnableEditField, this.isEnableContextMenu = t.isEnableContextMenu, this.isEnableEditField = t.isEnableEditField, this.isEnableInsertRow = t.isEnableInsertRow, this.isEnableDeleteRow = t.isEnableDeleteRow, this.isEnableInsertColumn = t.isEnableInsertColumn, this.isEnableDeleteColumn = t.isEnableDeleteColumn, this.isEnableMergeCell = t.isEnableMergeCell, this.columnResizable = t.columnResizable, this.columnAlignEditable = t.columnAlignEditable
- },
- r = (y.prototype.enableEidt = function () {
- this.options.isEnableEdit
- }, y.prototype.disableEdit = function () {
- this.options.isEnableEdit
- }, y.prototype.isEnableEdit = function () {
- return this.options.isEnableEdit
- }, y),
- p = i(0),
- d = function (t) {
- this.cell = t.cell, this.link = t.link, this.linkType = t.linkType, this.bottom = t.bottom, this.rightMost = t.rightMost, this.rowLevel = t.rowLevel, this.columnLevel = t.columnLevel, this.indexInTableGridRow = t.indexInTableGridRow, this.indexInTableGridColumn = t.indexInTableGridColumn
- },
- a = i(10),
- s = (_.getLeftTableCell = function (t, i) {
- var n;
- return t.forEach(function (t, e) {
- t.cell && e < i && (n = t.cell)
- }), n
- }, _.getIndex = function (t, i) {
- var n;
- return t.forEach(function (t, e) {
- t.cell && t.cell.id == i && (n = e)
- }), n
- }, _),
- c = i(13),
- o = i(11),
- l = function (t, e) {
- this.target = t, this.grips = e
- },
- u = function (t) {
- this.target = t
- },
- f = function () {
- this.rowColumns = []
- },
- h = (A.getColumnsWidth = function (t, i) {
- var n = {},
- r = A.allAutoWidth(t);
- return t.rowColumns.forEach(function (t) {
- var e = +i,
- e = t.width / r * (0 < e ? e : 0);
- n[t.id] = e
- }), n
- }, A.resizeTableCellWeight = function (t) {
- t.forEach(function (t) {
- t.columns.forEach(function (t) {
- t.hasWidth && jquery__WEBPACK_IMPORTED_MODULE_60___default()(t.getTarget()).css("width", t.width + "pt")
- })
- })
- }, A.allAutoWidth = function (t) {
- var e = 0;
- return t.rowColumns.forEach(function (t) {
- e += t.width
- }), e
- }, A.reconsitutionTableColumnTree = function (i, t, e) {
- for (var n = t || new f, r = 0; r < i.length; r++) ! function (e) {
- n.totalLayer = e + 1, n[e] = i[e].columns, n.rowColumns = n.rowColumns.concat(n[e].filter(function (t) {
- return t.rowspan == i.length - e
- }))
- }(r);
- return n
- }, A),
- m = i(2),
- g = (I.prototype.init = function () {
- this.addResizeRowAndColumn(), this.hitable.optionsCoat.options.resizeColumn && this.createColumnGrips(), this.hitable.optionsCoat.options.resizeRow && this.createRowGrips()
- }, I.prototype.resizeTableCellWidth = function () {
- h.resizeTableCellWeight(this.rows)
- }, I.prototype.addResizeRowAndColumn = function () { }, I.prototype.createColumnGrips = function () {
- var r = this,
- a = this,
- o = [],
- s = jquery__WEBPACK_IMPORTED_MODULE_60___default()('');
- s.width(this.target.width()), this.rows.forEach(function (t) {
- (t.columns || []).filter(function (t) {
- return t.checked
- }).forEach(function (t, e) {
- var i, n;
- t.getTarget().attr("haswidth") && (i = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'), s.append(i), n = new u(i), 0 < o.length && (o[o.length - 1].nextGrip = n), o.push(n), r.syncGrips(t, n), jquery__WEBPACK_IMPORTED_MODULE_60___default()(i).hidraggable({
- axis: "h",
- onDrag: function (t, e, i) { },
- moveUnit: "pt",
- minMove: 1,
- getScale: function () {
- return jquery__WEBPACK_IMPORTED_MODULE_60___default()(".hiprint-printPaper")[0].style.transform && parseFloat(jquery__WEBPACK_IMPORTED_MODULE_60___default()(".hiprint-printPaper")[0].style.transform.slice(6, -1)) || 1
- },
- onBeforeDrag: function (t) {
- if (m.a.instance.draging = !0, !n.nextGrip) return !1;
- a.dragingGrip = n, a.dragingGrip.left = parseFloat(a.dragingGrip.target.css("left").replace("px", "")), n.target.addClass("columngripDraging")
- },
- onStopDrag: function (t) {
- m.a.instance.draging = !1;
- var e = parseFloat(a.dragingGrip.target.css("left").replace("px", "")),
- e = p.a.px.toPt(e - a.dragingGrip.left);
- n.cell.width + e < 10 ? e = 10 - n.cell.width : n.nextGrip.cell.width - e < 10 && (e = n.nextGrip.cell.width - 10), n.cell.width = n.cell.width + e, n.nextGrip.cell.width = n.nextGrip.cell.width - e, r.resizeTableCellWidth(), n.target.removeClass("columngripDraging"), a.updateColumnGrips()
- }
- }))
- })
- }), this.target.before(s), this.cgripContariner = new l(s, o)
- }, I.prototype.updateColumnGrips = function () {
- this.cgripContariner && (this.cgripContariner.target.remove(), this.createColumnGrips())
- }, I.prototype.updateRowGrips = function () {
- this.rgripContariner && (this.rgripContariner.target.remove(), this.createRowGrips())
- }, I.prototype.createRowGrips = function () {
- var r = this,
- a = this,
- o = [],
- s = jquery__WEBPACK_IMPORTED_MODULE_60___default()('');
- this.rows.forEach(function (t, i) {
- var e = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'),
- n = (s.append(e), new u(e));
- o.push(n), 0 < i && i < r.rows.length && jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).hidraggable({
- axis: "v",
- onDrag: function (t, e, i) { },
- moveUnit: "pt",
- minMove: 1,
- onBeforeDrag: function (t) {
- a.dragingGrip = n, a.dragingGrip.top = parseFloat(a.dragingGrip.target.css("top").replace("px", "")), n.target.addClass("rowgripDraging")
- },
- onStopDrag: function (t) {
- var e = parseFloat(a.dragingGrip.target.css("top").replace("px", "")),
- e = p.a.px.toPt(e - a.dragingGrip.top + a.rows[i].columns[0].getTarget().height());
- a.rows[i].columns[0].getTarget().css("height", e + "pt"), a.syncRowGrips(), n.target.removeClass("rowgripDraging")
- }
- })
- }), this.target.before(s), this.rgripContariner = new l(s, o), this.syncRowGrips()
- }, I.prototype.syncGrips = function (t, e) {
- var i = t.getTarget();
- e.cell = t, e.target.css({
- left: i.offset().left - this.target.offset().left + i.outerWidth(!1),
- height: 30
- })
- }, I.prototype.syncRowGrips = function () {
- var i = this;
- this.rgripContariner.target.height(this.target.height()), this.rows.forEach(function (t, e) {
- t = t.columns[0].getTarget();
- i.rgripContariner.grips[e].target.css({
- top: t.offset().top - i.target.offset().top + t.outerHeight(!1),
- width: 30
- })
- })
- }, I.prototype.addResizerHeadRow = function () {
- this.target.find("thead").prepend()
- }, I),
- v = (b.prototype.init = function () { }, b.prototype.updateRowGrips = function () { }, b.prototype.updateColumnGrips = function () { }, b);
-
- function b() { }
-
- function I(t) {
- this.signature = "HiTresizer", this.hitable = t, this.rows = t.rows, this.target = t.target
- }
-
- function A() { }
-
- function _() { }
-
- function y(t) {
- this.options = new n(t)
- }
- i.d(e, "a", function () {
- return x
- });
- w.prototype.insertRow = function (t, e, i) {
- var e = e || this.tableCellSelector.getSingleSelect(),
- n = e.cell,
- r = this.rows[e.rowIndex],
- e = e.rowIndex,
- a = this.getCellGrid(),
- o = new c.a;
- o.init(this.optionsCoat, void 0, r.isHead), i && o.getTarget().addClass(i), "above" == t ? (a[e].forEach(function (t) {
- var e, i = t.link || t.cell,
- i = i.width / i.colspan;
- 0 == t.columnLevel ? ((e = o.createTableCell()).width = i, o.insertCellToLast(e)) : ("column" == t.linkType && (i = t.link.getTarget(), t.link.rowspan += 1, i.attr("rowspan", t.link.rowspan)), t.linkType)
- }), this.rows.splice(e, 0, o), r.getTarget().before(o.getTarget())) : (a[i = e + n.rowspan - 1].forEach(function (t) {
- var e, i, n = t.link || t.cell,
- n = n.width / n.colspan;
- t.bottom ? ((e = o.createTableCell()).width = n, o.insertCellToLast(e)) : (t.cell && (i = t.cell.getTarget(), t.cell.rowspan += 1, i.attr("rowspan", t.cell.rowspan)), "column" == t.linkType && (i = t.link.getTarget(), t.link.rowspan += 1, i.attr("rowspan", t.link.rowspan)))
- }), this.rows.splice(1 + i, 0, o), this.rows[i].getTarget().after(o.getTarget())), p.a.event.trigger("newRow" + this.id, o)
- }, w.prototype.insertColumn = function (t, e, a, o) {
- var r, s, c = this,
- l = this.rows.concat(this.trRows),
- e = e || this.tableCellSelector.getSingleSelect(),
- i = e.cell,
- e = e.rowIndex,
- n = this.getCellGrid(l),
- e = n[e].filter(function (t) {
- return t.cell && t.cell.id == i.id || t.link && t.link.id == i.id
- });
- "left" == t ? (r = e[0].indexInTableGridRow, n.forEach(function (t, e) {
- var i, n = t[r],
- t = t.filter(function (t, e) {
- return r <= e && t.cell
- });
- 0 == n.rowLevel ? (i = l[e], e = l[e].createTableCell(), a && e.getTarget().addClass(a), null != o && (e.width = o), t.length ? i.insertToTargetCellLeft(t[0].cell, e) : i.insertCellToLast(e), p.a.event.trigger("newCell" + c.id, e)) : "row" == n.linkType && (t = n.link.getTarget(), n.link.colspan += 1, t.attr("colspan", n.link.colspan))
- })) : (s = e[e.length - 1].indexInTableGridRow, n.forEach(function (t, e) {
- var i, n, r = t[s],
- t = t.filter(function (t, e) {
- return e <= s && t.cell
- });
- r.rightMost ? (i = (e = l[e]).createTableCell(), a && i.getTarget().addClass(a), null != o && (i.width = o), t.length ? e.insertToTargetCellRight(t[t.length - 1].cell, i) : e.insertCellToFirst(i), p.a.event.trigger("newCell" + c.id, i)) : (t = r.link || r.cell, "row" == r.linkType && (n = t.getTarget(), t.colspan += 1, n.attr("colspan", t.colspan)), r.cell && (n = t.getTarget(), t.colspan += 1, n.attr("colspan", t.colspan)))
- }))
- }, w.prototype.deleteRow = function () {
- var a = this,
- t = this.tableCellSelector.getSingleSelect(),
- o = (t.cell, this.rows[t.rowIndex], t.rowIndex),
- s = this.getCellGrid(),
- c = this.rows[o];
- s[o].forEach(function (t, i) {
- var e, n, r;
- t.cell ? 1 == t.cell.rowspan ? c.removeCell(t.cell) : (c.removeCell(t.cell), r = s[o + 1].filter(function (t, e) {
- return t.cell && i < e
- }), n = (e = a.rows[o + 1]).createTableCell(t.cell.rowspan - 1, t.cell.colspan), r.length ? e.insertToTargetCellLeft(r[0].cell, n) : e.insertCellToLast(n)) : "column" == t.linkType && (--(r = t.link).rowspan, r.getTarget().attr("rowspan", r.rowspan))
- }), c.getTarget().remove(), this.rows.splice(o, 1)
- }, w.prototype.deleteColums = function () {
- var i = this.rows.concat(this.trRows),
- t = this.tableCellSelector.getSingleSelect(),
- e = t.cell,
- t = t.rowIndex,
- n = this.getCellGrid(i),
- r = n[t].filter(function (t) {
- return t.cell && t.cell.id == e.id || t.link && t.link.id == e.id
- })[0].indexInTableGridRow;
- n.forEach(function (t, e) {
- t = t[r];
- t.cell ? 1 == t.cell.colspan ? i[e].removeCell(t.cell) : (--t.cell.colspan, t.cell.getTarget().attr("colspan", t.cell.colspan)) : "row" == t.linkType && (--t.link.colspan, t.link.getTarget().attr("colspan", t.link.colspan))
- })
- }, w.prototype.mergeCell = function () {
- var n, r = this,
- a = this.tableCellSelector.getSelectedCells();
- 0 != a.length && (n = a[0][0].cell, a.forEach(function (t, i) {
- t.forEach(function (t, e) {
- 0 == i ? 0 != e && (n.colspan += t.cell.colspan, r.rows[t.rowIndex].removeCell(t.cell)) : r.rows[t.rowIndex].removeCell(t.cell), 0 == e && a[0][0].rowIndex + n.rowspan - 1 < t.rowIndex && (n.rowspan += t.cell.rowspan)
- })
- }), n.getTarget().attr("colspan", n.colspan), n.getTarget().attr("rowspan", n.rowspan), this.tableCellSelector.setSingleSelect(a[0][0]))
- }, w.prototype.splitCell = function () {
- var t = this.tableCellSelector.getSingleSelect(),
- e = this.getCellGrid(),
- i = s.getIndex(e[t.rowIndex], t.cell.id);
- if (t) {
- for (var n = t.rowIndex; n < t.rowIndex + t.cell.rowspan; n++)
- for (var r = this.rows[n], a = n == t.rowIndex ? t.cell : s.getLeftTableCell(e[n], i), o = 0; o < t.cell.colspan; o++) n == t.rowIndex && 0 == o || (a ? r.insertToTargetCellRight(a, r.createTableCell()) : r.insertCellToFirst(r.createTableCell()));
- t.cell.rowspan = 1, t.cell.colspan = 1, t.cell.getTarget().attr("colspan", t.cell.colspan), t.cell.getTarget().attr("rowspan", t.cell.rowspan)
- }
- }, w.prototype.init = function (e) {
- var i = this;
- jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.target).addClass("hitable"), this.optionsCoat.onBeforEdit = function (t) {
- return !(i.optionsCoat.options.onBeforEdit && !1 === e.onBeforEdit(t) || (i.optionsCoat.editingCell && i.optionsCoat.editingCell.endEdit(), 0))
- }, jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.target).mousedown(function (t) {
- i.optionsCoat.isLeftMouseButtonDown = !0
- }), jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.target).mouseup(function (t) {
- i.optionsCoat.isLeftMouseButtonDown = !1
- }), this.initContext(), this.target.on("mousemove", function (t) {
- 1 === t.buttons && i.tableCellSelector.multipleSelectByXY(t.pageX, t.pageY)
- }).on("mousedown", function (t) {
- 1 === t.buttons && i.tableCellSelector.singleSelectByXY(t.pageX, t.pageY)
- })
- }, w.prototype.initRows = function (t) {
- var i = this;
- this.trRows = [], t ? ((this.rows = t).forEach(function (t, e) {
- t.init(i.optionsCoat, i.target.find("tr:eq(" + e + ")"), !0)
- }), (t = this.optionsCoat.options.trs) && this.initRowsByTrs(t).forEach(function (t) {
- i.trRows.push(t)
- })) : this.rows = this.initRowsByTrs(this.target.find("tr"))
- }, w.prototype.initRowsByTrs = function (t) {
- var n = this;
- return t.map(function (t, e) {
- var i = new c.a;
- return i.init(n.optionsCoat, jquery__WEBPACK_IMPORTED_MODULE_60___default()(e)), i
- }).get()
- }, w.prototype.enableEidt = function () {
- this.optionsCoat.enableEidt()
- }, w.prototype.disableEdit = function () {
- this.optionsCoat.disableEdit()
- }, w.prototype.getCellGrid = function (t) {
- var t = t || this.rows,
- c = this.getColumnStep(),
- l = new Array;
- return t.forEach(function (t, s) {
- t.columns.forEach(function (t, e) {
- for (var i = 0; i < t.colspan; i++)
- for (var n = 0, r = !1; n < c && !r;) {
- if (l[s] = l[s] || [], !l[s][n]) {
- l[s][n] = new d({
- cell: 0 == i ? t : void 0,
- link: 0 != i ? t : void 0,
- linkType: 0 < i ? "row" : void 0,
- rightMost: i == t.colspan - 1 || void 0,
- bottom: 0 == t.rowspan - 1,
- rowLevel: i,
- columnLevel: 0,
- indexInTableGridRow: n,
- indexInTableGridColumn: s
- });
- for (var a = s + 1, o = 1; o < t.rowspan; o++) l[a] = l[a] || [], l[a][n] = new d({
- cell: void 0,
- link: t,
- linkType: 0 < i ? "rowColumn" : "column",
- rightMost: i == t.colspan - 1 || void 0,
- bottom: o == t.rowspan - 1,
- rowLevel: i,
- columnLevel: o,
- indexInTableGridRow: n,
- indexInTableGridColumn: a
- }), a += 1;
- r = !0
- }
- n++
- }
- })
- }), l
- }, w.prototype.setAlign = function (t) {
- var e = this.tableCellSelector.getSingleSelect();
- e && e.cell.setAlign(t)
- }, w.prototype.setVAlign = function (t) {
- var e = this.tableCellSelector.getSingleSelect();
- e && e.cell.setVAlign(t)
- }, w.prototype.getColumnStep = function (t) {
- var e = 0;
- return this.rows.length && this.rows[t || 0].columns.forEach(function (t) {
- e += t.colspan
- }), e
- }, w.prototype.initContext = function () {
- var e = this;
- if (!this.optionsCoat.options.isEnableContextMenu) return !1;
- jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.handle).hicontextMenu({
- menus: [{
- text: "".concat(i18n.__("在上方插入行")),
- enabled: this.optionsCoat.options.isEnableInsertRow,
- disable: function () {
- return !e.tableCellSelector.getSingleSelect()
- },
- callback: function () {
- e.insertRow("above"), e.resizer.updateRowGrips(), p.a.event.trigger("updateTable" + e.id)
- }
- }, {
- text: "".concat(i18n.__("在下方插入行")),
- borderBottom: !0,
- enabled: this.optionsCoat.options.isEnableInsertRow,
- disable: function () {
- return !e.tableCellSelector.getSingleSelect()
- },
- callback: function () {
- e.insertRow("below"), e.resizer.updateRowGrips(), p.a.event.trigger("updateTable" + e.id)
- }
- }, {
- text: "".concat(i18n.__("向左方插入列")),
- enabled: this.optionsCoat.options.isEnableInsertColumn,
- disable: function () {
- return !e.tableCellSelector.getSingleSelect()
- },
- callback: function () {
- e.insertColumn("left"), e.resizer.updateColumnGrips(), p.a.event.trigger("updateTable" + e.id)
- }
- }, {
- text: "".concat(i18n.__("向右方插入列")),
- enabled: this.optionsCoat.options.isEnableInsertColumn,
- disable: function () {
- return !e.tableCellSelector.getSingleSelect()
- },
- borderBottom: !0,
- callback: function () {
- e.insertColumn("right"), e.resizer.updateColumnGrips(), p.a.event.trigger("updateTable" + e.id)
- }
- }, {
- text: "".concat(i18n.__("删除行")),
- enabled: this.optionsCoat.options.isEnableDeleteRow,
- disable: function () {
- return !e.tableCellSelector.getSingleSelect() || e.rows.length <= 1
- },
- callback: function () {
- e.deleteRow(), e.resizer.updateRowGrips(), p.a.event.trigger("updateTable" + e.id)
- }
- }, {
- text: "".concat(i18n.__("删除列")),
- borderBottom: !0,
- enabled: this.optionsCoat.options.isEnableDeleteColumn,
- disable: function () {
- return !e.tableCellSelector.getSingleSelect() || 0 < e.rows.length && e.rows[0].columns.length <= 1
- },
- callback: function () {
- e.deleteColums(), e.resizer.updateColumnGrips(), p.a.event.trigger("updateTable" + e.id)
- }
- }, {
- text: "".concat(i18n.__("对齐")),
- borderBottom: !0,
- enabled: this.optionsCoat.options.columnAlignEditable,
- menus: [{
- text: "".concat(i18n.__("左")),
- callback: function () {
- e.setAlign("left")
- }
- }, {
- text: "".concat(i18n.__("左右居中")),
- callback: function () {
- e.setAlign("center")
- }
- }, {
- text: "".concat(i18n.__("右")),
- callback: function () {
- e.setAlign("right")
- }
- }, {
- text: "".concat(i18n.__("默认")),
- borderBottom: !0,
- callback: function () {
- e.setAlign("")
- }
- }, {
- text: "".concat(i18n.__("上")),
- callback: function () {
- e.setVAlign("top")
- }
- }, {
- text: "".concat(i18n.__("垂直居中")),
- callback: function () {
- e.setVAlign("middle")
- }
- }, {
- text: "".concat(i18n.__("下")),
- callback: function () {
- e.setVAlign("bottom")
- }
- }, {
- text: "".concat(i18n.__("默认")),
- callback: function () {
- e.setVAlign("")
- }
- }]
- }, {
- text: "".concat(i18n.__("合并单元格")),
- enabled: this.optionsCoat.options.isEnableMergeCell,
- disable: function () {
- return e.tableCellSelector.getSingleSelect()
- },
- callback: function () {
- e.mergeCell(), p.a.event.trigger("updateTable" + e.id)
- }
- }, {
- text: "".concat(i18n.__("解开单元格")),
- enabled: this.optionsCoat.options.isEnableMergeCell,
- disable: function () {
- var t = e.tableCellSelector.getSingleSelect();
- return !t || 1 == t.cell.rowspan && 1 == t.cell.colspan
- },
- callback: function () {
- e.splitCell(), p.a.event.trigger("updateTable" + e.id)
- }
- }].filter(function (t) {
- return t.enabled
- })
- })
- }, w.prototype.getTableWidth = function () {
- return p.a.px.toPt(this.target.outerWidth(!1))
- }, w.prototype.updateColumnGrips = function () {
- this.resizer.updateColumnGrips()
- }, w.prototype.updateRowGrips = function () {
- this.resizer.updateRowGrips()
- };
- var x = w;
-
- function w(t) {
- this.id = o.a.createId(), this.optionsCoat = new r(t), this.handle = t.handle, this.target = t.table, this.initRows(t.rows), this.init(t), this.tableCellSelector = new a.a(this.rows, this.target), this.resizer = this.optionsCoat.options.columnResizable ? new g(this) : new v, this.resizer.init()
- }
- }, function (t, e, i) {
- i.d(e, "a", function () {
- return n
- });
- var n = function (t, e, i) {
- this.tid = t, this.options = e, this.printElementType = i
- }
- }, function (t, e, i) {
- var n = i(3),
- r = i(12),
- a = function (t) {
- this.width = t.width, this.title = t.title, this.field = t.field, this.checked = t.checked, this.columnId = t.columnId, this.fixed = !1, this.rowspan = t.rowspan || 1, this.colspan = t.colspan || 1, this.align = t.align, this.halign = t.halign, this.vAlign = t.vAlign, this.renderFormatter = t.renderFormatter, this.formatter2 = t.formatter2, this.styler2 = t.styler2, this.stylerHeader = t.stylerHeader, this.tableColumnHeight = t.tableColumnHeight, this.tableTextType = t.tableTextType, this.tableBarcodeMode = t.tableBarcodeMode, this.tableQRCodeLevel = t.tableQRCodeLevel, this.tableSummaryTitle = t.tableSummaryTitle, this.tableSummaryText = t.tableSummaryText, this.tableSummaryColspan = t.tableSummaryColspan, this.tableSummary = t.tableSummary, this.tableSummaryAlign = t.tableSummaryAlign, this.tableSummaryNumFormat = t.tableSummaryNumFormat, this.tableSummaryFormatter = t.tableSummaryFormatter, this.upperCase = t.upperCase
- },
- o = i(5);
- i.d(e, "a", function () {
- return p
- });
- s = function (t, e) {
- return (s = Object.setPrototypeOf || (_instanceof({
- __proto__: []
- }, Array) ? function (t, e) {
- t.__proto__ = e
- } : function (t, e) {
- for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
- }))(t, e)
- };
- c = n.a, s(l = d, i = c), l.prototype = null === i ? Object.create(i) : (u.prototype = i.prototype, new u), d.prototype.getColumnByColumnId = function (t) {
- return this.makeColumnObj()[t]
- }, d.prototype.makeColumnObj = function () {
- var e = {};
- return this.columns && this.columns.forEach(function (t) {
- t.columns.forEach(function (t) {
- (t.id || t.columnId) && (e[t.id || t.columnId] = t)
- })
- }), e
- }, d.prototype.getGridColumns = function () {
- return this.gridColumns || 1
- }, d.prototype.getPrintElementOptionEntity = function () {
- var e = c.prototype.getPrintElementOptionEntity.call(this);
- return e.fields = this.fields, this.columns && (e.columns = [], this.columns.forEach(function (t) {
- t = t.getPrintElementOptionEntity().map(function (t) {
- return new a(t)
- });
- e.columns.push(t)
- })), e
- };
- var s, c, l, p = d;
-
- function d(t, n) {
- var e = this;
- return (e = c.call(this, t = t || {}) || this).lHeight = t.lHeight, e.autoCompletion = t.autoCompletion, e.tableFooterRepeat = t.tableFooterRepeat, n && (e.columns = [], n.editable && t.columns && t.columns.length ? t.columns.forEach(function (t) {
- var i = [];
- t.forEach(function (t) {
- var t = new a(t),
- e = n.getColumnByColumnId(t.columnId),
- e = e ? jquery__WEBPACK_IMPORTED_MODULE_60___default.a.extend(e, t) : new o.a(t);
- i.push(e)
- }), e.columns.push(new r.a(i))
- }) : n.columns.forEach(function (t) {
- e.columns.push(new r.a(t))
- })), e
- }
-
- function u() {
- this.constructor = l
- }
- }, function (t, e, i) {
- i.d(e, "a", function () {
- return n
- });
- var n = function () {
- this.rowColumns = []
- }
- }, function (t, e, i) {
- i.d(e, "a", function () {
- return n
- });
- r.prototype.getByIndex = function (t) {
- return this.target.find(".hi-grid-col:eq(" + t + ")")
- };
- var n = r;
-
- function r(t, e) {
- this.gridColumns = t, this.target = e
- }
- }, function (t, e, i) {
- t.exports = i(33)
- }, function (t, e) {
- function I(t) {
- var e = M.data(t.data.target, "hidraggable"),
- i = e.options,
- n = e.proxy,
- r = t.data,
- a = r.startLeft + (t.pageX - r.startX) / (e.options.getScale() || 1),
- e = r.startTop + (t.pageY - r.startY) / (e.options.getScale() || 1);
- n && (n.parent()[0] == document.body ? (a = null != i.deltaX && null != i.deltaX ? t.pageX + i.deltaX : t.pageX - t.data.offsetWidth, e = null != i.deltaY && null != i.deltaY ? t.pageY + i.deltaY : t.pageY - t.data.offsetHeight) : (null != i.deltaX && null != i.deltaX && (a += t.data.offsetWidth + i.deltaX), null != i.deltaY && null != i.deltaY && (e += t.data.offsetHeight + i.deltaY))), t.data.parent != document.body && (a += M(t.data.parent).scrollLeft(), e += M(t.data.parent).scrollTop()), "h" == i.axis ? r.left = a : "v" == i.axis || t.shiftKey && t.altKey ? r.top = e : t.shiftKey ? r.left = a : (r.left = a, r.top = e)
- }
-
- function A(t) {
- var e = M.data(t.data.target, "hidraggable"),
- i = e.options;
- (e.proxy || M(t.data.target)).css({
- left: M.fn.dragLengthC(t.data.left, i),
- top: M.fn.dragLengthC(t.data.top, i)
- }), M("body").css("cursor", i.cursor)
- }
-
- function c(e) {
- M.fn.hidraggable.isDragging = !0;
- var t = M.data(e.data.target, "hidraggable"),
- i = t.options,
- n = M(".hidroppable").filter(function () {
- return e.data.target != this
- }).filter(function () {
- var t = M.data(this, "hidroppable").options.accept;
- return !t || 0 < M(t).filter(function () {
- return this == e.data.target
- }).length
- }),
- n = (t.hidroppables = n, t.proxy);
- return n || (i.proxy ? (n = "clone" == i.proxy ? M(e.data.target).clone().insertAfter(e.data.target) : i.proxy.call(e.data.target, e.data.target), t.proxy = n) : n = M(e.data.target)), n.css("position", "absolute"), I(e), A(e), i.onStartDrag.call(e.data.target, e), !1
- }
-
- function _(t, e, i, n, r, a) {
- Math.abs(t[i] - e[n]) <= HIPRINT_CONFIG.adsorbLineMin ? t.v.length ? t.v.css("left", t[i] + "pt") : (t.v = jquery__WEBPACK_IMPORTED_MODULE_60___default()(""), t.v.css("height", r + "pt"), t.v.css("left", t[i] + "pt"), a.append(t.v)) : t.v && t.v.remove()
- }
-
- function y(t) {
- t && t.v && t.v.remove(), jquery__WEBPACK_IMPORTED_MODULE_60___default()(".verLine").remove()
- }
-
- function x(t, e, i, n, r, a) {
- Math.abs(t[i] - e[n]) <= HIPRINT_CONFIG.adsorbLineMin ? t.h.length ? t.h.css("top", t[i] + "pt") : (t.h = jquery__WEBPACK_IMPORTED_MODULE_60___default()(""), t.h.css("width", r + "pt"), t.h.css("top", t[i] + "pt"), a.append(t.h)) : t.h && t.h.remove()
- }
-
- function w(t) {
- t && t.h && t.h.remove(), jquery__WEBPACK_IMPORTED_MODULE_60___default()(".horLine").remove()
- }
-
- function l(i) {
- var t, u, e, n, r, a, o, s, c, l, p, d, f, h, m, g, v = M.data(i.data.target, "hidraggable"),
- b = (I(i), i.ctrlKey || i.metaKey || !i.data.target.className.startsWith("resize-panel") && "2" != i.data.target.style.zIndex && !i.data.target.className.startsWith("hiprint-printElement") || (t = i.data, 0 == M(".mouseRect").length && v.options.designTarget && v.options.designTarget.panel.printElements.filter(function (t) {
- return "block" == t.designTarget.children().last().css("display") && !t.printElementType.type.includes("table")
- }).length <= 1 && (l = window.hinnn.px.toPt(t.left), e = window.hinnn.px.toPt(t.top), (u = v.options.designTarget.options).left = l, u.top = e, u.right = l + u.width, u.bottom = e + u.height, u.vCenter = l + u.width / 2, u.hCenter = e + u.height / 2, c = v.options.designTarget.panel.printElements.filter(function (t) {
- return t.id != v.options.designTarget.id
- }).map(function (t) {
- var e = t.options,
- i = e.left,
- n = e.top,
- r = e.width,
- e = e.height,
- a = i + r,
- o = i + r / 2,
- s = n + e / 2,
- c = u.left + u.width / 2,
- l = u.top + u.height / 2,
- p = u.left + u.width,
- d = Math.sqrt(Math.pow(i - u.left, 2) + Math.pow(s - l, 2)),
- c = Math.sqrt(Math.pow(o - c, 2) + Math.pow(s - l, 2)),
- a = Math.sqrt(Math.pow(a - p, 2) + Math.pow(s - l, 2)),
- p = Math.min(d, c, a);
- return Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__.a)(Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__.a)({}, t.options), {}, {
- distance: p,
- h: jquery__WEBPACK_IMPORTED_MODULE_60___default()(".horLine.id-" + t.id),
- v: jquery__WEBPACK_IMPORTED_MODULE_60___default()(".verLine.id-" + t.id),
- bottom: n + e,
- right: i + r,
- vCenter: o,
- hCenter: s
- })
- }).sort(function (t, e) {
- return t.distance - e.distance
- }).slice(0, 1), l = v.options.designTarget.designPaper, p = l.target.find(".hiprint-printPaper-content"), d = l.width, f = l.height, h = HIPRINT_CONFIG.showAdsorbLine, m = HIPRINT_CONFIG.adsorbMin, g = HIPRINT_CONFIG.adsorbLineMin, c.forEach(function (t, e) {
- Math.abs(c[e].left - u.left) <= m ? (u.left = c[e].left, y(c[e])) : Math.abs(c[e].vCenter - u.left) <= m ? (u.left = c[e].vCenter, y(c[e])) : Math.abs(c[e].right - u.left) <= m && (u.left = c[e].right, y(c[e])), Math.abs(c[e].left - u.vCenter) <= m ? (u.left = c[e].left - u.width / 2, y(c[e])) : Math.abs(c[e].vCenter - u.vCenter) <= m ? (u.left = c[e].vCenter - u.width / 2, y(c[e])) : Math.abs(c[e].right - u.vCenter) <= m && (u.left = c[e].right - u.width / 2, y(c[e])), Math.abs(c[e].left - u.right) <= m ? (u.left = c[e].left - u.width, y(c[e])) : Math.abs(c[e].vCenter - u.right) <= m ? (u.left = c[e].vCenter - u.width, y(c[e])) : Math.abs(c[e].right - u.right) <= m && (u.left = c[e].right - u.width, y(c[e])), Math.abs(c[e].top - u.top) <= m ? (u.top = c[e].top, w(c[e])) : Math.abs(c[e].hCenter - u.top) <= m ? (u.top = c[e].hCenter, w(c[e])) : Math.abs(c[e].bottom - u.top) <= m && (u.top = c[e].bottom, w(c[e])), Math.abs(c[e].top - u.hCenter) <= m ? (u.top = c[e].top - u.height / 2, w(c[e])) : Math.abs(c[e].hCenter - u.hCenter) <= m ? (u.top = c[e].hCenter - u.height / 2, w(c[e])) : Math.abs(c[e].bottom - u.hCenter) <= m && (u.top = c[e].bottom - u.height / 2, w(c[e])), Math.abs(c[e].top - u.bottom) <= m ? (u.top = c[e].top - u.height, w(c[e])) : Math.abs(c[e].hCenter - u.bottom) <= m ? (u.top = c[e].hCenter - u.height, w(c[e])) : Math.abs(c[e].bottom - u.bottom) <= m && (u.top = c[e].bottom - u.height, w(c[e])), h && (Math.abs(c[e].left - u.left) > m && Math.abs(c[e].left - u.left) <= g ? _(c[e], u, "left", "left", f, p) : Math.abs(c[e].vCenter - u.left) > m && Math.abs(c[e].vCenter - u.left) <= g ? _(c[e], u, "vCenter", "left", f, p) : Math.abs(c[e].right - u.left) > m && Math.abs(c[e].right - u.left) <= g ? _(c[e], u, "right", "left", f, p) : Math.abs(c[e].left - u.vCenter) > m && Math.abs(c[e].left - u.vCenter) <= g ? _(c[e], u, "left", "vCenter", f, p) : Math.abs(c[e].vCenter - u.vCenter) > m && Math.abs(c[e].vCenter - u.vCenter) <= g ? _(c[e], u, "vCenter", "vCenter", f, p) : Math.abs(c[e].right - u.vCenter) > m && Math.abs(c[e].right - u.vCenter) <= g ? _(c[e], u, "right", "vCenter", f, p) : Math.abs(c[e].left - u.right) > m && Math.abs(c[e].left - u.right) <= g ? _(c[e], u, "left", "right", f, p) : Math.abs(c[e].vCenter - u.right) > m && Math.abs(c[e].vCenter - u.right) <= g ? _(c[e], u, "vCenter", "right", f, p) : Math.abs(c[e].right - u.right) > m && Math.abs(c[e].right - u.right) <= g ? _(c[e], u, "right", "right", f, p) : Math.abs(c[e].top - u.top) > m && Math.abs(c[e].top - u.top) <= g ? x(c[e], u, "top", "top", d, p) : Math.abs(c[e].hCenter - u.top) > m && Math.abs(c[e].hCenter - u.top) <= g ? x(c[e], u, "hCenter", "top", d, p) : Math.abs(c[e].bottom - u.top) > m && Math.abs(c[e].bottom - u.top) <= g ? x(c[e], u, "bottom", "top", d, p) : Math.abs(c[e].top - u.hCenter) > m && Math.abs(c[e].top - u.hCenter) <= g ? x(c[e], u, "top", "hCenter", d, p) : Math.abs(c[e].hCenter - u.hCenter) > m && Math.abs(c[e].hCenter - u.hCenter) <= g ? x(c[e], u, "hCenter", "hCenter", d, p) : Math.abs(c[e].bottom - u.hCenter) > m && Math.abs(c[e].bottom - u.hCenter) <= g ? x(c[e], u, "bottom", "hCenter", d, p) : Math.abs(c[e].top - u.bottom) > m && Math.abs(c[e].top - u.bottom) <= g ? x(c[e], u, "top", "bottom", d, p) : Math.abs(c[e].hCenter - u.bottom) > m && Math.abs(c[e].hCenter - u.bottom) <= g ? x(c[e], u, "hCenter", "bottom", d, p) : Math.abs(c[e].bottom - u.bottom) > m && Math.abs(c[e].bottom - u.bottom) <= g ? x(c[e], u, "bottom", "bottom", d, p) : (y(c[e]), w(c[e])))
- }), i.data.left = window.hinnn.pt.toPx(u.left), i.data.top = window.hinnn.pt.toPx(u.top)), l = (e = t.parent.className.endsWith("design") ? t.parent : t.parent.offsetParent).clientWidth, e = e.clientHeight, n = t.target.clientWidth, r = t.target.clientHeight, s = o = 0, v.options.designTarget && v.options.designTarget.options.transform && (a = v.options.designTarget.options.getRectInfo(), o = window.hinnn.pt.toPx(a.diffW), s = window.hinnn.pt.toPx(a.diffH)), t.left < 0 - o ? t.left = 0 - o : t.left >= l - n + o && (t.left = l - n + o), t.top < 0 - s ? t.top = 0 - s : t.top >= e - r + s && (t.top = e - r + s), i.data = t), 0 != v.options.onDrag.call(i.data.target, i, M.fn.dragLengthCNum(i.data.left, v.options), M.fn.dragLengthCNum(i.data.top, v.options)) && A(i), i.data.target);
- return v.hidroppables.each(function () {
- var t, e = M(this);
- e.hidroppable("options").disabled || (t = e.offset(), i.pageX > t.left && i.pageX < t.left + e.outerWidth() && i.pageY > t.top && i.pageY < t.top + e.outerHeight() ? (this.entered || (M(this).trigger("_dragenter", [b]), this.entered = !0), M(this).trigger("_dragover", [b])) : this.entered && (M(this).trigger("_dragleave", [b]), this.entered = !1))
- }), !1
- }
-
- function p(r) {
- M.fn.hidraggable.isDragging = !1, y(), w();
- var t, e, i = M.data(r.data.target, "hidraggable"),
- n = i.proxy,
- a = i.options;
-
- function o() {
- n && n.remove(), i.proxy = null
- }
-
- function s() {
- var n = !1;
- return i.hidroppables.each(function () {
- var t, e, i = M(this);
- if (!i.hidroppable("options").disabled) return t = i.offset(), e = this.style.transform && parseFloat(this.style.transform.slice(6, -1)) || 1, r.pageX > t.left && r.pageX < t.left + i.outerWidth() * e && r.pageY > t.top && r.pageY < t.top + i.outerHeight() * e ? (a.revert && M(r.data.target).css({
- position: r.data.startPosition,
- left: r.data.startLeft,
- top: r.data.startTop
- }), M(this).trigger("_drop", [r.data.target]), o(), n = !0, this.entered = !1) : void 0
- }), n || a.revert || o(), n
- }
- return a.revert ? 1 == s() ? M(r.data.target).css({
- position: r.data.startPosition,
- left: r.data.startLeft,
- top: r.data.startTop
- }) : n ? (e = n.parent()[0] == document.body ? (t = r.data.startX - r.data.offsetWidth, r.data.startY - r.data.offsetHeight) : (t = r.data.startLeft, r.data.startTop), n.animate({
- left: t,
- top: e
- }, function () {
- o()
- })) : M(r.data.target).animate({
- left: r.data.startLeft,
- top: r.data.startTop
- }, function () {
- M(r.data.target).css("position", r.data.startPosition)
- }) : (M(r.data.target).css({
- position: "absolute",
- left: M.fn.dragLengthC(r.data.left, a),
- top: M.fn.dragLengthC(r.data.top, a)
- }), s()), a.onStopDrag.call(r.data.target, r), M(document).unbind(".hidraggable"), setTimeout(function () {
- M("body").css("cursor", "")
- }, 100), !1
- }
- var M;
- (M = jQuery).fn.hidraggable = function (i, t) {
- return "string" == typeof i ? M.fn.hidraggable.methods[i](this, t) : this.each(function () {
- var t = M.data(this, "hidraggable"),
- t = t ? (t.handle.unbind(".hidraggable"), M.extend(t.options, i)) : M.extend({}, M.fn.hidraggable.defaults, M.fn.hidraggable.parseOptions(this), i || {}),
- e = t.handle ? "string" == typeof t.handle ? M(t.handle, this) : t.handle : M(this);
-
- function s(t) {
- var e = M.data(t.data.target, "hidraggable"),
- i = e.handle,
- n = M(i).offset(),
- r = M(i)[0].style.transform && parseInt(M(i)[0].style.transform.slice(7, -1)),
- a = e.options.getScale(),
- o = M(i).outerWidth(),
- s = M(i).outerHeight(),
- c = (r && (r = r * Math.PI / 180, c = M(i).outerWidth(), i = M(i).outerHeight(), l = Math.sin(r), r = Math.cos(r), o = Math.abs(c * r) + Math.abs(i * l), s = Math.abs(c * l) + Math.abs(i * r)), a && (o *= a, s *= a), t.pageY - n.top),
- l = n.left + o - t.pageX,
- i = n.top + s - t.pageY,
- r = t.pageX - n.left;
- return Math.min(c, l, i, r) > e.options.edge
- }
- M.data(this, "hidraggable", {
- options: t,
- handle: e
- }), t.disabled ? M(this).css("cursor", "") : e.unbind(".hidraggable").bind("mousemove.hidraggable", {
- target: this
- }, function (t) {
- var e;
- M.fn.hidraggable.isDragging || (e = M.data(t.data.target, "hidraggable").options, s(t) ? M(this).css("cursor", e.cursor) : M(this).css("cursor", ""))
- }).bind("mouseleave.hidraggable", {
- target: this
- }, function (t) {
- M(this).css("cursor", "")
- }).bind("mousedown.hidraggable", {
- target: this
- }, function (t) {
- var e, i, n, r, a, o;
- 0 != s(t) && (M(this).css("cursor", ""), e = M(t.data.target).position(), r = M(t.data.target).offset(), !(e = {
- startPosition: M(t.data.target).css("position"),
- startLeft: e.left,
- startTop: e.top,
- left: e.left,
- top: e.top,
- startX: t.pageX,
- startY: t.pageY,
- offsetWidth: t.pageX - r.left,
- offsetHeight: t.pageY - r.top,
- target: t.data.target,
- parent: M(t.data.target).parent()[0]
- }) !== (r = M.data(t.data.target, "hidraggable")).options.draggable) && "r resizebtn" != t.target.className && ((r = r.options.getScale()) && (e.left /= r, e.top /= r, e.startLeft /= r, e.startTop /= r), (r = e.target.style.transform && parseInt(e.target.style.transform.slice(7, -1))) && (r = r * Math.PI / 180, o = M(t.data.target).outerWidth(), i = M(t.data.target).outerHeight(), n = Math.sin(r), r = Math.cos(r), a = (Math.abs(o * r) + Math.abs(i * n) - o) / 2, o = (Math.abs(o * n) + Math.abs(i * r) - i) / 2, e.left += a, e.top += o, e.startLeft += a, e.startTop += o), M.extend(t.data, e), 0 != M.data(t.data.target, "hidraggable").options.onBeforeDrag.call(t.data.target, t)) && (M(document).bind("mousedown.hidraggable", t.data, c), M(document).bind("mousemove.hidraggable", t.data, l), M(document).bind("mouseup.hidraggable", t.data, p))
- })
- })
- }, M.fn.hidraggable.methods = {
- options: function (t) {
- return M.data(t[0], "hidraggable").options
- },
- update: function (e, i) {
- i && "object" == Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_2__.a)(i) && M.data(e[0], "hidraggable") && Object.keys(i).forEach(function (t) {
- M.data(e[0], "hidraggable").options[t] = i[t]
- })
- },
- proxy: function (t) {
- return M.data(t[0], "hidraggable").proxy
- },
- enable: function (t) {
- return t.each(function () {
- M(this).hidraggable({
- disabled: !1
- })
- })
- },
- disable: function (t) {
- return t.each(function () {
- M(this).hidraggable({
- disabled: !0
- })
- })
- }
- }, M.fn.hidraggable.parseOptions = function (t) {
- var e = M(t);
- return M.extend({}, M.hiprintparser.parseOptions(t, ["cursor", "handle", "axis", {
- revert: "boolean",
- deltaX: "number",
- deltaY: "number",
- edge: "number"
- }]), {
- disabled: !!e.attr("disabled") || void 0
- })
- }, M.fn.hidraggable.defaults = {
- proxy: null,
- revert: !1,
- cursor: "move",
- deltaX: null,
- deltaY: null,
- handle: null,
- disabled: !1,
- edge: 0,
- axis: null,
- getScale: function (t) { },
- onBeforeDrag: function (t) { },
- onStartDrag: function (t) { },
- onDrag: function (t) { },
- onStopDrag: function (t) { }
- }, M.fn.hidraggable.isDragging = !1
- }, function (t, e) {
- var n;
- (n = jQuery).fn.hidroppable = function (e, t) {
- return "string" == typeof e ? n.fn.hidroppable.methods[e](this, t) : (e = e || {}, this.each(function () {
- var i, t = n.data(this, "hidroppable");
- t ? n.extend(t.options, e) : (n(i = this).addClass("hidroppable"), n(i).bind("_dragenter", function (t, e) {
- n.data(i, "hidroppable").options.onDragEnter.apply(i, [t, e])
- }), n(i).bind("_dragleave", function (t, e) {
- n.data(i, "hidroppable").options.onDragLeave.apply(i, [t, e])
- }), n(i).bind("_dragover", function (t, e) {
- n.data(i, "hidroppable").options.onDragOver.apply(i, [t, e])
- }), n(i).bind("_drop", function (t, e) {
- n.data(i, "hidroppable").options.onDrop.apply(i, [t, e])
- }), n.data(this, "hidroppable", {
- options: n.extend({}, n.fn.hidroppable.defaults, n.fn.hidroppable.parseOptions(this), e)
- }))
- }))
- }, n.fn.hidroppable.methods = {
- options: function (t) {
- return n.data(t[0], "hidroppable").options
- },
- enable: function (t) {
- return t.each(function () {
- n(this).hidroppable({
- disabled: !1
- })
- })
- },
- disable: function (t) {
- return t.each(function () {
- n(this).hidroppable({
- disabled: !0
- })
- })
- }
- }, n.fn.hidroppable.parseOptions = function (t) {
- var e = n(t);
- return n.extend({}, n.hiprintparser.parseOptions(t, ["accept"]), {
- disabled: !!e.attr("disabled") || void 0
- })
- }, n.fn.hidroppable.defaults = {
- accept: null,
- disabled: !1,
- onDragEnter: function (t, e) { },
- onDragOver: function (t, e) { },
- onDragLeave: function (t, e) { },
- onDrop: function (t, e) { }
- }
- }, function (t, e) {
- var p;
- (p = jQuery).hiprintparser = {
- parseOptions: function (t, e) {
- var i = p(t),
- n = {},
- r = p.trim(i.attr("data-options"));
- if (r && ("{" != r.substring(0, 1) && (r = "{" + r + "}"), n = new Function("return " + r)()), e) {
- for (var a = {}, o = 0; o < e.length; o++) {
- var s = e[o];
- if ("string" == typeof s) a[s] = "width" == s || "height" == s || "left" == s || "top" == s ? parseInt(t.style[s]) || void 0 : i.attr(s);
- else
- for (var c in s) {
- var l = s[c];
- "boolean" == l ? a[c] = i.attr(c) ? "true" == i.attr(c) : void 0 : "number" == l && (a[c] = "0" == i.attr(c) ? 0 : parseFloat(i.attr(c)) || void 0)
- }
- }
- p.extend(n, a)
- }
- return n
- }
- }, p.fn.dragLengthC = function (t, e) {
- return "pt" == e.moveUnit ? p.fn.dragLengthCNum(t, e) + "pt" : p.fn.dragLengthCNum(t, e)
- }, p.fn.dragLengthCNum = function (t, e) {
- var i, n = 3;
- return "pt" == e.moveUnit && (i = .75 * t, e.minMove) && (n = e.minMove), Math.round(i / n) * n
- }
- }, function (t, e) {
- var i, w = jQuery,
- m = {
- maxPanelIndex: 0
- };
- (i = function (t) {
- this.options = w.data(t.target, "hireizeable").options, this.init(t.target)
- }).prototype = {
- numHandlerText: function (t) {
- return this.numHandler(t) + "pt"
- },
- numHandler: function (t) {
- var e = 1.5;
- return this.options.minResize && (e = this.options.minResize), Math.round(.75 * t / e) * e
- },
- init: function (t) {
- this.initResizeBox(t)
- },
- initResizeBox: function (f) {
- var h = this;
- w(f).each(function () {
- function t() {
- var i = [],
- n = h.options.showPoints;
- return w.each([r, a, o, s, c, l, p, d], function (t, e) {
- -1 < w.inArray(e.name, n) && i.push(e.target)
- }), i
- }
- m.maxPanelIndex += 1, h.options.noContainer ? e = w(f) : (e = w("')).css({
- width: "100%",
- height: "100%",
- top: 0,
- left: 0,
- position: "absolute",
- "background-color": "rgba(0,0,0,0.5)",
- cursor: "move",
- display: "none"
- }), h.appendHandler(e, w(this));
- var e, r = {
- name: "n",
- target: w('')
- },
- a = {
- name: "s",
- target: w('')
- },
- o = {
- name: "w",
- target: w('')
- },
- s = {
- name: "e",
- target: w('')
- },
- c = {
- name: "ne",
- target: w('')
- },
- l = {
- name: "nw",
- target: w('')
- },
- p = {
- name: "se",
- target: w('')
- },
- d = {
- name: "sw",
- target: w('')
- },
- r = {
- name: "r",
- target: w('')
- },
- i = w(''),
- n = w('
✕
'),
- u = (h.refreshSizeBox(void 0, i, e), 0 != h.options.draggable && (e.append(n), e.on("mousedown", ".del-btn", function () {
- var t = new KeyboardEvent("keydown", {
- bubbles: !0,
- keyCode: 46
- });
- f.dispatchEvent(t)
- })), h.addHandlerCss(t()), h.appendHandler(t(), e), h.bindResizeEvent(e, w(this)), w(this));
- w(e).on("mousedown", ".resizebtn", function () {
- u.addClass("resizeing")
- }), w(".easyui-droppable").on("mouseup", function () {
- u.removeClass("resizeing")
- }), h.bindTrigger(w(this))
- }), h.bindHidePanel()
- },
- addHandlerCss: function (t) {
- for (var e = 0; e < t.length; e++) t[e].css({
- position: "absolute",
- width: "8px",
- height: "8px",
- background: "#ff6600",
- "border-radius": "50%"
- })
- },
- appendHandler: function (t, e) {
- e.find(".resize-panel").remove();
- for (var i = 0; i < t.length; i++) e.append(t[i])
- },
- refreshSizeBox: function (t, e, i) {
- if (this.options.showSizeBox) {
- var n, r;
- if (e && i.append(e), t && t.length) n = t[0].style, r = t.children("div[panelindex]").find(".size-box");
- else if (i && i.parent()) {
- if ((t = i.parent()).hasClass("hiprint-printPaper-content")) return;
- (n = t[0].style).width || (n.width = hinnn.px.toPt(t[0].offsetWidth) + "pt"), n.height || (n.height = hinnn.px.toPt(t[0].offsetHeight) + "pt"), r = t.children("div[panelindex]").find(".size-box")
- }
- r && (r.text(n.width + " x " + n.height), r.css("top", -(r.outerHeight() || 20)))
- }
- },
- triggerResize: function (t, e) {
- e.ctrlKey || e.metaKey || (t.siblings().children("div[panelindex]").removeClass("selected"), t.siblings().children("div[panelindex]").css({
- display: "none"
- })), t.children("div[panelindex]").addClass("selected"), t.children("div[panelindex]").css({
- display: "block"
- }), this.refreshSizeBox(t)
- },
- bindResizeEvent: function (a, t) {
- var o = this,
- s = 0,
- c = 0,
- l = a.width(),
- p = a.height(),
- d = a.offset().left,
- u = a.offset().top,
- f = o.options.noContainer ? w(t) : a.parent(),
- h = !1,
- m = (a.on("mousedown", ".e", function (t) {
- s = t.pageX, l = a.width(), h = !0
- }), !1),
- g = (a.on("mousedown", ".s", function (t) {
- c = t.pageY, p = a.height(), m = !0
- }), !1),
- v = (a.on("mousedown", ".w", function (t) {
- s = t.pageX, l = a.width(), g = !0, d = f.offset().left
- }), !1),
- b = (a.on("mousedown", ".n", function (t) {
- c = t.pageY, p = a.height(), v = !0, u = f.offset().top
- }), !1),
- I = (a.on("mousedown", ".ne", function (t) {
- s = t.pageX, c = t.pageY, l = a.width(), p = a.height(), b = !0, u = f.offset().top
- }), !1),
- A = (a.on("mousedown", ".nw", function (t) {
- s = t.pageX, c = t.pageY, l = a.width(), p = a.height(), u = f.offset().top, d = f.offset().left, I = !0
- }), !1),
- _ = (a.on("mousedown", ".se", function (t) {
- s = t.pageX, c = t.pageY, l = a.width(), p = a.height(), A = !0
- }), !1),
- y = (a.on("mousedown", ".sw", function (t) {
- s = t.pageX, c = t.pageY, l = a.width(), p = a.height(), _ = !0, d = f.offset().left
- }), !1),
- x = (a.on("mousedown", ".r", function (t) {
- s = t.pageX, c = t.pageY, l = a.width(), p = a.height(), y = !0, d = l / 2 + f.offset().left, u = p / 2 + f.offset().top
- }), a.on("dblclick", ".r", function (t) {
- f.css({
- transform: "rotate(0deg)"
- }), o.options.onResize(t, void 0, void 0, void 0, void 0, 0)
- }), !1);
- a.on("mousedown", function (t) {
- o.options.onBeforeResize(), s = t.pageX, c = t.pageY, u = f.offset().top, d = f.offset().left, x = !1
- }), w(o.options.stage).on("mousemove", function (t) {
- var e, i, n, r;
- h ? (n = (t.pageX - s) / o.options.getScale(), a.css({
- width: "100%"
- }), f.css({
- width: o.numHandlerText(l + n)
- }), o.options.onResize(t, void 0, o.numHandler(l + n), void 0, void 0)) : m ? (r = (t.pageY - c) / o.options.getScale(), a.css({
- height: "100%"
- }), f.css({
- height: o.numHandlerText(p + r)
- }), o.options.onResize(t, o.numHandler(p + r), void 0, void 0, void 0)) : y ? (a.css({
- height: "100%"
- }), i = t.pageX, t.pageY, i = 360 * (i - s) / 100, s = t.pageX, i = (f[0].style.transform && parseInt(f[0].style.transform.slice(7, -1)) || 0) + i, 360 < Math.abs(i) && (i %= 360), f.css({
- transform: "rotate(" + i + "deg)"
- }), o.options.onResize(t, void 0, void 0, void 0, void 0, i)) : g ? (n = (t.pageX - s) / o.options.getScale(), a.css({
- width: "100%"
- }), f.css({
- width: o.numHandlerText(l - n),
- left: o.numHandlerText(o.options.noDrag ? void 0 : o.numHandler(d + n))
- }), o.options.onResize(t, void 0, o.numHandler(l - n), void 0, o.options.noDrag ? void 0 : o.numHandler(d + n))) : v ? (r = (t.pageY - c) / o.options.getScale(), a.css({
- height: "100%"
- }), f.css({
- height: o.numHandlerText(p - r),
- top: o.numHandlerText(o.options.noDrag ? void 0 : u + r)
- }), o.options.onResize(t, o.numHandler(p - r), void 0, o.options.noDrag ? void 0 : o.numHandler(u + r), void 0)) : b ? (n = (t.pageX - s) / o.options.getScale(), r = (t.pageY - c) / o.options.getScale(), a.css({
- height: "100%",
- width: "100%"
- }), f.css({
- height: o.numHandlerText(p - r),
- top: o.numHandlerText(o.options.noDrag ? void 0 : u + r),
- width: o.numHandlerText(l + n)
- }), o.options.onResize(t, o.numHandler(p - r), o.numHandler(l + n), o.options.noDrag ? void 0 : o.numHandler(u + r), void 0)) : I ? (n = (t.pageX - s) / o.options.getScale(), r = (t.pageY - c) / o.options.getScale(), a.css({
- height: "100%",
- width: "100%"
- }), f.css({
- height: o.numHandlerText(p - r),
- top: o.numHandlerText(o.options.noDrag ? void 0 : u + r),
- width: o.numHandlerText(l - n),
- left: o.numHandlerText(o.options.noDrag ? void 0 : d + n)
- }), o.options.onResize(t, o.numHandler(p - r), o.numHandler(l - n), o.options.noDrag ? void 0 : o.numHandler(u + r), o.options.noDrag ? void 0 : o.numHandler(d + n))) : A ? (n = (t.pageX - s) / o.options.getScale(), r = (t.pageY - c) / o.options.getScale(), a.css({
- width: "100%",
- height: "100%"
- }), t.shiftKey ? (f.css({
- width: o.numHandlerText(l + n),
- height: o.numHandlerText(p + r)
- }), o.options.onResize(t, o.numHandler(p + r), o.numHandler(l + n), void 0, void 0)) : (i = p + r, i = (e = l + n) * (p / l), f.css({
- width: o.numHandlerText(e),
- height: o.numHandlerText(i)
- }), o.options.onResize(t, o.numHandler(i), o.numHandler(e), void 0, void 0))) : _ ? (n = (t.pageX - s) / o.options.getScale(), r = (t.pageY - c) / o.options.getScale(), a.css({
- width: "100%",
- height: "100%"
- }), f.css({
- width: o.numHandlerText(l - n),
- left: o.numHandlerText(o.options.noDrag ? void 0 : d + n),
- height: o.numHandlerText(p + r)
- }), o.options.onResize(t, o.numHandler(p + r), o.numHandler(l - n), o.numHandler(otundefinedop), o.options.noDrag ? void 0 : o.numHandler(d + n))) : x && (n = (t.pageX - s) / o.options.getScale(), r = (t.pageY - c) / o.options.getScale(), f.css({
- left: o.numHandlerText(o.options.noDrag ? void 0 : d + n),
- top: o.numHandlerText(o.options.noDrag ? void 0 : u + r)
- }), o.options.onResize(t, void 0, void 0, o.options.noDrag ? void 0 : o.numHandler(u + r), o.options.noDrag ? void 0 : o.numHandler(d + n)))
- }).on("mouseup", function (t) {
- (h || m || g || v || b || I || _ || A || x || y) && o.options.onStopResize(y), y = x = A = _ = I = b = v = g = m = h = !1
- })
- },
- bindTrigger: function (e) {
- var i = this;
- e.on("click", function (t) {
- t.stopPropagation(), i.triggerResize(e, t), w(".mouseRect").remove()
- })
- },
- bindHidePanel: function (t) {
- var e;
- m.maxPanelIndex < 2 && (e = this.options.stage, w(e).bind("click", function (t) {
- t.target.className && "string" == _typeof(t.target.className) && t.target.className.includes("design") && (t.stopPropagation(), w("div[panelindex]").css({
- display: "none"
- }), w("div[panelindex]").removeClass("selected"))
- }))
- }
- }, w.fn.extend({
- hireizeable: function (e) {
- return this.each(function () {
- var t = w.data(this, "hireizeable"),
- t = t ? w.extend({}, t.options, e || {}) : w.extend({}, w.fn.hireizeable.defaults, e || {});
- w.data(this, "hireizeable", {
- options: t
- }), new i({
- target: this,
- onResize: function (t, e, i, n, r) { },
- onStopResize: function (t, e, i, n, r) { }
- })
- })
- }
- }), w.fn.hireizeable.defaults = {
- stage: document,
- reizeUnit: "pt",
- minResize: 1.5,
- showSizeBox: !0,
- showPoints: ["s", "e"],
- noContainer: !1,
- onBeforeResize: function (t, e, i, n, r) { },
- onResize: function (t, e, i, n, r) { },
- onStopResize: function (t, e, i, n, r) { },
- noDrag: !1
- }
- }, function (t, e) {
- var r = "connected",
- i = "reconnecting";
- window.hiwebSocket = {
- opened: !1,
- name: "webSockets",
- host: "http://localhost:17521",
- token: null,
- reconnectTimeout: 6e4,
- reconnectWindowSetTimeout: null,
- reconnectDelay: 2e3,
- supportsKeepAlive: function () {
- return !0
- },
- hasIo: function (t) {
- return window.io
- },
- send: function (t) {
- try {
- this.socket.emit("news", t)
- } catch (t) { }
- },
- getPrinterList: function () {
- return this.printerList
- },
- refreshPrinterList: function () {
- try {
- this.socket.emit("refreshPrinterList")
- } catch (t) { }
- },
- getClients: function () {
- try {
- this.socket.emit("getClients")
- } catch (t) { }
- },
- getAddress: function (t) {
- try {
- for (var e, i = arguments.length, n = new Array(1 < i ? i - 1 : 0), r = 1; r < i; r++) n[r - 1] = arguments[r];
- (e = this.socket).emit.apply(e, ["address", t].concat(n))
- } catch (t) { }
- },
- ippPrint: function (t) {
- try {
- this.socket.emit("ippPrint", t)
- } catch (t) { }
- },
- ippRequest: function (t) {
- try {
- this.socket.emit("ippRequest", t)
- } catch (t) { }
- },
- setHost: function (t, e, i) {
- "function" == typeof e && (i = e, e = void 0), this.host = t, this.token = e, this.stop(), this.start(i)
- },
- start: function (e) {
- var i = this,
- n = this;
- window.WebSocket && !this.socket && (this.socket = window.io(this.host, {
- transports: ["websocket"],
- reconnectionAttempts: 5,
- auth: {
- token: this.token
- }
- }), this.socket.on("connect", function (t) {
- n.opened = !0, i.socket.on("successs", function (t) {
- hinnn.event.trigger("printSuccess_" + t.templateId, t)
- }), i.socket.on("error", function (t) {
- hinnn.event.trigger("printError_" + t.templateId, t)
- }), i.socket.on("clients", function (t) {
- n.clients = t, hinnn.event.trigger("clients", t)
- }), i.socket.on("clientInfo", function (t) {
- n.clientInfo = t, hinnn.event.trigger("clientInfo", t)
- }), i.socket.on("printerList", function (t) {
- n.printerList = t, hinnn.event.trigger("printerList", t)
- }), i.socket.on("address", function (t, e, i) {
- hinnn.event.trigger("address_" + t, {
- addr: e,
- e: i
- })
- }), i.socket.on("ippPrinterConnected", function (t) {
- hinnn.event.trigger("ippPrinterConnected", t)
- }), i.socket.on("ippPrinterCallback", function (t, e) {
- hinnn.event.trigger("ippPrinterCallback", {
- err: t,
- res: e
- })
- }), i.socket.on("ippRequestCallback", function (t, e) {
- hinnn.event.trigger("ippRequestCallback", {
- err: t,
- res: e
- })
- }), n.state = r, e && e(!0, t)
- }), this.socket.on("connect_error", function (t) {
- hinnn.event.trigger("connect_error", t)
- }), this.socket.on("disconnect", function () {
- n.opened = !1, e && e(!1)
- })), e && e(!1)
- },
- reconnect: function () {
- this.state !== r && this.state !== i || (this.stop(), this.ensureReconnectingState() && this.start())
- },
- stop: function () {
- this.socket && (this.socket.close(), this.socket = null, this.printerList = [])
- },
- ensureReconnectingState: function () {
- return this.state = i, this.state === i
- }
- }
- }, function (t, e, i) {
- var n = i(28);
- "string" == typeof n && (n = [
- [t.i, n, ""]
- ]);
- i(30)(n, {
- hmr: !0,
- transform: void 0,
- insertInto: void 0
- }), n.locals && (t.exports = n.locals)
- }, function (t, e, i) {
- (t.exports = i(29)(!1)).push([t.i, ".hicontextmenu {\r\n\tposition: absolute;\r\n\tdisplay: inline-block;\r\n\twidth: 215px;\r\n\tpadding: 0 0;\r\n\tmargin: 0;\r\n\tfont-family: inherit;\r\n\tfont-size: inherit;\r\n\tlist-style-type: none;\r\n\tlist-style: none;\r\n\tbackground: #fff;\r\n\tborder: 1px solid #bebebe;\r\n\tborder-radius: 2px;\r\n\tfont-size: 13px;\r\n}\r\n\r\n.hicontextmenuroot .hicontextmenuitem {\r\n\tposition: relative;\r\n\t-webkit-box-sizing: content-box;\r\n\t-moz-box-sizing: content-box;\r\n\tbox-sizing: content-box;\r\n\tpadding: .2em 12px;\r\n\tcolor: #2f2f2f;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\ttext-decoration: none;\r\n\r\n\tuser-select: none;\r\n\tbackground-color: #fff;\r\n\r\n}\r\n\r\n.hicontextmenuroot>.hicontextmenuitem:hover,\r\n.hicontextmenuroot .hicontextmenuitem > a:hover {\r\n\tbackground-color: #f3f3f3;\r\n}\r\n\r\n.hicontextmenuroot .hicontextmenuitem>a {\r\n\ttext-decoration: none;\r\n\tcolor: #363636;\r\n\tline-height: 22px;\r\n\r\n}\r\n\r\n.hicontextmenuroot .hicontextsubmenu>ul {\r\n\tdisplay: none;\r\n\tposition: absolute;\r\n\r\n}\r\n\r\n.hicontextmenuroot .hicontextsubmenu:hover>ul {\r\n\tdisplay: block;\r\n\tleft: 100%;\r\n\ttop: -1px;\r\n\tmargin-left: 0px;\r\n}\r\n\r\n.hicontextmenuroot .borderBottom {\r\n\tborder-bottom: 1px solid #efe6e6;\r\n}\r\n\r\n.hicontextmenuroot .disable> a {\r\n \r\n color: #ccc;\r\n \r\n}\r\n.hicontextmenuroot>.disable:hover,\r\n.hicontextmenuroot .disable> a:hover {\r\n\tbackground-color:#fff;\r\n}", ""])
- }, function (t, e, i) {
- t.exports = function (a) {
- var o = [];
- return o.toString = function () {
- return this.map(function (t) {
- i = t[1] || "";
- var e, i, n, r = (n = t[3]) ? (a && "function" == typeof btoa ? (e = "/*# sourceMappingURL=data:application/json;charset=utf-8;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(n)))) + " */", r = n.sources.map(function (t) {
- return "/*# sourceURL=" + n.sourceRoot + t + " */"
- }), [i].concat(r).concat([e])) : [i]).join("\n") : i;
- return t[2] ? "@media " + t[2] + "{" + r + "}" : r
- }).join("")
- }, o.i = function (t, e) {
- "string" == typeof t && (t = [
- [null, t, ""]
- ]);
- for (var i = {}, n = 0; n < this.length; n++) {
- var r = this[n][0];
- null != r && (i[r] = !0)
- }
- for (n = 0; n < t.length; n++) {
- var a = t[n];
- null != a[0] && i[a[0]] || (e && !a[2] ? a[2] = e : e && (a[2] = "(" + a[2] + ") and (" + e + ")"), o.push(a))
- }
- }, o
- }
- }, function (t, e, n) {
- var i, r, a, c = {},
- o = (i = function () {
- return window && document && document.all && !window.atob
- }, a = {}, function (t, e) {
- if ("function" == typeof t) return t();
- if (void 0 === a[t]) {
- e = function (t, e) {
- return (e || document).querySelector(t)
- }.call(this, t, e);
- if (window.HTMLIFrameElement && _instanceof(e, window.HTMLIFrameElement)) try {
- e = e.contentDocument.head
- } catch (t) {
- e = null
- }
- a[t] = e
- }
- return a[t]
- }),
- s = null,
- l = 0,
- p = [],
- d = n(31);
-
- function u(t, e) {
- for (var i = 0; i < t.length; i++) {
- var n = t[i],
- r = c[n.id];
- if (r) {
- r.refs++;
- for (var a = 0; a < r.parts.length; a++) r.parts[a](n.parts[a]);
- for (; a < n.parts.length; a++) r.parts.push(b(n.parts[a], e))
- } else {
- for (var o = [], a = 0; a < n.parts.length; a++) o.push(b(n.parts[a], e));
- c[n.id] = {
- id: n.id,
- refs: 1,
- parts: o
- }
- }
- }
- }
-
- function f(t, e) {
- for (var i = [], n = {}, r = 0; r < t.length; r++) {
- var a = t[r],
- o = e.base ? a[0] + e.base : a[0],
- a = {
- css: a[1],
- media: a[2],
- sourceMap: a[3]
- };
- n[o] ? n[o].parts.push(a) : i.push(n[o] = {
- id: o,
- parts: [a]
- })
- }
- return i
- }
-
- function h(t, e) {
- var i = o(t.insertInto);
- if (!i) throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
- var n = p[p.length - 1];
- if ("top" === t.insertAt) n ? n.nextSibling ? i.insertBefore(e, n.nextSibling) : i.appendChild(e) : i.insertBefore(e, i.firstChild), p.push(e);
- else if ("bottom" === t.insertAt) i.appendChild(e);
- else {
- if ("object" != _typeof(t.insertAt) || !t.insertAt.before) throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
- n = o(t.insertAt.before, i);
- i.insertBefore(e, n)
- }
- }
-
- function m(t) {
- null !== t.parentNode && (t.parentNode.removeChild(t), 0 <= (t = p.indexOf(t))) && p.splice(t, 1)
- }
-
- function g(t) {
- var e, i = document.createElement("style");
- return void 0 === t.attrs.type && (t.attrs.type = "text/css"), void 0 === t.attrs.nonce && (e = n.nc) && (t.attrs.nonce = e), v(i, t.attrs), h(t, i), i
- }
-
- function v(e, i) {
- Object.keys(i).forEach(function (t) {
- e.setAttribute(t, i[t])
- })
- }
-
- function b(e, t) {
- var i, n, r, a, o;
- if (t.transform && e.css) {
- if (!(a = "function" == typeof t.transform ? t.transform(e.css) : t.transform.default(e.css))) return function () { };
- e.css = a
- }
- return r = t.singleton ? (a = l++, i = s = s || g(t), n = _.bind(null, i, a, !1), _.bind(null, i, a, !0)) : e.sourceMap && "function" == typeof URL && "function" == typeof URL.createObjectURL && "function" == typeof URL.revokeObjectURL && "function" == typeof Blob && "function" == typeof btoa ? (a = t, o = document.createElement("link"), void 0 === a.attrs.type && (a.attrs.type = "text/css"), a.attrs.rel = "stylesheet", v(o, a.attrs), h(a, o), i = o, n = function (t, e, i) {
- var n = i.css,
- i = i.sourceMap,
- r = void 0 === e.convertToAbsoluteUrls && i,
- e = ((e.convertToAbsoluteUrls || r) && (n = d(n)), i && (n += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(i)))) + " */"), new Blob([n], {
- type: "text/css"
- })),
- r = t.href;
- t.href = URL.createObjectURL(e), r && URL.revokeObjectURL(r)
- }.bind(null, i, t), function () {
- m(i), i.href && URL.revokeObjectURL(i.href)
- }) : (i = g(t), n = function (t, e) {
- var i = e.css,
- e = e.media;
- if (e && t.setAttribute("media", e), t.styleSheet) t.styleSheet.cssText = i;
- else {
- for (; t.firstChild;) t.removeChild(t.firstChild);
- t.appendChild(document.createTextNode(i))
- }
- }.bind(null, i), function () {
- m(i)
- }), n(e),
- function (t) {
- t ? t.css === e.css && t.media === e.media && t.sourceMap === e.sourceMap || n(e = t) : r()
- }
- }
- t.exports = function (t, o) {
- if ("undefined" != typeof DEBUG && DEBUG && "object" != ("undefined" == typeof document ? "undefined" : _typeof(document))) throw new Error("The style-loader cannot be used in a non-browser environment");
- (o = o || {}).attrs = "object" == _typeof(o.attrs) ? o.attrs : {}, o.singleton || "boolean" == typeof o.singleton || (o.singleton = function () {
- return r = void 0 === r ? i.apply(this, arguments) : r
- }()), o.insertInto || (o.insertInto = "head"), o.insertAt || (o.insertAt = "bottom");
- var s = f(t, o);
- return u(s, o),
- function (t) {
- for (var e, i = [], n = 0; n < s.length; n++) {
- var r = s[n];
- (e = c[r.id]).refs--, i.push(e)
- }
- for (t && u(f(t, o), o), n = 0; n < i.length; n++)
- if (0 === (e = i[n]).refs) {
- for (var a = 0; a < e.parts.length; a++) e.parts[a]();
- delete c[e.id]
- }
- }
- };
- I = [];
- var I, A = function (t, e) {
- return I[t] = e, I.filter(Boolean).join("\n")
- };
-
- function _(t, e, i, n) {
- var i = i ? "" : n.css;
- t.styleSheet ? t.styleSheet.cssText = A(e, i) : (n = document.createTextNode(i), (i = t.childNodes)[e] && t.removeChild(i[e]), i.length ? t.insertBefore(n, i[e]) : t.appendChild(n))
- }
- }, function (t, e) {
- t.exports = function (t) {
- var i, n, e = "undefined" != typeof window && window.location;
- if (e) return t && "string" == typeof t ? (i = e.protocol + "//" + e.host, n = i + e.pathname.replace(/\/[^\/]*$/, "/"), t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function (t, e) {
- e = e.trim().replace(/^"(.*)"$/, function (t, e) {
- return e
- }).replace(/^'(.*)'$/, function (t, e) {
- return e
- });
- return /^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(e) ? t : (t = 0 === e.indexOf("//") ? e : 0 === e.indexOf("/") ? i + e : n + e.replace(/^\.\//, ""), "url(" + JSON.stringify(t) + ")")
- })) : t;
- throw new Error("fixUrls requires window.location")
- }
- }, function (t, e) {
- var i, n;
- window, document, i = jQuery, (n = function (t, e) {
- this.init(t, e)
- }).prototype = {
- init: function (t, e) {
- this.ele = t, this.defaults = {
- menu: [{
- text: "text",
- menus: [{}, {}],
- callback: function () { }
- }],
- target: function (t) { },
- width: 100,
- itemHeight: 28,
- bgColor: "#fff",
- color: "#333",
- fontSize: 14,
- hoverBgColor: "#f5f5f5"
- }, this.opts = i.extend(!0, {}, this.defaults, e), this.random = (new Date).getTime() + parseInt(1e3 * Math.random()), this.eventBind()
- },
- renderMenu: function (t, e) {
- var r, a = this,
- i = e;
- t && t.length && (r = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'), i || (i = r).addClass("hicontextmenuroot"), jquery__WEBPACK_IMPORTED_MODULE_60___default.a.each(t, function (t, e) {
- var i = !!e.disable && e.disable(),
- n = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
")))
- }
- }, t.prototype.createTarget = function (t, e) {
- var i = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
');
- return this.initQrcode(i, t, e), i
- }, t.prototype.getHtml = function (t, e, i) {
- return this.getHtml2(t, e, i)
- }, t
- }(f.a),
- W = function () {
- function t() { }
- return t.createPrintElement = function (t, e) {
- return "text" == t.type ? new D(t, e) : "image" == t.type ? new v(t, e) : "longText" == t.type ? new w(t, e) : "table" == t.type ? new d.a(t, e) : "html" == t.type ? new S(t, e) : "vline" == t.type ? new F(t, e) : "hline" == t.type ? new A(t, e) : "rect" == t.type ? new k(t, e) : "oval" == t.type ? new V(t, e) : "barcode" == t.type ? new barcode(t, e) : "qrcode" == t.type ? new qrcode(t, e) : void 0
- }, t
- }(),
- j = function () {
- function t(t) {
- this.field = t.field, this.fields = t.fields, this.title = t.title, this.text = t.text, this.tid = t.tid, this.data = t.data, this.styler = t.styler, this.formatter = t.formatter, this.type = t.type, this.onRendered = t.onRendered, this.options = t.options
- }
- return t.prototype.getText = function (t) {
- return t ? this.title || this.text || "" : this.text || this.title || ""
- }, t.prototype.getData = function () {
- return this.data
- }, t.prototype.createPrintElement = function (t) {
- var e = {};
- return jquery__WEBPACK_IMPORTED_MODULE_60___default.a.extend(e, t || {}), W.createPrintElement(this, e)
- }, t.prototype.getPrintElementTypeEntity = function () {
- return new c({
- title: this.title,
- type: this.type
- })
- }, t.prototype.getFields = function () {
- return this.fields
- }, t.prototype.getOptions = function () {
- return this.options || {}
- }, t
- }(),
- U = n(16),
- K = n(12),
- G = function () {
- var n = function (t, e) {
- return (n = Object.setPrototypeOf || (_instanceof({
- __proto__: []
- }, Array) ? function (t, e) {
- t.__proto__ = e
- } : function (t, e) {
- for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
- }))(t, e)
- };
- return function (t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i)
- }
- }(),
- q = function (i) {
- function t(t) {
- var e = i.call(this, t) || this;
- return (t = t || {}).columns ? (e.columns = [], t.columns.forEach(function (t) {
- e.columns.push(new K.a(t))
- })) : e.columns = [new K.a({
- columns: [new u.a({
- width: 100
- }), new u.a({
- width: 100
- })]
- })], e.lHeight = t.lHeight, e.autoCompletion = t.autoCompletion, e.tableFooterRepeat = t.tableFooterRepeat, e
- }
- return G(t, i), t.prototype.getPrintElementOptionEntity = function () {
- var e = i.prototype.getPrintElementOptionEntity.call(this);
- return e.fields = this.fields, e.columns = [], this.columns.forEach(function (t) {
- e.columns.push(t.getPrintElementOptionEntity())
- }), e
- }, t
- }(g.a),
- Q = function () {
- var n = function (t, e) {
- return (n = Object.setPrototypeOf || (_instanceof({
- __proto__: []
- }, Array) ? function (t, e) {
- t.__proto__ = e
- } : function (t, e) {
- for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
- }))(t, e)
- };
- return function (t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i)
- }
- }(),
- tt = function () {
- var n = function (t, e) {
- return (n = Object.setPrototypeOf || (_instanceof({
- __proto__: []
- }, Array) ? function (t, e) {
- t.__proto__ = e
- } : function (t, e) {
- for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
- }))(t, e)
- };
- return function (t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i)
- }
- }(),
- et = function (e) {
- function t(t) {
- return e.call(this, t) || this
- }
- return tt(t, e), t.prototype.createPrintElement = function (t) {
- var e = {};
- return jquery__WEBPACK_IMPORTED_MODULE_60___default.a.extend(e, t || {}), W.createPrintElement(this, e)
- }, t.prototype.getPrintElementTypeEntity = function () {
- return new c({
- title: this.title,
- type: this.type
- })
- }, t
- }(j),
- nt = function () {
- function t() { }
- return t.createPrintElementType = function (t) {
- return t.type = t.type || "text", new ("text" == t.type ? et : "table" == t.type ? h : j)(t)
- }, t
- }(),
- it = function () {
- function i() { }
- return i.getElementTypeGroups = function (t) {
- t = i.formatterModule(t);
- return a.instance[t] || []
- }, i.getElementType = function (t, e) {
- if (t) return a.instance.getElementType(t);
- nt.createPrintElementType({
- type: e
- })
- }, i.build = function (t, e) {
- e = i.formatterModule(e), t = (new l).createPrintElementTypeHtml(t, this.getElementTypeGroups(e));
- this.enableDrag(t)
- }, i.buildByHtml = function (t) {
- this.enableDrag(t)
- }, i.enableDrag = function (t) {
- t.hidraggable({
- revert: !0,
- proxy: function (t) {
- var e = s.a.instance.getDragingPrintElement(),
- e = e.printElement.getProxyTarget(e.printElement.printElementType.getOptions());
- return e.appendTo("body"), e.css("z-index", "9999"), e
- },
- moveUnit: "pt",
- minMove: 4,
- onBeforeDrag: function (t) {
- s.a.instance.draging = !0;
- var e = jquery__WEBPACK_IMPORTED_MODULE_60___default()(t.data.target).attr("tid"),
- t = i.getElementType(e, jquery__WEBPACK_IMPORTED_MODULE_60___default()(t.data.target).attr("ptype"));
- if (!t) throw new Error("".concat(i18n.__("请检查 hiprint.init 的 provider 是否配置了"), " [").concat(e, "]"));
- e = t.createPrintElement();
- if (e || "tableCustom" != t.type) return s.a.instance.setDragingPrintElement(e), !0;
- throw new Error("".concat(i18n.__("已移除'tableCustom',请替换使用'table'详情见更新记录")))
- },
- onDrag: function (t, e, i) {
- s.a.instance.getDragingPrintElement().updatePosition(e, i)
- },
- onStopDrag: function (t) {
- s.a.instance.draging = !1
- }
- })
- }, i.formatterModule = function (t) {
- return t || "_default"
- }, i
- }(),
- ot = function (t, e) {
- var i = this;
- this.name = t, this.printElementTypes = [], e.forEach(function (t) {
- i.printElementTypes.push(nt.createPrintElementType(t))
- })
- },
- rt = function (t) {
- var e;
- this.index = t.index, this.name = t.name, this.paperType = t.paperType, !this.paperType || (e = s.a.instance[this.paperType], t.height) ? (this.height = t.height, this.width = t.width) : (this.height = e.height, this.width = e.width), this.paperHeader = t.paperHeader || 0, this.paperFooter = t.paperFooter || o.a.mm.toPt(this.height), this.printElements = t.printElements || [], this.paperNumberLeft = t.paperNumberLeft, this.paperNumberTop = t.paperNumberTop, this.paperNumberDisabled = t.paperNumberDisabled, this.paperNumberContinue = t.paperNumberContinue, this.paperNumberFormat = t.paperNumberFormat, this.panelPaperRule = t.panelPaperRule, this.panelPageRule = t.panelPageRule, this.rotate = t.rotate || void 0, this.firstPaperFooter = t.firstPaperFooter, this.evenPaperFooter = t.evenPaperFooter, this.oddPaperFooter = t.oddPaperFooter, this.lastPaperFooter = t.lastPaperFooter, this.topOffset = t.topOffset, this.fontFamily = t.fontFamily, this.leftOffset = t.leftOffset, this.orient = t.orient, this.scale = t.scale, this.watermarkOptions = t.watermarkOptions
- },
- at = function () {
- function t(t, e, i, n) {
- this.bx = t, this.by = e, this.ex = t, this.ey = e, this.startX = this.minX = t, this.startY = this.minY = e, this.maxX = t, this.maxY = e, this.lastLeft = i, this.lastTop = n
- }
- return t.prototype.updateRect = function (t, e) {
- this.ex = t, this.ey = e, this.minX = this.startX < t ? this.startX : t, this.minY = this.startY < e ? this.startY : e, this.maxX = this.startX < t ? t : this.startX, this.maxY = this.startY < e ? e : this.startY
- }, t.prototype.updatePositionByMultipleSelect = function (t, e) {
- null != t && (this.lastLeft = this.lastLeft + t), null != e && (this.lastTop = this.lastTop + e), this.target.css({
- left: this.lastLeft + "pt",
- top: this.lastTop + "pt"
- })
- }, t
- }(),
- pt = function () {
- function t(t, e) {
- this.templateId = e, this.index = t.index, this.name = t.name, this.width = t.width, this.height = t.height, this.paperType = t.paperType, this.paperHeader = t.paperHeader, this.paperFooter = t.paperFooter, this.initPrintElements(t.printElements), this.paperNumberLeft = t.paperNumberLeft, this.paperNumberTop = t.paperNumberTop, this.paperNumberDisabled = t.paperNumberDisabled, this.paperNumberContinue = null == t.paperNumberContinue || t.paperNumberContinue, this.paperNumberFormat = t.paperNumberFormat, this.panelPaperRule = t.panelPaperRule, this.panelPageRule = t.panelPageRule, this.firstPaperFooter = t.firstPaperFooter, this.evenPaperFooter = t.evenPaperFooter, this.oddPaperFooter = t.oddPaperFooter, this.lastPaperFooter = t.lastPaperFooter, this.topOffset = t.topOffset, this.leftOffset = t.leftOffset, this.fontFamily = t.fontFamily, this.orient = t.orient, this.target = this.createTarget(), this.rotate = t.rotate, this.scale = t.scale, this.watermarkOptions = t.watermarkOptions || {}
- }
- return t.prototype.design = function (e) {
- var i = this;
- this.orderPrintElements(), this.designPaper = this.createNewPage(0), this.target.html(""), this.target.append(this.designPaper.getTarget()), this.droppablePaper(this.designPaper), this.designPaper.design(e), this.designPaper.subscribePaperBaseInfoChanged(function (t) {
- i.paperHeader = t.paperHeader, i.paperFooter = t.paperFooter, i.paperNumberLeft = t.paperNumberLeft, i.paperNumberTop = t.paperNumberTop, i.paperNumberDisabled = t.paperNumberDisabled, i.paperNumberFormat = t.paperNumberFormat
- }), this.printElements.forEach(function (t) {
- i.appendDesignPrintElement(i.designPaper, t), t.design(e, i.designPaper)
- }), this.target.bind("click.hiprint", function (t) {
- var e = {
- panelPaperRule: i.panelPaperRule,
- panelPageRule: i.panelPageRule,
- firstPaperFooter: i.firstPaperFooter,
- evenPaperFooter: i.evenPaperFooter,
- oddPaperFooter: i.oddPaperFooter,
- lastPaperFooter: i.lastPaperFooter,
- leftOffset: i.leftOffset,
- topOffset: i.topOffset,
- fontFamily: i.fontFamily,
- orient: i.orient,
- paperNumberDisabled: i.paperNumberDisabled,
- paperNumberContinue: i.paperNumberContinue,
- paperNumberFormat: i.paperNumberFormat,
- watermarkOptions: i.watermarkOptions || {}
- };
- p.a.instance.paperNumberContinue || delete e.paperNumberContinue, o.a.event.trigger("BuildCustomOptionSettingEventKey_" + i.templateId, {
- options: e,
- callback: function (t) {
- i.watermarkOptions = t.watermarkOptions || void 0, t.watermarkOptions && i.designPaper.createWaterMark(!0, 1, t.watermarkOptions), i.panelPaperRule = t.panelPaperRule, i.panelPageRule = t.panelPageRule, i.firstPaperFooter = t.firstPaperFooter, i.evenPaperFooter = t.evenPaperFooter, i.oddPaperFooter = t.oddPaperFooter, i.lastPaperFooter = t.lastPaperFooter, i.leftOffset = t.leftOffset, i.topOffset = t.topOffset, i.fontFamily = t.fontFamily, i.orient = t.orient, i.paperNumberDisabled = i.designPaper.paperNumberDisabled = !!t.paperNumberDisabled || void 0, i.paperNumberContinue = i.designPaper.paperNumberContinue = t.paperNumberContinue, i.paperNumberFormat = t.paperNumberFormat, i.designPaper.paperNumberFormat = t.paperNumberFormat, t.paperNumberFormat && (i.designPaper.paperNumberTarget = i.designPaper.createPaperNumber(i.designPaper.formatPaperNumber(1, 1), !0)), i.designPaper.setOffset(i.leftOffset, i.topOffset), i.css(i.target), i.designPaper.resetPaperNumber(i.designPaper.paperNumberTarget), i.designPaper.triggerOnPaperBaseInfoChanged()
- }
- })
- }), this.bindShortcutKeyEvent(), this.bingPasteEvent(), this.bindBatchMoveElement()
- }, t.prototype.update = function (e) {
- try {
- Date.now();
- var i = this;
- this.index = e.index, this.name = e.name, this.width = e.width, this.height = e.height, this.paperType = e.paperType, this.paperHeader = e.paperHeader, this.paperFooter = e.paperFooter, this.designPaper.width = o.a.mm.toPt(e.width), this.designPaper.height = o.a.mm.toPt(this.height), this.designPaper.paperType = this.paperType, this.designPaper.paperHeader = this.paperHeader, this.designPaper.paperFooter = this.paperFooter, this.designPaper.mmheight = e.height, this.designPaper.mmwidth = e.width, this.designPaper.headerLinetarget.css("top", (this.paperHeader || -1) + "pt"), 0 == this.paperHeader && this.designPaper.headerLinetarget.addClass("hideheaderLinetarget"), this.designPaper.footerLinetarget.css("top", parseInt(this.paperFooter.toString()) + "pt"), this.paperFooter == this.height && this.designPaper.footerLinetarget.css("top", e.height - p.a.instance.paperHeightTrim + "mm"), this.watermarkOptions = e.watermarkOptions || {}, this.designPaper.createWaterMark(!0, this.index, this.watermarkOptions), this.paperNumberLeft = e.paperNumberLeft, this.paperNumberTop = e.paperNumberTop, this.paperNumberDisabled = e.paperNumberDisabled, this.paperNumberContinue = e.paperNumberContinue, this.paperNumberFormat = e.paperNumberFormat, this.designPaper.paperNumberLeft = this.paperNumberLeft, this.designPaper.paperNumberTop = this.paperNumberTop, this.designPaper.paperNumberDisabled = this.paperNumberDisabled, this.designPaper.paperNumberContinue = this.paperNumberContinue, this.designPaper.paperNumberFormat = this.paperNumberFormat, this.designPaper.paperNumberTarget.css("top", this.paperNumberTop + "pt").css("left", this.paperNumberLeft + "pt"), this.designPaper.resetPaperNumber(this.designPaper.paperNumberTarget), this.fontFamily = e.fontFamily, this.orient = e.orient, this.rotate = e.rotate, this.scale = e.scale, this.designPaper.fontFamily = this.fontFamily, this.designPaper.orient = this.orient, this.designPaper.scale = i.designPaper.scale || this.scale, this.panelPaperRule = e.panelPaperRule, this.panelPageRule = e.panelPageRule, this.firstPaperFooter = e.firstPaperFooter, this.evenPaperFooter = e.evenPaperFooter, this.oddPaperFooter = e.oddPaperFooter, this.lastPaperFooter = e.lastPaperFooter, this.topOffset = e.topOffset, this.leftOffset = e.leftOffset, this.designPaper.setFooter(this.firstPaperFooter, this.evenPaperFooter, this.oddPaperFooter, this.lastPaperFooter), this.designPaper.setOffset(this.leftOffset, this.topOffset), Date.now(), this.printElements.forEach(function (t) {
- t.designTarget && t.designTarget.length && t.designTarget.remove()
- }), this.printElements = [], Date.now(), this.initPrintElements(e.printElements), Date.now(), this.printElements.forEach(function (t) {
- i.appendDesignPrintElement(i.designPaper, t), t.design(e, i.designPaper)
- }), Date.now()
- } catch (i) { }
- }, t.prototype.bindShortcutKeyEvent = function () {
- var e = this;
- jquery__WEBPACK_IMPORTED_MODULE_60___default()(document).keydown(function (t) {
- "INPUT" != t.target.tagName && (t.ctrlKey || t.metaKey) && 90 == t.keyCode && (t.shiftKey ? o.a.event.trigger("hiprintTemplateDataShortcutKey_" + e.templateId, "redo") : o.a.event.trigger("hiprintTemplateDataShortcutKey_" + e.templateId, "undo"), t.preventDefault())
- })
- }, t.prototype.bingPasteEvent = function () {
- var e = this;
- e.designPaper.target.attr("tabindex", "1"), e.designPaper.target.keydown(function (t) {
- "INPUT" != t.target.tagName && (t.ctrlKey || t.metaKey) && 86 == t.keyCode && (e.pasteJson(t), t.preventDefault())
- })
- }, t.prototype.pasteJson = function (t) {
- var e = jquery__WEBPACK_IMPORTED_MODULE_60___default()("#copyArea");
- if (e.length) try {
- var i, n, r, a, s, c, l, p = e.text(),
- d = JSON.parse(p);
- (d.printElementType || d.templateId) && (i = this, n = d.options, r = i.getElementById(d.id)) && (a = r.clone(d)) && (c = !(s = t.currentTarget.className != t.target.className) && i.mouseOffsetX && o.a.px.toPt(i.mouseOffsetX) || (n.left += 10), l = !s && i.mouseOffsetY && o.a.px.toPt(i.mouseOffsetY) || (n.top += 10), a.options.setLeft(c), a.options.setTop(l), a.setTemplateId(i.templateId), a.setPanel(i), i.appendDesignPrintElement(i.designPaper, a, !1), i.printElements.push(a), a.design(void 0, i.designPaper), o.a.event.trigger("hiprintTemplateDataChanged_" + i.templateId, "复制"), a.designTarget.children(".resize-panel").trigger(jquery__WEBPACK_IMPORTED_MODULE_60___default.a.Event("click")))
- } catch (t) { }
- }, t.prototype.css = function (t) {
- this.fontFamily ? t.css("fontFamily", this.fontFamily) : t[0].style.fontFamily = ""
- }, t.prototype.getConfig = function () {
- return p.a.instance
- }, t.prototype.getHtml = function (e, i, r, t, n) {
- var a, o = this,
- s = (this.orderPrintElements(), o.getConfig()),
- c = r || [],
- l = t || this,
- p = void 0;
- return t ? (p = c[c.length - 1], a = p.getPanelTarget(), p.updateReferenceElement(new E.a({
- top: this.paperHeader,
- left: 0,
- height: 0,
- width: 0,
- bottomInLastPaper: p.referenceElement.bottomInLastPaper,
- beginPrintPaperIndex: c.length - 1,
- printTopInPaper: p.referenceElement.bottomInLastPaper,
- endPrintPaperIndex: c.length - 1
- }))) : (a = l.createTarget(), p = l.createNewPage(c.length), c.push(p), a.append(p.getTarget())), this.printElements.filter(function (t) {
- return !t.isFixed() && !t.isHeaderOrFooter()
- }).forEach(function (i) {
- var n = [],
- t = c[c.length - 1];
- p = t.referenceElement.isPositionLeftOrRight(i.options.getTop()) ? c[t.referenceElement.beginPrintPaperIndex] : c[t.referenceElement.endPrintPaperIndex], (n = i.getHtml(p, e)).forEach(function (t, e) {
- t.referenceElement && (t.referenceElement.endPrintPaperIndex = t.referenceElement.beginPrintPaperIndex + n.length - 1), 0 < e && (p.index < c.length - 1 ? p = c[p.index + 1] : (p = l.createNewPage(c.length, p.referenceElement), c.push(p)), a.append(p.getTarget())), t.target && ("none" != i.options.showInPage && p.append(t.target), p.updatePrintLine(t.printLine), i.onRendered(p, t.target)), e == n.length - 1 && t.referenceElement && p.updateReferenceElement(t.referenceElement)
- })
- }), n && n.templates.forEach(function (t, e) {
- var i = t.data || {},
- n = t.options || {};
- t.template.printPanels.forEach(function (t) {
- t.getHtml(i, n, r, o)
- })
- }), s.paperNumberContinue && (o.paperNumberContinue ? hinnn._paperList = [].concat(Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(hinnn._paperList || []), Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(c)) : hinnn._paperList = Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(c)), t || (this.lastPaperFooter && c[c.length - 1].printLine > this.lastPaperFooter && (p = l.createNewPage(c.length, p.referenceElement), c.push(p), a.append(p.getTarget())), this.panelPaperRule && ("odd" == this.panelPaperRule && c.length % 2 == 0 && (p = l.createNewPage(c.length, p.referenceElement), c.push(p), a.append(p.getTarget())), "even" == this.panelPaperRule) && c.length % 2 == 1 && (p = l.createNewPage(c.length, p.referenceElement), c.push(p), a.append(p.getTarget())), c.forEach(function (t) {
- t.updatePaperNumber(t.index + 1, c.length, i.paperNumberToggleInEven), o.fillPaperHeaderAndFooter(t, e, c.length), i && (null != i.leftOffset && t.setLeftOffset(i.leftOffset), null != i.topOffset) && t.setTopOffset(i.topOffset)
- }), a.prepend(this.getPrintStyle()), s.paperNumberContinue && hinnn._paperList.forEach(function (t, e) {
- t.updatePaperNumber(e + 1, hinnn._paperList.length)
- })), a
- }, t.prototype.resize = function (t, e, i, n) {
- this.width = e, this.height = i, this.paperType = t, this.rotate = n, this.designPaper.resize(e, i)
- }, t.prototype.rotatePaper = function () {
- null == this.rotate && (this.rotate = !1), this.rotate = !this.rotate, this.resize(this.paperType, this.height, this.width, this.rotate)
- }, t.prototype.zoom = function (t, e) {
- this.scale = e ? t : void 0, this.designPaper.zoom(t)
- }, t.prototype.getTarget = function () {
- return this.target
- }, t.prototype.enable = function () {
- this.target.removeClass("hipanel-disable")
- }, t.prototype.disable = function () {
- this.target.addClass("hipanel-disable")
- }, t.prototype.getPanelEntity = function (e) {
- var i = [];
- return this.printElements.forEach(function (t) {
- i.push(t.getPrintElementEntity(e))
- }), new rt({
- index: this.index,
- name: this.name || this.index + 1,
- width: this.width,
- height: this.height,
- paperType: this.paperType,
- paperHeader: this.paperHeader,
- paperFooter: this.paperFooter,
- paperNumberDisabled: !!this.paperNumberDisabled || void 0,
- paperNumberContinue: null == this.paperNumberContinue || this.paperNumberContinue,
- paperNumberFormat: this.paperNumberFormat || void 0,
- panelPaperRule: this.panelPaperRule || void 0,
- panelPageRule: this.panelPageRule || void 0,
- paperNumberLeft: this.paperNumberLeft,
- paperNumberTop: this.paperNumberTop,
- printElements: i,
- rotate: this.rotate,
- firstPaperFooter: this.firstPaperFooter,
- evenPaperFooter: this.evenPaperFooter,
- oddPaperFooter: this.oddPaperFooter,
- lastPaperFooter: this.lastPaperFooter,
- topOffset: this.topOffset,
- fontFamily: this.fontFamily,
- orient: this.orient,
- scale: this.scale,
- watermarkOptions: this.watermarkOptions || void 0,
- leftOffset: this.leftOffset
- })
- }, t.prototype.createTarget = function () {
- var t = jquery__WEBPACK_IMPORTED_MODULE_60___default()('');
- return this.css(t), t
- }, t.prototype.droppablePaper = function (c) {
- var l = this;
- c.getTarget().hidroppable({
- accept: ".ep-draggable-item",
- onDrop: function (t, e) {
- var i = s.a.instance.getDragingPrintElement(),
- n = i.printElement,
- r = l.designPaper.scale || 1,
- a = (i.left - o.a.px.toPt(l.target.children(".hiprint-printPaper").offset().left)) / r,
- i = (i.top - o.a.px.toPt(l.target.children(".hiprint-printPaper").offset().top)) / r;
- n.updateSizeAndPositionOptions(l.mathroundToporleft(a), l.mathroundToporleft(i)), n.setTemplateId(l.templateId), n.setPanel(l), l.appendDesignPrintElement(l.designPaper, n, !0), l.printElements.push(n), n.design(void 0, c), o.a.event.trigger("hiprintTemplateDataChanged_" + l.templateId, "新增")
- }
- })
- }, t.prototype.initPrintElements = function (t) {
- var i = this;
- this.printElements = [], t && t.forEach(function (t) {
- var e;
- (e = t.printElementType ? nt.createPrintElementType(t.printElementType) : a.instance.getElementType(t.tid)) && ((e = e.createPrintElement(t.options)).setTemplateId(i.templateId), e.setPanel(i), i.printElements.push(e))
- })
- }, t.prototype.mathroundToporleft = function (t) {
- var e = p.a.instance.movingDistance;
- return Math.round(t / e) * e
- }, t.prototype.appendDesignPrintElement = function (t, e, i) {
- e.setCurrenttemplateData(void 0);
- var n = e.getDesignTarget(t);
- n.addClass("design"), i && e.initSizeByHtml(n), t.append(n)
- }, t.prototype.createNewPage = function (t, e) {
- t = new T(this.templateId, this.index, this.watermarkOptions, this.panelPageRule, this.scale, this.width, this.height, this.paperHeader, this.paperFooter, this.paperNumberLeft, this.paperNumberTop, this.paperNumberDisabled, this.paperNumberContinue, this.paperNumberFormat, t, e);
- return t.setFooter(this.firstPaperFooter, this.evenPaperFooter, this.oddPaperFooter, this.lastPaperFooter), t.setOffset(this.leftOffset, this.topOffset), t
- }, t.prototype.orderPrintElements = function () {
- this.printElements = o.a.orderBy(this.printElements, function (t) {
- return t.options.getLeft()
- }), this.printElements = o.a.orderBy(this.printElements, function (t) {
- return t.options.getTop()
- })
- }, t.prototype.fillPaperHeaderAndFooter = function (e, i, n) {
- this.printElements.filter(function (t) {
- return t.isFixed() || t.isHeaderOrFooter()
- }).forEach(function (t) {
- t.isFixed(), t.showInPage(e.index, n) && (t = t.getHtml(e, i)).length && e.append(t[0].target)
- })
- }, t.prototype.clear = function () {
- this.printElements.forEach(function (t) {
- t.designTarget && t.designTarget.length && t.designTarget.remove()
- }), this.printElements = [], o.a.event.trigger("hiprintTemplateDataChanged_" + this.templateId, "清空")
- }, t.prototype.insertPrintElementToPanel = function (t) {
- var e = this.getPrintElementTypeByEntity(t);
- e && ((e = e.createPrintElement(t.options)).setTemplateId(this.templateId), e.setPanel(this), this.printElements.push(e))
- }, t.prototype.addPrintText = function (t) {
- t.printElementType = t.printElementType || {}, t.printElementType.type = "text", this.insertPrintElementToPanel(t)
- }, t.prototype.addPrintHtml = function (t) {
- t.printElementType = t.printElementType || {}, t.printElementType.type = "html", this.insertPrintElementToPanel(t)
- }, t.prototype.addPrintTable = function (t) {
- var e;
- t.printElementType = t.printElementType || {}, t.printElementType.type = "table", t.options && t.options.columns && (e = jquery__WEBPACK_IMPORTED_MODULE_60___default.a.extend({}, t.options.columns), t.printElementType.columns = e.columns, e.columns = void 0), this.insertPrintElementToPanel(t)
- }, t.prototype.addPrintImage = function (t) {
- t.printElementType = t.printElementType || {}, t.printElementType.type = "image", this.insertPrintElementToPanel(t)
- }, t.prototype.addPrintLongText = function (t) {
- t.printElementType = t.printElementType || {}, t.printElementType.type = "longText", this.insertPrintElementToPanel(t)
- }, t.prototype.addPrintVline = function (t) {
- t.printElementType = t.printElementType || {}, t.printElementType.type = "vline", this.insertPrintElementToPanel(t)
- }, t.prototype.addPrintHline = function (t) {
- t.printElementType = t.printElementType || {}, t.printElementType.type = "hline", this.insertPrintElementToPanel(t)
- }, t.prototype.addPrintRect = function (t) {
- t.printElementType = t.printElementType || {}, t.printElementType.type = "rect", this.insertPrintElementToPanel(t)
- }, t.prototype.addPrintOval = function (t) {
- t.printElementType = t.printElementType || {}, t.printElementType.type = "oval", this.insertPrintElementToPanel(t)
- }, t.prototype.getPrintElementTypeByEntity = function (t) {
- return t.tid ? a.instance.getElementType(t.tid) : nt.createPrintElementType(t.printElementType)
- }, t.prototype.getPrintStyle = function () {
- return " \n"
- }, t.prototype.getPrintSizeStyle = function () {
- return this.paperType ? "size:" + this.paperType + " " + (this.height > this.width ? "portrait" : "landscape") + ";" : "size: " + this.width + "mm " + this.height + "mm " + (this.orient ? 1 == this.orient ? "portrait" : "landscape" : "") + ";"
- }, t.prototype.deletePrintElement = function (i) {
- var n = this;
- this.printElements.filter(function (t, e) {
- t.id == i.id && (i.delete(), n.printElements.splice(e, 1))
- })
- }, t.prototype.getElementByTid = function (e) {
- return this.printElements.filter(function (t) {
- return t.printElementType.tid === e
- }).map(function (t, e) {
- return t
- })
- }, t.prototype.getElementByName = function (e) {
- return this.printElements.filter(function (t) {
- return t.options.name === e
- }).map(function (t, e) {
- return t
- })
- }, t.prototype.getElementById = function (e) {
- return this.printElements.find(function (t) {
- return t.id === e
- })
- }, t.prototype.getFieldsInPanel = function () {
- var e = [];
- return this.printElements.forEach(function (t) {
- t.options && t.options.field ? e.push(t.options.field) : t.printElementType.field && e.push(t.printElementType.field)
- }), e
- }, t.prototype.getTestData = function () {
- var e = {};
- return this.printElements.forEach(function (t) {
- "table" != t.printElementType.type && (t.options && t.options.field ? e[t.options.field] = t.options.testData : t.printElementType.field && (e[t.printElementType.field] = t.printElementType.data || t.options.testData))
- }), e
- }, t.prototype.bindBatchMoveElement = function () {
- var e = this;
- this.designPaper.getTarget().on("mousemove", function (t) {
- t.target.className && "string" == _typeof(t.target.className) && t.target.className.includes("editing") || (t.currentTarget.className == e.designPaper.target[0].className ? (e.mouseOffsetX = t.offsetX, e.mouseOffsetY = t.offsetY) : e.mouseOffsetX = e.mouseOffsetY = void 0, s.a.instance.draging) || 1 === t.buttons && s.a.instance.rectDraging && e.mouseRect && (e.mouseRect.updateRect(t.pageX, t.pageY), e.updateRectPanel(e.mouseRect))
- }).on("mousedown", function (t) {
- s.a.instance.rectDraging = !0, t.target.className && "string" == _typeof(t.target.className) && t.target.className.includes("editing") || s.a.instance.draging || (e.mouseRect && e.mouseRect.target && e.mouseRect.target.remove(), 1 === t.buttons && "string" == _typeof(t.target.className) && t.target.className.includes("hiprint-printPaper hidroppable design") && (e.mouseRect = new at(t.pageX, t.pageY, s.a.instance.dragLengthCNum(t.pageX - e.designPaper.getTarget().offset().left, p.a.instance.movingDistance), s.a.instance.dragLengthCNum(t.pageY - e.designPaper.getTarget().offset().top, p.a.instance.movingDistance))))
- }).on("mouseup", function (t) {
- s.a.instance.rectDraging = !1
- })
- }, t.prototype.getElementInRect = function (e) {
- var i = [];
- return this.printElements.filter(function (t) {
- return !1 !== t.options.draggable
- }).forEach(function (t) {
- t.inRect(e) && i.push(t)
- }), i
- }, t.prototype.updateRectPanel = function (t) {
- var e, i, n = this,
- r = this.designPaper.getTarget(),
- a = this.designPaper.scale || 1;
- this.mouseRect.target || (this.mouseRect.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'), r.find(".hiprint-printPaper-content").append(this.mouseRect.target), this.bingKeyboardMoveEvent(this.mouseRect.target), this.mouseRect.target.hidraggable({
- onDrag: function (t, e, i) {
- n.mouseRect.lastLeft = n.mouseRect.lastLeft ? o.a.px.toPt(n.mouseRect.target[0].offsetLeft) : e / a, n.mouseRect.lastTop = n.mouseRect.lastTop ? o.a.px.toPt(n.mouseRect.target[0].offsetTop) : i / a, (n.mouseRect.mouseRectSelectedElement || []).forEach(function (t) {
- t.updatePositionByMultipleSelect(e - n.mouseRect.lastLeft, i - n.mouseRect.lastTop)
- }), n.mouseRect.lastLeft = e / a, n.mouseRect.lastTop = i / a, s.a.instance.changed = !0
- },
- moveUnit: "pt",
- minMove: p.a.instance.movingDistance,
- onBeforeDrag: function (t) {
- n.mouseRect.target.focus(), s.a.instance.draging = !0, n.mouseRect.mouseRectSelectedElement || (n.mouseRect.mouseRectSelectedElement = n.getElementInRect(n.mouseRect)), n.mouseRect.target.css({
- transform: "unset"
- })
- },
- getScale: function () {
- return n.designPaper.scale || 1
- },
- onStopDrag: function (t) {
- s.a.instance.changed && o.a.event.trigger("hiprintTemplateDataChanged_" + r.templateId, "框选移动"), s.a.instance.draging = !1, s.a.instance.changed = !1
- }
- })), t.ex >= t.bx && t.ey >= t.by ? this.mouseRect.target.css({
- height: t.maxY - t.minY + "px",
- width: t.maxX - t.minX + "px",
- left: t.lastLeft / a + "pt",
- top: t.lastTop / a + "pt",
- transform: "unset"
- }) : t.ex < t.bx && t.ey < t.by ? this.mouseRect.target.css({
- height: t.maxY - t.minY + "px",
- width: t.maxX - t.minX + "px",
- left: t.lastLeft / a + "pt",
- top: t.lastTop / a + "pt",
- transform: "rotate(180deg)",
- "transform-origin": "0 0"
- }) : (e = "", i = "rotate(180deg)", t.startX == t.minX || t.startX == t.maxX ? e = t.ey >= t.by ? (i = "scaleX(-1)", "left") : "center top" : t.startY != t.minY && t.startY != t.maxY || (e = t.ex >= t.bx ? "right" : "left"), this.mouseRect.target.css({
- height: t.maxY - t.minY + "px",
- width: t.maxX - t.minX + "px",
- left: t.lastLeft / a + "pt",
- top: t.lastTop / a + "pt",
- transform: i,
- "transform-origin": e
- })), t.target.focus()
- }, t.prototype.bingKeyboardMoveEvent = function (t) {
- var i = this;
- t.attr("tabindex", "1"), t.keydown(function (t) {
- i.mouseRect.mouseRectSelectedElement || (i.mouseRect.mouseRectSelectedElement = i.getElementInRect(i.mouseRect));
- var e = i.mouseRect.mouseRectSelectedElement || [];
- switch (t.keyCode) {
- case 37:
- i.mouseRect.updatePositionByMultipleSelect(0 - p.a.instance.movingDistance, 0), e.forEach(function (t) {
- t.updatePositionByMultipleSelect(0 - p.a.instance.movingDistance, 0)
- }), t.preventDefault();
- break;
- case 38:
- i.mouseRect.updatePositionByMultipleSelect(0, 0 - p.a.instance.movingDistance), e.forEach(function (t) {
- t.updatePositionByMultipleSelect(0, 0 - p.a.instance.movingDistance)
- }), t.preventDefault();
- break;
- case 39:
- i.mouseRect.updatePositionByMultipleSelect(p.a.instance.movingDistance, 0), e.forEach(function (t) {
- t.updatePositionByMultipleSelect(p.a.instance.movingDistance, 0)
- }), t.preventDefault();
- break;
- case 40:
- i.mouseRect.updatePositionByMultipleSelect(0, p.a.instance.movingDistance), e.forEach(function (t) {
- t.updatePositionByMultipleSelect(0, p.a.instance.movingDistance)
- }), t.preventDefault()
- }[37, 38, 39, 40].includes(t.keyCode) && o.a.event.trigger("hiprintTemplateDataChanged_" + i.templateId, "框选移动")
- })
- }, t
- }(),
- st = function (t) {
- if (t)
- if (t.panels) {
- this.panels = [];
- for (var e = 0; e < t.panels.length; e++) this.panels.push(new rt(t.panels[e]))
- } else this.panels = []
- },
- lt = n(9),
- ut = function () {
- function t(t, e) {
- var i = this;
- this.printElementOptionSettingPanel = {}, this.printTemplate = t, this.settingContainer = jquery__WEBPACK_IMPORTED_MODULE_60___default()(e), o.a.event.on(t.getPrintElementSelectEventKey(), function (t) {
- i.buildSetting(t)
- }), o.a.event.on(t.getBuildCustomOptionSettingEventKey(), function (t) {
- i.buildSettingByCustomOptions(t)
- }), o.a.event.on("clearSettingContainer", function () {
- i.clearSettingContainer()
- })
- }
- return t.prototype.init = function () { }, t.prototype.clearSettingContainer = function () {
- this.clearLastPrintElement(), this.settingContainer.html("")
- }, t.prototype.clearLastPrintElement = function () {
- this.lastPrintElement && (this.lastPrintElement._editing && this.lastPrintElement.updateByContent(!0), this.lastPrintElement._printElementOptionTabs && this.lastPrintElement._printElementOptionTabs.forEach(function (t) {
- t.list && t.list.forEach(function (t) {
- t.destroy()
- })
- }), this.lastPrintElement._printElementOptionItems) && this.lastPrintElement._printElementOptionItems.forEach(function (t) {
- t.destroy()
- }), this.lastPrintElement = void 0
- }, t.prototype.buildSetting = function (t) {
- var i, e, n = this,
- a = this,
- o = t.printElement,
- s = t.customOptionsInput,
- t = o.getPrintElementOptionTabs(),
- r = (n.clearSettingContainer(), t.length ? (i = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'), t.forEach(function (t) {
- var e = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
' + i18n.__(t.name) + "
"),
- r = (i.find(".prop-tab-items").append(e), jquery__WEBPACK_IMPORTED_MODULE_60___default()(''));
- t.list.forEach(function (t) {
- t.submit = function (t) {
- o.submitOption()
- };
- var e = t.createTarget(o, o.options, o.printElementType);
- n.printElementOptionSettingPanel[t.name] = e, r.append(e), ["columns", "dataType"].includes(t.name) ? t.setValue(o.options[t.name], o.options, o.printElementType) : ["coordinate", "widthHeight"].includes(t.name) ? t.setValue(o.options, o) : t.setValue(o.options[t.name] || o.printElementType[t.name]), e.find("textarea").bind("dblclick.textarea", function (t) {
- jquery__WEBPACK_IMPORTED_MODULE_60___default()(this).val() || (t = t.target.placeholder || "", jquery__WEBPACK_IMPORTED_MODULE_60___default()(this).val(t))
- })
- }), 0 == t.list.length && s && s.length && s.forEach(function (e) {
- var i = e.callback,
- n = (e.callback = function (t) {
- i && i(t)
- }, e.optionItems);
- e.title && r.append('
\n
\n ' + e.title + "\n
\n
"), n.forEach(function (t) {
- t.submit = function (t) {
- e.callback(a.getValueByOptionItems(n))
- }, r.append(t.createTarget(a.printTemplate, e.options, void 0)), t.setValue(e.options[t.name], e.options, void 0)
- }), r.find(".auto-submit").change(function () {
- e.callback(a.getValueByOptionItems(n))
- }), r.find(".auto-submit:input").bind("keydown.submitOption", function (t) {
- 13 === t.keyCode && e.callback(a.getValueByOptionItems(n))
- }), r.find("textarea").bind("dblclick.textarea", function (t) {
- jquery__WEBPACK_IMPORTED_MODULE_60___default()(this).val() || (t = t.target.placeholder || "", jquery__WEBPACK_IMPORTED_MODULE_60___default()(this).val(t))
- })
- }), i.append(r)
- })) : (i = jquery__WEBPACK_IMPORTED_MODULE_60___default()(''), o.getPrintElementOptionItems().forEach(function (t) {
- t.submit = function (t) {
- o.submitOption()
- };
- var e = t.createTarget(o, o.options, o.printElementType);
- n.printElementOptionSettingPanel[t.name] = e, i.append(e), ["columns", "dataType"].includes(t.name) ? t.setValue(o.options[t.name], o.options, o.printElementType) : ["coordinate", "widthHeight"].includes(t.name) ? t.setValue(o.options, o) : t.setValue(o.options[t.name] || o.printElementType[t.name])
- })), jquery__WEBPACK_IMPORTED_MODULE_60___default()('"))),
- c = jquery__WEBPACK_IMPORTED_MODULE_60___default()('"));
- i.append(r), 0 != o.options.draggable && i.append(c), t.length && (i.on("click", ".prop-tab-item", function () {
- var t = jquery__WEBPACK_IMPORTED_MODULE_60___default()(this),
- e = t.index(),
- t = (n.settingContainer.data("last-index", e), t.addClass("active"), t.siblings().removeClass("active"), i.find(".hiprint-option-items:eq(" + e + ")"));
- t.addClass("active"), t.siblings().removeClass("active")
- }), (e = +(n.settingContainer.data("last-index") || 0)) >= t.length && (e = 0), i.find(".prop-tab-item:eq(" + e + ")").click()), r.bind("click.submitOption", function () {
- o.submitOption()
- }), c.bind("click.deleteBtn", function () {
- hinnn.event.trigger("hiprintTemplateDataChanged_" + o.templateId, "删除"), a.printTemplate.deletePrintElement(o), n.clearSettingContainer()
- }), i.find(".auto-submit").change(function (t) {
- o.submitOption()
- }), i.find(".auto-submit:input").bind("keydown.submitOption", function (t) {
- 13 == t.keyCode && o.submitOption()
- }), this.settingContainer.append(i), t.length < 1 && s && s.forEach(function (t) {
- var e = t.callback;
- t.callback = function (t) {
- e && (e(t), o.submitOption())
- }, n.buildSettingByCustomOptions(t, n.settingContainer)
- }), this.lastPrintElement = o
- }, t.prototype.buildSettingByCustomOptions = function (e, t) {
- var i = this,
- n = (this.clearLastPrintElement(), t || this.settingContainer),
- r = (t || this.settingContainer.html(""), []),
- a = p.a.instance.panel.supportOptions.filter(function (t) {
- return !t.hidden
- }).map(function (t) {
- return t.name
- }),
- o = (e.optionItems ? r = e.optionItems : Object.keys(e.options).filter(function (t) {
- return a.includes(t)
- }).forEach(function (t) {
- t = lt.a.getItem(t);
- t && r.push(t)
- }), jquery__WEBPACK_IMPORTED_MODULE_60___default()('')),
- t = (e.title && o.append('
\n
\n ' + e.title + "\n
\n
"), r.forEach(function (t) {
- t.submit = function (t) {
- e.callback(i.getValueByOptionItems(r))
- }, o.append(t.createTarget(i.printTemplate, e.options, void 0)), t.setValue(e.options[t.name], e.options, void 0)
- }), jquery__WEBPACK_IMPORTED_MODULE_60___default()('")));
- o.append(t), t.bind("click.submitOption", function () {
- e.callback(i.getValueByOptionItems(r))
- }), o.find(".auto-submit").change(function (t) {
- e.callback(i.getValueByOptionItems(r))
- }), o.find(".auto-submit:input").bind("keydown.submitOption", function (t) {
- 13 == t.keyCode && e.callback(i.getValueByOptionItems(r))
- }), n.append(o)
- }, t.prototype.getValueByOptionItems = function (t) {
- var e = {};
- return t.forEach(function (t) {
- e[t.name] = t.getValue()
- }), e
- }, t
- }(),
- dt = function () {
- function t(t, e) {
- this.paginationContainer = t, this.jqPaginationContainer = jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.paginationContainer), this.template = e
- }
- return t.prototype.buildPagination = function (t) {
- var e = this.template.getPaneltotal(),
- n = this;
- this.jqPaginationContainer.html("");
- for (var r = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'), a = 0; a < e; a++) ! function () {
- var t = a,
- e = n.template.printPanels[t].name || t + 1,
- i = jquery__WEBPACK_IMPORTED_MODULE_60___default()("
')),this.target},Ji.prototype.getValue=function(){return this.target.find("select").val()||void 0},Ji.prototype.setValue=function(t){this.target.find("select").val(t)},Ji.prototype.destroy=function(){this.target.remove()},Ji),at=(Qi.prototype.createTarget=function(){var t=[{label:"".concat(i18n.__("默认"),"(Code 128)"),value:""},{label:"".concat(i18n.__("商品条码")),children:[{label:"EAN-13",value:"ean13"},{label:"EAN-8",value:"ean8"},{label:"UPC-A",value:"upca"},{label:"UPC-E",value:"upce"},{label:"ISBN",value:"isbn"},{label:"ISMN",value:"ismn"},{label:"ISSN",value:"issn"}]},{label:"".concat(i18n.__("条形码")),children:[{label:"Code 39",value:"code39"},{label:"Code 39 Extended",value:"code39ext"},{label:"Code 93",value:"code93"},{label:"Code 93 Extended",value:"code93ext"},{label:"Code 128",value:"code128"},{label:"Interleaved 2 of 5 (ITF)",value:"interleaved2of5"}]},{label:"".concat(i18n.__("物流")),children:[{label:"EAN-14",value:"ean14"},{label:"GS1-128",value:"gs1-128"},{label:"ITF-14",value:"itf14"},{label:"SSCC-18",value:"sscc18"}]},{label:"GS1 DataBar",children:[{label:"扩展式 GS1 DataBar",value:"databarexpanded"},{label:"层排扩展式 GS1 DataBar",value:"databarexpandedstacked"},{label:"限定式 GS1 DataBar",value:"databarlimited"},{label:"全向式 GS1 DataBar",value:"databaromni"},{label:"层排式 GS1 DataBar",value:"databarstacked"},{label:"全向层排式 GS1 DataBar",value:"databarstackedomni"},{label:"截短式 GS1 DataBar",value:"databartruncated"},{label:"GS1 北美优惠券码",value:"gs1northamericancoupon"}]},{label:"".concat(i18n.__("邮政和快递编码")),children:[{label:"AusPost 4 State Customer Code",value:"auspost"},{label:"Deutsche Post Identcode",value:"identcode"},{label:"Deutsche Post Leitcode",value:"leitcode"},{label:"Japan Post 4 State Customer Code",value:"japanpost"},{label:"Royal TNT Post",value:"kix"},{label:"Royal Mail 4 State Customer Code",value:"royalmail"},{label:"Royal Mail Mailmark",value:"mailmark"},{label:"MaxiCode",value:"maxicode"},{label:"USPS FIM symbols",value:"symbol"},{label:"USPS Intelligent Mail",value:"onecode"},{label:"USPS PLANET",value:"planet"},{label:"USPS POSTNET",value:"postnet"}]},{label:"".concat(i18n.__("医疗产品编码")),children:[{label:"Italian Pharmacode",value:"code32"},{label:"Pharmaceutical Binary Code",value:"pharmacode"},{label:"Pharmazentralnummer (PZN)",value:"pzn"},{label:"Two-track Pharmacode",value:"pharmacode2"},{label:"HIBC Aztec Code",value:"hibcazteccode"},{label:"HIBC Codablock F",value:"hibccodablockf"},{label:"HIBC Code 128",value:"hibccode128"},{label:"HIBC Code 39",value:"hibccode39"}]},{label:"".concat(i18n.__("不常用编码")),children:[{label:"Code 11",value:"code11"},{label:"Code 16K",value:"code16k"},{label:"Code 2 of 5",value:"code2of5"},{label:"Code 49",value:"code49"},{label:"Code One",value:"codeone"},{label:"Codabar",value:"rationalizedCodabar"},{label:"Codablock F",value:"codablockf"},{label:"BC412",value:"bc412"},{label:"COOP 2 of 5",value:"coop2of5"},{label:"Channel Code",value:"channelcode"},{label:"Datalogic 2 of 5",value:"datalogic2of5"},{label:"DotCode",value:"dotcode"},{label:"IATA 2 of 5",value:"iata2of5"},{label:"MSI Plessey",value:"msi"},{label:"Matrix 2 of 5",value:"matrix2of5"},{label:"Plessey UK",value:"plessey"},{label:"PosiCode",value:"posicode"},{label:"Telepen",value:"telepen"},{label:"Telepen Numeric",value:"telepennumeric"}]},{label:"GS1 复合编码",children:[{label:"复合 EAN-13",value:"ean13composite"},{label:"复合 EAN-8",value:"ean8composite"},{label:"复合 UPC-A",value:"upcacomposite"},{label:"复合 UPC-E",value:"upcecomposite"},{label:"层排扩展式复合 GS1 DataBar",value:"databarexpandedstackedcomposite"},{label:"扩展式复合 GS1 DataBar",value:"databarexpandedcomposite"},{label:"限定式复合 GS1 DataBar",value:"databarlimitedcomposite"},{label:"全向式复合 GS1 DataBar",value:"databaromnicomposite"},{label:"层排式复合 GS1 DataBar",value:"databarstackedcomposite"},{label:"全向层排式复合 GS1 DataBar",value:"databarstackedomnicomposite"},{label:"截短式复合 GS1 DataBar",value:"databartruncatedcomposite"},{label:"复合 GS1-128",value:"gs1-128composite"}]},{label:"".concat(i18n.__("附加组件")),children:[{label:"EAN-2 (2 位附加码)",value:"ean2"},{label:"EAN-5 (5 位附加码)",value:"ean5"},{label:"GS1 复合 2D 组件",value:"gs1-cc"}]},{label:"".concat(i18n.__("实验编码")),children:[{label:"Raw",value:"raw"},{label:"Custom 4 state symbology",value:"daft"},{label:"Flattermarken",value:"flattermarken"}]}],i=(this.target=jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'.concat(i18n.__("条码类型"),'
')),this.target.find("select.auto-submit"));return t.forEach(function(t){var e;t.children?(e=jquery__WEBPACK_IMPORTED_MODULE_60___default()('').concat(t.label,"")))}),i.append(e)):i.append('"))}),this.target},Qi.prototype.getValue=function(){return this.target.find("select").val()||void 0},Qi.prototype.setValue=function(t){this.target.find("select").val(t)},Qi.prototype.destroy=function(){this.target.remove()},Qi),ot=(Yi.prototype.createTarget=function(){var t=[{label:"".concat(i18n.__("默认"),"(qrcode)"),value:""},{label:"QR Code",value:"qrcode"},{label:"Micro QR Code",value:"microqrcode"},{label:"Swiss QR Code",value:"swissqrcode"},{label:"Rectangular Micro QR Code",value:"rectangularmicroqrcode"},{label:"Aztec Code",value:"azteccode"},{label:"Aztec Runes",value:"aztecrune"},{label:"Compact Aztec Code",value:"azteccodecompact"},{label:"Data Matrix",value:"datamatrix"},{label:"Data Matrix Rectangular",value:"datamatrixrectangular"},{label:"汉信码",value:"hanxin"},{label:"GS1 Data Matrix",value:"gs1datamatrix"},{label:"GS1 Data Matrix Rectangular",value:"gs1datamatrixrectangular"},{label:"GS1 QR Code",value:"gs1qrcode"},{label:"HIBC Data Matrix",value:"hibcdatamatrix"},{label:"HIBC Data Matrix Rectangular",value:"hibcdatamatrixrectangular"},{label:"HIBC MicroPDF417",value:"hibcmicropdf417"},{label:"HIBC PDF417",value:"hibcpdf417"},{label:"HIBC QR Code",value:"hibcqrcode"}],e=(this.target=jquery__WEBPACK_IMPORTED_MODULE_60___default()('