@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,805 +0,0 @@
1
- var wt = Object.defineProperty;
2
- var ye = Object.getOwnPropertySymbols;
3
- var St = Object.prototype.hasOwnProperty, Ct = Object.prototype.propertyIsEnumerable;
4
- var ve = (r, c, i) => c in r ? wt(r, c, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[c] = i, R = (r, c) => {
5
- for (var i in c || (c = {}))
6
- St.call(c, i) && ve(r, i, c[i]);
7
- if (ye)
8
- for (var i of ye(c))
9
- Ct.call(c, i) && ve(r, i, c[i]);
10
- return r;
11
- };
12
- var _ = (r, c, i) => new Promise((a, V) => {
13
- var T = (h) => {
14
- try {
15
- y(i.next(h));
16
- } catch (p) {
17
- V(p);
18
- }
19
- }, O = (h) => {
20
- try {
21
- y(i.throw(h));
22
- } catch (p) {
23
- V(p);
24
- }
25
- }, y = (h) => h.done ? a(h.value) : Promise.resolve(h.value).then(T, O);
26
- y((i = i.apply(r, c)).next());
27
- });
28
- import { useMessage as kt } from "/@/hooks/web/useMessage";
29
- import { ref as m, reactive as Ot, computed as Pt, watch as Vt, resolveComponent as v, openBlock as C, createElementBlock as U, normalizeClass as xt, createVNode as k, withCtx as A, createBlock as q, Fragment as Rt, renderList as At, normalizeStyle as Mt, createElementVNode as oe, createCommentVNode as $, renderSlot as Dt, unref as Fe, nextTick as _e, toRaw as M, pushScopeId as Et, popScopeId as It } from "vue";
30
- import { BasicForm as jt, useForm as Bt } from "/@/components/Form/index";
31
- import { c as Nt, O as Lt, d as Jt, e as Ut, u as qt, l as K, g as Kt, V as j, S as Ht, f as Wt, h as Te } from "./useExtendComponent-bb7cca20.mjs";
32
- import { defHttp as ee } from "/@/utils/http/axios";
33
- import { pick as Gt, omit as we } from "lodash-es";
34
- import { sleep as zt, goJmReportViewPage as Qt } from "/@/utils";
35
- import { Loading as Yt } from "/@/components/Loading";
36
- import { getToken as Xt } from "/@/utils/auth";
37
- import { PrinterOutlined as Zt, DiffOutlined as $t, FormOutlined as eo } from "@ant-design/icons-vue";
38
- import { useModal as to } from "/@/components/Modal";
39
- import { u as oo, G as lo } from "./useCustomHook-acb00837.mjs";
40
- import { useAppInject as no } from "/@/hooks/web/useAppInject";
41
- import { _ as ao } from "./index-173949bb.mjs";
42
- import "/@/components/Form/src/componentMap";
43
- import "/@/utils/propTypes";
44
- import "./constant-fa63bd66.mjs";
45
- import "/@/components/Form/src/jeecg/components/JUpload";
46
- import "/@/utils/is";
47
- import "/@/views/system/user/user.api";
48
- import "/@/store/modules/user";
49
- import "/@/utils/desform/customExpression";
50
- import "/@/store/modules/permission";
51
- import "/@/utils/dict/JDictSelectUtil";
52
- import "/@/utils/common/compUtils";
53
- import "/@/components/Table";
54
- import "/@/hooks/system/useListPage";
55
- import "vue-router";
56
- import "/@/components/Form/src/utils/Area";
57
- import "/@/components/Preview/index";
58
- import "./LinkTableListPiece-2660d709.mjs";
59
- import "/@/api/common/api";
60
- import "/@/assets/images/placeholderImage.png";
61
- import "./OnlineSelectCascade-471fcc76.mjs";
62
- import "./JModalTip-4a83aaed.mjs";
63
- import "ant-design-vue";
64
- import "@vueuse/core";
65
- import "/@/utils/cache";
66
- import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
67
- const te = {
68
- optPre: "/online/cgform/api/form/",
69
- urlButtonAction: "/online/cgform/api/doButton"
70
- }, io = {
71
- name: "OnlineTabForm",
72
- components: {
73
- BasicForm: jt,
74
- Loading: Yt,
75
- OnlineSubForm: Nt,
76
- PrinterOutlined: Zt,
77
- DiffOutlined: $t,
78
- FormOutlined: eo,
79
- OnlinePopModal: Lt
80
- },
81
- props: {
82
- id: {
83
- type: String,
84
- default: ""
85
- },
86
- formTemplate: {
87
- type: Number,
88
- default: 1
89
- },
90
- disabled: {
91
- type: Boolean,
92
- default: !1
93
- },
94
- isTree: {
95
- type: Boolean,
96
- default: !1
97
- },
98
- pidField: {
99
- type: String,
100
- default: ""
101
- },
102
- submitTip: {
103
- type: Boolean,
104
- default: !0
105
- },
106
- modalClass: {
107
- type: String,
108
- default: ""
109
- },
110
- themeTemplate: {
111
- type: String,
112
- default: ""
113
- },
114
- tabIndex: {
115
- type: String,
116
- default: ""
117
- }
118
- },
119
- emits: ["success", "rendered", "toggleTab"],
120
- setup(r, { emit: c }) {
121
- const { createMessage: i } = kt(), a = m(null), V = m(!0), T = m(!1), O = m(1), y = m(""), h = m(!1), p = m(!1), { getIsMobile: B } = no(), H = m(!B.value), P = Ot({
122
- reportPrintShow: 0,
123
- reportPrintUrl: "",
124
- joinQuery: 0,
125
- modelFullscreen: 0,
126
- modalMinWidth: "",
127
- commentStatus: 0
128
- }), { onlineFormContext: f, resetContext: W } = Jt(), {
129
- formSchemas: D,
130
- defaultValueFields: s,
131
- changeDataIfArray2String: N,
132
- tableName: d,
133
- dbData: w,
134
- checkOnlyFieldValue: Se,
135
- hasSubTable: Ce,
136
- subTabInfo: E,
137
- refMap: G,
138
- subDataSource: L,
139
- baseColProps: ke,
140
- createFormSchemas: Oe,
141
- fieldDisplayStatus: I,
142
- labelCol: Pe,
143
- wrapperCol: Ve,
144
- labelWidth: xe
145
- } = Ut(r, a);
146
- let { EnhanceJS: u, initCgEnhanceJs: Re } = qt(f, !1);
147
- const { executeJsEnhanced: Ae } = oo({}, f), [Me, { setProps: De, validate: le, resetFields: ne, clearValidate: Ee, setFieldsValue: S, updateSchema: z, getFieldsValue: Q, scrollToField: ae }] = Bt({
148
- schemas: D,
149
- showActionButtonGroup: !1,
150
- baseColProps: ke,
151
- // update-begin--author:liaozhiyang---date:20240329---for:【QQYUN-7872】online表单label较长优化
152
- labelWidth: xe,
153
- // update-end--author:liaozhiyang---date:20240329---for:【QQYUN-7872】online表单label较长优化
154
- // update-begin--author:liaozhiyang---date:20240105---for:【QQYUN-7499】多列风格富文本、markdown增加独占一行功能
155
- labelCol: Pe,
156
- wrapperCol: Ve
157
- // update-end--author:liaozhiyang---date:20240105---for:【QQYUN-7499】多列风格富文本、markdown增加独占一行功能
158
- }), ie = m(!1);
159
- function Ie() {
160
- let e = r.disabled;
161
- ie.value = e, De({ disabled: e });
162
- }
163
- function je(e, t, o) {
164
- return _(this, null, function* () {
165
- yield Be(), y.value = "", yield ne(), setTimeout(() => {
166
- Ee();
167
- }, 0), w.value = "";
168
- let l = Fe(e);
169
- p.value = l, l ? yield se(t) : ue(), _e(() => {
170
- !l && o && S(o), Ne(), Y("js", "loaded"), Ie();
171
- });
172
- });
173
- }
174
- function Be() {
175
- return _(this, null, function* () {
176
- if (r.isTree === !0) {
177
- let e = r.pidField, t = D.value;
178
- t && t.length > 0 && t.filter((l) => l.field === e).length > 0 && (yield z({
179
- field: e,
180
- componentProps: {
181
- reload: (/* @__PURE__ */ new Date()).getTime(),
182
- // update-begin--author:liaozhiyang---date:20240529---for:【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
183
- hiddenNodeKey: ""
184
- // update-end--author:liaozhiyang---date:20240529---for:【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
185
- }
186
- }));
187
- }
188
- });
189
- }
190
- function Ne() {
191
- if (Fe(p) === !1) {
192
- let e = M(s[d.value]);
193
- K(e, (t) => {
194
- S(t);
195
- });
196
- }
197
- }
198
- function re(e, t) {
199
- let o = M(s[e.key]);
200
- K(o, (l) => {
201
- const { row: n, target: g } = t;
202
- let F = [{ rowKey: n.id, values: R({}, l) }];
203
- g.setValues(F);
204
- });
205
- }
206
- function se(e) {
207
- return _(this, null, function* () {
208
- let t = yield Je(e.id);
209
- w.value = Object.assign({}, e, t);
210
- let o = Le.value, l = Gt(t, ...o);
211
- r.disabled && Object.keys(l).map((n) => {
212
- !l[n] && l[n] !== 0 && l[n] !== "0" && delete l[n];
213
- }), yield S(l), ue(t);
214
- });
215
- }
216
- function ue(e) {
217
- e || (e = {});
218
- let t = Object.keys(L.value);
219
- if (t && t.length > 0) {
220
- let o = {};
221
- for (let l of t)
222
- o[l] = e[l] || [];
223
- L.value = o;
224
- }
225
- }
226
- let Le = Pt(() => {
227
- let e = D.value, t = [];
228
- for (let o of e)
229
- t.push(o.field);
230
- return t;
231
- });
232
- function Je(e) {
233
- let t = `${te.optPre}${r.id}/${e}`;
234
- return new Promise((o, l) => {
235
- ee.get({ url: t }, { isTransformResponse: !1 }).then((n) => {
236
- n.success ? o(n.result) : (l(), i.warning(n.message));
237
- }).catch(() => {
238
- l();
239
- });
240
- });
241
- }
242
- function Ue(e) {
243
- return _(this, null, function* () {
244
- O.value = e.head.tableType, d.value = e.head.tableName, V.value = e.head.tableType == 1, He(e.head.extConfigJson), Oe(e.schema.properties, e.schema.required, Se, P), u = Re(e.enhanceJs), c("rendered", P);
245
- let t = yield Kt(a);
246
- t.$formValueChange = (o, l, n) => {
247
- rt(o, l), n && S(n), qe(o, l, n);
248
- }, u && u.setup && me(u.setup);
249
- });
250
- }
251
- function qe(e, t, o) {
252
- f.changEvent(e, t, o);
253
- }
254
- function Ke(e) {
255
- f.addObject2Context("changEvent", e);
256
- }
257
- function He(e) {
258
- let t = { reportPrintShow: 0, reportPrintUrl: "", joinQuery: 0, modelFullscreen: 0, modalMinWidth: "", commentStatus: 0, formLabelLength: null };
259
- e && (t = JSON.parse(e)), Object.keys(t).map((o) => {
260
- P[o] = t[o];
261
- });
262
- }
263
- function We() {
264
- V.value === !0 ? Xe() : Ge();
265
- }
266
- function Ge() {
267
- ze().then((e) => {
268
- ce(e);
269
- });
270
- }
271
- function ze() {
272
- let e = {};
273
- return new Promise((t, o) => {
274
- le().then(
275
- (l) => t(l),
276
- ({ errorFields: l }) => {
277
- o({
278
- code: j,
279
- key: d.value,
280
- // 滚动到未通过校验的字段上
281
- scrollToField: () => l[0] && ae(l[0].name, { behavior: "smooth", block: "center" })
282
- });
283
- }
284
- );
285
- }).then((t) => (Object.assign(e, N(t)), Ye())).then((t) => (Object.assign(e, t), Promise.resolve(e))).catch((t) => ((t === j || (t == null ? void 0 : t.code) === j) && (i.warning("校验未通过"), t.key && (Qe(t.key), t.scrollToField && setTimeout(() => t.scrollToField(), 150))), Promise.reject(null)));
286
- }
287
- function Qe(e) {
288
- if (e === d.value) {
289
- c("toggleTab", "-1");
290
- return;
291
- }
292
- let t = E.value;
293
- for (let o = 0; o < t.length; o++)
294
- if (e == t[o].key) {
295
- let l = o + "";
296
- if (J.value === l)
297
- break;
298
- if (c("toggleTab", l), t[o].relationType === 0) {
299
- let n = b(e);
300
- zt(300, () => n == null ? void 0 : n.validateTable());
301
- }
302
- break;
303
- }
304
- }
305
- function Ye() {
306
- return new Promise((e, t) => _(this, null, function* () {
307
- let o = {};
308
- try {
309
- let l = E.value;
310
- for (let n = 0; n < l.length; n++) {
311
- let g = l[n].key, F = b(g);
312
- if (l[n].relationType == 1)
313
- try {
314
- let x = yield F.getAll();
315
- o[g] = [], o[g].push(x);
316
- } catch (x) {
317
- return t(R({ code: j, key: g }, x));
318
- }
319
- else {
320
- if (yield F.fullValidateTable())
321
- return t({ code: j, key: g });
322
- o[g] = F.getTableData();
323
- }
324
- }
325
- } catch (l) {
326
- t(l);
327
- }
328
- e(o);
329
- }));
330
- }
331
- function Xe() {
332
- return _(this, null, function* () {
333
- try {
334
- let e = yield le();
335
- e = Object.assign({}, w.value, e), e = N(e), T.value = !0, ce(e);
336
- } catch (e) {
337
- Array.isArray(e == null ? void 0 : e.errorFields) && e.errorFields[0] && ae(e.errorFields[0].name, { behavior: "smooth", block: "center" });
338
- } finally {
339
- T.value = !1;
340
- }
341
- });
342
- }
343
- function ce(e) {
344
- ct(be, e).then(() => {
345
- Ze(e);
346
- }).catch((t) => {
347
- i.warning(t);
348
- });
349
- }
350
- function Ze(e) {
351
- Object.keys(e).map((n) => {
352
- Array.isArray(e[n]) && e[n].length == 0 && (e[n] = "");
353
- });
354
- let t = y.value, o = `${te.optPre}${r.id}?tabletype=${O.value}`;
355
- t && (o = `${t}?tabletype=${O.value}`), h.value === !0 && (e[Ht] = 1);
356
- let l = p.value === !0 ? "put" : "post";
357
- ee.request({ url: o, method: l, params: e }, { isTransformResponse: !1 }).then((n) => {
358
- n.success ? (n.result && (e[Wt] = n.result), c("success", e), r.submitTip === !0 && i.success(n.message)) : i.warning(n.message);
359
- }).finally(() => {
360
- T.value = !1;
361
- });
362
- }
363
- function $e(e, t, o) {
364
- t && o ? o.vxeProps ? o.setValues([
365
- {
366
- rowKey: t,
367
- values: e
368
- }
369
- ]) : o.setValues(e) : S(e);
370
- }
371
- function et(e, t) {
372
- let o = {};
373
- o[e] = t, S(o);
374
- }
375
- const J = m("0"), fe = m("auto"), de = m(340);
376
- function tt(e) {
377
- if (p.value === !0) {
378
- let t = w.value;
379
- return ot(t, e);
380
- }
381
- return "";
382
- }
383
- Vt(
384
- () => r.tabIndex,
385
- (e) => {
386
- J.value = e;
387
- },
388
- {
389
- immediate: !0
390
- }
391
- );
392
- function ot(e, t) {
393
- if (e) {
394
- let o = e[t];
395
- return !o && o !== 0 && (o = e[t.toLowerCase()], !o && o !== 0 && (o = e[t.toUpperCase()])), o;
396
- }
397
- return "";
398
- }
399
- function lt(e, t) {
400
- if (u && u[t + "_onlChange"]) {
401
- let o = u[t + "_onlChange"](), l = Object.keys(e)[0];
402
- if (o[l]) {
403
- let g = b(t).getFormEvent(), F = R({
404
- column: { key: l },
405
- value: e[l]
406
- }, g);
407
- o[l].call(f, f, F);
408
- }
409
- }
410
- }
411
- function nt(e, t) {
412
- if (u && u[t + "_onlChange"]) {
413
- let o = u[t + "_onlChange"](f);
414
- if (e.column === "all") {
415
- let l = Object.keys(o);
416
- if (l.length > 0)
417
- for (let n of l)
418
- o[n].call(f, f, e);
419
- } else {
420
- let l = e.column.key || e.col.key;
421
- o[l] && e.row && e.row.id && o[l].call(f, f, e);
422
- }
423
- }
424
- }
425
- function at(e, t) {
426
- t.isModalData || re(e, t);
427
- }
428
- function it(e) {
429
- return "online_" + e + ":";
430
- }
431
- function rt(e, t) {
432
- return _(this, null, function* () {
433
- if (!u || !u.onlChange || !e)
434
- return !1;
435
- let o = u.onlChange();
436
- if (o[e]) {
437
- let n = {
438
- row: yield Q(),
439
- column: { key: e },
440
- value: t
441
- };
442
- o[e].call(f, f, n);
443
- }
444
- });
445
- }
446
- function me(e) {
447
- let o = e.toLocaleString().match(lo);
448
- if (o.length > 1) {
449
- let l = o[1];
450
- Ae(l);
451
- }
452
- }
453
- function Y(e, t) {
454
- if (e == "js") {
455
- let o = t + "_hook";
456
- u && u[t] ? u[t].call(f, f) : u && u[o] && me(u[o]);
457
- } else if (e == "action") {
458
- let o = w.value, l = {
459
- formId: r.id,
460
- buttonCode: t,
461
- dataId: o.id,
462
- uiFormData: Object.assign({}, o)
463
- };
464
- ee.post(
465
- {
466
- url: `${te.urlButtonAction}`,
467
- params: l
468
- },
469
- { isTransformResponse: !1 }
470
- ).then((n) => {
471
- n.success ? i.success("处理完成!") : i.warning("处理失败!");
472
- });
473
- }
474
- }
475
- function pe(e) {
476
- let t = b(e), o = [...t.getNewDataWithId(), ...L.value[e]];
477
- if (!o || o.length == 0)
478
- return !1;
479
- let l = [];
480
- for (let n of o)
481
- l.push(n.id);
482
- t.removeRowsById(l);
483
- }
484
- function ge(e, t) {
485
- if (!t)
486
- return !1;
487
- let o = b(e);
488
- typeof t == "object" ? o.addRows(t, !0) : this.$message.error("添加子表数据,参数不识别!");
489
- }
490
- function st(e, t) {
491
- pe(e), ge(e, t);
492
- }
493
- function ut(e, t) {
494
- !t && t.length <= 0 && (t = []), t.map((o) => {
495
- o.hasOwnProperty("label") || (o.label = o.text);
496
- }), z({
497
- field: e,
498
- componentProps: {
499
- options: t
500
- }
501
- });
502
- }
503
- function ct(e, t) {
504
- return u && u.beforeSubmit ? u.beforeSubmit(e, t) : Promise.resolve();
505
- }
506
- function ft(e, t) {
507
- let o = M(I);
508
- e && e.length > 0 ? Object.keys(o).map((l) => {
509
- !l.endsWith("_load") && e.indexOf(l) < 0 && (I[l] = !1);
510
- }) : t && t.length > 0 && Object.keys(o).map((l) => {
511
- t.indexOf(l) >= 0 && (I[l] = !1);
512
- });
513
- }
514
- function dt(e, t) {
515
- return _(this, null, function* () {
516
- y.value = t, yield ne(), w.value = "", p.value = !0, yield se(e), yield _e(() => {
517
- Y("js", "loaded");
518
- });
519
- });
520
- }
521
- function b(e) {
522
- let t = G[e].value;
523
- if (t instanceof Array && (t = t[0]), !t) {
524
- i.warning("子表ref找不到:" + e);
525
- return;
526
- }
527
- return t;
528
- }
529
- function mt() {
530
- let e = P.reportPrintUrl, t = w.value.id, o = Xt();
531
- Qt(e, t, o);
532
- }
533
- const [pt, { openModal: he }] = to(), X = m(""), Z = m(!0);
534
- function gt(e) {
535
- X.value = e.id, Z.value = !1, he(!0, { isUpdate: !1, tableType: "3" });
536
- }
537
- function ht(e) {
538
- let o = b(e.key).getSelectedData();
539
- if (o.length != 1) {
540
- i.warning("请选择一条数据");
541
- return;
542
- }
543
- X.value = e.id, Z.value = !1, he(!0, { isUpdate: !0, record: o[0] });
544
- }
545
- function bt(e) {
546
- const t = e[Te];
547
- let o = we(e, [Te]);
548
- if (o.id) {
549
- let l = we(R({}, o), "id"), n = [{ rowKey: o.id, values: l }];
550
- b(t).setValues(n);
551
- } else
552
- b(t).addRows(o, { isOnlineJS: !1, setActive: !1, emitChange: !0, isModalData: !0 });
553
- }
554
- function yt() {
555
- let e = E.value;
556
- if (e && e.length > 0) {
557
- for (let t of e)
558
- if (t.relationType != 1) {
559
- let o = b(t.key);
560
- o && o.clearSelection();
561
- }
562
- }
563
- }
564
- function vt() {
565
- let e = Q(), t = M(s[d.value]);
566
- K(
567
- t,
568
- (o) => {
569
- S(o);
570
- },
571
- e
572
- );
573
- }
574
- function Ft(e, t) {
575
- let o = E.value;
576
- if (o && o.length > 0) {
577
- let l = o.filter((n) => n.key === e);
578
- if (l.length == 0)
579
- return;
580
- if (l[0].relationType == 1)
581
- b(e).executeFillRule();
582
- else {
583
- let n = M(s[e]), g = M(t.row);
584
- K(
585
- n,
586
- (F) => {
587
- const { row: x, target: _t } = t;
588
- let Tt = [{ rowKey: x.id, values: R({}, F) }];
589
- _t.setValues(Tt);
590
- },
591
- g
592
- );
593
- }
594
- }
595
- }
596
- let be = {
597
- tableName: d,
598
- loading: T,
599
- subActiveKey: J,
600
- onlineFormRef: a,
601
- getFieldsValue: Q,
602
- setFieldsValue: S,
603
- submitFlowFlag: h,
604
- subFormHeight: fe,
605
- subTableHeight: de,
606
- refMap: G,
607
- triggleChangeValues: $e,
608
- triggleChangeValue: et,
609
- sh: I,
610
- clearSubRows: pe,
611
- addSubRows: ge,
612
- clearThenAddRows: st,
613
- changeOptions: ut,
614
- isUpdate: p,
615
- getSubTableInstance: b,
616
- updateSchema: z,
617
- executeMainFillRule: vt,
618
- executeSubFillRule: Ft,
619
- changEvent: () => {
620
- },
621
- onlineFormValueChange: Ke
622
- };
623
- return W(be), {
624
- //主表
625
- tableName: d,
626
- onlineFormRef: a,
627
- registerForm: Me,
628
- loading: T,
629
- //子表
630
- subActiveKey: J,
631
- hasSubTable: Ce,
632
- subTabInfo: E,
633
- refMap: G,
634
- //一对一子表
635
- subFormHeight: fe,
636
- getSubTableForeignKeyValue: tt,
637
- isUpdate: p,
638
- handleSubFormChange: lt,
639
- //一对多子表
640
- subTableHeight: de,
641
- onlineFormDisabled: ie,
642
- subDataSource: L,
643
- getSubTableAuthPre: it,
644
- handleAdded: at,
645
- handleSubTableDefaultValue: re,
646
- handleValueChange: nt,
647
- openSubFormModalForAdd: gt,
648
- openSubFormModalForEdit: ht,
649
- //父组件调用
650
- show: je,
651
- createRootProperties: Ue,
652
- handleSubmit: We,
653
- sh: I,
654
- handleCgButtonClick: Y,
655
- handleCustomFormSh: ft,
656
- handleCustomFormEdit: dt,
657
- //跳转
658
- dbData: w,
659
- onOpenReportPrint: mt,
660
- onlineExtConfigJson: P,
661
- //一对多子表弹窗操作数据
662
- registerPopModal: pt,
663
- popTableName: X,
664
- getPopFormData: bt,
665
- popModalRequest: Z,
666
- onCloseModal: yt,
667
- rowNumber: H
668
- };
669
- }
670
- }, ro = (r) => (Et("data-v-4a631fb5"), r = r(), It(), r), so = ["id"], uo = { key: 1 }, co = { class: "add" }, fo = /* @__PURE__ */ ro(() => /* @__PURE__ */ oe("svg", {
671
- t: "1714390025804",
672
- class: "icon",
673
- viewBox: "0 0 1024 1024",
674
- version: "1.1",
675
- xmlns: "http://www.w3.org/2000/svg",
676
- "p-id": "50960",
677
- width: "16",
678
- height: "16"
679
- }, [
680
- /* @__PURE__ */ oe("path", {
681
- d: "M469.333333 469.333333V170.666667h85.333334v298.666666h298.666666v85.333334h-298.666666v298.666666h-85.333334v-298.666666H170.666667v-85.333334h298.666666z",
682
- fill: "#fff",
683
- "p-id": "50961"
684
- })
685
- ], -1));
686
- function mo(r, c, i, a, V, T) {
687
- const O = v("BasicForm"), y = v("a-tab-pane"), h = v("online-sub-form"), p = v("diff-outlined"), B = v("a-button"), H = v("form-outlined"), P = v("JVxeTable"), f = v("a-tabs"), W = v("Loading"), D = v("online-pop-modal");
688
- return C(), U("div", {
689
- id: a.tableName + "_form",
690
- class: xt(["onlineFormWrap", [`formTemplate_${i.formTemplate}`]])
691
- }, [
692
- k(f, {
693
- class: "tabTheme",
694
- activeKey: a.subActiveKey,
695
- "onUpdate:activeKey": c[0] || (c[0] = (s) => a.subActiveKey = s)
696
- }, {
697
- default: A(() => [
698
- (C(), q(y, {
699
- tab: "主表",
700
- key: "-1"
701
- }, {
702
- default: A(() => [
703
- k(O, {
704
- ref: "onlineFormRef",
705
- onRegister: a.registerForm
706
- }, null, 8, ["onRegister"])
707
- ]),
708
- _: 1
709
- })),
710
- a.hasSubTable ? (C(!0), U(Rt, { key: 0 }, At(a.subTabInfo, (s, N) => (C(), q(y, {
711
- tab: s.describe,
712
- key: N + "",
713
- forceRender: !0
714
- }, {
715
- default: A(() => [
716
- s.relationType == 1 ? (C(), U("div", {
717
- key: 0,
718
- style: Mt({ "overflow-y": "auto", "overflow-x": "hidden", "max-height": a.subFormHeight + "px" })
719
- }, [
720
- k(h, {
721
- ref_for: !0,
722
- ref: a.refMap[s.key],
723
- table: s.key,
724
- disabled: a.onlineFormDisabled,
725
- "form-template": i.formTemplate,
726
- "main-id": a.getSubTableForeignKeyValue(s.foreignKey),
727
- properties: s.properties,
728
- "required-fields": s.requiredFields,
729
- "is-update": a.isUpdate,
730
- onFormChange: (d) => a.handleSubFormChange(d, s.key)
731
- }, null, 8, ["table", "disabled", "form-template", "main-id", "properties", "required-fields", "is-update", "onFormChange"])
732
- ], 4)) : (C(), U("div", uo, [
733
- k(P, {
734
- ref_for: !0,
735
- ref: a.refMap[s.key],
736
- toolbar: "",
737
- "keep-source": "",
738
- "row-number": a.rowNumber,
739
- "row-selection": "",
740
- height: (
741
- // 【VUEN-803】一对多子表固定340高度,修复自定义列组件被遮挡的问题
742
- a.subTableHeight
743
- ),
744
- disabled: a.onlineFormDisabled,
745
- columns: s.columns,
746
- dataSource: a.subDataSource[s.key],
747
- onValueChange: (d) => a.handleValueChange(d, s.key),
748
- authPre: a.getSubTableAuthPre(s.key),
749
- onAdded: (d) => a.handleAdded(s, d),
750
- onExecuteFillRule: (d) => a.handleSubTableDefaultValue(s, d)
751
- }, {
752
- toolbarSuffix: A(() => [
753
- a.onlineFormDisabled ? $("", !0) : (C(), q(B, {
754
- key: 0,
755
- type: "primary",
756
- onClick: (d) => a.openSubFormModalForAdd(s)
757
- }, {
758
- default: A(() => [
759
- oe("div", co, [
760
- fo,
761
- k(p)
762
- ])
763
- ]),
764
- _: 2
765
- }, 1032, ["onClick"])),
766
- a.onlineFormDisabled ? $("", !0) : (C(), q(B, {
767
- key: 1,
768
- type: "primary",
769
- onClick: (d) => a.openSubFormModalForEdit(s)
770
- }, {
771
- default: A(() => [
772
- k(H)
773
- ]),
774
- _: 2
775
- }, 1032, ["onClick"]))
776
- ]),
777
- _: 2
778
- }, 1032, ["row-number", "height", "disabled", "columns", "dataSource", "onValueChange", "authPre", "onAdded", "onExecuteFillRule"])
779
- ]))
780
- ]),
781
- _: 2
782
- }, 1032, ["tab"]))), 128)) : $("", !0)
783
- ]),
784
- _: 1
785
- }, 8, ["activeKey"]),
786
- k(W, {
787
- loading: a.loading,
788
- absolute: !1
789
- }, null, 8, ["loading"]),
790
- Dt(r.$slots, "bottom", {}, void 0, !0),
791
- k(D, {
792
- formTableType: "3",
793
- request: a.popModalRequest,
794
- id: a.popTableName,
795
- onRegister: a.registerPopModal,
796
- onSuccess: a.getPopFormData,
797
- topTip: "",
798
- isVxeTableData: ""
799
- }, null, 8, ["request", "id", "onRegister", "onSuccess"])
800
- ], 10, so);
801
- }
802
- const el = /* @__PURE__ */ ao(io, [["render", mo], ["__scopeId", "data-v-4a631fb5"]]);
803
- export {
804
- el as default
805
- };