super-page-runtime 2.3.39-sit1 → 2.3.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/runtime/utils/api/page-expose-util.js +131 -131
- package/dist/es/components/runtime/utils/events/event-util.js +140 -142
- package/dist/es/components/runtime/utils/events/print-label.js +34 -33
- package/dist/es/components/runtime/utils/events/standard-event.js +438 -438
- package/dist/es/components/runtime/utils/events/validator-util.d.ts +8 -1
- package/dist/es/components/runtime/utils/events/validator-util.js +141 -128
- package/dist/es/components/runtime/utils/page-init-util.js +28 -26
- package/dist/es/components/runtime/utils/table-utils.js +1 -1
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +10 -6
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +8 -6
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/common/home-chart-condition-render.vue.js +8 -8
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +100 -95
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +3 -2
- package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +13 -13
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +11 -9
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +2 -0
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +11 -9
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +16 -16
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +6 -6
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +33 -33
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +7 -6
- package/dist/es/components/runtime/views/assemblys/form/image-upload/imageupload-runtime.vue2.js +6 -5
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +43 -42
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +7 -5
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +6 -4
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +5 -4
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +11 -11
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +10 -8
- package/dist/es/components/runtime/views/assemblys/page-bottom.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +1 -0
- package/dist/es/components/runtime/views/super-page.vue2.js +13 -12
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/package.json +2 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { isMobileBrowser as e, isPromise as n } from "agilebuilder-ui/src/utils/common-util";
|
|
2
|
-
import { getAdditionalParamMap as t, standardEvents as
|
|
3
|
-
import {
|
|
4
|
-
import { getComponentRef as
|
|
5
|
-
import { ElMessage as
|
|
6
|
-
import { analysisCondition as
|
|
7
|
-
import { getListCode as
|
|
8
|
-
import
|
|
9
|
-
import { getValueFromSource as
|
|
10
|
-
import { expressJump as
|
|
11
|
-
const
|
|
2
|
+
import { getAdditionalParamMap as t, standardEvents as o, judgeDataNumber as i, dealAfterOperate as r } from "./standard-event.js";
|
|
3
|
+
import { isNotNeedValidateRequired as u, validateDataModelFunc as c } from "./validator-util.js";
|
|
4
|
+
import { getComponentRef as l, getComponentRefByCode as a } from "../global-refs.js";
|
|
5
|
+
import { ElMessage as s } from "element-plus";
|
|
6
|
+
import { analysisCondition as f } from "agilebuilder-ui/src/utils/util";
|
|
7
|
+
import { getListCode as m, deepCopy as g } from "../common-util.js";
|
|
8
|
+
import d from "../eventBus.js";
|
|
9
|
+
import { getValueFromSource as p } from "../page-helper-util.js";
|
|
10
|
+
import { expressJump as v } from "../table-utils.js";
|
|
11
|
+
const b = ["downloadTemplate", "exportForm", "exportPDF", "export", "exportCharts"], C = ["import"];
|
|
12
12
|
function x(e2, n2) {
|
|
13
13
|
if (e2 && e2.customEvents) {
|
|
14
14
|
const t2 = function(e3) {
|
|
@@ -24,7 +24,7 @@ function x(e2, n2) {
|
|
|
24
24
|
n3[e4.eventName] = t3;
|
|
25
25
|
} catch (n4) {
|
|
26
26
|
const t4 = `自定义方法${e4.eventName}解析失败,请检查函数体是否正确`;
|
|
27
|
-
|
|
27
|
+
console.error(t4, n4), s.error(t4);
|
|
28
28
|
}
|
|
29
29
|
} else {
|
|
30
30
|
let t3 = e4.componentUuid + "_";
|
|
@@ -33,7 +33,7 @@ function x(e2, n2) {
|
|
|
33
33
|
n3[t3] = new Function("params", e4.jsContent);
|
|
34
34
|
} catch (n4) {
|
|
35
35
|
let t4 = "";
|
|
36
|
-
e4.title && (t4 += e4.title + "的"), e4.label && (t4 += e4.label), t4 += "事件解析失败,请检查事件函数体是否正确",
|
|
36
|
+
e4.title && (t4 += e4.title + "的"), e4.label && (t4 += e4.label), t4 += "事件解析失败,请检查事件函数体是否正确", s.error(t4), console.error(t4, n4);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
}), n3;
|
|
@@ -41,24 +41,24 @@ function x(e2, n2) {
|
|
|
41
41
|
!function(e3, n3) {
|
|
42
42
|
if (!n3) return;
|
|
43
43
|
for (const t3 in n3) {
|
|
44
|
-
|
|
44
|
+
k(n3[t3], e3);
|
|
45
45
|
}
|
|
46
46
|
}(n2, t2), n2.customEvents = t2;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function j(e2, n2) {
|
|
50
50
|
if (e2.customEvents) return e2.customEvents[n2];
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function k(e2, n2) {
|
|
53
53
|
e2.get = function(e3) {
|
|
54
|
-
return e3 ?
|
|
54
|
+
return e3 ? a(n2, e3) : void 0;
|
|
55
55
|
}, e2.getByUuid = function(e3) {
|
|
56
|
-
return e3 ?
|
|
56
|
+
return e3 ? l(n2, e3) : void 0;
|
|
57
57
|
}, e2.getPageContext = function() {
|
|
58
58
|
return n2;
|
|
59
59
|
}, e2.getContextValue = function(e3) {
|
|
60
60
|
let t2 = n2 && n2.entity ? n2.entity.context : null;
|
|
61
|
-
return t2 = t2 || {},
|
|
61
|
+
return t2 = t2 || {}, p(t2, e3, "context");
|
|
62
62
|
}, e2.getContext = function() {
|
|
63
63
|
return n2 && n2.entity ? n2.entity.context : {};
|
|
64
64
|
}, e2.getSystem = function() {
|
|
@@ -70,7 +70,7 @@ function j(e2, n2) {
|
|
|
70
70
|
}, e2.getPage = function() {
|
|
71
71
|
return n2 && n2.entity ? n2.entity.page : {};
|
|
72
72
|
}, e2.getCustomFunc = function(e3) {
|
|
73
|
-
return
|
|
73
|
+
return j(n2, e3);
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
function O(e2) {
|
|
@@ -81,154 +81,152 @@ function O(e2) {
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
function h(e2, n2, t2,
|
|
85
|
-
return w(e2, n2, t2,
|
|
84
|
+
function h(e2, n2, t2, o2, i2) {
|
|
85
|
+
return w(e2, n2, t2, o2, true, i2, false);
|
|
86
86
|
}
|
|
87
|
-
function y(e2, n2, t2,
|
|
87
|
+
function y(e2, n2, t2, o2, i2) {
|
|
88
88
|
var _a, _b;
|
|
89
|
-
if (
|
|
89
|
+
if (o2 && "change" === o2) {
|
|
90
90
|
const e3 = n2.subTableWatchProps;
|
|
91
91
|
if (e3) for (const n3 in e3) {
|
|
92
|
-
const
|
|
93
|
-
|
|
92
|
+
const o3 = e3[n3], i3 = (_b = (_a = t2.props) == null ? void 0 : _a.base) == null ? void 0 : _b.prop;
|
|
93
|
+
o3 && o3.indexOf(i3) >= 0 && d.$emit("_refreshSubTable_" + n3, { propName: i3 });
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
return w(e2, n2, t2,
|
|
96
|
+
return w(e2, n2, t2, o2, true, i2, true);
|
|
97
97
|
}
|
|
98
|
-
function E(e2, n2, t2,
|
|
99
|
-
return y(e2, n2, t2, "afterInit",
|
|
98
|
+
function E(e2, n2, t2, o2) {
|
|
99
|
+
return y(e2, n2, t2, "afterInit", o2);
|
|
100
100
|
}
|
|
101
|
-
function N(e2, n2, t2,
|
|
102
|
-
return w(e2, n2, t2,
|
|
101
|
+
function N(e2, n2, t2, o2, i2) {
|
|
102
|
+
return w(e2, n2, t2, o2, false, i2, false);
|
|
103
103
|
}
|
|
104
|
-
function w(e2, t2,
|
|
105
|
-
const a2 =
|
|
104
|
+
function w(e2, t2, o2, r2, u2, c2, l2) {
|
|
105
|
+
const a2 = o2 && o2.runtime && o2.runtime.events ? o2.runtime.events : [];
|
|
106
106
|
let s2;
|
|
107
107
|
if (l2 || !function(e3) {
|
|
108
108
|
return e3 && S.indexOf(e3) >= 0;
|
|
109
109
|
}(r2)) {
|
|
110
110
|
if (s2 = $(t2, a2, r2), u2) {
|
|
111
|
-
return z(t2,
|
|
111
|
+
return z(t2, o2, s2, R(t2, o2, e2, c2));
|
|
112
112
|
}
|
|
113
113
|
return s2;
|
|
114
114
|
}
|
|
115
|
-
!function(e3, t3,
|
|
116
|
-
const r3 =
|
|
115
|
+
!function(e3, t3, o3) {
|
|
116
|
+
const r3 = i(t3, o3.ids);
|
|
117
117
|
if (!r3) return;
|
|
118
118
|
if (void 0 !== e3.canClick && false === e3.canClick) return;
|
|
119
|
-
Q(
|
|
120
|
-
if (true ===
|
|
119
|
+
Q(o3).then((i2) => {
|
|
120
|
+
if (true === i2.canExecute) {
|
|
121
121
|
e3.clickUuid = t3.uuid, e3.canClick = false;
|
|
122
|
-
const
|
|
122
|
+
const i3 = t3.runtime && t3.runtime.events ? t3.runtime.events : [], r4 = $(e3, i3, "beforeValidateForm");
|
|
123
123
|
let u3;
|
|
124
|
-
if (r4 && (u3 = z(e3, t3, r4,
|
|
124
|
+
if (r4 && (u3 = z(e3, t3, r4, o3)), void 0 === u3 && (u3 = true), !u3) return void (e3.canClick = true);
|
|
125
125
|
n(u3) ? u3.then((n2) => {
|
|
126
|
-
n2 && true === n2 ? T(e3, t3,
|
|
126
|
+
n2 && true === n2 ? T(e3, t3, o3) : e3.canClick = true;
|
|
127
127
|
}).catch((n2) => {
|
|
128
128
|
e3.canClick = true;
|
|
129
|
-
}) : T(e3, t3,
|
|
129
|
+
}) : T(e3, t3, o3);
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
|
-
}(t2,
|
|
132
|
+
}(t2, o2, U(e2, t2, o2, c2));
|
|
133
133
|
}
|
|
134
134
|
const S = ["click", "suffixClick", "prefixClick", "menuClick"];
|
|
135
135
|
function P(e2, n2) {
|
|
136
136
|
return n2.props.base.tableUuid ? n2.props.base.tableUuid : e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null;
|
|
137
137
|
}
|
|
138
|
-
function R(e2, n2, t2,
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
141
|
-
return null != t2 && (
|
|
138
|
+
function R(e2, n2, t2, o2) {
|
|
139
|
+
const i2 = {};
|
|
140
|
+
if (o2) for (const e3 in o2) i2[e3] = o2[e3];
|
|
141
|
+
return null != t2 && (i2._value = t2), e2 && (i2.pageContext = e2), n2 && (i2.configureObj = n2), i2;
|
|
142
142
|
}
|
|
143
|
-
function T(e2, t2,
|
|
144
|
-
const
|
|
143
|
+
function T(e2, t2, o2) {
|
|
144
|
+
const i2 = t2.runtime && t2.runtime.events ? t2.runtime.events : [];
|
|
145
145
|
let r2 = true;
|
|
146
|
-
(
|
|
147
|
-
const
|
|
148
|
-
if (
|
|
149
|
-
const e3 =
|
|
150
|
-
|
|
151
|
-
}(c2.isStandard, c2.event);
|
|
152
|
-
e3 && (r2 = false);
|
|
146
|
+
(o2 == null ? void 0 : o2.skipValidate) && (r2 = false);
|
|
147
|
+
const l2 = H(e2, i2, "click");
|
|
148
|
+
if (l2) {
|
|
149
|
+
const e3 = l2.isStandard, n2 = l2.event;
|
|
150
|
+
u(e3, n2) && (r2 = false);
|
|
153
151
|
}
|
|
154
|
-
|
|
155
|
-
if (!
|
|
156
|
-
const r3 = D(e2, t2,
|
|
152
|
+
c(e2, t2, l2, r2).then((i3) => {
|
|
153
|
+
if (!i3) return void (e2.canClick = true);
|
|
154
|
+
const r3 = D(e2, t2, o2);
|
|
157
155
|
r3 ? n(r3) ? r3.then((n2) => {
|
|
158
|
-
n2 ? A(e2, t2,
|
|
156
|
+
n2 ? A(e2, t2, l2, o2) : e2.canClick = true;
|
|
159
157
|
}).catch((n2) => {
|
|
160
|
-
e2.canClick = true;
|
|
161
|
-
}) : A(e2, t2,
|
|
158
|
+
console.error(n2), e2.canClick = true;
|
|
159
|
+
}) : A(e2, t2, l2, o2) : e2.canClick = true;
|
|
162
160
|
}).catch((n2) => {
|
|
163
|
-
e2.canClick = true;
|
|
161
|
+
console.error(n2), e2.canClick = true;
|
|
164
162
|
});
|
|
165
163
|
}
|
|
166
|
-
function F(e2, n2, t2,
|
|
167
|
-
const r2 = U(e2, n2, t2,
|
|
168
|
-
A(n2, t2, H(n2, t2.runtime && t2.runtime.events ? t2.runtime.events : [],
|
|
164
|
+
function F(e2, n2, t2, o2, i2) {
|
|
165
|
+
const r2 = U(e2, n2, t2, i2);
|
|
166
|
+
A(n2, t2, H(n2, t2.runtime && t2.runtime.events ? t2.runtime.events : [], o2), r2);
|
|
169
167
|
}
|
|
170
|
-
function U(e2, n2, t2,
|
|
171
|
-
const
|
|
168
|
+
function U(e2, n2, t2, o2) {
|
|
169
|
+
const i2 = n2.code, r2 = n2.version, u2 = P(n2, t2);
|
|
172
170
|
if (u2) {
|
|
173
|
-
const e3 =
|
|
174
|
-
|
|
175
|
-
_(n2) && (
|
|
171
|
+
const e3 = l(n2, u2), t3 = e3 ? e3.getSelections() : null, c2 = e3 ? e3.getSelectionIds() : null;
|
|
172
|
+
o2 || (o2 = {}), o2.tableUuid = u2, o2.listCode = m(i2, r2, u2);
|
|
173
|
+
_(n2) && (o2.selections = t3, o2.id = c2 && c2.length > 0 ? c2[0] : null, o2.ids = c2);
|
|
176
174
|
const a2 = e3 ? e3.getTableConfigure() : null;
|
|
177
|
-
|
|
175
|
+
o2.tableConfigure = a2;
|
|
178
176
|
}
|
|
179
|
-
return R(n2, t2, e2,
|
|
177
|
+
return R(n2, t2, e2, o2);
|
|
180
178
|
}
|
|
181
179
|
function D(e2, n2, t2) {
|
|
182
|
-
const
|
|
183
|
-
let
|
|
184
|
-
return
|
|
180
|
+
const o2 = $(e2, n2.runtime && n2.runtime.events ? n2.runtime.events : [], "beforeClick");
|
|
181
|
+
let i2;
|
|
182
|
+
return o2 && (i2 = z(e2, n2, o2, null, t2)), void 0 === i2 || i2;
|
|
185
183
|
}
|
|
186
184
|
function L(e2, n2, t2) {
|
|
187
|
-
const
|
|
188
|
-
|
|
185
|
+
const o2 = e2.code + "_";
|
|
186
|
+
d.$emit(o2 + "open-dialog", { pageContext: e2, configureObj: n2, eventParams: t2 });
|
|
189
187
|
}
|
|
190
188
|
function _(e2, n2) {
|
|
191
189
|
return !(!e2.pageType || "list" !== e2.pageType);
|
|
192
190
|
}
|
|
193
|
-
function V(e2, t2,
|
|
194
|
-
const
|
|
191
|
+
function V(e2, t2, o2) {
|
|
192
|
+
const i2 = t2.runtime && t2.runtime.events ? t2.runtime.events : [], r2 = $(e2, i2, "afterClick");
|
|
195
193
|
if (r2) {
|
|
196
|
-
const
|
|
197
|
-
n(
|
|
194
|
+
const i3 = z(e2, t2, r2, null, o2);
|
|
195
|
+
n(i3) ? i3.finally(() => {
|
|
198
196
|
e2.canClick = true;
|
|
199
197
|
}) : e2.canClick = true;
|
|
200
198
|
} else e2.canClick = true;
|
|
201
199
|
}
|
|
202
|
-
function q(e2, n2, t2,
|
|
203
|
-
|
|
200
|
+
function q(e2, n2, t2, o2, i2, u2) {
|
|
201
|
+
o2 ? (e2.result = i2, e2.canClick = true) : r(e2, n2, i2, "", u2);
|
|
204
202
|
const c2 = $(e2, n2.runtime && n2.runtime.events ? n2.runtime.events : [], "afterClick");
|
|
205
203
|
c2 && z(e2, n2, c2, t2);
|
|
206
204
|
}
|
|
207
|
-
function A(e2, t2,
|
|
205
|
+
function A(e2, t2, o2, i2) {
|
|
208
206
|
let r2 = t2, u2 = t2.props.linkPage;
|
|
209
207
|
if (u2 && u2 instanceof Array) {
|
|
210
208
|
const n2 = function(e3) {
|
|
211
209
|
let n3 = e3 ? e3.row : null;
|
|
212
210
|
n3 || (n3 = e3 && e3.selections && e3.selections.length > 0 ? e3.selections[0] : null);
|
|
213
211
|
return n3;
|
|
214
|
-
}(
|
|
212
|
+
}(i2), o3 = v(e2, t2, u2, n2);
|
|
215
213
|
let c2, l2 = false;
|
|
216
|
-
|
|
214
|
+
o3 && (l2 = o3.show, c2 = l2 ? o3.toPage : null), u2 = c2 ? c2.linkPage : null, u2 && (r2 = g(t2), r2.props.linkPage = u2);
|
|
217
215
|
}
|
|
218
|
-
u2 && u2.jumpPageUrl ? (e2.canClick = true, L(e2, r2,
|
|
219
|
-
const r3 =
|
|
216
|
+
u2 && u2.jumpPageUrl ? (e2.canClick = true, L(e2, r2, i2)) : function(e3, t3, o3, i3) {
|
|
217
|
+
const r3 = o3, u3 = _(e3);
|
|
220
218
|
if (r3) {
|
|
221
|
-
const
|
|
219
|
+
const o4 = r3.func, c2 = r3.isStandard, l2 = r3.event, a2 = z(e3, t3, o4, i3);
|
|
222
220
|
if (function(e4, n2) {
|
|
223
221
|
return e4 && ("exportForm" === n2.eventName || "exportPDF" === n2.eventName || "import" === n2.eventName || "assign" === n2.eventName || "copyTask" === n2.eventName || "addSigner" === n2.eventName || "returnTaskTo" === n2.eventName || "removeSigner" === n2.eventName || "saveQueryCharts" === n2.eventName || "addTransactor" === n2.eventName || "removeTransactor" === n2.eventName);
|
|
224
222
|
}(c2, l2)) return void (e3.canClick = true);
|
|
225
223
|
n(a2) ? a2.then((n2) => {
|
|
226
|
-
n2 ? q(e3, t3,
|
|
224
|
+
n2 ? q(e3, t3, i3, c2, n2, u3) : e3.canClick = true;
|
|
227
225
|
}).catch((n2) => {
|
|
228
|
-
e3.canClick = true;
|
|
229
|
-
}) : q(e3, t3,
|
|
230
|
-
} else q(e3, t3,
|
|
231
|
-
}(e2, t2,
|
|
226
|
+
console.error(n2), e3.canClick = true;
|
|
227
|
+
}) : q(e3, t3, i3, c2, a2, u3);
|
|
228
|
+
} else q(e3, t3, i3, false, null, u3);
|
|
229
|
+
}(e2, t2, o2, i2);
|
|
232
230
|
}
|
|
233
231
|
function I(e2, n2) {
|
|
234
232
|
const t2 = e2.customEvents;
|
|
@@ -239,10 +237,10 @@ function I(e2, n2) {
|
|
|
239
237
|
}
|
|
240
238
|
function $(e2, n2, t2) {
|
|
241
239
|
if (n2 && t2) {
|
|
242
|
-
const
|
|
243
|
-
if (
|
|
244
|
-
const n3 =
|
|
245
|
-
return n3.isStandard ?
|
|
240
|
+
const i2 = n2.filter((e3) => e3.name === t2);
|
|
241
|
+
if (i2 && i2.length > 0) {
|
|
242
|
+
const n3 = i2[0];
|
|
243
|
+
return n3.isStandard ? o[n3.eventName] : I(e2, n3);
|
|
246
244
|
}
|
|
247
245
|
}
|
|
248
246
|
}
|
|
@@ -256,74 +254,74 @@ function B(e2, n2) {
|
|
|
256
254
|
}
|
|
257
255
|
function H(e2, n2, t2) {
|
|
258
256
|
if (n2 && t2) {
|
|
259
|
-
const
|
|
260
|
-
if (
|
|
261
|
-
const n3 =
|
|
262
|
-
return n3.isStandard ? { func:
|
|
257
|
+
const i2 = n2.filter((e3) => e3.name === t2);
|
|
258
|
+
if (i2 && i2.length > 0) {
|
|
259
|
+
const n3 = i2[0];
|
|
260
|
+
return n3.isStandard ? { func: o[n3.eventName], isStandard: true, event: n3 } : { func: I(e2, n3), isStandard: false, event: n3 };
|
|
263
261
|
}
|
|
264
262
|
}
|
|
265
263
|
}
|
|
266
|
-
function z(e2, n2, t2,
|
|
264
|
+
function z(e2, n2, t2, o2, i2) {
|
|
267
265
|
if (t2) {
|
|
268
|
-
if (
|
|
269
|
-
return t2.apply(t2, [
|
|
266
|
+
if (o2 || (o2 = { pageContext: e2, configureObj: n2 }), i2 && o2) for (const e3 in i2) o2[e3] = i2[e3];
|
|
267
|
+
return t2.apply(t2, [o2]);
|
|
270
268
|
}
|
|
271
269
|
}
|
|
272
270
|
function Q(e2) {
|
|
273
|
-
const n2 = e2.pageContext,
|
|
271
|
+
const n2 = e2.pageContext, o2 = e2.configureObj, i2 = _(n2);
|
|
274
272
|
let r2 = [];
|
|
275
|
-
if (
|
|
273
|
+
if (i2) n2.editData ? r2.push(n2.editData) : r2 = e2.selections;
|
|
276
274
|
else {
|
|
277
275
|
const e3 = n2.entity.data;
|
|
278
276
|
r2.push(e3);
|
|
279
277
|
}
|
|
280
|
-
const u2 =
|
|
281
|
-
return new Promise((e3,
|
|
278
|
+
const u2 = o2.props.base.condition;
|
|
279
|
+
return new Promise((e3, o3) => {
|
|
282
280
|
if (null == u2 || "" === u2 || null == r2 || 0 === r2.length) e3({ canExecute: true });
|
|
283
281
|
else {
|
|
284
|
-
const
|
|
285
|
-
let
|
|
282
|
+
const o4 = n2.entity.context, i3 = t(n2), c2 = true, l2 = n2.tableName;
|
|
283
|
+
let a2, m2, g2 = true;
|
|
286
284
|
for (let e4 = 0; e4 < r2.length; e4++) {
|
|
287
285
|
const t2 = r2[e4];
|
|
288
286
|
for (let e5 = 0; e5 < u2.length; e5++) {
|
|
289
|
-
const r3 = u2[e5],
|
|
290
|
-
if (!
|
|
291
|
-
g2 = false,
|
|
287
|
+
const r3 = u2[e5], s2 = r3.toolTips, d2 = r3.conditionList;
|
|
288
|
+
if (!f(d2, t2, i3, o4, c2, l2, null, n2)) {
|
|
289
|
+
g2 = false, a2 = s2, m2 = t2;
|
|
292
290
|
break;
|
|
293
291
|
}
|
|
294
292
|
}
|
|
295
293
|
}
|
|
296
|
-
g2 ? e3({ canExecute: true }) : (
|
|
294
|
+
g2 ? e3({ canExecute: true }) : (a2 && s({ showClose: true, type: "warning", message: a2 }), e3({ canExecute: false, message: a2, failEntity: m2 }));
|
|
297
295
|
}
|
|
298
296
|
});
|
|
299
297
|
}
|
|
300
|
-
function W(e2, n2, t2,
|
|
301
|
-
var
|
|
302
|
-
n2 && (G("loadBeforeSend", N(null, (
|
|
298
|
+
function W(e2, n2, t2, o2) {
|
|
299
|
+
var i2;
|
|
300
|
+
n2 && (G("loadBeforeSend", N(null, (i2 = { pageContext: t2, configureObj: o2 }).pageContext, i2.configureObj, "beforeListLoad", i2), e2), G("beforeRequest", function(e3) {
|
|
303
301
|
return N(null, e3.pageContext, e3.configureObj, "beforeRequest", e3);
|
|
304
|
-
}({ pageContext: t2, configureObj:
|
|
302
|
+
}({ pageContext: t2, configureObj: o2 }), e2), G("gridDataLoaded", function(e3) {
|
|
305
303
|
return N(null, e3.pageContext, e3.configureObj, "onListLoad", e3);
|
|
306
|
-
}({ pageContext: t2, configureObj:
|
|
304
|
+
}({ pageContext: t2, configureObj: o2 }), e2), G("gridComplete", function(e3) {
|
|
307
305
|
return N(null, e3.pageContext, e3.configureObj, "afterListLoad", e3);
|
|
308
|
-
}({ pageContext: t2, configureObj:
|
|
306
|
+
}({ pageContext: t2, configureObj: o2 }), e2), G("resizeHeight", function(e3) {
|
|
309
307
|
return N(null, e3.pageContext, e3.configureObj, "resizeTableHeight", e3);
|
|
310
|
-
}({ pageContext: t2, configureObj:
|
|
308
|
+
}({ pageContext: t2, configureObj: o2 }), e2), e2.lineEditOptions || (e2.lineEditOptions = {}), G("beforeInsertRow", function(e3) {
|
|
311
309
|
return N(null, e3.pageContext, e3.configureObj, "beforeAddRow", e3);
|
|
312
|
-
}({ pageContext: t2, configureObj:
|
|
310
|
+
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("afterInsertRow", function(e3) {
|
|
313
311
|
return N(null, e3.pageContext, e3.configureObj, "afterAddRow", e3);
|
|
314
|
-
}({ pageContext: t2, configureObj:
|
|
312
|
+
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("beforeDelete", function(e3) {
|
|
315
313
|
return N(null, e3.pageContext, e3.configureObj, "beforeRemoveRow", e3);
|
|
316
|
-
}({ pageContext: t2, configureObj:
|
|
314
|
+
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("afterDelete", function(e3) {
|
|
317
315
|
return N(null, e3.pageContext, e3.configureObj, "afterRemoveRow", e3);
|
|
318
|
-
}({ pageContext: t2, configureObj:
|
|
316
|
+
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("beforeEdit", function(e3) {
|
|
319
317
|
return N(null, e3.pageContext, e3.configureObj, "beforeEdit", e3);
|
|
320
|
-
}({ pageContext: t2, configureObj:
|
|
318
|
+
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("beforeRestore", function(e3) {
|
|
321
319
|
return N(null, e3.pageContext, e3.configureObj, "beforeRestore", e3);
|
|
322
|
-
}({ pageContext: t2, configureObj:
|
|
320
|
+
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("beforeRestoreValidate", function(e3) {
|
|
323
321
|
return N(null, e3.pageContext, e3.configureObj, "beforeRestoreValidate", e3);
|
|
324
|
-
}({ pageContext: t2, configureObj:
|
|
322
|
+
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), function(e3, n3, t3) {
|
|
325
323
|
n3 && (t3[e3] = n3);
|
|
326
|
-
}("filterDataEvent", N(null, t2,
|
|
324
|
+
}("filterDataEvent", N(null, t2, o2, "filter-data", { pageContext: t2, configureObj: o2 }), e2));
|
|
327
325
|
}
|
|
328
326
|
function G(e2, n2, t2) {
|
|
329
327
|
n2 && (t2[e2] = n2);
|
|
@@ -355,10 +353,10 @@ function ne(e2, n2, t2) {
|
|
|
355
353
|
function te(e2) {
|
|
356
354
|
return h(null, e2.pageContext, e2.configureObj, "before-upload", e2);
|
|
357
355
|
}
|
|
358
|
-
function
|
|
356
|
+
function oe(e2, n2, t2) {
|
|
359
357
|
return h(null, e2, n2, "uploaded", t2);
|
|
360
358
|
}
|
|
361
|
-
function
|
|
359
|
+
function ie(e2, n2, t2) {
|
|
362
360
|
return h(null, e2, n2, "before-delete", t2);
|
|
363
361
|
}
|
|
364
362
|
function re(e2, n2, t2) {
|
|
@@ -375,22 +373,22 @@ function ue(n2) {
|
|
|
375
373
|
}
|
|
376
374
|
return t2;
|
|
377
375
|
}
|
|
378
|
-
function ce(e2, n2, t2,
|
|
379
|
-
return z(e2, n2, $(e2, n2 && n2.runtime && n2.runtime.events ? n2.runtime.events : [], t2), { configure: n2, pageContext: e2, chartOption:
|
|
376
|
+
function ce(e2, n2, t2, o2, i2) {
|
|
377
|
+
return z(e2, n2, $(e2, n2 && n2.runtime && n2.runtime.events ? n2.runtime.events : [], t2), { configure: n2, pageContext: e2, chartOption: o2, ...i2 });
|
|
380
378
|
}
|
|
381
379
|
function le(n2, t2) {
|
|
382
|
-
let
|
|
380
|
+
let o2 = true;
|
|
383
381
|
if (e()) {
|
|
384
382
|
const e2 = H(n2, t2 && t2.runtime && t2.runtime.events ? t2.runtime.events : [], "click");
|
|
385
383
|
if (e2) {
|
|
386
|
-
const n3 = e2.isStandard, t3 = e2.event,
|
|
387
|
-
n3 &&
|
|
384
|
+
const n3 = e2.isStandard, t3 = e2.event, i2 = navigator ? navigator.userAgent : null;
|
|
385
|
+
n3 && i2 && (i2.indexOf("Html5Plus") > 0 ? (b.includes(t3.eventName) || C.includes(t3.eventName)) && (o2 = false) : C.includes(t3.eventName) && (o2 = false));
|
|
388
386
|
}
|
|
389
387
|
}
|
|
390
|
-
return
|
|
388
|
+
return o2;
|
|
391
389
|
}
|
|
392
390
|
export {
|
|
393
|
-
|
|
391
|
+
k as appendDefaultMethods,
|
|
394
392
|
Q as canExecuteButton,
|
|
395
393
|
X as cellClick,
|
|
396
394
|
Y as cellDblClick,
|
|
@@ -398,12 +396,12 @@ export {
|
|
|
398
396
|
D as doBeforeClickEvent,
|
|
399
397
|
L as doClickJumpPageEvent,
|
|
400
398
|
F as doSuffixOrPrefixClickEvent,
|
|
401
|
-
|
|
399
|
+
ie as fileUploadBeforeDelete,
|
|
402
400
|
te as fileUploadBeforeUpload,
|
|
403
401
|
re as fileUploadDeleted,
|
|
404
|
-
|
|
402
|
+
oe as fileUploadUploaded,
|
|
405
403
|
H as getClickEventFuncByType,
|
|
406
|
-
|
|
404
|
+
j as getCustomFunc,
|
|
407
405
|
U as getDefaultEventParams,
|
|
408
406
|
$ as getEventFuncByType,
|
|
409
407
|
B as getEventNameByType,
|
|
@@ -3,26 +3,27 @@ import { hiprint as t, disAutoConnect as n } from "vue-plugin-hiprint";
|
|
|
3
3
|
import { generateCodeByRule as o } from "../barcode-util.js";
|
|
4
4
|
function a(n2, a2) {
|
|
5
5
|
e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/print-models/by-codes", [a2]).then((e2) => {
|
|
6
|
-
const a3 = JSON.parse(e2[0].template),
|
|
6
|
+
const a3 = JSON.parse(e2[0].template), r2 = [];
|
|
7
7
|
a3.panels.forEach((e3) => {
|
|
8
8
|
e3.printElements.forEach((e4) => {
|
|
9
|
-
"barcode" !== e4.options.textType && "qrcode" !== e4.options.textType ||
|
|
9
|
+
"barcode" !== e4.options.textType && "qrcode" !== e4.options.textType || r2.push(e4.options);
|
|
10
10
|
});
|
|
11
11
|
});
|
|
12
|
-
const
|
|
12
|
+
const i = new t.PrintTemplate({ template: a3 }), l = { callback: () => {
|
|
13
13
|
}, styleHandler: () => "" }, c = { leftOffset: -1, topOffset: -1 }, f = {};
|
|
14
14
|
a3.panels[0].printElements.forEach((e3) => {
|
|
15
15
|
if ("datetime" === e3.options.dataType && e3.options.field) {
|
|
16
16
|
const t2 = e3.options.field.substring(6);
|
|
17
17
|
f[t2] = e3.options.dateFormat;
|
|
18
18
|
}
|
|
19
|
-
}), n2.pageContext.pageType ? "list" === n2.pageContext.pageType ? function(e3, t2, n3, a4,
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
19
|
+
}), n2.pageContext.pageType ? "list" === n2.pageContext.pageType ? function(e3, t2, n3, a4, s2, r3) {
|
|
20
|
+
const i2 = JSON.parse(JSON.stringify(e3.selections));
|
|
21
|
+
if (i2.forEach((e4) => {
|
|
22
22
|
Object.keys(t2).forEach((t3) => {
|
|
23
23
|
if (e4[t3] && "number" == typeof e4[t3] && !isNaN(e4[t3])) try {
|
|
24
24
|
e4[t3] = new Date(e4[t3]);
|
|
25
25
|
} catch (e5) {
|
|
26
|
+
console.error(`日期格式化失败: ${e5}`);
|
|
26
27
|
}
|
|
27
28
|
});
|
|
28
29
|
}), n3.length > 0) {
|
|
@@ -30,70 +31,70 @@ function a(n2, a2) {
|
|
|
30
31
|
n3.forEach((t3) => {
|
|
31
32
|
e4.push(function(e5, t4) {
|
|
32
33
|
return new Promise((n4, a5) => {
|
|
33
|
-
const
|
|
34
|
-
|
|
34
|
+
const s3 = e5.field.split("."), r4 = [];
|
|
35
|
+
s3.length < 2 && n4([]);
|
|
35
36
|
try {
|
|
36
|
-
|
|
37
|
+
p(s3[1]).then((e6) => {
|
|
37
38
|
t4.forEach((t5, n5) => {
|
|
38
|
-
const a6 = { type:
|
|
39
|
-
a6.value = o(JSON.parse(e6.barcodeModelItems), t5),
|
|
40
|
-
}), n4(
|
|
39
|
+
const a6 = { type: s3[0], name: s3[1], value: null, index: n5 };
|
|
40
|
+
a6.value = o(JSON.parse(e6.barcodeModelItems), t5), r4.push(a6);
|
|
41
|
+
}), n4(r4);
|
|
41
42
|
});
|
|
42
43
|
} catch (e6) {
|
|
43
|
-
n4([]);
|
|
44
|
+
console.error("获取条码规则失败:", e6), n4([]);
|
|
44
45
|
}
|
|
45
46
|
});
|
|
46
|
-
}(t3,
|
|
47
|
+
}(t3, i2));
|
|
47
48
|
}), Promise.all(e4).then((e5) => {
|
|
48
49
|
e5.forEach((e6) => {
|
|
49
50
|
e6.forEach((e7) => {
|
|
50
|
-
const t3 = e7.index, n4 =
|
|
51
|
+
const t3 = e7.index, n4 = i2[t3];
|
|
51
52
|
n4[e7.type] || (n4[e7.type] = {}), n4[e7.type][e7.name] = e7.value;
|
|
52
53
|
});
|
|
53
|
-
}), a4.print(
|
|
54
|
+
}), a4.print(i2, s2, r3);
|
|
54
55
|
});
|
|
55
|
-
} else a4.print(
|
|
56
|
-
}(n2, f,
|
|
56
|
+
} else a4.print(i2, s2, r3);
|
|
57
|
+
}(n2, f, r2, i, c, l) : "form" === n2.pageContext.pageType && s(n2, r2, i, c, l) : s(n2, r2, i, c, l);
|
|
57
58
|
});
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
+
function s(e2, t2, n2, a2, s2) {
|
|
60
61
|
if (t2.length > 0) {
|
|
61
|
-
const
|
|
62
|
+
const r2 = [];
|
|
62
63
|
t2.forEach((t3) => {
|
|
63
|
-
|
|
64
|
+
r2.push(function(e3, t4) {
|
|
64
65
|
return new Promise((n3, a3) => {
|
|
65
|
-
const
|
|
66
|
-
|
|
66
|
+
const s3 = t4.field.split("."), r3 = { type: null, name: null, value: null };
|
|
67
|
+
s3.length < 2 && n3(r3), r3.type = s3[0], r3.name = s3[1];
|
|
67
68
|
try {
|
|
68
|
-
|
|
69
|
+
p(r3.name).then((t5) => {
|
|
69
70
|
const a4 = JSON.parse(t5.barcodeModelItems);
|
|
70
|
-
|
|
71
|
+
r3.value = o(a4, e3.entity.data), n3(r3);
|
|
71
72
|
});
|
|
72
73
|
} catch (e4) {
|
|
73
|
-
n3(
|
|
74
|
+
console.error("获取条码规则失败:", e4), n3(r3);
|
|
74
75
|
}
|
|
75
76
|
});
|
|
76
77
|
}(e2.pageContext, t3));
|
|
77
|
-
}), Promise.all(
|
|
78
|
+
}), Promise.all(r2).then((t3) => {
|
|
78
79
|
const o2 = {};
|
|
79
80
|
t3.forEach((e3) => {
|
|
80
81
|
e3.type && e3.name && e3.value && (o2[e3.type] || (o2[e3.type] = {}), o2[e3.type][e3.name] = e3.value);
|
|
81
82
|
});
|
|
82
|
-
const
|
|
83
|
-
Object.assign(
|
|
83
|
+
const p2 = { table: {} };
|
|
84
|
+
Object.assign(p2, e2.pageContext.entity, o2), p2.table = e2.pageContext.entity.data, n2.print(p2, a2, s2);
|
|
84
85
|
});
|
|
85
86
|
} else {
|
|
86
87
|
const t3 = { table: {} };
|
|
87
|
-
Object.assign(t3, e2.pageContext.entity), t3.table = e2.pageContext.entity.data, n2.print(t3, a2,
|
|
88
|
+
Object.assign(t3, e2.pageContext.entity), t3.table = e2.pageContext.entity.data, n2.print(t3, a2, s2);
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
|
-
function
|
|
91
|
+
function p(t2) {
|
|
91
92
|
const n2 = encodeURIComponent(t2);
|
|
92
93
|
return e.get(window.$vueApp.config.globalProperties.baseAPI + `/component/setting-barcode-models/by-name?name=${n2}`);
|
|
93
94
|
}
|
|
94
95
|
n();
|
|
95
|
-
const
|
|
96
|
+
const r = { printLabel: a };
|
|
96
97
|
export {
|
|
97
|
-
|
|
98
|
+
r as default,
|
|
98
99
|
a as printLabel
|
|
99
100
|
};
|