liyu-pc-base 1.0.1002 → 1.0.1004
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.
|
@@ -8,18 +8,18 @@ import { t as h } from "./RemoteSelectPro-CtOkFjzA.js";
|
|
|
8
8
|
import "./components-4RFKo1I1.js";
|
|
9
9
|
import { c as g, f as _, i as v } from "./TinymceEditor-B6KX-4ep.js";
|
|
10
10
|
import { a as y, o as b } from "./tablePro-sD7FsU6a.js";
|
|
11
|
-
import { Fragment as x, computed as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createSlots as D, createTextVNode as O, createVNode as k, defineComponent as A, mergeModels as j, nextTick as M, normalizeClass as N, normalizeStyle as P, onBeforeUnmount as ee, onMounted as
|
|
12
|
-
import { message as
|
|
13
|
-
import { LoadingOutlined as
|
|
14
|
-
import { useResizeObserver as
|
|
11
|
+
import { Fragment as x, computed as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createSlots as D, createTextVNode as O, createVNode as k, defineComponent as A, mergeModels as j, nextTick as M, normalizeClass as N, normalizeStyle as P, onBeforeUnmount as ee, onMounted as te, openBlock as F, reactive as ne, ref as I, renderList as L, resolveComponent as R, toDisplayString as z, unref as B, useModel as V, vShow as H, watch as U, withCtx as W, withDirectives as G, withModifiers as re } from "vue";
|
|
12
|
+
import { message as K } from "ant-design-vue";
|
|
13
|
+
import { LoadingOutlined as q } from "@ant-design/icons-vue";
|
|
14
|
+
import { useResizeObserver as J } from "@vueuse/core";
|
|
15
15
|
//#region src/components/dbView/configSteps/helpers.ts
|
|
16
|
-
var
|
|
17
|
-
let t =
|
|
16
|
+
var Y = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void 0 ? e.data : e, ie = (e) => {
|
|
17
|
+
let t = Y(e);
|
|
18
18
|
return Array.isArray(t) ? t : [];
|
|
19
|
-
},
|
|
19
|
+
}, ae = async (e, t) => Y(await o({ org_id: t }, `${e}/gen_view_flag`))?.flag ?? null, oe = { class: "sql-toolbar" }, X = {
|
|
20
20
|
key: 1,
|
|
21
21
|
class: "preview-block"
|
|
22
|
-
},
|
|
22
|
+
}, se = { class: "meta-tip" }, ce = /*#__PURE__*/ i(/* @__PURE__ */ A({
|
|
23
23
|
__name: "StepBasicConfig",
|
|
24
24
|
props: {
|
|
25
25
|
model: {},
|
|
@@ -29,21 +29,14 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
29
29
|
},
|
|
30
30
|
emits: ["update:sqlError"],
|
|
31
31
|
setup(e, { expose: t, emit: n }) {
|
|
32
|
-
let i = e, a = n, s = S(() => i.model), c = S(
|
|
32
|
+
let i = e, a = n, s = S(() => i.model), c = S({
|
|
33
33
|
get: () => i.sqlError,
|
|
34
34
|
set: (e) => a("update:sqlError", e)
|
|
35
|
-
}),
|
|
35
|
+
}), l = r().currentOrg, u = {
|
|
36
36
|
name: [{
|
|
37
37
|
required: !0,
|
|
38
38
|
message: "请填写视图名称"
|
|
39
39
|
}],
|
|
40
|
-
flag: [{
|
|
41
|
-
required: !0,
|
|
42
|
-
message: "请填写视图标识"
|
|
43
|
-
}, {
|
|
44
|
-
pattern: /^[A-Za-z0-9]+$/,
|
|
45
|
-
message: "仅英文大小写字母和数字,禁下划线/横杠"
|
|
46
|
-
}],
|
|
47
40
|
data_source_id: [{
|
|
48
41
|
required: !0,
|
|
49
42
|
message: "请选择数据源"
|
|
@@ -52,91 +45,83 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
52
45
|
required: !0,
|
|
53
46
|
message: "请填写查询SQL"
|
|
54
47
|
}]
|
|
55
|
-
},
|
|
56
|
-
|
|
48
|
+
}, d = I([]), f = I(!1), p = async () => {
|
|
49
|
+
f.value = !0;
|
|
57
50
|
try {
|
|
58
|
-
|
|
59
|
-
org_id:
|
|
51
|
+
d.value = ie(await o({
|
|
52
|
+
org_id: l?.id,
|
|
60
53
|
is_pagination: !1
|
|
61
54
|
}, `${i.record.model_app}/query_db_data_source_list`)).map((e) => ({
|
|
62
55
|
value: e.id,
|
|
63
56
|
label: e.name
|
|
64
57
|
}));
|
|
65
58
|
} catch {
|
|
66
|
-
|
|
67
|
-
} finally {
|
|
68
|
-
p.value = !1;
|
|
69
|
-
}
|
|
70
|
-
}, h = L(!1), g = async () => {
|
|
71
|
-
h.value = !0;
|
|
72
|
-
try {
|
|
73
|
-
let e = await o({ org_id: u?.id }, `${i.record.model_app}/gen_view_flag`), t = X(e);
|
|
74
|
-
t?.flag ? s.value.flag = t.flag : q.warning(e && e.message || "生成视图标识失败,请手动填写");
|
|
75
|
-
} catch (e) {
|
|
76
|
-
q.warning(e?.message || "生成视图标识失败,请手动填写");
|
|
59
|
+
d.value = [];
|
|
77
60
|
} finally {
|
|
78
|
-
|
|
61
|
+
f.value = !1;
|
|
79
62
|
}
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
|
|
63
|
+
}, m = I(!1), h = I([]), g = I([]), _ = I(0);
|
|
64
|
+
U(() => [s.value.sql, s.value.data_source_id], () => {
|
|
65
|
+
c.value = "", h.value = [], g.value = [], _.value = 0;
|
|
83
66
|
});
|
|
84
|
-
let
|
|
67
|
+
let v = async () => {
|
|
85
68
|
if (!s.value.data_source_id || !s.value.sql) return {
|
|
86
69
|
ran: !1,
|
|
87
70
|
rows: 0
|
|
88
71
|
};
|
|
89
|
-
|
|
72
|
+
m.value = !0, c.value = "";
|
|
90
73
|
try {
|
|
91
74
|
let e = await o({
|
|
92
|
-
org_id:
|
|
75
|
+
org_id: l?.id,
|
|
93
76
|
data_source_id: s.value.data_source_id,
|
|
94
77
|
sql: s.value.sql
|
|
95
|
-
}, `${i.record.model_app}/preview_sql`), t =
|
|
96
|
-
return e && e.success === !1 ? (
|
|
78
|
+
}, `${i.record.model_app}/preview_sql`), t = Y(e), n = Array.isArray(t?.rows) ? t.rows : [];
|
|
79
|
+
return e && e.success === !1 ? (c.value = e.message || "SQL 执行失败", h.value = [], {
|
|
97
80
|
ran: !0,
|
|
98
81
|
rows: 0,
|
|
99
|
-
error:
|
|
100
|
-
}) : n.length ? (
|
|
82
|
+
error: c.value
|
|
83
|
+
}) : n.length ? (h.value = n.map((e, t) => ({
|
|
101
84
|
...e,
|
|
102
85
|
__i: t
|
|
103
|
-
})),
|
|
86
|
+
})), g.value = Object.keys(n[0] || {}).map((e) => ({
|
|
104
87
|
title: e,
|
|
105
88
|
dataIndex: e,
|
|
106
89
|
key: e,
|
|
107
90
|
width: 160,
|
|
108
91
|
ellipsis: !0
|
|
109
|
-
})),
|
|
92
|
+
})), _.value = t?.total ?? n.length, {
|
|
110
93
|
ran: !0,
|
|
111
94
|
rows: n.length
|
|
112
|
-
}) : (
|
|
95
|
+
}) : (c.value = "SQL 执行成功,但结果为空(0 行)", h.value = [], _.value = 0, {
|
|
113
96
|
ran: !0,
|
|
114
97
|
rows: 0,
|
|
115
|
-
error:
|
|
98
|
+
error: c.value
|
|
116
99
|
});
|
|
117
100
|
} catch (e) {
|
|
118
|
-
return
|
|
101
|
+
return c.value = e?.message || "SQL 预览失败", h.value = [], {
|
|
119
102
|
ran: !1,
|
|
120
103
|
rows: 0,
|
|
121
|
-
error:
|
|
104
|
+
error: c.value
|
|
122
105
|
};
|
|
123
106
|
} finally {
|
|
124
|
-
|
|
107
|
+
m.value = !1;
|
|
125
108
|
}
|
|
126
109
|
};
|
|
127
|
-
return t({ runPreview:
|
|
128
|
-
|
|
110
|
+
return t({ runPreview: v }), te(() => {
|
|
111
|
+
p(), i.formType !== "edit" && ae(i.record.model_app, l?.id).then((e) => {
|
|
112
|
+
e ? s.value.flag = e : K.warning("生成视图标识失败,请在末步手动填写");
|
|
113
|
+
}).catch(() => K.warning("生成视图标识失败,请在末步手动填写"));
|
|
129
114
|
}), (e, t) => {
|
|
130
|
-
let n =
|
|
131
|
-
return
|
|
132
|
-
default:
|
|
133
|
-
k(i, { span:
|
|
134
|
-
default:
|
|
115
|
+
let n = R("a-input"), r = R("a-form-item"), i = R("a-col"), a = R("a-select"), o = R("a-textarea"), l = R("a-button"), p = R("a-alert"), y = R("a-table"), b = R("a-row");
|
|
116
|
+
return F(), C(b, { gutter: 16 }, {
|
|
117
|
+
default: W(() => [
|
|
118
|
+
k(i, { span: 24 }, {
|
|
119
|
+
default: W(() => [k(r, {
|
|
135
120
|
label: "视图名称",
|
|
136
121
|
name: "name",
|
|
137
|
-
rules:
|
|
122
|
+
rules: u.name
|
|
138
123
|
}, {
|
|
139
|
-
default:
|
|
124
|
+
default: W(() => [k(n, {
|
|
140
125
|
value: s.value.name,
|
|
141
126
|
"onUpdate:value": t[0] ||= (e) => s.value.name = e,
|
|
142
127
|
placeholder: "请填写视图名称",
|
|
@@ -146,50 +131,20 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
146
131
|
}, 8, ["rules"])]),
|
|
147
132
|
_: 1
|
|
148
133
|
}),
|
|
149
|
-
k(i, { span:
|
|
150
|
-
default:
|
|
151
|
-
label: "视图标识",
|
|
152
|
-
name: "flag",
|
|
153
|
-
rules: d.flag,
|
|
154
|
-
extra: "全库唯一;仅英文大小写字母和数字(禁下划线/横杠),用于 URL 与菜单"
|
|
155
|
-
}, {
|
|
156
|
-
default: G(() => [k(n, {
|
|
157
|
-
value: s.value.flag,
|
|
158
|
-
"onUpdate:value": t[1] ||= (e) => s.value.flag = e,
|
|
159
|
-
placeholder: "如 salesOrderList",
|
|
160
|
-
"allow-clear": ""
|
|
161
|
-
}, D({ _: 2 }, [c.value === "create" ? {
|
|
162
|
-
name: "suffix",
|
|
163
|
-
fn: G(() => [k(a, {
|
|
164
|
-
type: "link",
|
|
165
|
-
size: "small",
|
|
166
|
-
style: { padding: "0" },
|
|
167
|
-
loading: h.value,
|
|
168
|
-
onClick: g
|
|
169
|
-
}, {
|
|
170
|
-
default: G(() => t[4] ||= [O(" 换一个 ")]),
|
|
171
|
-
_: 1
|
|
172
|
-
}, 8, ["loading"])]),
|
|
173
|
-
key: "0"
|
|
174
|
-
} : void 0]), 1032, ["value"])]),
|
|
175
|
-
_: 1
|
|
176
|
-
}, 8, ["rules"])]),
|
|
177
|
-
_: 1
|
|
178
|
-
}),
|
|
179
|
-
k(i, { span: 12 }, {
|
|
180
|
-
default: G(() => [k(r, {
|
|
134
|
+
k(i, { span: 24 }, {
|
|
135
|
+
default: W(() => [k(r, {
|
|
181
136
|
label: "数据源",
|
|
182
137
|
name: "data_source_id",
|
|
183
|
-
rules:
|
|
138
|
+
rules: u.data_source_id
|
|
184
139
|
}, {
|
|
185
|
-
default:
|
|
140
|
+
default: W(() => [k(a, {
|
|
186
141
|
value: s.value.data_source_id,
|
|
187
|
-
"onUpdate:value": t[
|
|
142
|
+
"onUpdate:value": t[1] ||= (e) => s.value.data_source_id = e,
|
|
188
143
|
placeholder: "请选择数据源",
|
|
189
144
|
"show-search": "",
|
|
190
145
|
"option-filter-prop": "label",
|
|
191
|
-
options:
|
|
192
|
-
loading:
|
|
146
|
+
options: d.value,
|
|
147
|
+
loading: f.value
|
|
193
148
|
}, null, 8, [
|
|
194
149
|
"value",
|
|
195
150
|
"options",
|
|
@@ -200,14 +155,30 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
200
155
|
_: 1
|
|
201
156
|
}),
|
|
202
157
|
k(i, { span: 24 }, {
|
|
203
|
-
default:
|
|
158
|
+
default: W(() => [k(r, {
|
|
159
|
+
label: "备注",
|
|
160
|
+
name: "remark",
|
|
161
|
+
extra: "描述这条 SQL 的查询细节(查什么表 / 统计口径 / 过滤与分组);AI 生成 SQL 时会同步更新"
|
|
162
|
+
}, {
|
|
163
|
+
default: W(() => [k(o, {
|
|
164
|
+
value: s.value.remark,
|
|
165
|
+
"onUpdate:value": t[2] ||= (e) => s.value.remark = e,
|
|
166
|
+
rows: 2,
|
|
167
|
+
placeholder: "请填写备注"
|
|
168
|
+
}, null, 8, ["value"])]),
|
|
169
|
+
_: 1
|
|
170
|
+
})]),
|
|
171
|
+
_: 1
|
|
172
|
+
}),
|
|
173
|
+
k(i, { span: 24 }, {
|
|
174
|
+
default: W(() => [
|
|
204
175
|
k(r, {
|
|
205
176
|
label: "查询SQL",
|
|
206
177
|
name: "sql",
|
|
207
|
-
rules:
|
|
178
|
+
rules: u.sql,
|
|
208
179
|
extra: "只读查询;可用模板变量 {{org_id}}、{{person_id}}(jinja2 渲染)"
|
|
209
180
|
}, {
|
|
210
|
-
default:
|
|
181
|
+
default: W(() => [k(o, {
|
|
211
182
|
value: s.value.sql,
|
|
212
183
|
"onUpdate:value": t[3] ||= (e) => s.value.sql = e,
|
|
213
184
|
rows: 8,
|
|
@@ -215,25 +186,25 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
215
186
|
}, null, 8, ["value"])]),
|
|
216
187
|
_: 1
|
|
217
188
|
}, 8, ["rules"]),
|
|
218
|
-
E("div",
|
|
189
|
+
E("div", oe, [k(l, {
|
|
219
190
|
size: "small",
|
|
220
191
|
disabled: !s.value.data_source_id || !s.value.sql,
|
|
221
|
-
loading:
|
|
222
|
-
onClick:
|
|
192
|
+
loading: m.value,
|
|
193
|
+
onClick: v
|
|
223
194
|
}, {
|
|
224
|
-
default:
|
|
195
|
+
default: W(() => t[4] ||= [O(" 预览(前 100 行) ")]),
|
|
225
196
|
_: 1
|
|
226
|
-
}, 8, ["disabled", "loading"]), t[
|
|
227
|
-
|
|
197
|
+
}, 8, ["disabled", "loading"]), t[5] ||= E("span", { class: "meta-tip" }, "先选数据源并填写 SQL;预览走配置期接口,不落库", -1)]),
|
|
198
|
+
c.value ? (F(), C(p, {
|
|
228
199
|
key: 0,
|
|
229
200
|
type: "error",
|
|
230
201
|
"show-icon": "",
|
|
231
|
-
message:
|
|
202
|
+
message: c.value,
|
|
232
203
|
class: "sql-alert"
|
|
233
204
|
}, null, 8, ["message"])) : w("", !0),
|
|
234
|
-
|
|
235
|
-
columns:
|
|
236
|
-
"data-source":
|
|
205
|
+
h.value.length ? (F(), T("div", X, [E("div", se, "预览结果:共 " + z(_.value) + " 行(最多回传 100 行)", 1), k(y, {
|
|
206
|
+
columns: g.value,
|
|
207
|
+
"data-source": h.value,
|
|
237
208
|
"row-key": "__i",
|
|
238
209
|
size: "small",
|
|
239
210
|
pagination: !1,
|
|
@@ -250,7 +221,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
250
221
|
});
|
|
251
222
|
};
|
|
252
223
|
}
|
|
253
|
-
}), [["__scopeId", "data-v-
|
|
224
|
+
}), [["__scopeId", "data-v-48a13b31"]]), le = [
|
|
254
225
|
{
|
|
255
226
|
value: "normal",
|
|
256
227
|
label: "标准视图"
|
|
@@ -263,7 +234,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
263
234
|
value: "pivot_charts",
|
|
264
235
|
label: "透视图"
|
|
265
236
|
}
|
|
266
|
-
],
|
|
237
|
+
], ue = [
|
|
267
238
|
{
|
|
268
239
|
value: "left_grid",
|
|
269
240
|
label: "左侧分栏"
|
|
@@ -276,19 +247,19 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
276
247
|
value: "top_tag_flat",
|
|
277
248
|
label: "顶部标签(平铺)"
|
|
278
249
|
}
|
|
279
|
-
],
|
|
250
|
+
], de = {
|
|
280
251
|
int: "int",
|
|
281
252
|
float: "float",
|
|
282
253
|
bool: "bool",
|
|
283
254
|
datetime: "datetime",
|
|
284
255
|
date: "date",
|
|
285
256
|
str: "str"
|
|
286
|
-
},
|
|
257
|
+
}, fe = {
|
|
287
258
|
datetime: "datetime",
|
|
288
259
|
date: "date",
|
|
289
260
|
bool: "tag",
|
|
290
261
|
json: "json"
|
|
291
|
-
},
|
|
262
|
+
}, pe = "common_number", me = [
|
|
292
263
|
{
|
|
293
264
|
title: "顺序",
|
|
294
265
|
key: "column_order",
|
|
@@ -420,55 +391,54 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
420
391
|
width: 60,
|
|
421
392
|
fixed: "right"
|
|
422
393
|
}
|
|
423
|
-
],
|
|
394
|
+
], he = me.reduce((e, t) => e + (t.width || 0), 0), ge = [
|
|
424
395
|
[
|
|
425
396
|
"name",
|
|
426
|
-
"flag",
|
|
427
397
|
"data_source_id",
|
|
428
398
|
"sql"
|
|
429
399
|
],
|
|
430
400
|
[],
|
|
431
401
|
[],
|
|
432
|
-
[]
|
|
433
|
-
],
|
|
402
|
+
["flag"]
|
|
403
|
+
], _e = /* @__PURE__ */ A({
|
|
434
404
|
__name: "StepDisplayConfig",
|
|
435
405
|
props: { model: {} },
|
|
436
406
|
setup(e) {
|
|
437
|
-
let t = e, n = S(() => t.model), r =
|
|
407
|
+
let t = e, n = S(() => t.model), r = le, i = ue, a = S(() => {
|
|
438
408
|
let e = n.value.enable_view_types;
|
|
439
409
|
return Array.isArray(e) && e.length ? r.filter((t) => e.includes(t.value)) : r;
|
|
440
410
|
});
|
|
441
|
-
return
|
|
411
|
+
return U(() => n.value.enable_view_types, (e) => {
|
|
442
412
|
Array.isArray(e) && e.length && n.value.default_view_type && !e.includes(n.value.default_view_type) && (n.value.default_view_type = void 0);
|
|
443
413
|
}), (e, t) => {
|
|
444
|
-
let o =
|
|
445
|
-
return
|
|
446
|
-
default:
|
|
414
|
+
let o = R("a-select"), s = R("a-form-item"), c = R("a-col"), l = R("a-switch"), u = R("a-input-number"), d = R("a-row");
|
|
415
|
+
return F(), C(d, { gutter: 16 }, {
|
|
416
|
+
default: W(() => [
|
|
447
417
|
k(c, { span: 12 }, {
|
|
448
|
-
default:
|
|
418
|
+
default: W(() => [k(s, {
|
|
449
419
|
label: "启用的视图类型",
|
|
450
420
|
name: "enable_view_types",
|
|
451
421
|
extra: "不选 = 全部启用"
|
|
452
422
|
}, {
|
|
453
|
-
default:
|
|
423
|
+
default: W(() => [k(o, {
|
|
454
424
|
value: n.value.enable_view_types,
|
|
455
425
|
"onUpdate:value": t[0] ||= (e) => n.value.enable_view_types = e,
|
|
456
426
|
mode: "multiple",
|
|
457
427
|
"allow-clear": "",
|
|
458
428
|
placeholder: "不选 = 全部启用",
|
|
459
|
-
options:
|
|
429
|
+
options: B(r)
|
|
460
430
|
}, null, 8, ["value", "options"])]),
|
|
461
431
|
_: 1
|
|
462
432
|
})]),
|
|
463
433
|
_: 1
|
|
464
434
|
}),
|
|
465
435
|
k(c, { span: 12 }, {
|
|
466
|
-
default:
|
|
436
|
+
default: W(() => [k(s, {
|
|
467
437
|
label: "默认视图类型",
|
|
468
438
|
name: "default_view_type",
|
|
469
439
|
extra: "仅能在已启用的视图类型中选择;未启用任何类型时不限"
|
|
470
440
|
}, {
|
|
471
|
-
default:
|
|
441
|
+
default: W(() => [k(o, {
|
|
472
442
|
value: n.value.default_view_type,
|
|
473
443
|
"onUpdate:value": t[1] ||= (e) => n.value.default_view_type = e,
|
|
474
444
|
"allow-clear": "",
|
|
@@ -480,25 +450,25 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
480
450
|
_: 1
|
|
481
451
|
}),
|
|
482
452
|
k(c, { span: 12 }, {
|
|
483
|
-
default:
|
|
453
|
+
default: W(() => [k(s, {
|
|
484
454
|
label: "视图展示形式",
|
|
485
455
|
name: "view_display_type",
|
|
486
456
|
extra: "顶部标签:顶部按钮组切换视图类型;平铺:三类型视图混排,无类型切换"
|
|
487
457
|
}, {
|
|
488
|
-
default:
|
|
458
|
+
default: W(() => [k(o, {
|
|
489
459
|
value: n.value.view_display_type,
|
|
490
460
|
"onUpdate:value": t[2] ||= (e) => n.value.view_display_type = e,
|
|
491
461
|
"allow-clear": "",
|
|
492
462
|
placeholder: "默认左侧分栏",
|
|
493
|
-
options:
|
|
463
|
+
options: B(i)
|
|
494
464
|
}, null, 8, ["value", "options"])]),
|
|
495
465
|
_: 1
|
|
496
466
|
})]),
|
|
497
467
|
_: 1
|
|
498
468
|
}),
|
|
499
469
|
k(c, { span: 12 }, {
|
|
500
|
-
default:
|
|
501
|
-
default:
|
|
470
|
+
default: W(() => [k(s, { label: "启用分页" }, {
|
|
471
|
+
default: W(() => [k(l, {
|
|
502
472
|
checked: n.value.is_pagination,
|
|
503
473
|
"onUpdate:checked": t[3] ||= (e) => n.value.is_pagination = e,
|
|
504
474
|
"checked-children": "开",
|
|
@@ -509,11 +479,11 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
509
479
|
_: 1
|
|
510
480
|
}),
|
|
511
481
|
k(c, { span: 12 }, {
|
|
512
|
-
default:
|
|
482
|
+
default: W(() => [k(s, {
|
|
513
483
|
label: "每页条数",
|
|
514
484
|
name: "pageSize"
|
|
515
485
|
}, {
|
|
516
|
-
default:
|
|
486
|
+
default: W(() => [k(u, {
|
|
517
487
|
value: n.value.pageSize,
|
|
518
488
|
"onUpdate:value": t[4] ||= (e) => n.value.pageSize = e,
|
|
519
489
|
style: { width: "100%" },
|
|
@@ -525,11 +495,11 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
525
495
|
_: 1
|
|
526
496
|
}),
|
|
527
497
|
k(c, { span: 12 }, {
|
|
528
|
-
default:
|
|
498
|
+
default: W(() => [k(s, {
|
|
529
499
|
label: "每页条数选项",
|
|
530
500
|
name: "page_size_options"
|
|
531
501
|
}, {
|
|
532
|
-
default:
|
|
502
|
+
default: W(() => [k(o, {
|
|
533
503
|
value: n.value.page_size_options,
|
|
534
504
|
"onUpdate:value": t[5] ||= (e) => n.value.page_size_options = e,
|
|
535
505
|
mode: "tags",
|
|
@@ -546,20 +516,20 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
546
516
|
});
|
|
547
517
|
};
|
|
548
518
|
}
|
|
549
|
-
}),
|
|
519
|
+
}), ve = {
|
|
550
520
|
key: 2,
|
|
551
521
|
class: "color-cell"
|
|
552
|
-
},
|
|
522
|
+
}, ye = { class: "swatches" }, be = ["title", "onClick"], xe = [
|
|
553
523
|
"value",
|
|
554
524
|
"title",
|
|
555
525
|
"onInput"
|
|
556
|
-
],
|
|
526
|
+
], Se = {
|
|
557
527
|
key: 3,
|
|
558
528
|
class: "preview-cell"
|
|
559
|
-
},
|
|
529
|
+
}, Ce = {
|
|
560
530
|
key: 1,
|
|
561
531
|
class: "preview-empty"
|
|
562
|
-
},
|
|
532
|
+
}, we = /*#__PURE__*/ i(/* @__PURE__ */ A({
|
|
563
533
|
__name: "ColumnMapColorModal",
|
|
564
534
|
props: /*@__PURE__*/ j({
|
|
565
535
|
open: { type: Boolean },
|
|
@@ -573,7 +543,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
573
543
|
}),
|
|
574
544
|
emits: ["update:open"],
|
|
575
545
|
setup(e) {
|
|
576
|
-
let t = e, n =
|
|
546
|
+
let t = e, n = V(e, "open"), r = [
|
|
577
547
|
{
|
|
578
548
|
title: "原值",
|
|
579
549
|
key: "value",
|
|
@@ -615,13 +585,13 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
615
585
|
purple: "#722ed1"
|
|
616
586
|
}, o = (e, t) => {
|
|
617
587
|
e.color = t.target.value;
|
|
618
|
-
}, s = (e) => String(e.color || "").trim().startsWith("#"), c = 0, l =
|
|
588
|
+
}, s = (e) => String(e.color || "").trim().startsWith("#"), c = 0, l = I([]), u = (e = "", t = "", n = "") => ({
|
|
619
589
|
__k: ++c,
|
|
620
590
|
value: e,
|
|
621
591
|
label: t,
|
|
622
592
|
color: n
|
|
623
593
|
});
|
|
624
|
-
|
|
594
|
+
U(() => t.open, (e) => {
|
|
625
595
|
if (!e) return;
|
|
626
596
|
c = 0;
|
|
627
597
|
let n = t.record?.content_map || {}, r = t.record?.color_map || {}, i = Array.from(/* @__PURE__ */ new Set([...Object.keys(n || {}), ...Object.keys(r || {})]));
|
|
@@ -642,7 +612,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
642
612
|
for (let t of l.value) {
|
|
643
613
|
let n = (t.value || "").trim();
|
|
644
614
|
if (!n) continue;
|
|
645
|
-
n in e &&
|
|
615
|
+
n in e && K.warning(`原值「${n}」重复,已保留最后一次配置`);
|
|
646
616
|
let i = (t.label || "").trim(), a = (t.color || "").trim();
|
|
647
617
|
i && (e[n] = i), a && (r[n] = a);
|
|
648
618
|
}
|
|
@@ -651,8 +621,8 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
651
621
|
n.value = !1;
|
|
652
622
|
};
|
|
653
623
|
return (e, t) => {
|
|
654
|
-
let c =
|
|
655
|
-
return
|
|
624
|
+
let c = R("a-input"), u = R("a-tag"), p = R("a-button"), v = R("a-table"), y = R("a-modal");
|
|
625
|
+
return F(), C(y, {
|
|
656
626
|
title: `转换与颜色 —— ${e.record?.title || e.record?.data_index || ""}`,
|
|
657
627
|
width: "760px",
|
|
658
628
|
open: n.value,
|
|
@@ -663,7 +633,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
663
633
|
onCancel: _,
|
|
664
634
|
onOk: g
|
|
665
635
|
}, {
|
|
666
|
-
default:
|
|
636
|
+
default: W(() => [
|
|
667
637
|
t[3] ||= E("div", { class: "map-tip" }, " 原值 → 显示文本 与 原值 → 颜色 在此一体化配置:一行 = 一条「原值」的转换与颜色,落库时拆回两个键。 最右「预览」按运行时标签组件的真实样式渲染 —— 内置色是浅底彩字、 自定义色是实心彩底白字,两者观感不同属正常。 ", -1),
|
|
668
638
|
k(v, {
|
|
669
639
|
"data-source": l.value,
|
|
@@ -672,28 +642,28 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
672
642
|
size: "small",
|
|
673
643
|
pagination: !1
|
|
674
644
|
}, {
|
|
675
|
-
bodyCell:
|
|
645
|
+
bodyCell: W(({ column: e, record: n }) => [e.key === "value" ? (F(), C(c, {
|
|
676
646
|
key: 0,
|
|
677
647
|
value: n.value,
|
|
678
648
|
"onUpdate:value": (e) => n.value = e,
|
|
679
649
|
size: "small",
|
|
680
650
|
placeholder: "原值",
|
|
681
651
|
"allow-clear": ""
|
|
682
|
-
}, null, 8, ["value", "onUpdate:value"])) : e.key === "label" ? (
|
|
652
|
+
}, null, 8, ["value", "onUpdate:value"])) : e.key === "label" ? (F(), C(c, {
|
|
683
653
|
key: 1,
|
|
684
654
|
value: n.label,
|
|
685
655
|
"onUpdate:value": (e) => n.label = e,
|
|
686
656
|
size: "small",
|
|
687
657
|
placeholder: "显示文本",
|
|
688
658
|
"allow-clear": ""
|
|
689
|
-
}, null, 8, ["value", "onUpdate:value"])) : e.key === "color" ? (
|
|
690
|
-
(
|
|
659
|
+
}, null, 8, ["value", "onUpdate:value"])) : e.key === "color" ? (F(), T("div", ve, [E("div", ye, [
|
|
660
|
+
(F(), T(x, null, L(i, (e) => E("span", {
|
|
691
661
|
key: e,
|
|
692
662
|
class: N(["swatch", { active: n.color === e }]),
|
|
693
663
|
style: P({ background: a[e] }),
|
|
694
664
|
title: e,
|
|
695
665
|
onClick: (t) => n.color = e
|
|
696
|
-
}, null, 14,
|
|
666
|
+
}, null, 14, be)), 64)),
|
|
697
667
|
t[0] ||= E("span", { class: "custom-color-label" }, "自定义:", -1),
|
|
698
668
|
E("input", {
|
|
699
669
|
type: "color",
|
|
@@ -701,14 +671,14 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
701
671
|
value: n.color && n.color.startsWith("#") ? n.color : "#1677ff",
|
|
702
672
|
title: s(n) ? n.color : "自定义颜色",
|
|
703
673
|
onInput: (e) => o(n, e)
|
|
704
|
-
}, null, 42,
|
|
705
|
-
])])) : e.key === "preview" ? (
|
|
674
|
+
}, null, 42, xe)
|
|
675
|
+
])])) : e.key === "preview" ? (F(), T("div", Se, [m(n) ? (F(), C(u, {
|
|
706
676
|
key: 0,
|
|
707
677
|
color: h(n)
|
|
708
678
|
}, {
|
|
709
|
-
default:
|
|
679
|
+
default: W(() => [O(z(m(n)), 1)]),
|
|
710
680
|
_: 2
|
|
711
|
-
}, 1032, ["color"])) : (
|
|
681
|
+
}, 1032, ["color"])) : (F(), T("span", Ce, " — "))])) : e.key === "action" ? (F(), C(p, {
|
|
712
682
|
key: 4,
|
|
713
683
|
type: "link",
|
|
714
684
|
danger: "",
|
|
@@ -716,7 +686,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
716
686
|
style: { padding: "0" },
|
|
717
687
|
onClick: (e) => f(n.__k)
|
|
718
688
|
}, {
|
|
719
|
-
default:
|
|
689
|
+
default: W(() => t[1] ||= [O(" 删除 ")]),
|
|
720
690
|
_: 2
|
|
721
691
|
}, 1032, ["onClick"])) : w("", !0)]),
|
|
722
692
|
_: 1
|
|
@@ -728,7 +698,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
728
698
|
style: { "margin-top": "8px" },
|
|
729
699
|
onClick: d
|
|
730
700
|
}, {
|
|
731
|
-
default:
|
|
701
|
+
default: W(() => t[2] ||= [O(" + 添加一条转换 ")]),
|
|
732
702
|
_: 1
|
|
733
703
|
})
|
|
734
704
|
]),
|
|
@@ -736,19 +706,19 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
736
706
|
}, 8, ["title", "open"]);
|
|
737
707
|
};
|
|
738
708
|
}
|
|
739
|
-
}), [["__scopeId", "data-v-35ae6904"]]),
|
|
709
|
+
}), [["__scopeId", "data-v-35ae6904"]]), Te = { class: "config-grid" }, Ee = { class: "config-card" }, De = { class: "config-row" }, Oe = { class: "config-row" }, ke = {
|
|
740
710
|
key: 2,
|
|
741
711
|
class: "config-control config-placeholder"
|
|
742
|
-
},
|
|
712
|
+
}, Ae = {
|
|
743
713
|
key: 0,
|
|
744
714
|
class: "params-error-tip"
|
|
745
|
-
},
|
|
715
|
+
}, je = { class: "config-card" }, Me = { class: "config-row" }, Ne = { class: "config-row" }, Pe = {
|
|
746
716
|
key: 2,
|
|
747
717
|
class: "config-control config-placeholder"
|
|
748
|
-
},
|
|
718
|
+
}, Fe = {
|
|
749
719
|
key: 0,
|
|
750
720
|
class: "params-error-tip"
|
|
751
|
-
},
|
|
721
|
+
}, Ie = { class: "select-tools" }, Le = ["onMousedown", "onMouseenter"], Re = { class: "chip-title" }, ze = { class: "chip-sub" }, Be = /*#__PURE__*/ i(/* @__PURE__ */ A({
|
|
752
722
|
__name: "ColumnBatchConfigModal",
|
|
753
723
|
props: /*@__PURE__*/ j({ rows: {} }, {
|
|
754
724
|
open: {
|
|
@@ -759,15 +729,15 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
759
729
|
}),
|
|
760
730
|
emits: ["update:open"],
|
|
761
731
|
setup(n) {
|
|
762
|
-
let r = n, i =
|
|
732
|
+
let r = n, i = V(n, "open"), a = (e, t) => e.filter((e) => e?.[t]).map((e) => ({
|
|
763
733
|
value: e[t],
|
|
764
734
|
label: `${e.name || e[t]}(${e[t]})`
|
|
765
|
-
})), o = S(() => a(t(), "cellComponent")), s = S(() => a(e(), "cellSummaryComponent")), c =
|
|
735
|
+
})), o = S(() => a(t(), "cellComponent")), s = S(() => a(e(), "cellSummaryComponent")), c = ne({
|
|
766
736
|
cell_component: !1,
|
|
767
737
|
cell_component_params: !1,
|
|
768
738
|
cell_summary_component: !1,
|
|
769
739
|
cell_summary_component_params: !1
|
|
770
|
-
}), l =
|
|
740
|
+
}), l = I(void 0), u = I(""), d = I(void 0), f = I(""), p = S(() => h(u.value)), m = S(() => h(f.value)), h = (e) => {
|
|
771
741
|
if (!e.trim()) return "";
|
|
772
742
|
try {
|
|
773
743
|
let t = JSON.parse(e);
|
|
@@ -775,38 +745,38 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
775
745
|
} catch {
|
|
776
746
|
return "JSON 格式错误";
|
|
777
747
|
}
|
|
778
|
-
}, g = (e, t) => String(t.value).includes(e), _ =
|
|
748
|
+
}, g = (e, t) => String(t.value).includes(e), _ = I(/* @__PURE__ */ new Set()), v = (e) => _.value.has(e.data_index), y = (e, t) => {
|
|
779
749
|
t ? _.value.add(e.data_index) : _.value.delete(e.data_index);
|
|
780
|
-
}, D =
|
|
750
|
+
}, D = I(!1), A = I(!1), j = (e) => {
|
|
781
751
|
D.value = !0, A.value = !v(e), y(e, A.value);
|
|
782
752
|
}, M = (e) => {
|
|
783
753
|
D.value && y(e, A.value);
|
|
784
754
|
}, P = () => {
|
|
785
755
|
D.value = !1;
|
|
786
756
|
};
|
|
787
|
-
|
|
788
|
-
let
|
|
757
|
+
te(() => document.addEventListener("mouseup", P)), ee(() => document.removeEventListener("mouseup", P));
|
|
758
|
+
let H = () => r.rows.forEach((e) => _.value.add(e.data_index)), G = () => _.value.clear(), q = () => {
|
|
789
759
|
if (!_.value.size) {
|
|
790
|
-
|
|
760
|
+
K.warning("请先选择要配置的列");
|
|
791
761
|
return;
|
|
792
762
|
}
|
|
793
763
|
if (!Object.keys(c).filter((e) => c[e]).length) {
|
|
794
|
-
|
|
764
|
+
K.warning("请先勾选要配置的内容");
|
|
795
765
|
return;
|
|
796
766
|
}
|
|
797
767
|
if (p.value || m.value) {
|
|
798
|
-
|
|
768
|
+
K.warning("参数 JSON 格式错误,请修正后再应用");
|
|
799
769
|
return;
|
|
800
770
|
}
|
|
801
771
|
let e = (e) => e.trim() ? JSON.parse(e) : null, t = c.cell_component, n = c.cell_summary_component, a = t && l.value === "common_number", o = n && d.value === "common_number";
|
|
802
|
-
for (let i of r.rows) _.value.has(i.data_index) && (t && (i.cell_component = l.value || "", c.cell_component_params || (i.cell_component_params = null)), c.cell_component_params && (i.cell_component_params = a ?
|
|
803
|
-
|
|
804
|
-
},
|
|
805
|
-
return
|
|
806
|
-
e && (_.value = /* @__PURE__ */ new Set(), D.value = !1,
|
|
772
|
+
for (let i of r.rows) _.value.has(i.data_index) && (t && (i.cell_component = l.value || "", c.cell_component_params || (i.cell_component_params = null)), c.cell_component_params && (i.cell_component_params = a ? J.value ? { pattern: J.value } : null : e(u.value)), n && (i.cell_summary_component = d.value || "", c.cell_summary_component_params || (i.cell_summary_component_params = null)), c.cell_summary_component_params && (i.cell_summary_component_params = o ? Y.value ? { pattern: Y.value } : null : e(f.value)));
|
|
773
|
+
K.success(`已批量配置 ${_.value.size} 列`), i.value = !1;
|
|
774
|
+
}, J = I(""), Y = I("");
|
|
775
|
+
return U(i, (e) => {
|
|
776
|
+
e && (_.value = /* @__PURE__ */ new Set(), D.value = !1, J.value = "", Y.value = "", u.value = "", f.value = "");
|
|
807
777
|
}), (e, t) => {
|
|
808
|
-
let n =
|
|
809
|
-
return
|
|
778
|
+
let n = R("a-divider"), r = R("a-checkbox"), a = R("a-select"), h = R("a-auto-complete"), y = R("a-textarea"), S = R("a-button"), A = R("a-tag"), P = R("a-modal");
|
|
779
|
+
return F(), C(P, {
|
|
810
780
|
title: "批量配置单元格组件 / 汇总组件",
|
|
811
781
|
width: "880px",
|
|
812
782
|
open: i.value,
|
|
@@ -815,9 +785,9 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
815
785
|
centered: "",
|
|
816
786
|
"destroy-on-close": "",
|
|
817
787
|
onCancel: t[11] ||= (e) => i.value = !1,
|
|
818
|
-
onOk:
|
|
788
|
+
onOk: q
|
|
819
789
|
}, {
|
|
820
|
-
default:
|
|
790
|
+
default: W(() => [
|
|
821
791
|
t[22] ||= E("div", { class: "batch-tip" }, [
|
|
822
792
|
O(" 第 1 步勾选要配置的项并填写值 → 第 2 步点选 / "),
|
|
823
793
|
E("b", null, "按住鼠标拖选"),
|
|
@@ -827,17 +797,17 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
827
797
|
orientation: "left",
|
|
828
798
|
class: "batch-divider"
|
|
829
799
|
}, {
|
|
830
|
-
default:
|
|
800
|
+
default: W(() => t[12] ||= [O(" 配置内容 ")]),
|
|
831
801
|
_: 1
|
|
832
802
|
}),
|
|
833
|
-
E("div",
|
|
803
|
+
E("div", Te, [E("div", Ee, [
|
|
834
804
|
t[15] ||= E("div", { class: "config-card-title" }, "单元格组件", -1),
|
|
835
|
-
E("div",
|
|
805
|
+
E("div", De, [k(r, {
|
|
836
806
|
checked: c.cell_component,
|
|
837
807
|
"onUpdate:checked": t[0] ||= (e) => c.cell_component = e,
|
|
838
808
|
class: "config-check"
|
|
839
809
|
}, {
|
|
840
|
-
default:
|
|
810
|
+
default: W(() => t[13] ||= [O(" 组件 ")]),
|
|
841
811
|
_: 1
|
|
842
812
|
}, 8, ["checked"]), k(a, {
|
|
843
813
|
value: l.value,
|
|
@@ -855,39 +825,39 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
855
825
|
"disabled",
|
|
856
826
|
"options"
|
|
857
827
|
])]),
|
|
858
|
-
E("div",
|
|
828
|
+
E("div", Oe, [k(r, {
|
|
859
829
|
checked: c.cell_component_params,
|
|
860
830
|
"onUpdate:checked": t[2] ||= (e) => c.cell_component_params = e,
|
|
861
831
|
class: "config-check"
|
|
862
832
|
}, {
|
|
863
|
-
default:
|
|
833
|
+
default: W(() => t[14] ||= [O(" 参数 ")]),
|
|
864
834
|
_: 1
|
|
865
|
-
}, 8, ["checked"]), c.cell_component_params && l.value ===
|
|
835
|
+
}, 8, ["checked"]), c.cell_component_params && l.value === B("common_number") ? (F(), C(h, {
|
|
866
836
|
key: 0,
|
|
867
|
-
value:
|
|
868
|
-
"onUpdate:value": t[3] ||= (e) =>
|
|
837
|
+
value: J.value,
|
|
838
|
+
"onUpdate:value": t[3] ||= (e) => J.value = e,
|
|
869
839
|
size: "small",
|
|
870
840
|
class: "config-control",
|
|
871
|
-
options:
|
|
841
|
+
options: B(b),
|
|
872
842
|
placeholder: "#,##0.00",
|
|
873
843
|
"filter-option": g
|
|
874
|
-
}, null, 8, ["value", "options"])) : c.cell_component_params ? (
|
|
844
|
+
}, null, 8, ["value", "options"])) : c.cell_component_params ? (F(), C(y, {
|
|
875
845
|
key: 1,
|
|
876
846
|
value: u.value,
|
|
877
847
|
"onUpdate:value": t[4] ||= (e) => u.value = e,
|
|
878
848
|
rows: 1,
|
|
879
849
|
class: N(["config-control", { "params-error": p.value }]),
|
|
880
850
|
placeholder: "{\"key\": \"value\"}"
|
|
881
|
-
}, null, 8, ["value", "class"])) : (
|
|
882
|
-
p.value ? (
|
|
883
|
-
]), E("div",
|
|
851
|
+
}, null, 8, ["value", "class"])) : (F(), T("span", ke, " 勾选后配置 "))]),
|
|
852
|
+
p.value ? (F(), T("div", Ae, z(p.value), 1)) : w("", !0)
|
|
853
|
+
]), E("div", je, [
|
|
884
854
|
t[18] ||= E("div", { class: "config-card-title" }, "汇总组件", -1),
|
|
885
|
-
E("div",
|
|
855
|
+
E("div", Me, [k(r, {
|
|
886
856
|
checked: c.cell_summary_component,
|
|
887
857
|
"onUpdate:checked": t[5] ||= (e) => c.cell_summary_component = e,
|
|
888
858
|
class: "config-check"
|
|
889
859
|
}, {
|
|
890
|
-
default:
|
|
860
|
+
default: W(() => t[16] ||= [O(" 组件 ")]),
|
|
891
861
|
_: 1
|
|
892
862
|
}, 8, ["checked"]), k(a, {
|
|
893
863
|
value: d.value,
|
|
@@ -905,52 +875,52 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
905
875
|
"disabled",
|
|
906
876
|
"options"
|
|
907
877
|
])]),
|
|
908
|
-
E("div",
|
|
878
|
+
E("div", Ne, [k(r, {
|
|
909
879
|
checked: c.cell_summary_component_params,
|
|
910
880
|
"onUpdate:checked": t[7] ||= (e) => c.cell_summary_component_params = e,
|
|
911
881
|
class: "config-check"
|
|
912
882
|
}, {
|
|
913
|
-
default:
|
|
883
|
+
default: W(() => t[17] ||= [O(" 参数 ")]),
|
|
914
884
|
_: 1
|
|
915
|
-
}, 8, ["checked"]), c.cell_summary_component_params && d.value ===
|
|
885
|
+
}, 8, ["checked"]), c.cell_summary_component_params && d.value === B("common_number") ? (F(), C(h, {
|
|
916
886
|
key: 0,
|
|
917
|
-
value:
|
|
918
|
-
"onUpdate:value": t[8] ||= (e) =>
|
|
887
|
+
value: Y.value,
|
|
888
|
+
"onUpdate:value": t[8] ||= (e) => Y.value = e,
|
|
919
889
|
size: "small",
|
|
920
890
|
class: "config-control",
|
|
921
|
-
options:
|
|
891
|
+
options: B(b),
|
|
922
892
|
placeholder: "#,##0.00",
|
|
923
893
|
"filter-option": g
|
|
924
|
-
}, null, 8, ["value", "options"])) : c.cell_summary_component_params ? (
|
|
894
|
+
}, null, 8, ["value", "options"])) : c.cell_summary_component_params ? (F(), C(y, {
|
|
925
895
|
key: 1,
|
|
926
896
|
value: f.value,
|
|
927
897
|
"onUpdate:value": t[9] ||= (e) => f.value = e,
|
|
928
898
|
rows: 1,
|
|
929
899
|
class: N(["config-control", { "params-error": m.value }]),
|
|
930
900
|
placeholder: "{\"key\": \"value\"}"
|
|
931
|
-
}, null, 8, ["value", "class"])) : (
|
|
932
|
-
m.value ? (
|
|
901
|
+
}, null, 8, ["value", "class"])) : (F(), T("span", Pe, " 勾选后配置 "))]),
|
|
902
|
+
m.value ? (F(), T("div", Fe, z(m.value), 1)) : w("", !0)
|
|
933
903
|
])]),
|
|
934
904
|
k(n, {
|
|
935
905
|
orientation: "left",
|
|
936
906
|
class: "batch-divider"
|
|
937
907
|
}, {
|
|
938
|
-
default:
|
|
908
|
+
default: W(() => [O(" 选择列(已选 " + z(_.value.size) + " / " + z(e.rows.length) + " 列) ", 1)]),
|
|
939
909
|
_: 1
|
|
940
910
|
}),
|
|
941
|
-
E("div",
|
|
911
|
+
E("div", Ie, [
|
|
942
912
|
k(S, {
|
|
943
913
|
size: "small",
|
|
944
|
-
onClick:
|
|
914
|
+
onClick: H
|
|
945
915
|
}, {
|
|
946
|
-
default:
|
|
916
|
+
default: W(() => t[19] ||= [O(" 全选 ")]),
|
|
947
917
|
_: 1
|
|
948
918
|
}),
|
|
949
919
|
k(S, {
|
|
950
920
|
size: "small",
|
|
951
|
-
onClick:
|
|
921
|
+
onClick: G
|
|
952
922
|
}, {
|
|
953
|
-
default:
|
|
923
|
+
default: W(() => t[20] ||= [O(" 清空 ")]),
|
|
954
924
|
_: 1
|
|
955
925
|
}),
|
|
956
926
|
t[21] ||= E("span", { class: "drag-hint" }, "按住鼠标在格子上拖动可批量刷选", -1)
|
|
@@ -958,27 +928,27 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
958
928
|
E("div", {
|
|
959
929
|
class: "col-chips",
|
|
960
930
|
onMouseup: t[10] ||= (e) => D.value = !1
|
|
961
|
-
}, [(
|
|
931
|
+
}, [(F(!0), T(x, null, L(e.rows, (e) => (F(), T("div", {
|
|
962
932
|
key: e.data_index,
|
|
963
933
|
class: N(["col-chip", { selected: v(e) }]),
|
|
964
|
-
onMousedown:
|
|
934
|
+
onMousedown: re((t) => j(e), ["prevent"]),
|
|
965
935
|
onMouseenter: (t) => M(e)
|
|
966
|
-
}, [E("div",
|
|
936
|
+
}, [E("div", Re, [e.class_name ? (F(), C(A, {
|
|
967
937
|
key: 0,
|
|
968
938
|
color: "blue"
|
|
969
939
|
}, {
|
|
970
|
-
default:
|
|
940
|
+
default: W(() => [O(z(e.class_name), 1)]),
|
|
971
941
|
_: 2
|
|
972
|
-
}, 1024)) : w("", !0), O(" " +
|
|
942
|
+
}, 1024)) : w("", !0), O(" " + z(e.title || e.data_index), 1)]), E("div", ze, z(e.data_index), 1)], 42, Le))), 128))], 32)
|
|
973
943
|
]),
|
|
974
944
|
_: 1
|
|
975
945
|
}, 8, ["open"]);
|
|
976
946
|
};
|
|
977
947
|
}
|
|
978
|
-
}), [["__scopeId", "data-v-23d79f80"]]),
|
|
948
|
+
}), [["__scopeId", "data-v-23d79f80"]]), Ve = { class: "params-tip" }, He = {
|
|
979
949
|
key: 0,
|
|
980
950
|
class: "params-error-tip"
|
|
981
|
-
},
|
|
951
|
+
}, Ue = /*#__PURE__*/ i(/* @__PURE__ */ A({
|
|
982
952
|
__name: "ColumnParamsModal",
|
|
983
953
|
props: /*@__PURE__*/ j({
|
|
984
954
|
open: { type: Boolean },
|
|
@@ -993,14 +963,14 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
993
963
|
}),
|
|
994
964
|
emits: ["update:open"],
|
|
995
965
|
setup(e) {
|
|
996
|
-
let t = e, n =
|
|
966
|
+
let t = e, n = V(e, "open"), r = {
|
|
997
967
|
cell_component_params: "cellComponentParams",
|
|
998
968
|
cell_summary_component_params: "cellSummaryComponentParams"
|
|
999
969
|
}, i = {
|
|
1000
970
|
cell_component_params: "组件参数",
|
|
1001
971
|
cell_summary_component_params: "汇总参数"
|
|
1002
|
-
}, a = r[t.field] || t.field, o = i[t.field] || t.field, s =
|
|
1003
|
-
|
|
972
|
+
}, a = r[t.field] || t.field, o = i[t.field] || t.field, s = I(""), c = I("");
|
|
973
|
+
U(() => t.open, (e) => {
|
|
1004
974
|
if (!e) return;
|
|
1005
975
|
let n = t.record?.[t.field];
|
|
1006
976
|
s.value = n == null ? "" : JSON.stringify(n, null, 2), c.value = "";
|
|
@@ -1023,9 +993,9 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1023
993
|
t.record[t.field] = e ? JSON.parse(e) : null, n.value = !1;
|
|
1024
994
|
};
|
|
1025
995
|
return (e, t) => {
|
|
1026
|
-
let r =
|
|
1027
|
-
return
|
|
1028
|
-
title: `${
|
|
996
|
+
let r = R("a-textarea"), i = R("a-modal");
|
|
997
|
+
return F(), C(i, {
|
|
998
|
+
title: `${B(o)} —— ${e.record?.title || e.record?.data_index || ""}`,
|
|
1029
999
|
width: "720px",
|
|
1030
1000
|
open: n.value,
|
|
1031
1001
|
"cancel-text": "取消",
|
|
@@ -1035,10 +1005,10 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1035
1005
|
onCancel: t[0] ||= (e) => n.value = !1,
|
|
1036
1006
|
onOk: u
|
|
1037
1007
|
}, {
|
|
1038
|
-
default:
|
|
1039
|
-
E("div",
|
|
1008
|
+
default: W(() => [
|
|
1009
|
+
E("div", Ve, [
|
|
1040
1010
|
t[1] ||= O(" 组件运行时参数(JSON 对象)。运行时从列配置的 "),
|
|
1041
|
-
E("code", null, B(
|
|
1011
|
+
E("code", null, z(B(a)), 1),
|
|
1042
1012
|
t[2] ||= O(" 读取 —— 如「通用数字」组件用 "),
|
|
1043
1013
|
t[3] ||= E("code", null, "{ \"pattern\": \"#,##0.00\" }", -1),
|
|
1044
1014
|
t[4] ||= O(" 指定 numfmt 格式串。留空 = 不传参数(组件用内置缺省值)。 ")
|
|
@@ -1049,13 +1019,13 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1049
1019
|
class: N({ "params-error": !!c.value }),
|
|
1050
1020
|
onInput: l
|
|
1051
1021
|
}, null, 8, ["value", "class"]),
|
|
1052
|
-
c.value ? (
|
|
1022
|
+
c.value ? (F(), T("div", He, z(c.value), 1)) : w("", !0)
|
|
1053
1023
|
]),
|
|
1054
1024
|
_: 1
|
|
1055
1025
|
}, 8, ["title", "open"]);
|
|
1056
1026
|
};
|
|
1057
1027
|
}
|
|
1058
|
-
}), [["__scopeId", "data-v-4dbee96c"]]), Z = a(),
|
|
1028
|
+
}), [["__scopeId", "data-v-4dbee96c"]]), Z = a(), We = m, Ge = [
|
|
1059
1029
|
"eq",
|
|
1060
1030
|
"icontains",
|
|
1061
1031
|
"istartswith",
|
|
@@ -1071,7 +1041,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1071
1041
|
"notcontains",
|
|
1072
1042
|
"notstartswith",
|
|
1073
1043
|
"notendswith"
|
|
1074
|
-
],
|
|
1044
|
+
], Ke = [
|
|
1075
1045
|
"between",
|
|
1076
1046
|
"gt",
|
|
1077
1047
|
"lt",
|
|
@@ -1081,7 +1051,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1081
1051
|
"notbetween",
|
|
1082
1052
|
"not_eq",
|
|
1083
1053
|
"not_blank_not_null"
|
|
1084
|
-
],
|
|
1054
|
+
], qe = ["in", "notin"], Je = [
|
|
1085
1055
|
"between",
|
|
1086
1056
|
"eq",
|
|
1087
1057
|
"gt",
|
|
@@ -1089,71 +1059,71 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1089
1059
|
"gte",
|
|
1090
1060
|
"lte",
|
|
1091
1061
|
"notbetween"
|
|
1092
|
-
],
|
|
1062
|
+
], Ye = [
|
|
1093
1063
|
"int",
|
|
1094
1064
|
"str",
|
|
1095
1065
|
"bool",
|
|
1096
1066
|
"datetime"
|
|
1097
|
-
],
|
|
1067
|
+
], Xe = [
|
|
1098
1068
|
"input",
|
|
1099
1069
|
"remote",
|
|
1100
1070
|
"choices"
|
|
1101
|
-
],
|
|
1071
|
+
], Ze = [{
|
|
1102
1072
|
value: !0,
|
|
1103
1073
|
label: "true"
|
|
1104
1074
|
}, {
|
|
1105
1075
|
value: !1,
|
|
1106
1076
|
label: "false"
|
|
1107
|
-
}],
|
|
1077
|
+
}], Qe = [
|
|
1108
1078
|
"select",
|
|
1109
1079
|
"radio",
|
|
1110
1080
|
"checkbox"
|
|
1111
|
-
],
|
|
1081
|
+
], $e = [
|
|
1112
1082
|
"select",
|
|
1113
1083
|
"radio",
|
|
1114
1084
|
"checkbox",
|
|
1115
1085
|
"groupselect"
|
|
1116
|
-
],
|
|
1086
|
+
], et = [
|
|
1117
1087
|
"select",
|
|
1118
1088
|
"radio",
|
|
1119
1089
|
"checkbox",
|
|
1120
1090
|
"groupselect"
|
|
1121
|
-
],
|
|
1091
|
+
], tt = [
|
|
1122
1092
|
"select",
|
|
1123
1093
|
"remoteselectpro",
|
|
1124
1094
|
"remotecomplete",
|
|
1125
1095
|
"remotetext"
|
|
1126
|
-
],
|
|
1096
|
+
], nt = [
|
|
1127
1097
|
"treeselect",
|
|
1128
1098
|
"cascader",
|
|
1129
1099
|
"remotetreeselectpro",
|
|
1130
1100
|
"remotecascaderpro"
|
|
1131
|
-
],
|
|
1132
|
-
...
|
|
1101
|
+
], rt = [
|
|
1102
|
+
...Qe,
|
|
1133
1103
|
"treeselect",
|
|
1134
1104
|
"cascader",
|
|
1135
1105
|
"groupselect",
|
|
1136
1106
|
"remotefilterselect",
|
|
1137
|
-
...
|
|
1138
|
-
...
|
|
1139
|
-
],
|
|
1107
|
+
...tt,
|
|
1108
|
+
...nt
|
|
1109
|
+
], it = ["input", "number"], at = ["number", "money"], ot = [
|
|
1140
1110
|
"datepicker",
|
|
1141
1111
|
"monthpicker",
|
|
1142
1112
|
"monthrangepicker",
|
|
1143
1113
|
"timepicker",
|
|
1144
1114
|
"timerangepicker",
|
|
1145
1115
|
"rangepicker"
|
|
1146
|
-
],
|
|
1116
|
+
], st = [
|
|
1147
1117
|
"rangepicker",
|
|
1148
1118
|
"timerangepicker",
|
|
1149
1119
|
"monthrangepicker"
|
|
1150
|
-
],
|
|
1120
|
+
], ct = [
|
|
1151
1121
|
"remoteselectpro",
|
|
1152
1122
|
"remotecomplete",
|
|
1153
1123
|
"remotetreeselectpro",
|
|
1154
1124
|
"remotecascaderpro",
|
|
1155
1125
|
"remotetext"
|
|
1156
|
-
],
|
|
1126
|
+
], lt = [
|
|
1157
1127
|
{
|
|
1158
1128
|
label: "输入类",
|
|
1159
1129
|
options: [
|
|
@@ -1253,7 +1223,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1253
1223
|
}
|
|
1254
1224
|
]
|
|
1255
1225
|
}
|
|
1256
|
-
],
|
|
1226
|
+
], ut = (e) => !!e && e.value !== null && e.value !== void 0 && e.value !== "", Q = {
|
|
1257
1227
|
show_search: !0,
|
|
1258
1228
|
postUrl: "",
|
|
1259
1229
|
labelKeyType: 1,
|
|
@@ -1271,7 +1241,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1271
1241
|
class_name: "bool"
|
|
1272
1242
|
}]],
|
|
1273
1243
|
simpleSearchConditions: []
|
|
1274
|
-
},
|
|
1244
|
+
}, dt = {
|
|
1275
1245
|
input: {
|
|
1276
1246
|
type: "input",
|
|
1277
1247
|
label: "单行文本框",
|
|
@@ -1434,7 +1404,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1434
1404
|
placeholder: ["开始时间", "结束时间"],
|
|
1435
1405
|
allowClear: !0
|
|
1436
1406
|
}
|
|
1437
|
-
},
|
|
1407
|
+
}, ft = /* @__PURE__ */ A({
|
|
1438
1408
|
__name: "BasicConfig",
|
|
1439
1409
|
props: {
|
|
1440
1410
|
config: {},
|
|
@@ -1442,19 +1412,19 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1442
1412
|
},
|
|
1443
1413
|
emits: ["type-change"],
|
|
1444
1414
|
setup(e, { emit: t }) {
|
|
1445
|
-
let n = e, r = t, i = S(() =>
|
|
1415
|
+
let n = e, r = t, i = S(() => st.includes(n.config?.type)), a = (e) => r("type-change", e);
|
|
1446
1416
|
return (e, t) => {
|
|
1447
|
-
let n =
|
|
1448
|
-
return
|
|
1449
|
-
default:
|
|
1417
|
+
let n = R("a-select"), r = R("a-form-item"), o = R("a-col"), s = R("a-input"), c = R("a-switch"), l = R("a-space-compact"), u = R("a-row");
|
|
1418
|
+
return F(), C(u, { gutter: 16 }, {
|
|
1419
|
+
default: W(() => [
|
|
1450
1420
|
k(o, { span: 12 }, {
|
|
1451
|
-
default:
|
|
1452
|
-
default:
|
|
1421
|
+
default: W(() => [k(r, { label: "组件类型" }, {
|
|
1422
|
+
default: W(() => [k(n, {
|
|
1453
1423
|
value: e.config.type,
|
|
1454
1424
|
placeholder: "选择搜索组件",
|
|
1455
1425
|
"show-search": "",
|
|
1456
1426
|
"option-filter-prop": "label",
|
|
1457
|
-
options:
|
|
1427
|
+
options: B(lt),
|
|
1458
1428
|
onChange: a
|
|
1459
1429
|
}, null, 8, ["value", "options"])]),
|
|
1460
1430
|
_: 1
|
|
@@ -1462,8 +1432,8 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1462
1432
|
_: 1
|
|
1463
1433
|
}),
|
|
1464
1434
|
k(o, { span: 12 }, {
|
|
1465
|
-
default:
|
|
1466
|
-
default:
|
|
1435
|
+
default: W(() => [k(r, { label: "名称" }, {
|
|
1436
|
+
default: W(() => [k(s, {
|
|
1467
1437
|
value: e.config.label,
|
|
1468
1438
|
"onUpdate:value": t[0] ||= (t) => e.config.label = t,
|
|
1469
1439
|
"allow-clear": "",
|
|
@@ -1474,8 +1444,8 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1474
1444
|
_: 1
|
|
1475
1445
|
}),
|
|
1476
1446
|
k(o, { span: 12 }, {
|
|
1477
|
-
default:
|
|
1478
|
-
default:
|
|
1447
|
+
default: W(() => [k(r, { label: "可清空" }, {
|
|
1448
|
+
default: W(() => [k(c, {
|
|
1479
1449
|
checked: e.config.allowClear,
|
|
1480
1450
|
"onUpdate:checked": t[1] ||= (t) => e.config.allowClear = t,
|
|
1481
1451
|
"checked-children": "开",
|
|
@@ -1487,8 +1457,8 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1487
1457
|
_: 1
|
|
1488
1458
|
}),
|
|
1489
1459
|
k(o, { span: 12 }, {
|
|
1490
|
-
default:
|
|
1491
|
-
default:
|
|
1460
|
+
default: W(() => [k(r, { label: "禁用" }, {
|
|
1461
|
+
default: W(() => [k(c, {
|
|
1492
1462
|
checked: e.config.disabled,
|
|
1493
1463
|
"onUpdate:checked": t[2] ||= (t) => e.config.disabled = t,
|
|
1494
1464
|
"checked-children": "开",
|
|
@@ -1499,16 +1469,16 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1499
1469
|
})]),
|
|
1500
1470
|
_: 1
|
|
1501
1471
|
}),
|
|
1502
|
-
i.value ? (
|
|
1472
|
+
i.value ? (F(), C(o, {
|
|
1503
1473
|
key: 0,
|
|
1504
1474
|
span: 24
|
|
1505
1475
|
}, {
|
|
1506
|
-
default:
|
|
1507
|
-
default:
|
|
1476
|
+
default: W(() => [k(r, { label: "提示语" }, {
|
|
1477
|
+
default: W(() => [k(l, {
|
|
1508
1478
|
block: "",
|
|
1509
1479
|
style: { width: "100%" }
|
|
1510
1480
|
}, {
|
|
1511
|
-
default:
|
|
1481
|
+
default: W(() => [k(s, {
|
|
1512
1482
|
value: e.config.placeholder[0],
|
|
1513
1483
|
"onUpdate:value": t[3] ||= (t) => e.config.placeholder[0] = t,
|
|
1514
1484
|
placeholder: "开始",
|
|
@@ -1524,12 +1494,12 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1524
1494
|
_: 1
|
|
1525
1495
|
})]),
|
|
1526
1496
|
_: 1
|
|
1527
|
-
})) : (
|
|
1497
|
+
})) : (F(), C(o, {
|
|
1528
1498
|
key: 1,
|
|
1529
1499
|
span: 24
|
|
1530
1500
|
}, {
|
|
1531
|
-
default:
|
|
1532
|
-
default:
|
|
1501
|
+
default: W(() => [k(r, { label: "提示语" }, {
|
|
1502
|
+
default: W(() => [k(s, {
|
|
1533
1503
|
value: e.config.placeholder,
|
|
1534
1504
|
"onUpdate:value": t[5] ||= (t) => e.config.placeholder = t,
|
|
1535
1505
|
"allow-clear": "",
|
|
@@ -1544,7 +1514,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1544
1514
|
});
|
|
1545
1515
|
};
|
|
1546
1516
|
}
|
|
1547
|
-
}),
|
|
1517
|
+
}), pt = /* @__PURE__ */ A({
|
|
1548
1518
|
__name: "OptionKeysConfig",
|
|
1549
1519
|
props: {
|
|
1550
1520
|
config: {},
|
|
@@ -1555,10 +1525,10 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1555
1525
|
setup(e) {
|
|
1556
1526
|
let t = e, n = S(() => !!t.remote), r = (e, t) => !e || (t?.label ?? "").toLowerCase().includes(e.toLowerCase());
|
|
1557
1527
|
return (e, t) => {
|
|
1558
|
-
let i =
|
|
1559
|
-
return
|
|
1560
|
-
default:
|
|
1561
|
-
default:
|
|
1528
|
+
let i = R("a-input"), a = R("a-auto-complete"), o = R("a-form-item"), s = R("a-col");
|
|
1529
|
+
return F(), T(x, null, [k(s, { span: 12 }, {
|
|
1530
|
+
default: W(() => [k(o, { label: "数值字段" }, {
|
|
1531
|
+
default: W(() => [n.value ? (F(), C(a, {
|
|
1562
1532
|
key: 1,
|
|
1563
1533
|
value: e.config.valueKey,
|
|
1564
1534
|
"onUpdate:value": t[1] ||= (t) => e.config.valueKey = t,
|
|
@@ -1571,7 +1541,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1571
1541
|
"value",
|
|
1572
1542
|
"options",
|
|
1573
1543
|
"loading"
|
|
1574
|
-
])) : (
|
|
1544
|
+
])) : (F(), C(i, {
|
|
1575
1545
|
key: 0,
|
|
1576
1546
|
value: e.config.valueKey,
|
|
1577
1547
|
"onUpdate:value": t[0] ||= (t) => e.config.valueKey = t,
|
|
@@ -1580,12 +1550,12 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1580
1550
|
_: 1
|
|
1581
1551
|
})]),
|
|
1582
1552
|
_: 1
|
|
1583
|
-
}), !n.value || e.config.labelKeyType === 1 ? (
|
|
1553
|
+
}), !n.value || e.config.labelKeyType === 1 ? (F(), C(s, {
|
|
1584
1554
|
key: 0,
|
|
1585
1555
|
span: 12
|
|
1586
1556
|
}, {
|
|
1587
|
-
default:
|
|
1588
|
-
default:
|
|
1557
|
+
default: W(() => [k(o, { label: "显示字段" }, {
|
|
1558
|
+
default: W(() => [n.value ? (F(), C(a, {
|
|
1589
1559
|
key: 1,
|
|
1590
1560
|
value: e.config.labelKey,
|
|
1591
1561
|
"onUpdate:value": t[3] ||= (t) => e.config.labelKey = t,
|
|
@@ -1598,7 +1568,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1598
1568
|
"value",
|
|
1599
1569
|
"options",
|
|
1600
1570
|
"loading"
|
|
1601
|
-
])) : (
|
|
1571
|
+
])) : (F(), C(i, {
|
|
1602
1572
|
key: 0,
|
|
1603
1573
|
value: e.config.labelKey,
|
|
1604
1574
|
"onUpdate:value": t[2] ||= (t) => e.config.labelKey = t,
|
|
@@ -1610,10 +1580,10 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1610
1580
|
})) : w("", !0)], 64);
|
|
1611
1581
|
};
|
|
1612
1582
|
}
|
|
1613
|
-
}),
|
|
1583
|
+
}), mt = { class: "section-title" }, ht = {
|
|
1614
1584
|
key: 0,
|
|
1615
1585
|
class: "opt-empty"
|
|
1616
|
-
},
|
|
1586
|
+
}, gt = /*#__PURE__*/ i(/* @__PURE__ */ A({
|
|
1617
1587
|
__name: "OptionListConfig",
|
|
1618
1588
|
props: {
|
|
1619
1589
|
config: {},
|
|
@@ -1633,11 +1603,11 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1633
1603
|
value: "bool",
|
|
1634
1604
|
label: "布尔"
|
|
1635
1605
|
}
|
|
1636
|
-
], r =
|
|
1606
|
+
], r = I([]), i = !1, a = (e) => typeof e == "boolean" ? "bool" : typeof e == "number" ? "int" : "str", o = () => {
|
|
1637
1607
|
let e = String(t.record?.class_name || "").toLowerCase();
|
|
1638
1608
|
return e === "int" || e === "float" || e === "decimal" || e === "number" ? "int" : e === "bool" || e === "boolean" ? "bool" : "str";
|
|
1639
1609
|
};
|
|
1640
|
-
|
|
1610
|
+
U(() => t.config?.options, () => {
|
|
1641
1611
|
let e = (Array.isArray(t.config?.options) ? t.config.options : []).map((e) => ({
|
|
1642
1612
|
valueType: a(e?.value),
|
|
1643
1613
|
value: e?.value ?? null,
|
|
@@ -1659,7 +1629,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1659
1629
|
}, c = (e) => {
|
|
1660
1630
|
e.value = s(e);
|
|
1661
1631
|
};
|
|
1662
|
-
|
|
1632
|
+
U(r, () => {
|
|
1663
1633
|
i || (t.config.options = r.value.map((e) => ({
|
|
1664
1634
|
value: s(e),
|
|
1665
1635
|
label: e.label == null ? "" : String(e.label)
|
|
@@ -1671,8 +1641,8 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1671
1641
|
value: null,
|
|
1672
1642
|
label: ""
|
|
1673
1643
|
});
|
|
1674
|
-
}, u =
|
|
1675
|
-
|
|
1644
|
+
}, u = I(!1);
|
|
1645
|
+
U(() => t.record?.content_map, (e) => {
|
|
1676
1646
|
u.value = !!e && typeof e == "object" && !Array.isArray(e) && Object.keys(e).length > 0;
|
|
1677
1647
|
}, { immediate: !0 });
|
|
1678
1648
|
let d = () => {
|
|
@@ -1689,31 +1659,31 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1689
1659
|
});
|
|
1690
1660
|
};
|
|
1691
1661
|
return (e, t) => {
|
|
1692
|
-
let i =
|
|
1693
|
-
return
|
|
1694
|
-
default:
|
|
1695
|
-
E("div",
|
|
1662
|
+
let i = R("a-button"), a = R("a-select"), o = R("a-input-number"), s = R("a-input"), f = R("a-col");
|
|
1663
|
+
return F(), C(f, { span: 24 }, {
|
|
1664
|
+
default: W(() => [
|
|
1665
|
+
E("div", mt, [
|
|
1696
1666
|
t[2] ||= E("span", null, "选项列表", -1),
|
|
1697
1667
|
k(i, {
|
|
1698
1668
|
type: "primary",
|
|
1699
1669
|
size: "small",
|
|
1700
1670
|
onClick: l
|
|
1701
1671
|
}, {
|
|
1702
|
-
default:
|
|
1672
|
+
default: W(() => t[0] ||= [O(" + 添加选项 ")]),
|
|
1703
1673
|
_: 1
|
|
1704
1674
|
}),
|
|
1705
|
-
u.value ? (
|
|
1675
|
+
u.value ? (F(), C(i, {
|
|
1706
1676
|
key: 0,
|
|
1707
1677
|
size: "small",
|
|
1708
1678
|
onClick: d
|
|
1709
1679
|
}, {
|
|
1710
|
-
default:
|
|
1680
|
+
default: W(() => t[1] ||= [O(" 从「转换/颜色」导入 ")]),
|
|
1711
1681
|
_: 1
|
|
1712
1682
|
})) : w("", !0),
|
|
1713
1683
|
t[3] ||= E("span", { class: "opt-tip" }, "值类型按该列在 SQL 中的实际类型选择(数值列勿用字符,Oracle 下会直接比较失败)。", -1)
|
|
1714
1684
|
]),
|
|
1715
|
-
r.value.length ? w("", !0) : (
|
|
1716
|
-
(
|
|
1685
|
+
r.value.length ? w("", !0) : (F(), T("div", ht, " 暂无选项 —— 下拉选框/单选框/多选框至少需要一个选项才能使用。 ")),
|
|
1686
|
+
(F(!0), T(x, null, L(r.value, (e, l) => (F(), T("div", {
|
|
1717
1687
|
key: l,
|
|
1718
1688
|
class: "row-line"
|
|
1719
1689
|
}, [
|
|
@@ -1728,24 +1698,24 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1728
1698
|
"onUpdate:value",
|
|
1729
1699
|
"onChange"
|
|
1730
1700
|
]),
|
|
1731
|
-
e.valueType === "bool" ? (
|
|
1701
|
+
e.valueType === "bool" ? (F(), C(a, {
|
|
1732
1702
|
key: 0,
|
|
1733
1703
|
value: e.value,
|
|
1734
1704
|
"onUpdate:value": (t) => e.value = t,
|
|
1735
1705
|
class: "w-val",
|
|
1736
1706
|
placeholder: "值",
|
|
1737
|
-
options:
|
|
1707
|
+
options: B(Ze)
|
|
1738
1708
|
}, null, 8, [
|
|
1739
1709
|
"value",
|
|
1740
1710
|
"onUpdate:value",
|
|
1741
1711
|
"options"
|
|
1742
|
-
])) : e.valueType === "int" ? (
|
|
1712
|
+
])) : e.valueType === "int" ? (F(), C(o, {
|
|
1743
1713
|
key: 1,
|
|
1744
1714
|
value: e.value,
|
|
1745
1715
|
"onUpdate:value": (t) => e.value = t,
|
|
1746
1716
|
class: "w-val",
|
|
1747
1717
|
placeholder: "值"
|
|
1748
|
-
}, null, 8, ["value", "onUpdate:value"])) : (
|
|
1718
|
+
}, null, 8, ["value", "onUpdate:value"])) : (F(), C(s, {
|
|
1749
1719
|
key: 2,
|
|
1750
1720
|
value: e.value,
|
|
1751
1721
|
"onUpdate:value": (t) => e.value = t,
|
|
@@ -1765,7 +1735,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1765
1735
|
danger: "",
|
|
1766
1736
|
onClick: (e) => r.value.splice(l, 1)
|
|
1767
1737
|
}, {
|
|
1768
|
-
default:
|
|
1738
|
+
default: W(() => t[4] ||= [O(" 删除 ")]),
|
|
1769
1739
|
_: 2
|
|
1770
1740
|
}, 1032, ["onClick"])
|
|
1771
1741
|
]))), 128))
|
|
@@ -1774,7 +1744,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1774
1744
|
});
|
|
1775
1745
|
};
|
|
1776
1746
|
}
|
|
1777
|
-
}), [["__scopeId", "data-v-92677fba"]]),
|
|
1747
|
+
}), [["__scopeId", "data-v-92677fba"]]), _t = { class: "opt-line opt-label" }, vt = { class: "opt-line opt-value" }, yt = ["title"], bt = /*#__PURE__*/ i(/* @__PURE__ */ A({
|
|
1778
1748
|
__name: "PostUrlField",
|
|
1779
1749
|
props: {
|
|
1780
1750
|
value: {},
|
|
@@ -1788,7 +1758,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1788
1758
|
"search"
|
|
1789
1759
|
],
|
|
1790
1760
|
setup(e, { emit: t }) {
|
|
1791
|
-
let n = e, r = t, i =
|
|
1761
|
+
let n = e, r = t, i = I(""), a = I(null), o = (e) => n.itemList.find((t) => t.value === e), s = S(() => n.itemList.filter((e) => !i.value || e.value.includes(i.value) || (e.label || "").includes(i.value)).map((e) => ({
|
|
1792
1762
|
value: e.value,
|
|
1793
1763
|
label: e.label
|
|
1794
1764
|
}))), c = (e) => {
|
|
@@ -1799,8 +1769,8 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1799
1769
|
t && t.value !== a.value && (r("select", t), a.value = t.value, i.value = "");
|
|
1800
1770
|
};
|
|
1801
1771
|
return (e, t) => {
|
|
1802
|
-
let n =
|
|
1803
|
-
return
|
|
1772
|
+
let n = R("a-input-search"), r = R("a-auto-complete");
|
|
1773
|
+
return F(), C(r, {
|
|
1804
1774
|
value: e.value,
|
|
1805
1775
|
loading: e.loading,
|
|
1806
1776
|
style: { width: "100%" },
|
|
@@ -1808,18 +1778,18 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1808
1778
|
"onUpdate:value": l,
|
|
1809
1779
|
onSearch: c
|
|
1810
1780
|
}, {
|
|
1811
|
-
option:
|
|
1812
|
-
default:
|
|
1781
|
+
option: W(({ value: e, label: t }) => [E("div", _t, z(t), 1), E("div", vt, z(e), 1)]),
|
|
1782
|
+
default: W(() => [k(n, {
|
|
1813
1783
|
placeholder: e.placeholder,
|
|
1814
1784
|
value: e.value,
|
|
1815
1785
|
size: "middle",
|
|
1816
1786
|
onSearch: c
|
|
1817
1787
|
}, {
|
|
1818
|
-
suffix:
|
|
1788
|
+
suffix: W(() => [e.loading ? (F(), C(B(q), { key: 0 })) : (F(), T("span", {
|
|
1819
1789
|
key: 1,
|
|
1820
1790
|
title: o(e.value)?.label,
|
|
1821
1791
|
class: "post-url-suffix"
|
|
1822
|
-
},
|
|
1792
|
+
}, z(o(e.value)?.label), 9, yt))]),
|
|
1823
1793
|
_: 1
|
|
1824
1794
|
}, 8, ["placeholder", "value"])]),
|
|
1825
1795
|
_: 1
|
|
@@ -1830,10 +1800,10 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1830
1800
|
]);
|
|
1831
1801
|
};
|
|
1832
1802
|
}
|
|
1833
|
-
}), [["__scopeId", "data-v-43638cfe"]]),
|
|
1803
|
+
}), [["__scopeId", "data-v-43638cfe"]]), xt = { class: "section-title" }, St = { class: "group-header" }, Ct = { class: "group-title" }, wt = { class: "cond-row" }, Tt = { class: "row-no" }, Et = { class: "cond-row" }, Dt = { class: "cond-group" }, Ot = { class: "cond-row" }, kt = { class: "row-no" }, At = {
|
|
1834
1804
|
key: 0,
|
|
1835
1805
|
class: "cond-row"
|
|
1836
|
-
},
|
|
1806
|
+
}, jt = /*#__PURE__*/ i(/* @__PURE__ */ A({
|
|
1837
1807
|
__name: "QueryParamsConfig",
|
|
1838
1808
|
props: {
|
|
1839
1809
|
config: {},
|
|
@@ -1855,10 +1825,10 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1855
1825
|
label: "上下文"
|
|
1856
1826
|
}
|
|
1857
1827
|
], r = (e, t) => !e || (t?.label ?? "").toLowerCase().includes(e.toLowerCase()), i = S(() => {
|
|
1858
|
-
let e = t.config?.type, n =
|
|
1859
|
-
return
|
|
1828
|
+
let e = t.config?.type, n = Ge;
|
|
1829
|
+
return at.includes(e) ? n = Ke : ot.includes(e) ? n = Je : rt.includes(e) && (n = qe), Object.keys(We).filter((e) => n.includes(e)).map((e) => ({
|
|
1860
1830
|
value: e,
|
|
1861
|
-
label: `${
|
|
1831
|
+
label: `${We[e]}(${e})`
|
|
1862
1832
|
}));
|
|
1863
1833
|
}), a = () => {
|
|
1864
1834
|
Array.isArray(t.config.searchConditions) || (t.config.searchConditions = []), t.config.searchConditions.push([{
|
|
@@ -1897,59 +1867,59 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1897
1867
|
}
|
|
1898
1868
|
}, u = (e) => typeof e == "object" ? "json" : typeof e;
|
|
1899
1869
|
return (e, t) => {
|
|
1900
|
-
let d =
|
|
1901
|
-
return
|
|
1870
|
+
let d = R("a-radio-button"), f = R("a-radio-group"), p = R("a-button"), m = R("a-col"), h = R("a-space"), g = R("a-select"), _ = R("a-input"), v = R("a-auto-complete"), y = R("a-input-number"), b = R("a-range-picker"), S = R("a-textarea"), D = R("a-tag");
|
|
1871
|
+
return F(), T(x, null, [
|
|
1902
1872
|
k(m, { span: 24 }, {
|
|
1903
|
-
default:
|
|
1873
|
+
default: W(() => [E("div", xt, [
|
|
1904
1874
|
t[5] ||= E("span", null, "查询参数", -1),
|
|
1905
1875
|
k(f, {
|
|
1906
1876
|
value: e.config.queryType,
|
|
1907
1877
|
"onUpdate:value": t[0] ||= (t) => e.config.queryType = t,
|
|
1908
1878
|
size: "small"
|
|
1909
1879
|
}, {
|
|
1910
|
-
default:
|
|
1911
|
-
default:
|
|
1880
|
+
default: W(() => [k(d, { value: "simple" }, {
|
|
1881
|
+
default: W(() => t[1] ||= [O("简单查询")]),
|
|
1912
1882
|
_: 1
|
|
1913
1883
|
}), k(d, { value: "advanced" }, {
|
|
1914
|
-
default:
|
|
1884
|
+
default: W(() => t[2] ||= [O("高级查询")]),
|
|
1915
1885
|
_: 1
|
|
1916
1886
|
})]),
|
|
1917
1887
|
_: 1
|
|
1918
1888
|
}, 8, ["value"]),
|
|
1919
|
-
e.config.queryType === "advanced" ? (
|
|
1889
|
+
e.config.queryType === "advanced" ? (F(), C(p, {
|
|
1920
1890
|
key: 0,
|
|
1921
1891
|
type: "primary",
|
|
1922
1892
|
size: "small",
|
|
1923
1893
|
onClick: a
|
|
1924
1894
|
}, {
|
|
1925
|
-
default:
|
|
1895
|
+
default: W(() => t[3] ||= [O(" + 添加查询条件分组 ")]),
|
|
1926
1896
|
_: 1
|
|
1927
|
-
})) : (
|
|
1897
|
+
})) : (F(), C(p, {
|
|
1928
1898
|
key: 1,
|
|
1929
1899
|
type: "primary",
|
|
1930
1900
|
size: "small",
|
|
1931
1901
|
onClick: c
|
|
1932
1902
|
}, {
|
|
1933
|
-
default:
|
|
1903
|
+
default: W(() => t[4] ||= [O(" + 添加查询条件 ")]),
|
|
1934
1904
|
_: 1
|
|
1935
1905
|
}))
|
|
1936
1906
|
])]),
|
|
1937
1907
|
_: 1
|
|
1938
1908
|
}),
|
|
1939
|
-
e.config.queryType === "advanced" ? (
|
|
1909
|
+
e.config.queryType === "advanced" ? (F(), C(m, {
|
|
1940
1910
|
key: 0,
|
|
1941
1911
|
span: 24
|
|
1942
1912
|
}, {
|
|
1943
|
-
default:
|
|
1913
|
+
default: W(() => [(F(!0), T(x, null, L(e.config.searchConditions || [], (a, c) => (F(), T("div", {
|
|
1944
1914
|
key: c,
|
|
1945
1915
|
class: "cond-group"
|
|
1946
|
-
}, [E("div",
|
|
1947
|
-
default:
|
|
1916
|
+
}, [E("div", St, [E("span", Ct, "查询条件组 " + z(c + 1), 1), k(h, null, {
|
|
1917
|
+
default: W(() => [k(p, {
|
|
1948
1918
|
size: "small",
|
|
1949
1919
|
type: "link",
|
|
1950
1920
|
onClick: (e) => o(c)
|
|
1951
1921
|
}, {
|
|
1952
|
-
default:
|
|
1922
|
+
default: W(() => t[6] ||= [O(" + 添加查询条件 ")]),
|
|
1953
1923
|
_: 2
|
|
1954
1924
|
}, 1032, ["onClick"]), k(p, {
|
|
1955
1925
|
size: "small",
|
|
@@ -1957,15 +1927,15 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1957
1927
|
danger: "",
|
|
1958
1928
|
onClick: (t) => e.config.searchConditions.splice(c, 1)
|
|
1959
1929
|
}, {
|
|
1960
|
-
default:
|
|
1930
|
+
default: W(() => t[7] ||= [O(" 删除分组 ")]),
|
|
1961
1931
|
_: 2
|
|
1962
1932
|
}, 1032, ["onClick"])]),
|
|
1963
1933
|
_: 2
|
|
1964
|
-
}, 1024)]), (
|
|
1934
|
+
}, 1024)]), (F(!0), T(x, null, L(a, (o, c) => (F(), T("div", {
|
|
1965
1935
|
key: c,
|
|
1966
1936
|
class: "cond-item"
|
|
1967
|
-
}, [E("div",
|
|
1968
|
-
E("span",
|
|
1937
|
+
}, [E("div", wt, [
|
|
1938
|
+
E("span", Tt, "(" + z(c + 1) + ")", 1),
|
|
1969
1939
|
k(g, {
|
|
1970
1940
|
value: o.searchType,
|
|
1971
1941
|
"onUpdate:value": (e) => o.searchType = e,
|
|
@@ -1973,7 +1943,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
1973
1943
|
placeholder: "查询类型",
|
|
1974
1944
|
options: n
|
|
1975
1945
|
}, null, 8, ["value", "onUpdate:value"]),
|
|
1976
|
-
o.searchType === 1 || o.searchType === 4 ? (
|
|
1946
|
+
o.searchType === 1 || o.searchType === 4 ? (F(), C(_, {
|
|
1977
1947
|
key: 0,
|
|
1978
1948
|
value: o.select_name,
|
|
1979
1949
|
"onUpdate:value": (e) => o.select_name = e,
|
|
@@ -2003,15 +1973,15 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2003
1973
|
danger: "",
|
|
2004
1974
|
onClick: (e) => a.splice(c, 1)
|
|
2005
1975
|
}, {
|
|
2006
|
-
default:
|
|
1976
|
+
default: W(() => t[8] ||= [O(" ✕ ")]),
|
|
2007
1977
|
_: 2
|
|
2008
1978
|
}, 1032, ["onClick"])
|
|
2009
|
-
]), E("div",
|
|
1979
|
+
]), E("div", Et, [
|
|
2010
1980
|
k(g, {
|
|
2011
1981
|
value: o.format,
|
|
2012
1982
|
"onUpdate:value": (e) => o.format = e,
|
|
2013
1983
|
style: { width: "110px" },
|
|
2014
|
-
options:
|
|
1984
|
+
options: B(Xe).map((e) => ({
|
|
2015
1985
|
value: e,
|
|
2016
1986
|
label: e
|
|
2017
1987
|
}))
|
|
@@ -2038,7 +2008,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2038
2008
|
"onUpdate:value": (e) => o.class_name = e,
|
|
2039
2009
|
style: { width: "110px" },
|
|
2040
2010
|
placeholder: "数值类型",
|
|
2041
|
-
options:
|
|
2011
|
+
options: B(Ye).map((e) => ({
|
|
2042
2012
|
value: e,
|
|
2043
2013
|
label: e
|
|
2044
2014
|
})),
|
|
@@ -2049,7 +2019,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2049
2019
|
"options",
|
|
2050
2020
|
"onChange"
|
|
2051
2021
|
]),
|
|
2052
|
-
o.searchType === 3 ? (
|
|
2022
|
+
o.searchType === 3 ? (F(), T(x, { key: 0 }, [(o.operator === "between" || o.operator === "notbetween") && o.class_name === "str" ? (F(), T(x, { key: 0 }, [
|
|
2053
2023
|
k(_, {
|
|
2054
2024
|
value: o.value[0],
|
|
2055
2025
|
"onUpdate:value": (e) => o.value[0] = e,
|
|
@@ -2063,7 +2033,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2063
2033
|
style: { width: "110px" },
|
|
2064
2034
|
placeholder: "止"
|
|
2065
2035
|
}, null, 8, ["value", "onUpdate:value"])
|
|
2066
|
-
], 64)) : (o.operator === "between" || o.operator === "notbetween") && o.class_name === "int" ? (
|
|
2036
|
+
], 64)) : (o.operator === "between" || o.operator === "notbetween") && o.class_name === "int" ? (F(), T(x, { key: 1 }, [
|
|
2067
2037
|
k(y, {
|
|
2068
2038
|
value: o.value[0],
|
|
2069
2039
|
"onUpdate:value": (e) => o.value[0] = e,
|
|
@@ -2077,29 +2047,29 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2077
2047
|
style: { width: "110px" },
|
|
2078
2048
|
placeholder: "止"
|
|
2079
2049
|
}, null, 8, ["value", "onUpdate:value"])
|
|
2080
|
-
], 64)) : (o.operator === "between" || o.operator === "notbetween") && o.class_name === "datetime" ? (
|
|
2050
|
+
], 64)) : (o.operator === "between" || o.operator === "notbetween") && o.class_name === "datetime" ? (F(), C(b, {
|
|
2081
2051
|
key: 2,
|
|
2082
2052
|
value: o.value,
|
|
2083
2053
|
"onUpdate:value": (e) => o.value = e,
|
|
2084
2054
|
"show-time": "",
|
|
2085
2055
|
style: { width: "260px" }
|
|
2086
|
-
}, null, 8, ["value", "onUpdate:value"])) : o.class_name === "bool" ? (
|
|
2056
|
+
}, null, 8, ["value", "onUpdate:value"])) : o.class_name === "bool" ? (F(), C(g, {
|
|
2087
2057
|
key: 3,
|
|
2088
2058
|
value: o.value[0],
|
|
2089
2059
|
"onUpdate:value": (e) => o.value[0] = e,
|
|
2090
2060
|
style: { width: "110px" },
|
|
2091
|
-
options:
|
|
2061
|
+
options: B(Ze)
|
|
2092
2062
|
}, null, 8, [
|
|
2093
2063
|
"value",
|
|
2094
2064
|
"onUpdate:value",
|
|
2095
2065
|
"options"
|
|
2096
|
-
])) : o.operator === "not_blank_not_null" ? (
|
|
2066
|
+
])) : o.operator === "not_blank_not_null" ? (F(), C(_, {
|
|
2097
2067
|
key: 4,
|
|
2098
2068
|
value: "",
|
|
2099
2069
|
style: { width: "150px" },
|
|
2100
2070
|
disabled: "",
|
|
2101
2071
|
placeholder: "(无值)"
|
|
2102
|
-
})) : (
|
|
2072
|
+
})) : (F(), C(_, {
|
|
2103
2073
|
key: 5,
|
|
2104
2074
|
value: o.value[0],
|
|
2105
2075
|
"onUpdate:value": (e) => o.value[0] = e,
|
|
@@ -2110,15 +2080,15 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2110
2080
|
])]))), 128))]))), 128))]),
|
|
2111
2081
|
_: 1
|
|
2112
2082
|
})) : w("", !0),
|
|
2113
|
-
e.config.queryType === "simple" ? (
|
|
2083
|
+
e.config.queryType === "simple" ? (F(), C(m, {
|
|
2114
2084
|
key: 1,
|
|
2115
2085
|
span: 24
|
|
2116
2086
|
}, {
|
|
2117
|
-
default:
|
|
2087
|
+
default: W(() => [E("div", Dt, [(F(!0), T(x, null, L(e.config.simpleSearchConditions || [], (i, a) => (F(), T("div", {
|
|
2118
2088
|
key: a,
|
|
2119
2089
|
class: "cond-item"
|
|
2120
|
-
}, [E("div",
|
|
2121
|
-
E("span",
|
|
2090
|
+
}, [E("div", Ot, [
|
|
2091
|
+
E("span", kt, "(" + z(a + 1) + ")", 1),
|
|
2122
2092
|
k(g, {
|
|
2123
2093
|
value: i.searchType,
|
|
2124
2094
|
"onUpdate:value": (e) => i.searchType = e,
|
|
@@ -2126,7 +2096,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2126
2096
|
placeholder: "查询类型",
|
|
2127
2097
|
options: n
|
|
2128
2098
|
}, null, 8, ["value", "onUpdate:value"]),
|
|
2129
|
-
i.searchType === 1 || i.searchType === 4 ? (
|
|
2099
|
+
i.searchType === 1 || i.searchType === 4 ? (F(), C(_, {
|
|
2130
2100
|
key: 0,
|
|
2131
2101
|
value: i.select_name,
|
|
2132
2102
|
"onUpdate:value": (e) => i.select_name = e,
|
|
@@ -2156,10 +2126,10 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2156
2126
|
danger: "",
|
|
2157
2127
|
onClick: (t) => e.config.simpleSearchConditions.splice(a, 1)
|
|
2158
2128
|
}, {
|
|
2159
|
-
default:
|
|
2129
|
+
default: W(() => t[11] ||= [O(" ✕ ")]),
|
|
2160
2130
|
_: 2
|
|
2161
2131
|
}, 1032, ["onClick"])
|
|
2162
|
-
]), i.searchType === 3 ? (
|
|
2132
|
+
]), i.searchType === 3 ? (F(), T("div", At, [k(S, {
|
|
2163
2133
|
value: typeof i.value == "object" ? JSON.stringify(i.value) : i.value,
|
|
2164
2134
|
placeholder: "请输入值(对象/数组/字符串)",
|
|
2165
2135
|
"auto-size": {
|
|
@@ -2168,11 +2138,11 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2168
2138
|
},
|
|
2169
2139
|
style: { flex: "1" },
|
|
2170
2140
|
onInput: (e) => l(e, i)
|
|
2171
|
-
}, null, 8, ["value", "onInput"]), i.value !== "" && i.value != null ? (
|
|
2141
|
+
}, null, 8, ["value", "onInput"]), i.value !== "" && i.value != null ? (F(), C(D, {
|
|
2172
2142
|
key: 0,
|
|
2173
2143
|
color: "blue"
|
|
2174
2144
|
}, {
|
|
2175
|
-
default:
|
|
2145
|
+
default: W(() => [O(z(u(i.value)), 1)]),
|
|
2176
2146
|
_: 2
|
|
2177
2147
|
}, 1024)) : w("", !0)])) : w("", !0)]))), 128))])]),
|
|
2178
2148
|
_: 1
|
|
@@ -2188,39 +2158,39 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2188
2158
|
},
|
|
2189
2159
|
setup(e) {
|
|
2190
2160
|
return (e, t) => {
|
|
2191
|
-
let n =
|
|
2192
|
-
return
|
|
2193
|
-
default:
|
|
2194
|
-
default:
|
|
2161
|
+
let n = R("a-radio"), r = R("a-radio-group"), i = R("a-form-item"), a = R("a-col");
|
|
2162
|
+
return F(), C(a, { span: 12 }, {
|
|
2163
|
+
default: W(() => [k(i, { label: "单选多选" }, {
|
|
2164
|
+
default: W(() => [e.field === "mode" ? (F(), C(r, {
|
|
2195
2165
|
key: 0,
|
|
2196
2166
|
value: e.config.mode,
|
|
2197
2167
|
"onUpdate:value": t[0] ||= (t) => e.config.mode = t
|
|
2198
2168
|
}, {
|
|
2199
|
-
default:
|
|
2169
|
+
default: W(() => [
|
|
2200
2170
|
k(n, { value: "default" }, {
|
|
2201
|
-
default:
|
|
2171
|
+
default: W(() => t[2] ||= [O("单选")]),
|
|
2202
2172
|
_: 1
|
|
2203
2173
|
}),
|
|
2204
2174
|
k(n, { value: "multiple" }, {
|
|
2205
|
-
default:
|
|
2175
|
+
default: W(() => t[3] ||= [O("多选")]),
|
|
2206
2176
|
_: 1
|
|
2207
2177
|
}),
|
|
2208
2178
|
k(n, { value: "tags" }, {
|
|
2209
|
-
default:
|
|
2179
|
+
default: W(() => t[4] ||= [O("标签")]),
|
|
2210
2180
|
_: 1
|
|
2211
2181
|
})
|
|
2212
2182
|
]),
|
|
2213
2183
|
_: 1
|
|
2214
|
-
}, 8, ["value"])) : (
|
|
2184
|
+
}, 8, ["value"])) : (F(), C(r, {
|
|
2215
2185
|
key: 1,
|
|
2216
2186
|
value: e.config.multiple,
|
|
2217
2187
|
"onUpdate:value": t[1] ||= (t) => e.config.multiple = t
|
|
2218
2188
|
}, {
|
|
2219
|
-
default:
|
|
2220
|
-
default:
|
|
2189
|
+
default: W(() => [k(n, { value: !1 }, {
|
|
2190
|
+
default: W(() => t[5] ||= [O("单选")]),
|
|
2221
2191
|
_: 1
|
|
2222
2192
|
}), k(n, { value: !0 }, {
|
|
2223
|
-
default:
|
|
2193
|
+
default: W(() => t[6] ||= [O("多选")]),
|
|
2224
2194
|
_: 1
|
|
2225
2195
|
})]),
|
|
2226
2196
|
_: 1
|
|
@@ -2231,23 +2201,23 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2231
2201
|
});
|
|
2232
2202
|
};
|
|
2233
2203
|
}
|
|
2234
|
-
}),
|
|
2204
|
+
}), Mt = /* @__PURE__ */ A({
|
|
2235
2205
|
__name: "ShowSearchConfig",
|
|
2236
2206
|
props: { config: {} },
|
|
2237
2207
|
setup(e) {
|
|
2238
2208
|
return (e, t) => {
|
|
2239
|
-
let n =
|
|
2240
|
-
return
|
|
2241
|
-
default:
|
|
2242
|
-
default:
|
|
2209
|
+
let n = R("a-radio"), r = R("a-radio-group"), i = R("a-form-item"), a = R("a-col");
|
|
2210
|
+
return F(), C(a, { span: 12 }, {
|
|
2211
|
+
default: W(() => [k(i, { label: "可否搜索" }, {
|
|
2212
|
+
default: W(() => [k(r, {
|
|
2243
2213
|
value: e.config.show_search,
|
|
2244
2214
|
"onUpdate:value": t[0] ||= (t) => e.config.show_search = t
|
|
2245
2215
|
}, {
|
|
2246
|
-
default:
|
|
2247
|
-
default:
|
|
2216
|
+
default: W(() => [k(n, { value: !1 }, {
|
|
2217
|
+
default: W(() => t[1] ||= [O("否")]),
|
|
2248
2218
|
_: 1
|
|
2249
2219
|
}), k(n, { value: !0 }, {
|
|
2250
|
-
default:
|
|
2220
|
+
default: W(() => t[2] ||= [O("是")]),
|
|
2251
2221
|
_: 1
|
|
2252
2222
|
})]),
|
|
2253
2223
|
_: 1
|
|
@@ -2258,7 +2228,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2258
2228
|
});
|
|
2259
2229
|
};
|
|
2260
2230
|
}
|
|
2261
|
-
}),
|
|
2231
|
+
}), Nt = { class: "row-no" }, Pt = { class: "row-no" }, Ft = { class: "section-title" }, It = /*#__PURE__*/ i(/* @__PURE__ */ A({
|
|
2262
2232
|
__name: "DataSourcePanel",
|
|
2263
2233
|
props: /*@__PURE__*/ j({
|
|
2264
2234
|
config: {},
|
|
@@ -2269,7 +2239,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2269
2239
|
}),
|
|
2270
2240
|
emits: ["update:initModelText"],
|
|
2271
2241
|
setup(e) {
|
|
2272
|
-
let t = e, n =
|
|
2242
|
+
let t = e, n = V(e, "initModelText"), i = S(() => ct.includes(t.config?.type)), a = S(() => $e.includes(t.config?.type)), s = r().currentOrg, c = I([]), l = I(!1), u = 0, d = 0, f = (0, Z.debounce)((e) => {
|
|
2273
2243
|
l.value = !0;
|
|
2274
2244
|
let n = ++d;
|
|
2275
2245
|
o(e, "/sys/base_query_url_list").then((r) => {
|
|
@@ -2284,13 +2254,13 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2284
2254
|
n === d && (l.value = !1);
|
|
2285
2255
|
});
|
|
2286
2256
|
}, 500);
|
|
2287
|
-
|
|
2257
|
+
te(() => {
|
|
2288
2258
|
i.value && f({
|
|
2289
2259
|
org_id: s?.id,
|
|
2290
2260
|
is_tree: ["remotetreeselectpro", "remotecascaderpro"].includes(t.config.type)
|
|
2291
2261
|
});
|
|
2292
|
-
}),
|
|
2293
|
-
e &&
|
|
2262
|
+
}), U(() => t.config.type, (e) => {
|
|
2263
|
+
e && ct.includes(e) && f({
|
|
2294
2264
|
org_id: s?.id,
|
|
2295
2265
|
is_tree: ["remotetreeselectpro", "remotecascaderpro"].includes(e)
|
|
2296
2266
|
});
|
|
@@ -2320,7 +2290,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2320
2290
|
select_name: e
|
|
2321
2291
|
});
|
|
2322
2292
|
})), v(n.app, n.model_name);
|
|
2323
|
-
}, h =
|
|
2293
|
+
}, h = I([]), g = I(!1), _ = (e, t, n = "") => {
|
|
2324
2294
|
n = n.replace("ID", ""), n &&= `${n}-`;
|
|
2325
2295
|
for (let r of e) t.push({
|
|
2326
2296
|
value: r.name,
|
|
@@ -2349,12 +2319,12 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2349
2319
|
});
|
|
2350
2320
|
};
|
|
2351
2321
|
return (e, t) => {
|
|
2352
|
-
let r =
|
|
2353
|
-
return
|
|
2354
|
-
default:
|
|
2322
|
+
let r = R("a-form-item"), o = R("a-col"), s = R("a-radio"), u = R("a-radio-group"), d = R("a-input"), f = R("a-auto-complete"), _ = R("a-button"), v = R("a-select"), S = R("a-textarea"), A = R("a-row");
|
|
2323
|
+
return F(), C(A, { gutter: 16 }, {
|
|
2324
|
+
default: W(() => [i.value ? (F(), T(x, { key: 0 }, [
|
|
2355
2325
|
k(o, { span: 24 }, {
|
|
2356
|
-
default:
|
|
2357
|
-
default:
|
|
2326
|
+
default: W(() => [k(r, { label: "数据源" }, {
|
|
2327
|
+
default: W(() => [k(bt, {
|
|
2358
2328
|
value: e.config.postUrl,
|
|
2359
2329
|
"onUpdate:value": t[0] ||= (t) => e.config.postUrl = t,
|
|
2360
2330
|
"item-list": c.value,
|
|
@@ -2371,27 +2341,27 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2371
2341
|
})]),
|
|
2372
2342
|
_: 1
|
|
2373
2343
|
}),
|
|
2374
|
-
|
|
2344
|
+
B(tt).includes(e.config.type) ? (F(), C($, {
|
|
2375
2345
|
key: 0,
|
|
2376
2346
|
config: e.config,
|
|
2377
2347
|
field: "mode"
|
|
2378
|
-
}, null, 8, ["config"])) :
|
|
2348
|
+
}, null, 8, ["config"])) : B(nt).includes(e.config.type) ? (F(), C($, {
|
|
2379
2349
|
key: 1,
|
|
2380
2350
|
config: e.config,
|
|
2381
2351
|
field: "multiple"
|
|
2382
2352
|
}, null, 8, ["config"])) : w("", !0),
|
|
2383
|
-
k(
|
|
2353
|
+
k(Mt, { config: e.config }, null, 8, ["config"]),
|
|
2384
2354
|
k(o, { span: 12 }, {
|
|
2385
|
-
default:
|
|
2386
|
-
default:
|
|
2355
|
+
default: W(() => [k(r, { label: "显示类型" }, {
|
|
2356
|
+
default: W(() => [k(u, {
|
|
2387
2357
|
value: e.config.labelKeyType,
|
|
2388
2358
|
"onUpdate:value": t[1] ||= (t) => e.config.labelKeyType = t
|
|
2389
2359
|
}, {
|
|
2390
|
-
default:
|
|
2391
|
-
default:
|
|
2360
|
+
default: W(() => [k(s, { value: 1 }, {
|
|
2361
|
+
default: W(() => t[9] ||= [O("单字段")]),
|
|
2392
2362
|
_: 1
|
|
2393
2363
|
}), k(s, { value: 2 }, {
|
|
2394
|
-
default:
|
|
2364
|
+
default: W(() => t[10] ||= [O("多字段")]),
|
|
2395
2365
|
_: 1
|
|
2396
2366
|
})]),
|
|
2397
2367
|
_: 1
|
|
@@ -2400,7 +2370,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2400
2370
|
})]),
|
|
2401
2371
|
_: 1
|
|
2402
2372
|
}),
|
|
2403
|
-
k(
|
|
2373
|
+
k(pt, {
|
|
2404
2374
|
remote: "",
|
|
2405
2375
|
config: e.config,
|
|
2406
2376
|
options: h.value,
|
|
@@ -2410,12 +2380,12 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2410
2380
|
"options",
|
|
2411
2381
|
"loading"
|
|
2412
2382
|
]),
|
|
2413
|
-
e.config.labelKeyType === 2 ? (
|
|
2383
|
+
e.config.labelKeyType === 2 ? (F(), C(o, {
|
|
2414
2384
|
key: 2,
|
|
2415
2385
|
span: 12
|
|
2416
2386
|
}, {
|
|
2417
|
-
default:
|
|
2418
|
-
default:
|
|
2387
|
+
default: W(() => [k(r, { label: "间隔符号" }, {
|
|
2388
|
+
default: W(() => [k(d, {
|
|
2419
2389
|
value: e.config.labelSpace,
|
|
2420
2390
|
"onUpdate:value": t[2] ||= (t) => e.config.labelSpace = t,
|
|
2421
2391
|
"allow-clear": ""
|
|
@@ -2424,16 +2394,16 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2424
2394
|
})]),
|
|
2425
2395
|
_: 1
|
|
2426
2396
|
})) : w("", !0),
|
|
2427
|
-
e.config.labelKeyType === 2 ? (
|
|
2397
|
+
e.config.labelKeyType === 2 ? (F(), C(o, {
|
|
2428
2398
|
key: 3,
|
|
2429
2399
|
span: 24
|
|
2430
2400
|
}, {
|
|
2431
|
-
default:
|
|
2432
|
-
default:
|
|
2401
|
+
default: W(() => [k(r, { label: "显示列表" }, {
|
|
2402
|
+
default: W(() => [(F(!0), T(x, null, L(e.config.labelKeyList || [], (n, r) => (F(), T("div", {
|
|
2433
2403
|
key: r,
|
|
2434
2404
|
class: "row-line"
|
|
2435
2405
|
}, [
|
|
2436
|
-
E("span",
|
|
2406
|
+
E("span", Nt, "(" + z(r + 1) + ")", 1),
|
|
2437
2407
|
k(f, {
|
|
2438
2408
|
value: e.config.labelKeyList[r],
|
|
2439
2409
|
"onUpdate:value": (t) => e.config.labelKeyList[r] = t,
|
|
@@ -2452,7 +2422,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2452
2422
|
danger: "",
|
|
2453
2423
|
onClick: (t) => e.config.labelKeyList.splice(r, 1)
|
|
2454
2424
|
}, {
|
|
2455
|
-
default:
|
|
2425
|
+
default: W(() => t[11] ||= [O(" 删除 ")]),
|
|
2456
2426
|
_: 2
|
|
2457
2427
|
}, 1032, ["onClick"])
|
|
2458
2428
|
]))), 128)), k(_, {
|
|
@@ -2460,7 +2430,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2460
2430
|
type: "dashed",
|
|
2461
2431
|
onClick: t[3] ||= (e) => b("labelKeyList")
|
|
2462
2432
|
}, {
|
|
2463
|
-
default:
|
|
2433
|
+
default: W(() => t[12] ||= [O(" + 添加显示字段 ")]),
|
|
2464
2434
|
_: 1
|
|
2465
2435
|
})]),
|
|
2466
2436
|
_: 1
|
|
@@ -2468,12 +2438,12 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2468
2438
|
_: 1
|
|
2469
2439
|
})) : w("", !0),
|
|
2470
2440
|
k(o, { span: 24 }, {
|
|
2471
|
-
default:
|
|
2472
|
-
default:
|
|
2441
|
+
default: W(() => [k(r, { label: "扩展查询字段" }, {
|
|
2442
|
+
default: W(() => [(F(!0), T(x, null, L(e.config.extendedFields || [], (n, r) => (F(), T("div", {
|
|
2473
2443
|
key: r,
|
|
2474
2444
|
class: "row-line"
|
|
2475
2445
|
}, [
|
|
2476
|
-
E("span",
|
|
2446
|
+
E("span", Pt, "(" + z(r + 1) + ")", 1),
|
|
2477
2447
|
k(f, {
|
|
2478
2448
|
value: e.config.extendedFields[r],
|
|
2479
2449
|
"onUpdate:value": (t) => e.config.extendedFields[r] = t,
|
|
@@ -2492,7 +2462,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2492
2462
|
danger: "",
|
|
2493
2463
|
onClick: (t) => e.config.extendedFields.splice(r, 1)
|
|
2494
2464
|
}, {
|
|
2495
|
-
default:
|
|
2465
|
+
default: W(() => t[13] ||= [O(" 删除 ")]),
|
|
2496
2466
|
_: 2
|
|
2497
2467
|
}, 1032, ["onClick"])
|
|
2498
2468
|
]))), 128)), k(_, {
|
|
@@ -2500,7 +2470,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2500
2470
|
type: "dashed",
|
|
2501
2471
|
onClick: t[4] ||= (e) => b("extendedFields")
|
|
2502
2472
|
}, {
|
|
2503
|
-
default:
|
|
2473
|
+
default: W(() => t[14] ||= [O(" + 添加扩展查询字段 ")]),
|
|
2504
2474
|
_: 1
|
|
2505
2475
|
})]),
|
|
2506
2476
|
_: 1
|
|
@@ -2508,8 +2478,8 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2508
2478
|
_: 1
|
|
2509
2479
|
}),
|
|
2510
2480
|
k(o, { span: 24 }, {
|
|
2511
|
-
default:
|
|
2512
|
-
default:
|
|
2481
|
+
default: W(() => [k(r, { label: "默认值配置" }, {
|
|
2482
|
+
default: W(() => [k(v, {
|
|
2513
2483
|
value: e.config.defaultValueType,
|
|
2514
2484
|
"onUpdate:value": t[5] ||= (t) => e.config.defaultValueType = t,
|
|
2515
2485
|
style: { width: "200px" },
|
|
@@ -2528,7 +2498,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2528
2498
|
label: "全局值"
|
|
2529
2499
|
}
|
|
2530
2500
|
]
|
|
2531
|
-
}, null, 8, ["value"]), e.config.defaultValueType === "global" ? (
|
|
2501
|
+
}, null, 8, ["value"]), e.config.defaultValueType === "global" ? (F(), T(x, { key: 0 }, [k(d, {
|
|
2532
2502
|
value: e.config.globalDefaultKey,
|
|
2533
2503
|
"onUpdate:value": t[6] ||= (t) => e.config.globalDefaultKey = t,
|
|
2534
2504
|
placeholder: "键",
|
|
@@ -2549,7 +2519,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2549
2519
|
})]),
|
|
2550
2520
|
_: 1
|
|
2551
2521
|
}),
|
|
2552
|
-
k(
|
|
2522
|
+
k(jt, {
|
|
2553
2523
|
config: e.config,
|
|
2554
2524
|
"field-options": h.value,
|
|
2555
2525
|
"field-options-loading": g.value
|
|
@@ -2559,14 +2529,14 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2559
2529
|
"field-options-loading"
|
|
2560
2530
|
]),
|
|
2561
2531
|
k(o, { span: 24 }, {
|
|
2562
|
-
default:
|
|
2532
|
+
default: W(() => [E("div", Ft, [t[16] ||= E("span", null, "全局切换配置", -1), k(_, {
|
|
2563
2533
|
type: "primary",
|
|
2564
2534
|
size: "small",
|
|
2565
2535
|
onClick: D
|
|
2566
2536
|
}, {
|
|
2567
|
-
default:
|
|
2537
|
+
default: W(() => t[15] ||= [O(" + 添加全局切换 ")]),
|
|
2568
2538
|
_: 1
|
|
2569
|
-
})]), (
|
|
2539
|
+
})]), (F(!0), T(x, null, L(e.config.required_condition || [], (n, r) => (F(), T("div", {
|
|
2570
2540
|
key: r,
|
|
2571
2541
|
class: "row-line"
|
|
2572
2542
|
}, [
|
|
@@ -2587,15 +2557,15 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2587
2557
|
danger: "",
|
|
2588
2558
|
onClick: (t) => e.config.required_condition.splice(r, 1)
|
|
2589
2559
|
}, {
|
|
2590
|
-
default:
|
|
2560
|
+
default: W(() => t[17] ||= [O(" 删除 ")]),
|
|
2591
2561
|
_: 2
|
|
2592
2562
|
}, 1032, ["onClick"])
|
|
2593
2563
|
]))), 128))]),
|
|
2594
2564
|
_: 1
|
|
2595
2565
|
}),
|
|
2596
2566
|
k(o, { span: 24 }, {
|
|
2597
|
-
default:
|
|
2598
|
-
default:
|
|
2567
|
+
default: W(() => [k(r, { label: "初始参数:JSON" }, {
|
|
2568
|
+
default: W(() => [k(S, {
|
|
2599
2569
|
value: n.value,
|
|
2600
2570
|
"onUpdate:value": t[8] ||= (e) => n.value = e,
|
|
2601
2571
|
rows: 3,
|
|
@@ -2605,7 +2575,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2605
2575
|
})]),
|
|
2606
2576
|
_: 1
|
|
2607
2577
|
})
|
|
2608
|
-
], 64)) : w("", !0), a.value ? (
|
|
2578
|
+
], 64)) : w("", !0), a.value ? (F(), C(gt, {
|
|
2609
2579
|
key: 1,
|
|
2610
2580
|
config: e.config,
|
|
2611
2581
|
record: e.record
|
|
@@ -2614,19 +2584,19 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2614
2584
|
});
|
|
2615
2585
|
};
|
|
2616
2586
|
}
|
|
2617
|
-
}), [["__scopeId", "data-v-b5e7a0d1"]]),
|
|
2587
|
+
}), [["__scopeId", "data-v-b5e7a0d1"]]), Lt = /* @__PURE__ */ A({
|
|
2618
2588
|
__name: "DateFormatConfig",
|
|
2619
2589
|
props: { config: {} },
|
|
2620
2590
|
setup(e) {
|
|
2621
2591
|
return (e, t) => {
|
|
2622
|
-
let n =
|
|
2623
|
-
return
|
|
2624
|
-
e.config.type === "datepicker" ? (
|
|
2592
|
+
let n = R("a-select"), r = R("a-form-item"), i = R("a-col"), a = R("a-switch"), o = R("a-input");
|
|
2593
|
+
return F(), T(x, null, [
|
|
2594
|
+
e.config.type === "datepicker" ? (F(), C(i, {
|
|
2625
2595
|
key: 0,
|
|
2626
2596
|
span: 12
|
|
2627
2597
|
}, {
|
|
2628
|
-
default:
|
|
2629
|
-
default:
|
|
2598
|
+
default: W(() => [k(r, { label: "选择粒度" }, {
|
|
2599
|
+
default: W(() => [k(n, {
|
|
2630
2600
|
value: e.config.picker,
|
|
2631
2601
|
"onUpdate:value": t[0] ||= (t) => e.config.picker = t,
|
|
2632
2602
|
"allow-clear": "",
|
|
@@ -2658,12 +2628,12 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2658
2628
|
})]),
|
|
2659
2629
|
_: 1
|
|
2660
2630
|
})) : w("", !0),
|
|
2661
|
-
e.config.type === "datepicker" ? (
|
|
2631
|
+
e.config.type === "datepicker" ? (F(), C(i, {
|
|
2662
2632
|
key: 1,
|
|
2663
2633
|
span: 12
|
|
2664
2634
|
}, {
|
|
2665
|
-
default:
|
|
2666
|
-
default:
|
|
2635
|
+
default: W(() => [k(r, { label: "显示时间" }, {
|
|
2636
|
+
default: W(() => [k(a, {
|
|
2667
2637
|
checked: e.config.showTime,
|
|
2668
2638
|
"onUpdate:checked": t[1] ||= (t) => e.config.showTime = t,
|
|
2669
2639
|
"checked-children": "有",
|
|
@@ -2674,8 +2644,8 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2674
2644
|
_: 1
|
|
2675
2645
|
})) : w("", !0),
|
|
2676
2646
|
k(i, { span: 12 }, {
|
|
2677
|
-
default:
|
|
2678
|
-
default:
|
|
2647
|
+
default: W(() => [k(r, { label: "时间格式" }, {
|
|
2648
|
+
default: W(() => [k(o, {
|
|
2679
2649
|
value: e.config.format,
|
|
2680
2650
|
"onUpdate:value": t[2] ||= (t) => e.config.format = t,
|
|
2681
2651
|
"allow-clear": ""
|
|
@@ -2685,8 +2655,8 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2685
2655
|
_: 1
|
|
2686
2656
|
}),
|
|
2687
2657
|
k(i, { span: 12 }, {
|
|
2688
|
-
default:
|
|
2689
|
-
default:
|
|
2658
|
+
default: W(() => [k(r, { label: "传值格式" }, {
|
|
2659
|
+
default: W(() => [k(o, {
|
|
2690
2660
|
value: e.config.valueFormat,
|
|
2691
2661
|
"onUpdate:value": t[3] ||= (t) => e.config.valueFormat = t,
|
|
2692
2662
|
"allow-clear": ""
|
|
@@ -2698,34 +2668,34 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2698
2668
|
], 64);
|
|
2699
2669
|
};
|
|
2700
2670
|
}
|
|
2701
|
-
}),
|
|
2671
|
+
}), Rt = /* @__PURE__ */ A({
|
|
2702
2672
|
__name: "DateSelectSetting",
|
|
2703
2673
|
props: { config: {} },
|
|
2704
2674
|
setup(e) {
|
|
2705
2675
|
return (e, t) => {
|
|
2706
|
-
let n =
|
|
2707
|
-
return
|
|
2708
|
-
default:
|
|
2676
|
+
let n = R("a-row");
|
|
2677
|
+
return F(), C(n, { gutter: 16 }, {
|
|
2678
|
+
default: W(() => [k(Lt, { config: e.config }, null, 8, ["config"])]),
|
|
2709
2679
|
_: 1
|
|
2710
2680
|
});
|
|
2711
2681
|
};
|
|
2712
2682
|
}
|
|
2713
|
-
}),
|
|
2683
|
+
}), zt = /*#__PURE__*/ i(/* @__PURE__ */ A({
|
|
2714
2684
|
__name: "FlatSelectSetting",
|
|
2715
2685
|
props: { config: {} },
|
|
2716
2686
|
setup(e) {
|
|
2717
2687
|
return (e, t) => {
|
|
2718
|
-
let n =
|
|
2719
|
-
return
|
|
2720
|
-
default:
|
|
2721
|
-
|
|
2688
|
+
let n = R("a-col"), r = R("a-row");
|
|
2689
|
+
return F(), C(r, { gutter: 16 }, {
|
|
2690
|
+
default: W(() => [
|
|
2691
|
+
B(tt).includes(e.config.type) ? (F(), C($, {
|
|
2722
2692
|
key: 0,
|
|
2723
2693
|
config: e.config,
|
|
2724
2694
|
field: "mode"
|
|
2725
2695
|
}, null, 8, ["config"])) : w("", !0),
|
|
2726
|
-
k(
|
|
2696
|
+
k(Mt, { config: e.config }, null, 8, ["config"]),
|
|
2727
2697
|
k(n, { span: 24 }, {
|
|
2728
|
-
default:
|
|
2698
|
+
default: W(() => t[0] ||= [E("div", { class: "flat-hint" }, [
|
|
2729
2699
|
O(" 本地静态选项(数值 / 显示文本)在「数据源」页的「选项列表」中维护;选项对象为 "),
|
|
2730
2700
|
E("code", null, "{ value, label }"),
|
|
2731
2701
|
O("。 ")
|
|
@@ -2737,16 +2707,16 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2737
2707
|
});
|
|
2738
2708
|
};
|
|
2739
2709
|
}
|
|
2740
|
-
}), [["__scopeId", "data-v-4bce532e"]]),
|
|
2710
|
+
}), [["__scopeId", "data-v-4bce532e"]]), Bt = /* @__PURE__ */ A({
|
|
2741
2711
|
__name: "NumberRangeConfig",
|
|
2742
2712
|
props: { config: {} },
|
|
2743
2713
|
setup(e) {
|
|
2744
2714
|
return (e, t) => {
|
|
2745
|
-
let n =
|
|
2746
|
-
return
|
|
2715
|
+
let n = R("a-input"), r = R("a-form-item"), i = R("a-col");
|
|
2716
|
+
return F(), T(x, null, [
|
|
2747
2717
|
k(i, { span: 12 }, {
|
|
2748
|
-
default:
|
|
2749
|
-
default:
|
|
2718
|
+
default: W(() => [k(r, { label: "最小值" }, {
|
|
2719
|
+
default: W(() => [k(n, {
|
|
2750
2720
|
value: e.config.min,
|
|
2751
2721
|
"onUpdate:value": t[0] ||= (t) => e.config.min = t,
|
|
2752
2722
|
placeholder: "不限制",
|
|
@@ -2757,8 +2727,8 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2757
2727
|
_: 1
|
|
2758
2728
|
}),
|
|
2759
2729
|
k(i, { span: 12 }, {
|
|
2760
|
-
default:
|
|
2761
|
-
default:
|
|
2730
|
+
default: W(() => [k(r, { label: "最大值" }, {
|
|
2731
|
+
default: W(() => [k(n, {
|
|
2762
2732
|
value: e.config.max,
|
|
2763
2733
|
"onUpdate:value": t[1] ||= (t) => e.config.max = t,
|
|
2764
2734
|
placeholder: "不限制",
|
|
@@ -2769,8 +2739,8 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2769
2739
|
_: 1
|
|
2770
2740
|
}),
|
|
2771
2741
|
k(i, { span: 12 }, {
|
|
2772
|
-
default:
|
|
2773
|
-
default:
|
|
2742
|
+
default: W(() => [k(r, { label: "数值精度" }, {
|
|
2743
|
+
default: W(() => [k(n, {
|
|
2774
2744
|
value: e.config.precision,
|
|
2775
2745
|
"onUpdate:value": t[2] ||= (t) => e.config.precision = t,
|
|
2776
2746
|
type: "number"
|
|
@@ -2780,8 +2750,8 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2780
2750
|
_: 1
|
|
2781
2751
|
}),
|
|
2782
2752
|
k(i, { span: 12 }, {
|
|
2783
|
-
default:
|
|
2784
|
-
default:
|
|
2753
|
+
default: W(() => [k(r, { label: "步进数值" }, {
|
|
2754
|
+
default: W(() => [k(n, {
|
|
2785
2755
|
value: e.config.step,
|
|
2786
2756
|
"onUpdate:value": t[3] ||= (t) => e.config.step = t,
|
|
2787
2757
|
type: "number"
|
|
@@ -2793,16 +2763,16 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2793
2763
|
], 64);
|
|
2794
2764
|
};
|
|
2795
2765
|
}
|
|
2796
|
-
}),
|
|
2766
|
+
}), Vt = /* @__PURE__ */ A({
|
|
2797
2767
|
__name: "TextAddonConfig",
|
|
2798
2768
|
props: { config: {} },
|
|
2799
2769
|
setup(e) {
|
|
2800
2770
|
return (e, t) => {
|
|
2801
|
-
let n =
|
|
2802
|
-
return
|
|
2771
|
+
let n = R("a-input-number"), r = R("a-form-item"), i = R("a-col"), a = R("a-input");
|
|
2772
|
+
return F(), T(x, null, [
|
|
2803
2773
|
k(i, { span: 12 }, {
|
|
2804
|
-
default:
|
|
2805
|
-
default:
|
|
2774
|
+
default: W(() => [k(r, { label: "最大字符" }, {
|
|
2775
|
+
default: W(() => [k(n, {
|
|
2806
2776
|
value: e.config.maxlength,
|
|
2807
2777
|
"onUpdate:value": t[0] ||= (t) => e.config.maxlength = t,
|
|
2808
2778
|
style: { width: "100%" },
|
|
@@ -2813,8 +2783,8 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2813
2783
|
_: 1
|
|
2814
2784
|
}),
|
|
2815
2785
|
k(i, { span: 12 }, {
|
|
2816
|
-
default:
|
|
2817
|
-
default:
|
|
2786
|
+
default: W(() => [k(r, { label: "前缀标签" }, {
|
|
2787
|
+
default: W(() => [k(a, {
|
|
2818
2788
|
value: e.config.addonBefore,
|
|
2819
2789
|
"onUpdate:value": t[1] ||= (t) => e.config.addonBefore = t,
|
|
2820
2790
|
"allow-clear": ""
|
|
@@ -2824,8 +2794,8 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2824
2794
|
_: 1
|
|
2825
2795
|
}),
|
|
2826
2796
|
k(i, { span: 12 }, {
|
|
2827
|
-
default:
|
|
2828
|
-
default:
|
|
2797
|
+
default: W(() => [k(r, { label: "后缀标签" }, {
|
|
2798
|
+
default: W(() => [k(a, {
|
|
2829
2799
|
value: e.config.addonAfter,
|
|
2830
2800
|
"onUpdate:value": t[2] ||= (t) => e.config.addonAfter = t,
|
|
2831
2801
|
"allow-clear": ""
|
|
@@ -2837,41 +2807,41 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2837
2807
|
], 64);
|
|
2838
2808
|
};
|
|
2839
2809
|
}
|
|
2840
|
-
}),
|
|
2810
|
+
}), Ht = /* @__PURE__ */ A({
|
|
2841
2811
|
__name: "NumberInputSetting",
|
|
2842
2812
|
props: { config: {} },
|
|
2843
2813
|
setup(e) {
|
|
2844
2814
|
return (e, t) => {
|
|
2845
|
-
let n =
|
|
2846
|
-
return
|
|
2847
|
-
default:
|
|
2815
|
+
let n = R("a-row");
|
|
2816
|
+
return F(), C(n, { gutter: 16 }, {
|
|
2817
|
+
default: W(() => [B(it).includes(e.config.type) ? (F(), C(Vt, {
|
|
2848
2818
|
key: 0,
|
|
2849
2819
|
config: e.config
|
|
2850
|
-
}, null, 8, ["config"])) : w("", !0), k(
|
|
2820
|
+
}, null, 8, ["config"])) : w("", !0), k(Bt, { config: e.config }, null, 8, ["config"])]),
|
|
2851
2821
|
_: 1
|
|
2852
2822
|
});
|
|
2853
2823
|
};
|
|
2854
2824
|
}
|
|
2855
|
-
}),
|
|
2825
|
+
}), Ut = /*#__PURE__*/ i(/* @__PURE__ */ A({
|
|
2856
2826
|
__name: "RemoteSelectSetting",
|
|
2857
2827
|
props: { config: {} },
|
|
2858
2828
|
setup(e) {
|
|
2859
2829
|
return (e, t) => {
|
|
2860
|
-
let n =
|
|
2861
|
-
return
|
|
2862
|
-
default:
|
|
2863
|
-
|
|
2830
|
+
let n = R("a-col"), r = R("a-row");
|
|
2831
|
+
return F(), C(r, { gutter: 16 }, {
|
|
2832
|
+
default: W(() => [
|
|
2833
|
+
B(tt).includes(e.config.type) ? (F(), C($, {
|
|
2864
2834
|
key: 0,
|
|
2865
2835
|
config: e.config,
|
|
2866
2836
|
field: "mode"
|
|
2867
|
-
}, null, 8, ["config"])) :
|
|
2837
|
+
}, null, 8, ["config"])) : B(nt).includes(e.config.type) ? (F(), C($, {
|
|
2868
2838
|
key: 1,
|
|
2869
2839
|
config: e.config,
|
|
2870
2840
|
field: "multiple"
|
|
2871
2841
|
}, null, 8, ["config"])) : w("", !0),
|
|
2872
|
-
k(
|
|
2842
|
+
k(Mt, { config: e.config }, null, 8, ["config"]),
|
|
2873
2843
|
k(n, { span: 24 }, {
|
|
2874
|
-
default:
|
|
2844
|
+
default: W(() => t[0] ||= [E("div", { class: "remote-hint" }, " 远程类组件的数据源接口、显示字段、查询参数(监听/固定/上下文)、全局切换等在「数据源」页配置。 ", -1)]),
|
|
2875
2845
|
_: 1
|
|
2876
2846
|
})
|
|
2877
2847
|
]),
|
|
@@ -2879,31 +2849,31 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2879
2849
|
});
|
|
2880
2850
|
};
|
|
2881
2851
|
}
|
|
2882
|
-
}), [["__scopeId", "data-v-a13b4b2a"]]),
|
|
2852
|
+
}), [["__scopeId", "data-v-a13b4b2a"]]), Wt = /* @__PURE__ */ A({
|
|
2883
2853
|
__name: "TextInputSetting",
|
|
2884
2854
|
props: { config: {} },
|
|
2885
2855
|
setup(e) {
|
|
2886
2856
|
return (e, t) => {
|
|
2887
|
-
let n =
|
|
2888
|
-
return
|
|
2889
|
-
default:
|
|
2857
|
+
let n = R("a-row");
|
|
2858
|
+
return F(), C(n, { gutter: 16 }, {
|
|
2859
|
+
default: W(() => [k(Vt, { config: e.config }, null, 8, ["config"])]),
|
|
2890
2860
|
_: 1
|
|
2891
2861
|
});
|
|
2892
2862
|
};
|
|
2893
2863
|
}
|
|
2894
|
-
}),
|
|
2864
|
+
}), Gt = {
|
|
2895
2865
|
key: 0,
|
|
2896
2866
|
class: "json-error"
|
|
2897
|
-
},
|
|
2867
|
+
}, Kt = /*#__PURE__*/ i(/* @__PURE__ */ A({
|
|
2898
2868
|
__name: "TreeDataConfig",
|
|
2899
2869
|
props: { config: {} },
|
|
2900
2870
|
setup(e) {
|
|
2901
|
-
let t = e, n =
|
|
2902
|
-
return
|
|
2871
|
+
let t = e, n = I(""), r = I("");
|
|
2872
|
+
return U(() => t.config, () => {
|
|
2903
2873
|
r.value = "";
|
|
2904
2874
|
let e = t.config?.options;
|
|
2905
2875
|
n.value = Array.isArray(e) ? JSON.stringify(e, null, 2) : "";
|
|
2906
|
-
}, { immediate: !0 }),
|
|
2876
|
+
}, { immediate: !0 }), U(n, (e) => {
|
|
2907
2877
|
if (!e || !e.trim()) {
|
|
2908
2878
|
r.value = "", t.config.options = [];
|
|
2909
2879
|
return;
|
|
@@ -2916,47 +2886,47 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2916
2886
|
r.value = "JSON 无效:" + (e?.message || "解析失败");
|
|
2917
2887
|
}
|
|
2918
2888
|
}), (e, t) => {
|
|
2919
|
-
let i =
|
|
2920
|
-
return
|
|
2921
|
-
default:
|
|
2922
|
-
default:
|
|
2889
|
+
let i = R("a-textarea"), a = R("a-form-item"), o = R("a-col");
|
|
2890
|
+
return F(), C(o, { span: 24 }, {
|
|
2891
|
+
default: W(() => [k(a, { label: "树形数据" }, {
|
|
2892
|
+
default: W(() => [k(i, {
|
|
2923
2893
|
value: n.value,
|
|
2924
2894
|
"onUpdate:value": t[0] ||= (e) => n.value = e,
|
|
2925
2895
|
rows: 6,
|
|
2926
2896
|
placeholder: "[{\"value\":\"1\",\"label\":\"父级1\",\"children\":[{\"value\":\"1-1\",\"label\":\"子级1-1\"}]}]"
|
|
2927
|
-
}, null, 8, ["value"]), r.value ? (
|
|
2897
|
+
}, null, 8, ["value"]), r.value ? (F(), T("div", Gt, z(r.value), 1)) : w("", !0)]),
|
|
2928
2898
|
_: 1
|
|
2929
2899
|
})]),
|
|
2930
2900
|
_: 1
|
|
2931
2901
|
});
|
|
2932
2902
|
};
|
|
2933
2903
|
}
|
|
2934
|
-
}), [["__scopeId", "data-v-58025b9d"]]),
|
|
2904
|
+
}), [["__scopeId", "data-v-58025b9d"]]), qt = /* @__PURE__ */ A({
|
|
2935
2905
|
__name: "TreeSelectSetting",
|
|
2936
2906
|
props: { config: {} },
|
|
2937
2907
|
setup(e) {
|
|
2938
2908
|
return (e, t) => {
|
|
2939
|
-
let n =
|
|
2940
|
-
return
|
|
2941
|
-
default:
|
|
2909
|
+
let n = R("a-row");
|
|
2910
|
+
return F(), C(n, { gutter: 16 }, {
|
|
2911
|
+
default: W(() => [
|
|
2942
2912
|
k($, {
|
|
2943
2913
|
config: e.config,
|
|
2944
2914
|
field: "multiple"
|
|
2945
2915
|
}, null, 8, ["config"]),
|
|
2946
|
-
k(
|
|
2947
|
-
k(
|
|
2916
|
+
k(Mt, { config: e.config }, null, 8, ["config"]),
|
|
2917
|
+
k(Kt, { config: e.config }, null, 8, ["config"])
|
|
2948
2918
|
]),
|
|
2949
2919
|
_: 1
|
|
2950
2920
|
});
|
|
2951
2921
|
};
|
|
2952
2922
|
}
|
|
2953
|
-
}),
|
|
2923
|
+
}), Jt = { class: "csc-json-pane" }, Yt = { class: "json-toolbar" }, Xt = {
|
|
2954
2924
|
key: 1,
|
|
2955
2925
|
class: "json-tip"
|
|
2956
|
-
},
|
|
2926
|
+
}, Zt = { class: "json-editor-wrap" }, Qt = {
|
|
2957
2927
|
key: 0,
|
|
2958
2928
|
class: "adv-footer"
|
|
2959
|
-
},
|
|
2929
|
+
}, $t = { class: "csc-drawer-footer" }, en = 920, tn = /*#__PURE__*/ i(/* @__PURE__ */ A({
|
|
2960
2930
|
__name: "ColumnSearchComponentModal",
|
|
2961
2931
|
props: /*@__PURE__*/ j({
|
|
2962
2932
|
open: { type: Boolean },
|
|
@@ -2970,13 +2940,13 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2970
2940
|
}),
|
|
2971
2941
|
emits: ["update:open"],
|
|
2972
2942
|
setup(e) {
|
|
2973
|
-
let t = e, n =
|
|
2974
|
-
|
|
2943
|
+
let t = e, n = V(e, "open"), r = S(() => ct.includes(o.value?.type)), i = S(() => r.value || $e.includes(o.value?.type)), a = I("props"), o = I({}), s = I(""), c = I(""), l = I(!1), u = I(""), d = I();
|
|
2944
|
+
U(() => t.open, (e) => {
|
|
2975
2945
|
if (!e) return;
|
|
2976
2946
|
a.value = "props";
|
|
2977
2947
|
let n = t.record?.advanced_search_component;
|
|
2978
2948
|
n && typeof n == "object" && n.type ? (o.value = m({
|
|
2979
|
-
...(0, Z.cloneDeep)(
|
|
2949
|
+
...(0, Z.cloneDeep)(dt[n.type] || {}),
|
|
2980
2950
|
...(0, Z.cloneDeep)(n)
|
|
2981
2951
|
}), o.value.type = n.type) : o.value = {}, s.value = o.value.init_model ? JSON.stringify(o.value.init_model, null, 2) : "", c.value = "", l.value = !1, u.value = "";
|
|
2982
2952
|
});
|
|
@@ -2988,11 +2958,11 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
2988
2958
|
else delete e.init_model;
|
|
2989
2959
|
return e;
|
|
2990
2960
|
};
|
|
2991
|
-
|
|
2992
|
-
t === "json" && u.value &&
|
|
2993
|
-
}),
|
|
2961
|
+
U(a, (e, t) => {
|
|
2962
|
+
t === "json" && u.value && K.warning("JSON 配置存在语法错误,未同步到表单"), e === "json" && !l.value && (c.value = JSON.stringify(f(), null, 2), u.value = ""), e === "json" && M(() => d.value?.handleCodeMirrorRefresh?.());
|
|
2963
|
+
}), U(o, () => {
|
|
2994
2964
|
o.value?.type && (l.value = !1, c.value = JSON.stringify(f(), null, 2));
|
|
2995
|
-
}, { deep: !0 }),
|
|
2965
|
+
}, { deep: !0 }), U(c, (e) => {
|
|
2996
2966
|
if (!e.trim()) {
|
|
2997
2967
|
u.value = "";
|
|
2998
2968
|
return;
|
|
@@ -3004,7 +2974,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3004
2974
|
return;
|
|
3005
2975
|
}
|
|
3006
2976
|
o.value = m({
|
|
3007
|
-
...(0, Z.cloneDeep)(
|
|
2977
|
+
...(0, Z.cloneDeep)(dt[t.type] || {}),
|
|
3008
2978
|
...t
|
|
3009
2979
|
}), s.value = o.value.init_model ? JSON.stringify(o.value.init_model, null, 2) : "", u.value = "", l.value = !1;
|
|
3010
2980
|
} catch (e) {
|
|
@@ -3015,14 +2985,14 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3015
2985
|
try {
|
|
3016
2986
|
c.value = JSON.stringify(JSON.parse(c.value), null, 2);
|
|
3017
2987
|
} catch {}
|
|
3018
|
-
}, m = (e) => (e?.type && (
|
|
2988
|
+
}, m = (e) => (e?.type && (st.includes(e.type) ? Array.isArray(e.placeholder) || (e.placeholder = typeof e.placeholder == "string" && e.placeholder ? [e.placeholder, e.placeholder] : (0, Z.cloneDeep)(dt[e.type]?.placeholder) || ["开始", "结束"]) : Array.isArray(e.placeholder) ? e.placeholder = e.placeholder.filter(Boolean)[0] || "" : typeof e.placeholder != "string" && (e.placeholder = dt[e.type]?.placeholder ?? "")), e), h = (e) => {
|
|
3019
2989
|
if (!e) {
|
|
3020
2990
|
o.value = {};
|
|
3021
2991
|
return;
|
|
3022
2992
|
}
|
|
3023
2993
|
let t = o.value || {}, n = {};
|
|
3024
|
-
t.label && (n.label = t.label), t.disabled != null && (n.disabled = t.disabled),
|
|
3025
|
-
...(0, Z.cloneDeep)(
|
|
2994
|
+
t.label && (n.label = t.label), t.disabled != null && (n.disabled = t.disabled), st.includes(t.type) ? Array.isArray(t.placeholder) && (n.placeholder = t.placeholder) : typeof t.placeholder == "string" && (n.placeholder = t.placeholder), t.allowClear != null && (n.allowClear = t.allowClear), o.value = m({
|
|
2995
|
+
...(0, Z.cloneDeep)(dt[e] || { type: e }),
|
|
3026
2996
|
...n
|
|
3027
2997
|
}), l.value = !1;
|
|
3028
2998
|
}, g = () => {
|
|
@@ -3033,22 +3003,22 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3033
3003
|
return;
|
|
3034
3004
|
}
|
|
3035
3005
|
if (u.value) {
|
|
3036
|
-
|
|
3006
|
+
K.warning("JSON 配置存在语法错误,请修正后再保存");
|
|
3037
3007
|
return;
|
|
3038
3008
|
}
|
|
3039
3009
|
let e = (0, Z.cloneDeep)(o.value);
|
|
3040
3010
|
if (s.value.trim()) try {
|
|
3041
3011
|
e.init_model = JSON.parse(s.value.trim());
|
|
3042
3012
|
} catch {
|
|
3043
|
-
|
|
3013
|
+
K.warning("初始参数不是合法 JSON,请修正后再保存");
|
|
3044
3014
|
return;
|
|
3045
3015
|
}
|
|
3046
3016
|
else delete e.init_model;
|
|
3047
|
-
if (
|
|
3017
|
+
if ($e.includes(e.type)) {
|
|
3048
3018
|
delete e.valueKey, delete e.labelKey;
|
|
3049
|
-
let t = (Array.isArray(e.options) ? e.options : []).filter((e) =>
|
|
3019
|
+
let t = (Array.isArray(e.options) ? e.options : []).filter((e) => ut(e) || Array.isArray(e?.options) && e.options.length > 0);
|
|
3050
3020
|
if (t.length === 0) {
|
|
3051
|
-
|
|
3021
|
+
K.warning("下拉选框/单选框/多选框至少需要一个选项,请在「数据源」页的「选项列表」中添加");
|
|
3052
3022
|
return;
|
|
3053
3023
|
}
|
|
3054
3024
|
e.options = t;
|
|
@@ -3067,31 +3037,31 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3067
3037
|
n.value = !1;
|
|
3068
3038
|
};
|
|
3069
3039
|
return (e, t) => {
|
|
3070
|
-
let r =
|
|
3071
|
-
return
|
|
3040
|
+
let r = R("a-divider"), l = R("a-tab-pane"), f = R("a-alert"), m = R("a-button"), b = R("a-tabs"), S = R("a-form"), D = R("a-drawer");
|
|
3041
|
+
return F(), C(D, {
|
|
3072
3042
|
title: `高级搜索组件 —— ${e.record?.title || e.record?.data_index || ""}`,
|
|
3073
3043
|
placement: "right",
|
|
3074
|
-
width:
|
|
3044
|
+
width: en,
|
|
3075
3045
|
"root-class-name": "csc-drawer",
|
|
3076
3046
|
open: n.value,
|
|
3077
3047
|
"destroy-on-close": "",
|
|
3078
3048
|
onClose: y
|
|
3079
3049
|
}, {
|
|
3080
|
-
footer:
|
|
3081
|
-
default:
|
|
3050
|
+
footer: W(() => [E("div", $t, [k(m, { onClick: y }, {
|
|
3051
|
+
default: W(() => t[7] ||= [O(" 取消 ")]),
|
|
3082
3052
|
_: 1
|
|
3083
3053
|
}), k(m, {
|
|
3084
3054
|
type: "primary",
|
|
3085
3055
|
onClick: v
|
|
3086
3056
|
}, {
|
|
3087
|
-
default:
|
|
3057
|
+
default: W(() => t[8] ||= [O(" 确定 ")]),
|
|
3088
3058
|
_: 1
|
|
3089
3059
|
})])]),
|
|
3090
|
-
default:
|
|
3060
|
+
default: W(() => [k(S, {
|
|
3091
3061
|
class: "csc-body",
|
|
3092
3062
|
"label-col": { style: { width: "190px" } }
|
|
3093
3063
|
}, {
|
|
3094
|
-
default:
|
|
3064
|
+
default: W(() => [
|
|
3095
3065
|
t[6] ||= E("div", { class: "adv-tip" }, " 「属性配置」= 基础 + 高级属性(按组件类型联动);远程类组件在「数据源」页配置接口、显示字段、查询条件, 本地静态选项类(下拉选框/单选框/多选框/分组下拉)在「数据源」页配置「选项列表」; 「JSON配置」可直接编辑整体配置对象(与表单双向同步,保存前校验合法性)。 运算符不在此配置——后端按组件类型自动补默认集。 ", -1),
|
|
3096
3066
|
k(b, {
|
|
3097
3067
|
activeKey: a.value,
|
|
@@ -3100,38 +3070,38 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3100
3070
|
type: "card",
|
|
3101
3071
|
size: "small"
|
|
3102
3072
|
}, {
|
|
3103
|
-
default:
|
|
3073
|
+
default: W(() => [
|
|
3104
3074
|
k(l, {
|
|
3105
3075
|
key: "props",
|
|
3106
3076
|
tab: "属性配置"
|
|
3107
3077
|
}, {
|
|
3108
|
-
default:
|
|
3078
|
+
default: W(() => [k(ft, {
|
|
3109
3079
|
config: o.value,
|
|
3110
3080
|
record: e.record,
|
|
3111
3081
|
onTypeChange: h
|
|
3112
|
-
}, null, 8, ["config", "record"]), o.value.type ? (
|
|
3082
|
+
}, null, 8, ["config", "record"]), o.value.type ? (F(), T(x, { key: 0 }, [k(r, {
|
|
3113
3083
|
class: "props-divider",
|
|
3114
3084
|
orientation: "left",
|
|
3115
3085
|
plain: ""
|
|
3116
3086
|
}, {
|
|
3117
|
-
default:
|
|
3087
|
+
default: W(() => t[3] ||= [O(" 高级属性 ")]),
|
|
3118
3088
|
_: 1
|
|
3119
|
-
}), o.value.type === "input" ? (
|
|
3089
|
+
}), o.value.type === "input" ? (F(), C(Wt, {
|
|
3120
3090
|
key: 0,
|
|
3121
3091
|
config: o.value
|
|
3122
|
-
}, null, 8, ["config"])) :
|
|
3092
|
+
}, null, 8, ["config"])) : B(at).includes(o.value.type) ? (F(), C(Ht, {
|
|
3123
3093
|
key: 1,
|
|
3124
3094
|
config: o.value
|
|
3125
|
-
}, null, 8, ["config"])) :
|
|
3095
|
+
}, null, 8, ["config"])) : B(et).includes(o.value.type) ? (F(), C(zt, {
|
|
3126
3096
|
key: 2,
|
|
3127
3097
|
config: o.value
|
|
3128
|
-
}, null, 8, ["config"])) : ["treeselect", "cascader"].includes(o.value.type) ? (
|
|
3098
|
+
}, null, 8, ["config"])) : ["treeselect", "cascader"].includes(o.value.type) ? (F(), C(qt, {
|
|
3129
3099
|
key: 3,
|
|
3130
3100
|
config: o.value
|
|
3131
|
-
}, null, 8, ["config"])) :
|
|
3101
|
+
}, null, 8, ["config"])) : B(ot).includes(o.value.type) ? (F(), C(Rt, {
|
|
3132
3102
|
key: 4,
|
|
3133
3103
|
config: o.value
|
|
3134
|
-
}, null, 8, ["config"])) :
|
|
3104
|
+
}, null, 8, ["config"])) : B(ct).includes(o.value.type) ? (F(), C(Ut, {
|
|
3135
3105
|
key: 5,
|
|
3136
3106
|
config: o.value
|
|
3137
3107
|
}, null, 8, ["config"])) : w("", !0)], 64)) : w("", !0)]),
|
|
@@ -3142,7 +3112,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3142
3112
|
tab: "数据源",
|
|
3143
3113
|
disabled: !i.value
|
|
3144
3114
|
}, {
|
|
3145
|
-
default:
|
|
3115
|
+
default: W(() => [i.value ? (F(), C(It, {
|
|
3146
3116
|
key: 0,
|
|
3147
3117
|
"init-model-text": s.value,
|
|
3148
3118
|
"onUpdate:initModelText": t[0] ||= (e) => s.value = e,
|
|
@@ -3160,20 +3130,20 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3160
3130
|
tab: "JSON配置",
|
|
3161
3131
|
disabled: !o.value.type
|
|
3162
3132
|
}, {
|
|
3163
|
-
default:
|
|
3133
|
+
default: W(() => [E("div", Jt, [E("div", Yt, [u.value ? (F(), C(f, {
|
|
3164
3134
|
key: 0,
|
|
3165
3135
|
type: "error",
|
|
3166
3136
|
"show-icon": "",
|
|
3167
3137
|
message: u.value,
|
|
3168
3138
|
banner: ""
|
|
3169
|
-
}, null, 8, ["message"])) : (
|
|
3139
|
+
}, null, 8, ["message"])) : (F(), T("span", Xt, "整体配置对象,与「属性配置」表单实时双向同步;保存时以此为最终值。")), k(m, {
|
|
3170
3140
|
size: "small",
|
|
3171
3141
|
disabled: !!u.value,
|
|
3172
3142
|
onClick: p
|
|
3173
3143
|
}, {
|
|
3174
|
-
default:
|
|
3144
|
+
default: W(() => t[4] ||= [O(" 格式化 ")]),
|
|
3175
3145
|
_: 1
|
|
3176
|
-
}, 8, ["disabled"])]), E("div",
|
|
3146
|
+
}, 8, ["disabled"])]), E("div", Zt, [k(_, {
|
|
3177
3147
|
ref_key: "jsonEditorRef",
|
|
3178
3148
|
ref: d,
|
|
3179
3149
|
editorValue: c.value,
|
|
@@ -3190,12 +3160,12 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3190
3160
|
]),
|
|
3191
3161
|
_: 1
|
|
3192
3162
|
}, 8, ["activeKey"]),
|
|
3193
|
-
o.value.type ? (
|
|
3163
|
+
o.value.type ? (F(), T("div", Qt, [k(m, {
|
|
3194
3164
|
size: "small",
|
|
3195
3165
|
danger: "",
|
|
3196
3166
|
onClick: g
|
|
3197
3167
|
}, {
|
|
3198
|
-
default:
|
|
3168
|
+
default: W(() => t[5] ||= [O(" 清除配置(恢复按类型自动推导) ")]),
|
|
3199
3169
|
_: 1
|
|
3200
3170
|
})])) : w("", !0)
|
|
3201
3171
|
]),
|
|
@@ -3205,13 +3175,13 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3205
3175
|
}, 8, ["title", "open"]);
|
|
3206
3176
|
};
|
|
3207
3177
|
}
|
|
3208
|
-
}), [["__scopeId", "data-v-4e0bcd30"]]),
|
|
3178
|
+
}), [["__scopeId", "data-v-4e0bcd30"]]), nn = { class: "col-toolbar" }, rn = { key: 1 }, an = {
|
|
3209
3179
|
key: 11,
|
|
3210
3180
|
class: "col-width-cell"
|
|
3211
|
-
},
|
|
3181
|
+
}, on = { key: 1 }, sn = {
|
|
3212
3182
|
key: 16,
|
|
3213
3183
|
class: "default-sort-cell"
|
|
3214
|
-
},
|
|
3184
|
+
}, cn = /*#__PURE__*/ i(/* @__PURE__ */ A({
|
|
3215
3185
|
__name: "StepColumnConfig",
|
|
3216
3186
|
props: {
|
|
3217
3187
|
active: { type: Boolean },
|
|
@@ -3224,26 +3194,26 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3224
3194
|
let s = n, c = a, l = S(() => s.model), u = r().currentOrg, d = (e, t) => e.filter((e) => e?.[t]).map((e) => ({
|
|
3225
3195
|
value: e[t],
|
|
3226
3196
|
label: `${e.name || e[t]}(${e[t]})`
|
|
3227
|
-
})), f = S(() => d(t(), "cellComponent")), p = S(() => d(e(), "cellSummaryComponent")), m =
|
|
3197
|
+
})), f = S(() => d(t(), "cellComponent")), p = S(() => d(e(), "cellSummaryComponent")), m = I([]), h = I(!1), g = I([]), _ = I(null), v = I(320), D = () => {
|
|
3228
3198
|
let e = _.value?.clientHeight || 0;
|
|
3229
3199
|
e > 0 && (v.value = e);
|
|
3230
3200
|
};
|
|
3231
|
-
|
|
3201
|
+
J(_, (e) => {
|
|
3232
3202
|
let t = e[0]?.contentRect?.height || 0;
|
|
3233
3203
|
t > 0 && (v.value = t);
|
|
3234
3204
|
});
|
|
3235
|
-
let A =
|
|
3236
|
-
|
|
3237
|
-
e && (A.value = !0, M(D), m.value.length ||
|
|
3205
|
+
let A = I(!1);
|
|
3206
|
+
U(() => s.active, (e) => {
|
|
3207
|
+
e && (A.value = !0, M(D), m.value.length || L());
|
|
3238
3208
|
});
|
|
3239
|
-
let j =
|
|
3209
|
+
let j = I(!1), N = (e) => {
|
|
3240
3210
|
if (j.value || s.formType === "edit" || e.some((e) => !!e.is_primary_key)) return;
|
|
3241
3211
|
let t = e.find((e) => String(e.data_index || "").trim().toLowerCase() === "id");
|
|
3242
3212
|
t && (t.is_primary_key = !0, j.value = !0);
|
|
3243
3213
|
}, P = (e, t) => {
|
|
3244
3214
|
j.value = !0, e.is_primary_key = !!t?.target?.checked;
|
|
3245
3215
|
}, ee = (e, t, n) => {
|
|
3246
|
-
let r =
|
|
3216
|
+
let r = de[t] || "str", i = ["int", "float"].includes(r) && e !== "id";
|
|
3247
3217
|
return {
|
|
3248
3218
|
data_index: e,
|
|
3249
3219
|
title: e,
|
|
@@ -3264,7 +3234,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3264
3234
|
default_sort_order: null,
|
|
3265
3235
|
class_name: r,
|
|
3266
3236
|
sql_type: t || "",
|
|
3267
|
-
cell_component: i ?
|
|
3237
|
+
cell_component: i ? pe : fe[t] || "",
|
|
3268
3238
|
cell_component_params: i ? { pattern: y } : null,
|
|
3269
3239
|
cell_summary_component: "",
|
|
3270
3240
|
cell_summary_component_params: null,
|
|
@@ -3272,20 +3242,20 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3272
3242
|
is_default_query: !0,
|
|
3273
3243
|
is_group_query: !1
|
|
3274
3244
|
};
|
|
3275
|
-
},
|
|
3245
|
+
}, ne = I(!1), L = async () => {
|
|
3276
3246
|
if (!l.value.data_source_id || !l.value.sql) {
|
|
3277
|
-
|
|
3247
|
+
K.warning("请先在「基础配置」步骤选择数据源并填写 SQL");
|
|
3278
3248
|
return;
|
|
3279
3249
|
}
|
|
3280
|
-
|
|
3250
|
+
ne.value = !0, c("probeStart");
|
|
3281
3251
|
try {
|
|
3282
|
-
let e =
|
|
3252
|
+
let e = Y(await o({
|
|
3283
3253
|
org_id: u?.id,
|
|
3284
3254
|
data_source_id: l.value.data_source_id,
|
|
3285
3255
|
sql: l.value.sql
|
|
3286
3256
|
}, `${s.record.model_app}/probe_columns`))?.columns || [];
|
|
3287
3257
|
if (!e.length) {
|
|
3288
|
-
|
|
3258
|
+
K.warning("探测到 0 列,请检查 SQL 输出");
|
|
3289
3259
|
return;
|
|
3290
3260
|
}
|
|
3291
3261
|
let t = new Map(m.value.map((e) => [e.data_index, e])), n = [], r = /* @__PURE__ */ new Set();
|
|
@@ -3293,20 +3263,20 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3293
3263
|
if (r.has(e.name)) return;
|
|
3294
3264
|
r.add(e.name);
|
|
3295
3265
|
let a = t.get(e.name);
|
|
3296
|
-
a ? (a.class_name =
|
|
3266
|
+
a ? (a.class_name = de[e.type] || a.class_name || "str", a.sql_type = e.type || a.sql_type || "", ["int", "float"].includes(a.class_name) && !a.cell_component && String(a.data_index || "").trim().toLowerCase() !== "id" && (a.cell_component = pe, a.cell_component_params = a.cell_component_params || { pattern: "#,##0.00" }), n.push(a)) : n.push(ee(e.name, e.type || "", i + 1));
|
|
3297
3267
|
}), m.value.forEach((e) => {
|
|
3298
3268
|
r.has(e.data_index) || n.push(e);
|
|
3299
3269
|
}), N(n), m.value = n;
|
|
3300
3270
|
} finally {
|
|
3301
|
-
|
|
3271
|
+
ne.value = !1;
|
|
3302
3272
|
}
|
|
3303
|
-
},
|
|
3273
|
+
}, V = (e) => {
|
|
3304
3274
|
e.is_default_sort && (e.default_sort_type = e.default_sort_type || "asc", e.default_sort_order = e.default_sort_order || 1);
|
|
3305
|
-
},
|
|
3275
|
+
}, H = async () => {
|
|
3306
3276
|
if (!(s.formType !== "edit" || s.record?.id == null)) {
|
|
3307
3277
|
h.value = !0;
|
|
3308
3278
|
try {
|
|
3309
|
-
m.value =
|
|
3279
|
+
m.value = ie(await o({
|
|
3310
3280
|
org_id: u?.id,
|
|
3311
3281
|
filter_fields: ["view_id"],
|
|
3312
3282
|
view_id: s.record.id,
|
|
@@ -3323,14 +3293,14 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3323
3293
|
h.value = !1;
|
|
3324
3294
|
}
|
|
3325
3295
|
}
|
|
3326
|
-
},
|
|
3296
|
+
}, G = (e) => {
|
|
3327
3297
|
m.value = m.value.filter((t) => t.data_index !== e.data_index), g.value.push(e.data_index);
|
|
3328
|
-
},
|
|
3329
|
-
|
|
3330
|
-
},
|
|
3331
|
-
se.value = e,
|
|
3332
|
-
}, le =
|
|
3333
|
-
|
|
3298
|
+
}, re = I(!1), q = I(null), ae = (e) => {
|
|
3299
|
+
q.value = e, re.value = !0;
|
|
3300
|
+
}, oe = (e) => (/* @__PURE__ */ new Set([...Object.keys(e?.content_map || {}), ...Object.keys(e?.color_map || {})])).size, X = I(!1), se = I(null), ce = (e) => {
|
|
3301
|
+
se.value = e, X.value = !0;
|
|
3302
|
+
}, le = I(!1), ue = I(null), ge = I("cell_component_params"), _e = (e, t) => {
|
|
3303
|
+
ue.value = e, ge.value = t, le.value = !0;
|
|
3334
3304
|
}, ve = (e) => Object.keys(e || {}).length, ye = (e, t, n) => {
|
|
3335
3305
|
if (!n) {
|
|
3336
3306
|
e[t] = null;
|
|
@@ -3340,7 +3310,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3340
3310
|
...e[t] || {},
|
|
3341
3311
|
pattern: n
|
|
3342
3312
|
};
|
|
3343
|
-
}, be =
|
|
3313
|
+
}, be = I(!1);
|
|
3344
3314
|
return i({
|
|
3345
3315
|
buildColumnsPayload: () => m.value.map((e) => ({
|
|
3346
3316
|
data_index: e.data_index,
|
|
@@ -3376,19 +3346,19 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3376
3346
|
resetDeletedIndexes: () => {
|
|
3377
3347
|
g.value = [];
|
|
3378
3348
|
}
|
|
3379
|
-
}),
|
|
3380
|
-
s.formType === "edit" &&
|
|
3349
|
+
}), te(() => {
|
|
3350
|
+
s.formType === "edit" && H();
|
|
3381
3351
|
}), (e, t) => {
|
|
3382
|
-
let n =
|
|
3383
|
-
return
|
|
3384
|
-
E("div",
|
|
3352
|
+
let n = R("a-button"), r = R("a-input-number"), i = R("a-checkbox"), a = R("a-input"), o = R("a-select"), s = R("a-auto-complete"), c = R("a-radio-button"), u = R("a-radio-group"), d = R("a-switch"), g = R("a-popconfirm"), y = R("s-table");
|
|
3353
|
+
return F(), T(x, null, [
|
|
3354
|
+
E("div", nn, [
|
|
3385
3355
|
k(n, {
|
|
3386
3356
|
size: "small",
|
|
3387
3357
|
disabled: !l.value.data_source_id || !l.value.sql,
|
|
3388
|
-
loading:
|
|
3389
|
-
onClick:
|
|
3358
|
+
loading: ne.value,
|
|
3359
|
+
onClick: L
|
|
3390
3360
|
}, {
|
|
3391
|
-
default:
|
|
3361
|
+
default: W(() => t[5] ||= [O(" 列探测刷新 ")]),
|
|
3392
3362
|
_: 1
|
|
3393
3363
|
}, 8, ["disabled", "loading"]),
|
|
3394
3364
|
k(n, {
|
|
@@ -3396,7 +3366,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3396
3366
|
disabled: !m.value.length,
|
|
3397
3367
|
onClick: t[0] ||= (e) => be.value = !0
|
|
3398
3368
|
}, {
|
|
3399
|
-
default:
|
|
3369
|
+
default: W(() => t[6] ||= [O(" 批量配置 ")]),
|
|
3400
3370
|
_: 1
|
|
3401
3371
|
}, 8, ["disabled"]),
|
|
3402
3372
|
t[7] ||= E("span", { class: "meta-tip" }, [
|
|
@@ -3407,47 +3377,47 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3407
3377
|
O(" 列会自动选中(可改)。 ")
|
|
3408
3378
|
], -1)
|
|
3409
3379
|
]),
|
|
3410
|
-
A.value ? (
|
|
3380
|
+
A.value ? (F(), T("div", {
|
|
3411
3381
|
key: 0,
|
|
3412
3382
|
ref_key: "colTableWrapRef",
|
|
3413
3383
|
ref: _,
|
|
3414
3384
|
class: "col-table-wrapper"
|
|
3415
3385
|
}, [k(y, {
|
|
3416
|
-
columns:
|
|
3386
|
+
columns: B(me),
|
|
3417
3387
|
"data-source": m.value,
|
|
3418
3388
|
"row-key": "data_index",
|
|
3419
3389
|
size: "small",
|
|
3420
|
-
rowHeight:
|
|
3390
|
+
rowHeight: B(36),
|
|
3421
3391
|
height: v.value,
|
|
3422
|
-
scroll: { x:
|
|
3392
|
+
scroll: { x: B(he) },
|
|
3423
3393
|
pagination: !1,
|
|
3424
3394
|
"range-selection": !1,
|
|
3425
3395
|
loading: h.value
|
|
3426
3396
|
}, {
|
|
3427
|
-
bodyCell:
|
|
3397
|
+
bodyCell: W(({ column: e, recordIndexs: l }) => [e.key === "column_order" ? (F(), C(r, {
|
|
3428
3398
|
key: 0,
|
|
3429
3399
|
value: m.value[l[0]].column_order,
|
|
3430
3400
|
"onUpdate:value": (e) => m.value[l[0]].column_order = e,
|
|
3431
3401
|
size: "small",
|
|
3432
3402
|
style: { width: "50px" },
|
|
3433
3403
|
min: 0
|
|
3434
|
-
}, null, 8, ["value", "onUpdate:value"])) : e.key === "is_primary_key" ? (
|
|
3404
|
+
}, null, 8, ["value", "onUpdate:value"])) : e.key === "is_primary_key" ? (F(), C(i, {
|
|
3435
3405
|
key: 1,
|
|
3436
3406
|
checked: !!m.value[l[0]].is_primary_key,
|
|
3437
3407
|
onChange: (e) => P(m.value[l[0]], e)
|
|
3438
|
-
}, null, 8, ["checked", "onChange"])) : e.key === "title" ? (
|
|
3408
|
+
}, null, 8, ["checked", "onChange"])) : e.key === "title" ? (F(), C(a, {
|
|
3439
3409
|
key: 2,
|
|
3440
3410
|
value: m.value[l[0]].title,
|
|
3441
3411
|
"onUpdate:value": (e) => m.value[l[0]].title = e,
|
|
3442
3412
|
size: "small",
|
|
3443
3413
|
"allow-clear": ""
|
|
3444
|
-
}, null, 8, ["value", "onUpdate:value"])) : e.key === "query_title" ? (
|
|
3414
|
+
}, null, 8, ["value", "onUpdate:value"])) : e.key === "query_title" ? (F(), C(a, {
|
|
3445
3415
|
key: 3,
|
|
3446
3416
|
value: m.value[l[0]].query_title,
|
|
3447
3417
|
"onUpdate:value": (e) => m.value[l[0]].query_title = e,
|
|
3448
3418
|
size: "small",
|
|
3449
3419
|
"allow-clear": ""
|
|
3450
|
-
}, null, 8, ["value", "onUpdate:value"])) : e.key === "cell_component" ? (
|
|
3420
|
+
}, null, 8, ["value", "onUpdate:value"])) : e.key === "cell_component" ? (F(), C(o, {
|
|
3451
3421
|
key: 4,
|
|
3452
3422
|
value: m.value[l[0]].cell_component,
|
|
3453
3423
|
"onUpdate:value": (e) => m.value[l[0]].cell_component = e,
|
|
@@ -3462,7 +3432,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3462
3432
|
"value",
|
|
3463
3433
|
"onUpdate:value",
|
|
3464
3434
|
"options"
|
|
3465
|
-
])) : e.key === "cell_summary_component" ? (
|
|
3435
|
+
])) : e.key === "cell_summary_component" ? (F(), T(x, { key: 5 }, [m.value[l[0]].summary ? (F(), C(o, {
|
|
3466
3436
|
key: 0,
|
|
3467
3437
|
value: m.value[l[0]].cell_summary_component,
|
|
3468
3438
|
"onUpdate:value": (e) => m.value[l[0]].cell_summary_component = e,
|
|
@@ -3477,12 +3447,12 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3477
3447
|
"value",
|
|
3478
3448
|
"onUpdate:value",
|
|
3479
3449
|
"options"
|
|
3480
|
-
])) : (
|
|
3450
|
+
])) : (F(), T("span", rn, "-"))], 64)) : e.key === "cell_params" ? (F(), T(x, { key: 6 }, [m.value[l[0]].cell_component === B("common_number") ? (F(), C(s, {
|
|
3481
3451
|
key: 0,
|
|
3482
3452
|
value: m.value[l[0]].cell_component_params?.pattern || "",
|
|
3483
3453
|
size: "small",
|
|
3484
3454
|
style: { width: "100%" },
|
|
3485
|
-
options:
|
|
3455
|
+
options: B(b),
|
|
3486
3456
|
placeholder: "#,##0.00",
|
|
3487
3457
|
"filter-option": (e, t) => String(t.value).includes(e),
|
|
3488
3458
|
onChange: (e) => ye(m.value[l[0]], "cell_component_params", e)
|
|
@@ -3491,50 +3461,50 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3491
3461
|
"options",
|
|
3492
3462
|
"filter-option",
|
|
3493
3463
|
"onChange"
|
|
3494
|
-
])) : (
|
|
3464
|
+
])) : (F(), C(n, {
|
|
3495
3465
|
key: 1,
|
|
3496
3466
|
size: "small",
|
|
3497
3467
|
style: { padding: "0 4px" },
|
|
3498
3468
|
onClick: (e) => _e(m.value[l[0]], "cell_component_params")
|
|
3499
3469
|
}, {
|
|
3500
|
-
default:
|
|
3470
|
+
default: W(() => [O(z(ve(m.value[l[0]].cell_component_params) ? "已配" : "配置"), 1)]),
|
|
3501
3471
|
_: 2
|
|
3502
|
-
}, 1032, ["onClick"]))], 64)) : e.key === "checked" ? (
|
|
3472
|
+
}, 1032, ["onClick"]))], 64)) : e.key === "checked" ? (F(), C(i, {
|
|
3503
3473
|
key: 7,
|
|
3504
3474
|
checked: m.value[l[0]].checked,
|
|
3505
3475
|
"onUpdate:checked": (e) => m.value[l[0]].checked = e
|
|
3506
|
-
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "resizable" ? (
|
|
3476
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "resizable" ? (F(), C(i, {
|
|
3507
3477
|
key: 8,
|
|
3508
3478
|
checked: m.value[l[0]].resizable,
|
|
3509
3479
|
"onUpdate:checked": (e) => m.value[l[0]].resizable = e
|
|
3510
|
-
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "fixed" ? (
|
|
3480
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "fixed" ? (F(), C(u, {
|
|
3511
3481
|
key: 9,
|
|
3512
3482
|
value: m.value[l[0]].fixed,
|
|
3513
3483
|
"onUpdate:value": (e) => m.value[l[0]].fixed = e,
|
|
3514
3484
|
size: "small"
|
|
3515
3485
|
}, {
|
|
3516
|
-
default:
|
|
3486
|
+
default: W(() => [
|
|
3517
3487
|
k(c, { value: "left" }, {
|
|
3518
|
-
default:
|
|
3488
|
+
default: W(() => t[8] ||= [O("左")]),
|
|
3519
3489
|
_: 1
|
|
3520
3490
|
}),
|
|
3521
3491
|
k(c, { value: "" }, {
|
|
3522
|
-
default:
|
|
3492
|
+
default: W(() => t[9] ||= [O("不固定")]),
|
|
3523
3493
|
_: 1
|
|
3524
3494
|
}),
|
|
3525
3495
|
k(c, { value: "right" }, {
|
|
3526
|
-
default:
|
|
3496
|
+
default: W(() => t[10] ||= [O("右")]),
|
|
3527
3497
|
_: 1
|
|
3528
3498
|
})
|
|
3529
3499
|
]),
|
|
3530
3500
|
_: 2
|
|
3531
|
-
}, 1032, ["value", "onUpdate:value"])) : e.key === "auto_height" ? (
|
|
3501
|
+
}, 1032, ["value", "onUpdate:value"])) : e.key === "auto_height" ? (F(), C(d, {
|
|
3532
3502
|
key: 10,
|
|
3533
3503
|
checked: m.value[l[0]].auto_height,
|
|
3534
3504
|
"onUpdate:checked": (e) => m.value[l[0]].auto_height = e,
|
|
3535
3505
|
"checked-children": "自动",
|
|
3536
3506
|
"un-checked-children": "固定"
|
|
3537
|
-
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "col_width" ? (
|
|
3507
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "col_width" ? (F(), T("div", an, [k(d, {
|
|
3538
3508
|
checked: m.value[l[0]].auto_width,
|
|
3539
3509
|
"onUpdate:checked": (e) => m.value[l[0]].auto_width = e,
|
|
3540
3510
|
"checked-children": "自动",
|
|
@@ -3546,18 +3516,18 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3546
3516
|
style: { width: "66px" },
|
|
3547
3517
|
min: 50,
|
|
3548
3518
|
placeholder: "px"
|
|
3549
|
-
}, null, 8, ["value", "onUpdate:value"])])) : e.key === "ellipsis" ? (
|
|
3519
|
+
}, null, 8, ["value", "onUpdate:value"])])) : e.key === "ellipsis" ? (F(), C(d, {
|
|
3550
3520
|
key: 12,
|
|
3551
3521
|
checked: m.value[l[0]].ellipsis,
|
|
3552
3522
|
"onUpdate:checked": (e) => m.value[l[0]].ellipsis = e,
|
|
3553
3523
|
"checked-children": "开启",
|
|
3554
3524
|
"un-checked-children": "关闭"
|
|
3555
|
-
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "cell_summary_params" ? (
|
|
3525
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "cell_summary_params" ? (F(), T(x, { key: 13 }, [m.value[l[0]].summary ? (F(), T(x, { key: 0 }, [m.value[l[0]].cell_summary_component === B("common_number") ? (F(), C(s, {
|
|
3556
3526
|
key: 0,
|
|
3557
3527
|
value: m.value[l[0]].cell_summary_component_params?.pattern || "",
|
|
3558
3528
|
size: "small",
|
|
3559
3529
|
style: { width: "100%" },
|
|
3560
|
-
options:
|
|
3530
|
+
options: B(b),
|
|
3561
3531
|
placeholder: "#,##0.00",
|
|
3562
3532
|
"filter-option": (e, t) => String(t.value).includes(e),
|
|
3563
3533
|
onChange: (e) => ye(m.value[l[0]], "cell_summary_component_params", e)
|
|
@@ -3566,31 +3536,31 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3566
3536
|
"options",
|
|
3567
3537
|
"filter-option",
|
|
3568
3538
|
"onChange"
|
|
3569
|
-
])) : (
|
|
3539
|
+
])) : (F(), C(n, {
|
|
3570
3540
|
key: 1,
|
|
3571
3541
|
size: "small",
|
|
3572
3542
|
style: { padding: "0 4px" },
|
|
3573
3543
|
onClick: (e) => _e(m.value[l[0]], "cell_summary_component_params")
|
|
3574
3544
|
}, {
|
|
3575
|
-
default:
|
|
3545
|
+
default: W(() => [O(z(ve(m.value[l[0]].cell_summary_component_params) ? "已配" : "配置"), 1)]),
|
|
3576
3546
|
_: 2
|
|
3577
|
-
}, 1032, ["onClick"]))], 64)) : (
|
|
3547
|
+
}, 1032, ["onClick"]))], 64)) : (F(), T("span", on, "-"))], 64)) : e.key === "summary" ? (F(), C(i, {
|
|
3578
3548
|
key: 14,
|
|
3579
3549
|
checked: m.value[l[0]].summary,
|
|
3580
3550
|
"onUpdate:checked": (e) => m.value[l[0]].summary = e
|
|
3581
|
-
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "is_sortable" ? (
|
|
3551
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "is_sortable" ? (F(), C(i, {
|
|
3582
3552
|
key: 15,
|
|
3583
3553
|
checked: m.value[l[0]].is_sortable,
|
|
3584
3554
|
"onUpdate:checked": (e) => m.value[l[0]].is_sortable = e
|
|
3585
|
-
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "default_sort" ? (
|
|
3555
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "default_sort" ? (F(), T("div", sn, [k(i, {
|
|
3586
3556
|
checked: m.value[l[0]].is_default_sort,
|
|
3587
3557
|
"onUpdate:checked": (e) => m.value[l[0]].is_default_sort = e,
|
|
3588
|
-
onChange: (e) =>
|
|
3558
|
+
onChange: (e) => V(m.value[l[0]])
|
|
3589
3559
|
}, null, 8, [
|
|
3590
3560
|
"checked",
|
|
3591
3561
|
"onUpdate:checked",
|
|
3592
3562
|
"onChange"
|
|
3593
|
-
]), m.value[l[0]].is_default_sort ? (
|
|
3563
|
+
]), m.value[l[0]].is_default_sort ? (F(), T(x, { key: 0 }, [k(o, {
|
|
3594
3564
|
value: m.value[l[0]].default_sort_type,
|
|
3595
3565
|
"onUpdate:value": (e) => m.value[l[0]].default_sort_type = e,
|
|
3596
3566
|
size: "small",
|
|
@@ -3609,46 +3579,46 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3609
3579
|
style: { width: "60px" },
|
|
3610
3580
|
min: 1,
|
|
3611
3581
|
placeholder: "顺序"
|
|
3612
|
-
}, null, 8, ["value", "onUpdate:value"])], 64)) : w("", !0)])) : e.key === "map_color" ? (
|
|
3582
|
+
}, null, 8, ["value", "onUpdate:value"])], 64)) : w("", !0)])) : e.key === "map_color" ? (F(), C(n, {
|
|
3613
3583
|
key: 17,
|
|
3614
3584
|
size: "small",
|
|
3615
3585
|
style: { padding: "0 4px" },
|
|
3616
|
-
onClick: (e) =>
|
|
3586
|
+
onClick: (e) => ae(m.value[l[0]])
|
|
3617
3587
|
}, {
|
|
3618
|
-
default:
|
|
3588
|
+
default: W(() => [O(z(oe(m.value[l[0]]) ? `已配 ${oe(m.value[l[0]])} 项` : "配置"), 1)]),
|
|
3619
3589
|
_: 2
|
|
3620
|
-
}, 1032, ["onClick"])) : e.key === "adv_search" ? (
|
|
3590
|
+
}, 1032, ["onClick"])) : e.key === "adv_search" ? (F(), C(n, {
|
|
3621
3591
|
key: 18,
|
|
3622
3592
|
size: "small",
|
|
3623
3593
|
style: { padding: "0 4px" },
|
|
3624
3594
|
onClick: (e) => ce(m.value[l[0]])
|
|
3625
3595
|
}, {
|
|
3626
|
-
default:
|
|
3596
|
+
default: W(() => [O(z(m.value[l[0]].advanced_search_component?.type || "配置"), 1)]),
|
|
3627
3597
|
_: 2
|
|
3628
|
-
}, 1032, ["onClick"])) : e.key === "is_base_query" ? (
|
|
3598
|
+
}, 1032, ["onClick"])) : e.key === "is_base_query" ? (F(), C(i, {
|
|
3629
3599
|
key: 19,
|
|
3630
3600
|
checked: m.value[l[0]].is_base_query,
|
|
3631
3601
|
"onUpdate:checked": (e) => m.value[l[0]].is_base_query = e
|
|
3632
|
-
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "is_default_query" ? (
|
|
3602
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "is_default_query" ? (F(), C(i, {
|
|
3633
3603
|
key: 20,
|
|
3634
3604
|
checked: m.value[l[0]].is_default_query,
|
|
3635
3605
|
"onUpdate:checked": (e) => m.value[l[0]].is_default_query = e
|
|
3636
|
-
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "is_group_query" ? (
|
|
3606
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "is_group_query" ? (F(), C(i, {
|
|
3637
3607
|
key: 21,
|
|
3638
3608
|
checked: m.value[l[0]].is_group_query,
|
|
3639
3609
|
"onUpdate:checked": (e) => m.value[l[0]].is_group_query = e
|
|
3640
|
-
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "action" ? (
|
|
3610
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : e.key === "action" ? (F(), C(g, {
|
|
3641
3611
|
key: 22,
|
|
3642
3612
|
title: "确认删除该列配置?",
|
|
3643
|
-
onConfirm: (e) =>
|
|
3613
|
+
onConfirm: (e) => G(m.value[l[0]])
|
|
3644
3614
|
}, {
|
|
3645
|
-
default:
|
|
3615
|
+
default: W(() => [k(n, {
|
|
3646
3616
|
type: "link",
|
|
3647
3617
|
danger: "",
|
|
3648
3618
|
size: "small",
|
|
3649
3619
|
style: { padding: "0" }
|
|
3650
3620
|
}, {
|
|
3651
|
-
default:
|
|
3621
|
+
default: W(() => t[11] ||= [O(" 删除 ")]),
|
|
3652
3622
|
_: 1
|
|
3653
3623
|
})]),
|
|
3654
3624
|
_: 2
|
|
@@ -3662,27 +3632,27 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3662
3632
|
"scroll",
|
|
3663
3633
|
"loading"
|
|
3664
3634
|
])], 512)) : w("", !0),
|
|
3665
|
-
k(
|
|
3666
|
-
open:
|
|
3667
|
-
"onUpdate:open": t[1] ||= (e) =>
|
|
3668
|
-
record:
|
|
3635
|
+
k(we, {
|
|
3636
|
+
open: re.value,
|
|
3637
|
+
"onUpdate:open": t[1] ||= (e) => re.value = e,
|
|
3638
|
+
record: q.value
|
|
3669
3639
|
}, null, 8, ["open", "record"]),
|
|
3670
|
-
k(
|
|
3671
|
-
open:
|
|
3672
|
-
"onUpdate:open": t[2] ||= (e) =>
|
|
3640
|
+
k(tn, {
|
|
3641
|
+
open: X.value,
|
|
3642
|
+
"onUpdate:open": t[2] ||= (e) => X.value = e,
|
|
3673
3643
|
record: se.value
|
|
3674
3644
|
}, null, 8, ["open", "record"]),
|
|
3675
|
-
k(
|
|
3645
|
+
k(Ue, {
|
|
3676
3646
|
open: le.value,
|
|
3677
3647
|
"onUpdate:open": t[3] ||= (e) => le.value = e,
|
|
3678
|
-
record:
|
|
3648
|
+
record: ue.value,
|
|
3679
3649
|
field: ge.value
|
|
3680
3650
|
}, null, 8, [
|
|
3681
3651
|
"open",
|
|
3682
3652
|
"record",
|
|
3683
3653
|
"field"
|
|
3684
3654
|
]),
|
|
3685
|
-
k(
|
|
3655
|
+
k(Be, {
|
|
3686
3656
|
open: be.value,
|
|
3687
3657
|
"onUpdate:open": t[4] ||= (e) => be.value = e,
|
|
3688
3658
|
rows: m.value
|
|
@@ -3690,29 +3660,79 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3690
3660
|
], 64);
|
|
3691
3661
|
};
|
|
3692
3662
|
}
|
|
3693
|
-
}), [["__scopeId", "data-v-0862eba0"]]),
|
|
3663
|
+
}), [["__scopeId", "data-v-0862eba0"]]), ln = /*#__PURE__*/ i(/* @__PURE__ */ A({
|
|
3694
3664
|
__name: "StepMenu",
|
|
3695
|
-
props: {
|
|
3665
|
+
props: {
|
|
3666
|
+
model: {},
|
|
3667
|
+
formType: {},
|
|
3668
|
+
record: {}
|
|
3669
|
+
},
|
|
3696
3670
|
setup(e) {
|
|
3697
|
-
let t = e, n = S(() => t.model), r = {
|
|
3671
|
+
let t = e, n = S(() => t.model), i = S(() => t.formType), a = r().currentOrg, o = I(!1), s = async () => {
|
|
3672
|
+
o.value = !0;
|
|
3673
|
+
try {
|
|
3674
|
+
let e = await ae(t.record.model_app, a?.id);
|
|
3675
|
+
e ? n.value.flag = e : K.warning("生成视图标识失败,请手动填写");
|
|
3676
|
+
} catch (e) {
|
|
3677
|
+
K.warning(e?.message || "生成视图标识失败,请手动填写");
|
|
3678
|
+
} finally {
|
|
3679
|
+
o.value = !1;
|
|
3680
|
+
}
|
|
3681
|
+
}, c = {
|
|
3698
3682
|
name: "menu_project",
|
|
3699
3683
|
show_search: !0,
|
|
3700
3684
|
mode: "default",
|
|
3701
3685
|
postUrl: "/i18n/query_language_project_list"
|
|
3702
3686
|
};
|
|
3703
3687
|
return (e, t) => {
|
|
3704
|
-
let
|
|
3705
|
-
return
|
|
3706
|
-
default:
|
|
3707
|
-
k(
|
|
3708
|
-
default:
|
|
3688
|
+
let r = R("a-button"), a = R("a-input"), l = R("a-form-item"), u = R("a-col"), d = R("a-row");
|
|
3689
|
+
return F(), C(d, { gutter: 16 }, {
|
|
3690
|
+
default: W(() => [
|
|
3691
|
+
k(u, { span: 24 }, {
|
|
3692
|
+
default: W(() => [k(l, {
|
|
3693
|
+
label: "视图标识",
|
|
3694
|
+
name: "flag",
|
|
3695
|
+
rules: [{
|
|
3696
|
+
required: !0,
|
|
3697
|
+
message: "请填写视图标识"
|
|
3698
|
+
}, {
|
|
3699
|
+
pattern: /^[A-Za-z0-9]+$/,
|
|
3700
|
+
message: "仅英文大小写字母和数字,禁下划线/横杠"
|
|
3701
|
+
}],
|
|
3702
|
+
extra: i.value === "edit" ? "编辑模式下禁止修改:标识已用于接口 URL 与菜单路由,改了会断掉下游引用" : "全库唯一;仅英文大小写字母和数字(禁下划线/横杠),已自动生成、允许修改,保存后锁定"
|
|
3703
|
+
}, {
|
|
3704
|
+
default: W(() => [k(a, {
|
|
3705
|
+
value: n.value.flag,
|
|
3706
|
+
"onUpdate:value": t[0] ||= (e) => n.value.flag = e,
|
|
3707
|
+
disabled: i.value === "edit",
|
|
3708
|
+
placeholder: "保存时自动生成"
|
|
3709
|
+
}, D({ _: 2 }, [i.value === "edit" ? void 0 : {
|
|
3710
|
+
name: "suffix",
|
|
3711
|
+
fn: W(() => [k(r, {
|
|
3712
|
+
type: "link",
|
|
3713
|
+
size: "small",
|
|
3714
|
+
style: { padding: "0" },
|
|
3715
|
+
loading: o.value,
|
|
3716
|
+
onClick: s
|
|
3717
|
+
}, {
|
|
3718
|
+
default: W(() => t[4] ||= [O(" 换一个 ")]),
|
|
3719
|
+
_: 1
|
|
3720
|
+
}, 8, ["loading"])]),
|
|
3721
|
+
key: "0"
|
|
3722
|
+
}]), 1032, ["value", "disabled"])]),
|
|
3723
|
+
_: 1
|
|
3724
|
+
}, 8, ["extra"])]),
|
|
3725
|
+
_: 1
|
|
3726
|
+
}),
|
|
3727
|
+
k(u, { span: 24 }, {
|
|
3728
|
+
default: W(() => [k(l, {
|
|
3709
3729
|
label: "父级路由",
|
|
3710
3730
|
name: "parent_menu_id",
|
|
3711
3731
|
extra: "选择父级菜单;留空表示顶级菜单。保存时会直接写到该视图对应的菜单行"
|
|
3712
3732
|
}, {
|
|
3713
|
-
default:
|
|
3733
|
+
default: W(() => [k(g, {
|
|
3714
3734
|
value: n.value.parent_menu_id,
|
|
3715
|
-
"onUpdate:value": t[
|
|
3735
|
+
"onUpdate:value": t[1] ||= (e) => n.value.parent_menu_id = e,
|
|
3716
3736
|
"form-model": n.value,
|
|
3717
3737
|
placeholder: "请选择父级菜单",
|
|
3718
3738
|
"value-key": "id",
|
|
@@ -3725,7 +3745,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3725
3745
|
labelKey: "name",
|
|
3726
3746
|
placeholder: "请选择父级菜单",
|
|
3727
3747
|
postUrl: "/permission/query_menu_list__tree",
|
|
3728
|
-
span:
|
|
3748
|
+
span: 24
|
|
3729
3749
|
},
|
|
3730
3750
|
"allow-clear": !0
|
|
3731
3751
|
}, null, 8, ["value", "form-model"])]),
|
|
@@ -3733,42 +3753,42 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3733
3753
|
})]),
|
|
3734
3754
|
_: 1
|
|
3735
3755
|
}),
|
|
3736
|
-
k(
|
|
3737
|
-
default:
|
|
3756
|
+
k(u, { span: 24 }, {
|
|
3757
|
+
default: W(() => [k(l, {
|
|
3738
3758
|
label: "隶属项目",
|
|
3739
3759
|
name: "menu_project",
|
|
3740
3760
|
extra: "该视图菜单归属的模块/项目;留空 = 通用(所有项目可见)。同样同步到菜单行"
|
|
3741
3761
|
}, {
|
|
3742
|
-
default:
|
|
3762
|
+
default: W(() => [k(h, {
|
|
3743
3763
|
value: n.value.menu_project,
|
|
3744
|
-
"onUpdate:value": t[
|
|
3764
|
+
"onUpdate:value": t[2] ||= (e) => n.value.menu_project = e,
|
|
3745
3765
|
"form-model": n.value,
|
|
3746
3766
|
"value-key": "project",
|
|
3747
3767
|
"label-key": "name",
|
|
3748
3768
|
placeholder: "请选择模块",
|
|
3749
|
-
field:
|
|
3769
|
+
field: c
|
|
3750
3770
|
}, null, 8, ["value", "form-model"])]),
|
|
3751
3771
|
_: 1
|
|
3752
3772
|
})]),
|
|
3753
3773
|
_: 1
|
|
3754
3774
|
}),
|
|
3755
|
-
k(
|
|
3756
|
-
default:
|
|
3775
|
+
k(u, { span: 24 }, {
|
|
3776
|
+
default: W(() => [k(l, {
|
|
3757
3777
|
label: "菜单图标",
|
|
3758
3778
|
name: "menu_icon",
|
|
3759
3779
|
extra: "显示在菜单树里;留空保存 = 不使用图标"
|
|
3760
3780
|
}, {
|
|
3761
|
-
default:
|
|
3781
|
+
default: W(() => [k(B(v), {
|
|
3762
3782
|
value: n.value.menu_icon,
|
|
3763
|
-
"onUpdate:value": t[
|
|
3783
|
+
"onUpdate:value": t[3] ||= (e) => n.value.menu_icon = e,
|
|
3764
3784
|
placeholder: "请选择菜单图标"
|
|
3765
3785
|
}, null, 8, ["value"])]),
|
|
3766
3786
|
_: 1
|
|
3767
3787
|
})]),
|
|
3768
3788
|
_: 1
|
|
3769
3789
|
}),
|
|
3770
|
-
k(
|
|
3771
|
-
default:
|
|
3790
|
+
k(u, { span: 24 }, {
|
|
3791
|
+
default: W(() => t[5] ||= [E("div", { class: "step-menu-tip" }, [
|
|
3772
3792
|
O(" 本步各项在保存时"),
|
|
3773
3793
|
E("b", null, "直接写入该视图对应的菜单行"),
|
|
3774
3794
|
O("(菜单不存在则自动新建); 菜单的"),
|
|
@@ -3782,22 +3802,22 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3782
3802
|
});
|
|
3783
3803
|
};
|
|
3784
3804
|
}
|
|
3785
|
-
}), [["__scopeId", "data-v-
|
|
3805
|
+
}), [["__scopeId", "data-v-e5aec519"]]), un = [
|
|
3786
3806
|
"default_view_type",
|
|
3787
3807
|
"enable_view_types",
|
|
3788
3808
|
"view_display_type",
|
|
3789
3809
|
"is_pagination",
|
|
3790
3810
|
"pageSize",
|
|
3791
3811
|
"page_size_options"
|
|
3792
|
-
],
|
|
3812
|
+
], dn = (e, t) => {
|
|
3793
3813
|
let n = {};
|
|
3794
3814
|
return Object.keys(t || {}).forEach((e) => {
|
|
3795
|
-
|
|
3815
|
+
un.includes(e) || (n[e] = t[e]);
|
|
3796
3816
|
}), e.default_view_type = t.default_view_type ?? void 0, e.enable_view_types = Array.isArray(t.enable_view_types) ? t.enable_view_types : [], e.view_display_type = t.view_display_type ?? void 0, e.is_pagination = t.is_pagination ?? !0, e.pageSize = t.pageSize ?? void 0, e.page_size_options = Array.isArray(t.page_size_options) ? t.page_size_options : [], n;
|
|
3797
|
-
},
|
|
3817
|
+
}, fn = (e, t) => {
|
|
3798
3818
|
let n = { ...t };
|
|
3799
3819
|
return e.default_view_type ? n.default_view_type = e.default_view_type : delete n.default_view_type, e.enable_view_types && e.enable_view_types.length ? n.enable_view_types = e.enable_view_types : delete n.enable_view_types, e.view_display_type ? n.view_display_type = e.view_display_type : delete n.view_display_type, Array.isArray(e.enable_view_types) && e.enable_view_types.length && n.default_view_type && !e.enable_view_types.includes(n.default_view_type) && delete n.default_view_type, typeof e.is_pagination == "boolean" ? n.is_pagination = e.is_pagination : n.is_pagination = !0, e.pageSize == null ? delete n.pageSize : n.pageSize = e.pageSize, e.page_size_options && e.page_size_options.length ? n.page_size_options = e.page_size_options : delete n.page_size_options, n;
|
|
3800
|
-
},
|
|
3820
|
+
}, pn = { class: "step-pane" }, mn = { class: "step-pane" }, hn = { class: "step-pane step-pane--col" }, gn = { class: "step-pane" }, _n = { class: "config-footer" }, vn = /*#__PURE__*/ i(/* @__PURE__ */ A({
|
|
3801
3821
|
__name: "dbViewConfig",
|
|
3802
3822
|
props: {
|
|
3803
3823
|
title: {},
|
|
@@ -3805,22 +3825,23 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3805
3825
|
},
|
|
3806
3826
|
emits: ["cancel", "ok"],
|
|
3807
3827
|
setup(e, { emit: t }) {
|
|
3808
|
-
let i = e, a = t, m =
|
|
3828
|
+
let i = e, a = t, m = I(null), h = I(!1), g = I(!0), _ = I(i.record?.form_type || "create"), v = I(0), y = r().currentOrg, b = S(() => v.value === 2), x = I(""), w = () => {
|
|
3809
3829
|
x.value = "";
|
|
3810
|
-
}, T =
|
|
3830
|
+
}, T = I(null), D = I(null), A = I({
|
|
3811
3831
|
name: void 0,
|
|
3812
3832
|
flag: void 0,
|
|
3813
3833
|
data_source_id: void 0,
|
|
3814
3834
|
parent_menu_id: void 0,
|
|
3815
3835
|
menu_project: void 0,
|
|
3816
3836
|
menu_icon: void 0,
|
|
3837
|
+
remark: void 0,
|
|
3817
3838
|
sql: void 0,
|
|
3818
3839
|
default_view_type: void 0,
|
|
3819
3840
|
enable_view_types: [],
|
|
3820
3841
|
is_pagination: !0,
|
|
3821
3842
|
pageSize: void 0,
|
|
3822
3843
|
page_size_options: []
|
|
3823
|
-
}), j =
|
|
3844
|
+
}), j = ge, M = async () => {
|
|
3824
3845
|
let e = j[v.value] || [];
|
|
3825
3846
|
if (e.length) try {
|
|
3826
3847
|
await m.value?.validateFields(e);
|
|
@@ -3841,10 +3862,10 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3841
3862
|
return;
|
|
3842
3863
|
}
|
|
3843
3864
|
v.value = e;
|
|
3844
|
-
}, P = {},
|
|
3865
|
+
}, P = {}, ne = async (e) => Y(await o({
|
|
3845
3866
|
db_view_id: e,
|
|
3846
3867
|
org_id: y?.id
|
|
3847
|
-
}, `${i.record.model_app}/get_db_view`)) || {},
|
|
3868
|
+
}, `${i.record.model_app}/get_db_view`)) || {}, L = () => {
|
|
3848
3869
|
let e = A.value;
|
|
3849
3870
|
return {
|
|
3850
3871
|
name: e.name,
|
|
@@ -3853,53 +3874,58 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3853
3874
|
parent_menu_id: e.parent_menu_id || null,
|
|
3854
3875
|
menu_project: e.menu_project || null,
|
|
3855
3876
|
menu_icon: e.menu_icon ?? "",
|
|
3877
|
+
remark: e.remark ?? "",
|
|
3856
3878
|
sql: e.sql,
|
|
3857
|
-
view_meta:
|
|
3879
|
+
view_meta: fn(e, P)
|
|
3858
3880
|
};
|
|
3859
|
-
},
|
|
3881
|
+
}, B = async () => {
|
|
3860
3882
|
try {
|
|
3861
3883
|
if (_.value === "edit") {
|
|
3862
3884
|
let e = j[v.value] || [];
|
|
3863
3885
|
e.length && await m.value?.validateFields(e);
|
|
3864
3886
|
} else await m.value.validate();
|
|
3865
3887
|
let e = {
|
|
3866
|
-
...
|
|
3888
|
+
...L(),
|
|
3867
3889
|
columns: T.value?.buildColumnsPayload?.() ?? [],
|
|
3868
3890
|
deleted_data_indexes: T.value?.getDeletedIndexes?.() ?? []
|
|
3869
3891
|
};
|
|
3870
3892
|
_.value === "edit" && (e.db_view_id = i.record.id), h.value = !0, await o({
|
|
3871
3893
|
...e,
|
|
3872
3894
|
org_id: y?.id
|
|
3873
|
-
}, `${i.record.model_app}/save_view`),
|
|
3895
|
+
}, `${i.record.model_app}/save_view`), K.success("操作成功"), T.value?.resetDeletedIndexes?.(), n()?.emit("refresh"), a("ok");
|
|
3874
3896
|
} catch {} finally {
|
|
3875
3897
|
h.value = !1;
|
|
3876
3898
|
}
|
|
3877
|
-
},
|
|
3878
|
-
v.value < 3 ? M() :
|
|
3879
|
-
},
|
|
3899
|
+
}, V = () => a("cancel"), U = () => {
|
|
3900
|
+
v.value < 3 ? M() : B();
|
|
3901
|
+
}, re = async (e) => {
|
|
3880
3902
|
if (e) try {
|
|
3881
|
-
let t =
|
|
3903
|
+
let t = Y(await o({
|
|
3882
3904
|
org_id: y?.id,
|
|
3883
3905
|
flag: e
|
|
3884
3906
|
}, `${i.record.model_app}/get_db_view_menu`, !1, { skip_error: !0 })) || {};
|
|
3885
3907
|
if (!t.exists) return;
|
|
3886
3908
|
A.value.parent_menu_id = t.parent_id ?? void 0, A.value.menu_project = t.menu_project || void 0, A.value.menu_icon = t.icon || void 0;
|
|
3887
3909
|
} catch {}
|
|
3888
|
-
},
|
|
3889
|
-
let e = i.record?.id, t = (e == null ? i.record : await
|
|
3910
|
+
}, q = async () => {
|
|
3911
|
+
let e = i.record?.id, t = (e == null ? i.record : await ne(e)) || {};
|
|
3890
3912
|
A.value = {
|
|
3891
3913
|
...A.value,
|
|
3892
3914
|
name: t.name || void 0,
|
|
3893
3915
|
flag: t.flag || void 0,
|
|
3894
3916
|
data_source_id: t.data_source_id ?? void 0,
|
|
3917
|
+
remark: t.remark || void 0,
|
|
3895
3918
|
sql: t.sql || void 0
|
|
3896
|
-
}, P =
|
|
3897
|
-
},
|
|
3919
|
+
}, P = dn(A.value, t.view_meta || {}), await re(A.value.flag);
|
|
3920
|
+
}, J = p({
|
|
3921
|
+
sql: l({ description: "完整查询 SQL(单条只读 SELECT / WITH...SELECT / UNION,可用 {{org_id}} / {{person_id}} 模板变量)" }),
|
|
3922
|
+
remark: f(l({ description: "备注:描述这条 SQL 的查询细节(查什么表 / 统计口径 / 过滤与分组);提供时与 SQL 一并写入,整体覆盖现有备注" }))
|
|
3923
|
+
}), ae = p({ remark: l({ description: "备注全文(整体覆盖现有备注;描述 SQL 的查询细节,如查什么表 / 口径 / 过滤与分组)" }) }), oe = p({ name: l({ description: "新的视图名称(整体覆盖;建议简洁中文、能反映查询内容)" }) }), X = async () => ie(await o({
|
|
3898
3924
|
org_id: y?.id,
|
|
3899
3925
|
is_pagination: !1
|
|
3900
|
-
}, `${i.record.model_app}/query_db_data_source_list`)),
|
|
3926
|
+
}, `${i.record.model_app}/query_db_data_source_list`)), se = async () => {
|
|
3901
3927
|
try {
|
|
3902
|
-
let e = await
|
|
3928
|
+
let e = await X(), t = A.value.data_source_id, n = !1;
|
|
3903
3929
|
if (!t && e.length > 0 && (t = e[0].id, A.value.data_source_id = t, n = !0), !t) return {
|
|
3904
3930
|
ok: !1,
|
|
3905
3931
|
error: "当前环境没有任何可选数据源,请先在「数据源管理」中新增"
|
|
@@ -3930,9 +3956,9 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3930
3956
|
error: "读取数据源列表失败"
|
|
3931
3957
|
};
|
|
3932
3958
|
}
|
|
3933
|
-
},
|
|
3959
|
+
}, le = async () => {
|
|
3934
3960
|
try {
|
|
3935
|
-
let e = await
|
|
3961
|
+
let e = await X();
|
|
3936
3962
|
return {
|
|
3937
3963
|
ok: !0,
|
|
3938
3964
|
data: {
|
|
@@ -3955,9 +3981,9 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
3955
3981
|
error: "读取数据源列表失败"
|
|
3956
3982
|
};
|
|
3957
3983
|
}
|
|
3958
|
-
},
|
|
3984
|
+
}, ue = async (e) => {
|
|
3959
3985
|
try {
|
|
3960
|
-
let t = await
|
|
3986
|
+
let t = await X();
|
|
3961
3987
|
if (!t.length) return {
|
|
3962
3988
|
ok: !1,
|
|
3963
3989
|
error: "当前环境没有任何可选数据源,请先在「数据源管理」中新增"
|
|
@@ -4000,34 +4026,93 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
4000
4026
|
error: "读取数据源列表失败"
|
|
4001
4027
|
};
|
|
4002
4028
|
}
|
|
4003
|
-
},
|
|
4029
|
+
}, de = async () => {
|
|
4030
|
+
try {
|
|
4031
|
+
let e = null;
|
|
4032
|
+
if (A.value.data_source_id) {
|
|
4033
|
+
let t = (await X()).find((e) => e.id === A.value.data_source_id) || null;
|
|
4034
|
+
e = t ? {
|
|
4035
|
+
id: t.id,
|
|
4036
|
+
name: t.name,
|
|
4037
|
+
db_type: t.db_type
|
|
4038
|
+
} : null;
|
|
4039
|
+
}
|
|
4040
|
+
return {
|
|
4041
|
+
ok: !0,
|
|
4042
|
+
data: {
|
|
4043
|
+
name: A.value.name ?? null,
|
|
4044
|
+
flag: A.value.flag ?? null,
|
|
4045
|
+
data_source_id: A.value.data_source_id ?? null,
|
|
4046
|
+
data_source: e,
|
|
4047
|
+
sql: A.value.sql ?? "",
|
|
4048
|
+
remark: A.value.remark ?? "",
|
|
4049
|
+
current_step: v.value + 1,
|
|
4050
|
+
form_type: _.value
|
|
4051
|
+
}
|
|
4052
|
+
};
|
|
4053
|
+
} catch {
|
|
4054
|
+
return {
|
|
4055
|
+
ok: !1,
|
|
4056
|
+
error: "读取当前配置失败"
|
|
4057
|
+
};
|
|
4058
|
+
}
|
|
4059
|
+
}, fe = async (e) => {
|
|
4004
4060
|
let t = String(e?.sql ?? "").trim();
|
|
4005
4061
|
if (!t) return {
|
|
4006
4062
|
ok: !1,
|
|
4007
4063
|
error: "sql 不能为空"
|
|
4008
4064
|
};
|
|
4009
4065
|
let n = v.value !== 0;
|
|
4010
|
-
v.value = 0, A.value.sql = t
|
|
4011
|
-
let r =
|
|
4066
|
+
v.value = 0, A.value.sql = t;
|
|
4067
|
+
let r = typeof e?.remark == "string" && e.remark.trim() !== "";
|
|
4068
|
+
r && (A.value.remark = e.remark.trim()), x.value = "";
|
|
4069
|
+
let i = await D.value?.runPreview?.();
|
|
4012
4070
|
return {
|
|
4013
4071
|
ok: !0,
|
|
4014
4072
|
data: {
|
|
4015
4073
|
written: !0,
|
|
4074
|
+
remark_written: r,
|
|
4016
4075
|
jumped_back_to_step1: n,
|
|
4017
|
-
preview:
|
|
4076
|
+
preview: i?.ran ? {
|
|
4018
4077
|
ran: !0,
|
|
4019
|
-
rows:
|
|
4020
|
-
error:
|
|
4078
|
+
rows: i.rows,
|
|
4079
|
+
error: i.error || null
|
|
4021
4080
|
} : {
|
|
4022
4081
|
ran: !1,
|
|
4023
4082
|
reason: A.value.data_source_id ? "预览入口未就绪" : "尚未选择数据源"
|
|
4024
4083
|
}
|
|
4025
4084
|
}
|
|
4026
4085
|
};
|
|
4027
|
-
},
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4086
|
+
}, pe = (e) => {
|
|
4087
|
+
let t = String(e?.remark ?? "").trim();
|
|
4088
|
+
return t ? (A.value.remark = t, {
|
|
4089
|
+
ok: !0,
|
|
4090
|
+
data: {
|
|
4091
|
+
written: !0,
|
|
4092
|
+
remark: t,
|
|
4093
|
+
current_step: v.value + 1
|
|
4094
|
+
}
|
|
4095
|
+
}) : {
|
|
4096
|
+
ok: !1,
|
|
4097
|
+
error: "remark 不能为空(清空备注请直接说明,由用户手动清空)"
|
|
4098
|
+
};
|
|
4099
|
+
}, me = (e) => {
|
|
4100
|
+
let t = String(e?.name ?? "").trim();
|
|
4101
|
+
return t ? (A.value.name = t, {
|
|
4102
|
+
ok: !0,
|
|
4103
|
+
data: {
|
|
4104
|
+
written: !0,
|
|
4105
|
+
name: t,
|
|
4106
|
+
current_step: v.value + 1
|
|
4107
|
+
}
|
|
4108
|
+
}) : {
|
|
4109
|
+
ok: !1,
|
|
4110
|
+
error: "name 不能为空"
|
|
4111
|
+
};
|
|
4112
|
+
}, he = [], ve = () => {
|
|
4113
|
+
he.forEach((e) => e()), he.length = 0;
|
|
4114
|
+
}, ye = () => {
|
|
4115
|
+
ve(), he.push(c({
|
|
4031
4116
|
name: "dbview_config_data_source",
|
|
4032
4117
|
toolName: "page_dbview_config_data_source",
|
|
4033
4118
|
label: "读取当前所选数据源",
|
|
@@ -4038,7 +4123,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
4038
4123
|
"data_source 为 null 说明下拉里找不到该数据源(可能已被删除),如实告知用户"
|
|
4039
4124
|
],
|
|
4040
4125
|
parameters: p({}),
|
|
4041
|
-
execute:
|
|
4126
|
+
execute: se
|
|
4042
4127
|
}), c({
|
|
4043
4128
|
name: "dbview_config_list_data_sources",
|
|
4044
4129
|
toolName: "page_dbview_config_list_data_sources",
|
|
@@ -4046,7 +4131,7 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
4046
4131
|
description: "列出「视图配置」弹窗当前可选的全部数据源(id / 名称 / 数据库类型 / 主机 / 端口 / 库名)及当前选中项。用户不确定有哪些库、或想按库名/类型挑选数据源时先调用。",
|
|
4047
4132
|
promptGuidelines: ["用 db_type 判断 SQL 方言;要切换数据源用「选择数据源」能力", "count=0 时告知用户先到「数据源管理」新增,不要臆造数据源"],
|
|
4048
4133
|
parameters: p({}),
|
|
4049
|
-
execute:
|
|
4134
|
+
execute: le
|
|
4050
4135
|
}), c({
|
|
4051
4136
|
name: "dbview_config_select_data_source",
|
|
4052
4137
|
toolName: "page_dbview_config_select_data_source",
|
|
@@ -4062,34 +4147,69 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
4062
4147
|
name: f(l({ description: "按名称精确匹配选择数据源" }))
|
|
4063
4148
|
}),
|
|
4064
4149
|
write: !0,
|
|
4065
|
-
execute:
|
|
4150
|
+
execute: ue
|
|
4151
|
+
}), c({
|
|
4152
|
+
name: "dbview_config_get_state",
|
|
4153
|
+
toolName: "page_dbview_config_get_state",
|
|
4154
|
+
label: "读取当前配置内容",
|
|
4155
|
+
description: "读取「视图配置」弹窗当前的全部配置内容:视图名称 / 视图标识 / 所选数据源 / 当前 SQL / 当前备注 / 所在步骤。改写或向用户复述现状前先调用,不要靠记忆或臆测输入框里的内容。",
|
|
4156
|
+
promptGuidelines: ["改写 SQL / 备注前先调用,确认现状(sql、remark 是当前输入框的真实内容)", "flag 是只读字段(自动生成、禁止编辑),不要尝试修改它"],
|
|
4157
|
+
parameters: p({}),
|
|
4158
|
+
execute: de
|
|
4066
4159
|
}), c({
|
|
4067
4160
|
name: "dbview_config_set_sql",
|
|
4068
4161
|
toolName: "page_dbview_config_set_sql",
|
|
4069
4162
|
aliases: ["dbview_config_write_sql"],
|
|
4070
4163
|
label: "写入查询SQL",
|
|
4071
|
-
description: "把生成的 SQL 写入「视图配置」弹窗第一步的查询 SQL
|
|
4164
|
+
description: "把生成的 SQL 写入「视图配置」弹窗第一步的查询 SQL 输入框(整体覆盖现有内容),可同时写入备注(remark,描述查询细节)。若用户当前不在第一步,会自动跳回第一步再写入;写完自动触发预览并返回预览结果。",
|
|
4072
4165
|
promptGuidelines: [
|
|
4073
4166
|
"sql 必须是单条只读 SELECT 语句(服务端预览会强制校验)",
|
|
4074
4167
|
"可用模板变量 {{org_id}} / {{person_id}}",
|
|
4168
|
+
"生成 SQL 时应同时给出 remark(描述查询细节),一次调用一并写入",
|
|
4075
4169
|
"写入会整体覆盖输入框现有内容;写入后按返回的 preview 结果向用户说明(rows 为 0 或有 error 时如实说明)"
|
|
4076
4170
|
],
|
|
4077
|
-
parameters:
|
|
4171
|
+
parameters: J,
|
|
4078
4172
|
timeoutMs: 6e4,
|
|
4079
|
-
execute:
|
|
4173
|
+
execute: fe
|
|
4174
|
+
}), c({
|
|
4175
|
+
name: "dbview_config_set_remark",
|
|
4176
|
+
toolName: "page_dbview_config_set_remark",
|
|
4177
|
+
label: "改写备注",
|
|
4178
|
+
description: "改写「视图配置」弹窗的备注(整体覆盖现有备注,不影响 SQL 与其它配置)。备注用于描述 SQL 的查询细节(查什么表 / 统计口径 / 过滤与分组)。只需改备注、不动 SQL 时用这个能力。",
|
|
4179
|
+
promptGuidelines: [
|
|
4180
|
+
"remark 必须是完整备注全文(整体覆盖,不是追加)",
|
|
4181
|
+
"需要同时改 SQL 时改用「写入查询SQL」(可 sql + remark 一次写入)",
|
|
4182
|
+
"只想看当前备注内容用「读取当前配置内容」"
|
|
4183
|
+
],
|
|
4184
|
+
parameters: ae,
|
|
4185
|
+
write: !0,
|
|
4186
|
+
execute: pe
|
|
4187
|
+
}), c({
|
|
4188
|
+
name: "dbview_config_set_name",
|
|
4189
|
+
toolName: "page_dbview_config_set_name",
|
|
4190
|
+
label: "修改视图名称",
|
|
4191
|
+
description: "修改「视图配置」弹窗的视图名称(整体覆盖,不影响 SQL / 备注等其它配置)。「生成SQL」流程中若当前名称未填写,会由你生成一个合理的名称后调用本能力写入。",
|
|
4192
|
+
promptGuidelines: [
|
|
4193
|
+
"name 必须是完整名称(整体覆盖);建议简洁中文、能反映查询内容",
|
|
4194
|
+
"写之前先用「读取当前配置内容」确认当前名称是否已填——已填写时不要擅自覆盖,先问用户",
|
|
4195
|
+
"只想看当前名称用「读取当前配置内容」"
|
|
4196
|
+
],
|
|
4197
|
+
parameters: oe,
|
|
4198
|
+
write: !0,
|
|
4199
|
+
execute: me
|
|
4080
4200
|
}), u({
|
|
4081
4201
|
label: "生成SQL",
|
|
4082
4202
|
sendDirect: !1,
|
|
4083
|
-
prompt: "请为当前视图生成查询 SQL
|
|
4203
|
+
prompt: "请为当前视图生成查询 SQL,按以下步骤执行:① 调用页面能力「读取当前配置内容」与「读取当前所选数据源」确认现状(名称是否已填、数据源 id 与数据库类型;未选数据源时会自动选用第一个;若用户指定了库名/类型,先用「列出数据源」查清单再用「选择数据源」切换);② 若视图名称未填写,根据下面的需求生成一个简洁中文名称(能反映查询内容),调用「修改视图名称」写入;③ 按需求起草单条只读 SELECT(可用 {{org_id}} / {{person_id}} 模板变量),★ 起草与调整过程中的每一次试跑都用后端 MCP(db_view 服务)的 preview_sql 工具:传 org_id + 当前数据源 id + SQL,检查返回的行数与列是否符合需求口径,不符合就改 SQL 再试,直到符合预期——生成过程中不要把临时 SQL 写进输入框试错;④ 试跑通过后,生成一段描述查询细节的备注(查什么表 / 统计口径 / 过滤与分组逻辑),调用页面能力「写入查询SQL」一次性写入 sql + remark(写入后会自动预览,供用户最终确认)。需求:\n"
|
|
4084
4204
|
}));
|
|
4085
4205
|
};
|
|
4086
|
-
return
|
|
4087
|
-
|
|
4206
|
+
return te(async () => {
|
|
4207
|
+
ye(), i.record?.form_type && (_.value = i.record.form_type), _.value === "edit" && await q();
|
|
4088
4208
|
}), ee(() => {
|
|
4089
|
-
|
|
4209
|
+
ve();
|
|
4090
4210
|
}), (e, t) => {
|
|
4091
|
-
let n =
|
|
4092
|
-
return
|
|
4211
|
+
let n = R("a-step"), r = R("a-steps"), i = R("a-form"), a = R("a-button"), o = R("a-drawer");
|
|
4212
|
+
return F(), C(o, {
|
|
4093
4213
|
title: e.title,
|
|
4094
4214
|
width: 880,
|
|
4095
4215
|
placement: "left",
|
|
@@ -4101,36 +4221,36 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
4101
4221
|
padding: "0 24px"
|
|
4102
4222
|
},
|
|
4103
4223
|
"destroy-on-close": "",
|
|
4104
|
-
onClose:
|
|
4224
|
+
onClose: V
|
|
4105
4225
|
}, {
|
|
4106
|
-
footer:
|
|
4226
|
+
footer: W(() => [E("div", _n, [
|
|
4107
4227
|
k(a, {
|
|
4108
4228
|
disabled: v.value === 0,
|
|
4109
4229
|
onClick: t[1] ||= (e) => --v.value
|
|
4110
4230
|
}, {
|
|
4111
|
-
default:
|
|
4231
|
+
default: W(() => t[2] ||= [O(" 上一步 ")]),
|
|
4112
4232
|
_: 1
|
|
4113
4233
|
}, 8, ["disabled"]),
|
|
4114
|
-
k(a, { onClick:
|
|
4115
|
-
default:
|
|
4234
|
+
k(a, { onClick: V }, {
|
|
4235
|
+
default: W(() => t[3] ||= [O("取消")]),
|
|
4116
4236
|
_: 1
|
|
4117
4237
|
}),
|
|
4118
4238
|
k(a, {
|
|
4119
4239
|
type: "primary",
|
|
4120
4240
|
loading: h.value,
|
|
4121
|
-
onClick:
|
|
4241
|
+
onClick: U
|
|
4122
4242
|
}, {
|
|
4123
|
-
default:
|
|
4243
|
+
default: W(() => [O(z(v.value < 3 ? "下一步" : "确定"), 1)]),
|
|
4124
4244
|
_: 1
|
|
4125
4245
|
}, 8, ["loading"])
|
|
4126
4246
|
])]),
|
|
4127
|
-
default:
|
|
4247
|
+
default: W(() => [k(r, {
|
|
4128
4248
|
current: v.value,
|
|
4129
4249
|
size: "small",
|
|
4130
4250
|
class: "config-steps",
|
|
4131
4251
|
onChange: N
|
|
4132
4252
|
}, {
|
|
4133
|
-
default:
|
|
4253
|
+
default: W(() => [
|
|
4134
4254
|
k(n, { title: "基础配置" }),
|
|
4135
4255
|
k(n, { title: "展示配置" }),
|
|
4136
4256
|
k(n, { title: "列配置" }),
|
|
@@ -4143,8 +4263,8 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
4143
4263
|
model: A.value,
|
|
4144
4264
|
layout: "vertical"
|
|
4145
4265
|
}, {
|
|
4146
|
-
default:
|
|
4147
|
-
|
|
4266
|
+
default: W(() => [
|
|
4267
|
+
G(E("div", pn, [k(ce, {
|
|
4148
4268
|
ref_key: "basicStepRef",
|
|
4149
4269
|
ref: D,
|
|
4150
4270
|
"sql-error": x.value,
|
|
@@ -4157,9 +4277,9 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
4157
4277
|
"model",
|
|
4158
4278
|
"record",
|
|
4159
4279
|
"form-type"
|
|
4160
|
-
])], 512), [[
|
|
4161
|
-
|
|
4162
|
-
|
|
4280
|
+
])], 512), [[H, v.value === 0]]),
|
|
4281
|
+
G(E("div", mn, [k(_e, { model: A.value }, null, 8, ["model"])], 512), [[H, v.value === 1]]),
|
|
4282
|
+
G(E("div", hn, [k(cn, {
|
|
4163
4283
|
ref_key: "colStepRef",
|
|
4164
4284
|
ref: T,
|
|
4165
4285
|
active: b.value,
|
|
@@ -4172,8 +4292,16 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
4172
4292
|
"model",
|
|
4173
4293
|
"record",
|
|
4174
4294
|
"form-type"
|
|
4175
|
-
])], 512), [[
|
|
4176
|
-
|
|
4295
|
+
])], 512), [[H, b.value]]),
|
|
4296
|
+
G(E("div", gn, [k(ln, {
|
|
4297
|
+
model: A.value,
|
|
4298
|
+
record: e.record,
|
|
4299
|
+
"form-type": _.value
|
|
4300
|
+
}, null, 8, [
|
|
4301
|
+
"model",
|
|
4302
|
+
"record",
|
|
4303
|
+
"form-type"
|
|
4304
|
+
])], 512), [[H, v.value === 3]])
|
|
4177
4305
|
]),
|
|
4178
4306
|
_: 1
|
|
4179
4307
|
}, 8, ["model"])]),
|
|
@@ -4181,6 +4309,6 @@ var X = (e) => e && typeof e == "object" && !Array.isArray(e) && e.data !== void
|
|
|
4181
4309
|
}, 8, ["title", "open"]);
|
|
4182
4310
|
};
|
|
4183
4311
|
}
|
|
4184
|
-
}), [["__scopeId", "data-v-
|
|
4312
|
+
}), [["__scopeId", "data-v-d039acc4"]]);
|
|
4185
4313
|
//#endregion
|
|
4186
|
-
export {
|
|
4314
|
+
export { vn as default };
|