super-page-runtime 2.3.44 → 2.3.45
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/events/standard-event.js +1 -1
- package/dist/es/components/runtime/utils/page-helper-util.js +1 -1
- package/dist/es/components/runtime/utils/page-init-util.d.ts +7 -1
- package/dist/es/components/runtime/utils/page-init-util.js +73 -55
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +5 -3
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +58 -53
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +19 -16
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +167 -167
- package/dist/es/style.css +76 -76
- package/package.json +2 -2
|
@@ -1162,7 +1162,7 @@ function $e(e2) {
|
|
|
1162
1162
|
function qe(e2, n2, o2) {
|
|
1163
1163
|
e2.lastFileTask && !e2.noticeComponent ? e2.noticeComponent = d({ title: l().t("superPageRuntimeMessage.logTip"), duration: 0, position: "top-right", type: "success", onClose() {
|
|
1164
1164
|
"Success" === e2.lastFileTask.taskState || "Fail" === e2.lastFileTask.taskState || "PartSuccess" === e2.lastFileTask.taskState ? Je(n2, o2, e2.lastFileTask.id, e2) : (e2.noticeComponent = null, null == e2.noticeInterval && He(e2, n2, o2));
|
|
1165
|
-
}, message:
|
|
1165
|
+
}, message: F(V, { isShow: true, backendUrl: n2, lastFileTask: e2.lastFileTask, onClickMsg(s2) {
|
|
1166
1166
|
s2.serverPath ? function(e3, n3, o3, s3, i2, a2) {
|
|
1167
1167
|
Je(i2, a2, o3, s3);
|
|
1168
1168
|
const r2 = f(), c2 = t(i2), l2 = c2 + "/common/super-form/downloads?jwt=" + r2 + "&showName=" + encodeURI(e3) + "&serverPath=" + n3;
|
|
@@ -190,7 +190,7 @@ function setVariableValue(t, e, o) {
|
|
|
190
190
|
let n = t;
|
|
191
191
|
for (let t2 = 0; t2 < e.length; t2++) {
|
|
192
192
|
const a = e[t2];
|
|
193
|
-
t2 + 1 === e.length ? n[a] =
|
|
193
|
+
t2 + 1 === e.length ? void 0 === o ? n[a] = null : Array.isArray(n[a]) && Array.isArray(o) ? n[a].splice(0, n[a].length, ...o) : n[a] = o : (void 0 === n[a] && (n[a] = {}), n = n[a]);
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
function setVariableValueWithProp(t, e, o) {
|
|
@@ -22,8 +22,14 @@ export declare function convertToPageContext(pageDesign: PageDesign): PageContex
|
|
|
22
22
|
* 获取请求对象的值
|
|
23
23
|
*/
|
|
24
24
|
export declare function packageAdditionalMapWithLocationSearch(requestObj: any): any;
|
|
25
|
-
export declare function packageAdditionalMapWithPageRequest(pageRequest:
|
|
25
|
+
export declare function packageAdditionalMapWithPageRequest(pageRequest: any, requestObj: any, isDialog: boolean): void;
|
|
26
26
|
export declare function packageAdditionalMapWithRoute(route: any, requestObj: any): void;
|
|
27
|
+
/**
|
|
28
|
+
* 维护paramStoreId注册表。
|
|
29
|
+
* 登记paramStoreId键名并设置上限数量,防止 sessionStorage 无限增长。
|
|
30
|
+
* @param paramStoreId 当前页面自身的 paramStoreId
|
|
31
|
+
*/
|
|
32
|
+
export declare function registerParamStoreId(paramStoreId: string | null | undefined): void;
|
|
27
33
|
export declare function getModelFields(formItemConfigure: any, prop?: string): string[];
|
|
28
34
|
/**
|
|
29
35
|
* 获取表单元素模型名称
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "agilebuilder-ui/src/utils/request";
|
|
2
2
|
import { getAdditionalParamMap as t } from "./events/standard-event.js";
|
|
3
3
|
import { PageDimensions as n } from "./interfaces/page-design-types.js";
|
|
4
|
-
import { getFormPropName as i, getVariableValue as
|
|
4
|
+
import { getFormPropName as i, getVariableValue as r, formatVariableValue as s, setVariableValue as o } from "./page-helper-util.js";
|
|
5
5
|
import { getSessionCache as a } from "agilebuilder-ui/src/utils/auth";
|
|
6
6
|
import { functions as l } from "./api/page-expose-util.js";
|
|
7
7
|
import { isWorkflowPage as u, deepCopy as p } from "./common-util.js";
|
|
@@ -24,8 +24,8 @@ function m(t2) {
|
|
|
24
24
|
}
|
|
25
25
|
function f(e2, t2) {
|
|
26
26
|
return new Promise((n2, i2) => {
|
|
27
|
-
e2 ? b().then((
|
|
28
|
-
|
|
27
|
+
e2 ? b().then((r2) => {
|
|
28
|
+
r2 && (e2.systemParam = h(r2)), e2.tableRuntimes && Object.keys(e2.tableRuntimes).length > 0 ? R(e2, t2, e2.systemVersion).then((t3) => {
|
|
29
29
|
e2.contextParam = h(t3.contextParam), e2.branchFieldAuth = t3.branchFieldAuth, e2.isWorkflowEntity = t3.isWorkflowEntity, e2.dataTypeMaps = t3.dataTypeMaps, e2.superGridItems = t3.superGrids, n2(e2);
|
|
30
30
|
}).catch((e3) => {
|
|
31
31
|
i2(e3);
|
|
@@ -114,19 +114,20 @@ function P(e2) {
|
|
|
114
114
|
}
|
|
115
115
|
e2._t_;
|
|
116
116
|
}
|
|
117
|
-
function E(e2, t2) {
|
|
117
|
+
function E(e2, t2, n2) {
|
|
118
118
|
if (e2) {
|
|
119
119
|
Object.assign(t2, e2);
|
|
120
|
-
|
|
120
|
+
const i2 = e2.paramStoreId;
|
|
121
|
+
n2 && (e2.dialogParamStoreId = i2), A(i2, t2), delete e2.paramStoreId, e2.jumpMode && (t2.jumpMode = e2.jumpMode);
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
124
|
function v(e2, t2) {
|
|
124
125
|
if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query, e2.query)) {
|
|
125
126
|
Object.assign(t2, e2.query);
|
|
126
|
-
|
|
127
|
+
A(e2.query.paramStoreId, t2);
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
|
-
function
|
|
130
|
+
function A(e2, t2) {
|
|
130
131
|
if (e2) {
|
|
131
132
|
const n2 = a(e2);
|
|
132
133
|
if (n2) {
|
|
@@ -135,30 +136,46 @@ function C(e2, t2) {
|
|
|
135
136
|
}
|
|
136
137
|
}
|
|
137
138
|
}
|
|
139
|
+
const C = "__paramStoreIdRegistry__";
|
|
140
|
+
function I(e2) {
|
|
141
|
+
if (!e2) return;
|
|
142
|
+
let t2 = [];
|
|
143
|
+
try {
|
|
144
|
+
const e3 = sessionStorage.getItem(C);
|
|
145
|
+
t2 = e3 ? JSON.parse(e3) : [];
|
|
146
|
+
} catch (e3) {
|
|
147
|
+
t2 = [];
|
|
148
|
+
}
|
|
149
|
+
for (Array.isArray(t2) || (t2 = []), t2 = t2.filter((t3) => t3 !== e2), t2.push(e2); t2.length > 20; ) {
|
|
150
|
+
const n2 = t2.shift();
|
|
151
|
+
n2 && n2 !== e2 && sessionStorage.removeItem(n2);
|
|
152
|
+
}
|
|
153
|
+
sessionStorage.setItem(C, JSON.stringify(t2));
|
|
154
|
+
}
|
|
138
155
|
function k(e2, t2) {
|
|
139
156
|
let n2, i2 = t2;
|
|
140
157
|
t2 || (n2 = e2.props.base ? e2.props.base : {}, i2 = n2.prop);
|
|
141
|
-
let
|
|
142
|
-
return t2 && !t2.startsWith("${") ?
|
|
158
|
+
let r2 = null;
|
|
159
|
+
return t2 && !t2.startsWith("${") ? r2 = ["data", t2] : !e2 || i2 && i2.startsWith("${") ? i2.startsWith("${") ? (i2 = i2.substring(2, i2.length - 1), r2 = i2.split("."), e2 && r2.length < 2 && (r2 = [e2.uuid])) : e2 && (r2 = ["page", e2.uuid]) : r2 = ["page", e2.uuid], r2 || e2 ? r2 : ["temp"];
|
|
143
160
|
}
|
|
144
|
-
function
|
|
161
|
+
function M(e2, t2, n2) {
|
|
145
162
|
var _a, _b;
|
|
146
|
-
const i2 = k(t2, n2),
|
|
147
|
-
if (null ==
|
|
148
|
-
let n3,
|
|
149
|
-
t2 && (n3 = t2.props.base ? t2.props.base : {},
|
|
150
|
-
const l2 =
|
|
163
|
+
const i2 = k(t2, n2), s2 = e2.entity;
|
|
164
|
+
if (null == s2.data.ID && null == s2.data.id) {
|
|
165
|
+
let n3, o2, a2 = false;
|
|
166
|
+
t2 && (n3 = t2.props.base ? t2.props.base : {}, o2 = t2.name, a2 = n3.multiple);
|
|
167
|
+
const l2 = r(s2, i2);
|
|
151
168
|
if (null == l2) {
|
|
152
|
-
const
|
|
153
|
-
if (
|
|
154
|
-
const t3 =
|
|
155
|
-
if (
|
|
169
|
+
const r2 = n3 ? n3.defaultValue : null, l3 = Boolean((_a = t2 == null ? void 0 : t2.runtime) == null ? void 0 : _a.arrayValue);
|
|
170
|
+
if (r2) try {
|
|
171
|
+
const t3 = O(e2, r2, o2, a2);
|
|
172
|
+
if (j(t3)) S(s2, i2, t3, l3);
|
|
156
173
|
else if (((_b = n3.moreDefaultValue) == null ? void 0 : _b.length) > 0) {
|
|
157
174
|
const t4 = n3.moreDefaultValue;
|
|
158
175
|
for (let n4 = 0; n4 < t4.length; n4++) {
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
161
|
-
|
|
176
|
+
const r3 = O(e2, t4[n4], o2, a2);
|
|
177
|
+
if (j(r3)) {
|
|
178
|
+
S(s2, i2, r3, l3);
|
|
162
179
|
break;
|
|
163
180
|
}
|
|
164
181
|
}
|
|
@@ -170,66 +187,66 @@ function A(e2, t2, n2) {
|
|
|
170
187
|
}
|
|
171
188
|
return i2;
|
|
172
189
|
}
|
|
173
|
-
function
|
|
190
|
+
function j(e2) {
|
|
174
191
|
return null != e2 && "" !== e2;
|
|
175
192
|
}
|
|
176
|
-
function
|
|
177
|
-
!Array.isArray(n2) || i2 ?
|
|
193
|
+
function S(e2, t2, n2, i2) {
|
|
194
|
+
!Array.isArray(n2) || i2 ? o(e2, t2, n2) : o(e2, t2, n2.join(","));
|
|
178
195
|
}
|
|
179
|
-
function
|
|
180
|
-
let
|
|
181
|
-
if (t2 && (
|
|
196
|
+
function O(e2, t2, n2, i2) {
|
|
197
|
+
let r2;
|
|
198
|
+
if (t2 && (r2 = s(e2, t2), null != r2 && null != r2 && n2)) {
|
|
182
199
|
let e3 = false;
|
|
183
|
-
"checkbox" == n2 ? e3 = true : "select" == n2 && (e3 = i2), e3 && (
|
|
200
|
+
"checkbox" == n2 ? e3 = true : "select" == n2 && (e3 = i2), e3 && (r2 = (r2 + "").split(","));
|
|
184
201
|
}
|
|
185
|
-
return
|
|
202
|
+
return r2;
|
|
186
203
|
}
|
|
187
204
|
function T(e2, t2) {
|
|
188
205
|
var _a, _b;
|
|
189
206
|
if (false === ((_b = (_a = e2.props) == null ? void 0 : _a.base) == null ? void 0 : _b.isPermission)) return "true";
|
|
190
207
|
const n2 = [];
|
|
191
208
|
if (e2.functionCodes && e2.functionCodes.length > 0) {
|
|
192
|
-
const i2 = e2.sourceTypes ? e2.sourceTypes : [],
|
|
193
|
-
for (let e3 = 0; e3 <
|
|
194
|
-
const
|
|
209
|
+
const i2 = e2.sourceTypes ? e2.sourceTypes : [], r2 = e2.functionCodes;
|
|
210
|
+
for (let e3 = 0; e3 < r2.length; e3++) {
|
|
211
|
+
const s2 = r2[e3], o2 = e3 < i2.length ? i2[e3] : "";
|
|
195
212
|
let a2 = "";
|
|
196
|
-
if ("service" ==
|
|
197
|
-
else if ("standard" ===
|
|
213
|
+
if ("service" == o2) a2 = s2;
|
|
214
|
+
else if ("standard" === o2) a2 = t2.code + "." + s2;
|
|
198
215
|
else {
|
|
199
|
-
a2 = "custom" ===
|
|
216
|
+
a2 = "custom" === _(s2, t2).type ? s2 : t2.code + "." + s2;
|
|
200
217
|
}
|
|
201
218
|
n2.includes(a2) || n2.push(a2);
|
|
202
219
|
}
|
|
203
220
|
} else if (e2.autoPermissions) for (const i2 of e2.autoPermissions) n2.push(t2.code + "." + i2.simpleCode);
|
|
204
221
|
return n2.join(",");
|
|
205
222
|
}
|
|
206
|
-
function
|
|
223
|
+
function _(e2, t2) {
|
|
207
224
|
const n2 = t2.pagePermissions;
|
|
208
225
|
if (n2 && n2.length > 0) {
|
|
209
226
|
for (let t3 = 0; t3 < n2.length; t3++) if (n2[t3].simpleCode === e2) return n2[t3];
|
|
210
227
|
}
|
|
211
228
|
return null;
|
|
212
229
|
}
|
|
213
|
-
function
|
|
214
|
-
const
|
|
230
|
+
function R(n2, i2, r2) {
|
|
231
|
+
const s2 = n2.tableRuntimes, o2 = t(i2);
|
|
215
232
|
let a2;
|
|
216
233
|
const l2 = n2.code;
|
|
217
|
-
return
|
|
234
|
+
return o2 && Object.keys(o2) > 0 && (a2 = JSON.stringify(o2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes: s2, additionalParamMapJson: a2, pageCode: l2, publishVersion: r2, pageType: n2.pageType });
|
|
218
235
|
}
|
|
219
|
-
const
|
|
220
|
-
function
|
|
236
|
+
const x = ["button-detail", "print-label"];
|
|
237
|
+
function F(e2, t2, n2) {
|
|
221
238
|
var _a, _b;
|
|
222
|
-
const
|
|
223
|
-
let
|
|
224
|
-
if (
|
|
239
|
+
const r2 = t2.props && t2.props.base ? t2.props.base.prop : null, s2 = u(e2);
|
|
240
|
+
let o2 = false;
|
|
241
|
+
if (s2 && x.indexOf(t2.name) < 0 && e2.fieldPermissionMap) {
|
|
225
242
|
const n3 = e2.fieldPermissionMap.get("all_fields");
|
|
226
|
-
false === (n3 == null ? void 0 : n3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled",
|
|
243
|
+
false === (n3 == null ? void 0 : n3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", o2 = true);
|
|
227
244
|
}
|
|
228
|
-
if (
|
|
229
|
-
const a2 = i(
|
|
245
|
+
if (r2) {
|
|
246
|
+
const a2 = i(r2);
|
|
230
247
|
if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[a2] || (e2.rules[a2] = []), t2.props.rules.forEach((e3) => {
|
|
231
248
|
d(e3), !n2 && e3 && e3.required && (e3.required = false);
|
|
232
|
-
}), e2.rules[a2] = t2.props.rules),
|
|
249
|
+
}), e2.rules[a2] = t2.props.rules), s2 && !o2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
|
|
233
250
|
const i2 = e2.fieldPermissionMap.get(a2);
|
|
234
251
|
if (!n2 && e2.workflowRules && (e2.workflowRules[a2] || e2.workflowRules.rules && e2.workflowRules.rules[a2])) {
|
|
235
252
|
let t3 = e2.workflowRules[a2];
|
|
@@ -247,7 +264,7 @@ function R(e2, t2, n2) {
|
|
|
247
264
|
((_b = t2.props) == null ? void 0 : _b.customRuleEvents) && (e2.customRuleEvents || (e2.customRuleEvents = []), e2.customRuleEvents.push({ prop: a2, events: t2.props.customRuleEvents }));
|
|
248
265
|
}
|
|
249
266
|
}
|
|
250
|
-
function
|
|
267
|
+
function V(e2, t2) {
|
|
251
268
|
if (e2.initInfo) {
|
|
252
269
|
["dynamicControlFormEdit", "disableElement", "enableElement", "hideElement", "showElement"].forEach((n2) => {
|
|
253
270
|
const i2 = e2.initInfo[n2];
|
|
@@ -263,17 +280,18 @@ function _(e2, t2) {
|
|
|
263
280
|
}
|
|
264
281
|
}
|
|
265
282
|
export {
|
|
266
|
-
|
|
283
|
+
V as controlObjectRenderState,
|
|
267
284
|
y as convertToPageContext,
|
|
268
|
-
|
|
269
|
-
|
|
285
|
+
O as getDefaultValue,
|
|
286
|
+
M as getFormModelFields,
|
|
270
287
|
k as getModelFields,
|
|
271
288
|
T as getPermissionCodes,
|
|
272
289
|
P as packageAdditionalMapWithLocationSearch,
|
|
273
290
|
E as packageAdditionalMapWithPageRequest,
|
|
274
291
|
v as packageAdditionalMapWithRoute,
|
|
275
|
-
|
|
292
|
+
F as packageFormRules,
|
|
276
293
|
m as queryPageDesignByCode,
|
|
277
294
|
f as queryPageDesignWhenPreview,
|
|
278
|
-
|
|
295
|
+
R as queryPageSuperGrids,
|
|
296
|
+
I as registerParamStoreId
|
|
279
297
|
};
|
|
@@ -120,8 +120,8 @@ const B = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
120
120
|
}
|
|
121
121
|
n(() => {
|
|
122
122
|
const e3 = z.uuid, t2 = j.subTableWatchProps;
|
|
123
|
-
I.$on("_refreshSubTable_" + e3, (
|
|
124
|
-
const o2 =
|
|
123
|
+
I.$on("_refreshSubTable_" + e3, (n3) => {
|
|
124
|
+
const o2 = n3.propName;
|
|
125
125
|
if (t2 && t2[e3] && t2[e3].length > 0) {
|
|
126
126
|
t2[e3].indexOf(o2) >= 0 && re();
|
|
127
127
|
}
|
|
@@ -137,7 +137,9 @@ const B = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
137
137
|
ae.value.pickFileDone(e4);
|
|
138
138
|
}), I.$on(G + "-scanDone", (e4) => {
|
|
139
139
|
ae.value.scanDone(e4);
|
|
140
|
-
})
|
|
140
|
+
});
|
|
141
|
+
const n2 = z.props ? z.props.dataOrigin : {};
|
|
142
|
+
le.value && le.value.configureObj.props.base && le.value.configureObj.props.base.isSafeDelete && ie("setSafeDeleteTableCode", n2.tableName);
|
|
141
143
|
}), o(() => {
|
|
142
144
|
de && clearTimeout(de), fe && clearTimeout(fe);
|
|
143
145
|
const e3 = z.uuid;
|
package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as
|
|
1
|
+
import { defineComponent as e, ref as t, watch as l, onMounted as o, nextTick as a, onUnmounted as i, resolveComponent as n, createBlock as u, createCommentVNode as r, openBlock as p, normalizeStyle as s, normalizeClass as f, unref as d, createSlots as m, withCtx as c, createElementVNode as v, toDisplayString as g } from "vue";
|
|
2
2
|
import { getVariableValue as h, setVariableValue as y } from "../../../../utils/page-helper-util.js";
|
|
3
3
|
import { handleAfterInitEvent as C, fileUploadBeforeUpload as w, fileUploadBeforeDelete as b, fileUploadUploaded as x, fileUploadDeleted as k } from "../../../../utils/events/event-util.js";
|
|
4
4
|
import I from "agilebuilder-ui/src/utils/request";
|
|
@@ -10,38 +10,41 @@ import { getRelativeBaseUrl as D } from "agilebuilder-ui/src/utils/common-util";
|
|
|
10
10
|
import { getDefaultValue as T } from "../../../../utils/page-init-util.js";
|
|
11
11
|
const _ = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: _2 }) {
|
|
12
12
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
13
|
-
const z = e2, R =
|
|
14
|
-
let G =
|
|
15
|
-
G.value.isShowWatermark = void 0 === ((_b = (_a = z.configure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_c = z.configure.props) == null ? void 0 : _c.watermark.isShowWatermark) + "", G.value.content = ((_e = (_d = z.configure.props) == null ? void 0 : _d.watermark) == null ? void 0 : _e.content) ? (_g = (_f = z.configure.props) == null ? void 0 : _f.watermark) == null ? void 0 : _g.content : ""
|
|
16
|
-
|
|
13
|
+
const z = e2, R = t(null), F = z.configure.runtime ? z.configure.runtime : {}, O = t(F.props ? F.props : {}), q = F.style, W = F.class, V = F.headerStyle, $ = F.titleExceedStyle, A = z.pageContext.entity ? z.pageContext.entity : {}, E = z.configure.props.base ? z.configure.props.base : {}, U = ee(E.prop), B = ee(E.propName);
|
|
14
|
+
let G = t({});
|
|
15
|
+
G.value.isShowWatermark = void 0 === ((_b = (_a = z.configure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_c = z.configure.props) == null ? void 0 : _c.watermark.isShowWatermark) + "", G.value.content = ((_e = (_d = z.configure.props) == null ? void 0 : _d.watermark) == null ? void 0 : _e.content) ? (_g = (_f = z.configure.props) == null ? void 0 : _f.watermark) == null ? void 0 : _g.content : "";
|
|
16
|
+
let H = false;
|
|
17
|
+
U && U.length > 1 && l(() => z.pageContext.entity[U[0]][U[1]], (e3) => {
|
|
18
|
+
if (H) return;
|
|
19
|
+
Z(h(A, U));
|
|
17
20
|
});
|
|
18
|
-
const
|
|
19
|
-
function
|
|
21
|
+
const J = z.pageContext.code, K = t(U ? J + "__" + U.join("__") : null), L = h(A, U), M = t(null), Q = t(false), X = t([]), Y = t({});
|
|
22
|
+
function Z(e3) {
|
|
20
23
|
if (e3) {
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
24
|
+
const t2 = e3.split(",");
|
|
25
|
+
if (t2.length > 0) {
|
|
23
26
|
const e4 = D(window.$vueApp.config.globalProperties.baseAPI) + "/component/fs-upload/search-file-metadata";
|
|
24
|
-
I.post(e4,
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
+
I.post(e4, t2).then((e5) => {
|
|
28
|
+
X.value = [];
|
|
29
|
+
const l2 = [], o2 = {};
|
|
27
30
|
e5.forEach((e6) => {
|
|
28
31
|
o2[e6.uuid] = e6;
|
|
29
32
|
});
|
|
30
|
-
for (let e6 = 0; e6 <
|
|
31
|
-
const a2 =
|
|
32
|
-
|
|
33
|
+
for (let e6 = 0; e6 < t2.length; e6++) {
|
|
34
|
+
const a2 = t2[e6];
|
|
35
|
+
l2.push(o2[a2].fileName), X.value.push({ showName: o2[a2].fileName, serverPath: a2, fileSize: o2[a2].fileSize });
|
|
33
36
|
}
|
|
34
|
-
"input" === O.value.displayType && (
|
|
37
|
+
"input" === O.value.displayType && (Y.value.showName = l2.join(","), Y.value.serverPath = t2.join(","));
|
|
35
38
|
}).finally(() => {
|
|
36
|
-
|
|
39
|
+
Q.value = true;
|
|
37
40
|
});
|
|
38
|
-
} else
|
|
39
|
-
} else
|
|
41
|
+
} else Q.value = true;
|
|
42
|
+
} else X.value = [], Y.value = {}, Q.value = true;
|
|
40
43
|
}
|
|
41
|
-
function
|
|
44
|
+
function ee(e3) {
|
|
42
45
|
return e3 ? (e3.startsWith("${") && (e3 = e3.substring(2, e3.length - 1)), e3.split(".")) : [];
|
|
43
46
|
}
|
|
44
|
-
function
|
|
47
|
+
function te(e3) {
|
|
45
48
|
z.pageContext.fileuploadInfo || (z.pageContext.fileuploadInfo = []);
|
|
46
49
|
return -1 === z.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === z.configure.uuid) && z.pageContext.fileuploadInfo.push({ uuid: z.configure.uuid, label: S(O.value.title) }), e3.pageContext || (e3.pageContext = z.pageContext), e3.configure || (e3.configureObj = z.configure), w(e3);
|
|
47
50
|
}
|
|
@@ -52,57 +55,59 @@ const _ = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure:
|
|
|
52
55
|
}
|
|
53
56
|
z.pageContext.fileuploadInfo;
|
|
54
57
|
}
|
|
55
|
-
function
|
|
58
|
+
function oe(e3) {
|
|
56
59
|
le();
|
|
57
60
|
}
|
|
58
|
-
function
|
|
61
|
+
function ae(e3) {
|
|
59
62
|
return b(z.pageContext, z.configure, e3);
|
|
60
63
|
}
|
|
61
|
-
|
|
62
|
-
const
|
|
64
|
+
Z(L);
|
|
65
|
+
const ie = (e3, t2, l2) => {
|
|
63
66
|
var o2;
|
|
64
|
-
le(),
|
|
65
|
-
},
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
const e3 = [],
|
|
70
|
-
if (O.value.limit &&
|
|
71
|
-
const e4 =
|
|
72
|
-
for (let
|
|
67
|
+
le(), ue(), o2 = { response: e3, uploadFile: t2, uploadFiles: l2 }, x(z.pageContext, z.configure, o2);
|
|
68
|
+
}, ne = (e3) => {
|
|
69
|
+
var t2;
|
|
70
|
+
ue(), t2 = { file: e3 }, k(z.pageContext, z.configure, t2);
|
|
71
|
+
}, ue = () => {
|
|
72
|
+
const e3 = [], t2 = [];
|
|
73
|
+
if (O.value.limit && X.value.length > O.value.limit) {
|
|
74
|
+
const e4 = X.value.length - O.value.limit;
|
|
75
|
+
for (let t3 = 0; t3 < e4; t3++) X.value.shift();
|
|
73
76
|
}
|
|
74
|
-
for (let
|
|
75
|
-
y(z.pageContext.entity, U,
|
|
76
|
-
|
|
77
|
+
for (let l2 = 0; l2 < X.value.length; l2++) e3.push(X.value[l2].showName), t2.push(X.value[l2].serverPath);
|
|
78
|
+
H = true, y(z.pageContext.entity, U, t2.join(",")), y(z.pageContext.entity, B, e3.join(",")), a(() => {
|
|
79
|
+
H = false;
|
|
80
|
+
}), t2.length > 0 && (R.value = "");
|
|
81
|
+
}, re = t(null), pe = t(null);
|
|
77
82
|
return o(() => {
|
|
78
|
-
N.$on(
|
|
79
|
-
|
|
83
|
+
N.$on(K.value + "-pickFileDone", (e3) => {
|
|
84
|
+
K.value, M.value.pickFileDone(e3);
|
|
80
85
|
}), a(() => {
|
|
81
|
-
const e3 = (e4,
|
|
82
|
-
if (!
|
|
83
|
-
const o2 = [
|
|
84
|
-
for (const
|
|
85
|
-
const
|
|
86
|
-
if (null !=
|
|
87
|
-
y(z.pageContext.entity, e4,
|
|
86
|
+
const e3 = (e4, t3, l3) => {
|
|
87
|
+
if (!t3) return;
|
|
88
|
+
const o2 = [t3, ...l3 || []];
|
|
89
|
+
for (const t4 of o2) try {
|
|
90
|
+
const l4 = T(z.pageContext, t4, "", false);
|
|
91
|
+
if (null != l4 && "" !== l4) {
|
|
92
|
+
y(z.pageContext.entity, e4, l4);
|
|
88
93
|
break;
|
|
89
94
|
}
|
|
90
|
-
} catch (
|
|
91
|
-
console.error("设置默认值出错:", e4,
|
|
95
|
+
} catch (t5) {
|
|
96
|
+
console.error("设置默认值出错:", e4, t5);
|
|
92
97
|
break;
|
|
93
98
|
}
|
|
94
99
|
};
|
|
95
100
|
null == A.data.ID && null == A.data.id && (e3(U, E.propDefaultValue, E.morePropDefaultValue), e3(B, E.propNameDefaultValue, E.morePropNameDefaultValue));
|
|
96
|
-
const
|
|
97
|
-
C(
|
|
101
|
+
const t2 = h(A, U), l2 = { showName: h(A, B), serverPath: t2 };
|
|
102
|
+
C(l2, z.pageContext, z.configure, { formItemRef: re.value, componentRef: M.value, titleRef: pe.value, value: l2, entity: z.pageContext.entity.data, pageData: z.pageContext.entity.page });
|
|
98
103
|
});
|
|
99
104
|
}), i(() => {
|
|
100
|
-
N.$off(
|
|
105
|
+
N.$off(K.value + "-pickFileDone");
|
|
101
106
|
}), _2({ addRequiredClass: function() {
|
|
102
107
|
R.value = j();
|
|
103
|
-
} }), (
|
|
108
|
+
} }), (t2, l2) => {
|
|
104
109
|
const o2 = n("el-form-item");
|
|
105
|
-
return O.value.tittleShow ? (p(), u(o2, { key: 0, ref_key: "formItemRef", ref:
|
|
110
|
+
return O.value.tittleShow ? (p(), u(o2, { key: 0, ref_key: "formItemRef", ref: re, required: O.value.required, class: f(d(W) + (R.value ? " " + R.value : "")), "label-width": O.value.labelWidth, style: s(d(q)) }, m({ default: c(() => [Q.value ? (p(), u(d(P), { key: 0, ref_key: "fileUploadRef", ref: M, style: { width: "100%" }, disabled: "disabled" === O.value.state, displayType: O.value.displayType, accept: O.value.accept, multiple: O.value.multiple, placeholder: O.value.placeholder, limit: O.value.limit, "limit-file-size": O.value.limitFileSize, "disabled-no-preview": O.value.disabledNoPreview, "disabled-no-download": O.value.disabledNoDownload, openCameraOrChoosePhoto: O.value.openCameraOrChoosePhoto, "sort-type": O.value.sortType, "file-info": Y.value, "file-list": X.value, "system-code": e2.pageContext.systemCode, componentId: K.value, watermark: d(G), "on-success": ie, "on-remove": ne, "before-upload": te, "on-error": oe, "before-remove": ae, pageContext: e2.pageContext, "file-show-type": O.value.fileShowType }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : r("", true)]), _: 2 }, [O.value.tittleShow ? { name: "label", fn: c(() => [v("div", { ref_key: "titleRef", ref: pe, style: s({ ...d(V), ...d($) }), class: "amb-form-item-label" }, g(d(S)(O.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"])) : Q.value ? (p(), u(d(P), { key: 1, ref_key: "fileUploadRef", ref: M, style: { width: "100%" }, disabled: "disabled" === O.value.state, displayType: O.value.displayType, accept: O.value.accept, multiple: O.value.multiple, placeholder: O.value.placeholder, limit: O.value.limit, "limit-file-size": O.value.limitFileSize, "disabled-no-preview": O.value.disabledNoPreview, "disabled-no-download": O.value.disabledNoDownload, openCameraOrChoosePhoto: O.value.openCameraOrChoosePhoto, "sort-type": O.value.sortType, "file-info": Y.value, "file-list": X.value, "system-code": e2.pageContext.systemCode, componentId: K.value, watermark: d(G), "on-success": ie, "on-remove": ne, "before-upload": te, "on-error": oe, "before-remove": ae, pageContext: e2.pageContext, "file-show-type": O.value.fileShowType }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : r("", true);
|
|
106
111
|
};
|
|
107
112
|
} });
|
|
108
113
|
export {
|
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
import { defineComponent as e, ref as a,
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
if (
|
|
6
|
-
V.value = (
|
|
7
|
-
const e3 = !!
|
|
8
|
-
if (
|
|
1
|
+
import { defineComponent as e, ref as a, onUnmounted as l, resolveComponent as u, createBlock as o, openBlock as t, withCtx as n, createElementBlock as r, createCommentVNode as i } from "vue";
|
|
2
|
+
import d from "./super-page.vue.js";
|
|
3
|
+
const s = ["src"], g = ["src"], v = e({ __name: "super-page-dialog", props: { parentPageContext: {}, parentPageEventParams: {}, jumpPageSetting: {}, isTest: { type: Boolean }, customParams: {} }, emits: ["open", "opened", "close", "closed"], setup(e2, { emit: v2 }) {
|
|
4
|
+
const p = e2, m = v2, c = a(true), P = p.jumpPageSetting ? p.jumpPageSetting : null, f = a(null), h = a(null), w = a(null), b = a(null), C = a(null), j = a(null), y = a({}), I = a(false), k = a(false), O = a("rtl"), S = a(null), _ = a(false), x = a(null), V = a(true), M = a(false), T = a(true), q = a(false);
|
|
5
|
+
if (P) {
|
|
6
|
+
V.value = (P == null ? void 0 : P.alignCenter) ?? true, M.value = (P == null ? void 0 : P.fullscreen) ?? false, _.value = !(!P || void 0 === P._isIframe) && P._isIframe, x.value = P && P._path ? P._path : null, j.value = P && P.dialogType ? P.dialogType : "dialog", I.value = !(!P || !P.draggable) && P.draggable, k.value = !(!P || !P.overflow) && P.overflow, O.value = P && P.showPosition ? P.showPosition : "rtl", h.value = P && P.jumpPageTitle ? P.jumpPageTitle : null, f.value = P && P.jumpPageWidth ? P.jumpPageWidth : "dialog" === j.value ? "calc(100% - 30px)" : "100%", T.value = P == null ? void 0 : P.showDialogModal, false === T.value ? q.value = P == null ? void 0 : P.dialogModalPenetrable : null !== T.value && void 0 !== T.value || true === (P == null ? void 0 : P.dialogModalPenetrable) && (q.value = true, T.value = false), S.value = P && P.jumpPageHeight ? P.jumpPageHeight : null, w.value = P && P.pageCode, b.value = P && P.dataId ? P.dataId : null, C.value = P && P.taskId ? P.taskId : null;
|
|
7
|
+
const e3 = !!P.isNeedId;
|
|
8
|
+
if (p.parentPageEventParams) {
|
|
9
9
|
try {
|
|
10
|
-
const e4 = JSON.parse(JSON.stringify(
|
|
11
|
-
e4.pageContext && delete e4.pageContext, e4.configureObj && delete e4.configureObj, Object.assign(
|
|
10
|
+
const e4 = JSON.parse(JSON.stringify(p.parentPageEventParams));
|
|
11
|
+
e4.pageContext && delete e4.pageContext, e4.configureObj && delete e4.configureObj, Object.assign(y.value, e4);
|
|
12
12
|
} catch (e4) {
|
|
13
13
|
console.error(e4);
|
|
14
14
|
}
|
|
15
|
-
null !==
|
|
15
|
+
null !== b.value && void 0 !== b.value || (b.value = p.parentPageEventParams.id);
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
y.value.parentPageCode = P && P.parentPageCode ? P.parentPageCode : null, y.value.parentPageVersion = P && P.parentPageVersion ? P.parentPageVersion : null, y.value.jumpMode = P ? P.jumpMode : null, y.value.id = b.value, y.value.isNeedId = e3, y.value.taskId = C.value, p.customParams && Object.assign(y.value, p.customParams);
|
|
18
18
|
}
|
|
19
|
-
return (
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
return l(() => {
|
|
20
|
+
var _a;
|
|
21
|
+
((_a = y.value) == null ? void 0 : _a.dialogParamStoreId) && sessionStorage.removeItem(y.value.dialogParamStoreId);
|
|
22
|
+
}), (e3, a2) => {
|
|
23
|
+
const l2 = u("el-drawer"), v3 = u("el-dialog");
|
|
24
|
+
return j.value && "drawer" === j.value ? (t(), o(l2, { key: 0, modelValue: c.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => c.value = e4), title: h.value, direction: O.value, size: f.value, class: "content-drawer amb-super-page-runtime-drawer-view", onOpen: a2[1] || (a2[1] = (e4) => m("open")), onOpened: a2[2] || (a2[2] = (e4) => m("opened")), onClose: a2[3] || (a2[3] = (e4) => m("close")), onClosed: a2[4] || (a2[4] = (e4) => m("closed")) }, { default: n(() => [!_.value && w.value ? (t(), o(d, { key: 0, pageCode: w.value, pageRequest: y.value, isDialog: true }, null, 8, ["pageCode", "pageRequest"])) : _.value ? (t(), r("iframe", { key: 1, src: x.value, class: "amb-super-page-runtime-drawer-iframe", frameborder: "0", marginwidth: "0", marginheight: "0", width: "100%", allowtransparency: "no" }, null, 8, s)) : i("", true)]), _: 1 }, 8, ["modelValue", "title", "direction", "size"])) : (t(), o(v3, { key: 1, "model-value": "", title: h.value, "close-on-click-modal": false, "append-to-body": "", width: f.value, modal: T.value, "modal-penetrable": q.value, fullscreen: M.value, alignCenter: V.value, draggable: I.value, overflow: k.value, class: "amb-super-page-runtime-dialog-view", onOpen: a2[5] || (a2[5] = (a3) => e3.$emit("open")), onOpend: a2[6] || (a2[6] = (a3) => e3.$emit("opend")), onClose: a2[7] || (a2[7] = (e4) => m("close")), onClosed: a2[8] || (a2[8] = (a3) => e3.$emit("closed")) }, { default: n(() => [!_.value && w.value ? (t(), o(d, { key: 0, style: { "min-height": "100px" }, pageCode: w.value, pageRequest: y.value, contentHeight: S.value, isDialog: true }, null, 8, ["pageCode", "pageRequest", "contentHeight"])) : _.value ? (t(), r("iframe", { key: 1, src: x.value, class: "amb-super-page-runtime-dialog-iframe", frameborder: "0", marginwidth: "0", marginheight: "0", width: "100%", allowtransparency: "no" }, null, 8, g)) : i("", true)]), _: 1 }, 8, ["title", "width", "modal", "modal-penetrable", "fullscreen", "alignCenter", "draggable", "overflow"]));
|
|
22
25
|
};
|
|
23
26
|
} });
|
|
24
27
|
export {
|
|
25
|
-
|
|
28
|
+
v as default
|
|
26
29
|
};
|