@jeecg/online 3.6.0-beta → 3.6.2-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 (81) hide show
  1. package/{AuthButtonConfig-b6a674fa.mjs → AuthButtonConfig-244ec09f.mjs} +1 -1
  2. package/{AuthButtonTree-09e57bc4.mjs → AuthButtonTree-3aa0ed49.mjs} +1 -1
  3. package/{AuthDataConfig-6e7e61ec.mjs → AuthDataConfig-83891eea.mjs} +1 -1
  4. package/{AuthDataTree-e83286c5.mjs → AuthDataTree-94e026e3.mjs} +1 -1
  5. package/{AuthFieldConfig-f1ec2708.mjs → AuthFieldConfig-6b21915c.mjs} +1 -1
  6. package/{AuthFieldTree-bb72e21f.mjs → AuthFieldTree-69864163.mjs} +1 -1
  7. package/{AuthManagerDrawer-28a2d108.mjs → AuthManagerDrawer-300dd4e4.mjs} +4 -4
  8. package/{AuthSetterModal-2990d553.mjs → AuthSetterModal-a414fb35.mjs} +58 -52
  9. package/{CgformCopyList-36a4cbf0.mjs → CgformCopyList-14b76108.mjs} +39 -37
  10. package/{CgformModal-7399a5ac.mjs → CgformModal-eccfc38e.mjs} +90 -90
  11. package/{CgreportModal-2eb9c9e1.mjs → CgreportModal-2065f5a9.mjs} +1 -1
  12. package/{CgreportModal.vue_vue_type_script_setup_true_lang-c2ceb064.mjs → CgreportModal.vue_vue_type_script_setup_true_lang-c89d9222.mjs} +131 -131
  13. package/{CheckDictTable-3a8a54b3.mjs → CheckDictTable-134cbb83.mjs} +1 -1
  14. package/{CodeFileListModal-72f0d3bb.mjs → CodeFileListModal-a6d3290d.mjs} +2 -2
  15. package/{CodeFileViewModal-9eb88c47.mjs → CodeFileViewModal-373e8058.mjs} +1 -1
  16. package/{CodeGeneratorModal-a89958f5.mjs → CodeGeneratorModal-f08a89cd.mjs} +5 -5
  17. package/{CustomButtonList-c44aec5a.mjs → CustomButtonList-02e3d897.mjs} +1 -1
  18. package/{DBAttributeTable-7d285e8d.mjs → DBAttributeTable-370de07b.mjs} +1 -1
  19. package/{DbToOnlineModal-d23cbeb1.mjs → DbToOnlineModal-9f13956f.mjs} +1 -1
  20. package/{DetailForm-2901d215.mjs → DetailForm-424638eb.mjs} +32 -31
  21. package/{EnhanceJavaModal-153899a9.mjs → EnhanceJavaModal-f63aa2d3.mjs} +1 -1
  22. package/{EnhanceJsHistory-7f5db3b1.mjs → EnhanceJsHistory-352b46b1.mjs} +1 -1
  23. package/{EnhanceJsModal-c2fb75b8.mjs → EnhanceJsModal-05c73a59.mjs} +2 -2
  24. package/{EnhanceSqlModal-965e9b0a.mjs → EnhanceSqlModal-5e4ae84f.mjs} +1 -1
  25. package/{ExtendConfigModal-8f08466f.mjs → ExtendConfigModal-1dde390a.mjs} +2 -2
  26. package/{FieldExtendJsonModal-adfcf5a7.mjs → FieldExtendJsonModal-a70a9ccd.mjs} +1 -1
  27. package/{FileSelectModal-432d4521.mjs → FileSelectModal-9a02560b.mjs} +1 -1
  28. package/{ForeignKeyTable-faab7ccf.mjs → ForeignKeyTable-6a843c4b.mjs} +1 -1
  29. package/{IndexTable-0a2d3718.mjs → IndexTable-f8af9d44.mjs} +1 -1
  30. package/JModalTip-33c7dc44.mjs +49 -0
  31. package/{JOnlineSearchSelect-7e908492.mjs → JOnlineSearchSelect-c287af12.mjs} +1 -1
  32. package/{LeftDepart-54f245b3.mjs → LeftDepart-fa85523d.mjs} +1 -1
  33. package/{LeftRole-c138f892.mjs → LeftRole-8b8dfe21.mjs} +1 -1
  34. package/{LeftUser-9c812f8a.mjs → LeftUser-dc24ef2f.mjs} +1 -1
  35. package/{LinkTableConfigModal-c2c5c7e6.mjs → LinkTableConfigModal-d4fbdef2.mjs} +1 -1
  36. package/{LinkTableFieldConfigModal-a3553b1f.mjs → LinkTableFieldConfigModal-787bc55c.mjs} +1 -1
  37. package/{LinkTableListPiece-7f793b08.mjs → LinkTableListPiece-8499a318.mjs} +1 -1
  38. package/{ModalFormDemo-65685b0e.mjs → ModalFormDemo-977a49eb.mjs} +1 -1
  39. package/{OnlCgformErpList-52c87ed3.mjs → OnlCgformErpList-db45e22b.mjs} +59 -54
  40. package/OnlCgformErpSubTable-54b50eec.mjs +403 -0
  41. package/{OnlCgformInnerSubTable-f0727b8f.mjs → OnlCgformInnerSubTable-fbca73e0.mjs} +46 -41
  42. package/{OnlCgformInnerTableList-9f89c173.mjs → OnlCgformInnerTableList-782eaf04.mjs} +156 -142
  43. package/{OnlCgformTabList-15516315.mjs → OnlCgformTabList-a9e1e36a.mjs} +47 -42
  44. package/{OnlineAutoList-63a0224f.mjs → OnlineAutoList-0583a910.mjs} +185 -180
  45. package/{OnlineAutoModal-ffe19c3f.mjs → OnlineAutoModal-510991eb.mjs} +14 -13
  46. package/{OnlineAutoTreeList-317c7105.mjs → OnlineAutoTreeList-89265688.mjs} +24 -19
  47. package/{OnlineCustomModal-3939ce78.mjs → OnlineCustomModal-518ad33c.mjs} +9 -8
  48. package/{OnlineDetailModal-bfb1375f.mjs → OnlineDetailModal-9675390d.mjs} +13 -12
  49. package/{OnlineForm-069f6092.mjs → OnlineForm-1fa2d893.mjs} +8 -7
  50. package/{OnlineFormDetail-ad5735fb.mjs → OnlineFormDetail-0e7294ca.mjs} +10 -9
  51. package/{OnlineQueryForm-0771c80f.mjs → OnlineQueryForm-1bfc8320.mjs} +8 -7
  52. package/{OnlineSearchFormItem-0db5834f.mjs → OnlineSearchFormItem-0cc85a8a.mjs} +2 -2
  53. package/{OnlineSelectCascade-a05c30f4.mjs → OnlineSelectCascade-4265c95d.mjs} +1 -1
  54. package/{OnlineSubFormDetail-583d01eb.mjs → OnlineSubFormDetail-f0d2c016.mjs} +19 -18
  55. package/{OnlineTabAutoModal-747e071d.mjs → OnlineTabAutoModal-6f636ee2.mjs} +20 -19
  56. package/{OnlineTabDetailModal-887f0174.mjs → OnlineTabDetailModal-7356d3a8.mjs} +36 -35
  57. package/{OnlineTabForm-b1dcd4b4.mjs → OnlineTabForm-512d3951.mjs} +132 -131
  58. package/{OnlineTabFormDetail-8e494a96.mjs → OnlineTabFormDetail-5a70219d.mjs} +36 -35
  59. package/{PageAttributeTable-5966b201.mjs → PageAttributeTable-965dc58e.mjs} +4 -4
  60. package/{ProcessOnlineForm-4382bea7.mjs → ProcessOnlineForm-67558898.mjs} +23 -22
  61. package/{QueryTable-6e8053ad.mjs → QueryTable-eb9a5b21.mjs} +1 -1
  62. package/README.md +4 -2
  63. package/{SuperQuery-78db6998.mjs → SuperQuery-5d1ca957.mjs} +243 -241
  64. package/{SuperQueryValComponent-471110b5.mjs → SuperQueryValComponent-7ad86d4b.mjs} +1 -1
  65. package/SuperQueryValComponent.vue_vue_type_script_lang-e9196096.mjs +101 -0
  66. package/cgformState-d9f8ec42.mjs +28 -0
  67. package/index-0e3ab3af.mjs +56 -0
  68. package/{index-0a93652b.mjs → index-49508cad.mjs} +1 -1
  69. package/{index-7e9a23f2.mjs → index-b7a05eef.mjs} +43 -41
  70. package/main.index.js +1 -1
  71. package/package.json +1 -1
  72. package/style.css +1 -1
  73. package/{useCgformList-0c603af1.mjs → useCgformList-423282b7.mjs} +81 -105
  74. package/{useExtendComponent-aa1cdfc8.mjs → useExtendComponent-325fe3f1.mjs} +1558 -1549
  75. package/useListButton-cdbab702.mjs +676 -0
  76. package/{useSchemas-43429d80.mjs → useSchemas-0433a403.mjs} +94 -90
  77. package/JModalTip-e1938b49.mjs +0 -46
  78. package/OnlCgformErpSubTable-6e7fb17b.mjs +0 -398
  79. package/SuperQueryValComponent.vue_vue_type_script_lang-e3ad7ee8.mjs +0 -101
  80. package/index-b70302f2.mjs +0 -56
  81. package/useListButton-0f18bf6a.mjs +0 -671
@@ -0,0 +1,676 @@
1
+ var De = Object.defineProperty, Ee = Object.defineProperties;
2
+ var Pe = Object.getOwnPropertyDescriptors;
3
+ var ge = Object.getOwnPropertySymbols;
4
+ var Te = Object.prototype.hasOwnProperty, Oe = Object.prototype.propertyIsEnumerable;
5
+ var he = (i, c, o) => c in i ? De(i, c, { enumerable: !0, configurable: !0, writable: !0, value: o }) : i[c] = o, k = (i, c) => {
6
+ for (var o in c || (c = {}))
7
+ Te.call(c, o) && he(i, o, c[o]);
8
+ if (ge)
9
+ for (var o of ge(c))
10
+ Oe.call(c, o) && he(i, o, c[o]);
11
+ return i;
12
+ }, G = (i, c) => Ee(i, Pe(c));
13
+ var $ = (i, c, o) => new Promise((O, S) => {
14
+ var w = (g) => {
15
+ try {
16
+ y(o.next(g));
17
+ } catch (v) {
18
+ S(v);
19
+ }
20
+ }, f = (g) => {
21
+ try {
22
+ y(o.throw(g));
23
+ } catch (v) {
24
+ S(v);
25
+ }
26
+ }, y = (g) => g.done ? O(g.value) : Promise.resolve(g.value).then(w, f);
27
+ y((o = o.apply(i, c)).next());
28
+ });
29
+ import { E as W, p as Re } from "./useExtendComponent-325fe3f1.mjs";
30
+ import { useRoute as ke } from "vue-router";
31
+ import { router as Me } from "/@/router";
32
+ import { ref as b, provide as Fe, onBeforeUnmount as Be, toRaw as M, nextTick as ye, reactive as pe } from "vue";
33
+ import { defHttp as T } from "/@/utils/http/axios";
34
+ import { useMessage as we } from "/@/hooks/web/useMessage";
35
+ import { filterObj as ve } from "/@/utils/common/compUtils";
36
+ import { u as Ce, G as Ie } from "./useCustomHook-acb00837.mjs";
37
+ import { onMountedOrActivated as Ne } from "/@/hooks/core/onMountedOrActivated";
38
+ import { useModal as j } from "/@/components/Modal";
39
+ import { E as de, a as Ue } from "./constant-754f1a9d.mjs";
40
+ import { useMultipleTabStore as _e } from "/@/store/modules/multipleTab";
41
+ import { u as $e } from "./cgformState-d9f8ec42.mjs";
42
+ import { pick as Qe } from "lodash-es";
43
+ import { Modal as je } from "ant-design-vue";
44
+ import { useMethods as Ve } from "/@/hooks/system/useMethods";
45
+ import { getToken as Ke } from "/@/utils/auth";
46
+ import { goJmReportViewPage as Le } from "/@/utils";
47
+ const He = {
48
+ acceptHrefParams: "<p> 跳转时获取的参数信息",
49
+ currentPage: "<p> 当前页数",
50
+ currentTableName: "<p> 当前表名",
51
+ description: "<p> 当前表描述",
52
+ hasChildrenField: "<p> 是否有子节点的字段名,仅树形表单下有效",
53
+ isDesForm: "<p> xx",
54
+ isTree: "<m> 是否是树形表单 ",
55
+ loadData: "<m> 加载列表数据",
56
+ pageSize: "<p> 每一页显示条数",
57
+ queryParam: "<p> 查询条件对象,每次点击查询后才会更新此数据",
58
+ selectedRowKeys: "<p> 选中的行的id数组",
59
+ sortField: "<p> 排序字段",
60
+ sortType: "<p> 排序规则",
61
+ total: "<p> 总页数",
62
+ foreignKeyValue: "<p> Erp一对多子表外键选中对应主表字段的值",
63
+ isErpSubTable: "<p> 是否Erp一对多子表",
64
+ foreignKeyField: "<p> Erp一对多子表外键字段",
65
+ themeTemplate: "<p> 主题模板",
66
+ isInnerSubTable: "<p> 是否内嵌一对多子表",
67
+ innerSubTableName: "<p> 内嵌一对多子表名",
68
+ mTableSelectedRcordId: "<p>内嵌主表展开行的id"
69
+ }, Je = {
70
+ getColumns: "/online/cgform/api/getColumns/",
71
+ getQueryInfo: "/online/cgform/api/getQueryInfo/",
72
+ getData: "/online/cgform/api/getData/",
73
+ getTreeData: "/online/cgform/api/getTreeData/",
74
+ optPre: "/online/cgform/api/form/",
75
+ buttonAction: "/online/cgform/api/doButton",
76
+ exportXls: "/online/cgform/api/exportXlsOld/",
77
+ importXls: "/online/cgform/api/importXls/",
78
+ startProcess: "/act/process/extActProcess/startMutilProcess",
79
+ getErpColumns: "/online/cgform/api/getErpColumns/",
80
+ // 内嵌主题一对多子表数据请求接口
81
+ list: "/online/cgform/api/subform/list/"
82
+ };
83
+ let be = {
84
+ sortField: "id",
85
+ sortType: "asc",
86
+ currentPage: 1,
87
+ pageSize: 10,
88
+ total: 0,
89
+ selectedRowKeys: [],
90
+ queryParam: {},
91
+ acceptHrefParams: {},
92
+ description: "",
93
+ currentTableName: "",
94
+ isDesForm: !1,
95
+ desFormCode: "",
96
+ cache: !1,
97
+ isTree: !1,
98
+ hasChildrenField: ""
99
+ };
100
+ const Ae = {
101
+ current: 1,
102
+ pageSize: 10,
103
+ pageSizeOptions: ["10", "20", "30"],
104
+ showTotal: (i, c) => c[0] + "-" + c[1] + " 共" + i + "条",
105
+ showQuickJumper: !0,
106
+ showSizeChanger: !0,
107
+ total: 0
108
+ }, { createMessage: Q, createErrorModal: ze } = we();
109
+ function pt(i = {}) {
110
+ var q;
111
+ const c = (q = i.code) != null ? q : "", o = b(c);
112
+ Fe("tableId", o);
113
+ const O = ke(), S = b(), w = b(), f = b(!1), y = b([]), g = b(!0), v = b(), Y = $e();
114
+ _e();
115
+ let E = {};
116
+ const m = {
117
+ execButtonEnhance: function(r, e) {
118
+ if (l[W][r])
119
+ if (Re === r)
120
+ h(r);
121
+ else {
122
+ let t = M(e);
123
+ return l[W][r].call(l, l, t);
124
+ }
125
+ else if (l[W][r + "_hook"])
126
+ if (e) {
127
+ let t = M(e);
128
+ h(r + "_hook", t);
129
+ } else
130
+ h(r + "_hook");
131
+ },
132
+ /**
133
+ * get 是否是树形表单
134
+ * @param status 如果有值 则视为set方法
135
+ */
136
+ isTree: function(r) {
137
+ return typeof r == "boolean" ? (l.isTreeTable = r, r) : l.isTreeTable;
138
+ }
139
+ };
140
+ function h(r, e) {
141
+ let a = l[W][r].toLocaleString().match(Ie);
142
+ if (a.length > 1) {
143
+ let n = a[1];
144
+ F(n, e);
145
+ }
146
+ }
147
+ const l = new Proxy(He, {
148
+ get(r, e) {
149
+ if (typeof m[e] == "function")
150
+ return m[e];
151
+ {
152
+ let t = E[o.value];
153
+ return Reflect.get(t, e);
154
+ }
155
+ },
156
+ set(r, e, t) {
157
+ let a = Z();
158
+ return Reflect.set(typeof t == "function" ? m : a, e, t);
159
+ },
160
+ deleteProperty(r, e) {
161
+ return e === o.value ? (delete E[e], !0) : !1;
162
+ }
163
+ }), { executeJsEnhanced: F } = Ce({}, l);
164
+ function x() {
165
+ let r = O.params.id;
166
+ return r || (r = ""), r;
167
+ }
168
+ Ne(() => {
169
+ !c && z(), o.value && Y.removeChangedTable(o.value);
170
+ }), Be(() => {
171
+ delete E[o.value];
172
+ });
173
+ function Z() {
174
+ let r = E[o.value];
175
+ if (!r) {
176
+ i.themeTemplate == de && (be.pageSize = 5);
177
+ let e = Object.assign({}, be, { onlineUrl: Je });
178
+ r = JSON.parse(JSON.stringify(e)), E[o.value] = r;
179
+ }
180
+ return r;
181
+ }
182
+ function ee() {
183
+ let r = {}, e = O.query;
184
+ e && (Object.keys(e).map((t) => {
185
+ r[t] = e[t];
186
+ }), l.acceptHrefParams = r);
187
+ }
188
+ function V(r = "") {
189
+ let e;
190
+ return r == de ? e = `${l.onlineUrl.getErpColumns}${o.value}` : e = `${l.onlineUrl.getColumns}${o.value}`, new Promise((t, a) => {
191
+ T.get(
192
+ {
193
+ url: e
194
+ },
195
+ { isTransformResponse: !1 }
196
+ ).then((n) => {
197
+ n.success ? t(n.result) : (Q.warning(n.message), a());
198
+ }).catch(() => {
199
+ a();
200
+ });
201
+ });
202
+ }
203
+ function P() {
204
+ return new Promise((r, e) => {
205
+ let t = K(), a = `${l.onlineUrl.getData}${o.value}`;
206
+ l.isTree() === !0 ? a = `${l.onlineUrl.getTreeData}${o.value}` : l.isInnerSubTable === !0 && (a = `${l.onlineUrl.list}${l.innerSubTableName}/${l.mTableSelectedRcordId}`, t = { tabletype: 3 }), l.isErpSubTable === !0 && (t[l.foreignKeyField] = l.foreignKeyValue, delete t.hasQuery), T.get({ url: a, params: t }, { isTransformResponse: !1 }).then((n) => {
207
+ n.success ? (l.isInnerSubTable === !0 ? L({ records: n.result, total: n.result.length }) : L(n.result), r(!0)) : (n.message === "NO_DB_SYNC" ? ze({
208
+ title: "数据库未同步",
209
+ content: "请先同步数据库再查看此页面!",
210
+ // 点击确定后自动返回上一页
211
+ onOk: () => Me.back()
212
+ }) : Q.warning(n.message), e(!1));
213
+ }).catch(() => {
214
+ let n = "请求列表数据异常!";
215
+ Q.warning(n), e(!1);
216
+ });
217
+ });
218
+ }
219
+ function K() {
220
+ const { sortField: r, sortType: e, acceptHrefParams: t, queryParam: a } = l;
221
+ let n = {};
222
+ l.isTree(), n.hasQuery = "true";
223
+ let s = Object.assign({}, n, t, a, { column: r, order: e });
224
+ f.value ? (s.pageNo = f.value.current, s.pageSize = f.value.pageSize) : s.pageSize = -521;
225
+ let u = A();
226
+ return s.superQueryMatchType = u.matchType || "", s.superQueryParams = u.params || "", ve(s);
227
+ }
228
+ function L(r) {
229
+ let e = 0;
230
+ Number(r.total) > 0 ? (l.isTree() === !0 ? (y.value = I(r.records), ye(() => {
231
+ ne(y.value);
232
+ })) : y.value = r.records, e = Number(r.total)) : y.value = [], f.value && (f.value = G(k({}, f.value), { total: e }));
233
+ }
234
+ function H(r, e, t) {
235
+ t && t.order ? (l.sortField = t.field, l.sortType = t.order == "ascend" ? "asc" : "desc") : (l.sortField = "id", l.sortType = "asc"), f.value && (f.value = r), P();
236
+ }
237
+ function te(r) {
238
+ l.description = r.description, l.currentTableName = r.currentTableName, l.isDesForm = r.isDesForm, l.desFormCode = r.desFormCode, l.ID = o.value;
239
+ let { acceptHrefParams: e, queryParam: t, superQuery: a, currentPage: n, pageSize: s } = l;
240
+ ee(), t ? S.value && S.value.initDefaultValues(t, e) : l.queryParam = {}, a ? w.value && w.value.initDefaultValues(a) : l.superQuery = { params: "", matchType: "" }, r.paginationFlag == "Y" ? f.value = G(k({}, Ae), { current: n, pageSize: s }) : f.value = !1;
241
+ }
242
+ function re() {
243
+ return $(this, null, function* () {
244
+ g.value = !0, yield ye(), g.value = !1;
245
+ });
246
+ }
247
+ const B = {
248
+ loadData: P,
249
+ getLoadDataParams: K,
250
+ reloadTable: re
251
+ };
252
+ Object.keys(B).map((r) => {
253
+ l[r] = B[r];
254
+ });
255
+ let C = b(!1);
256
+ function ae() {
257
+ return $(this, arguments, function* (r = {}) {
258
+ f.value && (f.value = G(k({}, f.value), { current: r.mode == "search" || !f.value.current ? 1 : f.value.current })), i.themeTemplate !== de && l.clearSelectedRow(), yield P();
259
+ });
260
+ }
261
+ function I(r) {
262
+ if (r)
263
+ return r.map((e) => {
264
+ let t = l.hasChildrenField;
265
+ if (e[t] == "1") {
266
+ let a = { id: e.id + "_loadChild", name: "loading...", isLoading: !0 };
267
+ a.jeecg_row_key = a.id, e.children = [a];
268
+ }
269
+ return e;
270
+ });
271
+ }
272
+ const R = b([]);
273
+ function J(r) {
274
+ R.value = r;
275
+ }
276
+ function ne(r) {
277
+ let e = R.value;
278
+ if (e.length > 0) {
279
+ const { sortField: t, sortType: a, pidField: n } = l;
280
+ let s = Object.assign({}, { column: t, order: a });
281
+ s.hasQuery = "in";
282
+ let u = Object.assign({});
283
+ u.rule = "in", u.type = "text", u.val = e.join(","), u.field = n, u = [u], s.superQueryParams = encodeURI(JSON.stringify(u)), s.superQueryMatchType = "and", s.batchFlag = "true";
284
+ let p = `${l.onlineUrl.getTreeData}${o.value}`;
285
+ T.get({ url: p, params: s }, { isTransformResponse: !1 }).then((d) => {
286
+ if (d.success && d.result.records && d.result.records.length > 0) {
287
+ let ce = d.result.records;
288
+ const U = /* @__PURE__ */ new Map();
289
+ for (let _ of ce) {
290
+ let D = _[n];
291
+ if (e.join(",").includes(D)) {
292
+ let X = U.get(D);
293
+ X == null && (X = []), X.push(_), U.set(D, X);
294
+ }
295
+ }
296
+ let fe = U, me = (_) => {
297
+ _ && _.forEach((D) => {
298
+ e.includes(D.id) && (D.children = I(fe.get(D.id)), me(D.children));
299
+ });
300
+ };
301
+ me(r);
302
+ }
303
+ }).catch(() => {
304
+ let d = "loadDataByExpandedRows请求列表数据异常!";
305
+ Q.warning(d);
306
+ });
307
+ } else
308
+ return Promise.resolve();
309
+ }
310
+ function A() {
311
+ if (!l.superQuery)
312
+ return {};
313
+ const {
314
+ superQuery: { params: r, matchType: e },
315
+ currentTableName: t
316
+ } = l;
317
+ let a = t + "@", n = [];
318
+ if (r.length > 0)
319
+ for (let u of r) {
320
+ let p = k({}, u), d = p.field;
321
+ d.startsWith(a) && (p.field = d.replace(a, "")), n.push(p);
322
+ }
323
+ let s = n.length > 0 ? JSON.stringify(n) : "";
324
+ return {
325
+ params: encodeURIComponent(s),
326
+ matchType: e
327
+ };
328
+ }
329
+ const N = b(!1);
330
+ function le(r, e) {
331
+ l.superQuery = {
332
+ params: r,
333
+ matchType: e
334
+ }, r.length == 0 || r.length == null ? N.value = !1 : N.value = !0, f.value.current = 1, P();
335
+ }
336
+ const [ie, { openModal: se }] = j();
337
+ function oe(r) {
338
+ if (r || (r = {}), !r.row) {
339
+ let e = l.selectedRows;
340
+ if (!e || e.length == 0 || e.length > 1) {
341
+ Q.warning("请选择一条数据");
342
+ return;
343
+ }
344
+ r.row = e[0];
345
+ }
346
+ r.code = o.value, se(!0, r);
347
+ }
348
+ l.openCustomModal = oe;
349
+ function z() {
350
+ let r = x();
351
+ o.value = r;
352
+ }
353
+ !c && !o.value && z();
354
+ function ue(r) {
355
+ let e = r.head.extConfigJson;
356
+ e && (v.value = JSON.parse(e));
357
+ }
358
+ return k({
359
+ ID: o,
360
+ onlineQueryFormOuter: S,
361
+ superQueryButtonRef: w,
362
+ loading: C,
363
+ reload: ae,
364
+ dataSource: y,
365
+ pagination: f,
366
+ tableReloading: g,
367
+ handleSpecialConfig: te,
368
+ onlineTableContext: l,
369
+ handleChangeInTable: H,
370
+ getColumnList: V,
371
+ getTreeDataByResult: I,
372
+ expandedRowKeys: R,
373
+ handleExpandedRowsChange: J,
374
+ onlineExtConfigJson: v,
375
+ handleFormConfig: ue,
376
+ superQueryStatus: N,
377
+ handleSuperQuery: le,
378
+ registerCustomModal: ie
379
+ }, B);
380
+ }
381
+ const Se = "onl_";
382
+ function dt(i, c, o = {}) {
383
+ const O = {
384
+ add: !0,
385
+ addSub: !0,
386
+ update: !0,
387
+ delete: !0,
388
+ batch_delete: !0,
389
+ import: !0,
390
+ export: !0,
391
+ detail: !0,
392
+ super_query: !0,
393
+ bpm: !0
394
+ }, [S, { openModal: w }] = j(), [f, { openModal: y }] = j(), [g, { openModal: v }] = j(), [Y, { openModal: E }] = j(), { createMessage: m } = we(), h = pe(O), l = pe([]), F = pe([]);
395
+ function x(e) {
396
+ if (l.length = 0, F.length = 0, e && e.length > 0)
397
+ for (let t = 0; t < e.length; t++) {
398
+ let a = Qe(e[t], "buttonCode", "buttonName", "buttonStyle", "optType", "exp", "buttonIcon");
399
+ a.buttonStyle == "button" ? F.push(a) : a.buttonStyle == "link" && l.push(a);
400
+ }
401
+ }
402
+ function Z(e) {
403
+ Object.keys(h).forEach((t) => {
404
+ h[t] = !0;
405
+ }), e && e.length > 0 && Object.keys(h).forEach((t) => {
406
+ e.indexOf(t) >= 0 && (h[t] = !1);
407
+ });
408
+ }
409
+ function ee(e) {
410
+ let t = { isUpdate: !1 };
411
+ e && (t.param = e), w(!0, t);
412
+ }
413
+ function V(e) {
414
+ i.beforeEdit(e).then(() => {
415
+ w(!0, {
416
+ isUpdate: !0,
417
+ record: e
418
+ });
419
+ }).catch((t) => {
420
+ m.warning(t);
421
+ });
422
+ }
423
+ const P = (e) => ({
424
+ label: "删除",
425
+ popConfirm: {
426
+ title: "是否删除?",
427
+ confirm: K.bind(null, e)
428
+ }
429
+ });
430
+ function K(e) {
431
+ i.beforeDelete(e).then(() => {
432
+ J(e.id, !1);
433
+ }).catch((t) => {
434
+ m.warning(t);
435
+ });
436
+ }
437
+ function L(e) {
438
+ let t = C(e), a = t && (t == "1" || t == "3" || t == "4") || !t;
439
+ return M(h.update) === !0 && a ? [
440
+ {
441
+ label: "编辑",
442
+ onClick: (n) => {
443
+ o.editClickCallback && o.editClickCallback(e.id, n), V(e);
444
+ }
445
+ }
446
+ ] : [];
447
+ }
448
+ function H(e) {
449
+ return {
450
+ label: "提交流程",
451
+ popConfirm: {
452
+ title: "确认提交流程吗?",
453
+ confirm: R.bind(null, e)
454
+ }
455
+ };
456
+ }
457
+ function te(e) {
458
+ return {
459
+ label: "审批进度",
460
+ onClick: re.bind(null, e)
461
+ };
462
+ }
463
+ function re(e) {
464
+ const { currentTableName: t } = i;
465
+ let a = Se + t, n = e.id;
466
+ E(!0, {
467
+ flowCode: a,
468
+ dataId: n
469
+ });
470
+ }
471
+ function B(e, t = {}) {
472
+ let a = [];
473
+ if (M(h.detail) === !0 && a.push({
474
+ label: "详情",
475
+ onClick: ae.bind(null, e)
476
+ }), t.themeTemplate != Ue && i.hasBpmStatus === !0 && M(h.bpm) === !0) {
477
+ let p = C(e);
478
+ !p || p == "1" ? a.push(H(e)) : a.push(te(e));
479
+ }
480
+ if (c.value) {
481
+ let { reportPrintShow: p, reportPrintUrl: d } = c.value;
482
+ p && d && a.push({
483
+ label: "打印",
484
+ onClick() {
485
+ let ce = d, U = e.id, fe = Ke();
486
+ Le(ce, U, fe);
487
+ }
488
+ });
489
+ }
490
+ let n = C(e), s = n && n == "1" || !n;
491
+ M(h.delete) === !0 && s && a.push(P(e));
492
+ let u = l;
493
+ if (u && u.length > 0)
494
+ for (let p of u)
495
+ q(p.exp || "", e) === !0 && a.push({
496
+ label: p.buttonName,
497
+ onClick: A.bind(null, e, p.buttonCode, p.optType)
498
+ });
499
+ return a;
500
+ }
501
+ function C(e) {
502
+ const t = "bpm_status";
503
+ let a = e[t];
504
+ return a || (a = e[t.toUpperCase()]), a;
505
+ }
506
+ function ae(e) {
507
+ v(!0, {
508
+ isUpdate: !0,
509
+ disableSubmit: !0,
510
+ record: e
511
+ });
512
+ }
513
+ function I(e) {
514
+ const {
515
+ currentTableName: t,
516
+ onlineUrl: { startProcess: a }
517
+ } = i;
518
+ let n = {
519
+ url: a,
520
+ params: {
521
+ flowCode: Se + t,
522
+ id: e.id,
523
+ // TODO 流程表单没有
524
+ formUrl: "modules/bpm/task/form/OnlineFormDetail",
525
+ formUrlMobile: "check/onlineForm/detail"
526
+ }
527
+ }, s = { isTransformResponse: !1 };
528
+ return new Promise((u, p) => {
529
+ T.post(n, s).then((d) => {
530
+ d.success ? (u(d), m.success(d.message)) : (p(), m.warning(d.message));
531
+ });
532
+ });
533
+ }
534
+ function R(e) {
535
+ return $(this, null, function* () {
536
+ yield I(e), i.loadData();
537
+ });
538
+ }
539
+ function J(e, t = !0) {
540
+ let a = `${i.onlineUrl.optPre}${i.ID}/${e}`;
541
+ return new Promise((n, s) => {
542
+ T.delete(
543
+ {
544
+ url: a
545
+ },
546
+ { isTransformResponse: !1 }
547
+ ).then((u) => {
548
+ u.success ? (m.success(u.message), i.loadData(), t || o.singleDelCallback && o.singleDelCallback(e), n(!0)) : (m.warning(u.message), s());
549
+ });
550
+ });
551
+ }
552
+ function ne() {
553
+ let e = i.selectedRowKeys;
554
+ if (e.length <= 0)
555
+ return m.warning("请选择一条记录!"), !1;
556
+ {
557
+ let t = [];
558
+ e.forEach(function(n) {
559
+ let s = n;
560
+ s && s.endsWith("_loadChild") && (s = s.replace("_loadChild", "")), t.indexOf(s) < 0 && t.push(s);
561
+ });
562
+ let a = t.join(",");
563
+ je.confirm({
564
+ title: "确认删除",
565
+ content: "是否删除选中数据",
566
+ okText: "确认",
567
+ cancelText: "取消",
568
+ onOk: () => $(this, null, function* () {
569
+ yield J(a), i.clearSelectedRow();
570
+ })
571
+ });
572
+ }
573
+ }
574
+ function A(e, t, a) {
575
+ if (a == "js")
576
+ i.execButtonEnhance(t, e);
577
+ else if (a == "action") {
578
+ let n = {
579
+ formId: i.ID,
580
+ buttonCode: t,
581
+ dataId: e.id
582
+ }, s = `${i.onlineUrl.buttonAction}`;
583
+ T.post(
584
+ {
585
+ url: s,
586
+ params: n
587
+ },
588
+ { isTransformResponse: !1 }
589
+ ).then((u) => {
590
+ u.success ? (i.loadData(), m.success("处理完成!")) : m.warning(u.message);
591
+ });
592
+ }
593
+ }
594
+ function N(e) {
595
+ i.execButtonEnhance(e);
596
+ }
597
+ function le(e) {
598
+ let t = i.selectedRowKeys;
599
+ if (!t || t.length == 0)
600
+ return m.warning("请先选中一条记录"), !1;
601
+ let a = t.join(","), n = {
602
+ formId: i.ID,
603
+ buttonCode: e,
604
+ dataId: a
605
+ }, s = `${i.onlineUrl.buttonAction}`;
606
+ T.post(
607
+ {
608
+ url: s,
609
+ params: n
610
+ },
611
+ { isTransformResponse: !1 }
612
+ ).then((u) => {
613
+ u.success ? (i.loadData(), i.clearSelectedRow(), m.success("处理完成!")) : m.warning(u.message);
614
+ });
615
+ }
616
+ function ie() {
617
+ y(!0);
618
+ }
619
+ const se = () => `${i.onlineUrl.importXls}${i.ID}`, { handleExportXlsx: oe } = Ve();
620
+ function z() {
621
+ let e = i.getLoadDataParams(), t = i.selectedRowKeys;
622
+ t && t.length > 0 && (e.selections = t.join(",")), i.isErpSubTable === !0 && i.foreignKeyField && i.foreignKeyValue && (e[i.foreignKeyField] = i.foreignKeyValue);
623
+ let a = JSON.stringify(ve(e)), n = `${i.onlineUrl.exportXls}${i.ID}`;
624
+ const s = i.description;
625
+ return oe(s, n, { paramsStr: a });
626
+ }
627
+ function ue(e, t) {
628
+ const a = [];
629
+ e.split("||").forEach((s) => {
630
+ const u = [];
631
+ s.trim().split("&&").forEach((p) => {
632
+ u.push(r(p.trim(), t));
633
+ }), a.push(u.join("&&"));
634
+ });
635
+ const n = a.join("||");
636
+ return new Function(`return ${n}`)();
637
+ }
638
+ function q(e, t) {
639
+ return !e || e == "" ? !0 : e.indexOf("||") == -1 && e.indexOf("&&") == -1 ? r(e, t) : ue(e, t);
640
+ }
641
+ function r(e, t) {
642
+ if (!e || e == "")
643
+ return !0;
644
+ let a = e.split("#"), n = t[a[0]], s = a[1].toLowerCase();
645
+ return s === "eq" ? n == a[2] : s === "ne" ? n != a[2] : s === "empty" ? a[2] === "true" ? !n || n == "" : n && n.length > 0 : s === "in" ? a[2].split(",").indexOf(String(n)) >= 0 : !1;
646
+ }
647
+ return {
648
+ buttonSwitch: h,
649
+ cgLinkButtonList: l,
650
+ cgTopButtonList: F,
651
+ importUrl: se,
652
+ registerModal: S,
653
+ handleAdd: ee,
654
+ handleEdit: V,
655
+ handleBatchDelete: ne,
656
+ registerImportModal: f,
657
+ onImportExcel: ie,
658
+ onExportExcel: z,
659
+ getDropDownActions: B,
660
+ getActions: L,
661
+ cgButtonJsHandler: N,
662
+ cgButtonActionHandler: le,
663
+ cgButtonLinkHandler: A,
664
+ initButtonList: x,
665
+ initButtonSwitch: Z,
666
+ getDeleteButton: P,
667
+ handleSubmitFlow: R,
668
+ getSubmitFlowButton: H,
669
+ registerDetailModal: g,
670
+ registerBpmModal: Y
671
+ };
672
+ }
673
+ export {
674
+ dt as a,
675
+ pt as u
676
+ };