@jeecg/online 3.6.2-GA → 3.7.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AiModal-fe3988fb.mjs +84 -0
- package/AuthButtonConfig-d50a0a65.mjs +134 -0
- package/{AuthButtonTree-c2602a7c.mjs → AuthButtonTree-589395ed.mjs} +2 -2
- package/AuthDataConfig-7bb0cd85.mjs +237 -0
- package/{AuthDataTree-9dc58b20.mjs → AuthDataTree-6e3bb86f.mjs} +1 -1
- package/AuthFieldConfig-490fc0ab.mjs +139 -0
- package/{AuthFieldTree-d836be59.mjs → AuthFieldTree-b7cd091e.mjs} +1 -1
- package/AuthManagerDrawer-5e2ed5ce.mjs +118 -0
- package/AuthSetterModal-6f74449c.mjs +273 -0
- package/{CgformCopyList-86157923.mjs → CgformCopyList-8077ccc6.mjs} +47 -45
- package/{CgformModal-5cf02d51.mjs → CgformModal-36faf29a.mjs} +256 -246
- package/{CgreportModal.vue_vue_type_script_setup_true_lang-c2ceb064.mjs → CgreportModal-5a23d089.mjs} +140 -117
- package/CheckDictTable-b5cb0e2b.mjs +226 -0
- package/{CodeFileListModal-f747daae.mjs → CodeFileListModal-0e26b7e0.mjs} +2 -2
- package/{CodeFileViewModal-a9fb2900.mjs → CodeFileViewModal-9d4a5b5f.mjs} +36 -32
- package/CodeGeneratorModal-b722d976.mjs +238 -0
- package/{CustomButtonList-b9b27a93.mjs → CustomButtonList-37639061.mjs} +118 -100
- package/{DBAttributeTable-6bdcb1e8.mjs → DBAttributeTable-95dc66c1.mjs} +110 -89
- package/{DbToOnlineModal-3705e91a.mjs → DbToOnlineModal-f49b9530.mjs} +56 -50
- package/DetailForm-4aa2570b.mjs +485 -0
- package/{EnhanceJavaModal-c13de6e0.mjs → EnhanceJavaModal-98934198.mjs} +3 -3
- package/{EnhanceJsHistory-154101f0.mjs → EnhanceJsHistory-9c4acdaf.mjs} +2 -2
- package/EnhanceJsModal-247f640d.mjs +532 -0
- package/{EnhanceSqlModal-221c22dc.mjs → EnhanceSqlModal-65b74b0f.mjs} +3 -3
- package/ExtendConfigModal-00f2fb55.mjs +117 -0
- package/FieldExtendJsonModal-cc7fce26.mjs +277 -0
- package/{FileSelectModal-de40a706.mjs → FileSelectModal-38660e3c.mjs} +1 -1
- package/{ForeignKeyTable-22989042.mjs → ForeignKeyTable-a78cb5ad.mjs} +3 -3
- package/{IndexTable-833d34ff.mjs → IndexTable-1b496559.mjs} +10 -10
- package/{JModalTip-0413ad6a.mjs → JModalTip-4a83aaed.mjs} +1 -1
- package/{JOnlineSearchSelect-9ea89e13.mjs → JOnlineSearchSelect-34a37ec9.mjs} +1 -1
- package/{LeftDepart-b0a535c0.mjs → LeftDepart-8ade4bf7.mjs} +1 -1
- package/{LeftRole-22c90d6b.mjs → LeftRole-7d8c5acc.mjs} +1 -1
- package/{LeftUser-a44d63dd.mjs → LeftUser-b4d1372a.mjs} +3 -3
- package/LinkTableConfigModal-a138c85e.mjs +240 -0
- package/{LinkTableFieldConfigModal-06693eaa.mjs → LinkTableFieldConfigModal-17b413b0.mjs} +41 -41
- package/{LinkTableListPiece-46e8af51.mjs → LinkTableListPiece-2660d709.mjs} +1 -1
- package/{ModalFormDemo-d107fa87.mjs → ModalFormDemo-0544737d.mjs} +1 -1
- package/OnlCgformErpList-30e416c8.mjs +470 -0
- package/OnlCgformErpSubTable-9a876058.mjs +427 -0
- package/OnlCgformInnerSubTable-290ace5d.mjs +266 -0
- package/OnlCgformInnerTableList-f89b6687.mjs +458 -0
- package/OnlCgformTabList-7a2f2c03.mjs +408 -0
- package/OnlineAutoList-46c6c8b9.mjs +493 -0
- package/OnlineAutoModal-971bef13.mjs +236 -0
- package/{OnlineAutoTreeList-ec27d271.mjs → OnlineAutoTreeList-3b92454c.mjs} +206 -204
- package/{OnlineCustomModal-3e6792d3.mjs → OnlineCustomModal-594244f3.mjs} +15 -11
- package/{OnlineDetailModal-f40e37e1.mjs → OnlineDetailModal-2a271e0b.mjs} +74 -64
- package/OnlineForm-018981b2.mjs +924 -0
- package/OnlineForm.vue_vue_type_style_index_0_scoped_0f9f2964_lang-4ed993c7.mjs +1 -0
- package/OnlineFormDetail-e036cd11.mjs +342 -0
- package/OnlineFormUrlAdd-7fb3dcca.mjs +115 -0
- package/OnlineFormUrlDetail-b2292137.mjs +119 -0
- package/OnlineFormUrlEdit-44080fb3.mjs +113 -0
- package/OnlineFormUrlSuccess-af285b02.mjs +59 -0
- package/OnlineQueryForm-998c12a4.mjs +444 -0
- package/{OnlineSearchFormItem-fe308194.mjs → OnlineSearchFormItem-6feacae6.mjs} +2 -2
- package/{OnlineSelectCascade-abc345f9.mjs → OnlineSelectCascade-471fcc76.mjs} +1 -1
- package/{OnlineSubFormDetail-02326a8c.mjs → OnlineSubFormDetail-03f8ee5c.mjs} +29 -27
- package/OnlineTabAutoModal-7b9bcd0b.mjs +306 -0
- package/{OnlineTabDetailModal-d23bd4c9.mjs → OnlineTabDetailModal-88143301.mjs} +22 -20
- package/OnlineTabForm-9ad7d29a.mjs +805 -0
- package/OnlineTabFormDetail-bbf23caa.mjs +327 -0
- package/PageAttributeTable-6c23547b.mjs +446 -0
- package/{ProcessOnlineForm-84f4d02d.mjs → ProcessOnlineForm-b42198f5.mjs} +32 -28
- package/QueryTable-96b3dbd0.mjs +144 -0
- package/SetSwitchOptions-a452fa0f.mjs +62 -0
- package/SuperQuery-cbfba908.mjs +975 -0
- package/{auth.data-8be5c9e3.mjs → auth.data-22948e87.mjs} +56 -14
- package/{cgform.data-cbdd88c3.mjs → cgform.data-475d4984.mjs} +5 -1
- package/constant-fa63bd66.mjs +10 -0
- package/{enhance.data-efc7e155.mjs → enhance.data-3304d553.mjs} +3 -3
- package/index-173949bb.mjs +57 -0
- package/{index-0a93652b.mjs → index-581bef24.mjs} +29 -27
- package/{index-e1bda35b.mjs → index-d2abb8a0.mjs} +394 -361
- package/main.index.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/useCgformList-8755a94e.mjs +426 -0
- package/useExtendComponent-bb7cca20.mjs +4295 -0
- package/useFormUrl-2ee1a82d.mjs +24 -0
- package/useListButton-7ddb9a46.mjs +697 -0
- package/{useSchemas-0433a403.mjs → useSchemas-47e45edc.mjs} +167 -86
- package/{useTableSync-774c3774.mjs → useTableSync-f6089e8a.mjs} +1 -1
- package/AuthButtonConfig-f142147a.mjs +0 -125
- package/AuthDataConfig-8e5c7b0c.mjs +0 -212
- package/AuthFieldConfig-e9a45f94.mjs +0 -139
- package/AuthManagerDrawer-5b558c23.mjs +0 -114
- package/AuthSetterModal-0cc557cf.mjs +0 -267
- package/CgreportModal-2eb9c9e1.mjs +0 -13
- package/CheckDictTable-27102064.mjs +0 -211
- package/CodeGeneratorModal-3a0e9f0e.mjs +0 -233
- package/DetailForm-cdeb54e3.mjs +0 -462
- package/EnhanceJsModal-6158804c.mjs +0 -311
- package/ExtendConfigModal-0564ef83.mjs +0 -111
- package/FieldExtendJsonModal-40d961c1.mjs +0 -219
- package/LinkTableConfigModal-5edaa08d.mjs +0 -230
- package/OnlCgformErpList-4c51cdb3.mjs +0 -454
- package/OnlCgformErpSubTable-d7081b9f.mjs +0 -403
- package/OnlCgformInnerSubTable-4c3925bb.mjs +0 -253
- package/OnlCgformInnerTableList-1e5014fa.mjs +0 -444
- package/OnlCgformTabList-c59c7cc7.mjs +0 -395
- package/OnlineAutoList-a7a9de5d.mjs +0 -479
- package/OnlineAutoModal-a33f1a63.mjs +0 -207
- package/OnlineForm-fb3a2379.mjs +0 -750
- package/OnlineFormDetail-52b1c303.mjs +0 -297
- package/OnlineQueryForm-7c70734e.mjs +0 -386
- package/OnlineTabAutoModal-6d9da8b0.mjs +0 -254
- package/OnlineTabForm-29ca07f7.mjs +0 -766
- package/OnlineTabFormDetail-aa7e1144.mjs +0 -324
- package/PageAttributeTable-d82946c5.mjs +0 -404
- package/QueryTable-d4599fca.mjs +0 -115
- package/SuperQuery-07162778.mjs +0 -843
- package/constant-754f1a9d.mjs +0 -9
- package/index-73993b18.mjs +0 -56
- package/useCgformList-b135794d.mjs +0 -400
- package/useExtendComponent-f4e29152.mjs +0 -3926
- package/useListButton-4dd33e7a.mjs +0 -676
|
@@ -0,0 +1,924 @@
|
|
|
1
|
+
var Nt = Object.defineProperty, Jt = Object.defineProperties;
|
|
2
|
+
var Lt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var xe = Object.getOwnPropertySymbols;
|
|
4
|
+
var Ut = Object.prototype.hasOwnProperty, Yt = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Ee = (i, p, s) => p in i ? Nt(i, p, { enumerable: !0, configurable: !0, writable: !0, value: s }) : i[p] = s, T = (i, p) => {
|
|
6
|
+
for (var s in p || (p = {}))
|
|
7
|
+
Ut.call(p, s) && Ee(i, s, p[s]);
|
|
8
|
+
if (xe)
|
|
9
|
+
for (var s of xe(p))
|
|
10
|
+
Yt.call(p, s) && Ee(i, s, p[s]);
|
|
11
|
+
return i;
|
|
12
|
+
}, Re = (i, p) => Jt(i, Lt(p));
|
|
13
|
+
var x = (i, p, s) => new Promise((a, B) => {
|
|
14
|
+
var E = (v) => {
|
|
15
|
+
try {
|
|
16
|
+
C(s.next(v));
|
|
17
|
+
} catch (y) {
|
|
18
|
+
B(y);
|
|
19
|
+
}
|
|
20
|
+
}, V = (v) => {
|
|
21
|
+
try {
|
|
22
|
+
C(s.throw(v));
|
|
23
|
+
} catch (y) {
|
|
24
|
+
B(y);
|
|
25
|
+
}
|
|
26
|
+
}, C = (v) => v.done ? a(v.value) : Promise.resolve(v.value).then(E, V);
|
|
27
|
+
C((s = s.apply(i, p)).next());
|
|
28
|
+
});
|
|
29
|
+
import { useMessage as Kt } from "/@/hooks/web/useMessage";
|
|
30
|
+
import { ref as g, inject as qt, reactive as Wt, watch as Ht, computed as zt, resolveComponent as k, openBlock as M, createElementBlock as $, normalizeClass as Gt, createVNode as I, createBlock as ee, withCtx as W, Fragment as Qt, renderList as Xt, normalizeStyle as Zt, createElementVNode as de, createCommentVNode as ue, renderSlot as $t, unref as De, nextTick as Me, toRaw as L, pushScopeId as eo, popScopeId as to } from "vue";
|
|
31
|
+
import { BasicForm as oo, useForm as lo } from "/@/components/Form/index";
|
|
32
|
+
import { c as no, O as ao, d as io, e as ro, u as so, l as te, g as uo, V as H, S as co, f as fo, h as Ve, j as ce } from "./useExtendComponent-bb7cca20.mjs";
|
|
33
|
+
import { defHttp as oe } from "/@/utils/http/axios";
|
|
34
|
+
import { pick as mo, omit as Ae, cloneDeep as po } from "lodash-es";
|
|
35
|
+
import { sleep as ho, goJmReportViewPage as bo } from "/@/utils";
|
|
36
|
+
import { Loading as go } from "/@/components/Loading";
|
|
37
|
+
import "/@/components/jeecg/JVxeTable/types";
|
|
38
|
+
import { getToken as yo } from "/@/utils/auth";
|
|
39
|
+
import { PrinterOutlined as vo, DiffOutlined as Fo, FormOutlined as wo } from "@ant-design/icons-vue";
|
|
40
|
+
import "/@/hooks/core/useContext";
|
|
41
|
+
import "/@/utils/mitt";
|
|
42
|
+
import { useModal as So } from "/@/components/Modal";
|
|
43
|
+
import { u as To, G as _o } from "./useCustomHook-acb00837.mjs";
|
|
44
|
+
import { E as le } from "./constant-fa63bd66.mjs";
|
|
45
|
+
import { useAppInject as ko } from "/@/hooks/web/useAppInject";
|
|
46
|
+
import { isArray as Co } from "/@/utils/is";
|
|
47
|
+
import "./OnlineForm.vue_vue_type_style_index_0_scoped_0f9f2964_lang-4ed993c7.mjs";
|
|
48
|
+
import { _ as Oo } from "./index-173949bb.mjs";
|
|
49
|
+
import "/@/components/Form/src/componentMap";
|
|
50
|
+
import "/@/utils/propTypes";
|
|
51
|
+
import "/@/components/Form/src/jeecg/components/JUpload";
|
|
52
|
+
import "/@/views/system/user/user.api";
|
|
53
|
+
import "/@/store/modules/user";
|
|
54
|
+
import "/@/utils/desform/customExpression";
|
|
55
|
+
import "/@/store/modules/permission";
|
|
56
|
+
import "/@/utils/dict/JDictSelectUtil";
|
|
57
|
+
import "/@/utils/common/compUtils";
|
|
58
|
+
import "/@/components/Table";
|
|
59
|
+
import "/@/hooks/system/useListPage";
|
|
60
|
+
import "vue-router";
|
|
61
|
+
import "/@/components/Form/src/utils/Area";
|
|
62
|
+
import "/@/components/Preview/index";
|
|
63
|
+
import "./LinkTableListPiece-2660d709.mjs";
|
|
64
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
65
|
+
import "/@/api/common/api";
|
|
66
|
+
import "/@/assets/images/placeholderImage.png";
|
|
67
|
+
import "./OnlineSelectCascade-471fcc76.mjs";
|
|
68
|
+
import "./JModalTip-4a83aaed.mjs";
|
|
69
|
+
import "ant-design-vue";
|
|
70
|
+
import "@vueuse/core";
|
|
71
|
+
import "/@/utils/cache";
|
|
72
|
+
const fe = {
|
|
73
|
+
optPre: "/online/cgform/api/form/",
|
|
74
|
+
urlButtonAction: "/online/cgform/api/doButton"
|
|
75
|
+
}, Po = {
|
|
76
|
+
name: "OnlineForm",
|
|
77
|
+
components: {
|
|
78
|
+
BasicForm: oo,
|
|
79
|
+
Loading: go,
|
|
80
|
+
OnlineSubForm: no,
|
|
81
|
+
PrinterOutlined: vo,
|
|
82
|
+
DiffOutlined: Fo,
|
|
83
|
+
FormOutlined: wo,
|
|
84
|
+
OnlinePopModal: ao
|
|
85
|
+
},
|
|
86
|
+
props: {
|
|
87
|
+
id: {
|
|
88
|
+
type: String,
|
|
89
|
+
default: ""
|
|
90
|
+
},
|
|
91
|
+
formTemplate: {
|
|
92
|
+
type: Number,
|
|
93
|
+
default: 1
|
|
94
|
+
},
|
|
95
|
+
disabled: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
default: !1
|
|
98
|
+
},
|
|
99
|
+
isTree: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: !1
|
|
102
|
+
},
|
|
103
|
+
pidField: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: ""
|
|
106
|
+
},
|
|
107
|
+
submitTip: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
default: !0
|
|
110
|
+
},
|
|
111
|
+
modalClass: {
|
|
112
|
+
type: String,
|
|
113
|
+
default: ""
|
|
114
|
+
},
|
|
115
|
+
themeTemplate: {
|
|
116
|
+
type: String,
|
|
117
|
+
default: ""
|
|
118
|
+
},
|
|
119
|
+
// update-begin--author:liaozhiyang---date:20231128---for:【QQYUN-7260】erp主表编辑时保存子表记录
|
|
120
|
+
// erp风格会传来所有子表数据
|
|
121
|
+
subTableSource: {
|
|
122
|
+
default: () => ({})
|
|
123
|
+
}
|
|
124
|
+
// update-end-author:liaozhiyang---date:20231128---for:【QQYUN-7260】erp主表编辑时保存子表记录
|
|
125
|
+
},
|
|
126
|
+
emits: ["success", "rendered"],
|
|
127
|
+
setup(i, { emit: p }) {
|
|
128
|
+
const { createMessage: s } = Kt(), a = g(null), B = g(!0), E = g(!1), V = g(1), C = g(""), v = g(!1), y = g(!1), { getIsMobile: A } = ko(), z = g(!1), N = qt("foreignkey", { value: {} }), ne = g(!A.value), U = g(null);
|
|
129
|
+
let Y = null;
|
|
130
|
+
const c = Wt({
|
|
131
|
+
reportPrintShow: 0,
|
|
132
|
+
reportPrintUrl: "",
|
|
133
|
+
joinQuery: 0,
|
|
134
|
+
modelFullscreen: 0,
|
|
135
|
+
modalMinWidth: "",
|
|
136
|
+
commentStatus: 0
|
|
137
|
+
}), { onlineFormContext: h, resetContext: F } = io(), {
|
|
138
|
+
formSchemas: G,
|
|
139
|
+
defaultValueFields: Q,
|
|
140
|
+
changeDataIfArray2String: me,
|
|
141
|
+
tableName: J,
|
|
142
|
+
dbData: R,
|
|
143
|
+
checkOnlyFieldValue: je,
|
|
144
|
+
hasSubTable: Ie,
|
|
145
|
+
subTabInfo: w,
|
|
146
|
+
refMap: O,
|
|
147
|
+
subDataSource: X,
|
|
148
|
+
baseColProps: Be,
|
|
149
|
+
createFormSchemas: Ne,
|
|
150
|
+
linkDownList: Ao,
|
|
151
|
+
fieldDisplayStatus: K,
|
|
152
|
+
labelCol: Je,
|
|
153
|
+
wrapperCol: Le,
|
|
154
|
+
labelWidth: Ue
|
|
155
|
+
} = ro(i, a);
|
|
156
|
+
let { EnhanceJS: f, initCgEnhanceJs: Ye } = so(h, !1);
|
|
157
|
+
Ht(
|
|
158
|
+
[w, A],
|
|
159
|
+
() => {
|
|
160
|
+
A.value && w.value.length && w.value.forEach((e) => {
|
|
161
|
+
e.relationType != 1 && e.columns.forEach((t) => {
|
|
162
|
+
t.width = 100;
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
},
|
|
166
|
+
{ immediate: !0 }
|
|
167
|
+
);
|
|
168
|
+
const { executeJsEnhanced: Ke } = To({}, h), [qe, { setProps: We, validate: pe, resetFields: he, clearValidate: He, setFieldsValue: D, updateSchema: q, getFieldsValue: ae, scrollToField: be }] = lo({
|
|
169
|
+
schemas: G,
|
|
170
|
+
showActionButtonGroup: !1,
|
|
171
|
+
baseColProps: Be,
|
|
172
|
+
// update-begin--author:liaozhiyang---date:20240329---for:【QQYUN-7872】online表单label较长优化
|
|
173
|
+
labelWidth: Ue,
|
|
174
|
+
// update-end--author:liaozhiyang---date:20240329---for:【QQYUN-7872】online表单label较长优化
|
|
175
|
+
// update-begin--author:liaozhiyang---date:20240105---for:【QQYUN-7499】多列风格富文本、markdown增加独占一行功能
|
|
176
|
+
labelCol: Je,
|
|
177
|
+
wrapperCol: Le
|
|
178
|
+
// update-end--author:liaozhiyang---date:20240105---for:【QQYUN-7499】多列风格富文本、markdown增加独占一行功能
|
|
179
|
+
}), ge = g(!1);
|
|
180
|
+
function ze() {
|
|
181
|
+
let e = i.disabled;
|
|
182
|
+
ge.value = e, We({ disabled: e });
|
|
183
|
+
}
|
|
184
|
+
function Ge(e, t, o) {
|
|
185
|
+
return x(this, null, function* () {
|
|
186
|
+
yield Qe(), C.value = "", yield he(), setTimeout(() => {
|
|
187
|
+
He();
|
|
188
|
+
}, 0), R.value = "";
|
|
189
|
+
let l = De(e);
|
|
190
|
+
y.value = l, $e(), l ? yield ve(t) : Fe(), Me(() => {
|
|
191
|
+
var n;
|
|
192
|
+
!l && o && D(o), Xe(), ie("js", "loaded"), ze(), (n = U.value) != null && n.length && (U.value[0].scrollTop = 0);
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
function Qe() {
|
|
197
|
+
return x(this, null, function* () {
|
|
198
|
+
if (i.isTree === !0) {
|
|
199
|
+
let e = i.pidField, t = G.value;
|
|
200
|
+
t && t.length > 0 && t.filter((l) => l.field === e).length > 0 && (yield q({
|
|
201
|
+
field: e,
|
|
202
|
+
componentProps: {
|
|
203
|
+
reload: (/* @__PURE__ */ new Date()).getTime(),
|
|
204
|
+
// update-begin--author:liaozhiyang---date:20240529---for:【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
|
|
205
|
+
hiddenNodeKey: ""
|
|
206
|
+
// update-end--author:liaozhiyang---date:20240529---for:【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
|
|
207
|
+
}
|
|
208
|
+
}));
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
function Xe() {
|
|
213
|
+
if (De(y) === !1) {
|
|
214
|
+
let e = L(Q[J.value]);
|
|
215
|
+
te(e, (t) => {
|
|
216
|
+
D(t);
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
function ye(e, t) {
|
|
221
|
+
let o = L(Q[e.key]);
|
|
222
|
+
te(o, (l) => {
|
|
223
|
+
const { row: n, target: r } = t;
|
|
224
|
+
let m = [{ rowKey: n.id, values: T({}, l) }];
|
|
225
|
+
r.setValues(m);
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
function ve(e) {
|
|
229
|
+
return x(this, null, function* () {
|
|
230
|
+
let t = yield tt(e.id);
|
|
231
|
+
R.value = Object.assign({}, e, t);
|
|
232
|
+
let o = et.value, l = mo(t, ...o);
|
|
233
|
+
i.disabled && Object.keys(l).map((n) => {
|
|
234
|
+
!l[n] && l[n] !== 0 && l[n] !== "0" && delete l[n];
|
|
235
|
+
}), yield D(l), Ze(e.id), Fe(t);
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
function Fe(e) {
|
|
239
|
+
e || (e = {});
|
|
240
|
+
let t = Object.keys(X.value);
|
|
241
|
+
if (t && t.length > 0) {
|
|
242
|
+
let o = {};
|
|
243
|
+
for (let l of t)
|
|
244
|
+
o[l] = e[l] || [];
|
|
245
|
+
X.value = o;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
function Ze(e) {
|
|
249
|
+
var t;
|
|
250
|
+
if (i.isTree === !0) {
|
|
251
|
+
const { schema: o } = Y, l = (t = o.properties) != null ? t : {}, n = Object.entries(l);
|
|
252
|
+
if (n.length) {
|
|
253
|
+
const r = n.find(([m, d]) => d.view === "sel_tree" && d.pidComponent != null);
|
|
254
|
+
if (r) {
|
|
255
|
+
const m = r[0];
|
|
256
|
+
G.value.find((u) => u.field == m) && q({
|
|
257
|
+
field: m,
|
|
258
|
+
componentProps: {
|
|
259
|
+
hiddenNodeKey: e
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
function $e() {
|
|
267
|
+
var e;
|
|
268
|
+
(e = w.value) == null || e.forEach((t) => {
|
|
269
|
+
t.relationType == 1 && O[t.key].value && O[t.key].value[0].resetFields();
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
let et = zt(() => {
|
|
273
|
+
let e = G.value, t = [];
|
|
274
|
+
for (let o of e)
|
|
275
|
+
t.push(o.field);
|
|
276
|
+
return t;
|
|
277
|
+
});
|
|
278
|
+
function tt(e) {
|
|
279
|
+
let t = `${fe.optPre}${i.id}/${e}`;
|
|
280
|
+
return new Promise((o, l) => {
|
|
281
|
+
oe.get({ url: t }, { isTransformResponse: !1 }).then((n) => {
|
|
282
|
+
n.success ? o(n.result) : (l(), s.warning(n.message));
|
|
283
|
+
}).catch(() => {
|
|
284
|
+
l();
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
function ot(e) {
|
|
289
|
+
return x(this, null, function* () {
|
|
290
|
+
V.value = e.head.tableType, J.value = e.head.tableName, B.value = e.head.tableType == 1, at(e.head.extConfigJson), Ne(e.schema.properties, e.schema.required, je, c), f = Ye(e.enhanceJs), p("rendered", c);
|
|
291
|
+
let t = yield uo(a);
|
|
292
|
+
t.$formValueChange = (o, l, n) => {
|
|
293
|
+
St(o, l), n && D(n), lt(o, l, n);
|
|
294
|
+
}, f && f.setup && _e(f.setup), Y = e;
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
function lt(e, t, o) {
|
|
298
|
+
h.changEvent(e, t, o);
|
|
299
|
+
}
|
|
300
|
+
function nt(e) {
|
|
301
|
+
h.addObject2Context("changEvent", e);
|
|
302
|
+
}
|
|
303
|
+
function at(e) {
|
|
304
|
+
let t = { reportPrintShow: 0, reportPrintUrl: "", joinQuery: 0, modelFullscreen: 0, modalMinWidth: "", commentStatus: 0, formLabelLength: null };
|
|
305
|
+
e && (t = JSON.parse(e), A.value && (t.commentStatus = 0)), z.value = !!t.formLabelLength, Object.keys(t).map((o) => {
|
|
306
|
+
c[o] = t[o];
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
function it() {
|
|
310
|
+
B.value === !0 ? ft() : rt();
|
|
311
|
+
}
|
|
312
|
+
function rt() {
|
|
313
|
+
st().then((e) => {
|
|
314
|
+
we(e);
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
function st() {
|
|
318
|
+
let e = {};
|
|
319
|
+
return new Promise((t, o) => {
|
|
320
|
+
pe().then(
|
|
321
|
+
(l) => t(l),
|
|
322
|
+
({ errorFields: l }) => {
|
|
323
|
+
o({
|
|
324
|
+
code: H,
|
|
325
|
+
key: J.value,
|
|
326
|
+
// 滚动到未通过校验的字段上
|
|
327
|
+
scrollToField: () => l[0] && be(l[0].name, { behavior: "smooth", block: "center" })
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
);
|
|
331
|
+
}).then((t) => (Object.assign(e, me(t)), i.themeTemplate === le ? Promise.resolve({}) : ct())).then((t) => (Object.assign(e, t), Promise.resolve(e))).catch((t) => ((t === H || (t == null ? void 0 : t.code) === H) && (s.warning("校验未通过"), t.key && (ut(t.key), t.scrollToField && setTimeout(() => t.scrollToField(), 150))), Promise.reject(null)));
|
|
332
|
+
}
|
|
333
|
+
function ut(e) {
|
|
334
|
+
let t = w.value;
|
|
335
|
+
for (let o = 0; o < t.length; o++)
|
|
336
|
+
if (e == t[o].key) {
|
|
337
|
+
let l = o + "";
|
|
338
|
+
if (Z.value === l)
|
|
339
|
+
break;
|
|
340
|
+
if (Z.value = l, t[o].relationType === 0) {
|
|
341
|
+
let n = S(e);
|
|
342
|
+
ho(300, () => n == null ? void 0 : n.validateTable());
|
|
343
|
+
}
|
|
344
|
+
break;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
function ct() {
|
|
348
|
+
return new Promise((e, t) => x(this, null, function* () {
|
|
349
|
+
let o = {};
|
|
350
|
+
try {
|
|
351
|
+
let l = w.value;
|
|
352
|
+
for (let n = 0; n < l.length; n++) {
|
|
353
|
+
let r = l[n].key, m = S(r);
|
|
354
|
+
if (l[n].relationType == 1)
|
|
355
|
+
try {
|
|
356
|
+
let d = yield m.getAll();
|
|
357
|
+
o[r] = [], o[r].push(d);
|
|
358
|
+
} catch (d) {
|
|
359
|
+
return t(T({ code: H, key: r }, d));
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
362
|
+
if (yield m.fullValidateTable())
|
|
363
|
+
return t({ code: H, key: r });
|
|
364
|
+
o[r] = m.getTableData();
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
} catch (l) {
|
|
368
|
+
t(l);
|
|
369
|
+
}
|
|
370
|
+
e(o);
|
|
371
|
+
}));
|
|
372
|
+
}
|
|
373
|
+
function ft() {
|
|
374
|
+
return x(this, null, function* () {
|
|
375
|
+
try {
|
|
376
|
+
let e = yield pe();
|
|
377
|
+
e = Object.assign({}, R.value, e), e = me(e), E.value = !0, we(e);
|
|
378
|
+
} catch (e) {
|
|
379
|
+
Array.isArray(e == null ? void 0 : e.errorFields) && e.errorFields[0] && be(e.errorFields[0].name, { behavior: "smooth", block: "center" });
|
|
380
|
+
} finally {
|
|
381
|
+
E.value = !1;
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
function we(e) {
|
|
386
|
+
i.themeTemplate === le && y.value && Object.keys(i.subTableSource).length && (e = T(T({}, e), i.subTableSource)), Pt(Pe, e).then(() => {
|
|
387
|
+
mt(e);
|
|
388
|
+
}).catch((t) => {
|
|
389
|
+
s.warning(t);
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
const dt = (e) => {
|
|
393
|
+
const { schema: t } = Y, { properties: o } = t, l = (n, r) => {
|
|
394
|
+
Object.entries(n).forEach(([m, d]) => {
|
|
395
|
+
var _;
|
|
396
|
+
const u = r[m];
|
|
397
|
+
if (u) {
|
|
398
|
+
if (u.view === "tab" && Co(d)) {
|
|
399
|
+
if (u.properties && d.forEach((b) => {
|
|
400
|
+
l(b, u.properties);
|
|
401
|
+
}), (_ = u.columns) != null && _.length) {
|
|
402
|
+
const b = po(u.columns.filter((P) => P.type === "date" && P.fieldExtendJson));
|
|
403
|
+
if (b.length) {
|
|
404
|
+
const P = {};
|
|
405
|
+
b.forEach((j) => {
|
|
406
|
+
P[j.key] = {
|
|
407
|
+
view: "date",
|
|
408
|
+
fieldExtendJson: j.fieldExtendJson
|
|
409
|
+
};
|
|
410
|
+
}), d.forEach((j) => {
|
|
411
|
+
l(j, P);
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
} else if (u.view === "date" && typeof d == "string" && d !== "") {
|
|
416
|
+
let b = u.fieldExtendJson;
|
|
417
|
+
b && (b = JSON.parse(b), b.picker && b.picker !== "default" && (b.picker === "year" ? n[m] = ce(d).set("month", 0).set("date", 1).format("YYYY-MM-DD") : b.picker === "month" ? n[m] = ce(d).set("date", 1).format("YYYY-MM-DD") : b.picker === "week" && (n[m] = ce(d).startOf("week").format("YYYY-MM-DD"))));
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
};
|
|
422
|
+
l(e, o);
|
|
423
|
+
};
|
|
424
|
+
function mt(e) {
|
|
425
|
+
Object.keys(e).map((n) => {
|
|
426
|
+
Array.isArray(e[n]) && e[n].length == 0 && (e[n] = "");
|
|
427
|
+
}), dt(e);
|
|
428
|
+
let t = C.value, o = `${fe.optPre}${i.id}?tabletype=${V.value}`;
|
|
429
|
+
t && (o = `${t}?tabletype=${V.value}`), v.value === !0 && (e[co] = 1), N.value.field && N.value.value && (e[N.value.field] = N.value.value);
|
|
430
|
+
let l = y.value === !0 ? "put" : "post";
|
|
431
|
+
oe.request({ url: o, method: l, params: e }, { isTransformResponse: !1 }).then((n) => {
|
|
432
|
+
n.success ? (n.result && (e[fo] = n.result), p("success", e), i.submitTip === !0 && s.success(n.message)) : s.warning(n.message);
|
|
433
|
+
}).finally(() => {
|
|
434
|
+
E.value = !1;
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
function pt(e, t, o) {
|
|
438
|
+
t && o ? o.vxeProps ? o.setValues([
|
|
439
|
+
{
|
|
440
|
+
rowKey: t,
|
|
441
|
+
values: e
|
|
442
|
+
}
|
|
443
|
+
]) : o.setValues(e) : D(e);
|
|
444
|
+
}
|
|
445
|
+
function ht(e, t) {
|
|
446
|
+
let o = {};
|
|
447
|
+
o[e] = t, D(o);
|
|
448
|
+
}
|
|
449
|
+
const Z = g("0"), Se = g(A.value ? "auto" : 500), Te = g(340);
|
|
450
|
+
function bt(e) {
|
|
451
|
+
if (y.value === !0) {
|
|
452
|
+
let t = R.value;
|
|
453
|
+
return gt(t, e);
|
|
454
|
+
}
|
|
455
|
+
return "";
|
|
456
|
+
}
|
|
457
|
+
function gt(e, t) {
|
|
458
|
+
if (e) {
|
|
459
|
+
let o = e[t];
|
|
460
|
+
return !o && o !== 0 && (o = e[t.toLowerCase()], !o && o !== 0 && (o = e[t.toUpperCase()])), o;
|
|
461
|
+
}
|
|
462
|
+
return "";
|
|
463
|
+
}
|
|
464
|
+
function yt(e, t) {
|
|
465
|
+
if (f && f[t + "_onlChange"]) {
|
|
466
|
+
let o = f[t + "_onlChange"](), l = Object.keys(e)[0];
|
|
467
|
+
if (o[l]) {
|
|
468
|
+
let r = S(t).getFormEvent(), m = T({
|
|
469
|
+
column: { key: l },
|
|
470
|
+
value: e[l]
|
|
471
|
+
}, r);
|
|
472
|
+
o[l].call(h, h, m);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
function vt(e, t) {
|
|
477
|
+
if (f && f[t + "_onlChange"]) {
|
|
478
|
+
let o = f[t + "_onlChange"](h);
|
|
479
|
+
if (e.column === "all") {
|
|
480
|
+
let l = Object.keys(o);
|
|
481
|
+
if (l.length > 0)
|
|
482
|
+
for (let n of l)
|
|
483
|
+
o[n].call(h, h, e);
|
|
484
|
+
} else {
|
|
485
|
+
let l = e.column.key || e.col.key;
|
|
486
|
+
o[l] && e.row && e.row.id && o[l].call(h, h, e);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
function Ft(e, t) {
|
|
491
|
+
t.isModalData || ye(e, t);
|
|
492
|
+
}
|
|
493
|
+
function wt(e) {
|
|
494
|
+
return "online_" + e + ":";
|
|
495
|
+
}
|
|
496
|
+
function St(e, t) {
|
|
497
|
+
return x(this, null, function* () {
|
|
498
|
+
if (!f || !f.onlChange || !e)
|
|
499
|
+
return !1;
|
|
500
|
+
let o = f.onlChange();
|
|
501
|
+
if (o[e]) {
|
|
502
|
+
let n = {
|
|
503
|
+
row: yield ae(),
|
|
504
|
+
column: { key: e },
|
|
505
|
+
value: t
|
|
506
|
+
};
|
|
507
|
+
o[e].call(h, h, n);
|
|
508
|
+
}
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
function _e(e) {
|
|
512
|
+
let o = e.toLocaleString().match(_o);
|
|
513
|
+
if (o.length > 1) {
|
|
514
|
+
let l = o[1];
|
|
515
|
+
Ke(l);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
function ie(e, t) {
|
|
519
|
+
if (e == "js") {
|
|
520
|
+
let o = t + "_hook";
|
|
521
|
+
f && f[t] ? f[t].call(h, h) : f && f[o] && _e(f[o]);
|
|
522
|
+
} else if (e == "action") {
|
|
523
|
+
let o = R.value, l = {
|
|
524
|
+
formId: i.id,
|
|
525
|
+
buttonCode: t,
|
|
526
|
+
dataId: o.id,
|
|
527
|
+
uiFormData: Object.assign({}, o)
|
|
528
|
+
};
|
|
529
|
+
oe.post(
|
|
530
|
+
{
|
|
531
|
+
url: `${fe.urlButtonAction}`,
|
|
532
|
+
params: l
|
|
533
|
+
},
|
|
534
|
+
{ isTransformResponse: !1 }
|
|
535
|
+
).then((n) => {
|
|
536
|
+
n.success ? s.success("处理完成!") : s.warning("处理失败!");
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
function ke(e) {
|
|
541
|
+
let t = S(e), o = [...t.getNewDataWithId(), ...X.value[e]];
|
|
542
|
+
if (!o || o.length == 0)
|
|
543
|
+
return !1;
|
|
544
|
+
let l = [];
|
|
545
|
+
for (let n of o)
|
|
546
|
+
l.push(n.id);
|
|
547
|
+
t.removeRowsById(l);
|
|
548
|
+
}
|
|
549
|
+
function Ce(e, t) {
|
|
550
|
+
if (!t)
|
|
551
|
+
return !1;
|
|
552
|
+
let o = S(e);
|
|
553
|
+
typeof t == "object" ? o.addRows(t, !0) : this.$message.error("添加子表数据,参数不识别!");
|
|
554
|
+
}
|
|
555
|
+
function Tt(e, t) {
|
|
556
|
+
ke(e), Ce(e, t);
|
|
557
|
+
}
|
|
558
|
+
function _t(e, t) {
|
|
559
|
+
!t && t.length <= 0 && (t = []), t.map((o) => {
|
|
560
|
+
o.hasOwnProperty("label") || (o.label = o.text);
|
|
561
|
+
}), q({
|
|
562
|
+
field: e,
|
|
563
|
+
componentProps: {
|
|
564
|
+
options: t
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
function kt({ field: e, dict: t, label: o, type: l, subTableName: n }) {
|
|
569
|
+
var m, d;
|
|
570
|
+
const r = t.split(",").map((u) => encodeURIComponent(u)).join(",");
|
|
571
|
+
if (l == "subTable") {
|
|
572
|
+
const u = w.value.find((_) => _.key === n);
|
|
573
|
+
if (u) {
|
|
574
|
+
const _ = u.columns.findIndex((b) => b.key === e);
|
|
575
|
+
_ !== -1 && oe.get({
|
|
576
|
+
url: `/sys/dict/loadDict/${r}`,
|
|
577
|
+
params: { keyword: "", pageSize: 1e3 }
|
|
578
|
+
}).then((b) => {
|
|
579
|
+
const P = t.split(","), j = { customOptions: !0, dictTable: P[0], dictCode: P[2], dictText: P[1], options: b };
|
|
580
|
+
o && (j.title = o), u.columns[_] = T(T({}, u.columns[_]), j), window.findSubTableInfo = u;
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
} else if (l == "subForm") {
|
|
584
|
+
if ((d = (m = O[n]) == null ? void 0 : m.value) != null && d[0]) {
|
|
585
|
+
const u = {
|
|
586
|
+
field: e,
|
|
587
|
+
componentProps: {
|
|
588
|
+
dict: r
|
|
589
|
+
}
|
|
590
|
+
};
|
|
591
|
+
o && (u.label = o), O[n].value[0].updateSchema(u);
|
|
592
|
+
}
|
|
593
|
+
} else {
|
|
594
|
+
const u = {
|
|
595
|
+
field: e,
|
|
596
|
+
componentProps: {
|
|
597
|
+
dict: r
|
|
598
|
+
}
|
|
599
|
+
};
|
|
600
|
+
o && (u.label = o), q(u);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
function Ct(e, t, o) {
|
|
604
|
+
const l = w.value.find((n) => n.key === e);
|
|
605
|
+
if (l) {
|
|
606
|
+
!o && o.length <= 0 && (o = []), o.map((r) => {
|
|
607
|
+
r.hasOwnProperty("label") || (r.label = r.text);
|
|
608
|
+
});
|
|
609
|
+
const n = l.columns.findIndex((r) => r.key === t);
|
|
610
|
+
n !== -1 && (l.columns[n] = Re(T({}, l.columns[n]), { options: o, dictCode: "" }));
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
function Ot(e, t, o) {
|
|
614
|
+
var l, n;
|
|
615
|
+
(n = (l = O[e]) == null ? void 0 : l.value) != null && n[0] && (!o && o.length <= 0 && (o = []), o.map((r) => {
|
|
616
|
+
r.hasOwnProperty("label") || (r.label = r.text);
|
|
617
|
+
}), O[e].value[0].updateSchema({
|
|
618
|
+
field: t,
|
|
619
|
+
componentProps: {
|
|
620
|
+
dictCode: "",
|
|
621
|
+
options: o
|
|
622
|
+
}
|
|
623
|
+
}));
|
|
624
|
+
}
|
|
625
|
+
function Pt(e, t) {
|
|
626
|
+
return f && f.beforeSubmit ? f.beforeSubmit(e, t) : Promise.resolve();
|
|
627
|
+
}
|
|
628
|
+
function xt(e, t) {
|
|
629
|
+
let o = L(K);
|
|
630
|
+
e && e.length > 0 ? Object.keys(o).map((l) => {
|
|
631
|
+
!l.endsWith("_load") && e.indexOf(l) < 0 && (K[l] = !1);
|
|
632
|
+
}) : t && t.length > 0 && Object.keys(o).map((l) => {
|
|
633
|
+
t.indexOf(l) >= 0 && (K[l] = !1);
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
function Et(e, t) {
|
|
637
|
+
return x(this, null, function* () {
|
|
638
|
+
C.value = t, yield he(), R.value = "", y.value = !0, yield ve(e), yield Me(() => {
|
|
639
|
+
ie("js", "loaded");
|
|
640
|
+
});
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
function S(e) {
|
|
644
|
+
let t = O[e].value;
|
|
645
|
+
if (t instanceof Array && (t = t[0]), !t) {
|
|
646
|
+
s.warning("子表ref找不到:" + e);
|
|
647
|
+
return;
|
|
648
|
+
}
|
|
649
|
+
return t;
|
|
650
|
+
}
|
|
651
|
+
function Rt() {
|
|
652
|
+
let e = c.reportPrintUrl, t = R.value.id, o = yo();
|
|
653
|
+
bo(e, t, o);
|
|
654
|
+
}
|
|
655
|
+
const [Dt, { openModal: Oe }] = So(), re = g(""), se = g(!0);
|
|
656
|
+
function Mt(e) {
|
|
657
|
+
re.value = e.id, se.value = !1, Oe(!0, { isUpdate: !1, tableType: "3" });
|
|
658
|
+
}
|
|
659
|
+
function Vt(e) {
|
|
660
|
+
let o = S(e.key).getSelectedData();
|
|
661
|
+
if (o.length != 1) {
|
|
662
|
+
s.warning("请选择一条数据");
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
re.value = e.id, se.value = !1, Oe(!0, { isUpdate: !0, record: o[0] });
|
|
666
|
+
}
|
|
667
|
+
function At(e) {
|
|
668
|
+
const t = e[Ve];
|
|
669
|
+
let o = Ae(e, [Ve]);
|
|
670
|
+
if (o.id) {
|
|
671
|
+
let l = Ae(T({}, o), "id"), n = [{ rowKey: o.id, values: l }];
|
|
672
|
+
S(t).setValues(n);
|
|
673
|
+
} else
|
|
674
|
+
S(t).addRows(o, { isOnlineJS: !1, setActive: !1, emitChange: !0, isModalData: !0 });
|
|
675
|
+
}
|
|
676
|
+
function jt() {
|
|
677
|
+
if (i.themeTemplate === le)
|
|
678
|
+
return;
|
|
679
|
+
let e = w.value;
|
|
680
|
+
if (e && e.length > 0) {
|
|
681
|
+
for (let t of e)
|
|
682
|
+
if (t.relationType != 1) {
|
|
683
|
+
let o = S(t.key);
|
|
684
|
+
o && o.clearSelection();
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
function It() {
|
|
689
|
+
let e = ae(), t = L(Q[J.value]);
|
|
690
|
+
te(t, (o) => {
|
|
691
|
+
D(o);
|
|
692
|
+
}, e);
|
|
693
|
+
}
|
|
694
|
+
function Bt(e, t) {
|
|
695
|
+
let o = w.value;
|
|
696
|
+
if (o && o.length > 0) {
|
|
697
|
+
let l = o.filter((n) => n.key === e);
|
|
698
|
+
if (l.length == 0)
|
|
699
|
+
return;
|
|
700
|
+
if (l[0].relationType == 1)
|
|
701
|
+
S(e).executeFillRule();
|
|
702
|
+
else {
|
|
703
|
+
let n = L(Q[e]), r = L(t.row);
|
|
704
|
+
te(n, (m) => {
|
|
705
|
+
const { row: d, target: u } = t;
|
|
706
|
+
let _ = [{ rowKey: d.id, values: T({}, m) }];
|
|
707
|
+
u.setValues(_);
|
|
708
|
+
}, r);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
let Pe = {
|
|
713
|
+
tableName: J,
|
|
714
|
+
loading: E,
|
|
715
|
+
subActiveKey: Z,
|
|
716
|
+
onlineFormRef: a,
|
|
717
|
+
getFieldsValue: ae,
|
|
718
|
+
setFieldsValue: D,
|
|
719
|
+
submitFlowFlag: v,
|
|
720
|
+
subFormHeight: Se,
|
|
721
|
+
subTableHeight: Te,
|
|
722
|
+
refMap: O,
|
|
723
|
+
triggleChangeValues: pt,
|
|
724
|
+
triggleChangeValue: ht,
|
|
725
|
+
sh: K,
|
|
726
|
+
clearSubRows: ke,
|
|
727
|
+
addSubRows: Ce,
|
|
728
|
+
clearThenAddRows: Tt,
|
|
729
|
+
changeOptions: _t,
|
|
730
|
+
isUpdate: y,
|
|
731
|
+
getSubTableInstance: S,
|
|
732
|
+
updateSchema: q,
|
|
733
|
+
executeMainFillRule: It,
|
|
734
|
+
executeSubFillRule: Bt,
|
|
735
|
+
// update-begin--author:liaozhiyang---date:20240313---for:【QQYUN-8350】js增强根据主表限制子表options
|
|
736
|
+
changeSubTableOptions: Ct,
|
|
737
|
+
changeSubFormbleOptions: Ot,
|
|
738
|
+
// update-end--author:liaozhiyang---date:20240313---for:【QQYUN-8350】js增强根据主表限制子表options
|
|
739
|
+
changeRemoteOptions: kt,
|
|
740
|
+
changEvent: () => {
|
|
741
|
+
},
|
|
742
|
+
onlineFormValueChange: nt
|
|
743
|
+
};
|
|
744
|
+
return F(Pe), {
|
|
745
|
+
//主表
|
|
746
|
+
tableName: J,
|
|
747
|
+
onlineFormRef: a,
|
|
748
|
+
registerForm: qe,
|
|
749
|
+
loading: E,
|
|
750
|
+
//子表
|
|
751
|
+
subActiveKey: Z,
|
|
752
|
+
hasSubTable: Ie,
|
|
753
|
+
subTabInfo: w,
|
|
754
|
+
refMap: O,
|
|
755
|
+
//一对一子表
|
|
756
|
+
subFormHeight: Se,
|
|
757
|
+
getSubTableForeignKeyValue: bt,
|
|
758
|
+
isUpdate: y,
|
|
759
|
+
handleSubFormChange: yt,
|
|
760
|
+
//一对多子表
|
|
761
|
+
subTableHeight: Te,
|
|
762
|
+
onlineFormDisabled: ge,
|
|
763
|
+
subDataSource: X,
|
|
764
|
+
getSubTableAuthPre: wt,
|
|
765
|
+
handleAdded: Ft,
|
|
766
|
+
handleSubTableDefaultValue: ye,
|
|
767
|
+
handleValueChange: vt,
|
|
768
|
+
openSubFormModalForAdd: Mt,
|
|
769
|
+
openSubFormModalForEdit: Vt,
|
|
770
|
+
//父组件调用
|
|
771
|
+
show: Ge,
|
|
772
|
+
createRootProperties: ot,
|
|
773
|
+
handleSubmit: it,
|
|
774
|
+
sh: K,
|
|
775
|
+
handleCgButtonClick: ie,
|
|
776
|
+
handleCustomFormSh: xt,
|
|
777
|
+
handleCustomFormEdit: Et,
|
|
778
|
+
//跳转
|
|
779
|
+
dbData: R,
|
|
780
|
+
onOpenReportPrint: Rt,
|
|
781
|
+
onlineExtConfigJson: c,
|
|
782
|
+
//一对多子表弹窗操作数据
|
|
783
|
+
registerPopModal: Dt,
|
|
784
|
+
popTableName: re,
|
|
785
|
+
getPopFormData: At,
|
|
786
|
+
popModalRequest: se,
|
|
787
|
+
onCloseModal: jt,
|
|
788
|
+
ERP: le,
|
|
789
|
+
rowNumber: ne,
|
|
790
|
+
isSetFormLabelLength: z,
|
|
791
|
+
subFormWrapRef: U
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
}, xo = (i) => (eo("data-v-0f9f2964"), i = i(), to(), i), Eo = ["id"], Ro = { key: 1 }, Do = { class: "add" }, Mo = /* @__PURE__ */ xo(() => /* @__PURE__ */ de("svg", {
|
|
795
|
+
t: "1714390025804",
|
|
796
|
+
class: "icon",
|
|
797
|
+
viewBox: "0 0 1024 1024",
|
|
798
|
+
version: "1.1",
|
|
799
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
800
|
+
"p-id": "50960",
|
|
801
|
+
width: "16",
|
|
802
|
+
height: "16"
|
|
803
|
+
}, [
|
|
804
|
+
/* @__PURE__ */ de("path", {
|
|
805
|
+
d: "M469.333333 469.333333V170.666667h85.333334v298.666666h298.666666v85.333334h-298.666666v298.666666h-85.333334v-298.666666H170.666667v-85.333334h298.666666z",
|
|
806
|
+
fill: "#fff",
|
|
807
|
+
"p-id": "50961"
|
|
808
|
+
})
|
|
809
|
+
], -1));
|
|
810
|
+
function Vo(i, p, s, a, B, E) {
|
|
811
|
+
const V = k("BasicForm"), C = k("online-sub-form"), v = k("diff-outlined"), y = k("a-button"), A = k("form-outlined"), z = k("JVxeTable"), N = k("a-tab-pane"), ne = k("a-tabs"), U = k("Loading"), Y = k("online-pop-modal");
|
|
812
|
+
return M(), $("div", {
|
|
813
|
+
id: a.tableName + "_form",
|
|
814
|
+
class: Gt(["onlineFormWrap", [`formTemplate_${s.formTemplate}`]])
|
|
815
|
+
}, [
|
|
816
|
+
I(V, {
|
|
817
|
+
ref: "onlineFormRef",
|
|
818
|
+
onRegister: a.registerForm,
|
|
819
|
+
name: "online-form_" + a.tableName
|
|
820
|
+
}, null, 8, ["onRegister", "name"]),
|
|
821
|
+
s.themeTemplate !== a.ERP && a.hasSubTable ? (M(), ee(ne, {
|
|
822
|
+
key: 0,
|
|
823
|
+
activeKey: a.subActiveKey,
|
|
824
|
+
"onUpdate:activeKey": p[0] || (p[0] = (c) => a.subActiveKey = c)
|
|
825
|
+
}, {
|
|
826
|
+
default: W(() => [
|
|
827
|
+
(M(!0), $(Qt, null, Xt(a.subTabInfo, (c, h) => (M(), ee(N, {
|
|
828
|
+
tab: c.describe,
|
|
829
|
+
key: h + "",
|
|
830
|
+
forceRender: !0
|
|
831
|
+
}, {
|
|
832
|
+
default: W(() => [
|
|
833
|
+
c.relationType == 1 ? (M(), $("div", {
|
|
834
|
+
key: 0,
|
|
835
|
+
ref_for: !0,
|
|
836
|
+
ref: "subFormWrapRef",
|
|
837
|
+
style: Zt({ "overflow-y": "auto", "overflow-x": "hidden", "max-height": a.subFormHeight + "px" })
|
|
838
|
+
}, [
|
|
839
|
+
I(C, {
|
|
840
|
+
ref_for: !0,
|
|
841
|
+
ref: a.refMap[c.key],
|
|
842
|
+
table: c.key,
|
|
843
|
+
disabled: a.onlineFormDisabled,
|
|
844
|
+
"form-template": s.formTemplate,
|
|
845
|
+
"main-id": a.getSubTableForeignKeyValue(c.foreignKey),
|
|
846
|
+
properties: c.properties,
|
|
847
|
+
"required-fields": c.requiredFields,
|
|
848
|
+
"is-update": a.isUpdate,
|
|
849
|
+
onFormChange: (F) => a.handleSubFormChange(F, c.key)
|
|
850
|
+
}, null, 8, ["table", "disabled", "form-template", "main-id", "properties", "required-fields", "is-update", "onFormChange"])
|
|
851
|
+
], 4)) : (M(), $("div", Ro, [
|
|
852
|
+
I(z, {
|
|
853
|
+
ref_for: !0,
|
|
854
|
+
ref: a.refMap[c.key],
|
|
855
|
+
toolbar: "",
|
|
856
|
+
"keep-source": "",
|
|
857
|
+
"row-number": a.rowNumber,
|
|
858
|
+
"row-selection": "",
|
|
859
|
+
height: (
|
|
860
|
+
// 【VUEN-803】一对多子表固定340高度,修复自定义列组件被遮挡的问题
|
|
861
|
+
a.subTableHeight
|
|
862
|
+
),
|
|
863
|
+
disabled: a.onlineFormDisabled,
|
|
864
|
+
columns: c.columns,
|
|
865
|
+
dataSource: a.subDataSource[c.key],
|
|
866
|
+
onValueChange: (F) => a.handleValueChange(F, c.key),
|
|
867
|
+
authPre: a.getSubTableAuthPre(c.key),
|
|
868
|
+
onAdded: (F) => a.handleAdded(c, F),
|
|
869
|
+
onExecuteFillRule: (F) => a.handleSubTableDefaultValue(c, F)
|
|
870
|
+
}, {
|
|
871
|
+
toolbarSuffix: W(() => [
|
|
872
|
+
a.onlineFormDisabled ? ue("", !0) : (M(), ee(y, {
|
|
873
|
+
key: 0,
|
|
874
|
+
type: "primary",
|
|
875
|
+
onClick: (F) => a.openSubFormModalForAdd(c)
|
|
876
|
+
}, {
|
|
877
|
+
default: W(() => [
|
|
878
|
+
de("div", Do, [
|
|
879
|
+
Mo,
|
|
880
|
+
I(v)
|
|
881
|
+
])
|
|
882
|
+
]),
|
|
883
|
+
_: 2
|
|
884
|
+
}, 1032, ["onClick"])),
|
|
885
|
+
a.onlineFormDisabled ? ue("", !0) : (M(), ee(y, {
|
|
886
|
+
key: 1,
|
|
887
|
+
type: "primary",
|
|
888
|
+
onClick: (F) => a.openSubFormModalForEdit(c)
|
|
889
|
+
}, {
|
|
890
|
+
default: W(() => [
|
|
891
|
+
I(A)
|
|
892
|
+
]),
|
|
893
|
+
_: 2
|
|
894
|
+
}, 1032, ["onClick"]))
|
|
895
|
+
]),
|
|
896
|
+
_: 2
|
|
897
|
+
}, 1032, ["row-number", "height", "disabled", "columns", "dataSource", "onValueChange", "authPre", "onAdded", "onExecuteFillRule"])
|
|
898
|
+
]))
|
|
899
|
+
]),
|
|
900
|
+
_: 2
|
|
901
|
+
}, 1032, ["tab"]))), 128))
|
|
902
|
+
]),
|
|
903
|
+
_: 1
|
|
904
|
+
}, 8, ["activeKey"])) : ue("", !0),
|
|
905
|
+
I(U, {
|
|
906
|
+
loading: a.loading,
|
|
907
|
+
absolute: !1
|
|
908
|
+
}, null, 8, ["loading"]),
|
|
909
|
+
$t(i.$slots, "bottom", {}, void 0, !0),
|
|
910
|
+
I(Y, {
|
|
911
|
+
formTableType: "3",
|
|
912
|
+
request: a.popModalRequest,
|
|
913
|
+
id: a.popTableName,
|
|
914
|
+
onRegister: a.registerPopModal,
|
|
915
|
+
onSuccess: a.getPopFormData,
|
|
916
|
+
topTip: "",
|
|
917
|
+
isVxeTableData: ""
|
|
918
|
+
}, null, 8, ["request", "id", "onRegister", "onSuccess"])
|
|
919
|
+
], 10, Eo);
|
|
920
|
+
}
|
|
921
|
+
const Cl = /* @__PURE__ */ Oo(Po, [["render", Vo], ["__scopeId", "data-v-0f9f2964"]]);
|
|
922
|
+
export {
|
|
923
|
+
Cl as default
|
|
924
|
+
};
|