@jeecg/online 3.7.0-beta → 3.7.4-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 (150) hide show
  1. package/AccountLoginForm-84cbd344.mjs +254 -0
  2. package/AiModal-26903538.mjs +84 -0
  3. package/AppForgetPassword-52443f23.mjs +310 -0
  4. package/AppLogin-ecf798fa.mjs +287 -0
  5. package/AppLoginHeader-4432c584.mjs +27 -0
  6. package/AppNameEmail-3303a037.mjs +180 -0
  7. package/AppRegister-79a62c59.mjs +303 -0
  8. package/AppTenant-f0bef7ca.mjs +373 -0
  9. package/AppThirdForm-fd8b4604.mjs +189 -0
  10. package/AuthButtonConfig-d5bffca0.mjs +156 -0
  11. package/AuthButtonTree-b0bd6c40.mjs +165 -0
  12. package/{AuthDataConfig-7bb0cd85.mjs → AuthDataConfig-d3b7afa4.mjs} +30 -29
  13. package/{AuthDataTree-6e3bb86f.mjs → AuthDataTree-f14a98d9.mjs} +47 -47
  14. package/AuthFieldConfig-f1e224cc.mjs +245 -0
  15. package/AuthFieldTree-5cc0da05.mjs +232 -0
  16. package/{AuthManagerDrawer-5e2ed5ce.mjs → AuthManagerDrawer-32556109.mjs} +9 -8
  17. package/{AuthSetterModal-6f74449c.mjs → AuthSetterModal-364f1f67.mjs} +12 -11
  18. package/BuiltInButtonList-bb6cf95c.mjs +10 -0
  19. package/BuiltInButtonList.vue_vue_type_script_setup_true_lang-07d0b7d0.mjs +338 -0
  20. package/CgformAddressModal-1131274c.mjs +260 -0
  21. package/CgformCopyList-5fba0810.mjs +252 -0
  22. package/CgformModal-c4a4e0c2.mjs +667 -0
  23. package/{CgreportModal-5a23d089.mjs → CgreportModal-8a84aae5.mjs} +186 -172
  24. package/{CheckDictTable-b5cb0e2b.mjs → CheckDictTable-8a938e3a.mjs} +37 -34
  25. package/CodeFileListModal-a924902a.mjs +159 -0
  26. package/CodeFileViewModal-405e2b58.mjs +253 -0
  27. package/CodeGeneratorModal-2e1dc13d.mjs +281 -0
  28. package/CustomButtonList-c453b654.mjs +274 -0
  29. package/{DBAttributeTable-95dc66c1.mjs → DBAttributeTable-1a45c7b7.mjs} +80 -72
  30. package/DbToOnlineModal-f28ff0a3.mjs +168 -0
  31. package/{DetailForm-4aa2570b.mjs → DetailForm-c592b8d8.mjs} +50 -49
  32. package/DropMenuItem-1e49abea.mjs +44 -0
  33. package/{EnhanceJavaModal-98934198.mjs → EnhanceJavaModal-d5a93f2a.mjs} +62 -62
  34. package/{EnhanceJsHistory-9c4acdaf.mjs → EnhanceJsHistory-8ddb0657.mjs} +35 -35
  35. package/{EnhanceJsModal-247f640d.mjs → EnhanceJsModal-dc4f9ade.mjs} +154 -138
  36. package/{EnhanceSqlModal-65b74b0f.mjs → EnhanceSqlModal-984f045d.mjs} +67 -67
  37. package/ErrorTip-bb616e32.mjs +7 -0
  38. package/ErrorTip.vue_vue_type_script_setup_true_lang-49d35987.mjs +60 -0
  39. package/{ExtendConfigModal-00f2fb55.mjs → ExtendConfigModal-7d70f362.mjs} +2 -2
  40. package/{FieldExtendJsonModal-cc7fce26.mjs → FieldExtendJsonModal-bf04d70e.mjs} +2 -2
  41. package/{FileSelectModal-38660e3c.mjs → FileSelectModal-ffc69d4a.mjs} +23 -23
  42. package/{ForeignKeyTable-a78cb5ad.mjs → ForeignKeyTable-92decaea.mjs} +3 -3
  43. package/{IndexTable-1b496559.mjs → IndexTable-2ded2014.mjs} +28 -20
  44. package/JModalTip-a927f85d.mjs +49 -0
  45. package/JOnlineSearchSelect-04ec87d0.mjs +128 -0
  46. package/{LeftDepart-8ade4bf7.mjs → LeftDepart-52cb6743.mjs} +1 -1
  47. package/LeftRole-b0e0b496.mjs +86 -0
  48. package/{LeftUser-b4d1372a.mjs → LeftUser-dd4b10e2.mjs} +30 -30
  49. package/{LinkTableConfigModal-a138c85e.mjs → LinkTableConfigModal-7eeb3e58.mjs} +43 -31
  50. package/{LinkTableFieldConfigModal-17b413b0.mjs → LinkTableFieldConfigModal-b078fcef.mjs} +1 -1
  51. package/{LinkTableListPiece-2660d709.mjs → LinkTableListPiece-e016b8e6.mjs} +1 -1
  52. package/{ModalFormDemo-0544737d.mjs → ModalFormDemo-aaa719a7.mjs} +1 -1
  53. package/OnlCgformErpList-5c5acdaa.mjs +488 -0
  54. package/OnlCgformErpSubTable-e1b88312.mjs +441 -0
  55. package/{OnlCgformInnerSubTable-290ace5d.mjs → OnlCgformInnerSubTable-6b6fa15a.mjs} +106 -107
  56. package/OnlCgformInnerTableList-b283a525.mjs +474 -0
  57. package/OnlCgformTabList-91e3dd78.mjs +424 -0
  58. package/OnlineAutoList-84475f1b.mjs +513 -0
  59. package/OnlineAutoModal-95f46901.mjs +260 -0
  60. package/OnlineAutoTreeList-20b9ce04.mjs +523 -0
  61. package/OnlineCustomModal-c8b1e780.mjs +232 -0
  62. package/{OnlineDetailModal-2a271e0b.mjs → OnlineDetailModal-5b412bb9.mjs} +74 -65
  63. package/OnlineForm-58282699.mjs +1012 -0
  64. package/{OnlineFormDetail-e036cd11.mjs → OnlineFormDetail-fc087725.mjs} +7 -7
  65. package/{OnlineFormUrlAdd-7fb3dcca.mjs → OnlineFormUrlAdd-bc9105bb.mjs} +10 -10
  66. package/{OnlineFormUrlDetail-b2292137.mjs → OnlineFormUrlDetail-ad912560.mjs} +12 -12
  67. package/{OnlineFormUrlEdit-44080fb3.mjs → OnlineFormUrlEdit-f2fa79ff.mjs} +10 -10
  68. package/OnlineFormUrlSuccess-76813d45.mjs +59 -0
  69. package/OnlineQueryForm-9248341f.mjs +484 -0
  70. package/{OnlineSearchFormItem-6feacae6.mjs → OnlineSearchFormItem-1e437bd3.mjs} +82 -82
  71. package/{OnlineSelectCascade-471fcc76.mjs → OnlineSelectCascade-d631ed72.mjs} +1 -1
  72. package/{OnlineSubFormDetail-03f8ee5c.mjs → OnlineSubFormDetail-8be879b9.mjs} +53 -54
  73. package/{OnlineTabAutoModal-7b9bcd0b.mjs → OnlineTabAutoModal-c9ca3c24.mjs} +108 -95
  74. package/{OnlineTabDetailModal-88143301.mjs → OnlineTabDetailModal-fd4c9a72.mjs} +36 -36
  75. package/OnlineTabForm-1940e88b.mjs +814 -0
  76. package/{OnlineTabFormDetail-bbf23caa.mjs → OnlineTabFormDetail-2aa67564.mjs} +17 -17
  77. package/{PageAttributeTable-6c23547b.mjs → PageAttributeTable-66e7b485.mjs} +169 -149
  78. package/PhoneLoginForm-86437a9d.mjs +214 -0
  79. package/{ProcessOnlineForm-b42198f5.mjs → ProcessOnlineForm-98ede18d.mjs} +64 -58
  80. package/{QueryTable-96b3dbd0.mjs → QueryTable-65d3f54f.mjs} +40 -37
  81. package/SetSwitchOptions-f914bc17.mjs +62 -0
  82. package/ShareAddView-657f0f8b.mjs +86 -0
  83. package/ShareEditView-1b945fd3.mjs +92 -0
  84. package/ShareView-222ed3d8.mjs +80 -0
  85. package/ShareView.vue_vue_type_script_setup_true_lang-44fbeaff.mjs +162 -0
  86. package/SingleView-23b0cb4e.mjs +68 -0
  87. package/SingleView.vue_vue_type_style_index_0_lang-e0f2f6c0.mjs +131 -0
  88. package/SuperQuery-46032e66.mjs +974 -0
  89. package/{SuperQueryValComponent-7ad86d4b.mjs → SuperQueryValComponent-5a9ccfd4.mjs} +1 -1
  90. package/{SuperQueryValComponent.vue_vue_type_script_lang-e9196096.mjs → SuperQueryValComponent.vue_vue_type_script_lang-8fe34917.mjs} +11 -11
  91. package/auth.api-53df4c33.mjs +41 -0
  92. package/{auth.data-22948e87.mjs → auth.data-626c5083.mjs} +68 -30
  93. package/button.data-fe45d43b.mjs +12 -0
  94. package/{cgform.data-475d4984.mjs → cgform.data-0ca62d09.mjs} +4 -1
  95. package/{enhance.data-3304d553.mjs → enhance.data-6601ff44.mjs} +9 -8
  96. package/index-19eaef11.mjs +11 -0
  97. package/index-1a2e8832.mjs +135 -0
  98. package/{index-581bef24.mjs → index-2fb8e07f.mjs} +59 -59
  99. package/index-5e89258d.mjs +8 -0
  100. package/index-9e1e1e53.mjs +57 -0
  101. package/{index-d2abb8a0.mjs → index-a039036e.mjs} +273 -262
  102. package/index-c5a79b0b.mjs +219 -0
  103. package/index-cce225be.mjs +110 -0
  104. package/index-f2c2d1cf.mjs +74 -0
  105. package/main.index.js +1 -1
  106. package/package.json +1 -1
  107. package/shareStore-7de6c7a6.mjs +67 -0
  108. package/style.css +1 -1
  109. package/useCgformList-f3cb9156.mjs +378 -0
  110. package/useExtendComponent-bb98e568.mjs +4460 -0
  111. package/useListButton-98908683.mjs +719 -0
  112. package/{useSchemas-47e45edc.mjs → useSchemas-b074f3a1.mjs} +88 -46
  113. package/useTableSync-075826a1.mjs +89 -0
  114. package/utils-9fce7606.mjs +16 -0
  115. package/AiModal-fe3988fb.mjs +0 -84
  116. package/AuthButtonConfig-d50a0a65.mjs +0 -134
  117. package/AuthButtonTree-589395ed.mjs +0 -156
  118. package/AuthFieldConfig-490fc0ab.mjs +0 -139
  119. package/AuthFieldTree-b7cd091e.mjs +0 -232
  120. package/CgformCopyList-8077ccc6.mjs +0 -250
  121. package/CgformModal-36faf29a.mjs +0 -621
  122. package/CodeFileListModal-0e26b7e0.mjs +0 -158
  123. package/CodeFileViewModal-9d4a5b5f.mjs +0 -248
  124. package/CodeGeneratorModal-b722d976.mjs +0 -238
  125. package/CustomButtonList-37639061.mjs +0 -381
  126. package/DbToOnlineModal-f49b9530.mjs +0 -166
  127. package/JModalTip-4a83aaed.mjs +0 -49
  128. package/JOnlineSearchSelect-34a37ec9.mjs +0 -95
  129. package/LeftRole-7d8c5acc.mjs +0 -86
  130. package/OnlCgformErpList-30e416c8.mjs +0 -470
  131. package/OnlCgformErpSubTable-9a876058.mjs +0 -427
  132. package/OnlCgformInnerTableList-f89b6687.mjs +0 -458
  133. package/OnlCgformTabList-7a2f2c03.mjs +0 -408
  134. package/OnlineAutoList-46c6c8b9.mjs +0 -493
  135. package/OnlineAutoModal-971bef13.mjs +0 -236
  136. package/OnlineAutoTreeList-3b92454c.mjs +0 -502
  137. package/OnlineCustomModal-594244f3.mjs +0 -232
  138. package/OnlineForm-018981b2.mjs +0 -924
  139. package/OnlineFormUrlSuccess-af285b02.mjs +0 -59
  140. package/OnlineQueryForm-998c12a4.mjs +0 -444
  141. package/OnlineTabForm-9ad7d29a.mjs +0 -805
  142. package/SetSwitchOptions-a452fa0f.mjs +0 -62
  143. package/SuperQuery-cbfba908.mjs +0 -975
  144. package/auth.api-d3a6c4b3.mjs +0 -39
  145. package/index-173949bb.mjs +0 -57
  146. package/useCgformList-8755a94e.mjs +0 -426
  147. package/useExtendComponent-bb7cca20.mjs +0 -4295
  148. package/useListButton-7ddb9a46.mjs +0 -697
  149. package/useTableSync-f6089e8a.mjs +0 -87
  150. /package/{OnlineForm.vue_vue_type_style_index_0_scoped_0f9f2964_lang-4ed993c7.mjs → OnlineForm.vue_vue_type_style_index_0_scoped_3f26e7bd_lang-4ed993c7.mjs} +0 -0
@@ -1,697 +0,0 @@
1
- var Pe = Object.defineProperty, Te = Object.defineProperties;
2
- var Oe = Object.getOwnPropertyDescriptors;
3
- var ge = Object.getOwnPropertySymbols;
4
- var Re = Object.prototype.hasOwnProperty, ke = Object.prototype.propertyIsEnumerable;
5
- var he = (a, c, o) => c in a ? Pe(a, c, { enumerable: !0, configurable: !0, writable: !0, value: o }) : a[c] = o, T = (a, c) => {
6
- for (var o in c || (c = {}))
7
- Re.call(c, o) && he(a, o, c[o]);
8
- if (ge)
9
- for (var o of ge(c))
10
- ke.call(c, o) && he(a, o, c[o]);
11
- return a;
12
- }, X = (a, c) => Te(a, Oe(c));
13
- var _ = (a, c, o) => new Promise((R, w) => {
14
- var v = (m) => {
15
- try {
16
- y(o.next(m));
17
- } catch (S) {
18
- w(S);
19
- }
20
- }, f = (m) => {
21
- try {
22
- y(o.throw(m));
23
- } catch (S) {
24
- w(S);
25
- }
26
- }, y = (m) => m.done ? R(m.value) : Promise.resolve(m.value).then(v, f);
27
- y((o = o.apply(a, c)).next());
28
- });
29
- import { E as G, r as Fe } from "./useExtendComponent-bb7cca20.mjs";
30
- import { useRoute as Me } from "vue-router";
31
- import { router as ye } from "/@/router";
32
- import { ref as b, provide as Ie, onBeforeUnmount as Be, toRaw as I, nextTick as be, reactive as de } from "vue";
33
- import { defHttp as O } from "/@/utils/http/axios";
34
- import { useMessage as ve } from "/@/hooks/web/useMessage";
35
- import { filterObj as De } from "/@/utils/common/compUtils";
36
- import { u as Ne, G as $e } from "./useCustomHook-acb00837.mjs";
37
- import { onMountedOrActivated as Ue } from "/@/hooks/core/onMountedOrActivated";
38
- import { useModal as V } from "/@/components/Modal";
39
- import { E as W, b as Ce } from "./constant-fa63bd66.mjs";
40
- import { useMultipleTabStore as _e } from "/@/store/modules/multipleTab";
41
- import { u as Qe } from "./cgformState-d9f8ec42.mjs";
42
- import { pick as Ve } from "lodash-es";
43
- import { Modal as Ke } from "ant-design-vue";
44
- import { useMethods as je } from "/@/hooks/system/useMethods";
45
- import { getToken as Le } from "/@/utils/auth";
46
- import { goJmReportViewPage as ze } 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
- innerSubTableId: "<p>内嵌一对多子表ID",
68
- innerSubTableName: "<p> 内嵌一对多子表名",
69
- mTableSelectedRcordId: "<p>内嵌主表展开行的id",
70
- innerSubTableFk: "<p>内嵌子表的外键字段"
71
- }, Je = {
72
- getColumns: "/online/cgform/api/getColumns/",
73
- getQueryInfo: "/online/cgform/api/getQueryInfo/",
74
- getData: "/online/cgform/api/getData/",
75
- getTreeData: "/online/cgform/api/getTreeData/",
76
- optPre: "/online/cgform/api/form/",
77
- buttonAction: "/online/cgform/api/doButton",
78
- exportXls: "/online/cgform/api/exportXlsOld/",
79
- importXls: "/online/cgform/api/importXls/",
80
- startProcess: "/act/process/extActProcess/startMutilProcess",
81
- getErpColumns: "/online/cgform/api/getErpColumns/",
82
- // 内嵌主题一对多子表数据请求接口
83
- list: "/online/cgform/api/subform/list/"
84
- };
85
- let Ae = {
86
- sortField: "id",
87
- sortType: "asc",
88
- currentPage: 1,
89
- pageSize: 10,
90
- total: 0,
91
- selectedRowKeys: [],
92
- queryParam: {},
93
- acceptHrefParams: {},
94
- description: "",
95
- currentTableName: "",
96
- isDesForm: !1,
97
- desFormCode: "",
98
- cache: !1,
99
- isTree: !1,
100
- hasChildrenField: ""
101
- };
102
- const Se = {
103
- current: 1,
104
- pageSize: 10,
105
- pageSizeOptions: ["10", "20", "30"],
106
- showTotal: (a, c) => c[0] + "-" + c[1] + " 共" + a + "条",
107
- showQuickJumper: !0,
108
- showSizeChanger: !0,
109
- total: 0
110
- }, { createMessage: Q, createErrorModal: qe } = ve();
111
- function dt(a = {}) {
112
- var N;
113
- const c = (N = a.code) != null ? N : "", o = b(c);
114
- Ie("tableId", o);
115
- const R = Me(), w = b(), v = b(), f = b(!1), y = b([]), m = b(!0), S = b(), K = Qe(), Y = _e();
116
- let p = {};
117
- const g = {
118
- execButtonEnhance: function(e, t) {
119
- if (l[G][e])
120
- if (Fe === e)
121
- D(e);
122
- else {
123
- let r = I(t);
124
- return l[G][e].call(l, l, r);
125
- }
126
- else if (l[G][e + "_hook"])
127
- if (t) {
128
- let r = I(t);
129
- D(e + "_hook", r);
130
- } else
131
- D(e + "_hook");
132
- },
133
- /**
134
- * get 是否是树形表单
135
- * @param status 如果有值 则视为set方法
136
- */
137
- isTree: function(e) {
138
- return typeof e == "boolean" ? (l.isTreeTable = e, e) : l.isTreeTable;
139
- }
140
- };
141
- function D(e, t) {
142
- let n = l[G][e].toLocaleString().match($e);
143
- if (n.length > 1) {
144
- let i = n[1];
145
- Z(i, t);
146
- }
147
- }
148
- const l = new Proxy(He, {
149
- get(e, t) {
150
- if (typeof g[t] == "function")
151
- return g[t];
152
- {
153
- let r = p[o.value];
154
- return Reflect.get(r, t);
155
- }
156
- },
157
- set(e, t, r) {
158
- let n = ee();
159
- return Reflect.set(typeof r == "function" ? g : n, t, r);
160
- },
161
- deleteProperty(e, t) {
162
- return t === o.value ? (delete p[t], !0) : !1;
163
- }
164
- }), { executeJsEnhanced: Z } = Ne({}, l);
165
- function x() {
166
- let e = R.params.id;
167
- return e || (e = ""), e;
168
- }
169
- Ue(({ type: e }) => {
170
- !c && A(), e === "activated" && K.checkIsChanged(o.value) && Y.refreshPage(ye), o.value && K.removeChangedTable(o.value);
171
- }), Be(() => {
172
- delete p[o.value];
173
- });
174
- function ee() {
175
- let e = p[o.value];
176
- if (!e) {
177
- let t = Object.assign({}, Ae, { onlineUrl: Je });
178
- e = JSON.parse(JSON.stringify(t)), a.themeTemplate == W && (e.pageSize = 5), p[o.value] = e;
179
- }
180
- return e;
181
- }
182
- function j() {
183
- let e = {}, t = R.query;
184
- t && (Object.keys(t).map((r) => {
185
- e[r] = t[r];
186
- }), l.acceptHrefParams = e);
187
- }
188
- function L(e = "") {
189
- let t;
190
- return e == W ? t = `${l.onlineUrl.getErpColumns}${o.value}` : t = `${l.onlineUrl.getColumns}${o.value}`, new Promise((r, n) => {
191
- O.get(
192
- {
193
- url: t
194
- },
195
- { isTransformResponse: !1 }
196
- ).then((i) => {
197
- i.success ? r(i.result) : (Q.warning(i.message), n());
198
- }).catch(() => {
199
- n();
200
- });
201
- });
202
- }
203
- function k(e = {}) {
204
- const { delNum: t } = e;
205
- return new Promise((r, n) => {
206
- if (t != null) {
207
- const { total: u, pageSize: h, current: d } = f.value, $ = Math.ceil(u / h);
208
- d === $ && (f.value.current = Math.ceil((u - t) / h));
209
- }
210
- let i = z(), s = `${l.onlineUrl.getData}${o.value}`;
211
- l.isTree() === !0 ? s = `${l.onlineUrl.getTreeData}${o.value}` : l.isInnerSubTable === !0 && (s = `${l.onlineUrl.getData}${l.innerSubTableId}`, i = { pageSize: -521 }, l.innerSubTableFk && l.mTableSelectedRcordId && (i[l.innerSubTableFk] = l.mTableSelectedRcordId)), l.isErpSubTable === !0 && (i[l.foreignKeyField] = l.foreignKeyValue, i.tabletype = 3, delete i.hasQuery), O.get({ url: s, params: i }, { isTransformResponse: !1 }).then((u) => {
212
- u.success ? (H(u.result), r(!0)) : (u.message === "NO_DB_SYNC" ? qe({
213
- title: "数据库未同步",
214
- content: "请先同步数据库再查看此页面!",
215
- // 点击确定后自动返回上一页
216
- onOk: () => ye.back()
217
- }) : Q.warning(u.message), n(!1));
218
- }).catch(() => {
219
- let u = "请求列表数据异常!";
220
- Q.warning(u), n(!1);
221
- });
222
- });
223
- }
224
- function z() {
225
- const { sortField: e, sortType: t, acceptHrefParams: r, queryParam: n } = l;
226
- let i = {};
227
- l.isTree(), i.hasQuery = "true";
228
- let s = Object.assign({}, i, r, n, { column: e, order: t });
229
- f.value ? (s.pageNo = f.value.current, s.pageSize = f.value.pageSize) : s.pageSize = -521;
230
- let u = se();
231
- return s.superQueryMatchType = u.matchType || "", s.superQueryParams = u.params || "", De(s);
232
- }
233
- function H(e) {
234
- let t = 0;
235
- Number(e.total) > 0 ? (l.isTree() === !0 ? (y.value = F(e.records), be(() => {
236
- J(y.value);
237
- })) : y.value = e.records, t = Number(e.total)) : y.value = [], f.value && (f.value = X(T({}, f.value), { total: t }));
238
- }
239
- function te(e, t, r) {
240
- r && r.order ? (l.sortField = r.field, l.sortType = r.order == "ascend" ? "asc" : "desc") : (l.sortField = "id", l.sortType = "asc"), f.value && (f.value = e), k();
241
- }
242
- function re(e) {
243
- l.description = e.description, l.currentTableName = e.currentTableName, l.isDesForm = e.isDesForm, l.desFormCode = e.desFormCode, l.ID = o.value;
244
- let { acceptHrefParams: t, queryParam: r, superQuery: n, currentPage: i, pageSize: s } = l;
245
- if (j(), r ? w.value && w.value.initDefaultValues(r, t) : l.queryParam = {}, n ? v.value && v.value.initDefaultValues(n) : l.superQuery = { params: "", matchType: "" }, e.paginationFlag == "Y") {
246
- let u = Se.pageSizeOptions;
247
- a.themeTemplate == W && (u = ["5", "10", "30"]), f.value = X(T({}, Se), { current: i, pageSize: s, pageSizeOptions: u });
248
- } else
249
- f.value = !1;
250
- }
251
- function ae() {
252
- return _(this, null, function* () {
253
- m.value = !0, yield be(), m.value = !1;
254
- });
255
- }
256
- const P = {
257
- loadData: k,
258
- getLoadDataParams: z,
259
- reloadTable: ae
260
- };
261
- Object.keys(P).map((e) => {
262
- l[e] = P[e];
263
- });
264
- let le = b(!1);
265
- function ne() {
266
- return _(this, arguments, function* (e = {}) {
267
- f.value && (f.value = X(T({}, f.value), { current: e.mode == "search" || !f.value.current ? 1 : f.value.current })), a.themeTemplate !== W && l.clearSelectedRow(), yield k();
268
- });
269
- }
270
- function F(e) {
271
- if (e)
272
- return e.map((t) => {
273
- let r = l.hasChildrenField;
274
- if (t[r] == "1") {
275
- let n = { id: t.id + "_loadChild", name: "loading...", isLoading: !0 };
276
- n.jeecg_row_key = n.id, t.children = [n];
277
- }
278
- return t;
279
- });
280
- }
281
- const M = b([]);
282
- function ie(e) {
283
- M.value = e;
284
- }
285
- function J(e) {
286
- let t = M.value;
287
- if (t.length > 0) {
288
- const { sortField: r, sortType: n, pidField: i } = l;
289
- let s = Object.assign({}, { column: r, order: n });
290
- s.hasQuery = "in";
291
- let u = Object.assign({});
292
- u.rule = "in", u.type = "text", u.val = t.join(","), u.field = i, u = [u], s.superQueryParams = encodeURI(JSON.stringify(u)), s.superQueryMatchType = "and", s.batchFlag = "true";
293
- let h = `${l.onlineUrl.getTreeData}${o.value}`;
294
- O.get({ url: h, params: s }, { isTransformResponse: !1 }).then((d) => {
295
- if (d.success && d.result.records && d.result.records.length > 0) {
296
- let $ = d.result.records;
297
- const U = /* @__PURE__ */ new Map();
298
- for (let C of $) {
299
- let E = C[i];
300
- if (t.join(",").includes(E)) {
301
- let q = U.get(E);
302
- q == null && (q = []), q.push(C), U.set(E, q);
303
- }
304
- }
305
- let Ee = U, me = (C) => {
306
- C && C.forEach((E) => {
307
- t.includes(E.id) && (E.children = F(Ee.get(E.id)), me(E.children));
308
- });
309
- };
310
- me(e);
311
- }
312
- }).catch(() => {
313
- let d = "loadDataByExpandedRows请求列表数据异常!";
314
- Q.warning(d);
315
- });
316
- } else
317
- return Promise.resolve();
318
- }
319
- function se() {
320
- if (!l.superQuery)
321
- return {};
322
- const {
323
- superQuery: { params: e, matchType: t },
324
- currentTableName: r
325
- } = l;
326
- let n = r + "@", i = [];
327
- if (e.length > 0)
328
- for (let u of e) {
329
- let h = T({}, u), d = h.field;
330
- d.startsWith(n) && (h.field = d.replace(n, "")), i.push(h);
331
- }
332
- let s = i.length > 0 ? JSON.stringify(i) : "";
333
- return {
334
- params: encodeURIComponent(s),
335
- matchType: t
336
- };
337
- }
338
- const B = b(!1);
339
- function oe(e, t) {
340
- l.superQuery = {
341
- params: e,
342
- matchType: t
343
- }, e.length == 0 || e.length == null ? B.value = !1 : B.value = !0, f.value.current = 1, k();
344
- }
345
- const [ue, { openModal: ce }] = V();
346
- function fe(e) {
347
- if (e || (e = {}), !e.row) {
348
- let t = l.selectedRows;
349
- if (!t || t.length == 0 || t.length > 1) {
350
- Q.warning("请选择一条数据");
351
- return;
352
- }
353
- e.row = t[0];
354
- }
355
- e.code = o.value, ce(!0, e);
356
- }
357
- l.openCustomModal = fe;
358
- function A() {
359
- let e = x();
360
- o.value = e;
361
- }
362
- !c && !o.value && A();
363
- function pe(e) {
364
- let t = e.head.extConfigJson;
365
- t && (S.value = JSON.parse(t));
366
- }
367
- return T({
368
- ID: o,
369
- onlineQueryFormOuter: w,
370
- superQueryButtonRef: v,
371
- loading: le,
372
- reload: ne,
373
- dataSource: y,
374
- pagination: f,
375
- tableReloading: m,
376
- handleSpecialConfig: re,
377
- onlineTableContext: l,
378
- handleChangeInTable: te,
379
- getColumnList: L,
380
- getTreeDataByResult: F,
381
- expandedRowKeys: M,
382
- handleExpandedRowsChange: ie,
383
- onlineExtConfigJson: S,
384
- handleFormConfig: pe,
385
- superQueryStatus: B,
386
- handleSuperQuery: oe,
387
- registerCustomModal: ue
388
- }, P);
389
- }
390
- const we = "onl_";
391
- function mt(a, c, o = {}) {
392
- const R = {
393
- add: !0,
394
- addSub: !0,
395
- update: !0,
396
- delete: !0,
397
- batch_delete: !0,
398
- import: !0,
399
- export: !0,
400
- detail: !0,
401
- super_query: !0,
402
- bpm: !0
403
- }, [w, { openModal: v }] = V(), [f, { openModal: y }] = V(), [m, { openModal: S }] = V(), [K, { openModal: Y }] = V(), { createMessage: p } = ve(), g = de(R), D = de([]), l = de([]);
404
- function Z(e) {
405
- if (D.length = 0, l.length = 0, e && e.length > 0)
406
- for (let t = 0; t < e.length; t++) {
407
- let r = Ve(e[t], "buttonCode", "buttonName", "buttonStyle", "optType", "exp", "buttonIcon");
408
- r.buttonStyle == "button" ? l.push(r) : r.buttonStyle == "link" && D.push(r);
409
- }
410
- }
411
- function x(e) {
412
- Object.keys(g).forEach((t) => {
413
- g[t] = !0;
414
- }), e && e.length > 0 && Object.keys(g).forEach((t) => {
415
- e.indexOf(t) >= 0 && (g[t] = !1);
416
- });
417
- }
418
- function ee(e) {
419
- let t = { isUpdate: !1 };
420
- e && (t.param = e), v(!0, t);
421
- }
422
- function j(e) {
423
- a.beforeEdit(e).then(() => {
424
- v(!0, {
425
- isUpdate: !0,
426
- record: e
427
- });
428
- }).catch((t) => {
429
- p.warning(t);
430
- });
431
- }
432
- const L = (e) => ({
433
- label: "删除",
434
- popConfirm: {
435
- title: "是否删除?",
436
- confirm: k.bind(null, e)
437
- }
438
- });
439
- function k(e) {
440
- a.beforeDelete(e).then(() => {
441
- M(e.id, !1);
442
- }).catch((t) => {
443
- p.warning(t);
444
- });
445
- }
446
- function z(e) {
447
- let t = P(e), r = t && (t == "1" || t == "3" || t == "4") || !t;
448
- return I(g.update) === !0 && r ? [
449
- {
450
- label: "编辑",
451
- onClick: (n) => {
452
- o.editClickCallback && o.editClickCallback(e.id, n), j(e);
453
- }
454
- }
455
- ] : [];
456
- }
457
- function H(e) {
458
- return {
459
- label: "提交流程",
460
- popConfirm: {
461
- title: "确认提交流程吗?",
462
- confirm: F.bind(null, e)
463
- }
464
- };
465
- }
466
- function te(e) {
467
- return {
468
- label: "审批进度",
469
- onClick: re.bind(null, e)
470
- };
471
- }
472
- function re(e) {
473
- const { currentTableName: t } = a;
474
- let r = t;
475
- t.includes("$") && (r = t.split("$")[0]);
476
- let n = we + r, i = e.id;
477
- Y(!0, {
478
- flowCode: n,
479
- dataId: i
480
- });
481
- }
482
- function ae(e, t = {}) {
483
- let r = [];
484
- if (I(g.detail) === !0 && r.push({
485
- label: "详情",
486
- onClick: le.bind(null, e)
487
- }), t.themeTemplate != Ce && a.hasBpmStatus === !0 && I(g.bpm) === !0) {
488
- let u = P(e);
489
- !u || u == "1" ? r.push(H(e)) : r.push(te(e));
490
- }
491
- if (c.value) {
492
- let { reportPrintShow: u, reportPrintUrl: h } = c.value;
493
- u && h && r.push({
494
- label: "打印",
495
- onClick() {
496
- let d = h, $ = e.id, U = Le();
497
- ze(d, $, U);
498
- }
499
- });
500
- }
501
- let n = P(e), i = n && n == "1" || !n;
502
- I(g.delete) === !0 && i && r.push(L(e));
503
- let s = D;
504
- if (s && s.length > 0)
505
- for (let u of s)
506
- pe(u.exp || "", e) === !0 && r.push({
507
- label: u.buttonName,
508
- onClick: J.bind(null, e, u.buttonCode, u.optType)
509
- });
510
- return r;
511
- }
512
- function P(e) {
513
- const t = "bpm_status";
514
- let r = e[t];
515
- return r || (r = e[t.toUpperCase()]), r;
516
- }
517
- function le(e) {
518
- S(!0, {
519
- isUpdate: !0,
520
- disableSubmit: !0,
521
- record: e
522
- });
523
- }
524
- function ne(e) {
525
- const {
526
- currentTableName: t,
527
- onlineUrl: { startProcess: r }
528
- } = a;
529
- let n = t;
530
- t.includes("$") && (n = t.split("$")[0]);
531
- let i = {
532
- url: r,
533
- params: {
534
- flowCode: we + n,
535
- id: e.id,
536
- // TODO 流程表单没有
537
- formUrl: "modules/bpm/task/form/OnlineFormDetail",
538
- formUrlMobile: "check/onlineForm/detail"
539
- }
540
- }, s = { isTransformResponse: !1 };
541
- return new Promise((u, h) => {
542
- O.post(i, s).then((d) => {
543
- d.success ? (u(d), p.success(d.message)) : (h(), p.warning(d.message));
544
- });
545
- });
546
- }
547
- function F(e) {
548
- return _(this, null, function* () {
549
- yield ne(e), a.loadData();
550
- });
551
- }
552
- function M(e, t = !0) {
553
- let r = `${a.onlineUrl.optPre}${a.ID}/${e}`;
554
- return a.isErpSubTable === !0 && (r = `${r}?tabletype=3`), new Promise((n, i) => {
555
- O.delete(
556
- {
557
- url: r
558
- },
559
- { isTransformResponse: !1 }
560
- ).then((s) => {
561
- s.success ? (p.success(s.message), a.loadData({ delNum: e.split(",").length }), t || o.singleDelCallback && o.singleDelCallback(e), n(!0)) : (p.warning(s.message), i());
562
- });
563
- });
564
- }
565
- function ie() {
566
- let e = a.selectedRowKeys;
567
- if (e.length <= 0)
568
- return p.warning("请选择一条记录!"), !1;
569
- {
570
- let t = [];
571
- e.forEach(function(n) {
572
- let i = n;
573
- i && i.endsWith("_loadChild") && (i = i.replace("_loadChild", "")), t.indexOf(i) < 0 && t.push(i);
574
- });
575
- let r = t.join(",");
576
- Ke.confirm({
577
- title: "确认删除",
578
- content: "是否删除选中数据",
579
- okText: "确认",
580
- cancelText: "取消",
581
- onOk: () => _(this, null, function* () {
582
- yield M(r), a.clearSelectedRow();
583
- })
584
- });
585
- }
586
- }
587
- function J(e, t, r) {
588
- if (r == "js")
589
- a.execButtonEnhance(t, e);
590
- else if (r == "action") {
591
- let n = {
592
- formId: a.ID,
593
- buttonCode: t,
594
- dataId: e.id
595
- }, i = `${a.onlineUrl.buttonAction}`;
596
- O.post(
597
- {
598
- url: i,
599
- params: n
600
- },
601
- { isTransformResponse: !1 }
602
- ).then((s) => {
603
- s.success ? (a.loadData(), p.success("处理完成!")) : p.warning(s.message);
604
- });
605
- }
606
- }
607
- function se(e) {
608
- a.execButtonEnhance(e);
609
- }
610
- function B(e) {
611
- let t = a.selectedRowKeys;
612
- if (!t || t.length == 0)
613
- return p.warning("请先选中一条记录"), !1;
614
- let r = t.join(","), n = {
615
- formId: a.ID,
616
- buttonCode: e,
617
- dataId: r
618
- }, i = `${a.onlineUrl.buttonAction}`;
619
- O.post(
620
- {
621
- url: i,
622
- params: n
623
- },
624
- { isTransformResponse: !1 }
625
- ).then((s) => {
626
- s.success ? (a.loadData(), a.clearSelectedRow(), p.success("处理完成!")) : p.warning(s.message);
627
- });
628
- }
629
- function oe() {
630
- a.foreignKeyField && a.foreignKeyValue ? y(!0, {
631
- [a.foreignKeyField]: a.foreignKeyValue
632
- }) : y(!0);
633
- }
634
- const ue = () => {
635
- let e = `${a.onlineUrl.importXls}${a.ID}`;
636
- return a.isErpSubTable === !0 && (e = `${e}?tabletype=3`), e;
637
- }, { handleExportXlsx: ce } = je();
638
- function fe() {
639
- let e = a.getLoadDataParams(), t = a.selectedRowKeys;
640
- t && t.length > 0 && (e.selections = t.join(","));
641
- let r = {};
642
- a.isErpSubTable === !0 && (r = { tabletype: 3 }, a.foreignKeyField && a.foreignKeyValue && (e[a.foreignKeyField] = a.foreignKeyValue));
643
- let n = JSON.stringify(De(e)), i = `${a.onlineUrl.exportXls}${a.ID}`;
644
- const s = a.description;
645
- return ce(s, i, T({ paramsStr: n }, r));
646
- }
647
- function A(e, t) {
648
- const r = [];
649
- e.split("||").forEach((i) => {
650
- const s = [];
651
- i.trim().split("&&").forEach((u) => {
652
- s.push(N(u.trim(), t));
653
- }), r.push(s.join("&&"));
654
- });
655
- const n = r.join("||");
656
- return new Function(`return ${n}`)();
657
- }
658
- function pe(e, t) {
659
- return !e || e == "" ? !0 : e.indexOf("||") == -1 && e.indexOf("&&") == -1 ? N(e, t) : A(e, t);
660
- }
661
- function N(e, t) {
662
- if (!e || e == "")
663
- return !0;
664
- let r = e.split("#"), n = t[r[0]], i = r[1].toLowerCase();
665
- return i === "eq" ? n == r[2] : i === "ne" ? n != r[2] : i === "empty" ? r[2] === "true" ? !n || n == "" : n && n.length > 0 : i === "in" ? r[2].split(",").indexOf(String(n)) >= 0 : !1;
666
- }
667
- return {
668
- buttonSwitch: g,
669
- cgLinkButtonList: D,
670
- cgTopButtonList: l,
671
- importUrl: ue,
672
- registerModal: w,
673
- handleAdd: ee,
674
- handleEdit: j,
675
- handleBatchDelete: ie,
676
- registerImportModal: f,
677
- onImportExcel: oe,
678
- onExportExcel: fe,
679
- getDropDownActions: ae,
680
- getActions: z,
681
- cgButtonJsHandler: se,
682
- cgButtonActionHandler: B,
683
- cgButtonLinkHandler: J,
684
- initButtonList: Z,
685
- initButtonSwitch: x,
686
- getDeleteButton: L,
687
- handleSubmitFlow: F,
688
- getSubmitFlowButton: H,
689
- registerDetailModal: m,
690
- registerBpmModal: K,
691
- openDetailModal: S
692
- };
693
- }
694
- export {
695
- mt as a,
696
- dt as u
697
- };