fec-dev-designer 1.0.3 → 1.0.5
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/es/config-dev.js +7 -5
- package/es/node_modules/@element-plus/icons-vue/dist/index.js +107 -92
- package/es/node_modules/element-plus/es/components/result/index.js +7 -0
- package/es/node_modules/element-plus/es/components/result/src/result.js +34 -0
- package/es/node_modules/element-plus/es/components/result/src/result2.js +93 -0
- package/es/node_modules/element-plus/theme-chalk/el-result.css.js +4 -0
- package/es/src/components/OptionConfig.vue.js +1 -1
- package/es/src/components/ValueSelector.vue2.js +30 -24
- package/es/src/components/ValueSelectorPopover.vue2.js +2 -1
- package/es/src/index.js +6 -4
- package/es/src/layout/aside/index.vue.js +64 -60
- package/es/src/layout/index.vue.js +91 -54
- package/es/src/packages/dataSource/dataSource.vue.js +122 -118
- package/es/src/packages/eventFlow/dialog/action/Page.vue.js +29 -20
- package/es/src/packages/form/aside/index.js +17 -3
- package/es/src/packages/form/components/ComponentPreviewWrapper.vue.js +46 -42
- package/es/src/packages/form/default.js +1 -0
- package/es/src/packages/form/formSetting.vue.js +72 -50
- package/es/src/packages/form/index.vue.js +247 -202
- package/es/src/packages/form/property/blank.vue.js +62 -0
- package/es/src/packages/form/property/index.vue.js +21 -20
- package/es/src/packages/form/property/subTable.vue.js +61 -52
- package/es/src/packages/form/property/widgets.vue.js +280 -173
- package/es/src/packages/table/aside/index.js +1 -0
- package/es/src/packages/table/property/widgets.vue.js +96 -85
- package/es/src/packages/table/queryModule/FixedModeConfig.vue.js +6 -6
- package/es/src/packages/table/tablePagination.vue.js +37 -45
- package/es/src/packages/table/tableSetting.vue.js +12 -13
- package/es/src/store/designer.js +40 -0
- package/es/src/store/index.js +12 -39
- package/es/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { ElInputTag as
|
|
3
|
-
import
|
|
1
|
+
import { computed as o, openBlock as V, createBlock as g, resolveDynamicComponent as A, withCtx as x, createVNode as C } from "vue";
|
|
2
|
+
import { ElInputTag as F, ElInput as N } from "element-plus";
|
|
3
|
+
import h from "./ValueSelectorPopover.vue2.js";
|
|
4
|
+
import { getEditConfigData as I } from "../packages/utils/common.js";
|
|
4
5
|
import "./ValueSelector.vue.js";
|
|
5
6
|
import B from "../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
-
const
|
|
7
|
+
const $ = {
|
|
7
8
|
__name: "ValueSelector",
|
|
8
9
|
props: {
|
|
9
10
|
// modelValue 的格式:
|
|
@@ -38,7 +39,10 @@ const F = {
|
|
|
38
39
|
},
|
|
39
40
|
emits: ["update:modelValue"],
|
|
40
41
|
setup(r, { emit: m }) {
|
|
41
|
-
const a = r,
|
|
42
|
+
const a = r, i = m, p = o(() => a.multiple ? F : N), f = o(() => {
|
|
43
|
+
const e = I();
|
|
44
|
+
return (e == null ? void 0 : e.hiddenFields) || [];
|
|
45
|
+
}), c = o(() => {
|
|
42
46
|
if (!a.modelValue)
|
|
43
47
|
return "";
|
|
44
48
|
if (!a.multiple && typeof a.modelValue == "object" && !Array.isArray(a.modelValue)) {
|
|
@@ -50,7 +54,7 @@ const F = {
|
|
|
50
54
|
} else if (!a.multiple && typeof a.modelValue == "string")
|
|
51
55
|
return a.modelValue;
|
|
52
56
|
return "";
|
|
53
|
-
}), s =
|
|
57
|
+
}), s = o({
|
|
54
58
|
get() {
|
|
55
59
|
return !a.multiple || !Array.isArray(a.modelValue) ? [] : a.modelValue.map((e) => {
|
|
56
60
|
if (e.label)
|
|
@@ -62,28 +66,30 @@ const F = {
|
|
|
62
66
|
set(e) {
|
|
63
67
|
if (Array.isArray(a.modelValue)) {
|
|
64
68
|
const l = a.modelValue.filter((t) => {
|
|
65
|
-
const
|
|
69
|
+
const n = t.label || (() => {
|
|
66
70
|
const u = a.availableFields.find(
|
|
67
71
|
(y) => y.id === t.value
|
|
68
72
|
);
|
|
69
73
|
return (u == null ? void 0 : u.label) || (u == null ? void 0 : u.fieldName) || t.value;
|
|
70
74
|
})();
|
|
71
|
-
return e.includes(
|
|
75
|
+
return e.includes(n);
|
|
72
76
|
});
|
|
73
|
-
|
|
77
|
+
i("update:modelValue", l);
|
|
74
78
|
}
|
|
75
79
|
}
|
|
76
|
-
}), d =
|
|
80
|
+
}), d = o({
|
|
77
81
|
get() {
|
|
78
|
-
return a.multiple ? s.value :
|
|
82
|
+
return a.multiple ? s.value : c.value;
|
|
79
83
|
},
|
|
80
84
|
set(e) {
|
|
81
|
-
a.multiple && Array.isArray(e) ? s.value = e : !a.multiple && typeof e == "string" &&
|
|
85
|
+
a.multiple && Array.isArray(e) ? s.value = e : !a.multiple && typeof e == "string" && i("update:modelValue", e);
|
|
82
86
|
}
|
|
83
|
-
}),
|
|
87
|
+
}), v = (e) => {
|
|
84
88
|
let l = null;
|
|
85
89
|
if (e.type === "field") {
|
|
86
|
-
const t = a.availableFields.find(
|
|
90
|
+
const t = [...a.availableFields, ...f.value].find(
|
|
91
|
+
(n) => n.id === e.value
|
|
92
|
+
);
|
|
87
93
|
l = {
|
|
88
94
|
label: `\${${(t == null ? void 0 : t.label) || (t == null ? void 0 : t.fieldName) || e.value}}`,
|
|
89
95
|
type: "field",
|
|
@@ -91,7 +97,7 @@ const F = {
|
|
|
91
97
|
};
|
|
92
98
|
} else
|
|
93
99
|
e.type === "userInfo" ? l = {
|
|
94
|
-
label: `\${用户信息: ${
|
|
100
|
+
label: `\${用户信息: ${b(e.value)}}`,
|
|
95
101
|
type: "userInfo",
|
|
96
102
|
value: e.value
|
|
97
103
|
} : e.type === "urlParam" && (l = {
|
|
@@ -102,10 +108,10 @@ const F = {
|
|
|
102
108
|
if (l)
|
|
103
109
|
if (a.multiple) {
|
|
104
110
|
const t = Array.isArray(a.modelValue) ? a.modelValue : [];
|
|
105
|
-
t.some((u) => u.value === l.value) ||
|
|
111
|
+
t.some((u) => u.value === l.value) || i("update:modelValue", [...t, l]);
|
|
106
112
|
} else
|
|
107
|
-
|
|
108
|
-
},
|
|
113
|
+
i("update:modelValue", l);
|
|
114
|
+
}, b = (e) => ({
|
|
109
115
|
userCode: "用户编号",
|
|
110
116
|
userName: "用户名称",
|
|
111
117
|
roleCode: "角色编号",
|
|
@@ -113,7 +119,7 @@ const F = {
|
|
|
113
119
|
orgCode: "机构编号",
|
|
114
120
|
orgName: "机构名称"
|
|
115
121
|
})[e] || e;
|
|
116
|
-
return (e, l) => (
|
|
122
|
+
return (e, l) => (V(), g(A(p.value), {
|
|
117
123
|
modelValue: d.value,
|
|
118
124
|
"onUpdate:modelValue": l[0] || (l[0] = (t) => d.value = t),
|
|
119
125
|
placeholder: r.placeholder,
|
|
@@ -126,17 +132,17 @@ const F = {
|
|
|
126
132
|
class: "value-selector-input",
|
|
127
133
|
size: "small"
|
|
128
134
|
}, {
|
|
129
|
-
suffix:
|
|
130
|
-
|
|
135
|
+
suffix: x(() => [
|
|
136
|
+
C(h, {
|
|
131
137
|
"available-fields": r.availableFields,
|
|
132
138
|
disabled: r.disabled,
|
|
133
|
-
onConfirm:
|
|
139
|
+
onConfirm: v
|
|
134
140
|
}, null, 8, ["available-fields", "disabled"])
|
|
135
141
|
]),
|
|
136
142
|
_: 1
|
|
137
143
|
}, 8, ["modelValue", "placeholder", "disabled", "readonly", "trigger"]));
|
|
138
144
|
}
|
|
139
|
-
},
|
|
145
|
+
}, D = /* @__PURE__ */ B($, [["__scopeId", "data-v-a452b81a"]]);
|
|
140
146
|
export {
|
|
141
|
-
|
|
147
|
+
D as default
|
|
142
148
|
};
|
|
@@ -36,6 +36,7 @@ const Y = { class: "value-selector-tabs" }, Z = { class: "field-group-label" },
|
|
|
36
36
|
const o = q();
|
|
37
37
|
return (o == null ? void 0 : o.hiddenFields) || [];
|
|
38
38
|
}), S = y(() => {
|
|
39
|
+
debugger;
|
|
39
40
|
const o = (_.availableFields || []).filter(
|
|
40
41
|
(n) => !n.isHidden
|
|
41
42
|
), e = $.value.map((n) => ({
|
|
@@ -257,7 +258,7 @@ const Y = { class: "value-selector-tabs" }, Z = { class: "field-group-label" },
|
|
|
257
258
|
}, 8, ["visible"]);
|
|
258
259
|
};
|
|
259
260
|
}
|
|
260
|
-
}, Ie = /* @__PURE__ */ G(te, [["__scopeId", "data-v-
|
|
261
|
+
}, Ie = /* @__PURE__ */ G(te, [["__scopeId", "data-v-e34dd724"]]);
|
|
261
262
|
export {
|
|
262
263
|
Ie as default
|
|
263
264
|
};
|
package/es/src/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import t from "./layout/index.vue.js";
|
|
2
2
|
import "./style/index.css.js";
|
|
3
3
|
import "../node_modules/vxe-table/lib/style.css.js";
|
|
4
|
-
|
|
4
|
+
import e from "./store/designer.js";
|
|
5
|
+
const r = (o) => {
|
|
5
6
|
o.component("fecDevDesigner", t);
|
|
6
|
-
},
|
|
7
|
-
install:
|
|
7
|
+
}, s = {
|
|
8
|
+
install: r,
|
|
9
|
+
devStore: e
|
|
8
10
|
};
|
|
9
11
|
export {
|
|
10
|
-
|
|
12
|
+
s as default
|
|
11
13
|
};
|
|
@@ -3,44 +3,46 @@ import "../../../node_modules/element-plus/theme-chalk/el-aside.css.js";
|
|
|
3
3
|
import "../../../node_modules/element-plus/theme-chalk/el-badge.css.js";
|
|
4
4
|
import "../../../node_modules/element-plus/theme-chalk/el-collapse.css.js";
|
|
5
5
|
import "../../../node_modules/element-plus/theme-chalk/el-collapse-item.css.js";
|
|
6
|
-
import { computed as u, ref as g, openBlock as s, createBlock as
|
|
7
|
-
import { useStore as
|
|
6
|
+
import { computed as u, ref as g, openBlock as s, createBlock as c, withCtx as a, createElementVNode as l, createVNode as n, createElementBlock as d, Fragment as E, renderList as k, unref as m, toDisplayString as b, createCommentVNode as p } from "vue";
|
|
7
|
+
import { useStore as $ } from "vuex";
|
|
8
8
|
import x from "../../packages/utils/eventBus.js";
|
|
9
|
-
import { VueDraggable as
|
|
10
|
-
import { Calendar as
|
|
11
|
-
import { getEditConfigData as C, setSelectedItem as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
9
|
+
import { VueDraggable as j } from "../../../node_modules/vue-draggable-plus/dist/vue-draggable-plus.js";
|
|
10
|
+
import { Calendar as q, DeleteFilled as z, Hide as G } from "../../../node_modules/@element-plus/icons-vue/dist/index.js";
|
|
11
|
+
import { getEditConfigData as C, setSelectedItem as J } from "../../packages/utils/common.js";
|
|
12
|
+
import K from "../../packages/table/aside/index.js";
|
|
13
|
+
import O from "../../packages/form/aside/index.js";
|
|
14
|
+
import P from "../../packages/form/fieldRecycleBin.vue.js";
|
|
15
|
+
import Q from "../../packages/form/HiddenFieldDialog.vue.js";
|
|
16
|
+
import { throttle as W } from "../../../node_modules/@vexip-ui/utils/dist/index.js";
|
|
16
17
|
import "./index.vue2.js";
|
|
17
|
-
import
|
|
18
|
-
import { ElIcon as
|
|
19
|
-
import { ElCollapseItem as
|
|
20
|
-
import { ElBadge as
|
|
21
|
-
import { ElAside as
|
|
22
|
-
const
|
|
18
|
+
import X from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
19
|
+
import { ElIcon as Y } from "../../../node_modules/element-plus/es/components/icon/index.js";
|
|
20
|
+
import { ElCollapseItem as Z, ElCollapse as ee } from "../../../node_modules/element-plus/es/components/collapse/index.js";
|
|
21
|
+
import { ElBadge as te } from "../../../node_modules/element-plus/es/components/badge/index.js";
|
|
22
|
+
import { ElAside as oe } from "../../../node_modules/element-plus/es/components/container/index.js";
|
|
23
|
+
const le = { class: "dev-designer-aside" }, ne = { class: "components-item" }, se = { class: "menu-components-item" }, ae = { class: "components-item-label" }, ie = {
|
|
23
24
|
key: 0,
|
|
24
25
|
class: "table-item"
|
|
25
|
-
},
|
|
26
|
+
}, re = { class: "widgets" }, de = { class: "field-label" }, me = {
|
|
26
27
|
key: 0,
|
|
27
28
|
class: "aside-footer"
|
|
28
|
-
},
|
|
29
|
+
}, ue = {
|
|
29
30
|
__name: "index",
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
emits: ["onFormDragMove"],
|
|
32
|
+
setup(ce, { emit: B }) {
|
|
33
|
+
const S = B, i = $(), T = u(() => {
|
|
34
|
+
switch (i.getters.editingType) {
|
|
33
35
|
case "table":
|
|
34
|
-
return
|
|
36
|
+
return K;
|
|
35
37
|
case "form":
|
|
36
|
-
return
|
|
38
|
+
return O;
|
|
37
39
|
}
|
|
38
40
|
return null;
|
|
39
|
-
}), V = u(() =>
|
|
41
|
+
}), V = u(() => i.getters.editingType), y = g(["basic", "advanced"]), f = g(!1), _ = g(!1), F = u(() => {
|
|
40
42
|
var e;
|
|
41
43
|
const t = C();
|
|
42
44
|
return ((e = t == null ? void 0 : t.deletedFields) == null ? void 0 : e.length) || 0;
|
|
43
|
-
}),
|
|
45
|
+
}), h = u(() => {
|
|
44
46
|
var e;
|
|
45
47
|
const t = C();
|
|
46
48
|
return ((e = t == null ? void 0 : t.hiddenFields) == null ? void 0 : e.length) || 0;
|
|
@@ -52,64 +54,66 @@ const Z = { class: "dev-designer-aside" }, ee = { class: "components-item" }, te
|
|
|
52
54
|
type: "widgets"
|
|
53
55
|
};
|
|
54
56
|
}
|
|
55
|
-
function
|
|
56
|
-
|
|
57
|
+
function M(t) {
|
|
58
|
+
J(t.clonedData), i.getters.editingType == "form" && x.emit("onFormDragEnd", t);
|
|
57
59
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
const N = W((t) => (i.getters.editingType == "form" && S("onFormDragMove", t), !0), 50);
|
|
61
|
+
function U(t) {
|
|
62
|
+
i.getters.editingType == "form" && x.emit("onFormDragStart", t);
|
|
60
63
|
}
|
|
61
|
-
function
|
|
64
|
+
function I() {
|
|
62
65
|
f.value = !0;
|
|
63
66
|
}
|
|
64
|
-
function
|
|
67
|
+
function A() {
|
|
65
68
|
_.value = !0;
|
|
66
69
|
}
|
|
67
70
|
return (t, e) => {
|
|
68
|
-
const v =
|
|
69
|
-
return s(),
|
|
71
|
+
const v = Y, H = Z, L = ee, D = te, R = oe;
|
|
72
|
+
return s(), c(R, { class: "root-aside" }, {
|
|
70
73
|
default: a(() => [
|
|
71
|
-
l("div",
|
|
72
|
-
n(
|
|
74
|
+
l("div", le, [
|
|
75
|
+
n(L, {
|
|
73
76
|
modelValue: y.value,
|
|
74
77
|
"onUpdate:modelValue": e[0] || (e[0] = (o) => y.value = o)
|
|
75
78
|
}, {
|
|
76
79
|
default: a(() => [
|
|
77
|
-
(s(!0), d(
|
|
80
|
+
(s(!0), d(E, null, k(T.value, (o) => (s(), c(H, {
|
|
78
81
|
title: o.title,
|
|
79
82
|
name: o.name
|
|
80
83
|
}, {
|
|
81
84
|
default: a(() => [
|
|
82
|
-
n(
|
|
85
|
+
n(m(j), {
|
|
83
86
|
modelValue: o.children,
|
|
84
|
-
"onUpdate:modelValue": (
|
|
87
|
+
"onUpdate:modelValue": (r) => o.children = r,
|
|
85
88
|
animation: 150,
|
|
86
89
|
ghostClass: "ghost",
|
|
87
90
|
group: { name: "dev", pull: "clone", put: !1 },
|
|
88
91
|
clone: w,
|
|
89
|
-
onEnd:
|
|
90
|
-
onMove:
|
|
92
|
+
onEnd: M,
|
|
93
|
+
onMove: m(N),
|
|
94
|
+
onStart: U,
|
|
91
95
|
sort: !1,
|
|
92
96
|
class: "components-list"
|
|
93
97
|
}, {
|
|
94
98
|
default: a(() => [
|
|
95
|
-
(s(!0), d(
|
|
96
|
-
l("div",
|
|
99
|
+
(s(!0), d(E, null, k(o.children, (r) => (s(), d("div", ne, [
|
|
100
|
+
l("div", se, [
|
|
97
101
|
n(v, { class: "components-item-icon" }, {
|
|
98
102
|
default: a(() => [
|
|
99
|
-
n(
|
|
103
|
+
n(m(q))
|
|
100
104
|
]),
|
|
101
105
|
_: 1
|
|
102
106
|
}),
|
|
103
|
-
l("span",
|
|
107
|
+
l("span", ae, b(r.label), 1)
|
|
104
108
|
]),
|
|
105
|
-
V.value == "table" ? (s(), d("div",
|
|
106
|
-
l("div",
|
|
107
|
-
l("div",
|
|
109
|
+
V.value == "table" ? (s(), d("div", ie, [
|
|
110
|
+
l("div", re, b(r.label), 1),
|
|
111
|
+
l("div", de, b(r.fieldName), 1)
|
|
108
112
|
])) : p("", !0)
|
|
109
113
|
]))), 256))
|
|
110
114
|
]),
|
|
111
115
|
_: 2
|
|
112
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])
|
|
116
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "onMove"])
|
|
113
117
|
]),
|
|
114
118
|
_: 2
|
|
115
119
|
}, 1032, ["title", "name"]))), 256))
|
|
@@ -117,21 +121,21 @@ const Z = { class: "dev-designer-aside" }, ee = { class: "components-item" }, te
|
|
|
117
121
|
_: 1
|
|
118
122
|
}, 8, ["modelValue"])
|
|
119
123
|
]),
|
|
120
|
-
V.value == "form" ? (s(), d("div",
|
|
124
|
+
V.value == "form" ? (s(), d("div", me, [
|
|
121
125
|
l("div", {
|
|
122
126
|
class: "footer-btn recycle-btn",
|
|
123
|
-
onClick:
|
|
127
|
+
onClick: I
|
|
124
128
|
}, [
|
|
125
129
|
n(v, { class: "btn-icon" }, {
|
|
126
130
|
default: a(() => [
|
|
127
|
-
n(
|
|
131
|
+
n(m(z))
|
|
128
132
|
]),
|
|
129
133
|
_: 1
|
|
130
134
|
}),
|
|
131
135
|
e[3] || (e[3] = l("span", { class: "btn-text" }, "字段回收站", -1)),
|
|
132
|
-
|
|
136
|
+
F.value > 0 ? (s(), c(D, {
|
|
133
137
|
key: 0,
|
|
134
|
-
value:
|
|
138
|
+
value: F.value,
|
|
135
139
|
max: 99,
|
|
136
140
|
class: "btn-badge"
|
|
137
141
|
}, null, 8, ["value"])) : p("", !0)
|
|
@@ -139,28 +143,28 @@ const Z = { class: "dev-designer-aside" }, ee = { class: "components-item" }, te
|
|
|
139
143
|
e[5] || (e[5] = l("div", { class: "footer-divider" }, null, -1)),
|
|
140
144
|
l("div", {
|
|
141
145
|
class: "footer-btn hidden-field-btn",
|
|
142
|
-
onClick:
|
|
146
|
+
onClick: A
|
|
143
147
|
}, [
|
|
144
148
|
n(v, { class: "btn-icon" }, {
|
|
145
149
|
default: a(() => [
|
|
146
|
-
n(
|
|
150
|
+
n(m(G))
|
|
147
151
|
]),
|
|
148
152
|
_: 1
|
|
149
153
|
}),
|
|
150
154
|
e[4] || (e[4] = l("span", { class: "btn-text" }, "隐藏域", -1)),
|
|
151
|
-
|
|
155
|
+
h.value > 0 ? (s(), c(D, {
|
|
152
156
|
key: 0,
|
|
153
|
-
value:
|
|
157
|
+
value: h.value,
|
|
154
158
|
max: 99,
|
|
155
159
|
class: "btn-badge"
|
|
156
160
|
}, null, 8, ["value"])) : p("", !0)
|
|
157
161
|
])
|
|
158
162
|
])) : p("", !0),
|
|
159
|
-
n(
|
|
163
|
+
n(P, {
|
|
160
164
|
modelValue: f.value,
|
|
161
165
|
"onUpdate:modelValue": e[1] || (e[1] = (o) => f.value = o)
|
|
162
166
|
}, null, 8, ["modelValue"]),
|
|
163
|
-
n(
|
|
167
|
+
n(Q, {
|
|
164
168
|
modelValue: _.value,
|
|
165
169
|
"onUpdate:modelValue": e[2] || (e[2] = (o) => _.value = o)
|
|
166
170
|
}, null, 8, ["modelValue"])
|
|
@@ -169,7 +173,7 @@ const Z = { class: "dev-designer-aside" }, ee = { class: "components-item" }, te
|
|
|
169
173
|
});
|
|
170
174
|
};
|
|
171
175
|
}
|
|
172
|
-
},
|
|
176
|
+
}, Ie = /* @__PURE__ */ X(ue, [["__scopeId", "data-v-4e1d5565"]]);
|
|
173
177
|
export {
|
|
174
|
-
|
|
178
|
+
Ie as default
|
|
175
179
|
};
|
|
@@ -1,97 +1,134 @@
|
|
|
1
1
|
import "../../node_modules/element-plus/theme-chalk/base.css.js";
|
|
2
|
+
import "../../node_modules/element-plus/theme-chalk/el-result.css.js";
|
|
3
|
+
import "../../node_modules/element-plus/theme-chalk/el-button.css.js";
|
|
2
4
|
import "../../node_modules/element-plus/theme-chalk/el-container.css.js";
|
|
3
5
|
import "../../node_modules/element-plus/theme-chalk/el-aside.css.js";
|
|
4
6
|
import "../../node_modules/element-plus/theme-chalk/el-footer.css.js";
|
|
5
7
|
import "../../node_modules/element-plus/theme-chalk/el-header.css.js";
|
|
6
8
|
import "../../node_modules/element-plus/theme-chalk/el-main.css.js";
|
|
7
9
|
import "../../node_modules/element-plus/theme-chalk/el-config-provider.css.js";
|
|
8
|
-
import { ref as
|
|
9
|
-
import { useStore as
|
|
10
|
-
import { useRoute as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { setEditConfigData as
|
|
10
|
+
import { ref as m, computed as w, openBlock as u, createBlock as d, withCtx as r, createVNode as o, unref as p, resolveDynamicComponent as D, createElementBlock as E, createTextVNode as N, createCommentVNode as B } from "vue";
|
|
11
|
+
import { useStore as T } from "vuex";
|
|
12
|
+
import { useRoute as O, useRouter as R } from "vue-router";
|
|
13
|
+
import A from "./aside/index.vue.js";
|
|
14
|
+
import F from "./header/index.vue.js";
|
|
15
|
+
import M from "./property/index.vue.js";
|
|
16
|
+
import S from "../packages/table/index.vue.js";
|
|
17
|
+
import V from "../packages/form/index.vue.js";
|
|
18
|
+
import J from "../../node_modules/element-plus/dist/locale/zh-cn.js";
|
|
19
|
+
import { setEditConfigData as v, setSelectedItem as K, setHoverItem as L } from "../packages/utils/common.js";
|
|
18
20
|
import y from "../api/index.js";
|
|
19
|
-
import { defaultTableConfig as
|
|
20
|
-
import { defaultFormConfig as
|
|
21
|
+
import { defaultTableConfig as P } from "../packages/table/default.js";
|
|
22
|
+
import { defaultFormConfig as W } from "../packages/form/default.js";
|
|
21
23
|
import "./index.vue2.js";
|
|
22
|
-
import
|
|
23
|
-
import { ElConfigProvider as
|
|
24
|
-
import { ElMain as
|
|
25
|
-
|
|
24
|
+
import q from "../../_virtual/_plugin-vue_export-helper.js";
|
|
25
|
+
import { ElConfigProvider as z } from "../../node_modules/element-plus/es/components/config-provider/index.js";
|
|
26
|
+
import { ElMain as H, ElContainer as $ } from "../../node_modules/element-plus/es/components/container/index.js";
|
|
27
|
+
import { ElButton as j } from "../../node_modules/element-plus/es/components/button/index.js";
|
|
28
|
+
import { ElResult as G } from "../../node_modules/element-plus/es/components/result/index.js";
|
|
29
|
+
const Q = {
|
|
30
|
+
key: 1,
|
|
31
|
+
class: "init-error-container"
|
|
32
|
+
}, U = {
|
|
26
33
|
__name: "index",
|
|
27
|
-
setup(
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
setup(X) {
|
|
35
|
+
const l = T(), g = O(), k = R(), f = m("table"), c = g.query.pkId, n = m(0), _ = m(null);
|
|
36
|
+
function h() {
|
|
37
|
+
window.history.length > 1 ? k.back() : window.close();
|
|
38
|
+
}
|
|
39
|
+
c ? y.login4dev().then((i) => {
|
|
40
|
+
l.commit("set_token", i.token), l.commit("set_refreshToken", i.refreshToken), y.getById(c).then((e) => {
|
|
41
|
+
const s = e.templateName, a = e.templateKey;
|
|
42
|
+
if (f.value = e.type, f.value === "table") {
|
|
43
|
+
const t = m({
|
|
44
|
+
pkId: c,
|
|
45
|
+
templateName: s,
|
|
36
46
|
templateKey: a,
|
|
37
|
-
...
|
|
47
|
+
...P,
|
|
38
48
|
...JSON.parse(e.context)
|
|
39
49
|
});
|
|
40
|
-
|
|
41
|
-
} else if (
|
|
42
|
-
const t =
|
|
43
|
-
pkId:
|
|
44
|
-
templateName:
|
|
50
|
+
v(t.value), n.value = 1;
|
|
51
|
+
} else if (f.value === "form") {
|
|
52
|
+
const t = m({
|
|
53
|
+
pkId: c,
|
|
54
|
+
templateName: s,
|
|
45
55
|
templateKey: a,
|
|
46
|
-
...
|
|
56
|
+
...W,
|
|
47
57
|
...JSON.parse(e.context)
|
|
48
58
|
});
|
|
49
|
-
|
|
59
|
+
v(t.value), n.value = 1;
|
|
50
60
|
}
|
|
51
|
-
|
|
61
|
+
l.commit("set_editing_type", e.type);
|
|
52
62
|
});
|
|
53
|
-
});
|
|
54
|
-
const
|
|
55
|
-
switch (
|
|
63
|
+
}) : n.value = -1;
|
|
64
|
+
const b = w(() => {
|
|
65
|
+
switch (l.getters.editingType) {
|
|
56
66
|
case "table":
|
|
57
|
-
return
|
|
67
|
+
return S;
|
|
58
68
|
case "form":
|
|
59
|
-
return
|
|
69
|
+
return V;
|
|
60
70
|
}
|
|
61
71
|
return null;
|
|
62
72
|
});
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
73
|
+
K(null), L(null);
|
|
74
|
+
function x(i) {
|
|
75
|
+
var e;
|
|
76
|
+
(e = _.value) == null || e.onFormDragMove(i);
|
|
77
|
+
}
|
|
78
|
+
return (i, e) => {
|
|
79
|
+
const s = z, a = H, t = $, C = j, I = G;
|
|
80
|
+
return n.value == 1 ? (u(), d(t, {
|
|
66
81
|
key: 0,
|
|
67
82
|
style: { "flex-direction": "column", height: "100%" }
|
|
68
83
|
}, {
|
|
69
|
-
default:
|
|
70
|
-
o(
|
|
84
|
+
default: r(() => [
|
|
85
|
+
o(p(F)),
|
|
71
86
|
o(t, { class: "inner-container" }, {
|
|
72
|
-
default:
|
|
73
|
-
o(
|
|
87
|
+
default: r(() => [
|
|
88
|
+
o(p(A), { onOnFormDragMove: x }),
|
|
74
89
|
o(a, { class: "root-main" }, {
|
|
75
|
-
default:
|
|
76
|
-
o(
|
|
77
|
-
default:
|
|
78
|
-
(u(),
|
|
90
|
+
default: r(() => [
|
|
91
|
+
o(s, { locale: p(J) }, {
|
|
92
|
+
default: r(() => [
|
|
93
|
+
(u(), d(D(b.value), {
|
|
94
|
+
ref_key: "compRef",
|
|
95
|
+
ref: _
|
|
96
|
+
}, null, 512))
|
|
79
97
|
]),
|
|
80
98
|
_: 1
|
|
81
99
|
}, 8, ["locale"])
|
|
82
100
|
]),
|
|
83
101
|
_: 1
|
|
84
102
|
}),
|
|
85
|
-
o(
|
|
103
|
+
o(p(M))
|
|
86
104
|
]),
|
|
87
105
|
_: 1
|
|
88
106
|
})
|
|
89
107
|
]),
|
|
90
108
|
_: 1
|
|
91
|
-
})) :
|
|
109
|
+
})) : n.value == -1 ? (u(), E("div", Q, [
|
|
110
|
+
o(I, {
|
|
111
|
+
icon: "warning",
|
|
112
|
+
title: "缺少模板ID",
|
|
113
|
+
"sub-title": "请提供有效的模板ID(pkId)参数"
|
|
114
|
+
}, {
|
|
115
|
+
extra: r(() => [
|
|
116
|
+
o(C, {
|
|
117
|
+
type: "primary",
|
|
118
|
+
onClick: h
|
|
119
|
+
}, {
|
|
120
|
+
default: r(() => [...e[0] || (e[0] = [
|
|
121
|
+
N("返回", -1)
|
|
122
|
+
])]),
|
|
123
|
+
_: 1
|
|
124
|
+
})
|
|
125
|
+
]),
|
|
126
|
+
_: 1
|
|
127
|
+
})
|
|
128
|
+
])) : B("", !0);
|
|
92
129
|
};
|
|
93
130
|
}
|
|
94
|
-
},
|
|
131
|
+
}, De = /* @__PURE__ */ q(U, [["__scopeId", "data-v-9ea74b78"]]);
|
|
95
132
|
export {
|
|
96
|
-
|
|
133
|
+
De as default
|
|
97
134
|
};
|