super-page-designer 2.2.22 → 2.2.24
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-explore-util.js +10 -10
- package/dist/es/components/design/utils/page-permission-util.js +35 -33
- package/dist/es/components/design/views/assemblys/chart/column-line/column-line-design.vue2.js +24 -22
- package/dist/es/components/design/views/assemblys/chart/common/common-attr-clickset.vue.js +39 -36
- package/dist/es/components/design/views/assemblys/chart/common/common-attr-data.vue.js +43 -40
- package/dist/es/components/design/views/assemblys/chart/common/common-attr-groupby.vue.js +43 -40
- package/dist/es/components/design/views/assemblys/chart/common/common-home-chart.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/chart/common/common-home-chart.vue2.js +14 -13
- package/dist/es/components/design/views/assemblys/chart/gauge/gauge-attr-data.vue.js +33 -30
- package/dist/es/components/design/views/assemblys/chart/gauge/gauge-design.vue2.js +25 -23
- package/dist/es/components/design/views/assemblys/chart/pie/pie-design.vue2.js +25 -23
- package/dist/es/components/design/views/assemblys/chart/radar/radar-attr-data.vue.js +33 -30
- package/dist/es/components/design/views/assemblys/chart/radar/radar-design.vue2.js +25 -23
- package/dist/es/components/design/views/assemblys/chart/scatter/scatter-attr-data.vue.js +38 -35
- package/dist/es/components/design/views/assemblys/chart/scatter/scatter-design.vue2.js +23 -21
- package/dist/es/components/design/views/assemblys/common/common-icon-bind.vue.js +60 -57
- package/dist/es/components/design/views/assemblys/common/common-select-page.vue.js +36 -33
- package/dist/es/components/design/views/assemblys/common/common-select-table.vue.js +44 -41
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue.js +3 -3
- package/dist/es/components/design/views/assemblys/common/{common-variable-bind.vue2.js → common-variable-bind.vue3.js} +8 -8
- package/dist/es/components/design/views/assemblys/common/page-permission-select.vue.js +25 -25
- package/dist/es/components/design/views/assemblys/common-attr-events.vue.js +14 -12
- package/dist/es/components/design/views/assemblys/data/component/column-config.vue.js +78 -74
- package/dist/es/components/design/views/assemblys/data/component/composite-header.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/component/composite-header.vue2.js +111 -107
- package/dist/es/components/design/views/assemblys/data/component/table-children-column.vue.js +41 -39
- package/dist/es/components/design/views/assemblys/form/checkbox/checkbox-design.vue2.js +10 -8
- package/dist/es/components/design/views/assemblys/form/common/data-linkage.vue.js +26 -22
- package/dist/es/components/design/views/assemblys/form/common/data-origin-autoset.vue.js +41 -37
- package/dist/es/components/design/views/assemblys/form/common/data-origin-service-in.vue.js +30 -26
- package/dist/es/components/design/views/assemblys/form/common/linkpage-page-callback.vue.js +30 -26
- package/dist/es/components/design/views/assemblys/form/common/uploading.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/dept-tree/depttree-autoset.vue.js +30 -26
- package/dist/es/components/design/views/assemblys/form/radio/radio-design.vue2.js +12 -10
- package/dist/es/components/design/views/assemblys/form/rich-text/richtext-design.vue2.js +29 -26
- package/dist/es/components/design/views/assemblys/form/select/select-design.vue2.js +18 -15
- package/dist/es/components/design/views/assemblys/object-design.vue.js +28 -20
- package/dist/es/components/design/views/assemblys/page/page-attr-permissions.vue.js +38 -34
- package/dist/es/components/design/views/design/page-event/{config.vue.js → config.vue2.js} +2 -2
- package/dist/es/components/design/views/design/page-event/config.vue3.js +43 -40
- package/dist/es/components/design/views/design/page-event/page-event-container.vue.js +48 -45
- package/dist/es/components/design/views/design/page-event/page-event-content.vue.js +22 -22
- package/dist/es/components/design/views/design/view/components/quick-add-fields.vue.js +67 -63
- package/dist/es/components/design/views/design/view/view-design-display.vue.js +92 -89
- package/dist/es/stores/event-undo-redo-store.d.ts +4 -1
- package/dist/es/stores/event-undo-redo-store.js +5 -2
- package/dist/es/style.css +13 -13
- package/package.json +3 -3
|
@@ -1,13 +1,13 @@
|
|
|
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 c, withCtx as m, vShow as d, unref as v, createTextVNode as f, toDisplayString as p, 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
|
-
import { findDesignItemByUuid as
|
|
5
|
+
import { findDesignItemByUuid as S, getUuidv4 as _, deepCopy as V } from "../../../utils/common-util.js";
|
|
6
6
|
import { usePageContextStore as k } from "../../../../../stores/page-store.js";
|
|
7
|
-
import { undoRedo as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
const A = e2, L =
|
|
7
|
+
import { undoRedo as T } from "../../../../../stores/event-undo-redo-store.js";
|
|
8
|
+
import U from "../../../utils/eventBus.js";
|
|
9
|
+
const F = { style: { margin: "10px" } }, z = { class: "amb-design-tool", style: { "user-select": "none" } }, $ = { class: "amb-design-tool-item" }, j = { style: { "margin-left": "0px", display: "inline-block", width: "39px" } }, N = { class: "amb-design-tool-item", style: { "padding-right": "10px" } }, w = { class: "codemirror", style: { "margin-left": "20px", "margin-top": "-10px" } }, B = e({ __name: "page-event-content", props: { eventForm: {}, configure: {}, customEvent: {}, handleType: {} }, emits: ["changeSelectEvent", "addEvent", "changeSelectStandardEvent"], setup(e2, { expose: B2, emit: J }) {
|
|
10
|
+
const A = e2, L = T(), O = k(), P = t(null), Z = t();
|
|
11
11
|
let I = t();
|
|
12
12
|
const q = E;
|
|
13
13
|
let R = A.customEvent;
|
|
@@ -26,7 +26,7 @@ const z = { style: { margin: "10px" } }, $ = { class: "amb-design-tool", style:
|
|
|
26
26
|
}
|
|
27
27
|
function X() {
|
|
28
28
|
const e3 = { name: "customFunc", isStandard: false, jsContent: "" };
|
|
29
|
-
e3.uuid =
|
|
29
|
+
e3.uuid = _(), Y(e3);
|
|
30
30
|
}
|
|
31
31
|
function Y(e3) {
|
|
32
32
|
e3 = e3 || {}, H.value = e3, D.value = V(e3), P.value && P.value.updateJsContent && P.value.updateJsContent(D.value), L.clearSnapshot(), L.addSnapshot(D), G.value = 1, K.value = 0;
|
|
@@ -72,7 +72,7 @@ const z = { style: { margin: "10px" } }, $ = { class: "amb-design-tool", style:
|
|
|
72
72
|
}
|
|
73
73
|
if (a2) {
|
|
74
74
|
if (Object.assign(a2, n2), e3.customEvents[l2] = a2, "customFunc" !== a2.name && a2.componentUuid) {
|
|
75
|
-
const t3 =
|
|
75
|
+
const t3 = S(e3, a2.componentUuid);
|
|
76
76
|
if (t3 && t3.events) {
|
|
77
77
|
const e4 = t3.events.findIndex((e5) => e5.name == a2.name && e5.componentUuid == a2.componentUuid);
|
|
78
78
|
e4 > -1 && (t3.events[e4] = a2);
|
|
@@ -109,19 +109,19 @@ const z = { style: { margin: "10px" } }, $ = { class: "amb-design-tool", style:
|
|
|
109
109
|
e3.eventName = null, e3.isStandard = false, e3.jsContent = "", e3.remark = "", e3.standardValues = [];
|
|
110
110
|
}
|
|
111
111
|
function le(e3, t2) {
|
|
112
|
-
const n2 = O.pageContext, a2 =
|
|
112
|
+
const n2 = O.pageContext, a2 = S(n2, e3.componentUuid);
|
|
113
113
|
if (a2 && a2.events) {
|
|
114
114
|
const n3 = a2.events.findIndex((t3) => t3.name == e3.name && t3.componentUuid == e3.componentUuid);
|
|
115
115
|
n3 > -1 && (a2.events[n3] = t2);
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
n(() => {
|
|
119
|
-
Z.value = window.innerHeight, I.value = { overflow: "auto", height: Z.value + "px" },
|
|
119
|
+
Z.value = window.innerHeight, I.value = { overflow: "auto", height: Z.value + "px" }, U.$on("clearEvent", (e3) => {
|
|
120
120
|
if (ne(e3), D.value) {
|
|
121
121
|
const t2 = D.value;
|
|
122
122
|
"customFunc" == e3.name ? e3.uuid == t2.uuid && X() : e3.componentUuid == t2.componentUuid && e3.name == t2.name && X();
|
|
123
123
|
}
|
|
124
|
-
}),
|
|
124
|
+
}), U.$on("editEvent", (e3) => {
|
|
125
125
|
let t2 = false;
|
|
126
126
|
if (D.value && ("customFunc" == e3.name ? D.value.uuid == e3.uuid && (t2 = true) : D.value.componentUuid == e3.componentUuid && e3.name == D.value.name && (t2 = true)), t2) return;
|
|
127
127
|
null == e3.jsContent && (e3.jsContent = ""), null == e3.isStandard && (e3.isStandard = false, e3.standardValues = []), e3.isStandard && !e3.standardValues && (e3.standardValues = ["true"]);
|
|
@@ -133,28 +133,28 @@ const z = { style: { margin: "10px" } }, $ = { class: "amb-design-tool", style:
|
|
|
133
133
|
}) : Y(e3);
|
|
134
134
|
});
|
|
135
135
|
}), a(() => {
|
|
136
|
-
|
|
136
|
+
U.$off("clearEvent"), U.$off("editEvent"), ue && clearTimeout(ue), oe && clearTimeout(oe), L.clearSnapshotTimeout();
|
|
137
137
|
}), X();
|
|
138
|
-
let ue = false;
|
|
139
|
-
function
|
|
140
|
-
ue = true, L.undo(D), G.value = L.getTotalLen(), K.value = L.getCurrentIndex(), P.value && P.value.updateJsContent && P.value.updateJsContent(D.value), setTimeout(() => {
|
|
141
|
-
|
|
138
|
+
let ue, oe, se = false;
|
|
139
|
+
function ie() {
|
|
140
|
+
ue && clearTimeout(ue), se = true, L.undo(D), G.value = L.getTotalLen(), K.value = L.getCurrentIndex(), P.value && P.value.updateJsContent && P.value.updateJsContent(D.value), ue = setTimeout(() => {
|
|
141
|
+
se = false;
|
|
142
142
|
}, 100);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
function re() {
|
|
145
|
+
oe && clearTimeout(oe), se = true, L.record(D), G.value = L.getTotalLen(), K.value = L.getCurrentIndex(), P.value && P.value.updateJsContent && P.value.updateJsContent(D.value), oe = setTimeout(() => {
|
|
146
|
+
se = false;
|
|
147
147
|
}, 100);
|
|
148
148
|
}
|
|
149
149
|
return l(() => D, (e3) => {
|
|
150
|
-
|
|
150
|
+
se || L.addSnapshot(D, function() {
|
|
151
151
|
G.value = L.getTotalLen(), K.value = L.getCurrentIndex();
|
|
152
152
|
});
|
|
153
153
|
}, { deep: true }), B2({ resize: function() {
|
|
154
154
|
P.value && P.value.resize && P.value.resize();
|
|
155
155
|
} }), (e3, t2) => {
|
|
156
|
-
const n2 = u("Plus"), a2 = u("el-icon"), l2 = u("el-divider"), x2 = u("Check"), h2 = u("View"), E2 = u("el-text"),
|
|
157
|
-
return s(), o("div",
|
|
156
|
+
const n2 = u("Plus"), a2 = u("el-icon"), l2 = u("el-divider"), x2 = u("Check"), h2 = u("View"), E2 = u("el-text"), S2 = u("el-input"), _2 = u("el-form-item"), V2 = u("el-checkbox"), k2 = u("el-checkbox-group"), T2 = u("el-option"), U2 = u("el-option-group"), B3 = u("el-select"), J2 = u("el-col"), A2 = u("el-row"), L2 = u("el-form");
|
|
157
|
+
return s(), o("div", F, [i("div", z, [i("div", $, [i("label", { class: "amb-page-type", onClick: W }, [r(a2, { size: 18 }, { default: m(() => [r(n2)]), _: 1 }), t2[5] || (t2[5] = i("label", null, "添加自定义方法", -1))]), r(l2, { direction: "vertical" }), c(i("label", j, null, 512), [[d, K.value < 1]]), c(i("label", { class: "amb-page-type", style: { "margin-left": "0px" }, onClick: ie }, t2[6] || (t2[6] = [i("span", { class: "iconfont icon-chexiaozuo", style: { "font-size": "20px" }, title: "撤销" }, null, -1)]), 512), [[d, K.value > 0]]), c(i("label", { class: "amb-page-type", onClick: re }, t2[7] || (t2[7] = [i("span", { class: "iconfont icon-chexiaoyou", style: { "font-size": "20px" }, title: "恢复" }, null, -1)]), 512), [[d, K.value > -1 && K.value + 1 < G.value]])]), c(i("div", N, [i("label", { class: "amb-page-type", onClick: t2[0] || (t2[0] = (e4) => ee()) }, [r(a2, { size: 18 }, { default: m(() => [r(x2)]), _: 1 }), t2[8] || (t2[8] = i("label", null, "确定", -1))]), r(l2, { direction: "vertical" }), i("label", { class: "amb-page-type", style: { "margin-left": "0px" }, onClick: te }, [r(a2, { size: 18 }, { default: m(() => [r(h2)]), _: 1 }), t2[9] || (t2[9] = i("label", null, "清除", -1))])], 512), [[d, D.value.name]])]), r(L2, { class: "amb-design-board", style: { "padding-top": "10px" }, ref_key: "formRef", ref: M, size: "small", model: v(R), "inline-message": "", "label-width": "80px" }, { default: m(() => [r(A2, null, { default: m(() => [r(_2, { label: "名称", style: { "min-width": "280px" }, required: "customFunc" == D.value.name }, { default: m(() => [c(r(E2, { type: "primary" }, { default: m(() => [f(p(D.value.title ? D.value.title + (D.value.componentLabel ? "(" + D.value.componentLabel + ")" : "") : D.value.componentLabel) + "." + p(D.value.name), 1)]), _: 1 }, 512), [[d, D.value.name && "customFunc" != D.value.name]]), c(r(S2, { modelValue: D.value.eventName, "onUpdate:modelValue": t2[1] || (t2[1] = (e4) => D.value.eventName = e4), title: "自定义方法名" }, null, 8, ["modelValue"]), [[d, "customFunc" == D.value.name]])]), _: 1 }, 8, ["required"]), c(r(k2, { modelValue: D.value.standardValues, "onUpdate:modelValue": t2[2] || (t2[2] = (e4) => D.value.standardValues = e4), onChange: Q }, { default: m(() => [r(V2, { value: "true", label: "标准功能" })]), _: 1 }, 8, ["modelValue"]), [[d, "customFunc" != D.value.name]]), c(r(B3, { disabled: !D.value.isStandard, modelValue: D.value.eventName, "onUpdate:modelValue": t2[3] || (t2[3] = (e4) => D.value.eventName = e4), placeholder: "请选择", filterable: "", style: { width: "240px", "margin-left": "10px" } }, { default: m(() => [(s(true), o(g, null, b(v(q), (e4) => (s(), y(U2, { key: e4.label, label: e4.label }, { default: m(() => [(s(true), o(g, null, b(e4.options, (e5) => (s(), y(T2, { key: e5.value, label: e5.label, value: e5.value }, null, 8, ["label", "value"]))), 128))]), _: 2 }, 1032, ["label"]))), 128))]), _: 1 }, 8, ["disabled", "modelValue"]), [[d, "customFunc" != D.value.name]]), r(J2, { span: 10 }, { default: m(() => [r(_2, { label: "描述" }, { default: m(() => [r(S2, { modelValue: D.value.remark, "onUpdate:modelValue": t2[4] || (t2[4] = (e4) => D.value.remark = e4) }, null, 8, ["modelValue"])]), _: 1 })]), _: 1 })]), _: 1 }), c(i("div", w, [r(C, { eventForm: D.value, ref_key: "editorRef", ref: P }, null, 8, ["eventForm"])], 512), [[d, "customFunc" == D.value.name || "customFunc" != D.value.name && !D.value.isStandard]])]), _: 1 }, 8, ["model"])]);
|
|
158
158
|
};
|
|
159
159
|
} });
|
|
160
160
|
export {
|
|
@@ -1,108 +1,112 @@
|
|
|
1
|
-
import { defineComponent as e, ref as l, onMounted as a,
|
|
2
|
-
import { Top as
|
|
3
|
-
import { ElMessageBox as
|
|
4
|
-
import
|
|
5
|
-
import { getUuidv4 as
|
|
6
|
-
import { getFormComponentOptions as
|
|
7
|
-
import { useDraggable as
|
|
8
|
-
const
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as e, ref as l, onMounted as a, onUnmounted as o, resolveComponent as t, createBlock as d, openBlock as u, withCtx as n, createVNode as i, createCommentVNode as m, unref as r, createElementBlock as s, toDisplayString as f, Fragment as p, renderList as c, createElementVNode as b, createTextVNode as v, withDirectives as w, vShow as y } from "vue";
|
|
2
|
+
import { Top as h, Bottom as g, Plus as N, Delete as V } from "@element-plus/icons";
|
|
3
|
+
import { ElMessageBox as k } from "element-plus";
|
|
4
|
+
import T from "../../../assemblys/common/common-variable-bind.vue.js";
|
|
5
|
+
import { getUuidv4 as _ } from "../../../../utils/common-util.js";
|
|
6
|
+
import { getFormComponentOptions as x } from "../../../../utils/assemblys-config.js";
|
|
7
|
+
import { useDraggable as I } from "vue-draggable-plus";
|
|
8
|
+
const C = { key: 0 }, U = { key: 0 }, z = { key: 0 }, B = { style: { display: "flex" } }, E = { key: 0 }, F = { style: { display: "flex" } }, L = { key: 0 }, q = { key: 0 }, O = ["title"], j = { key: 0 }, A = { key: 0 }, M = e({ __name: "quick-add-fields", props: { model: { type: Object, required: true } }, setup(e2, { expose: M2 }) {
|
|
9
|
+
const S = e2, D = l(null), R = l(null);
|
|
10
10
|
l([]);
|
|
11
|
-
const
|
|
11
|
+
const G = l(null);
|
|
12
12
|
a(() => {
|
|
13
|
-
if (
|
|
14
|
-
let e3 =
|
|
15
|
-
e3 && e3.length > 0 && (e3 = e3[0].getElementsByTagName("tbody"), e3 && e3.length > 0 &&
|
|
13
|
+
if (G.value.$el) {
|
|
14
|
+
let e3 = G.value.$el.getElementsByClassName("el-table__body");
|
|
15
|
+
e3 && e3.length > 0 && (e3 = e3[0].getElementsByTagName("tbody"), e3 && e3.length > 0 && I(e3[0], S.model.fieldInfos, { group: "el-table__row", handle: "amb-field-move", animation: 300, forceFallback: true, sort: true, onAdd(e4) {
|
|
16
16
|
} }));
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
const
|
|
20
|
-
for (let e3 = 2; e3 <= 24; e3 += 2)
|
|
21
|
-
const
|
|
22
|
-
function W(e3) {
|
|
23
|
-
}
|
|
19
|
+
const $ = l([{ value: "left", label: "靠左" }, { value: "center", label: "居中" }, { value: "right", label: "靠右" }]), P = l([{ value: "readonly", label: "只读" }, { value: "disabled", label: "禁用" }]), H = l([]);
|
|
20
|
+
for (let e3 = 2; e3 <= 24; e3 += 2) H.value.push({ value: e3, label: e3 });
|
|
21
|
+
const J = [{ value: "required", label: "必填" }, { value: "string", label: "文本" }, { value: "integer", label: "整形" }, { value: "number", label: "数字" }, { value: "boolean", label: "布尔" }, { value: "float", label: "小数" }, { value: "date", label: "日期" }, { value: "email", label: "邮箱" }, { value: "url", label: "网址" }], K = [{ value: "no", label: "不查询" }, { value: "normal", label: "普通查询" }, { value: "advanced", label: "高级查询" }], Q = x(), W = l(null);
|
|
24
22
|
function X(e3) {
|
|
25
23
|
}
|
|
26
24
|
function Y(e3) {
|
|
27
|
-
Q.value = e3.uuid;
|
|
28
25
|
}
|
|
29
|
-
function Z() {
|
|
30
|
-
|
|
31
|
-
const e3 = S.value ? "确定全部设置为可编辑吗?" : "确定要全部取消可编辑吗?";
|
|
32
|
-
V.confirm(e3, "确认", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(({ value: e4 }) => {
|
|
33
|
-
for (let e5 of M.model.fieldInfos) S.value ? e5.componentName || (e5.componentName = "input-text") : e5.componentName = null;
|
|
34
|
-
});
|
|
26
|
+
function Z(e3) {
|
|
27
|
+
W.value = e3.uuid;
|
|
35
28
|
}
|
|
36
29
|
function ee() {
|
|
37
|
-
if (!
|
|
38
|
-
const e3 = D.value ? "
|
|
39
|
-
|
|
40
|
-
for (let e5 of
|
|
30
|
+
if (!S.model.fieldInfos || 0 == S.model.fieldInfos.length) return;
|
|
31
|
+
const e3 = D.value ? "确定全部设置为可编辑吗?" : "确定要全部取消可编辑吗?";
|
|
32
|
+
k.confirm(e3, "确认", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(({ value: e4 }) => {
|
|
33
|
+
for (let e5 of S.model.fieldInfos) D.value ? e5.componentName || (e5.componentName = "input-text") : e5.componentName = null;
|
|
41
34
|
});
|
|
42
35
|
}
|
|
43
36
|
function le() {
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
if (!S.model.fieldInfos || 0 == S.model.fieldInfos.length) return;
|
|
38
|
+
const e3 = R.value ? "确定全部设置为可导出吗?" : "确定要全部取消可导出吗?";
|
|
39
|
+
k.confirm(e3, "确认", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(({ value: e4 }) => {
|
|
40
|
+
for (let e5 of S.model.fieldInfos) R.value ? e5.exportable || (e5.exportable = true) : e5.exportable = false;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function ae() {
|
|
44
|
+
k.confirm("确定要全部清除吗?", "确认", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(({ value: e3 }) => {
|
|
45
|
+
S.model.fieldInfos = [], te(null);
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
let oe;
|
|
49
|
+
function te(e3) {
|
|
50
|
+
oe && clearTimeout(oe);
|
|
51
|
+
const l2 = { uuid: _() };
|
|
52
|
+
"list" == S.model.pageType && (l2.isTable = true);
|
|
53
|
+
const a2 = de(e3);
|
|
54
|
+
a2 > -1 ? S.model.fieldInfos.splice(a2 + 1, 0, l2) : S.model.fieldInfos.push(l2), oe = setTimeout(() => {
|
|
55
|
+
W.value = l2.uuid;
|
|
54
56
|
}, 20);
|
|
55
57
|
}
|
|
56
|
-
function
|
|
58
|
+
function de(e3) {
|
|
57
59
|
let l2 = -1;
|
|
58
60
|
if (!e3) return l2;
|
|
59
|
-
const a2 =
|
|
60
|
-
for (let o2 = 0; o2 < a2; o2++) if (
|
|
61
|
+
const a2 = S.model.fieldInfos.length;
|
|
62
|
+
for (let o2 = 0; o2 < a2; o2++) if (S.model.fieldInfos[o2].uuid == e3.uuid) {
|
|
61
63
|
l2 = o2;
|
|
62
64
|
break;
|
|
63
65
|
}
|
|
64
66
|
return l2;
|
|
65
67
|
}
|
|
66
|
-
return
|
|
68
|
+
return o(() => {
|
|
69
|
+
oe && clearTimeout(oe);
|
|
70
|
+
}), 0 == S.model.fieldInfos.length && te(null), M2({ updateInitFields: function() {
|
|
67
71
|
const e3 = {};
|
|
68
|
-
if (
|
|
72
|
+
if (S.model.modelFields) for (let l3 of S.model.modelFields) e3[l3.dbColumnName] = l3;
|
|
69
73
|
const l2 = {};
|
|
70
|
-
for (let a2 of
|
|
71
|
-
if (
|
|
74
|
+
for (let a2 of S.model.fieldInfos) a2.fieldName && (e3[a2.fieldName] ? l2[a2.fieldName] = true : a2.fieldName = null);
|
|
75
|
+
if (S.model.modelFields) {
|
|
72
76
|
let e4 = false;
|
|
73
|
-
for (let a2 of
|
|
74
|
-
const l3 = { uuid:
|
|
75
|
-
"form" ==
|
|
77
|
+
for (let a2 of S.model.modelFields) if ("ID" != a2.dbColumnName && !a2.edit && !l2[a2.dbColumnName]) {
|
|
78
|
+
const l3 = { uuid: _(), fieldName: a2.dbColumnName, title: a2.alias, width: 8, dataType: a2.dataType };
|
|
79
|
+
"form" == S.model.pageType && ("DATE" == a2.dataType || "TIME" == a2.dataType ? l3.componentName = "datePicker" : "INTEGER" == a2.dataType || "LONG" == a2.dataType || "FLOAT" == a2.dataType || "DOUBLE" == a2.dataType ? l3.componentName = "inputNumber" : "BOOLEAN" == a2.dataType ? l3.componentName = "switch" : "CLOB" == a2.dataType || "BLOB" == a2.dataType ? l3.componentName = "textarea" : "ENUM" == a2.dataType ? l3.componentName = "select" : l3.componentName = "input-text", a2.alias && (a2.alias.includes("备注") || a2.alias.includes("说明")) && (l3.componentName = "textarea", l3.width = 24)), S.model.fieldInfos.push(l3), e4 = true;
|
|
76
80
|
}
|
|
77
81
|
if (e4) {
|
|
78
|
-
const e5 =
|
|
79
|
-
e5.fieldName || e5.title || e5.componentName ||
|
|
82
|
+
const e5 = S.model.fieldInfos[0];
|
|
83
|
+
e5.fieldName || e5.title || e5.componentName || S.model.fieldInfos.splice(0, 1), W.value = S.model.fieldInfos[0].uuid;
|
|
80
84
|
}
|
|
81
85
|
}
|
|
82
86
|
} }), (l2, a2) => {
|
|
83
|
-
const
|
|
84
|
-
return
|
|
85
|
-
let l4 =
|
|
87
|
+
const o2 = t("el-icon"), k2 = t("el-table-column"), _2 = t("el-option"), x2 = t("el-select"), I2 = t("el-input"), M3 = t("el-checkbox"), oe2 = t("el-switch"), ue = t("el-table");
|
|
88
|
+
return u(), d(ue, { size: "small", border: "", "highlight-current-row": "", data: e2.model.fieldInfos, onRowClick: Z, onCellMouseEnter: X, onCellMouseLeave: Y, style: { width: "100%" }, ref_key: "thisRef", ref: G }, { default: n(() => [i(k2, { width: "36" }, { default: n((e3) => [i(o2, { size: "14", style: { cursor: "pointer" }, onClick: (l3) => function(e4) {
|
|
89
|
+
let l4 = de(e4);
|
|
86
90
|
if (l4 < 1) return;
|
|
87
|
-
const a3 =
|
|
91
|
+
const a3 = S.model.fieldInfos;
|
|
88
92
|
[a3[l4 - 1], a3[l4]] = [a3[l4], a3[l4 - 1]];
|
|
89
|
-
}(e3.row) }, { default:
|
|
90
|
-
let l4 =
|
|
91
|
-
const a3 =
|
|
93
|
+
}(e3.row) }, { default: n(() => [i(r(h))]), _: 2 }, 1032, ["onClick"]), i(o2, { size: "14", style: { "margin-left": "2px", cursor: "pointer" }, onClick: (l3) => function(e4) {
|
|
94
|
+
let l4 = de(e4);
|
|
95
|
+
const a3 = S.model.fieldInfos;
|
|
92
96
|
-1 != l4 && a3.length != l4 + 1 && ([a3[l4], a3[l4 + 1]] = [a3[l4 + 1], a3[l4]]);
|
|
93
|
-
}(e3.row) }, { default:
|
|
94
|
-
const l4 =
|
|
95
|
-
l4 > -1 && (
|
|
96
|
-
}(e3.row) }, { default:
|
|
97
|
+
}(e3.row) }, { default: n(() => [i(r(g))]), _: 2 }, 1032, ["onClick"])]), _: 1 }), i(k2, { width: "40", align: "center" }, { header: n((e3) => [i(o2, { size: "14", style: { "margin-left": "2px", cursor: "pointer" }, onClick: ae }, { default: n(() => [i(r(V))]), _: 1 })]), default: n((e3) => [i(o2, { size: "14", style: { cursor: "pointer" }, onClick: (l3) => te(e3.row) }, { default: n(() => [i(r(N))]), _: 2 }, 1032, ["onClick"]), i(o2, { size: "14", style: { "margin-left": "2px", cursor: "pointer" }, onClick: (l3) => function(e4) {
|
|
98
|
+
const l4 = de(e4);
|
|
99
|
+
l4 > -1 && (S.model.fieldInfos.splice(l4, 1), 0 == S.model.fieldInfos.length && te(null));
|
|
100
|
+
}(e3.row) }, { default: n(() => [i(r(V))]), _: 2 }, 1032, ["onClick"])]), _: 1 }), i(k2, { prop: "fieldName", label: "字段", width: "140" }, { default: n((l3) => [l3.row.uuid != W.value ? (u(), s("label", C, f(l3.row.fieldName), 1)) : (u(), d(x2, { key: 1, size: "small", modelValue: l3.row.fieldName, "onUpdate:modelValue": (e3) => l3.row.fieldName = e3, clearable: "", filterable: "", placeholder: "请选择", onChange: (e3) => function(e4) {
|
|
97
101
|
if (!e4.title && e4.fieldName) {
|
|
98
|
-
const l4 =
|
|
102
|
+
const l4 = S.model.modelFields.filter((l5) => l5.dbColumnName == e4.fieldName);
|
|
99
103
|
l4.length > 0 && (e4.title = l4[0].alias);
|
|
100
104
|
}
|
|
101
|
-
}(l3.row) }, { default:
|
|
105
|
+
}(l3.row) }, { default: n(() => [(u(true), s(p, null, c(e2.model.modelFields, (e3) => (u(), d(_2, { label: e3.alias + "(" + e3.dbColumnName + ")", value: e3.dbColumnName }, null, 8, ["label", "value"]))), 256))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"]))]), _: 1 }), i(k2, { prop: "title", label: "标题", width: "140" }, { default: n((e3) => [e3.row.uuid != W.value ? (u(), s("label", U, f(e3.row.title), 1)) : (u(), d(I2, { key: 1, size: "small", modelValue: e3.row.title, "onUpdate:modelValue": (l3) => e3.row.title = l3, clearable: "", placeholder: "请输入" }, null, 8, ["modelValue", "onUpdate:modelValue"]))]), _: 1 }), i(k2, { prop: "querySettingName", label: "查询设置", width: "140" }, { default: n((e3) => [e3.row.uuid != W.value ? (u(), s("label", z, f(e3.row.querySettingName), 1)) : (u(), d(x2, { key: 1, size: "small", modelValue: e3.row.querySettingName, "onUpdate:modelValue": (l3) => e3.row.querySettingName = l3, clearable: "", filterable: "", placeholder: "请选择" }, { default: n(() => [(u(), s(p, null, c(K, (e4) => i(_2, { label: e4.label, value: e4.value }, null, 8, ["label", "value"])), 64))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"]))]), _: 1 }), i(k2, { prop: "exportable", label: "导出", width: "120" }, { header: n(() => [b("div", B, [a2[2] || (a2[2] = v(" 导出 ")), w(i(M3, { modelValue: R.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e3) => R.value = e3), value: "1", label: "全部可导出", size: "small", style: { "margin-left": "6px" }, onChange: le }, null, 8, ["modelValue"]), [[y, "list" == e2.model.pageType]])])]), default: n((e3) => [e3.row.uuid != W.value ? (u(), s("label", E, f(e3.row.exportable), 1)) : (u(), d(oe2, { key: 1, modelValue: e3.row.exportable, "onUpdate:modelValue": (l3) => e3.row.exportable = l3 }, null, 8, ["modelValue", "onUpdate:modelValue"]))]), _: 1 }), i(k2, { prop: "componentName", width: "120" }, { header: n(() => [b("div", F, [a2[3] || (a2[3] = v(" 组件 ")), w(i(M3, { modelValue: D.value, "onUpdate:modelValue": a2[1] || (a2[1] = (e3) => D.value = e3), value: "1", label: "全部可编辑", size: "small", style: { "margin-left": "6px" }, onChange: ee }, null, 8, ["modelValue"]), [[y, "list" == e2.model.pageType]])])]), default: n((e3) => [e3.row.uuid != W.value ? (u(), s("label", L, f(e3.row.componentName), 1)) : (u(), d(x2, { key: 1, size: "small", modelValue: e3.row.componentName, "onUpdate:modelValue": (l3) => e3.row.componentName = l3, clearable: "", filterable: "", placeholder: "请选择" }, { default: n(() => [(u(true), s(p, null, c(r(Q), (e4) => (u(), d(_2, { label: e4.label, value: e4.name }, null, 8, ["label", "value"]))), 256))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"]))]), _: 1 }), i(k2, { prop: "state", label: "状态", width: "70" }, { default: n((e3) => [e3.row.uuid != W.value ? (u(), s("label", q, f(e3.row.state), 1)) : (u(), d(x2, { key: 1, size: "small", disabled: !e3.row.componentName, modelValue: e3.row.state, "onUpdate:modelValue": (l3) => e3.row.state = l3, clearable: "", filterable: "", placeholder: "默认" }, { default: n(() => [(u(true), s(p, null, c(P.value, (e4) => (u(), d(_2, { value: e4.value, label: e4.label }, null, 8, ["value", "label"]))), 256))]), _: 2 }, 1032, ["disabled", "modelValue", "onUpdate:modelValue"]))]), _: 1 }), i(k2, { prop: "valid", label: "校验", width: "120" }, { default: n((e3) => [e3.row.uuid != W.value ? (u(), s("label", { key: 0, title: e3.row.valid }, f(e3.row.valid), 9, O)) : (u(), d(x2, { key: 1, disabled: !e3.row.componentName, size: "small", modelValue: e3.row.valid, "onUpdate:modelValue": (l3) => e3.row.valid = l3, clearable: "", placeholder: "无校验", multiple: "", "collapse-tags": "", "collapse-tags-tooltip": "" }, { default: n(() => [(u(), s(p, null, c(J, (e4, l3) => i(_2, { label: e4.label, value: e4.value }, null, 8, ["label", "value"])), 64))]), _: 2 }, 1032, ["disabled", "modelValue", "onUpdate:modelValue"]))]), _: 1 }), "form" == e2.model.pageType ? (u(), d(k2, { key: 0, prop: "width", label: "宽度(栏数)", width: "75" }, { default: n((e3) => [e3.row.uuid != W.value ? (u(), s("label", j, f(e3.row.width), 1)) : (u(), d(x2, { key: 1, size: "small", modelValue: e3.row.width, "onUpdate:modelValue": (l3) => e3.row.width = l3, clearable: "", placeholder: "请选择" }, { default: n(() => [(u(true), s(p, null, c(H.value, (e4) => (u(), d(_2, { value: e4.value, label: e4.label }, null, 8, ["value", "label"]))), 256))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"]))]), _: 1 })) : m("", true), "list" == e2.model.pageType ? (u(), d(k2, { key: 1, prop: "align", label: "左右对齐", width: "70" }, { default: n((e3) => [e3.row.uuid != W.value ? (u(), s("label", A, f(e3.row.align), 1)) : (u(), d(x2, { key: 1, size: "small", modelValue: e3.row.align, "onUpdate:modelValue": (l3) => e3.row.align = l3, clearable: "", placeholder: "请选择" }, { default: n(() => [(u(true), s(p, null, c($.value, (e4) => (u(), d(_2, { value: e4.value, label: e4.label }, null, 8, ["value", "label"]))), 256))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"]))]), _: 1 })) : m("", true), i(k2, { prop: "value", label: "默认值", width: "120" }, { default: n((e3) => [i(T, { showLabel: e3.row.uuid != W.value || !e3.row.componentName, modelValue: e3.row.value, paramTypes: ["request", "context", "page", "fixed"], "onUpdate:modelValue": (l3) => function(e4, l4) {
|
|
102
106
|
l4.value = e4;
|
|
103
107
|
}(l3, e3.row) }, null, 8, ["showLabel", "modelValue", "onUpdate:modelValue"])]), _: 1 })]), _: 1 }, 8, ["data"]);
|
|
104
108
|
};
|
|
105
109
|
} });
|
|
106
110
|
export {
|
|
107
|
-
|
|
111
|
+
M as default
|
|
108
112
|
};
|