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