@jeecg/online 3.6.2-GA → 3.7.0-beta

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.
Files changed (118) hide show
  1. package/AiModal-fe3988fb.mjs +84 -0
  2. package/AuthButtonConfig-d50a0a65.mjs +134 -0
  3. package/{AuthButtonTree-c2602a7c.mjs → AuthButtonTree-589395ed.mjs} +2 -2
  4. package/AuthDataConfig-7bb0cd85.mjs +237 -0
  5. package/{AuthDataTree-9dc58b20.mjs → AuthDataTree-6e3bb86f.mjs} +1 -1
  6. package/AuthFieldConfig-490fc0ab.mjs +139 -0
  7. package/{AuthFieldTree-d836be59.mjs → AuthFieldTree-b7cd091e.mjs} +1 -1
  8. package/AuthManagerDrawer-5e2ed5ce.mjs +118 -0
  9. package/AuthSetterModal-6f74449c.mjs +273 -0
  10. package/{CgformCopyList-86157923.mjs → CgformCopyList-8077ccc6.mjs} +47 -45
  11. package/{CgformModal-5cf02d51.mjs → CgformModal-36faf29a.mjs} +256 -246
  12. package/{CgreportModal.vue_vue_type_script_setup_true_lang-c2ceb064.mjs → CgreportModal-5a23d089.mjs} +140 -117
  13. package/CheckDictTable-b5cb0e2b.mjs +226 -0
  14. package/{CodeFileListModal-f747daae.mjs → CodeFileListModal-0e26b7e0.mjs} +2 -2
  15. package/{CodeFileViewModal-a9fb2900.mjs → CodeFileViewModal-9d4a5b5f.mjs} +36 -32
  16. package/CodeGeneratorModal-b722d976.mjs +238 -0
  17. package/{CustomButtonList-b9b27a93.mjs → CustomButtonList-37639061.mjs} +118 -100
  18. package/{DBAttributeTable-6bdcb1e8.mjs → DBAttributeTable-95dc66c1.mjs} +110 -89
  19. package/{DbToOnlineModal-3705e91a.mjs → DbToOnlineModal-f49b9530.mjs} +56 -50
  20. package/DetailForm-4aa2570b.mjs +485 -0
  21. package/{EnhanceJavaModal-c13de6e0.mjs → EnhanceJavaModal-98934198.mjs} +3 -3
  22. package/{EnhanceJsHistory-154101f0.mjs → EnhanceJsHistory-9c4acdaf.mjs} +2 -2
  23. package/EnhanceJsModal-247f640d.mjs +532 -0
  24. package/{EnhanceSqlModal-221c22dc.mjs → EnhanceSqlModal-65b74b0f.mjs} +3 -3
  25. package/ExtendConfigModal-00f2fb55.mjs +117 -0
  26. package/FieldExtendJsonModal-cc7fce26.mjs +277 -0
  27. package/{FileSelectModal-de40a706.mjs → FileSelectModal-38660e3c.mjs} +1 -1
  28. package/{ForeignKeyTable-22989042.mjs → ForeignKeyTable-a78cb5ad.mjs} +3 -3
  29. package/{IndexTable-833d34ff.mjs → IndexTable-1b496559.mjs} +10 -10
  30. package/{JModalTip-0413ad6a.mjs → JModalTip-4a83aaed.mjs} +1 -1
  31. package/{JOnlineSearchSelect-9ea89e13.mjs → JOnlineSearchSelect-34a37ec9.mjs} +1 -1
  32. package/{LeftDepart-b0a535c0.mjs → LeftDepart-8ade4bf7.mjs} +1 -1
  33. package/{LeftRole-22c90d6b.mjs → LeftRole-7d8c5acc.mjs} +1 -1
  34. package/{LeftUser-a44d63dd.mjs → LeftUser-b4d1372a.mjs} +3 -3
  35. package/LinkTableConfigModal-a138c85e.mjs +240 -0
  36. package/{LinkTableFieldConfigModal-06693eaa.mjs → LinkTableFieldConfigModal-17b413b0.mjs} +41 -41
  37. package/{LinkTableListPiece-46e8af51.mjs → LinkTableListPiece-2660d709.mjs} +1 -1
  38. package/{ModalFormDemo-d107fa87.mjs → ModalFormDemo-0544737d.mjs} +1 -1
  39. package/OnlCgformErpList-30e416c8.mjs +470 -0
  40. package/OnlCgformErpSubTable-9a876058.mjs +427 -0
  41. package/OnlCgformInnerSubTable-290ace5d.mjs +266 -0
  42. package/OnlCgformInnerTableList-f89b6687.mjs +458 -0
  43. package/OnlCgformTabList-7a2f2c03.mjs +408 -0
  44. package/OnlineAutoList-46c6c8b9.mjs +493 -0
  45. package/OnlineAutoModal-971bef13.mjs +236 -0
  46. package/{OnlineAutoTreeList-ec27d271.mjs → OnlineAutoTreeList-3b92454c.mjs} +206 -204
  47. package/{OnlineCustomModal-3e6792d3.mjs → OnlineCustomModal-594244f3.mjs} +15 -11
  48. package/{OnlineDetailModal-f40e37e1.mjs → OnlineDetailModal-2a271e0b.mjs} +74 -64
  49. package/OnlineForm-018981b2.mjs +924 -0
  50. package/OnlineForm.vue_vue_type_style_index_0_scoped_0f9f2964_lang-4ed993c7.mjs +1 -0
  51. package/OnlineFormDetail-e036cd11.mjs +342 -0
  52. package/OnlineFormUrlAdd-7fb3dcca.mjs +115 -0
  53. package/OnlineFormUrlDetail-b2292137.mjs +119 -0
  54. package/OnlineFormUrlEdit-44080fb3.mjs +113 -0
  55. package/OnlineFormUrlSuccess-af285b02.mjs +59 -0
  56. package/OnlineQueryForm-998c12a4.mjs +444 -0
  57. package/{OnlineSearchFormItem-fe308194.mjs → OnlineSearchFormItem-6feacae6.mjs} +2 -2
  58. package/{OnlineSelectCascade-abc345f9.mjs → OnlineSelectCascade-471fcc76.mjs} +1 -1
  59. package/{OnlineSubFormDetail-02326a8c.mjs → OnlineSubFormDetail-03f8ee5c.mjs} +29 -27
  60. package/OnlineTabAutoModal-7b9bcd0b.mjs +306 -0
  61. package/{OnlineTabDetailModal-d23bd4c9.mjs → OnlineTabDetailModal-88143301.mjs} +22 -20
  62. package/OnlineTabForm-9ad7d29a.mjs +805 -0
  63. package/OnlineTabFormDetail-bbf23caa.mjs +327 -0
  64. package/PageAttributeTable-6c23547b.mjs +446 -0
  65. package/{ProcessOnlineForm-84f4d02d.mjs → ProcessOnlineForm-b42198f5.mjs} +32 -28
  66. package/QueryTable-96b3dbd0.mjs +144 -0
  67. package/SetSwitchOptions-a452fa0f.mjs +62 -0
  68. package/SuperQuery-cbfba908.mjs +975 -0
  69. package/{auth.data-8be5c9e3.mjs → auth.data-22948e87.mjs} +56 -14
  70. package/{cgform.data-cbdd88c3.mjs → cgform.data-475d4984.mjs} +5 -1
  71. package/constant-fa63bd66.mjs +10 -0
  72. package/{enhance.data-efc7e155.mjs → enhance.data-3304d553.mjs} +3 -3
  73. package/index-173949bb.mjs +57 -0
  74. package/{index-0a93652b.mjs → index-581bef24.mjs} +29 -27
  75. package/{index-e1bda35b.mjs → index-d2abb8a0.mjs} +394 -361
  76. package/main.index.js +1 -1
  77. package/package.json +1 -1
  78. package/style.css +1 -1
  79. package/useCgformList-8755a94e.mjs +426 -0
  80. package/useExtendComponent-bb7cca20.mjs +4295 -0
  81. package/useFormUrl-2ee1a82d.mjs +24 -0
  82. package/useListButton-7ddb9a46.mjs +697 -0
  83. package/{useSchemas-0433a403.mjs → useSchemas-47e45edc.mjs} +167 -86
  84. package/{useTableSync-774c3774.mjs → useTableSync-f6089e8a.mjs} +1 -1
  85. package/AuthButtonConfig-f142147a.mjs +0 -125
  86. package/AuthDataConfig-8e5c7b0c.mjs +0 -212
  87. package/AuthFieldConfig-e9a45f94.mjs +0 -139
  88. package/AuthManagerDrawer-5b558c23.mjs +0 -114
  89. package/AuthSetterModal-0cc557cf.mjs +0 -267
  90. package/CgreportModal-2eb9c9e1.mjs +0 -13
  91. package/CheckDictTable-27102064.mjs +0 -211
  92. package/CodeGeneratorModal-3a0e9f0e.mjs +0 -233
  93. package/DetailForm-cdeb54e3.mjs +0 -462
  94. package/EnhanceJsModal-6158804c.mjs +0 -311
  95. package/ExtendConfigModal-0564ef83.mjs +0 -111
  96. package/FieldExtendJsonModal-40d961c1.mjs +0 -219
  97. package/LinkTableConfigModal-5edaa08d.mjs +0 -230
  98. package/OnlCgformErpList-4c51cdb3.mjs +0 -454
  99. package/OnlCgformErpSubTable-d7081b9f.mjs +0 -403
  100. package/OnlCgformInnerSubTable-4c3925bb.mjs +0 -253
  101. package/OnlCgformInnerTableList-1e5014fa.mjs +0 -444
  102. package/OnlCgformTabList-c59c7cc7.mjs +0 -395
  103. package/OnlineAutoList-a7a9de5d.mjs +0 -479
  104. package/OnlineAutoModal-a33f1a63.mjs +0 -207
  105. package/OnlineForm-fb3a2379.mjs +0 -750
  106. package/OnlineFormDetail-52b1c303.mjs +0 -297
  107. package/OnlineQueryForm-7c70734e.mjs +0 -386
  108. package/OnlineTabAutoModal-6d9da8b0.mjs +0 -254
  109. package/OnlineTabForm-29ca07f7.mjs +0 -766
  110. package/OnlineTabFormDetail-aa7e1144.mjs +0 -324
  111. package/PageAttributeTable-d82946c5.mjs +0 -404
  112. package/QueryTable-d4599fca.mjs +0 -115
  113. package/SuperQuery-07162778.mjs +0 -843
  114. package/constant-754f1a9d.mjs +0 -9
  115. package/index-73993b18.mjs +0 -56
  116. package/useCgformList-b135794d.mjs +0 -400
  117. package/useExtendComponent-f4e29152.mjs +0 -3926
  118. package/useListButton-4dd33e7a.mjs +0 -676
@@ -0,0 +1,975 @@
1
+ var ke = Object.defineProperty, we = Object.defineProperties;
2
+ var De = Object.getOwnPropertyDescriptors;
3
+ var me = Object.getOwnPropertySymbols;
4
+ var be = Object.prototype.hasOwnProperty, Te = Object.prototype.propertyIsEnumerable;
5
+ var ve = (p, d, E) => d in p ? ke(p, d, { enumerable: !0, configurable: !0, writable: !0, value: E }) : p[d] = E, $ = (p, d) => {
6
+ for (var E in d || (d = {}))
7
+ be.call(d, E) && ve(p, E, d[E]);
8
+ if (me)
9
+ for (var E of me(d))
10
+ Te.call(d, E) && ve(p, E, d[E]);
11
+ return p;
12
+ }, ee = (p, d) => we(p, De(d));
13
+ import { ref as O, reactive as _e, watch as ae, toRaw as ye, computed as Oe, resolveComponent as m, openBlock as x, createElementBlock as he, Fragment as ge, createElementVNode as w, createBlock as V, withCtx as i, createVNode as a, createTextVNode as S, Teleport as xe, createCommentVNode as Be, normalizeClass as fe, withDirectives as Ce, vShow as Se, normalizeStyle as Me, renderList as Pe, toDisplayString as Ie, pushScopeId as Ae, popScopeId as Ve } from "vue";
14
+ import { useModalInner as Re, BasicModal as Ne, useModal as Qe } from "/@/components/Modal";
15
+ import { randomString as re } from "/@/utils/common/compUtils";
16
+ import { useMessage as Ee } from "/@/hooks/web/useMessage";
17
+ import { Modal as je, Divider as qe, Empty as Le } from "ant-design-vue";
18
+ import { createLocalStorage as Ye } from "/@/utils/cache";
19
+ import { useRoute as Je } from "vue-router";
20
+ import { i as He, F as Ue, j as pe } from "./useExtendComponent-bb7cca20.mjs";
21
+ import { cloneDeep as ue } from "lodash-es";
22
+ import { _ as Ke } from "./SuperQueryValComponent.vue_vue_type_script_lang-e9196096.mjs";
23
+ import { MinusCircleOutlined as ze, PlusOutlined as We, FileTextOutlined as Ge, CloseCircleOutlined as Xe, AppstoreTwoTone as Ze } from "@ant-design/icons-vue";
24
+ import { useDesign as $e } from "/@/hooks/web/useDesign";
25
+ import { _ as et } from "./index-173949bb.mjs";
26
+ import "/@/components/Form/src/componentMap";
27
+ import "/@/utils/propTypes";
28
+ import "/@/components/Form/index";
29
+ import "/@/utils/http/axios";
30
+ import "./constant-fa63bd66.mjs";
31
+ import "/@/components/Form/src/jeecg/components/JUpload";
32
+ import "/@/utils/is";
33
+ import "/@/views/system/user/user.api";
34
+ import "/@/store/modules/user";
35
+ import "/@/utils";
36
+ import "/@/utils/desform/customExpression";
37
+ import "/@/store/modules/permission";
38
+ import "/@/utils/dict/JDictSelectUtil";
39
+ import "/@/components/Table";
40
+ import "/@/hooks/system/useListPage";
41
+ import "/@/components/Form/src/utils/Area";
42
+ import "/@/components/Preview/index";
43
+ import "./LinkTableListPiece-2660d709.mjs";
44
+ import "/@/utils/auth";
45
+ import "/@/api/common/api";
46
+ import "/@/hooks/web/useAppInject";
47
+ import "/@/assets/images/placeholderImage.png";
48
+ import "./OnlineSelectCascade-471fcc76.mjs";
49
+ import "/@/components/Loading";
50
+ import "./JModalTip-4a83aaed.mjs";
51
+ import "@vueuse/core";
52
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
53
+ const tt = {
54
+ password: "text",
55
+ file: "text",
56
+ image: "text",
57
+ textarea: "text",
58
+ umeditor: "text",
59
+ markdown: "text",
60
+ checkbox: "list_multi",
61
+ radio: "list"
62
+ }, lt = "JSuperQuerySaved_";
63
+ function ot(p) {
64
+ const { linkTableCard2Select: d } = He(), { createMessage: E } = Ee(), o = O(), k = _e({
65
+ values: []
66
+ }), I = O("and"), B = O(!1), [te, { setModalProps: D }] = Re(() => {
67
+ D({ confirmLoading: !1 });
68
+ }), J = Object.assign({}, { link_down: "text" }, tt);
69
+ function R() {
70
+ }
71
+ function H() {
72
+ }
73
+ function U(t, l, r) {
74
+ r.val = l;
75
+ }
76
+ const g = O({}), A = O([]), M = (t) => {
77
+ const { properties: l = {} } = t;
78
+ Object.entries(l).forEach(([r, n]) => {
79
+ n.view === "table" && M(n), ["image", "password", "file"].includes(n.originView || n.view) && delete l[r];
80
+ });
81
+ };
82
+ function K(t) {
83
+ M(t);
84
+ let { allFields: l, treeData: r } = ce(t);
85
+ g.value = l, A.value = r;
86
+ }
87
+ function z(t) {
88
+ let l = {
89
+ field: void 0,
90
+ rule: "eq",
91
+ val: "",
92
+ key: re(16)
93
+ };
94
+ t === !1 ? (k.values = [], k.values.push(l)) : t === !0 ? k.values.length == 0 && k.values.push(l) : k.values.splice(++t, 0, l);
95
+ }
96
+ function le(t) {
97
+ let l = ye(k.values), r = -1;
98
+ for (let n = 0; n < l.length; n++)
99
+ if (t.key == l[n].key) {
100
+ r = n;
101
+ break;
102
+ }
103
+ r != -1 && k.values.splice(r, 1);
104
+ }
105
+ const W = {
106
+ field: "val",
107
+ label: "测试",
108
+ component: "Input"
109
+ };
110
+ function j(t, l) {
111
+ var s, v, y;
112
+ let n = g.value[t.field];
113
+ if (!n)
114
+ return W;
115
+ J[n.view] && (n.view = J[n.view]);
116
+ let _ = Ue.createFormSchema(t.field, n);
117
+ _.noChange(), _.asSearchForm(), _.updateField(t.field + l);
118
+ const f = (c) => {
119
+ t.val = c[t.field];
120
+ };
121
+ _.setFunctionForFieldValue(f);
122
+ let e = _.getFormItemSchema();
123
+ if (["empty", "not_empty"].includes(t.rule) && (e.componentProps = ee($({}, e.componentProps), { disabled: !0 })), d(e), e.component === "LinkTableSelect") {
124
+ let c = (s = e.componentProps) != null ? s : {};
125
+ e.componentProps = ee($({}, c), { editBtnShow: !1 });
126
+ }
127
+ if (e && e.component === "InputNumber" && (t.curLineAlign = "start"), (e == null ? void 0 : e.component) === "JTreeSelect") {
128
+ let c = e.componentProps;
129
+ c ? c.getPopupContainer = () => document.body : e.componentProps = { getPopupContainer: () => document.body };
130
+ }
131
+ if ((e == null ? void 0 : e.component) === "JSwitch") {
132
+ const c = (v = e.componentProps) != null ? v : {};
133
+ e.componentProps = ee($({}, c), { query: !0 });
134
+ }
135
+ if ((e == null ? void 0 : e.component) === "JSelectUser") {
136
+ const c = (y = e.componentProps) != null ? y : {};
137
+ e.componentProps = ee($({}, c), { showButton: !1 });
138
+ }
139
+ return e;
140
+ }
141
+ const N = O(""), q = Ye(), b = _e({
142
+ visible: !1,
143
+ title: "",
144
+ content: "",
145
+ saveCode: ""
146
+ }), oe = O(!1), G = Je();
147
+ p.isCustomSave ? ae(p.saveSearchData, () => {
148
+ F.value = p.saveSearchData;
149
+ }) : ae(() => G.fullPath, (t) => {
150
+ L();
151
+ });
152
+ const F = O([]);
153
+ ae(() => F.value, (t) => {
154
+ let l = [];
155
+ t && t.length > 0 && t.map((r) => {
156
+ let n = re(16);
157
+ l.push({
158
+ title: r.title,
159
+ slots: { icon: "custom" },
160
+ value: n
161
+ });
162
+ }), N.value = l;
163
+ }, { immediate: !0, deep: !0 });
164
+ function L() {
165
+ if (p.isCustomSave)
166
+ F.value = ue(p.saveSearchData);
167
+ else {
168
+ let t = lt + G.fullPath;
169
+ b.saveCode = t;
170
+ let l = q.get(t);
171
+ l && l instanceof Array && (F.value = l);
172
+ }
173
+ }
174
+ L();
175
+ function ne() {
176
+ let t = u();
177
+ if (!t) {
178
+ E.warning("空条件不能保存");
179
+ return;
180
+ }
181
+ let l = JSON.stringify(t);
182
+ Q(l);
183
+ }
184
+ function Q(t) {
185
+ b.visible = !0, b.title = "", b.content = t;
186
+ }
187
+ function Y() {
188
+ let { title: t, content: l, saveCode: r } = b, n = X(t);
189
+ const _ = (f) => {
190
+ const e = ue(F.value);
191
+ B.value = !0, f ? e.splice(n, 1, {
192
+ content: l,
193
+ title: t,
194
+ type: I.value
195
+ }) : e.push({
196
+ content: l,
197
+ title: t,
198
+ type: I.value
199
+ });
200
+ const s = () => {
201
+ b.visible = !1, E.success("保存成功"), F.value = e, B.value = !1;
202
+ };
203
+ p.isCustomSave ? p.save(e, 0).then(() => {
204
+ s();
205
+ }).catch((v) => {
206
+ B.value = !1;
207
+ }) : (q.set(r, e, 2592e3), s());
208
+ };
209
+ n >= 0 ? je.confirm({
210
+ title: "提示",
211
+ content: `${t} 已存在,是否覆盖?`,
212
+ okText: "确认",
213
+ cancelText: "取消",
214
+ onOk: () => {
215
+ _(1);
216
+ }
217
+ }) : _(0);
218
+ }
219
+ function X(t) {
220
+ let l = F.value, r = -1;
221
+ for (let n = 0; n < l.length; n++)
222
+ if (l[n].title == t) {
223
+ r = n;
224
+ break;
225
+ }
226
+ return r;
227
+ }
228
+ function u(t = !1) {
229
+ var _;
230
+ let l = k.values;
231
+ if (!l || l.length == 0)
232
+ return !1;
233
+ let r = [], n = g.value;
234
+ for (let f of l) {
235
+ let e = ["empty", "not_empty"].includes(f.rule);
236
+ if (f.field && (e || f.val || f.val === 0) && f.rule) {
237
+ let s = n[f.field], v = (_ = s == null ? void 0 : s.formatValue) != null ? _ : (C) => C, y = ye(f.val);
238
+ y instanceof Array ? y = y.map((C) => v(C)).join(",") : y = v(y);
239
+ let h = {
240
+ field: P(f),
241
+ rule: f.rule,
242
+ val: y,
243
+ fileType: f.fileType
244
+ };
245
+ if (t === !0) {
246
+ let C = n[f.field];
247
+ C && (h.type = C.view, h.dbType = C.type);
248
+ }
249
+ r.push(h);
250
+ }
251
+ }
252
+ return r.length == 0 ? !1 : r;
253
+ }
254
+ function P(t) {
255
+ let l = t.field;
256
+ return l.indexOf("@") > 0 && (l = l.replace("@", ",")), l;
257
+ }
258
+ function T(t, { node: l }) {
259
+ let r = l.dataRef.title, n = F.value.filter((_) => _.title == r);
260
+ if (n && n.length > 0) {
261
+ let { content: _, type: f } = n[0], e = JSON.parse(_), s = [];
262
+ for (let v of e)
263
+ v.field = v.field.replace(",", "@"), s.push(Object.assign({}, { key: re(16) }, v));
264
+ k.values = s, I.value = f;
265
+ }
266
+ }
267
+ function Z(t) {
268
+ let l = X(t);
269
+ if (l >= 0)
270
+ if (p.isCustomSave) {
271
+ const r = ue(F.value);
272
+ r.splice(l, 1), p.save(r, 1).then(() => {
273
+ F.value = r;
274
+ }).catch((n) => {
275
+ });
276
+ } else
277
+ F.value.splice(l, 1), q.set(b.saveCode, F.value);
278
+ }
279
+ function ce(t) {
280
+ let l = {}, r = 1, n = [];
281
+ return t.properties && (t = t.properties), Object.keys(t).map((_) => {
282
+ let f = t[_];
283
+ if (f.view == "table") {
284
+ let e = f.properties || f.fields, s = r * 100, v = {
285
+ title: f.title,
286
+ value: _,
287
+ disabled: !0,
288
+ children: [],
289
+ order: s,
290
+ // update-begin--author:liaozhiyang---date:20240306---for:【TV360X-461】字段类型是string,则默认模糊查询
291
+ fieldType: f.type
292
+ // update-end--author:liaozhiyang---date:20240306---for:【TV360X-461】字段类型是string,则默认模糊查询
293
+ };
294
+ Object.keys(e).map((y) => {
295
+ let c = e[y];
296
+ c.order = s + c.order;
297
+ let h = _ + "@" + y;
298
+ l[h] = c, v.children.push({
299
+ title: c.title,
300
+ value: h,
301
+ isLeaf: !0,
302
+ order: c.order,
303
+ // update-begin--author:liaozhiyang---date:20240306---for:【TV360X-461】字段类型是string,则默认模糊查询
304
+ fieldType: c.type,
305
+ view: c.view,
306
+ originView: c.view
307
+ // update-end--author:liaozhiyang---date:20240306---for:【TV360X-461】字段类型是string,则默认模糊查询
308
+ });
309
+ }), ie(v), n.push(v), r++;
310
+ } else {
311
+ let e = _;
312
+ l[e] = f, n.push({
313
+ title: f.title,
314
+ value: e,
315
+ isLeaf: !0,
316
+ order: f.order,
317
+ // update-begin--author:liaozhiyang---date:20240306---for:【TV360X-461】字段类型是string,则默认模糊查询
318
+ fieldType: f.type,
319
+ view: f.view,
320
+ originView: f.view
321
+ // update-end--author:liaozhiyang---date:20240306---for:【TV360X-461】字段类型是string,则默认模糊查询
322
+ });
323
+ }
324
+ }), ie(n), { allFields: l, treeData: n };
325
+ }
326
+ function ie(t) {
327
+ (t.children || t).sort(function(r, n) {
328
+ return r.order - n.order;
329
+ });
330
+ }
331
+ function de(t) {
332
+ const { params: l, matchType: r } = t;
333
+ if (l) {
334
+ let n = [];
335
+ for (let _ of l)
336
+ n.push(Object.assign({}, { key: re(16) }, _));
337
+ k.values = n, r.value = r;
338
+ }
339
+ }
340
+ return {
341
+ formRef: o,
342
+ init: K,
343
+ dynamicRowValues: k,
344
+ matchType: I,
345
+ registerModal: te,
346
+ handleSubmit: R,
347
+ handleCancel: H,
348
+ handleSave: ne,
349
+ doSaveQueryInfo: Y,
350
+ saveInfo: b,
351
+ saveTreeData: N,
352
+ handleRemoveSaveInfo: Z,
353
+ handleTreeSelect: T,
354
+ fieldTreeData: A,
355
+ addOne: z,
356
+ removeOne: le,
357
+ setFormModel: U,
358
+ getSchema: j,
359
+ loading: oe,
360
+ getQueryInfo: u,
361
+ initDefaultValues: de,
362
+ saveModalLoading: B,
363
+ fieldProperties: g
364
+ };
365
+ }
366
+ const nt = {
367
+ name: "OnlineSuperQuery",
368
+ props: {
369
+ config: {
370
+ type: Object,
371
+ default: []
372
+ },
373
+ status: {
374
+ type: Boolean,
375
+ default: !1
376
+ },
377
+ online: {
378
+ type: Boolean,
379
+ default: !1
380
+ },
381
+ // update-begin--author:liaozhiyang---date:20240514---for:【issues/6205】高级查询组件增加保存条件自定义存储方式
382
+ isCustomSave: {
383
+ type: Boolean,
384
+ default: !1
385
+ },
386
+ saveSearchData: {
387
+ type: Array,
388
+ default: () => []
389
+ },
390
+ save: {
391
+ type: Function
392
+ }
393
+ // update-end--author:liaozhiyang---date:20240514---for:【issues/6205】高级查询组件增加保存条件自定义存储方式
394
+ },
395
+ components: {
396
+ BasicModal: Ne,
397
+ MinusCircleOutlined: ze,
398
+ PlusOutlined: We,
399
+ OnlineSuperQueryValComponent: Ke,
400
+ FileTextOutlined: Ge,
401
+ CloseCircleOutlined: Xe,
402
+ AppstoreTwoTone: Ze,
403
+ Divider: qe
404
+ },
405
+ emits: ["search"],
406
+ setup(p, { emit: d }) {
407
+ const [E, o] = Qe(), { createMessage: k } = Ee(), I = O({}), B = O(180), { prefixCls: te } = $e("super-query"), D = `${te}-tree-popup`, J = O(!0);
408
+ let R = null;
409
+ function H() {
410
+ o.closeModal();
411
+ }
412
+ function U() {
413
+ if (p.online === !0) {
414
+ let e = Z(!0);
415
+ e && e.length > 0 ? (g(e), d("search", e, N.value), H(), R = e) : k.warning("空条件无法查询!");
416
+ } else {
417
+ let e = Z(!0);
418
+ if (e && e.length > 0) {
419
+ let s = A(e);
420
+ d("search", s);
421
+ } else
422
+ k.warning("空条件无法查询!");
423
+ }
424
+ }
425
+ const g = (e) => {
426
+ e.forEach((s) => {
427
+ const v = s.val;
428
+ if (s.type === "date" && typeof v == "string" && v != "") {
429
+ const y = de.value[s.field];
430
+ if (y) {
431
+ let c = y.fieldExtendJson;
432
+ if (c && (c = JSON.parse(c), c.picker && c.picker !== "default")) {
433
+ const h = c.picker;
434
+ h === "year" ? s.val = pe(v).set("month", 0).set("date", 1).format("YYYY-MM-DD") : h === "month" ? s.val = pe(v).set("date", 1).format("YYYY-MM-DD") : h === "week" && (s.val = pe(v).startOf("week").format("YYYY-MM-DD"));
435
+ }
436
+ }
437
+ }
438
+ });
439
+ };
440
+ function A(e) {
441
+ let s = [];
442
+ for (let y of e) {
443
+ let c = y.field, h = y.val;
444
+ h instanceof Array && (h = h.join(",")), s.push(ee($({}, y), {
445
+ field: c,
446
+ val: h
447
+ }));
448
+ }
449
+ return s.length > 0 ? t.value = !0 : t.value = !1, {
450
+ superQueryMatchType: N.value,
451
+ superQueryParams: encodeURI(JSON.stringify(s))
452
+ };
453
+ }
454
+ function M() {
455
+ let e = A([]);
456
+ d("search", e);
457
+ }
458
+ function K() {
459
+ j.values = [], Y(!1);
460
+ let e = A([]);
461
+ R = null, d("search", e);
462
+ }
463
+ const z = (e) => {
464
+ if (e) {
465
+ const s = document.documentElement.clientHeight - 165;
466
+ I.value = { maxHeight: `${s}px` }, B.value = s * 0.62;
467
+ } else
468
+ I.value = {}, B.value = 180;
469
+ }, {
470
+ formRef: le,
471
+ init: W,
472
+ dynamicRowValues: j,
473
+ matchType: N,
474
+ registerModal: q,
475
+ handleSave: b,
476
+ doSaveQueryInfo: oe,
477
+ saveInfo: G,
478
+ saveTreeData: F,
479
+ handleTreeSelect: L,
480
+ handleRemoveSaveInfo: ne,
481
+ fieldTreeData: Q,
482
+ addOne: Y,
483
+ removeOne: X,
484
+ setFormModel: u,
485
+ getSchema: P,
486
+ loading: T,
487
+ getQueryInfo: Z,
488
+ initDefaultValues: ce,
489
+ saveModalLoading: ie,
490
+ fieldProperties: de
491
+ } = ot(p), t = O(!1);
492
+ ae(() => p.status, (e) => {
493
+ t.value = e;
494
+ }, { immediate: !0 });
495
+ function l() {
496
+ t.value && R && (j.values = ue(R)), o.openModal(), Y(!0);
497
+ }
498
+ function r() {
499
+ return document.getElementsByClassName("jee-super-query-form")[0];
500
+ }
501
+ function n(e) {
502
+ }
503
+ function _(e) {
504
+ var v, y;
505
+ e.val = "";
506
+ const s = (c, h) => {
507
+ const C = c.find((Fe) => Fe.value === h);
508
+ (C == null ? void 0 : C.fieldType) === "string" && ["text"].includes((C == null ? void 0 : C.originView) || (C == null ? void 0 : C.view)) ? e.rule = "like" : e.rule = "eq";
509
+ };
510
+ if (((v = e.field) == null ? void 0 : v.indexOf("@")) == -1)
511
+ s(Q.value, e.field);
512
+ else {
513
+ const c = e.field.split("@")[0], h = Q.value.find((C) => C.value === c);
514
+ (y = h == null ? void 0 : h.children) != null && y.length && s(h.children, e.field);
515
+ }
516
+ }
517
+ ae(() => p.config, (e) => {
518
+ e && W(e);
519
+ }, { immediate: !0 });
520
+ const f = Oe(() => Q.value.find((s) => s.children) ? `${D} containTable` : `${D} noTable`);
521
+ return {
522
+ formRef: le,
523
+ registerFormModal: E,
524
+ init: W,
525
+ handleChangeField: _,
526
+ dynamicRowValues: j,
527
+ matchType: N,
528
+ historyCollapsed: J,
529
+ registerModal: q,
530
+ handleSubmit: U,
531
+ handleCancel: H,
532
+ handleSave: b,
533
+ handleReset: K,
534
+ doSaveQueryInfo: oe,
535
+ saveInfo: G,
536
+ saveTreeData: F,
537
+ handleTreeSelect: L,
538
+ handleRemoveSaveInfo: ne,
539
+ fieldTreeData: Q,
540
+ addOne: Y,
541
+ removeOne: X,
542
+ setFormModel: u,
543
+ getSchema: P,
544
+ loading: T,
545
+ onFinish: n,
546
+ getPopupContainer: r,
547
+ superQueryFlag: t,
548
+ handleOpen: l,
549
+ initDefaultValues: ce,
550
+ simpleImage: Le.PRESENTED_IMAGE_SIMPLE,
551
+ saveModalLoading: ie,
552
+ queryFormStyle: I,
553
+ handleFullScreen: z,
554
+ fieldTreeSelectHeight: B,
555
+ getTreePopupClass: f,
556
+ handleStop: M
557
+ };
558
+ }
559
+ };
560
+ const se = (p) => (Ae("data-v-79039fe8"), p = p(), Ve(), p), at = { class: "j-super-query-button" }, it = /* @__PURE__ */ se(() => /* @__PURE__ */ w("span", null, "执行查询中...", -1)), rt = /* @__PURE__ */ se(() => /* @__PURE__ */ w("span", null, "高级查询", -1)), ut = { style: { float: "left" } }, st = { slot: "description" }, ct = /* @__PURE__ */ se(() => /* @__PURE__ */ w("span", null, "没有任何查询条件", -1)), dt = /* @__PURE__ */ se(() => /* @__PURE__ */ w("div", null, "保存的查询", -1)), ft = ["title"], pt = { class: "icon-cancle" }, mt = { style: { height: "80px", "line-height": "75px", width: "100%", "text-align": "center" } };
561
+ function vt(p, d, E, o, k, I) {
562
+ const B = m("divider"), te = m("AppstoreTwoTone"), D = m("a-button"), J = m("a-button-group"), R = m("a-tooltip"), H = m("a-divider"), U = m("a-empty"), g = m("a-select-option"), A = m("a-select"), M = m("a-form-item"), K = m("a-col"), z = m("a-row"), le = m("a-tree-select"), W = m("online-super-query-val-component"), j = m("PlusOutlined"), N = m("MinusCircleOutlined"), q = m("a-space"), b = m("a-form"), oe = m("close-circle-outlined"), G = m("file-text-outlined"), F = m("a-tree"), L = m("Icon"), ne = m("a-card"), Q = m("BasicModal"), Y = m("a-input"), X = m("a-modal");
563
+ return x(), he(ge, null, [
564
+ w("div", at, [
565
+ o.superQueryFlag ? (x(), V(R, {
566
+ key: 0,
567
+ mouseLeaveDelay: 0.2
568
+ }, {
569
+ title: i(() => [
570
+ it,
571
+ a(B, {
572
+ type: "vertical",
573
+ style: { "background-color": "#fff" }
574
+ }),
575
+ w("a", {
576
+ onClick: d[0] || (d[0] = (...u) => o.handleStop && o.handleStop(...u))
577
+ }, "取消查询")
578
+ ]),
579
+ default: i(() => [
580
+ a(J, null, {
581
+ default: i(() => [
582
+ a(D, {
583
+ type: "primary",
584
+ onClick: o.handleOpen
585
+ }, {
586
+ default: i(() => [
587
+ a(te, { spin: !0 }),
588
+ rt
589
+ ]),
590
+ _: 1
591
+ }, 8, ["onClick"])
592
+ ]),
593
+ _: 1
594
+ })
595
+ ]),
596
+ _: 1
597
+ })) : (x(), V(D, {
598
+ key: 1,
599
+ type: "primary",
600
+ preIcon: "ant-design:filter-outlined",
601
+ onClick: o.handleOpen
602
+ }, {
603
+ default: i(() => [
604
+ S(" 高级查询 ")
605
+ ]),
606
+ _: 1
607
+ }, 8, ["onClick"]))
608
+ ]),
609
+ (x(), V(xe, { to: "body" }, [
610
+ a(Q, {
611
+ title: "高级查询构造器",
612
+ canFullscreen: !0,
613
+ width: 850,
614
+ onRegister: o.registerFormModal,
615
+ onOk: o.handleSubmit,
616
+ onFullScreen: o.handleFullScreen
617
+ }, {
618
+ footer: i(() => [
619
+ w("div", ut, [
620
+ a(D, {
621
+ loading: o.loading,
622
+ onClick: o.handleReset
623
+ }, {
624
+ default: i(() => [
625
+ S("清空")
626
+ ]),
627
+ _: 1
628
+ }, 8, ["loading", "onClick"]),
629
+ a(D, {
630
+ loading: o.loading,
631
+ onClick: o.handleSave
632
+ }, {
633
+ default: i(() => [
634
+ S("保存查询")
635
+ ]),
636
+ _: 1
637
+ }, 8, ["loading", "onClick"])
638
+ ]),
639
+ a(D, {
640
+ key: "submit",
641
+ type: "primary",
642
+ onClick: o.handleSubmit
643
+ }, {
644
+ default: i(() => [
645
+ S("执行查询")
646
+ ]),
647
+ _: 1
648
+ }, 8, ["onClick"]),
649
+ a(D, {
650
+ key: "back",
651
+ onClick: o.handleCancel
652
+ }, {
653
+ default: i(() => [
654
+ S("关闭")
655
+ ]),
656
+ _: 1
657
+ }, 8, ["onClick"])
658
+ ]),
659
+ default: i(() => [
660
+ o.dynamicRowValues.values.length == 0 ? (x(), V(U, { key: 0 }, {
661
+ default: i(() => [
662
+ w("div", st, [
663
+ ct,
664
+ a(H, { type: "vertical" }),
665
+ w("a", {
666
+ onClick: d[1] || (d[1] = (u) => o.addOne(-1))
667
+ }, "点击新增")
668
+ ])
669
+ ]),
670
+ _: 1
671
+ })) : Be("", !0),
672
+ a(z, {
673
+ class: fe("j-super-query-modal-content")
674
+ }, {
675
+ default: i(() => [
676
+ a(K, {
677
+ sm: 24,
678
+ md: 24
679
+ }, {
680
+ default: i(() => [
681
+ Ce(a(z, null, {
682
+ default: i(() => [
683
+ a(K, {
684
+ md: 12,
685
+ xs: 24
686
+ }, {
687
+ default: i(() => [
688
+ a(M, {
689
+ label: "匹配模式",
690
+ labelCol: { md: 6, xs: 24 },
691
+ wrapperCol: { md: 18, xs: 24 },
692
+ style: { width: "100%" }
693
+ }, {
694
+ default: i(() => [
695
+ a(A, {
696
+ value: o.matchType,
697
+ "onUpdate:value": d[2] || (d[2] = (u) => o.matchType = u),
698
+ getPopupContainer: (u) => u == null ? void 0 : u.parentNode,
699
+ style: { width: "100%" }
700
+ }, {
701
+ default: i(() => [
702
+ a(g, { value: "and" }, {
703
+ default: i(() => [
704
+ S("AND(所有条件匹配)")
705
+ ]),
706
+ _: 1
707
+ }),
708
+ a(g, { value: "or" }, {
709
+ default: i(() => [
710
+ S("OR(任意一个匹配)")
711
+ ]),
712
+ _: 1
713
+ })
714
+ ]),
715
+ _: 1
716
+ }, 8, ["value", "getPopupContainer"])
717
+ ]),
718
+ _: 1
719
+ })
720
+ ]),
721
+ _: 1
722
+ })
723
+ ]),
724
+ _: 1
725
+ }, 512), [
726
+ [Se, o.dynamicRowValues.values.length > 0]
727
+ ]),
728
+ Ce(a(b, {
729
+ ref: "formRef",
730
+ class: fe("jee-super-query-form"),
731
+ model: o.dynamicRowValues,
732
+ onFinish: o.onFinish,
733
+ style: Me(o.queryFormStyle)
734
+ }, {
735
+ default: i(() => [
736
+ (x(!0), he(ge, null, Pe(o.dynamicRowValues.values, (u, P) => (x(), V(q, {
737
+ key: u.key,
738
+ style: { display: "flex", "margin-bottom": "8px" },
739
+ align: u.curLineAlign ? u.align : "baseline"
740
+ }, {
741
+ default: i(() => [
742
+ a(M, {
743
+ class: "field-clos",
744
+ name: ["values", P, "field"]
745
+ }, {
746
+ default: i(() => [
747
+ a(le, {
748
+ popupClassName: o.getTreePopupClass,
749
+ style: { width: "100%" },
750
+ placeholder: "请选择字段",
751
+ value: u.field,
752
+ "onUpdate:value": (T) => u.field = T,
753
+ "show-search": "",
754
+ "tree-node-filter-prop": "title",
755
+ "allow-clear": "",
756
+ "tree-default-expand-all": "",
757
+ "dropdown-style": { maxHeight: `${o.fieldTreeSelectHeight}px`, overflow: "auto" },
758
+ listHeight: o.fieldTreeSelectHeight - 20,
759
+ onChange: (T) => o.handleChangeField(u),
760
+ "tree-data": o.fieldTreeData
761
+ }, null, 8, ["popupClassName", "value", "onUpdate:value", "dropdown-style", "listHeight", "onChange", "tree-data"])
762
+ ]),
763
+ _: 2
764
+ }, 1032, ["name"]),
765
+ a(M, {
766
+ class: "rule-clos",
767
+ name: ["values", P, "rule"]
768
+ }, {
769
+ default: i(() => [
770
+ a(A, {
771
+ style: { width: "100%" },
772
+ placeholder: "请选择匹配规则",
773
+ value: u.rule,
774
+ "onUpdate:value": (T) => u.rule = T
775
+ }, {
776
+ default: i(() => [
777
+ a(g, { value: "eq" }, {
778
+ default: i(() => [
779
+ S("等于")
780
+ ]),
781
+ _: 1
782
+ }),
783
+ a(g, { value: "like" }, {
784
+ default: i(() => [
785
+ S("模糊")
786
+ ]),
787
+ _: 1
788
+ }),
789
+ a(g, { value: "right_like" }, {
790
+ default: i(() => [
791
+ S("以..开始")
792
+ ]),
793
+ _: 1
794
+ }),
795
+ a(g, { value: "left_like" }, {
796
+ default: i(() => [
797
+ S("以..结尾")
798
+ ]),
799
+ _: 1
800
+ }),
801
+ a(g, { value: "in" }, {
802
+ default: i(() => [
803
+ S("在...中")
804
+ ]),
805
+ _: 1
806
+ }),
807
+ a(g, { value: "ne" }, {
808
+ default: i(() => [
809
+ S("不等于")
810
+ ]),
811
+ _: 1
812
+ }),
813
+ a(g, { value: "gt" }, {
814
+ default: i(() => [
815
+ S("大于")
816
+ ]),
817
+ _: 1
818
+ }),
819
+ a(g, { value: "ge" }, {
820
+ default: i(() => [
821
+ S("大于等于")
822
+ ]),
823
+ _: 1
824
+ }),
825
+ a(g, { value: "lt" }, {
826
+ default: i(() => [
827
+ S("小于")
828
+ ]),
829
+ _: 1
830
+ }),
831
+ a(g, { value: "le" }, {
832
+ default: i(() => [
833
+ S("小于等于")
834
+ ]),
835
+ _: 1
836
+ })
837
+ ]),
838
+ _: 2
839
+ }, 1032, ["value", "onUpdate:value"])
840
+ ]),
841
+ _: 2
842
+ }, 1032, ["name"]),
843
+ a(M, {
844
+ class: "component-clos",
845
+ name: ["values", P, "val"]
846
+ }, {
847
+ default: i(() => [
848
+ a(W, {
849
+ style: { width: "100%" },
850
+ schema: o.getSchema(u, P),
851
+ formModel: u,
852
+ setFormModel: (T, Z) => {
853
+ o.setFormModel(T, Z, u);
854
+ },
855
+ onSubmit: o.handleSubmit
856
+ }, null, 8, ["schema", "formModel", "setFormModel", "onSubmit"])
857
+ ]),
858
+ _: 2
859
+ }, 1032, ["name"]),
860
+ a(M, null, {
861
+ default: i(() => [
862
+ a(D, {
863
+ onClick: (T) => o.addOne(P),
864
+ style: { "margin-right": "6px" }
865
+ }, {
866
+ default: i(() => [
867
+ a(j)
868
+ ]),
869
+ _: 2
870
+ }, 1032, ["onClick"]),
871
+ a(D, {
872
+ onClick: (T) => o.removeOne(u)
873
+ }, {
874
+ default: i(() => [
875
+ a(N)
876
+ ]),
877
+ _: 2
878
+ }, 1032, ["onClick"])
879
+ ]),
880
+ _: 2
881
+ }, 1024)
882
+ ]),
883
+ _: 2
884
+ }, 1032, ["align"]))), 128))
885
+ ]),
886
+ _: 1
887
+ }, 8, ["model", "onFinish", "style"]), [
888
+ [Se, o.dynamicRowValues.values.length > 0]
889
+ ])
890
+ ]),
891
+ _: 1
892
+ })
893
+ ]),
894
+ _: 1
895
+ }),
896
+ a(ne, {
897
+ class: fe(["j-super-query-history-card", { collapsed: o.historyCollapsed }]),
898
+ bordered: !1
899
+ }, {
900
+ title: i(() => [
901
+ dt
902
+ ]),
903
+ default: i(() => [
904
+ o.saveTreeData.length === 0 ? (x(), V(U, {
905
+ key: 0,
906
+ class: "j-super-query-history-empty",
907
+ image: o.simpleImage,
908
+ description: "没有保存的查询"
909
+ }, null, 8, ["image"])) : (x(), V(F, {
910
+ key: 1,
911
+ class: "j-super-query-history-tree",
912
+ treeData: o.saveTreeData,
913
+ selectedKeys: [],
914
+ "show-icon": !0,
915
+ onSelect: o.handleTreeSelect
916
+ }, {
917
+ title: i(({ title: u }) => [
918
+ w("div", null, [
919
+ w("span", { title: u }, Ie(u.length > 10 ? u.substring(0, 10) + "..." : u), 9, ft),
920
+ w("span", pt, [
921
+ a(oe, {
922
+ onClick: (P) => o.handleRemoveSaveInfo(u)
923
+ }, null, 8, ["onClick"])
924
+ ])
925
+ ])
926
+ ]),
927
+ custom: i(() => [
928
+ a(G)
929
+ ]),
930
+ _: 1
931
+ }, 8, ["treeData", "onSelect"])),
932
+ w("div", {
933
+ class: "collapse-box",
934
+ onClick: d[3] || (d[3] = (u) => o.historyCollapsed = !o.historyCollapsed)
935
+ }, [
936
+ o.historyCollapsed ? (x(), V(L, {
937
+ key: 0,
938
+ icon: "ant-design:caret-left"
939
+ })) : (x(), V(L, {
940
+ key: 1,
941
+ icon: "ant-design:caret-right"
942
+ }))
943
+ ])
944
+ ]),
945
+ _: 1
946
+ }, 8, ["class"])
947
+ ]),
948
+ _: 1
949
+ }, 8, ["onRegister", "onOk", "onFullScreen"])
950
+ ])),
951
+ a(X, {
952
+ title: "请输入保存的名称",
953
+ open: o.saveInfo.visible,
954
+ onCancel: d[5] || (d[5] = (u) => o.saveInfo.visible = !1),
955
+ onOk: o.doSaveQueryInfo,
956
+ confirmLoading: o.saveModalLoading
957
+ }, {
958
+ default: i(() => [
959
+ w("div", mt, [
960
+ a(Y, {
961
+ value: o.saveInfo.title,
962
+ "onUpdate:value": d[4] || (d[4] = (u) => o.saveInfo.title = u),
963
+ style: { width: "90%" },
964
+ placeholder: "请输入保存的名称"
965
+ }, null, 8, ["value"])
966
+ ])
967
+ ]),
968
+ _: 1
969
+ }, 8, ["open", "onOk", "confirmLoading"])
970
+ ], 64);
971
+ }
972
+ const ol = /* @__PURE__ */ et(nt, [["render", vt], ["__scopeId", "data-v-79039fe8"]]);
973
+ export {
974
+ ol as default
975
+ };