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