super-page-designer 2.2.92-sit3 → 2.2.92-sit6
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/design/utils/page-table-util.js +49 -43
- package/dist/es/components/design/views/assemblys/form/common/data-origin.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/common/data-origin.vue2.js +24 -24
- package/dist/es/components/design/views/design/page-event/config.vue2.js +5 -70
- package/dist/es/components/design/views/design/page-event/config.vue3.js +72 -0
- package/dist/es/components/design/views/design/page-event/page-event-content.vue.js +1 -1
- package/dist/es/components/design/views/design/view/view-design-display.vue.js +1 -1
- package/dist/es/style.css +1 -1
- package/package.json +4 -4
- package/dist/es/components/design/views/design/page-event/config.vue.js +0 -7
|
@@ -3,15 +3,16 @@ import { getFormPropName as t } from "./page-helper-util.js";
|
|
|
3
3
|
import { getDesignEvents as r } from "./assemblys-config.js";
|
|
4
4
|
import { addI18nKey as a } from "./page-i18n-util.js";
|
|
5
5
|
import { findDesignItemByUuid as i } from "./common-util.js";
|
|
6
|
-
|
|
6
|
+
import { getComponentOptionConfigsBase as s } from "super-page-runtime";
|
|
7
|
+
function o(t2, r2, a2) {
|
|
7
8
|
let i2 = window.$vueApp.config.globalProperties.baseAPI + "/mms/data-tables/table-columns";
|
|
8
9
|
return i2 += "?systemCode=" + (t2 || ""), i2 += "&publishVersion=" + (r2 || ""), i2 += "&tableName=" + (a2 || ""), e.get(i2);
|
|
9
10
|
}
|
|
10
|
-
function
|
|
11
|
+
function n(t2, r2, a2) {
|
|
11
12
|
const i2 = { systemCode: t2, formVersion: r2, publishVersion: a2 };
|
|
12
13
|
return e.get(window.$vueApp.config.globalProperties.baseAPI + "/mms/list-view-children/forms", i2);
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
+
function p(e2, r2) {
|
|
15
16
|
const i2 = JSON.stringify(e2), s2 = JSON.parse(i2);
|
|
16
17
|
r2.tableRuntimes || (r2.tableRuntimes = {}), r2.tableRuntimes[s2.uuid] = function(e3, r3, i3) {
|
|
17
18
|
var _a;
|
|
@@ -20,8 +21,8 @@ function n(e2, r2) {
|
|
|
20
21
|
var _a2;
|
|
21
22
|
const i4 = [];
|
|
22
23
|
return (_a2 = e4.items) == null ? void 0 : _a2.forEach((e5) => {
|
|
23
|
-
const s4 = { controlName:
|
|
24
|
-
let o4 = { headerName: e5.props.base.name, prop: t(e5.props.base.prop), width: e5.props.base.columnWidth, listColumnSort: e5.props.base.sortable, filterable: e5.props.base.filterable, visible: e5.props.base.visible, exportable: e5.props.base.exportable, total: e5.props.base.total, listColumnFixed: e5.props.base.listColumnFixed, format:
|
|
24
|
+
const s4 = { controlName: c(e5) };
|
|
25
|
+
let o4 = { headerName: e5.props.base.name, prop: t(e5.props.base.prop), width: e5.props.base.columnWidth, listColumnSort: e5.props.base.sortable, filterable: e5.props.base.filterable, visible: e5.props.base.visible, exportable: e5.props.base.exportable, total: e5.props.base.total, listColumnFixed: e5.props.base.listColumnFixed, format: g(e5), valueSet: l(e5), querySettingName: e5.props.base.querySettingName ? e5.props.base.querySettingName : "no", queryMatching: e5.props.base.queryMatching, querySetting: e5.props.querySetting ? JSON.stringify(e5.props.querySetting) : null, editable: e5.props.editLine.editable, defaultValue: e5.props.base.defaultValue, controlName: s4.controlName, controlConfig: b(e5), eventType: S(e5), displayOrder: e5.props.base.displayOrder, fileSet: f(e5), orgTreeSet: d(e5), dynamicColumnJson: C(e5), valueSetOptions: u(e5, r4.systemCode, r4.systemVersion), required: e5.props.verification.required, pattern: e5.props.verification.verifyRegex, checkType: h(e5.props.verification.type), contAlign: e5.props.base ? e5.props.base.alignContent : null, titleAlign: e5.props.base ? e5.props.base.alignTitle : null, i18nKey: e5.props.base.name };
|
|
25
26
|
r4.i18nKeys && a(e5.props.base.name, r4), i4.push(o4);
|
|
26
27
|
}), i4;
|
|
27
28
|
}(e3, r3), o3.groupHeaders = function(e4) {
|
|
@@ -39,7 +40,7 @@ function n(e2, r2) {
|
|
|
39
40
|
e2.runtime = { events: t2, common: r3 };
|
|
40
41
|
} else delete e2.runtime;
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
+
function l(e2, t2) {
|
|
43
44
|
const r2 = e2.props;
|
|
44
45
|
if ("inputNumber" === e2.name) return null;
|
|
45
46
|
if (r2.dataOrigin && r2.dataOrigin.optionValueSetType && "none" !== r2.dataOrigin.optionValueSetType) {
|
|
@@ -53,25 +54,30 @@ function p(e2, t2) {
|
|
|
53
54
|
if ("service" === e3) return `${e3}:${r2.dataOrigin.serveName}`;
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
|
-
function
|
|
57
|
-
const
|
|
57
|
+
function u(e2, t2, r2) {
|
|
58
|
+
const a2 = e2.props;
|
|
58
59
|
if ("inputNumber" === e2.name) {
|
|
59
|
-
const e3 = { step:
|
|
60
|
-
return e3.min =
|
|
60
|
+
const e3 = { step: a2.base.step, precision: a2.base.precision };
|
|
61
|
+
return e3.min = a2.base.min || 0 === a2.base.min ? a2.base.min : null, e3.max = a2.base.max || 0 === a2.base.max ? a2.base.max : null, JSON.stringify(e3);
|
|
61
62
|
}
|
|
62
|
-
if ("switch" === e2.name) return JSON.stringify({ activeText:
|
|
63
|
-
if (
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}), JSON.stringify({ dynamicDataSourceCode: t2.dataOrigin.dynamicDataSourceCode, valueSetOptions: e3 });
|
|
63
|
+
if ("switch" === e2.name) return JSON.stringify({ activeText: a2.base.activeText, activeValue: a2.base.activeValue, inactiveText: a2.base.inactiveText, inactiveValue: a2.base.inactiveValue, offColor: a2.base.offColor, onColor: a2.base.onColor });
|
|
64
|
+
if (a2.dataOrigin && a2.dataOrigin.optionValueSetType) {
|
|
65
|
+
const i2 = a2.dataOrigin.optionValueSetType, o2 = a2.dataOrigin;
|
|
66
|
+
if ("dynamicData" === i2) return JSON.stringify({ type: "dynamicData", dynamicDataSourceCode: o2.dynamicDataSourceCode, filterType: o2.filterType, valueSetOptions: m(o2), valueLabelSwitch: !!o2.valueLabelSwitch });
|
|
67
|
+
{
|
|
68
|
+
const a3 = s(e2, t2, r2);
|
|
69
|
+
return a3 ? (a3.valueSetOptions = m(o2), JSON.stringify(a3)) : null;
|
|
70
70
|
}
|
|
71
|
-
return null;
|
|
72
71
|
}
|
|
73
72
|
}
|
|
74
|
-
function
|
|
73
|
+
function m(e2) {
|
|
74
|
+
const t2 = [];
|
|
75
|
+
return e2.autoSets.forEach((e3) => {
|
|
76
|
+
const r2 = y(e3.target);
|
|
77
|
+
t2.push({ columnName: y(e3.source), valueField: r2, valueColumn: { name: r2, dbColumnName: r2.toUpperCase() } });
|
|
78
|
+
}), t2;
|
|
79
|
+
}
|
|
80
|
+
function c(e2) {
|
|
75
81
|
if (!e2.name) return null;
|
|
76
82
|
switch (e2.name) {
|
|
77
83
|
case "input-text":
|
|
@@ -138,24 +144,24 @@ function u(e2) {
|
|
|
138
144
|
return "custom:" + e2.props.base.customComponent;
|
|
139
145
|
}
|
|
140
146
|
}
|
|
141
|
-
function
|
|
147
|
+
function d(e2) {
|
|
142
148
|
if ("dept-tree" === e2.name) {
|
|
143
149
|
const t2 = [];
|
|
144
150
|
return e2.props.base.otherFieldSets && e2.props.base.otherFieldSets.length > 0 && e2.props.base.otherFieldSets.forEach((e3) => {
|
|
145
|
-
t2.push({ type: e3.source, model:
|
|
151
|
+
t2.push({ type: e3.source, model: y(e3.target) });
|
|
146
152
|
}), JSON.stringify({ orgTreeSetArr: t2 });
|
|
147
153
|
}
|
|
148
154
|
return null;
|
|
149
155
|
}
|
|
150
|
-
function
|
|
156
|
+
function f(e2) {
|
|
151
157
|
if ("file-upload" === e2.name) {
|
|
152
|
-
const t2 =
|
|
158
|
+
const t2 = y(e2.props.base.prop), r2 = y(e2.props.format ? e2.props.format.fileUuid : null);
|
|
153
159
|
let a2 = {};
|
|
154
160
|
return t2 && (a2.showNameData = { name: t2, dbName: t2.toUpperCase() }), r2 && (a2.serverNameData = { name: r2, dbName: r2.toUpperCase() }), e2.props.uploadConfig && (e2.props.uploadConfig.multiple ? a2.multiple = true : a2.multiple = false, e2.props.uploadConfig.accept ? a2.accept = e2.props.uploadConfig.accept : a2.accept = null, e2.props.uploadConfig.limitFileSize ? a2.limitFileSize = e2.props.uploadConfig.limitFileSize : a2.limitFileSize = null, e2.props.uploadConfig.openCameraOrChoosePhoto ? a2.openCameraOrChoosePhoto = e2.props.uploadConfig.openCameraOrChoosePhoto : a2.openCameraOrChoosePhoto = null), JSON.stringify(a2);
|
|
155
161
|
}
|
|
156
162
|
return null;
|
|
157
163
|
}
|
|
158
|
-
function
|
|
164
|
+
function b(e2) {
|
|
159
165
|
var _a, _b, _c, _d, _e, _f;
|
|
160
166
|
let t2 = {};
|
|
161
167
|
if ("select" === e2.name) {
|
|
@@ -168,7 +174,7 @@ function d(e2) {
|
|
|
168
174
|
} else "custom" === e2.name ? t2.parameter = e2.props.parameter : "datePicker" === e2.name && (t2 = { format: e2.props.base.format, valueFormat: e2.props.base.valueFormat });
|
|
169
175
|
return ((_c = e2.style) == null ? void 0 : _c.cellStyle) && (t2.cellStyle = e2.style.cellStyle), ((_d = e2.style) == null ? void 0 : _d.titleStyle) && (t2.titleStyle = e2.style.titleStyle), ((_f = (_e = e2.props) == null ? void 0 : _e.base) == null ? void 0 : _f.editConditions) && e2.props.base.editConditions.length > 0 && (t2.editConditions = e2.props.base.editConditions), t2 ? JSON.stringify(t2) : null;
|
|
170
176
|
}
|
|
171
|
-
function
|
|
177
|
+
function g(e2) {
|
|
172
178
|
var _a, _b, _c;
|
|
173
179
|
if (e2.props.format) {
|
|
174
180
|
if ("hyperlinks" === e2.props.format.type && ((_a = e2.props.linkPage) == null ? void 0 : _a.length) > 0) {
|
|
@@ -191,23 +197,23 @@ function f(e2) {
|
|
|
191
197
|
}
|
|
192
198
|
return null;
|
|
193
199
|
}
|
|
194
|
-
function
|
|
200
|
+
function y(e2) {
|
|
195
201
|
if (e2) {
|
|
196
202
|
const t2 = e2.match(/\${(.*?)\.(.*?)}/);
|
|
197
203
|
if (t2) return t2[2];
|
|
198
204
|
}
|
|
199
205
|
return e2;
|
|
200
206
|
}
|
|
201
|
-
function
|
|
207
|
+
function S(e2, t2) {
|
|
202
208
|
let r2 = null;
|
|
203
209
|
return e2.events && (e2.events.forEach((e3) => {
|
|
204
210
|
e3.jsContent && e3.jsContent.trim() && (r2 || (r2 = {}), r2[e3.name] = e3.componentUuid + "_" + e3.name);
|
|
205
211
|
}), r2) ? JSON.stringify(r2) : r2;
|
|
206
212
|
}
|
|
207
|
-
function
|
|
213
|
+
function C(e2) {
|
|
208
214
|
return e2.props.base.prop && "dynamicColumnSelect" === e2.props.base.prop ? JSON.stringify(e2.props.dynamicColumnData) : null;
|
|
209
215
|
}
|
|
210
|
-
function
|
|
216
|
+
function h(e2) {
|
|
211
217
|
if (Array.isArray(e2) && e2.length > 0) {
|
|
212
218
|
const t2 = [];
|
|
213
219
|
return e2.forEach((e3) => {
|
|
@@ -216,38 +222,38 @@ function S(e2) {
|
|
|
216
222
|
}
|
|
217
223
|
return Array.isArray(e2) && 0 === e2.length ? null : e2;
|
|
218
224
|
}
|
|
219
|
-
function
|
|
225
|
+
function O(e2, t2) {
|
|
220
226
|
let a2 = { uuid: e2.uuid, base: e2.props.base, dataOrigin: e2.props.dataOrigin, dynamicColumnData: e2.props.dynamicColumnData, editLine: e2.props.editLine, format: e2.props.format, verification: e2.props.verification, definition: e2.props.definition, size: e2.props.size };
|
|
221
227
|
e2.props = {}, e2.uuid = a2.uuid, e2.props.base = a2.base, e2.props.dataOrigin = a2.dataOrigin, e2.props.dynamicColumnData = a2.dynamicColumnData, e2.props.editLine = a2.editLine, e2.props.format = a2.format, e2.props.verification = a2.verification, e2.props.definition = a2.definition, e2.props.size = a2.size, e2.events = r(t2), e2.name = t2;
|
|
222
228
|
}
|
|
223
|
-
function
|
|
229
|
+
function T(e2, t2) {
|
|
224
230
|
return e2 = {}, t2.forEach((t3) => {
|
|
225
231
|
e2[t3.dbColumnName] = t3;
|
|
226
232
|
}), e2;
|
|
227
233
|
}
|
|
228
|
-
function
|
|
234
|
+
function N(e2, t2) {
|
|
229
235
|
let r2, a2 = e2.tableName;
|
|
230
236
|
return a2 || (e2.tableRuntimes && t2 && e2.tableRuntimes[t2] && e2.pageType && "list" === e2.pageType && (r2 = JSON.parse(e2.tableRuntimes[t2].configure)), r2 && r2.props && r2.props.dataOrigin ? r2.props.dataOrigin.tableName : null);
|
|
231
237
|
}
|
|
232
|
-
function
|
|
238
|
+
function v(e2) {
|
|
233
239
|
let t2 = [];
|
|
234
240
|
return e2 && e2.forEach((e3) => {
|
|
235
241
|
t2.push({ value: e3.dbColumnName, label: e3.alias, alias: e3.alias, dataType: e3.dataType });
|
|
236
242
|
}), t2;
|
|
237
243
|
}
|
|
238
|
-
function
|
|
244
|
+
function D(e2, t2, r2) {
|
|
239
245
|
var _a;
|
|
240
246
|
const a2 = e2 ? e2.pageType : null;
|
|
241
247
|
let s2, o2;
|
|
242
248
|
return r2 ? s2 = r2 : (t2 == null ? void 0 : t2.props.base.tableUuid) ? (o2 = t2.props.base.tableUuid, s2 = i(e2, o2)) : a2 && "list" === a2 && ((_a = e2 == null ? void 0 : e2.tableUuids) == null ? void 0 : _a.length) > 0 ? (o2 = e2 == null ? void 0 : e2.tableUuids[0], s2 = i(e2, o2)) : (e2 == null ? void 0 : e2.currentTableConfig) && (s2 = e2.currentTableConfig), s2;
|
|
243
249
|
}
|
|
244
250
|
export {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
T as changeFeieldToMap,
|
|
252
|
+
v as getModelOptionsByFields,
|
|
253
|
+
D as getTableConfigByTableUuid,
|
|
254
|
+
N as getTableNameByTableUuid,
|
|
255
|
+
n as querySublist,
|
|
256
|
+
o as queryTableFields,
|
|
257
|
+
p as setTableRuntimesFromConfigure,
|
|
258
|
+
O as tableResetConfigIndo
|
|
253
259
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./data-origin.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const t = r(o, [["__scopeId", "data-v-
|
|
4
|
+
const t = r(o, [["__scopeId", "data-v-307b2416"]]);
|
|
5
5
|
export {
|
|
6
6
|
t as default
|
|
7
7
|
};
|
|
@@ -9,13 +9,13 @@ import { Search as C, Close as h } from "@element-plus/icons";
|
|
|
9
9
|
import F from "agilebuilder-ui/src/utils/request";
|
|
10
10
|
import { usePageContextStore as k } from "../../../../../../stores/page-store.js";
|
|
11
11
|
import w from "../../common/page-permission-select.vue.js";
|
|
12
|
-
const N = { style: { padding: "8px 0px 0px 0px" } },
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
12
|
+
const N = { style: { padding: "8px 0px 0px 0px" } }, U = ["onClick"], x = e({ __name: "data-origin", props: { tableConfigure: { type: Object, default: () => ({ props: {} }) }, configure: { type: Object, default: {} }, remote: { type: Boolean, default: true }, isTable: { type: Boolean, default: false } }, setup(e2) {
|
|
13
|
+
const x2 = e2, D = k(), j = D.pageContext;
|
|
14
|
+
x2.configure.props.dataOrigin || (x2.configure.props.dataOrigin = {});
|
|
15
|
+
const L = x2.configure.props.dataOrigin;
|
|
16
|
+
L.service || (L.service = {}), L.filterList || (L.filterList = []);
|
|
17
|
+
const A = a(null), q = a(null), G = a(""), P = a(null);
|
|
18
|
+
x2.configure.props.dataOrigin.optionValueSetType && 0 !== x2.configure.props.dataOrigin.optionValueSetType.length || (x2.configure.props.dataOrigin.optionValueSetType = "none");
|
|
19
19
|
const $ = a(false), I = a([]);
|
|
20
20
|
function R(e3) {
|
|
21
21
|
$.value = true;
|
|
@@ -40,51 +40,51 @@ const N = { style: { padding: "8px 0px 0px 0px" } }, x = ["onClick"], D = e({ __
|
|
|
40
40
|
const a2 = B.value.find((a3) => a3.code === e3);
|
|
41
41
|
if (a2) {
|
|
42
42
|
let e4 = JSON.parse(a2.selectedField);
|
|
43
|
-
|
|
44
|
-
} else
|
|
43
|
+
L.dynamicDataSourceFields = e4;
|
|
44
|
+
} else L.dynamicDataSourceFields = [];
|
|
45
45
|
E();
|
|
46
46
|
}
|
|
47
47
|
function E() {
|
|
48
|
-
const e3 =
|
|
49
|
-
P.value && ("dynamicData" == e3 ? P.value.updateSourceFields(
|
|
48
|
+
const e3 = L.optionValueSetType;
|
|
49
|
+
P.value && ("dynamicData" == e3 ? P.value.updateSourceFields(L.dynamicDataSourceFields) : "dataTable" == e3 && (P.value.updateSourceFields(W.value), A.value.changeTableFields(W.value)));
|
|
50
50
|
}
|
|
51
51
|
function H() {
|
|
52
52
|
q.value.openDialog();
|
|
53
53
|
}
|
|
54
54
|
function K() {
|
|
55
|
-
|
|
55
|
+
L.tableName = "", L.tableAlias = "", L.tableSysCode = null, L.tableSysVersion = null, W.value = [];
|
|
56
56
|
}
|
|
57
57
|
function M(e3) {
|
|
58
|
-
let a2 =
|
|
59
|
-
a2 += "_", a2 +=
|
|
58
|
+
let a2 = L.tableSysCode ? L.tableSysCode : "";
|
|
59
|
+
a2 += "_", a2 += L.tableSysVersion ? L.tableSysVersion : "", a2 += "_", a2 += L.tableName ? L.tableName : "";
|
|
60
60
|
let l2 = e3.systemCode ? e3.systemCode : "";
|
|
61
|
-
l2 += "_", l2 += e3.systemVersion ? e3.systemVersion : "", l2 += "_", l2 += e3.name ? e3.name : "", l2 != a2 && (
|
|
61
|
+
l2 += "_", l2 += e3.systemVersion ? e3.systemVersion : "", l2 += "_", l2 += e3.name ? e3.name : "", l2 != a2 && (L.tableSysCode = e3.systemCode, L.tableSysVersion = e3.systemVersion, L.tableName = e3.name, L.tableAlias = e3.alias, X());
|
|
62
62
|
}
|
|
63
63
|
let W = a([]);
|
|
64
64
|
function X() {
|
|
65
|
-
const e3 =
|
|
65
|
+
const e3 = L.tableSysCode ? L.tableSysCode : D.pageContext.systemCode, a2 = L.tableSysVersion ? L.tableSysVersion : D.pageContext.systemVersion, l2 = L.tableName;
|
|
66
66
|
l2 && T(e3, a2, l2).then((e4) => {
|
|
67
67
|
W.value = e4, E();
|
|
68
68
|
}).catch((e4) => {
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
function Y() {
|
|
72
|
-
|
|
72
|
+
L.sortFields || (L.sortFields = []), L.sortFields.push({ name: "", type: "" }), G.value = "";
|
|
73
73
|
}
|
|
74
74
|
function Z() {
|
|
75
|
-
|
|
75
|
+
L.sortFields.length > 0 && L.sortFields.splice(L.sortFields.length - 1, 1);
|
|
76
76
|
}
|
|
77
77
|
return l(() => {
|
|
78
78
|
E(), X();
|
|
79
79
|
}), (a2, l2) => {
|
|
80
|
-
const T2 = t("el-radio"), F2 = t("el-radio-group"), k2 = t("el-form-item"),
|
|
81
|
-
return i(), o(
|
|
80
|
+
const T2 = t("el-radio"), F2 = t("el-radio-group"), k2 = t("el-form-item"), x3 = t("el-radio-button"), D2 = t("el-switch"), X2 = t("el-option"), ee = t("el-select"), ae = t("el-button"), le = t("el-input"), te = t("el-collapse-item");
|
|
81
|
+
return i(), o(te, { title: "数据源", name: "dataOrigin", class: "amb-design-attr-group-header" }, { default: n(() => [r("div", N, [u(k2, { label: "数据来源", class: "amb-design-attr-item" }, { default: n(() => [u(F2, { modelValue: e2.configure.props.dataOrigin.optionValueSetType, "onUpdate:modelValue": l2[0] || (l2[0] = (a3) => e2.configure.props.dataOrigin.optionValueSetType = a3), onChange: E }, { default: n(() => [u(T2, { value: "none" }, { default: n(() => l2[13] || (l2[13] = [p("无")])), _: 1 }), u(T2, { value: "static" }, { default: n(() => l2[14] || (l2[14] = [p("静态数据")])), _: 1 }), u(T2, { value: "optionGroup" }, { default: n(() => l2[15] || (l2[15] = [p("选项组")])), _: 1 }), u(T2, { value: "dynamicData" }, { default: n(() => l2[16] || (l2[16] = [p("动态数据源")])), _: 1 }), u(T2, { value: "dataTable" }, { default: n(() => l2[17] || (l2[17] = [p("数据表/视图")])), _: 1 }), u(T2, { value: "service" }, { default: n(() => l2[18] || (l2[18] = [p("服务")])), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 }), d(u(k2, { label: "可搜索", class: "amb-design-attr-item" }, { default: n(() => [u(F2, { modelValue: e2.configure.props.dataOrigin.filterType, "onUpdate:modelValue": l2[1] || (l2[1] = (a3) => e2.configure.props.dataOrigin.filterType = a3), class: "ml-4" }, { default: n(() => [u(x3, { value: "normal" }, { default: n(() => l2[19] || (l2[19] = [p("普通")])), _: 1 }), d(u(x3, { value: "remote" }, { default: n(() => l2[20] || (l2[20] = [p("远程")])), _: 1 }, 512), [[c, "dataTable" == e2.configure.props.dataOrigin.optionValueSetType || "dynamicData" == e2.configure.props.dataOrigin.optionValueSetType || "service" == e2.configure.props.dataOrigin.optionValueSetType]]), u(x3, { value: "none" }, { default: n(() => l2[21] || (l2[21] = [p("否")])), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 }, 512), [[c, "select" == e2.configure.name]]), e2.isTable ? (i(), o(k2, { key: 0, label: "value-label自动转换", class: "amb-design-attr-item" }, { default: n(() => [u(D2, { modelValue: e2.configure.props.dataOrigin.valueLabelSwitch, "onUpdate:modelValue": l2[2] || (l2[2] = (a3) => e2.configure.props.dataOrigin.valueLabelSwitch = a3) }, null, 8, ["modelValue"])]), _: 1 })) : s("", true), e2.configure.props.dataOrigin.optionValueSetType && "static" !== e2.configure.props.dataOrigin.optionValueSetType ? s("", true) : (i(), o(V, { key: 1, style: { "margin-bottom": "10px", "border-top": "1px solid var(--el-border-color-lighter)" }, dataOrigin: m(L), type: "select", leftTittle: "编码", rightTittle: "显示名称" }, null, 8, ["dataOrigin"])), d(u(k2, { label: "选项组名", class: "amb-design-attr-item" }, { default: n(() => [u(ee, { modelValue: e2.configure.props.dataOrigin.optionGroup, "onUpdate:modelValue": l2[3] || (l2[3] = (a3) => e2.configure.props.dataOrigin.optionGroup = a3), filterable: "", remote: "", "reserve-keyword": "", clearable: "", placeholder: "请选择", "remote-show-suffix": "", "remote-method": R, loading: $.value }, { default: n(() => [(i(true), g(f, null, b(I.value, (e3) => (i(), o(X2, { key: e3.code, label: e3.name + "(" + e3.code + ")", value: e3.code }, null, 8, ["label", "value"]))), 128))]), _: 1 }, 8, ["modelValue", "loading"])]), _: 1 }, 512), [[c, "optionGroup" === e2.configure.props.dataOrigin.optionValueSetType]]), "dynamicData" === e2.configure.props.dataOrigin.optionValueSetType ? (i(), o(k2, { key: 2, label: "动态数据源", class: "amb-design-attr-item" }, { default: n(() => [u(ee, { modelValue: e2.configure.props.dataOrigin.dynamicDataSourceCode, "onUpdate:modelValue": l2[4] || (l2[4] = (a3) => e2.configure.props.dataOrigin.dynamicDataSourceCode = a3), filterable: "", remote: "", "reserve-keyword": "", clearable: "", placeholder: "请选择", "remote-show-suffix": "", "remote-method": Q, loading: z.value, onChange: J }, { default: n(() => [(i(true), g(f, null, b(B.value, (e3) => (i(), o(X2, { key: e3.code, label: e3.name + "(" + e3.code + ")", value: e3.code }, null, 8, ["label", "value"]))), 128))]), _: 1 }, 8, ["modelValue", "loading"])]), _: 1 })) : s("", true), d(u(k2, { label: "数据表视图", class: "amb-design-attr-item" }, { default: n(() => [u(le, { modelValue: e2.configure.props.dataOrigin.tableName, "onUpdate:modelValue": l2[5] || (l2[5] = (a3) => e2.configure.props.dataOrigin.tableName = a3), title: e2.configure.props.dataOrigin.tableName, clearable: "", readonly: "true" }, { append: n(() => [u(ae, { type: "default", icon: m(C), onClick: H, size: "small" }, null, 8, ["icon"]), u(ae, { type: "default", icon: m(h), onClick: K, title: "Clear", size: "small" }, null, 8, ["icon"])]), _: 1 }, 8, ["modelValue", "title"])]), _: 1 }, 512), [[c, "dataTable" === e2.configure.props.dataOrigin.optionValueSetType]]), d(u(k2, { label: "选项值字段", class: "amb-design-attr-item" }, { default: n(() => [u(ee, { modelValue: e2.configure.props.dataOrigin.tableValueField, "onUpdate:modelValue": l2[6] || (l2[6] = (a3) => e2.configure.props.dataOrigin.tableValueField = a3), "allow-create": "", filterable: "", "reserve-keyword": "", clearable: "", placeholder: "请选择", "remote-show-suffix": "" }, { default: n(() => [(i(true), g(f, null, b(m(W), (e3) => (i(), o(X2, { key: e3.dbColumnName, label: e3.alias + "(" + e3.dbColumnName + ")", value: "${obj." + e3.dbColumnName + "}" }, null, 8, ["label", "value"]))), 128))]), _: 1 }, 8, ["modelValue"])]), _: 1 }, 512), [[c, "dataTable" === e2.configure.props.dataOrigin.optionValueSetType]]), d(u(k2, { label: "选项名字段", class: "amb-design-attr-item" }, { default: n(() => [u(ee, { modelValue: e2.configure.props.dataOrigin.tableLableField, "onUpdate:modelValue": l2[7] || (l2[7] = (a3) => e2.configure.props.dataOrigin.tableLableField = a3), "allow-create": "", filterable: "", "reserve-keyword": "", clearable: "", placeholder: "请选择", "remote-show-suffix": "" }, { default: n(() => [(i(true), g(f, null, b(m(W), (e3) => (i(), o(X2, { key: e3.dbColumnName, label: e3.alias + "(" + e3.dbColumnName + ")", value: "${obj." + e3.dbColumnName + "}" }, null, 8, ["label", "value"]))), 128))]), _: 1 }, 8, ["modelValue"])]), _: 1 }, 512), [[c, "dataTable" === e2.configure.props.dataOrigin.optionValueSetType]]), "dataTable" === e2.configure.props.dataOrigin.optionValueSetType ? (i(), o(k2, { key: 3, label: "排序", class: "amb-design-attr-item" }, { default: n(() => [u(ae, { type: "primary", onClick: Y }, { default: n(() => l2[22] || (l2[22] = [p("添加")])), _: 1 }), u(ae, { type: "default", onClick: Z }, { default: n(() => l2[23] || (l2[23] = [p("删除")])), _: 1 }), (i(true), g(f, null, b(m(L).sortFields, (e3, a3) => (i(), g("div", { key: a3, onClick: (e4) => function(e5) {
|
|
82
82
|
G.value = e5;
|
|
83
|
-
}(a3), style: { "margin-top": "6px" }, class: y(G.value === a3 ? "amb-design-attr-item-inline seleteSort" : "amb-design-attr-item-inline") }, [u(
|
|
84
|
-
|
|
85
|
-
}(0, a3, l3)) }, null, 8, ["pageDesign", "rowObj"])]), _: 1 }, 512), [[c, "service" === e2.configure.props.dataOrigin.optionValueSetType]]), d(u(k2, { label: "数据集字段", class: "amb-design-attr-item" }, { default: n(() => [u(
|
|
83
|
+
}(a3), style: { "margin-top": "6px" }, class: y(G.value === a3 ? "amb-design-attr-item-inline seleteSort" : "amb-design-attr-item-inline") }, [u(ee, { modelValue: e3.name, "onUpdate:modelValue": (a4) => e3.name = a4, filterable: "", clearable: "", placeholder: "请选择" }, { default: n(() => [(i(true), g(f, null, b(m(W), (e4, a4) => (i(), o(X2, { key: a4, label: e4.alias + "(" + e4.dbColumnName + ")", value: e4.dbColumnName }, null, 8, ["label", "value"]))), 128))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"]), u(ee, { modelValue: e3.type, "onUpdate:modelValue": (a4) => e3.type = a4, style: { "margin-left": "10px" }, placeholder: "请选择" }, { default: n(() => [u(X2, { label: "升序", value: "asc" }), u(X2, { label: "降序", value: "desc" })]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])], 10, U))), 128))]), _: 1 })) : s("", true), d(u(k2, { label: "显示数量", class: "amb-design-attr-item" }, { default: n(() => [u(le, { modelValue: e2.configure.props.dataOrigin.displayQuantity, "onUpdate:modelValue": l2[8] || (l2[8] = (a3) => e2.configure.props.dataOrigin.displayQuantity = a3), placeholder: "请输入" }, null, 8, ["modelValue"])]), _: 1 }, 512), [[c, "dataTable" === e2.configure.props.dataOrigin.optionValueSetType]]), d(u(k2, { label: "过滤条件", class: "amb-design-attr-item" }, { default: n(() => [u(v, { title: "过滤条件", list: e2.configure.props.dataOrigin.filterList, ref_key: "conditionRef", ref: A }, null, 8, ["list"])]), _: 1 }, 512), [[c, "dataTable" === e2.configure.props.dataOrigin.optionValueSetType]]), d(u(k2, { label: "服务名", class: "amb-design-attr-item" }, { default: n(() => [u(w, { pageDesign: m(j), rowObj: m(L).service, onlyService: "", "onUpdate:modelValue": l2[9] || (l2[9] = (e3, a3, l3) => function(e4, a4, l4) {
|
|
84
|
+
L.service.simpleCode = a4, L.service.name = l4;
|
|
85
|
+
}(0, a3, l3)) }, null, 8, ["pageDesign", "rowObj"])]), _: 1 }, 512), [[c, "service" === e2.configure.props.dataOrigin.optionValueSetType]]), d(u(k2, { label: "数据集字段", class: "amb-design-attr-item" }, { default: n(() => [u(ee, { modelValue: m(L).serviceDataSetField, "onUpdate:modelValue": l2[10] || (l2[10] = (e3) => m(L).serviceDataSetField = e3), placeholder: "请选择" }, { default: n(() => [u(X2, { label: "1", value: "1" })]), _: 1 }, 8, ["modelValue"])]), _: 1 }, 512), [[c, "service" == m(L).optionValueSetType]]), d(u(k2, { label: "选项值字段", class: "amb-design-attr-item" }, { default: n(() => [u(ee, { modelValue: m(L).serviceValueField, "onUpdate:modelValue": l2[11] || (l2[11] = (e3) => m(L).serviceValueField = e3), placeholder: "请选择" }, { default: n(() => [u(X2, { label: "1", value: "1" })]), _: 1 }, 8, ["modelValue"])]), _: 1 }, 512), [[c, "service" == m(L).optionValueSetType]]), d(u(k2, { label: "选项名字段", class: "amb-design-attr-item" }, { default: n(() => [u(ee, { modelValue: m(L).serviceLabelField, "onUpdate:modelValue": l2[12] || (l2[12] = (e3) => m(L).serviceLabelField = e3), placeholder: "请选择" }, { default: n(() => [u(X2, { label: "1", value: "1" })]), _: 1 }, 8, ["modelValue"])]), _: 1 }, 512), [[c, "service" == m(L).optionValueSetType]]), d(u(S, { ref: "dataOriginServiceInRef", dataOrigin: m(L) }, null, 8, ["dataOrigin"]), [[c, "service" == e2.configure.props.dataOrigin.optionValueSetType]]), d(u(O, { ref_key: "dataOriginAutosetRef", ref: P, dataOrigin: m(L), isTable: e2.isTable }, null, 8, ["dataOrigin", "isTable"]), [[c, "dataTable" == e2.configure.props.dataOrigin.optionValueSetType || "dynamicData" == e2.configure.props.dataOrigin.optionValueSetType || "service" == e2.configure.props.dataOrigin.optionValueSetType]])]), u(_, { ref_key: "selectTableDialog", ref: q, onSelectTable: M, systemCode: e2.configure.systemCode, systemVersion: e2.configure.systemVersion }, null, 8, ["systemCode", "systemVersion"])]), _: 1 });
|
|
86
86
|
};
|
|
87
87
|
} });
|
|
88
88
|
export {
|
|
89
|
-
|
|
89
|
+
x as default
|
|
90
90
|
};
|
|
@@ -1,72 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { javascriptLanguage as y, javascript as b } from "@codemirror/lang-javascript";
|
|
6
|
-
import { EditorState as h } from "@codemirror/state";
|
|
7
|
-
import "@codemirror/autocomplete";
|
|
8
|
-
import "@codemirror/language";
|
|
9
|
-
import { openSearchPanel as _ } from "@codemirror/search";
|
|
10
|
-
import x from "js-beautify";
|
|
11
|
-
const C = { style: { padding: "8px 16px", margin: "10px 0px", "background-color": "#f4f4f5" }, class: "pppp" }, $ = { style: { color: "#909399", "font-size": "14px" } }, P = { key: 0 }, U = { key: 1 }, k = { class: "editorTool" }, F = e({ __name: "config", props: { eventForm: { type: Object, default: () => ({}) } }, emits: ["fullScreen"], setup(e2, { expose: F2, emit: S }) {
|
|
12
|
-
const j = e2;
|
|
13
|
-
t(false);
|
|
14
|
-
const z = t({ theme: "default", fontSize: 14, searchOpen: false }), V = t(null), E = t(null), D = t(null), O = t({ backgroundColor: "#fff", color: "#333", border: "1px solid #ddd", overflow: "auto" });
|
|
15
|
-
let T;
|
|
16
|
-
o(() => {
|
|
17
|
-
let e3 = d("editorStyle", "").value;
|
|
18
|
-
e3 && (e3 = JSON.parse(e3), z.value.theme = e3.theme || "default", z.value.fontSize = e3.fontSize || 14), R();
|
|
19
|
-
}), n(() => {
|
|
20
|
-
T && clearTimeout(T);
|
|
21
|
-
});
|
|
22
|
-
const B = y.data.of({ autocomplete: function(e3) {
|
|
23
|
-
let t2 = e3.matchBefore(/\w*|window\.\$PageUtil\.|window\.|logicContext\./);
|
|
24
|
-
if (t2) {
|
|
25
|
-
if ("window." === (t2 == null ? void 0 : t2.text)) return { from: t2.from, options: [{ label: "window.$PageUtil", type: "property", info: "页面工具方法" }, { label: "window.$message", type: "property", info: "提示信息" }, { label: "window.$http()", type: "property", info: "接口调用" }] };
|
|
26
|
-
if ("window.$message." === (t2 == null ? void 0 : t2.text)) return { form: t2.from, options: [{ label: "window.$message.info()", type: "function", info: "提示消息" }, { label: "window.$message.success()", type: "function", info: "成功消息" }, { label: "window.$message.warning()", type: "function", info: "警告消息" }, { label: "window.$message.error()", type: "function", info: "错误消息" }] };
|
|
27
|
-
if ("window.$PageUtil." === (t2 == null ? void 0 : t2.text)) return { from: t2.from, options: [{ label: "window.$PageUtil.standardEvents", type: "function", info: "显示方法" }, { label: "window.$PageUtil.showElement()", type: "function", info: "显示页面中的某个组件元素" }, { label: "window.$PageUtil.hideElement()", type: "function", info: "隐藏页面中的某个组件元素" }, { label: "window.$PageUtil.enableElement()", type: "function", info: "设置组件元素可用状态" }, { label: "window.$PageUtil.disableElement()", type: "function", info: "禁用页面中的某个组件元素" }, { label: "window.$PageUtil.setEntityDataValue()", type: "function", info: "设置Data值" }, { label: "window.$PageUtil.setEntityPageValue()", type: "function", info: "设置页面变量值" }, { label: "window.$PageUtil.setEntityValueByType()", type: "function", info: "根据类型设置值" }, { label: "window.$PageUtil.dsiabledAllFields()", type: "function", info: "禁用所有字段" }, { label: "window.$PageUtil.dynamicControlFormEdit()", type: "function", info: "表单编辑权限动态控制" }, { label: "window.$PageUtil.dynamicControlTableEdit()", type: "function", info: "控制表格编辑权限" }, { label: "window.$PageUtil.openPage()", type: "function", info: "打开页面" }, { label: "window.$PageUtil.refreshPage()", type: "function", info: "刷新页面" }, { label: "window.$PageUtil.refreshSubTableHandle()", type: "function", info: "刷新表单中子表内容" }, { label: "window.$PageUtil.refreshChildData()", type: "function", info: "对外开放的api方法更新子表集合" }, { label: "window.$PageUtil.getServerConfigValue()", type: "function", info: "根据key获得serverConfig中配置的信息" }, { label: "window.$PageUtil.getBackendUrl()", type: "function", info: "获得当前系统的后端访问路径" }, { label: "window.$PageUtil.getPlateBackendUrl()", type: "function", info: "获得平台后端访问路径" }] };
|
|
28
|
-
if ("logicContext." === (t2 == null ? void 0 : t2.text)) return { from: t2.from, options: [{ label: "logicContext.page", type: "property", info: "页面变量" }, { label: "logicContext.logic", type: "property", info: "页面变量" }, { label: "logicContext.task", type: "property", info: "任务变量" }, { label: "logicContext.context", type: "property", info: "上下文变量" }, { label: "logicContext.system", type: "property", info: "系统变量" }, { label: "logicContext.data", type: "property", info: "数据模型变量" }] };
|
|
29
|
-
}
|
|
30
|
-
return null;
|
|
31
|
-
} });
|
|
32
|
-
function L() {
|
|
33
|
-
d("editorStyle", z.value).value = z.value, V.value && (V.value && V.value.destroy(), R());
|
|
34
|
-
}
|
|
35
|
-
function H() {
|
|
36
|
-
const e3 = v.theme({}), t2 = v.theme({ ".cm-content, .cm-gutter": { minHeight: "400px" }, "&": { fontSize: z.value.fontSize + "px" } });
|
|
37
|
-
return h.create({ doc: j.eventForm.jsContent, extensions: [h.tabSize.of(16), w, b(), B, e3, t2, v.updateListener.of(function(e4) {
|
|
38
|
-
j.eventForm.jsContent = e4.state.doc.toString();
|
|
39
|
-
})] });
|
|
40
|
-
}
|
|
41
|
-
function R() {
|
|
42
|
-
const e3 = H();
|
|
43
|
-
V.value = new v({ state: e3, parent: document.getElementById("cf-codemirror") || void 0 });
|
|
44
|
-
}
|
|
45
|
-
function q() {
|
|
46
|
-
if (V.value) {
|
|
47
|
-
V.value.focus(), _(V.value) && V.value.update([]);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function G() {
|
|
51
|
-
if (V.value) {
|
|
52
|
-
const e3 = x.js(j.eventForm.jsContent, { indent_level: 0, indent_size: 2, space_in_empty_paren: false, max_preserve_newlines: 2, preserve_newlines: true, jslint_happy: false, keep_array_indentation: false, keep_function_indentation: false, space_before_conditional: true, break_chained_methods: false, eval_code: false, unescape_strings: false, wrap_line_length: 0, end_with_newline: false });
|
|
53
|
-
V.value.dispatch({ changes: { from: 0, to: j.eventForm.jsContent.length, insert: e3 } });
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return F2({ resize: function() {
|
|
57
|
-
T && clearTimeout(T), E.value && (T = setTimeout(() => {
|
|
58
|
-
const e3 = E.value.getBoundingClientRect(), t2 = window.innerHeight - e3.y - 30 + "px";
|
|
59
|
-
V.value && V.value.dom && (V.value.dom.style.height = t2);
|
|
60
|
-
}, 10));
|
|
61
|
-
}, updateJsContent: function(e3) {
|
|
62
|
-
var _a;
|
|
63
|
-
const t2 = j.eventForm.jsContent ? j.eventForm.jsContent : "";
|
|
64
|
-
e3 && j.eventForm && (e3.jsContent || (e3.jsContent = ""), Object.assign(j.eventForm, e3), (_a = V.value) == null ? void 0 : _a.dispatch({ changes: { from: 0, to: t2.length, insert: j.eventForm.jsContent } }));
|
|
65
|
-
} }), (t2, o2) => {
|
|
66
|
-
const n2 = l("el-input"), d2 = l("el-option"), v2 = l("el-select"), w2 = l("el-tooltip"), y2 = l("el-icon");
|
|
67
|
-
return i(), a("div", { style: { "padding-right": "20px" }, ref_key: "editorContentRef", ref: D }, [r("div", C, [r("span", $, [o2[6] || (o2[6] = s(" function ")), "customFunc" === e2.eventForm.name ? (i(), a("span", P, [o2[3] || (o2[3] = s(" ( ")), o2[4] || (o2[4] = r("span", { class: "is_req" }, [r("span", { class: "cell--span required__label" })], -1)), u(n2, { size: "small", modelValue: e2.eventForm.funcParam, "onUpdate:modelValue": o2[0] || (o2[0] = (t3) => e2.eventForm.funcParam = t3), style: { width: "300px" }, title: "方法参数" }, null, 8, ["modelValue"]), o2[5] || (o2[5] = s(" ) "))])) : (i(), a("span", U, " ( params ) ")), o2[7] || (o2[7] = s("{ "))]), r("span", k, [u(w2, { class: "box-item", effect: "dark", content: "切换主题", placement: "top" }, { default: c(() => [u(v2, { class: "editorOption", onChange: L, modelValue: z.value.theme, "onUpdate:modelValue": o2[1] || (o2[1] = (e3) => z.value.theme = e3), placeholder: "", size: "small", style: { width: "120px" } }, { default: c(() => [u(d2, { label: "默认", value: "default" }), u(d2, { label: "VScodeDark", value: "vscodeDark" }), u(d2, { label: "Dracula", value: "dracula" }), u(d2, { label: "GithubLight", value: "githubLight" }), u(d2, { label: "GithubDark", value: "githubDark" }), u(d2, { label: "Eclipse", value: "eclipse" }), u(d2, { label: "XcodeLight", value: "xcodeLight" }), u(d2, { label: "XcodeDark", value: "xcodeDark" })]), _: 1 }, 8, ["modelValue"])]), _: 1 }), u(w2, { class: "box-item", effect: "dark", content: "切换字体大小", placement: "top" }, { default: c(() => [u(v2, { class: "editorOption", modelValue: z.value.fontSize, "onUpdate:modelValue": o2[2] || (o2[2] = (e3) => z.value.fontSize = e3), placeholder: "", onChange: L, size: "small", style: { width: "80px" } }, { default: c(() => [u(d2, { label: "12", value: 12 }), u(d2, { label: "14", value: 14 }), u(d2, { label: "16", value: 16 }), u(d2, { label: "18", value: 18 }), u(d2, { label: "20", value: 20 }), u(d2, { label: "22", value: 22 }), u(d2, { label: "24", value: 24 }), u(d2, { label: "26", value: 26 }), u(d2, { label: "28", value: 28 })]), _: 1 }, 8, ["modelValue"])]), _: 1 })]), u(w2, { class: "box-item", effect: "dark", content: "打开搜索", placement: "top" }, { default: c(() => [u(y2, { class: "editorOption", onClick: q }, { default: c(() => [u(f(m))]), _: 1 })]), _: 1 }), u(w2, { class: "box-item", effect: "dark", content: "格式化代码", placement: "top" }, { default: c(() => [u(y2, { class: "editorOption", onClick: G }, { default: c(() => [u(f(g))]), _: 1 })]), _: 1 })]), r("div", { style: p(O.value), id: "cf-codemirror", ref_key: "codemirrorRef", ref: E }, null, 4), o2[8] || (o2[8] = r("span", { style: { color: "gray" } }, " }", -1))], 512);
|
|
68
|
-
};
|
|
69
|
-
} });
|
|
1
|
+
import o from "./config.vue3.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import e from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const r = e(o, [["__scopeId", "data-v-8dba0ddd"]]);
|
|
70
5
|
export {
|
|
71
|
-
|
|
6
|
+
r as default
|
|
72
7
|
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as o, onUnmounted as n, resolveComponent as l, createElementBlock as a, openBlock as i, createElementVNode as r, createVNode as u, createTextVNode as s, withCtx as c, unref as f, normalizeStyle as p } from "vue";
|
|
2
|
+
import { useLocalStorage as d } from "@vueuse/core";
|
|
3
|
+
import { Search as m, MagicStick as g } from "@element-plus/icons-vue";
|
|
4
|
+
import { EditorView as v, basicSetup as w } from "codemirror";
|
|
5
|
+
import { javascriptLanguage as y, javascript as b } from "@codemirror/lang-javascript";
|
|
6
|
+
import { EditorState as h } from "@codemirror/state";
|
|
7
|
+
import "@codemirror/autocomplete";
|
|
8
|
+
import "@codemirror/language";
|
|
9
|
+
import { openSearchPanel as _ } from "@codemirror/search";
|
|
10
|
+
import x from "js-beautify";
|
|
11
|
+
const C = { style: { padding: "8px 16px", margin: "10px 0px", "background-color": "#f4f4f5" }, class: "pppp" }, $ = { style: { color: "#909399", "font-size": "14px" } }, P = { key: 0 }, U = { key: 1 }, k = { class: "editorTool" }, F = e({ __name: "config", props: { eventForm: { type: Object, default: () => ({}) } }, emits: ["fullScreen"], setup(e2, { expose: F2, emit: S }) {
|
|
12
|
+
const j = e2;
|
|
13
|
+
t(false);
|
|
14
|
+
const z = t({ theme: "default", fontSize: 14, searchOpen: false }), V = t(null), E = t(null), D = t(null), O = t({ backgroundColor: "#fff", color: "#333", border: "1px solid #ddd", overflow: "auto" });
|
|
15
|
+
let T;
|
|
16
|
+
o(() => {
|
|
17
|
+
let e3 = d("editorStyle", "").value;
|
|
18
|
+
e3 && (e3 = JSON.parse(e3), z.value.theme = e3.theme || "default", z.value.fontSize = e3.fontSize || 14), R();
|
|
19
|
+
}), n(() => {
|
|
20
|
+
T && clearTimeout(T);
|
|
21
|
+
});
|
|
22
|
+
const B = y.data.of({ autocomplete: function(e3) {
|
|
23
|
+
let t2 = e3.matchBefore(/\w*|window\.\$PageUtil\.|window\.|logicContext\./);
|
|
24
|
+
if (t2) {
|
|
25
|
+
if ("window." === (t2 == null ? void 0 : t2.text)) return { from: t2.from, options: [{ label: "window.$PageUtil", type: "property", info: "页面工具方法" }, { label: "window.$message", type: "property", info: "提示信息" }, { label: "window.$http()", type: "property", info: "接口调用" }] };
|
|
26
|
+
if ("window.$message." === (t2 == null ? void 0 : t2.text)) return { form: t2.from, options: [{ label: "window.$message.info()", type: "function", info: "提示消息" }, { label: "window.$message.success()", type: "function", info: "成功消息" }, { label: "window.$message.warning()", type: "function", info: "警告消息" }, { label: "window.$message.error()", type: "function", info: "错误消息" }] };
|
|
27
|
+
if ("window.$PageUtil." === (t2 == null ? void 0 : t2.text)) return { from: t2.from, options: [{ label: "window.$PageUtil.standardEvents", type: "function", info: "显示方法" }, { label: "window.$PageUtil.showElement()", type: "function", info: "显示页面中的某个组件元素" }, { label: "window.$PageUtil.hideElement()", type: "function", info: "隐藏页面中的某个组件元素" }, { label: "window.$PageUtil.enableElement()", type: "function", info: "设置组件元素可用状态" }, { label: "window.$PageUtil.disableElement()", type: "function", info: "禁用页面中的某个组件元素" }, { label: "window.$PageUtil.setEntityDataValue()", type: "function", info: "设置Data值" }, { label: "window.$PageUtil.setEntityPageValue()", type: "function", info: "设置页面变量值" }, { label: "window.$PageUtil.setEntityValueByType()", type: "function", info: "根据类型设置值" }, { label: "window.$PageUtil.dsiabledAllFields()", type: "function", info: "禁用所有字段" }, { label: "window.$PageUtil.dynamicControlFormEdit()", type: "function", info: "表单编辑权限动态控制" }, { label: "window.$PageUtil.dynamicControlTableEdit()", type: "function", info: "控制表格编辑权限" }, { label: "window.$PageUtil.openPage()", type: "function", info: "打开页面" }, { label: "window.$PageUtil.refreshPage()", type: "function", info: "刷新页面" }, { label: "window.$PageUtil.refreshSubTableHandle()", type: "function", info: "刷新表单中子表内容" }, { label: "window.$PageUtil.refreshChildData()", type: "function", info: "对外开放的api方法更新子表集合" }, { label: "window.$PageUtil.getServerConfigValue()", type: "function", info: "根据key获得serverConfig中配置的信息" }, { label: "window.$PageUtil.getBackendUrl()", type: "function", info: "获得当前系统的后端访问路径" }, { label: "window.$PageUtil.getPlateBackendUrl()", type: "function", info: "获得平台后端访问路径" }] };
|
|
28
|
+
if ("logicContext." === (t2 == null ? void 0 : t2.text)) return { from: t2.from, options: [{ label: "logicContext.page", type: "property", info: "页面变量" }, { label: "logicContext.logic", type: "property", info: "页面变量" }, { label: "logicContext.task", type: "property", info: "任务变量" }, { label: "logicContext.context", type: "property", info: "上下文变量" }, { label: "logicContext.system", type: "property", info: "系统变量" }, { label: "logicContext.data", type: "property", info: "数据模型变量" }] };
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
} });
|
|
32
|
+
function L() {
|
|
33
|
+
d("editorStyle", z.value).value = z.value, V.value && (V.value && V.value.destroy(), R());
|
|
34
|
+
}
|
|
35
|
+
function H() {
|
|
36
|
+
const e3 = v.theme({}), t2 = v.theme({ ".cm-content, .cm-gutter": { minHeight: "400px" }, "&": { fontSize: z.value.fontSize + "px" } });
|
|
37
|
+
return h.create({ doc: j.eventForm.jsContent, extensions: [h.tabSize.of(16), w, b(), B, e3, t2, v.updateListener.of(function(e4) {
|
|
38
|
+
j.eventForm.jsContent = e4.state.doc.toString();
|
|
39
|
+
})] });
|
|
40
|
+
}
|
|
41
|
+
function R() {
|
|
42
|
+
const e3 = H();
|
|
43
|
+
V.value = new v({ state: e3, parent: document.getElementById("cf-codemirror") || void 0 });
|
|
44
|
+
}
|
|
45
|
+
function q() {
|
|
46
|
+
if (V.value) {
|
|
47
|
+
V.value.focus(), _(V.value) && V.value.update([]);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function G() {
|
|
51
|
+
if (V.value) {
|
|
52
|
+
const e3 = x.js(j.eventForm.jsContent, { indent_level: 0, indent_size: 2, space_in_empty_paren: false, max_preserve_newlines: 2, preserve_newlines: true, jslint_happy: false, keep_array_indentation: false, keep_function_indentation: false, space_before_conditional: true, break_chained_methods: false, eval_code: false, unescape_strings: false, wrap_line_length: 0, end_with_newline: false });
|
|
53
|
+
V.value.dispatch({ changes: { from: 0, to: j.eventForm.jsContent.length, insert: e3 } });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return F2({ resize: function() {
|
|
57
|
+
T && clearTimeout(T), E.value && (T = setTimeout(() => {
|
|
58
|
+
const e3 = E.value.getBoundingClientRect(), t2 = window.innerHeight - e3.y - 30 + "px";
|
|
59
|
+
V.value && V.value.dom && (V.value.dom.style.height = t2);
|
|
60
|
+
}, 10));
|
|
61
|
+
}, updateJsContent: function(e3) {
|
|
62
|
+
var _a;
|
|
63
|
+
const t2 = j.eventForm.jsContent ? j.eventForm.jsContent : "";
|
|
64
|
+
e3 && j.eventForm && (e3.jsContent || (e3.jsContent = ""), Object.assign(j.eventForm, e3), (_a = V.value) == null ? void 0 : _a.dispatch({ changes: { from: 0, to: t2.length, insert: j.eventForm.jsContent } }));
|
|
65
|
+
} }), (t2, o2) => {
|
|
66
|
+
const n2 = l("el-input"), d2 = l("el-option"), v2 = l("el-select"), w2 = l("el-tooltip"), y2 = l("el-icon");
|
|
67
|
+
return i(), a("div", { style: { "padding-right": "20px" }, ref_key: "editorContentRef", ref: D }, [r("div", C, [r("span", $, [o2[6] || (o2[6] = s(" function ")), "customFunc" === e2.eventForm.name ? (i(), a("span", P, [o2[3] || (o2[3] = s(" ( ")), o2[4] || (o2[4] = r("span", { class: "is_req" }, [r("span", { class: "cell--span required__label" })], -1)), u(n2, { size: "small", modelValue: e2.eventForm.funcParam, "onUpdate:modelValue": o2[0] || (o2[0] = (t3) => e2.eventForm.funcParam = t3), style: { width: "300px" }, title: "方法参数" }, null, 8, ["modelValue"]), o2[5] || (o2[5] = s(" ) "))])) : (i(), a("span", U, " ( params ) ")), o2[7] || (o2[7] = s("{ "))]), r("span", k, [u(w2, { class: "box-item", effect: "dark", content: "切换主题", placement: "top" }, { default: c(() => [u(v2, { class: "editorOption", onChange: L, modelValue: z.value.theme, "onUpdate:modelValue": o2[1] || (o2[1] = (e3) => z.value.theme = e3), placeholder: "", size: "small", style: { width: "120px" } }, { default: c(() => [u(d2, { label: "默认", value: "default" }), u(d2, { label: "VScodeDark", value: "vscodeDark" }), u(d2, { label: "Dracula", value: "dracula" }), u(d2, { label: "GithubLight", value: "githubLight" }), u(d2, { label: "GithubDark", value: "githubDark" }), u(d2, { label: "Eclipse", value: "eclipse" }), u(d2, { label: "XcodeLight", value: "xcodeLight" }), u(d2, { label: "XcodeDark", value: "xcodeDark" })]), _: 1 }, 8, ["modelValue"])]), _: 1 }), u(w2, { class: "box-item", effect: "dark", content: "切换字体大小", placement: "top" }, { default: c(() => [u(v2, { class: "editorOption", modelValue: z.value.fontSize, "onUpdate:modelValue": o2[2] || (o2[2] = (e3) => z.value.fontSize = e3), placeholder: "", onChange: L, size: "small", style: { width: "80px" } }, { default: c(() => [u(d2, { label: "12", value: 12 }), u(d2, { label: "14", value: 14 }), u(d2, { label: "16", value: 16 }), u(d2, { label: "18", value: 18 }), u(d2, { label: "20", value: 20 }), u(d2, { label: "22", value: 22 }), u(d2, { label: "24", value: 24 }), u(d2, { label: "26", value: 26 }), u(d2, { label: "28", value: 28 })]), _: 1 }, 8, ["modelValue"])]), _: 1 })]), u(w2, { class: "box-item", effect: "dark", content: "打开搜索", placement: "top" }, { default: c(() => [u(y2, { class: "editorOption", onClick: q }, { default: c(() => [u(f(m))]), _: 1 })]), _: 1 }), u(w2, { class: "box-item", effect: "dark", content: "格式化代码", placement: "top" }, { default: c(() => [u(y2, { class: "editorOption", onClick: G }, { default: c(() => [u(f(g))]), _: 1 })]), _: 1 })]), r("div", { style: p(O.value), id: "cf-codemirror", ref_key: "codemirrorRef", ref: E }, null, 4), o2[8] || (o2[8] = r("span", { style: { color: "gray" } }, " }", -1))], 512);
|
|
68
|
+
};
|
|
69
|
+
} });
|
|
70
|
+
export {
|
|
71
|
+
F as default
|
|
72
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as e, ref as t, onMounted as n, onUnmounted as a, watch as l, resolveComponent as u, createElementBlock as o, openBlock as s, createElementVNode as i, createVNode as r, withDirectives as m, withCtx as c, vShow as d, unref as v, createTextVNode as p, toDisplayString as f, Fragment as g, renderList as b, createBlock as y } from "vue";
|
|
2
2
|
import { ElMessageBox as x, ElMessage as h } from "element-plus";
|
|
3
|
-
import C from "./config.
|
|
3
|
+
import C from "./config.vue2.js";
|
|
4
4
|
import { standardButtonOperations as E } from "../../../utils/assemblys-config.js";
|
|
5
5
|
import { findDesignItemByUuid as S, getUuidv4 as V, deepCopy as k } from "../../../utils/common-util.js";
|
|
6
6
|
import { usePageContextStore as _ } from "../../../../../stores/page-store.js";
|
|
@@ -16,7 +16,7 @@ import "@codemirror/autocomplete";
|
|
|
16
16
|
import "@codemirror/language";
|
|
17
17
|
import "@codemirror/search";
|
|
18
18
|
import "js-beautify";
|
|
19
|
-
/* empty css
|
|
19
|
+
/* empty css */
|
|
20
20
|
import "../../../utils/assemblys-config.js";
|
|
21
21
|
import "../../../../../stores/page-store.js";
|
|
22
22
|
import "../../../../../stores/event-undo-redo-store.js";
|
package/dist/es/style.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-page-designer",
|
|
3
|
-
"version": "2.2.92-
|
|
3
|
+
"version": "2.2.92-sit6",
|
|
4
4
|
"description": "AgileBuilder super page designer",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/es/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
30
30
|
"@vueuse/core": "^10.9.0",
|
|
31
31
|
"agilebuilder-private-libs": "1.0.26",
|
|
32
|
-
"agilebuilder-ui": "1.1.35-
|
|
32
|
+
"agilebuilder-ui": "1.1.35-sit2",
|
|
33
33
|
"echarts": "^5.5.0",
|
|
34
34
|
"element-plus": "^2.6.1",
|
|
35
35
|
"font-awesome": "^4.7.0",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"pinia": "^2.1.7",
|
|
41
41
|
"qrcode": "^1.5.3",
|
|
42
42
|
"quill": "^2.0.1",
|
|
43
|
-
"service-flow-designer": "2.2.92-
|
|
44
|
-
"super-page-runtime": "2.2.92-
|
|
43
|
+
"service-flow-designer": "2.2.92-sit5",
|
|
44
|
+
"super-page-runtime": "2.2.92-sit4",
|
|
45
45
|
"uuid": "^9.0.1",
|
|
46
46
|
"vite": "^5.1.6",
|
|
47
47
|
"vite-plugin-node-stdlib-browser": "^0.2.1",
|