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