fec-dev-designer 1.1.2 → 5.1.3
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/node_modules/element-plus/{dist/locale → es/locale/lang}/zh-cn.js +0 -1
- package/es/package.json.js +66 -0
- package/es/src/assets/approvalHistory.png.js +4 -0
- package/es/src/assets/logo.png.js +4 -0
- package/es/src/components/DataSourceSelect.vue.js +2 -1
- package/es/src/components/FieldSetMapping.vue.js +245 -108
- package/es/src/components/OptionConfig.vue.js +3 -2
- package/es/src/components/OptionConfig.vue2.js +2 -2
- package/es/src/components/ParamsConfig.vue.js +2 -2
- package/es/src/components/ParamsConfig.vue2.js +31 -32
- package/es/src/components/TemplateSelector.vue.js +101 -81
- package/es/src/components/ValueSelector.vue2.js +49 -39
- package/es/src/layout/aside/HiddenFieldDialog.vue.js +313 -0
- package/es/src/{packages/form → layout/aside}/fieldRecycleBin.vue.js +72 -64
- package/es/src/layout/aside/index.vue.js +47 -50
- package/es/src/layout/header/index.vue.js +95 -84
- package/es/src/layout/index.vue.js +81 -76
- package/es/src/packages/advancedFilter/ValueInput.vue2.js +57 -60
- package/es/src/packages/dataSource/dataSource.vue.js +98 -105
- package/es/src/packages/dialog/index.vue.js +446 -322
- package/es/src/packages/event/index.vue2.js +44 -44
- package/es/src/packages/event/useEventDialog.js +2 -2
- package/es/src/packages/eventFlow/dialog/action/FormSubmit.vue2.js +47 -54
- package/es/src/packages/eventFlow/dialog/action/Page.vue.js +42 -49
- package/es/src/packages/form/aside/index.js +28 -2
- package/es/src/packages/form/aside/roleSelect.js +156 -0
- package/es/src/packages/form/aside/userSelect.js +206 -0
- package/es/src/packages/form/components/ApprovalHistory.vue.js +73 -0
- package/es/src/packages/form/components/ApprovalHistory.vue2.js +4 -0
- package/es/src/packages/form/components/ComponentPreviewWrapper.vue.js +51 -41
- package/es/src/packages/form/components/H2Wrapper.vue.js +13 -10
- package/es/src/packages/form/demo.js +8064 -0
- package/es/src/packages/form/headerBtn.vue.js +120 -99
- package/es/src/packages/form/index.vue.js +206 -180
- package/es/src/packages/form/property/approvalHistory.vue.js +178 -0
- package/es/src/packages/form/property/index.vue.js +23 -22
- package/es/src/packages/form/property/subTable.vue.js +37 -43
- package/es/src/packages/form/property/widgets.vue.js +258 -202
- package/es/src/packages/table/aside/index.js +2 -1
- package/es/src/packages/table/default.js +24 -21
- package/es/src/packages/table/index.vue.js +191 -155
- package/es/src/packages/table/property/widgets.vue.js +63 -47
- package/es/src/packages/table/queryModule/FixedModeConfig.vue.js +76 -77
- package/es/src/packages/table/queryModule/index.vue.js +108 -91
- package/es/src/packages/utils/common.js +33 -29
- package/es/style.css +1 -1
- package/package.json +1 -1
- package/es/src/packages/form/HiddenFieldDialog.vue.js +0 -258
- /package/es/src/{packages/form → layout/aside}/HiddenFieldDialog.vue2.js +0 -0
- /package/es/src/{packages/form → layout/aside}/fieldRecycleBin.vue2.js +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import "../../node_modules/element-plus/theme-chalk/base.css.js";
|
|
2
2
|
import "../../node_modules/element-plus/theme-chalk/el-input.css.js";
|
|
3
3
|
import "../../node_modules/element-plus/theme-chalk/el-button.css.js";
|
|
4
|
-
import { computed as
|
|
5
|
-
import { Plus as _, Delete as
|
|
4
|
+
import { computed as C, openBlock as o, createElementBlock as d, unref as t, createBlock as x, withCtx as p, createTextVNode as u, createElementVNode as e, Fragment as z, renderList as P, createVNode as i } from "vue";
|
|
5
|
+
import { Plus as _, Delete as b } from "../../node_modules/@element-plus/icons-vue/dist/index.js";
|
|
6
6
|
import B from "./ValueSelector.vue2.js";
|
|
7
7
|
import "./ParamsConfig.vue.js";
|
|
8
8
|
import E from "../../_virtual/_plugin-vue_export-helper.js";
|
|
9
9
|
import { ElButton as U } from "../../node_modules/element-plus/es/components/button/index.js";
|
|
10
10
|
import { ElInput as w } from "../../node_modules/element-plus/es/components/input/index.js";
|
|
11
|
-
const
|
|
11
|
+
const N = { class: "params-config-container" }, A = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "params-table"
|
|
14
|
-
},
|
|
14
|
+
}, D = { class: "params-body" }, F = { class: "params-cell key-params" }, I = { class: "params-cell value-params" }, L = { class: "params-cell action-cell" }, S = { class: "params-footer" }, T = {
|
|
15
15
|
__name: "ParamsConfig",
|
|
16
16
|
props: {
|
|
17
17
|
modelValue: {
|
|
@@ -24,12 +24,12 @@ const F = { class: "params-config-container" }, N = {
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
emits: ["update:modelValue"],
|
|
27
|
-
setup(
|
|
28
|
-
const y =
|
|
27
|
+
setup(f, { emit: v }) {
|
|
28
|
+
const y = f, s = C({
|
|
29
29
|
get: () => y.modelValue,
|
|
30
30
|
set: (r) => k("update:modelValue", r)
|
|
31
|
-
}), k =
|
|
32
|
-
function
|
|
31
|
+
}), k = v;
|
|
32
|
+
function c() {
|
|
33
33
|
s.value.push({
|
|
34
34
|
id: Date.now(),
|
|
35
35
|
key: "",
|
|
@@ -41,68 +41,67 @@ const F = { class: "params-config-container" }, N = {
|
|
|
41
41
|
}
|
|
42
42
|
return (r, a) => {
|
|
43
43
|
const m = U, h = w;
|
|
44
|
-
return o(), d("div",
|
|
45
|
-
t(s).length === 0 ? (o(),
|
|
44
|
+
return o(), d("div", N, [
|
|
45
|
+
t(s).length === 0 ? (o(), x(m, {
|
|
46
46
|
key: 0,
|
|
47
47
|
type: "primary",
|
|
48
48
|
size: "small",
|
|
49
49
|
icon: t(_),
|
|
50
50
|
link: "",
|
|
51
|
-
onClick:
|
|
51
|
+
onClick: c
|
|
52
52
|
}, {
|
|
53
|
-
default:
|
|
54
|
-
|
|
53
|
+
default: p(() => [...a[0] || (a[0] = [
|
|
54
|
+
u(" 新增参数 ", -1)
|
|
55
55
|
])]),
|
|
56
56
|
_: 1
|
|
57
|
-
}, 8, ["icon"])) : (o(), d("div",
|
|
57
|
+
}, 8, ["icon"])) : (o(), d("div", A, [
|
|
58
58
|
a[2] || (a[2] = e("div", { class: "params-header" }, [
|
|
59
59
|
e("div", { class: "params-cell key-header" }, "键名"),
|
|
60
60
|
e("div", { class: "params-cell value-header" }, "值"),
|
|
61
61
|
e("div", { class: "params-cell action-header" })
|
|
62
62
|
], -1)),
|
|
63
|
-
e("div",
|
|
64
|
-
(o(!0), d(
|
|
63
|
+
e("div", D, [
|
|
64
|
+
(o(!0), d(z, null, P(t(s), (l, g) => (o(), d("div", {
|
|
65
65
|
key: l.id,
|
|
66
66
|
class: "params-row"
|
|
67
67
|
}, [
|
|
68
|
-
e("div",
|
|
69
|
-
|
|
68
|
+
e("div", F, [
|
|
69
|
+
i(h, {
|
|
70
70
|
modelValue: l.key,
|
|
71
|
-
"onUpdate:modelValue": (
|
|
71
|
+
"onUpdate:modelValue": (n) => l.key = n,
|
|
72
72
|
placeholder: "参数名",
|
|
73
73
|
size: "small"
|
|
74
74
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
75
75
|
]),
|
|
76
76
|
e("div", I, [
|
|
77
|
-
|
|
77
|
+
i(B, {
|
|
78
78
|
modelValue: l.value,
|
|
79
|
-
"onUpdate:modelValue": (
|
|
79
|
+
"onUpdate:modelValue": (n) => l.value = n,
|
|
80
80
|
placeholder: "参数值",
|
|
81
|
-
size: "small"
|
|
82
|
-
|
|
83
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "available-fields"])
|
|
81
|
+
size: "small"
|
|
82
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
84
83
|
]),
|
|
85
84
|
e("div", L, [
|
|
86
|
-
|
|
85
|
+
i(m, {
|
|
87
86
|
type: "danger",
|
|
88
87
|
size: "small",
|
|
89
|
-
icon: t(
|
|
88
|
+
icon: t(b),
|
|
90
89
|
text: "",
|
|
91
|
-
onClick: (
|
|
90
|
+
onClick: (n) => V(g)
|
|
92
91
|
}, null, 8, ["icon", "onClick"])
|
|
93
92
|
])
|
|
94
93
|
]))), 128))
|
|
95
94
|
]),
|
|
96
95
|
e("div", S, [
|
|
97
|
-
|
|
96
|
+
i(m, {
|
|
98
97
|
type: "primary",
|
|
99
98
|
size: "small",
|
|
100
99
|
icon: t(_),
|
|
101
100
|
link: "",
|
|
102
|
-
onClick:
|
|
101
|
+
onClick: c
|
|
103
102
|
}, {
|
|
104
|
-
default:
|
|
105
|
-
|
|
103
|
+
default: p(() => [...a[1] || (a[1] = [
|
|
104
|
+
u(" 新增参数 ", -1)
|
|
106
105
|
])]),
|
|
107
106
|
_: 1
|
|
108
107
|
}, 8, ["icon"])
|
|
@@ -111,7 +110,7 @@ const F = { class: "params-config-container" }, N = {
|
|
|
111
110
|
]);
|
|
112
111
|
};
|
|
113
112
|
}
|
|
114
|
-
}, R = /* @__PURE__ */ E(T, [["__scopeId", "data-v-
|
|
113
|
+
}, R = /* @__PURE__ */ E(T, [["__scopeId", "data-v-097f1353"]]);
|
|
115
114
|
export {
|
|
116
115
|
R as default
|
|
117
116
|
};
|
|
@@ -14,20 +14,20 @@ import "../../node_modules/element-plus/theme-chalk/el-checkbox.css.js";
|
|
|
14
14
|
import "../../node_modules/element-plus/theme-chalk/el-tooltip.css.js";
|
|
15
15
|
import "../../node_modules/element-plus/theme-chalk/el-table-column.css.js";
|
|
16
16
|
import "../../node_modules/element-plus/theme-chalk/el-button.css.js";
|
|
17
|
-
import { computed as P, ref as r, openBlock as
|
|
18
|
-
import { Setting as
|
|
19
|
-
import
|
|
17
|
+
import { computed as P, ref as r, openBlock as B, createElementBlock as j, Fragment as L, createVNode as a, createSlots as D, withCtx as i, unref as w, createElementVNode as z, createTextVNode as C, withKeys as O } from "vue";
|
|
18
|
+
import { Setting as R, Edit as F, Search as J } from "../../node_modules/@element-plus/icons-vue/dist/index.js";
|
|
19
|
+
import M from "../api/index.js";
|
|
20
20
|
import "../../node_modules/element-plus/theme-chalk/el-badge.css.js";
|
|
21
21
|
import "../../node_modules/element-plus/theme-chalk/el-message.css.js";
|
|
22
22
|
import "./TemplateSelector.vue2.js";
|
|
23
|
-
import
|
|
24
|
-
import { ElMessage as
|
|
25
|
-
import { ElButton as
|
|
26
|
-
import { ElInput as
|
|
27
|
-
import { ElTableColumn as
|
|
28
|
-
import { ElPagination as
|
|
29
|
-
import { ElDialog as
|
|
30
|
-
const
|
|
23
|
+
import Q from "../../_virtual/_plugin-vue_export-helper.js";
|
|
24
|
+
import { ElMessage as $ } from "../../node_modules/element-plus/es/components/message/index.js";
|
|
25
|
+
import { ElButton as q } from "../../node_modules/element-plus/es/components/button/index.js";
|
|
26
|
+
import { ElInput as A } from "../../node_modules/element-plus/es/components/input/index.js";
|
|
27
|
+
import { ElTableColumn as G, ElTable as H } from "../../node_modules/element-plus/es/components/table/index.js";
|
|
28
|
+
import { ElPagination as W } from "../../node_modules/element-plus/es/components/pagination/index.js";
|
|
29
|
+
import { ElDialog as X } from "../../node_modules/element-plus/es/components/dialog/index.js";
|
|
30
|
+
const Y = { class: "search-bar" }, Z = { class: "dialog-footer" }, ee = {
|
|
31
31
|
__name: "TemplateSelector",
|
|
32
32
|
props: {
|
|
33
33
|
modelValue: {
|
|
@@ -53,137 +53,157 @@ const H = { class: "search-bar" }, W = { class: "dialog-footer" }, X = {
|
|
|
53
53
|
"update:templateId",
|
|
54
54
|
"confirm"
|
|
55
55
|
],
|
|
56
|
-
setup(
|
|
57
|
-
const
|
|
58
|
-
get: () =>
|
|
59
|
-
set: (t) =>
|
|
60
|
-
}),
|
|
56
|
+
setup(v, { emit: V }) {
|
|
57
|
+
const y = v, d = V, s = P({
|
|
58
|
+
get: () => y.modelValue,
|
|
59
|
+
set: (t) => d("update:modelValue", t)
|
|
60
|
+
}), u = r(!1), c = r(""), _ = r([]), S = r(0), n = r(null), l = r({
|
|
61
61
|
pageNo: 1,
|
|
62
62
|
pageSize: 10
|
|
63
63
|
});
|
|
64
|
+
function b() {
|
|
65
|
+
u.value = !0, n.value = null, f();
|
|
66
|
+
}
|
|
64
67
|
function x() {
|
|
65
|
-
|
|
68
|
+
var m;
|
|
69
|
+
const t = ((m = n.value) == null ? void 0 : m.pkId) || y.templateId, e = window.location.href, p = new URL(e);
|
|
70
|
+
p.searchParams.set("pkId", t);
|
|
71
|
+
const g = p.toString();
|
|
72
|
+
window.open(g, "_blank");
|
|
66
73
|
}
|
|
67
|
-
async function
|
|
74
|
+
async function f() {
|
|
68
75
|
try {
|
|
69
76
|
const t = {
|
|
70
77
|
pageNo: l.value.pageNo,
|
|
71
78
|
pageSize: l.value.pageSize,
|
|
72
|
-
type:
|
|
79
|
+
type: y.templateType
|
|
73
80
|
};
|
|
74
|
-
|
|
75
|
-
const e = await
|
|
76
|
-
|
|
81
|
+
c.value && (t.dynamicQuery = c.value);
|
|
82
|
+
const e = await M.findTemplateByPagePop(t);
|
|
83
|
+
_.value = e.records || e.list || [], S.value = e.total || 0;
|
|
77
84
|
} catch (t) {
|
|
78
|
-
console.error("加载表单列表失败:", t),
|
|
85
|
+
console.error("加载表单列表失败:", t), _.value = [], S.value = 0;
|
|
79
86
|
} finally {
|
|
80
87
|
}
|
|
81
88
|
}
|
|
82
|
-
function
|
|
83
|
-
l.value.pageNo = 1,
|
|
89
|
+
function h() {
|
|
90
|
+
l.value.pageNo = 1, f();
|
|
84
91
|
}
|
|
85
92
|
function N(t) {
|
|
86
93
|
n.value = t;
|
|
87
94
|
}
|
|
88
|
-
function
|
|
89
|
-
l.value.pageSize = t, l.value.pageNo = 1,
|
|
95
|
+
function k(t) {
|
|
96
|
+
l.value.pageSize = t, l.value.pageNo = 1, f();
|
|
90
97
|
}
|
|
91
98
|
function T(t) {
|
|
92
|
-
l.value.pageNo = t,
|
|
99
|
+
l.value.pageNo = t, f();
|
|
93
100
|
}
|
|
94
|
-
function
|
|
101
|
+
function I() {
|
|
95
102
|
if (!n.value) {
|
|
96
|
-
|
|
103
|
+
$.warning("请先选择表单");
|
|
97
104
|
return;
|
|
98
105
|
}
|
|
99
|
-
|
|
106
|
+
s.value = n.value.templateName, d("update:templateKey", n.value.templateKey), d("update:templateId", n.value.pkId), u.value = !1;
|
|
100
107
|
const t = JSON.parse(n.value.context);
|
|
101
|
-
|
|
108
|
+
d("confirm", t);
|
|
102
109
|
}
|
|
103
110
|
return (t, e) => {
|
|
104
|
-
const
|
|
105
|
-
return
|
|
106
|
-
a(
|
|
107
|
-
modelValue:
|
|
108
|
-
"onUpdate:modelValue": e[0] || (e[0] = (o) =>
|
|
109
|
-
placeholder:
|
|
111
|
+
const p = q, g = A, m = G, E = H, U = W, K = X;
|
|
112
|
+
return B(), j(L, null, [
|
|
113
|
+
a(g, {
|
|
114
|
+
modelValue: s.value,
|
|
115
|
+
"onUpdate:modelValue": e[0] || (e[0] = (o) => s.value = o),
|
|
116
|
+
placeholder: v.templateType == "table" ? "请选择列表" : "请选择表单",
|
|
110
117
|
readonly: ""
|
|
111
|
-
}, {
|
|
112
|
-
append:
|
|
113
|
-
a(
|
|
114
|
-
icon:
|
|
115
|
-
onClick:
|
|
118
|
+
}, D({
|
|
119
|
+
append: i(() => [
|
|
120
|
+
a(p, {
|
|
121
|
+
icon: w(R),
|
|
122
|
+
onClick: b
|
|
116
123
|
}, null, 8, ["icon"])
|
|
117
124
|
]),
|
|
118
|
-
_:
|
|
119
|
-
},
|
|
125
|
+
_: 2
|
|
126
|
+
}, [
|
|
127
|
+
s.value ? {
|
|
128
|
+
name: "prepend",
|
|
129
|
+
fn: i(() => [
|
|
130
|
+
a(p, {
|
|
131
|
+
icon: w(F),
|
|
132
|
+
onClick: x
|
|
133
|
+
}, null, 8, ["icon"])
|
|
134
|
+
]),
|
|
135
|
+
key: "0"
|
|
136
|
+
} : void 0
|
|
137
|
+
]), 1032, ["modelValue", "placeholder"]),
|
|
120
138
|
a(K, {
|
|
121
|
-
modelValue:
|
|
122
|
-
"onUpdate:modelValue": e[5] || (e[5] = (o) =>
|
|
139
|
+
modelValue: u.value,
|
|
140
|
+
"onUpdate:modelValue": e[5] || (e[5] = (o) => u.value = o),
|
|
123
141
|
width: "50%",
|
|
124
|
-
title:
|
|
142
|
+
title: v.templateType == "table" ? "选择列表" : "选择表单",
|
|
125
143
|
draggable: "",
|
|
126
144
|
overflow: "",
|
|
127
145
|
"append-to-body": "",
|
|
128
146
|
class: "fec-dev-designer-dialog"
|
|
129
147
|
}, {
|
|
130
|
-
footer:
|
|
131
|
-
|
|
132
|
-
a(
|
|
133
|
-
onClick: e[4] || (e[4] = (o) =>
|
|
148
|
+
footer: i(() => [
|
|
149
|
+
z("div", Z, [
|
|
150
|
+
a(p, {
|
|
151
|
+
onClick: e[4] || (e[4] = (o) => u.value = !1),
|
|
134
152
|
size: "default"
|
|
135
153
|
}, {
|
|
136
|
-
default:
|
|
137
|
-
|
|
154
|
+
default: i(() => [...e[6] || (e[6] = [
|
|
155
|
+
C("取消", -1)
|
|
138
156
|
])]),
|
|
139
157
|
_: 1
|
|
140
158
|
}),
|
|
141
|
-
a(
|
|
159
|
+
a(p, {
|
|
142
160
|
type: "primary",
|
|
143
|
-
onClick:
|
|
161
|
+
onClick: I,
|
|
144
162
|
size: "default"
|
|
145
163
|
}, {
|
|
146
|
-
default:
|
|
147
|
-
|
|
164
|
+
default: i(() => [...e[7] || (e[7] = [
|
|
165
|
+
C("确定", -1)
|
|
148
166
|
])]),
|
|
149
167
|
_: 1
|
|
150
168
|
})
|
|
151
169
|
])
|
|
152
170
|
]),
|
|
153
|
-
default:
|
|
154
|
-
|
|
155
|
-
a(
|
|
156
|
-
modelValue:
|
|
157
|
-
"onUpdate:modelValue": e[1] || (e[1] = (o) =>
|
|
171
|
+
default: i(() => [
|
|
172
|
+
z("div", Y, [
|
|
173
|
+
a(g, {
|
|
174
|
+
modelValue: c.value,
|
|
175
|
+
"onUpdate:modelValue": e[1] || (e[1] = (o) => c.value = o),
|
|
158
176
|
placeholder: "搜索表单名称/表单标识",
|
|
159
177
|
clearable: "",
|
|
160
|
-
onClear:
|
|
161
|
-
onKeyup:
|
|
162
|
-
style: { width: "300px" }
|
|
178
|
+
onClear: h,
|
|
179
|
+
onKeyup: O(h, ["enter"]),
|
|
180
|
+
style: { width: "300px" },
|
|
181
|
+
size: "default"
|
|
163
182
|
}, {
|
|
164
|
-
append:
|
|
165
|
-
a(
|
|
166
|
-
icon:
|
|
167
|
-
onClick:
|
|
183
|
+
append: i(() => [
|
|
184
|
+
a(p, {
|
|
185
|
+
icon: w(J),
|
|
186
|
+
onClick: h
|
|
168
187
|
}, null, 8, ["icon"])
|
|
169
188
|
]),
|
|
170
189
|
_: 1
|
|
171
190
|
}, 8, ["modelValue"])
|
|
172
191
|
]),
|
|
173
|
-
a(
|
|
174
|
-
data:
|
|
192
|
+
a(E, {
|
|
193
|
+
data: _.value,
|
|
175
194
|
"highlight-current-row": "",
|
|
176
195
|
"max-height": "500",
|
|
177
196
|
onCurrentChange: N,
|
|
178
|
-
style: { width: "100%", "margin-top": "10px" }
|
|
197
|
+
style: { width: "100%", "margin-top": "10px" },
|
|
198
|
+
size: "default"
|
|
179
199
|
}, {
|
|
180
|
-
default:
|
|
181
|
-
a(
|
|
200
|
+
default: i(() => [
|
|
201
|
+
a(m, {
|
|
182
202
|
prop: "templateName",
|
|
183
203
|
label: "表单名称",
|
|
184
204
|
"min-width": "200"
|
|
185
205
|
}),
|
|
186
|
-
a(
|
|
206
|
+
a(m, {
|
|
187
207
|
prop: "templateKey",
|
|
188
208
|
label: "表单标识",
|
|
189
209
|
"min-width": "200"
|
|
@@ -191,16 +211,16 @@ const H = { class: "search-bar" }, W = { class: "dialog-footer" }, X = {
|
|
|
191
211
|
]),
|
|
192
212
|
_: 1
|
|
193
213
|
}, 8, ["data"]),
|
|
194
|
-
a(
|
|
214
|
+
a(U, {
|
|
195
215
|
size: "small",
|
|
196
216
|
"current-page": l.value.pageNo,
|
|
197
217
|
"onUpdate:currentPage": e[2] || (e[2] = (o) => l.value.pageNo = o),
|
|
198
218
|
"page-size": l.value.pageSize,
|
|
199
219
|
"onUpdate:pageSize": e[3] || (e[3] = (o) => l.value.pageSize = o),
|
|
200
220
|
"page-sizes": [10, 20, 50, 100],
|
|
201
|
-
total:
|
|
221
|
+
total: S.value,
|
|
202
222
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
203
|
-
onSizeChange:
|
|
223
|
+
onSizeChange: k,
|
|
204
224
|
onCurrentChange: T,
|
|
205
225
|
style: { "margin-top": "20px", "justify-content": "flex-end" }
|
|
206
226
|
}, null, 8, ["current-page", "page-size", "total"])
|
|
@@ -210,7 +230,7 @@ const H = { class: "search-bar" }, W = { class: "dialog-footer" }, X = {
|
|
|
210
230
|
], 64);
|
|
211
231
|
};
|
|
212
232
|
}
|
|
213
|
-
},
|
|
233
|
+
}, Ie = /* @__PURE__ */ Q(ee, [["__scopeId", "data-v-eb9c3061"]]);
|
|
214
234
|
export {
|
|
215
|
-
|
|
235
|
+
Ie as default
|
|
216
236
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { computed as o, openBlock as
|
|
2
|
-
import { ElInputTag as
|
|
3
|
-
import
|
|
4
|
-
import { getEditConfigData as
|
|
1
|
+
import { computed as o, openBlock as g, createBlock as A, resolveDynamicComponent as N, withCtx as x, createVNode as C } from "vue";
|
|
2
|
+
import { ElInputTag as h, ElInput as I } from "element-plus";
|
|
3
|
+
import B from "./ValueSelectorPopover.vue2.js";
|
|
4
|
+
import { getEditConfigData as S, getEditConfigDataFields as $ } from "../packages/utils/common.js";
|
|
5
5
|
import "./ValueSelector.vue.js";
|
|
6
|
-
import
|
|
7
|
-
const
|
|
6
|
+
import z from "../../_virtual/_plugin-vue_export-helper.js";
|
|
7
|
+
const E = {
|
|
8
8
|
__name: "ValueSelector",
|
|
9
9
|
props: {
|
|
10
10
|
// modelValue 的格式:
|
|
@@ -30,65 +30,75 @@ const $ = {
|
|
|
30
30
|
type: Boolean,
|
|
31
31
|
default: !1
|
|
32
32
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
default: () => [],
|
|
37
|
-
validator: (r) => Array.isArray(r)
|
|
33
|
+
size: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "small"
|
|
38
36
|
}
|
|
37
|
+
// // 可选的字段列表(从父组件传入)
|
|
38
|
+
// availableFields: {
|
|
39
|
+
// type: Array,
|
|
40
|
+
// default: () => [],
|
|
41
|
+
// validator: (value) => Array.isArray(value),
|
|
42
|
+
// },
|
|
39
43
|
},
|
|
40
44
|
emits: ["update:modelValue"],
|
|
41
|
-
setup(r, { emit:
|
|
42
|
-
const a = r, i =
|
|
43
|
-
const e =
|
|
45
|
+
setup(r, { emit: f }) {
|
|
46
|
+
const a = r, i = f, c = o(() => a.multiple ? h : I), s = o(() => {
|
|
47
|
+
const e = S();
|
|
44
48
|
return (e == null ? void 0 : e.hiddenFields) || [];
|
|
45
|
-
}),
|
|
49
|
+
}), n = o(() => ($() || []).map((l) => ({
|
|
50
|
+
id: l.id,
|
|
51
|
+
label: l.label,
|
|
52
|
+
fieldName: l.fieldName,
|
|
53
|
+
fieldType: l.fieldType
|
|
54
|
+
}))), v = o(() => {
|
|
46
55
|
if (!a.modelValue)
|
|
47
56
|
return "";
|
|
48
57
|
if (!a.multiple && typeof a.modelValue == "object" && !Array.isArray(a.modelValue)) {
|
|
49
58
|
const e = a.modelValue;
|
|
50
59
|
if (e.label)
|
|
51
60
|
return e.label;
|
|
52
|
-
const l =
|
|
61
|
+
const l = n.value.find((t) => t.id === e.value);
|
|
53
62
|
return (l == null ? void 0 : l.label) || (l == null ? void 0 : l.fieldName) || e.value;
|
|
54
63
|
} else if (!a.multiple && typeof a.modelValue == "string")
|
|
55
64
|
return a.modelValue;
|
|
56
65
|
return "";
|
|
57
|
-
}),
|
|
66
|
+
}), m = o({
|
|
58
67
|
get() {
|
|
59
68
|
return !a.multiple || !Array.isArray(a.modelValue) ? [] : a.modelValue.map((e) => {
|
|
60
69
|
if (e.label)
|
|
61
70
|
return e.label;
|
|
62
|
-
const l =
|
|
71
|
+
const l = n.value.find((t) => t.id === e.value);
|
|
63
72
|
return (l == null ? void 0 : l.label) || (l == null ? void 0 : l.fieldName) || e.value;
|
|
64
73
|
}).filter(Boolean);
|
|
65
74
|
},
|
|
66
75
|
set(e) {
|
|
67
76
|
if (Array.isArray(a.modelValue)) {
|
|
68
77
|
const l = a.modelValue.filter((t) => {
|
|
69
|
-
const
|
|
70
|
-
const u =
|
|
71
|
-
|
|
72
|
-
|
|
78
|
+
const d = t.label || (() => {
|
|
79
|
+
const u = [
|
|
80
|
+
...n.value,
|
|
81
|
+
...s.value
|
|
82
|
+
].find((V) => V.id === t.value);
|
|
73
83
|
return (u == null ? void 0 : u.label) || (u == null ? void 0 : u.fieldName) || t.value;
|
|
74
84
|
})();
|
|
75
|
-
return e.includes(
|
|
85
|
+
return e.includes(d);
|
|
76
86
|
});
|
|
77
87
|
i("update:modelValue", l);
|
|
78
88
|
}
|
|
79
89
|
}
|
|
80
|
-
}),
|
|
90
|
+
}), p = o({
|
|
81
91
|
get() {
|
|
82
|
-
return a.multiple ?
|
|
92
|
+
return a.multiple ? m.value : v.value;
|
|
83
93
|
},
|
|
84
94
|
set(e) {
|
|
85
|
-
a.multiple && Array.isArray(e) ?
|
|
95
|
+
a.multiple && Array.isArray(e) ? m.value = e : !a.multiple && typeof e == "string" && i("update:modelValue", e);
|
|
86
96
|
}
|
|
87
|
-
}),
|
|
97
|
+
}), y = (e) => {
|
|
88
98
|
let l = null;
|
|
89
99
|
if (e.type === "field") {
|
|
90
|
-
const t = [...
|
|
91
|
-
(
|
|
100
|
+
const t = [...n.value, ...s.value].find(
|
|
101
|
+
(d) => d.id === e.value
|
|
92
102
|
);
|
|
93
103
|
l = {
|
|
94
104
|
label: `\${${(t == null ? void 0 : t.label) || (t == null ? void 0 : t.fieldName) || e.value}}`,
|
|
@@ -119,9 +129,9 @@ const $ = {
|
|
|
119
129
|
orgCode: "机构编号",
|
|
120
130
|
orgName: "机构名称"
|
|
121
131
|
})[e] || e;
|
|
122
|
-
return (e, l) => (
|
|
123
|
-
modelValue:
|
|
124
|
-
"onUpdate:modelValue": l[0] || (l[0] = (t) =>
|
|
132
|
+
return (e, l) => (g(), A(N(c.value), {
|
|
133
|
+
modelValue: p.value,
|
|
134
|
+
"onUpdate:modelValue": l[0] || (l[0] = (t) => p.value = t),
|
|
125
135
|
placeholder: r.placeholder,
|
|
126
136
|
disabled: r.disabled,
|
|
127
137
|
readonly: r.readOnly,
|
|
@@ -130,19 +140,19 @@ const $ = {
|
|
|
130
140
|
"collapse-tags-tooltip": "",
|
|
131
141
|
"max-collapse-tags": 1,
|
|
132
142
|
class: "value-selector-input",
|
|
133
|
-
size:
|
|
143
|
+
size: r.size
|
|
134
144
|
}, {
|
|
135
145
|
suffix: x(() => [
|
|
136
|
-
C(
|
|
137
|
-
"available-fields":
|
|
146
|
+
C(B, {
|
|
147
|
+
"available-fields": n.value,
|
|
138
148
|
disabled: r.disabled,
|
|
139
|
-
onConfirm:
|
|
149
|
+
onConfirm: y
|
|
140
150
|
}, null, 8, ["available-fields", "disabled"])
|
|
141
151
|
]),
|
|
142
152
|
_: 1
|
|
143
|
-
}, 8, ["modelValue", "placeholder", "disabled", "readonly", "trigger"]));
|
|
153
|
+
}, 8, ["modelValue", "placeholder", "disabled", "readonly", "trigger", "size"]));
|
|
144
154
|
}
|
|
145
|
-
},
|
|
155
|
+
}, w = /* @__PURE__ */ z(E, [["__scopeId", "data-v-ab1b3ad7"]]);
|
|
146
156
|
export {
|
|
147
|
-
|
|
157
|
+
w as default
|
|
148
158
|
};
|