@jeecg/online 3.7.1-RC → 3.7.4
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/AccountLoginForm-d2fed52f.mjs +254 -0
- package/AiModal-fbe4b68a.mjs +84 -0
- package/AppForgetPassword-3b3bec82.mjs +310 -0
- package/AppLogin-cd2e2a87.mjs +287 -0
- package/AppLoginHeader-9b5be678.mjs +27 -0
- package/AppNameEmail-b4e32ae8.mjs +180 -0
- package/AppRegister-7117b66a.mjs +303 -0
- package/AppTenant-5817729b.mjs +373 -0
- package/AppThirdForm-d14fb5e5.mjs +189 -0
- package/AuthButtonConfig-5e3b6d72.mjs +156 -0
- package/AuthButtonTree-7b4ec967.mjs +165 -0
- package/{AuthDataConfig-5c3a8e6b.mjs → AuthDataConfig-48ee9228.mjs} +23 -23
- package/{AuthDataTree-dd7a1240.mjs → AuthDataTree-02b3ba05.mjs} +43 -43
- package/{AuthFieldConfig-9f6fa06c.mjs → AuthFieldConfig-562cc6b6.mjs} +71 -71
- package/AuthFieldTree-2d458c0c.mjs +232 -0
- package/{AuthManagerDrawer-76f15e8d.mjs → AuthManagerDrawer-38299230.mjs} +6 -6
- package/{AuthSetterModal-f5d2e87f.mjs → AuthSetterModal-78b06703.mjs} +9 -9
- package/BuiltInButtonList-bb6cf95c.mjs +10 -0
- package/BuiltInButtonList.vue_vue_type_script_setup_true_lang-07d0b7d0.mjs +338 -0
- package/CgformAddressModal-1b9cbe19.mjs +260 -0
- package/CgformCopyList-580bba0f.mjs +252 -0
- package/{CgformModal-21c5c387.mjs → CgformModal-12951453.mjs} +190 -194
- package/{CgreportModal-edefa8e3.mjs → CgreportModal-bfeb93ed.mjs} +181 -168
- package/{CheckDictTable-1bc8322d.mjs → CheckDictTable-3c1e59e0.mjs} +3 -3
- package/CodeFileListModal-71752603.mjs +159 -0
- package/{CodeFileViewModal-2fe911f4.mjs → CodeFileViewModal-eb803769.mjs} +66 -66
- package/CodeGeneratorModal-2fe1e920.mjs +281 -0
- package/CustomButtonList-22b5cdb3.mjs +274 -0
- package/{DBAttributeTable-285d40db.mjs → DBAttributeTable-eb25565c.mjs} +3 -3
- package/{DbToOnlineModal-5dcb67c3.mjs → DbToOnlineModal-049b4bbd.mjs} +53 -54
- package/{DetailForm-deecbf3d.mjs → DetailForm-c127c27f.mjs} +5 -5
- package/DropMenuItem-b1a8f47d.mjs +44 -0
- package/{EnhanceJavaModal-45c66cd5.mjs → EnhanceJavaModal-1a4d696b.mjs} +62 -62
- package/{EnhanceJsHistory-fab3102e.mjs → EnhanceJsHistory-48cf43ad.mjs} +35 -35
- package/{EnhanceJsModal-175357a1.mjs → EnhanceJsModal-0e1f15f8.mjs} +102 -102
- package/{EnhanceSqlModal-7ea1b300.mjs → EnhanceSqlModal-6a1aa471.mjs} +67 -67
- package/ErrorTip-bb616e32.mjs +7 -0
- package/ErrorTip.vue_vue_type_script_setup_true_lang-49d35987.mjs +60 -0
- package/{ExtendConfigModal-a89ae052.mjs → ExtendConfigModal-37af21a5.mjs} +2 -2
- package/{FieldExtendJsonModal-32135634.mjs → FieldExtendJsonModal-9441e08e.mjs} +2 -2
- package/{FileSelectModal-1643c8b9.mjs → FileSelectModal-04490919.mjs} +23 -23
- package/{ForeignKeyTable-7f7e28a7.mjs → ForeignKeyTable-06300a47.mjs} +3 -3
- package/{IndexTable-cdcc2b48.mjs → IndexTable-79bddd5c.mjs} +3 -3
- package/JModalTip-192fafa1.mjs +49 -0
- package/{JOnlineSearchSelect-22aae934.mjs → JOnlineSearchSelect-9abcf657.mjs} +1 -1
- package/{LeftDepart-d5615ed9.mjs → LeftDepart-35d78655.mjs} +1 -1
- package/LeftRole-9d88976d.mjs +86 -0
- package/{LeftUser-22baa378.mjs → LeftUser-04c89aea.mjs} +30 -30
- package/{LinkTableConfigModal-9242d750.mjs → LinkTableConfigModal-5f94ef13.mjs} +43 -31
- package/{LinkTableFieldConfigModal-24adc50c.mjs → LinkTableFieldConfigModal-40753de5.mjs} +1 -1
- package/{LinkTableListPiece-f3a8e0d7.mjs → LinkTableListPiece-179035c7.mjs} +1 -1
- package/{ModalFormDemo-711418db.mjs → ModalFormDemo-3a85920c.mjs} +1 -1
- package/OnlCgformErpList-8fd15fc1.mjs +488 -0
- package/OnlCgformErpSubTable-3515150b.mjs +441 -0
- package/{OnlCgformInnerSubTable-6c23781f.mjs → OnlCgformInnerSubTable-13e888c6.mjs} +38 -38
- package/OnlCgformInnerTableList-2e8f853c.mjs +474 -0
- package/OnlCgformTabList-583ac15f.mjs +424 -0
- package/OnlineAutoList-36ec0957.mjs +513 -0
- package/OnlineAutoModal-c0743caf.mjs +260 -0
- package/OnlineAutoTreeList-1cd718be.mjs +523 -0
- package/OnlineCustomModal-661ee850.mjs +232 -0
- package/{OnlineDetailModal-d5895734.mjs → OnlineDetailModal-785e848e.mjs} +74 -65
- package/OnlineForm-c1fb38eb.mjs +1012 -0
- package/{OnlineFormDetail-022ca117.mjs → OnlineFormDetail-50186870.mjs} +7 -7
- package/{OnlineFormUrlAdd-9715d70a.mjs → OnlineFormUrlAdd-905bf251.mjs} +9 -9
- package/{OnlineFormUrlDetail-8f864b1a.mjs → OnlineFormUrlDetail-a9dd2bfa.mjs} +11 -11
- package/{OnlineFormUrlEdit-ac985b36.mjs → OnlineFormUrlEdit-b8941f05.mjs} +9 -9
- package/OnlineFormUrlSuccess-ecaf6a21.mjs +59 -0
- package/OnlineQueryForm-ca6186a3.mjs +484 -0
- package/{OnlineSearchFormItem-6c557343.mjs → OnlineSearchFormItem-5c503a51.mjs} +82 -82
- package/{OnlineSelectCascade-05c40fef.mjs → OnlineSelectCascade-a3e686b3.mjs} +1 -1
- package/{OnlineSubFormDetail-58e896ce.mjs → OnlineSubFormDetail-be1ad3b9.mjs} +52 -53
- package/{OnlineTabAutoModal-47b18ad6.mjs → OnlineTabAutoModal-fb59b573.mjs} +108 -95
- package/{OnlineTabDetailModal-82de1465.mjs → OnlineTabDetailModal-4b9c4838.mjs} +36 -36
- package/OnlineTabForm-89389384.mjs +814 -0
- package/{OnlineTabFormDetail-8d0c40c0.mjs → OnlineTabFormDetail-72173ae4.mjs} +17 -17
- package/{PageAttributeTable-25e3b7da.mjs → PageAttributeTable-345b97fe.mjs} +108 -108
- package/PhoneLoginForm-8ca7e2d4.mjs +214 -0
- package/{ProcessOnlineForm-148632fe.mjs → ProcessOnlineForm-485b5679.mjs} +32 -32
- package/{QueryTable-f7bfca7f.mjs → QueryTable-f0a88d78.mjs} +3 -3
- package/SetSwitchOptions-cdcb22a1.mjs +62 -0
- package/ShareAddView-f713c0a5.mjs +86 -0
- package/ShareEditView-691764ad.mjs +92 -0
- package/ShareView-df344a8d.mjs +80 -0
- package/ShareView.vue_vue_type_script_setup_true_lang-560459c9.mjs +162 -0
- package/SingleView-ad0287d6.mjs +68 -0
- package/SingleView.vue_vue_type_style_index_0_lang-ce96670b.mjs +131 -0
- package/SuperQuery-2b293e3b.mjs +974 -0
- package/{SuperQueryValComponent-7ad86d4b.mjs → SuperQueryValComponent-5a9ccfd4.mjs} +1 -1
- package/{SuperQueryValComponent.vue_vue_type_script_lang-e9196096.mjs → SuperQueryValComponent.vue_vue_type_script_lang-8fe34917.mjs} +11 -11
- package/{auth.api-ea1d33d4.mjs → auth.api-53df4c33.mjs} +17 -17
- package/{auth.data-511e5197.mjs → auth.data-626c5083.mjs} +16 -12
- package/{cgform.data-475d4984.mjs → cgform.data-0ca62d09.mjs} +4 -1
- package/{enhance.data-a67572e1.mjs → enhance.data-6601ff44.mjs} +1 -1
- package/index-181f8344.mjs +219 -0
- package/index-19eaef11.mjs +11 -0
- package/{index-30e0e923.mjs → index-3c7392a4.mjs} +272 -262
- package/{index-f30613d1.mjs → index-3ccda826.mjs} +59 -59
- package/index-5e89258d.mjs +8 -0
- package/index-93341e02.mjs +110 -0
- package/index-bef7fe2d.mjs +74 -0
- package/index-d6f9ada7.mjs +135 -0
- package/index-f3683351.mjs +57 -0
- package/main.index.js +1 -1
- package/package.json +1 -1
- package/shareStore-7de6c7a6.mjs +67 -0
- package/style.css +1 -1
- package/useCgformList-13c8aab7.mjs +378 -0
- package/useExtendComponent-3f5734ca.mjs +4459 -0
- package/useListButton-ee23874a.mjs +719 -0
- package/{useSchemas-a9c75b0f.mjs → useSchemas-f1819e54.mjs} +72 -39
- package/{useTableSync-d7e9f18d.mjs → useTableSync-075826a1.mjs} +1 -1
- package/utils-9fce7606.mjs +16 -0
- package/AiModal-6de335e3.mjs +0 -84
- package/AuthButtonConfig-89763932.mjs +0 -154
- package/AuthButtonTree-2d87d0b3.mjs +0 -157
- package/AuthFieldTree-e326fc38.mjs +0 -232
- package/CgformCopyList-365b3e8f.mjs +0 -251
- package/CodeFileListModal-24601898.mjs +0 -159
- package/CodeGeneratorModal-f09fe903.mjs +0 -282
- package/CustomButtonList-f07bc695.mjs +0 -397
- package/JModalTip-b055ab60.mjs +0 -49
- package/LeftRole-2ed8a2bf.mjs +0 -86
- package/OnlCgformErpList-58acdfa0.mjs +0 -470
- package/OnlCgformErpSubTable-9b1e1938.mjs +0 -426
- package/OnlCgformInnerTableList-4b5e14ed.mjs +0 -458
- package/OnlCgformTabList-019ad753.mjs +0 -408
- package/OnlineAutoList-48589d09.mjs +0 -493
- package/OnlineAutoModal-c2928847.mjs +0 -239
- package/OnlineAutoTreeList-3baa1d00.mjs +0 -503
- package/OnlineCustomModal-9e17b6ce.mjs +0 -232
- package/OnlineForm-9f1153ba.mjs +0 -985
- package/OnlineFormUrlSuccess-3dfc54ab.mjs +0 -59
- package/OnlineQueryForm-eedb9a60.mjs +0 -466
- package/OnlineTabForm-27655c83.mjs +0 -817
- package/SetSwitchOptions-b2af757f.mjs +0 -62
- package/SuperQuery-a8592995.mjs +0 -967
- package/index-1d1a6e56.mjs +0 -57
- package/useCgformList-f41d4dc1.mjs +0 -426
- package/useExtendComponent-dcae5c78.mjs +0 -4399
- package/useListButton-bfac4ecf.mjs +0 -697
- /package/{OnlineForm.vue_vue_type_style_index_0_scoped_4657b304_lang-4ed993c7.mjs → OnlineForm.vue_vue_type_style_index_0_scoped_3f26e7bd_lang-4ed993c7.mjs} +0 -0
|
@@ -0,0 +1,1012 @@
|
|
|
1
|
+
var Qt = Object.defineProperty, Xt = Object.defineProperties;
|
|
2
|
+
var Zt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Me = Object.getOwnPropertySymbols;
|
|
4
|
+
var $t = Object.prototype.hasOwnProperty, en = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var De = (u, p, s) => p in u ? Qt(u, p, { enumerable: !0, configurable: !0, writable: !0, value: s }) : u[p] = s, w = (u, p) => {
|
|
6
|
+
for (var s in p || (p = {}))
|
|
7
|
+
$t.call(p, s) && De(u, s, p[s]);
|
|
8
|
+
if (Me)
|
|
9
|
+
for (var s of Me(p))
|
|
10
|
+
en.call(p, s) && De(u, s, p[s]);
|
|
11
|
+
return u;
|
|
12
|
+
}, ce = (u, p) => Xt(u, Zt(p));
|
|
13
|
+
var _ = (u, p, s) => new Promise((a, R) => {
|
|
14
|
+
var E = (F) => {
|
|
15
|
+
try {
|
|
16
|
+
O(s.next(F));
|
|
17
|
+
} catch (S) {
|
|
18
|
+
R(S);
|
|
19
|
+
}
|
|
20
|
+
}, B = (F) => {
|
|
21
|
+
try {
|
|
22
|
+
O(s.throw(F));
|
|
23
|
+
} catch (S) {
|
|
24
|
+
R(S);
|
|
25
|
+
}
|
|
26
|
+
}, O = (F) => F.done ? a(F.value) : Promise.resolve(F.value).then(E, B);
|
|
27
|
+
O((s = s.apply(u, p)).next());
|
|
28
|
+
});
|
|
29
|
+
import { useMessage as tn } from "/@/hooks/web/useMessage";
|
|
30
|
+
import { ref as v, inject as nn, reactive as ln, watch as on, computed as an, resolveComponent as D, openBlock as V, createElementBlock as te, normalizeClass as rn, createVNode as H, createBlock as ne, withCtx as G, Fragment as sn, renderList as un, normalizeStyle as cn, createElementVNode as Ve, toDisplayString as Be, createCommentVNode as fe, renderSlot as fn, unref as Ie, nextTick as je, toRaw as J } from "vue";
|
|
31
|
+
import { BasicForm as dn, useForm as mn } from "/@/components/Form/index";
|
|
32
|
+
import { c as pn, O as gn, d as hn, e as bn, u as yn, l as Y, k as vn, g as Fn, V as z, S as Sn, f as wn, h as Ne, j as de } from "./useExtendComponent-3f5734ca.mjs";
|
|
33
|
+
import { defHttp as le } from "/@/utils/http/axios";
|
|
34
|
+
import { pick as kn, omit as Je, debounce as Tn, cloneDeep as Cn } from "lodash-es";
|
|
35
|
+
import { sleep as _n, goJmReportViewPage as On } from "/@/utils";
|
|
36
|
+
import { Loading as Pn } from "/@/components/Loading";
|
|
37
|
+
import "/@/components/jeecg/JVxeTable/types";
|
|
38
|
+
import { getToken as An } from "/@/utils/auth";
|
|
39
|
+
import { PrinterOutlined as Rn } from "@ant-design/icons-vue";
|
|
40
|
+
import "/@/hooks/core/useContext";
|
|
41
|
+
import "/@/utils/mitt";
|
|
42
|
+
import { useModal as En } from "/@/components/Modal";
|
|
43
|
+
import { u as xn, G as Mn } from "./useCustomHook-acb00837.mjs";
|
|
44
|
+
import { E as oe } from "./constant-fa63bd66.mjs";
|
|
45
|
+
import { useAppInject as Dn } from "/@/hooks/web/useAppInject";
|
|
46
|
+
import { isArray as Vn } from "/@/utils/is";
|
|
47
|
+
import { usePermissionStore as Bn } from "/@/store/modules/permission";
|
|
48
|
+
import "./OnlineForm.vue_vue_type_style_index_0_scoped_3f26e7bd_lang-4ed993c7.mjs";
|
|
49
|
+
import { _ as In } from "./index-f3683351.mjs";
|
|
50
|
+
import "/@/components/Form/src/componentMap";
|
|
51
|
+
import "/@/utils/propTypes";
|
|
52
|
+
import "/@/utils/common/compUtils";
|
|
53
|
+
import "/@/components/Form/src/jeecg/components/JUpload";
|
|
54
|
+
import "/@/views/system/user/user.api";
|
|
55
|
+
import "/@/store/modules/user";
|
|
56
|
+
import "/@/utils/desform/customExpression";
|
|
57
|
+
import "/@/utils/dict/JDictSelectUtil";
|
|
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-179035c7.mjs";
|
|
64
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
65
|
+
import "/@/api/common/api";
|
|
66
|
+
import "/@/assets/images/placeholderImage.png";
|
|
67
|
+
import "./OnlineSelectCascade-a3e686b3.mjs";
|
|
68
|
+
import "./JModalTip-192fafa1.mjs";
|
|
69
|
+
import "ant-design-vue";
|
|
70
|
+
import "@vueuse/core";
|
|
71
|
+
import "/@/utils/cache";
|
|
72
|
+
const me = {
|
|
73
|
+
optPre: "/online/cgform/api/form/",
|
|
74
|
+
urlButtonAction: "/online/cgform/api/doButton"
|
|
75
|
+
}, jn = {
|
|
76
|
+
name: "OnlineForm",
|
|
77
|
+
components: {
|
|
78
|
+
BasicForm: dn,
|
|
79
|
+
Loading: Pn,
|
|
80
|
+
OnlineSubForm: pn,
|
|
81
|
+
PrinterOutlined: Rn,
|
|
82
|
+
OnlinePopModal: gn
|
|
83
|
+
},
|
|
84
|
+
props: {
|
|
85
|
+
id: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: ""
|
|
88
|
+
},
|
|
89
|
+
formTemplate: {
|
|
90
|
+
type: Number,
|
|
91
|
+
default: 1
|
|
92
|
+
},
|
|
93
|
+
disabled: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
default: !1
|
|
96
|
+
},
|
|
97
|
+
isTree: {
|
|
98
|
+
type: Boolean,
|
|
99
|
+
default: !1
|
|
100
|
+
},
|
|
101
|
+
pidField: {
|
|
102
|
+
type: String,
|
|
103
|
+
default: ""
|
|
104
|
+
},
|
|
105
|
+
submitTip: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
default: !0
|
|
108
|
+
},
|
|
109
|
+
modalClass: {
|
|
110
|
+
type: String,
|
|
111
|
+
default: ""
|
|
112
|
+
},
|
|
113
|
+
themeTemplate: {
|
|
114
|
+
type: String,
|
|
115
|
+
default: ""
|
|
116
|
+
},
|
|
117
|
+
// update-begin--author:liaozhiyang---date:20231128---for:【QQYUN-7260】erp主表编辑时保存子表记录
|
|
118
|
+
// erp风格会传来所有子表数据
|
|
119
|
+
subTableSource: {
|
|
120
|
+
default: () => ({})
|
|
121
|
+
},
|
|
122
|
+
// update-end-author:liaozhiyang---date:20231128---for:【QQYUN-7260】erp主表编辑时保存子表记录
|
|
123
|
+
// -update-begin--author:liaozhiyang---date:20240613---for:【TV360X-1000】流程一对多走流程的接口
|
|
124
|
+
// 流程会传taskId
|
|
125
|
+
taskId: {
|
|
126
|
+
type: String
|
|
127
|
+
},
|
|
128
|
+
// -update-end--author:liaozhiyang---date:20240613---for:【TV360X-1000】流程一对多走流程的接口
|
|
129
|
+
cgBIBtnMap: Object,
|
|
130
|
+
buttonSwitch: Object
|
|
131
|
+
},
|
|
132
|
+
emits: ["success", "rendered", "close"],
|
|
133
|
+
setup(u, { emit: p }) {
|
|
134
|
+
const { createMessage: s } = tn(), a = v(null), R = v(!0), E = v(!1), B = v(1), O = v(""), F = v(!1), S = v(!1), { getIsMobile: I } = Dn(), Q = v(!1), L = nn("foreignkey", { value: {} }), ae = v(!I.value), c = v(null);
|
|
135
|
+
let U = null;
|
|
136
|
+
const y = ln({
|
|
137
|
+
reportPrintShow: 0,
|
|
138
|
+
reportPrintUrl: "",
|
|
139
|
+
joinQuery: 0,
|
|
140
|
+
modelFullscreen: 0,
|
|
141
|
+
modalMinWidth: "",
|
|
142
|
+
commentStatus: 0
|
|
143
|
+
}), {
|
|
144
|
+
onlineFormContext: b,
|
|
145
|
+
resetContext: Le,
|
|
146
|
+
getSubAddBtnCfg: Ue,
|
|
147
|
+
getSubRemoveBtnCfg: Ke,
|
|
148
|
+
getSubOpenAddBtnCfg: Ye,
|
|
149
|
+
getSubOpenEditBtnCfg: We
|
|
150
|
+
} = hn(u), {
|
|
151
|
+
formSchemas: X,
|
|
152
|
+
defaultValueFields: W,
|
|
153
|
+
changeDataIfArray2String: pe,
|
|
154
|
+
tableName: x,
|
|
155
|
+
dbData: M,
|
|
156
|
+
checkOnlyFieldValue: qe,
|
|
157
|
+
hasSubTable: He,
|
|
158
|
+
subTabInfo: k,
|
|
159
|
+
refMap: P,
|
|
160
|
+
subDataSource: Z,
|
|
161
|
+
baseColProps: Ge,
|
|
162
|
+
createFormSchemas: ze,
|
|
163
|
+
linkDownList: Un,
|
|
164
|
+
fieldDisplayStatus: K,
|
|
165
|
+
labelCol: Qe,
|
|
166
|
+
wrapperCol: Xe,
|
|
167
|
+
labelWidth: Ze
|
|
168
|
+
} = bn(u, a);
|
|
169
|
+
let { EnhanceJS: f, initCgEnhanceJs: $e } = yn(b, !1);
|
|
170
|
+
on(
|
|
171
|
+
[k, I],
|
|
172
|
+
() => {
|
|
173
|
+
I.value && k.value.length && k.value.forEach((e) => {
|
|
174
|
+
e.relationType != 1 && e.columns.forEach((t) => {
|
|
175
|
+
t.width = 100;
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
},
|
|
179
|
+
{ immediate: !0 }
|
|
180
|
+
);
|
|
181
|
+
const { executeJsEnhanced: et } = xn({}, b), [tt, { setProps: nt, validate: ge, resetFields: he, clearValidate: lt, setFieldsValue: A, updateSchema: q, getFieldsValue: $, scrollToField: be }] = mn({
|
|
182
|
+
schemas: X,
|
|
183
|
+
showActionButtonGroup: !1,
|
|
184
|
+
baseColProps: Ge,
|
|
185
|
+
// update-begin--author:liaozhiyang---date:20240329---for:【QQYUN-7872】online表单label较长优化
|
|
186
|
+
labelWidth: Ze,
|
|
187
|
+
// update-end--author:liaozhiyang---date:20240329---for:【QQYUN-7872】online表单label较长优化
|
|
188
|
+
// update-begin--author:liaozhiyang---date:20240105---for:【QQYUN-7499】多列风格富文本、markdown增加独占一行功能
|
|
189
|
+
labelCol: Qe,
|
|
190
|
+
wrapperCol: Xe
|
|
191
|
+
// update-end--author:liaozhiyang---date:20240105---for:【QQYUN-7499】多列风格富文本、markdown增加独占一行功能
|
|
192
|
+
}), ye = v(!1);
|
|
193
|
+
function ot() {
|
|
194
|
+
let e = u.disabled;
|
|
195
|
+
ye.value = e, nt({ disabled: e });
|
|
196
|
+
}
|
|
197
|
+
function at(e, t, n) {
|
|
198
|
+
return _(this, null, function* () {
|
|
199
|
+
yield it(), O.value = "", yield he(), setTimeout(() => {
|
|
200
|
+
lt();
|
|
201
|
+
}, 0), M.value = "";
|
|
202
|
+
let l = Ie(e);
|
|
203
|
+
S.value = l, ct(), l ? yield Fe(t) : Se(), je(() => {
|
|
204
|
+
var o;
|
|
205
|
+
!l && n && A(n), rt(), ie("js", "loaded"), ot(), (o = c.value) != null && o.length && (c.value[0].scrollTop = 0);
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
function it() {
|
|
210
|
+
return _(this, null, function* () {
|
|
211
|
+
if (u.isTree === !0) {
|
|
212
|
+
let e = u.pidField, t = X.value;
|
|
213
|
+
t && t.length > 0 && t.filter((l) => l.field === e).length > 0 && (yield q({
|
|
214
|
+
field: e,
|
|
215
|
+
componentProps: {
|
|
216
|
+
reload: (/* @__PURE__ */ new Date()).getTime(),
|
|
217
|
+
// update-begin--author:liaozhiyang---date:20240529---for:【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
|
|
218
|
+
hiddenNodeKey: ""
|
|
219
|
+
// update-end--author:liaozhiyang---date:20240529---for:【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
|
|
220
|
+
}
|
|
221
|
+
}));
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
const j = {
|
|
226
|
+
keys: [],
|
|
227
|
+
map: /* @__PURE__ */ new Map(),
|
|
228
|
+
calcFn: /* @__PURE__ */ new Map()
|
|
229
|
+
};
|
|
230
|
+
function rt() {
|
|
231
|
+
let e = J(W[x.value]);
|
|
232
|
+
Ie(S) === !1 && Y(e, (n) => {
|
|
233
|
+
A(n);
|
|
234
|
+
});
|
|
235
|
+
const t = vn(e);
|
|
236
|
+
j.keys = [...t.keys()], j.map = t, j.calcFn.clear();
|
|
237
|
+
}
|
|
238
|
+
function st(e, t) {
|
|
239
|
+
if (j.keys.includes(e)) {
|
|
240
|
+
let n = j.calcFn.get(e);
|
|
241
|
+
typeof n != "function" && (n = Tn(() => {
|
|
242
|
+
let l = J(W[x.value]);
|
|
243
|
+
if (Array.isArray(l) && l.length > 0) {
|
|
244
|
+
const o = j.map.get(e);
|
|
245
|
+
l = l.filter((i) => o.includes(i.field));
|
|
246
|
+
} else
|
|
247
|
+
l = [];
|
|
248
|
+
if (l.length > 0) {
|
|
249
|
+
let o = $();
|
|
250
|
+
Y(l, (i) => A(i), o);
|
|
251
|
+
}
|
|
252
|
+
}, 150), j.calcFn.set(e, n)), n(t);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
function ve(e, t) {
|
|
256
|
+
let n = J(W[e.key]);
|
|
257
|
+
Y(n, (l) => {
|
|
258
|
+
const { row: o, target: i } = t;
|
|
259
|
+
let d = [{ rowKey: o.id, values: w({}, l) }];
|
|
260
|
+
i.setValues(d);
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
function Fe(e) {
|
|
264
|
+
return _(this, null, function* () {
|
|
265
|
+
let t = yield dt(e.id);
|
|
266
|
+
M.value = Object.assign({}, e, t);
|
|
267
|
+
let n = ft.value, l = kn(t, ...n);
|
|
268
|
+
u.disabled && Object.keys(l).map((o) => {
|
|
269
|
+
!l[o] && l[o] !== 0 && l[o] !== "0" && delete l[o];
|
|
270
|
+
}), yield A(l), ut(e.id), Se(t);
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
function Se(e) {
|
|
274
|
+
e || (e = {});
|
|
275
|
+
let t = Object.keys(Z.value);
|
|
276
|
+
if (t && t.length > 0) {
|
|
277
|
+
let n = {};
|
|
278
|
+
for (let l of t)
|
|
279
|
+
n[l] = e[l] || [];
|
|
280
|
+
Z.value = n;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
function ut(e) {
|
|
284
|
+
var t;
|
|
285
|
+
if (u.isTree === !0) {
|
|
286
|
+
const { schema: n } = U, l = (t = n.properties) != null ? t : {}, o = Object.entries(l);
|
|
287
|
+
if (o.length) {
|
|
288
|
+
const i = o.find(([d, m]) => m.view === "sel_tree" && m.pidComponent != null);
|
|
289
|
+
if (i) {
|
|
290
|
+
const d = i[0];
|
|
291
|
+
X.value.find((r) => r.field == d) && q({
|
|
292
|
+
field: d,
|
|
293
|
+
componentProps: {
|
|
294
|
+
hiddenNodeKey: e
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
function ct() {
|
|
302
|
+
var e;
|
|
303
|
+
(e = k.value) == null || e.forEach((t) => {
|
|
304
|
+
t.relationType == 1 && P[t.key].value && P[t.key].value[0].resetFields();
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
let ft = an(() => {
|
|
308
|
+
let e = X.value, t = [];
|
|
309
|
+
for (let n of e)
|
|
310
|
+
t.push(n.field);
|
|
311
|
+
return t;
|
|
312
|
+
});
|
|
313
|
+
function dt(e) {
|
|
314
|
+
let t = `${me.optPre}${u.id}/${e}`;
|
|
315
|
+
return new Promise((n, l) => {
|
|
316
|
+
le.get({ url: t }, { isTransformResponse: !1 }).then((o) => {
|
|
317
|
+
o.success ? n(o.result) : (l(), s.warning(o.message));
|
|
318
|
+
}).catch(() => {
|
|
319
|
+
l();
|
|
320
|
+
});
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
function mt(e) {
|
|
324
|
+
return _(this, null, function* () {
|
|
325
|
+
B.value = e.head.tableType, x.value = e.head.tableName, R.value = e.head.tableType == 1, ht(e.head.extConfigJson), ze(e.schema.properties, e.schema.required, qe, y), f = $e(e.enhanceJs), p("rendered", y);
|
|
326
|
+
let t = yield Fn(a);
|
|
327
|
+
t.$formValueChange = (n, l, o) => {
|
|
328
|
+
Mt(n, l), o && A(o), pt(n, l, o), st(n, l);
|
|
329
|
+
}, f && f.setup && Pe(f.setup), U = e;
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
function pt(e, t, n) {
|
|
333
|
+
b.changEvent(e, t, n);
|
|
334
|
+
}
|
|
335
|
+
function gt(e) {
|
|
336
|
+
b.addObject2Context("changEvent", e);
|
|
337
|
+
}
|
|
338
|
+
function ht(e) {
|
|
339
|
+
let t = { reportPrintShow: 0, reportPrintUrl: "", joinQuery: 0, modelFullscreen: 0, modalMinWidth: "", commentStatus: 0, formLabelLength: null };
|
|
340
|
+
e && (t = JSON.parse(e), I.value && (t.commentStatus = 0)), Q.value = !!t.formLabelLength, Object.keys(t).map((n) => {
|
|
341
|
+
y[n] = t[n];
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
function bt() {
|
|
345
|
+
F.value = !0, we();
|
|
346
|
+
}
|
|
347
|
+
function we() {
|
|
348
|
+
R.value === !0 ? wt() : yt();
|
|
349
|
+
}
|
|
350
|
+
function yt() {
|
|
351
|
+
vt().then((e) => {
|
|
352
|
+
Te(e);
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
function vt() {
|
|
356
|
+
let e = {};
|
|
357
|
+
return new Promise((t, n) => {
|
|
358
|
+
ge().then(
|
|
359
|
+
(l) => t(l),
|
|
360
|
+
({ errorFields: l, values: o }) => {
|
|
361
|
+
n({
|
|
362
|
+
// update-begin--author:liaozhiyang---date:20240617---for:【TV360X-496】使用数值类型,金额校验,控件默认值得出的是小数导致校验过不去给提示
|
|
363
|
+
errorFields: l,
|
|
364
|
+
values: o,
|
|
365
|
+
// update-end--author:liaozhiyang---date:20240617---for:【TV360X-496】使用数值类型,金额校验,控件默认值得出的是小数导致校验过不去给提示
|
|
366
|
+
code: z,
|
|
367
|
+
key: x.value,
|
|
368
|
+
// 滚动到未通过校验的字段上
|
|
369
|
+
scrollToField: () => l[0] && be(l[0].name, { behavior: "smooth", block: "center" })
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
);
|
|
373
|
+
}).then((t) => (Object.assign(e, pe(t)), u.themeTemplate === oe ? Promise.resolve({}) : St())).then((t) => (Object.assign(e, t), Promise.resolve(e))).catch((t) => ((t === z || (t == null ? void 0 : t.code) === z) && (ke(t.errorFields, t.values, R.value, t.key).then((n) => {
|
|
374
|
+
n || s.warning("校验未通过");
|
|
375
|
+
}), t.key && (Ft(t.key), t.scrollToField && setTimeout(() => t.scrollToField(), 150))), Promise.reject(null)));
|
|
376
|
+
}
|
|
377
|
+
function Ft(e) {
|
|
378
|
+
let t = k.value;
|
|
379
|
+
for (let n = 0; n < t.length; n++)
|
|
380
|
+
if (e == t[n].key) {
|
|
381
|
+
let l = n + "";
|
|
382
|
+
if (ee.value === l)
|
|
383
|
+
break;
|
|
384
|
+
if (ee.value = l, t[n].relationType === 0) {
|
|
385
|
+
let o = T(e);
|
|
386
|
+
_n(300, () => o == null ? void 0 : o.validateTable());
|
|
387
|
+
}
|
|
388
|
+
break;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
function St() {
|
|
392
|
+
return new Promise((e, t) => _(this, null, function* () {
|
|
393
|
+
let n = {};
|
|
394
|
+
try {
|
|
395
|
+
let l = k.value;
|
|
396
|
+
for (let o = 0; o < l.length; o++) {
|
|
397
|
+
let i = l[o].key, d = T(i);
|
|
398
|
+
if (l[o].relationType == 1)
|
|
399
|
+
try {
|
|
400
|
+
let m = yield d.getAll();
|
|
401
|
+
n[i] = [], n[i].push(m);
|
|
402
|
+
} catch (m) {
|
|
403
|
+
return t(w({ code: z, key: i }, m));
|
|
404
|
+
}
|
|
405
|
+
else {
|
|
406
|
+
if (yield d.fullValidateTable())
|
|
407
|
+
return t({ code: z, key: i });
|
|
408
|
+
n[i] = d.getTableData();
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
} catch (l) {
|
|
412
|
+
t(l);
|
|
413
|
+
}
|
|
414
|
+
e(n);
|
|
415
|
+
}));
|
|
416
|
+
}
|
|
417
|
+
function wt() {
|
|
418
|
+
return _(this, null, function* () {
|
|
419
|
+
try {
|
|
420
|
+
let e = yield ge();
|
|
421
|
+
e = Object.assign({}, M.value, e), e = pe(e), E.value = !0, Te(e);
|
|
422
|
+
} catch (e) {
|
|
423
|
+
Array.isArray(e == null ? void 0 : e.errorFields) && e.errorFields[0] && (be(e.errorFields[0].name, { behavior: "smooth", block: "center" }), ke(e.errorFields, e.values, R.value));
|
|
424
|
+
} finally {
|
|
425
|
+
E.value = !1, p("close");
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
function ke(e, t, n, l = null) {
|
|
430
|
+
return _(this, null, function* () {
|
|
431
|
+
var i;
|
|
432
|
+
let o = !1;
|
|
433
|
+
if (e != null && e.length) {
|
|
434
|
+
const d = (i = U.schema) != null ? i : {}, { properties: m = {} } = d, r = e[0].name[0];
|
|
435
|
+
let h;
|
|
436
|
+
if (n || l === x.value)
|
|
437
|
+
h = m[r];
|
|
438
|
+
else {
|
|
439
|
+
const g = m[l], { properties: C = {} } = g;
|
|
440
|
+
h = C[r];
|
|
441
|
+
}
|
|
442
|
+
h.type === "number" && h.view === "number" && h.defVal && (yield Y(
|
|
443
|
+
[
|
|
444
|
+
{
|
|
445
|
+
field: r,
|
|
446
|
+
type: h.type,
|
|
447
|
+
value: h.defVal,
|
|
448
|
+
view: h.view
|
|
449
|
+
}
|
|
450
|
+
],
|
|
451
|
+
(g) => {
|
|
452
|
+
g[r] === t[r] && (s.warning(`${h.title}的默认值是:${t[r]},导致校验通不过,需要正确配置默认值!`), o = !0);
|
|
453
|
+
}
|
|
454
|
+
));
|
|
455
|
+
}
|
|
456
|
+
return o;
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
function Te(e) {
|
|
460
|
+
u.themeTemplate === oe && S.value && Object.keys(u.subTableSource).length && (e = w(w({}, e), u.subTableSource)), Nt(xe, e).then(() => {
|
|
461
|
+
Tt(e);
|
|
462
|
+
}).catch((t) => {
|
|
463
|
+
s.warning(t);
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
const kt = (e) => {
|
|
467
|
+
const { schema: t } = U, { properties: n } = t, l = (o, i) => {
|
|
468
|
+
Object.entries(o).forEach(([d, m]) => {
|
|
469
|
+
var h;
|
|
470
|
+
const r = i[d];
|
|
471
|
+
if (r) {
|
|
472
|
+
if (r.view === "tab" && Vn(m)) {
|
|
473
|
+
if (r.properties && m.forEach((g) => {
|
|
474
|
+
l(g, r.properties);
|
|
475
|
+
}), (h = r.columns) != null && h.length) {
|
|
476
|
+
const g = Cn(r.columns.filter((C) => C.type === "date" && C.fieldExtendJson));
|
|
477
|
+
if (g.length) {
|
|
478
|
+
const C = {};
|
|
479
|
+
g.forEach((N) => {
|
|
480
|
+
C[N.key] = {
|
|
481
|
+
view: "date",
|
|
482
|
+
fieldExtendJson: N.fieldExtendJson
|
|
483
|
+
};
|
|
484
|
+
}), m.forEach((N) => {
|
|
485
|
+
l(N, C);
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
} else if (r.view === "date" && typeof m == "string" && m !== "") {
|
|
490
|
+
let g = r.fieldExtendJson;
|
|
491
|
+
g && (g = JSON.parse(g), g.picker && g.picker !== "default" && (g.picker === "year" ? o[d] = de(m).set("month", 0).set("date", 1).format("YYYY-MM-DD") : g.picker === "month" ? o[d] = de(m).set("date", 1).format("YYYY-MM-DD") : g.picker === "week" && (o[d] = de(m).startOf("week").format("YYYY-MM-DD"))));
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
};
|
|
496
|
+
l(e, n);
|
|
497
|
+
};
|
|
498
|
+
function Tt(e) {
|
|
499
|
+
Object.keys(e).map((o) => {
|
|
500
|
+
Array.isArray(e[o]) && e[o].length == 0 && (e[o] = "");
|
|
501
|
+
}), kt(e);
|
|
502
|
+
let t = O.value, n = `${me.optPre}${u.id}?tabletype=${B.value}`;
|
|
503
|
+
t && (n = `${t}?tabletype=${B.value}`), F.value === !0 && (e[Sn] = 1), L.value.field && L.value.value && (e[L.value.field] = L.value.value);
|
|
504
|
+
let l = S.value === !0 ? "put" : "post";
|
|
505
|
+
le.request({ url: n, method: l, params: e }, { isTransformResponse: !1 }).then((o) => {
|
|
506
|
+
o.success ? (o.result && (e[wn] = o.result), p("success", e), u.submitTip === !0 && s.success(o.message)) : s.warning(o.message);
|
|
507
|
+
}).finally(() => {
|
|
508
|
+
E.value = !1, p("close");
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
function Ct(e, t, n) {
|
|
512
|
+
t && n ? n.vxeProps ? n.setValues([
|
|
513
|
+
{
|
|
514
|
+
rowKey: t,
|
|
515
|
+
values: e
|
|
516
|
+
}
|
|
517
|
+
]) : n.setValues(e) : A(e);
|
|
518
|
+
}
|
|
519
|
+
function _t(e, t) {
|
|
520
|
+
let n = {};
|
|
521
|
+
n[e] = t, A(n);
|
|
522
|
+
}
|
|
523
|
+
const ee = v("0"), Ce = v(I.value ? "auto" : 500), _e = v(340);
|
|
524
|
+
function Ot(e) {
|
|
525
|
+
if (S.value === !0) {
|
|
526
|
+
let t = M.value;
|
|
527
|
+
return Pt(t, e);
|
|
528
|
+
}
|
|
529
|
+
return "";
|
|
530
|
+
}
|
|
531
|
+
function Pt(e, t) {
|
|
532
|
+
if (e) {
|
|
533
|
+
let n = e[t];
|
|
534
|
+
return !n && n !== 0 && (n = e[t.toLowerCase()], !n && n !== 0 && (n = e[t.toUpperCase()])), n;
|
|
535
|
+
}
|
|
536
|
+
return "";
|
|
537
|
+
}
|
|
538
|
+
function At(e, t) {
|
|
539
|
+
if (f && f[t + "_onlChange"]) {
|
|
540
|
+
let n = f[t + "_onlChange"](), l = Object.keys(e)[0];
|
|
541
|
+
if (n[l]) {
|
|
542
|
+
let i = T(t).getFormEvent(), d = w({
|
|
543
|
+
column: { key: l },
|
|
544
|
+
value: e[l]
|
|
545
|
+
}, i);
|
|
546
|
+
n[l].call(b, b, d);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
function Rt(e, t) {
|
|
551
|
+
if (f && f[t + "_onlChange"]) {
|
|
552
|
+
let n = f[t + "_onlChange"](b);
|
|
553
|
+
if (e.column === "all") {
|
|
554
|
+
let l = Object.keys(n);
|
|
555
|
+
if (l.length > 0)
|
|
556
|
+
for (let o of l)
|
|
557
|
+
n[o].call(b, b, e);
|
|
558
|
+
} else {
|
|
559
|
+
let l = e.column.key || e.col.key;
|
|
560
|
+
n[l] && e.row && e.row.id && n[l].call(b, b, e);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
function Et(e, t) {
|
|
565
|
+
var n;
|
|
566
|
+
if (f && f[t + "_onlChange"]) {
|
|
567
|
+
let l = f[t + "_onlChange"](b), o = Object.keys(l);
|
|
568
|
+
if (o.length > 0)
|
|
569
|
+
for (let i of o)
|
|
570
|
+
(n = l[i]) == null || n.call(b, b, ce(w({}, e), { row: e.deleteRows }));
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
function xt(e, t) {
|
|
574
|
+
t.isModalData || ve(e, t);
|
|
575
|
+
}
|
|
576
|
+
function Oe(e) {
|
|
577
|
+
return "online_" + e + ":";
|
|
578
|
+
}
|
|
579
|
+
function Mt(e, t) {
|
|
580
|
+
return _(this, null, function* () {
|
|
581
|
+
if (!f || !f.onlChange || !e)
|
|
582
|
+
return !1;
|
|
583
|
+
let n = f.onlChange();
|
|
584
|
+
n[e] && setTimeout(() => _(this, null, function* () {
|
|
585
|
+
let o = {
|
|
586
|
+
row: yield $(),
|
|
587
|
+
column: { key: e },
|
|
588
|
+
value: t
|
|
589
|
+
};
|
|
590
|
+
n[e].call(b, b, o);
|
|
591
|
+
}), 0);
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
function Pe(e) {
|
|
595
|
+
let n = e.toLocaleString().match(Mn);
|
|
596
|
+
if (n.length > 1) {
|
|
597
|
+
let l = n[1];
|
|
598
|
+
et(l);
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
function ie(e, t) {
|
|
602
|
+
if (e == "js") {
|
|
603
|
+
let n = t + "_hook";
|
|
604
|
+
f && f[t] ? f[t].call(b, b) : f && f[n] && Pe(f[n]);
|
|
605
|
+
} else if (e == "action") {
|
|
606
|
+
let n = M.value, l = {
|
|
607
|
+
formId: u.id,
|
|
608
|
+
buttonCode: t,
|
|
609
|
+
dataId: n.id,
|
|
610
|
+
uiFormData: Object.assign({}, n)
|
|
611
|
+
};
|
|
612
|
+
le.post(
|
|
613
|
+
{
|
|
614
|
+
url: `${me.urlButtonAction}`,
|
|
615
|
+
params: l
|
|
616
|
+
},
|
|
617
|
+
{ isTransformResponse: !1 }
|
|
618
|
+
).then((o) => {
|
|
619
|
+
o.success ? s.success("处理完成!") : s.warning("处理失败!");
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
function Ae(e) {
|
|
624
|
+
let t = T(e), n = [...t.getNewDataWithId(), ...Z.value[e]];
|
|
625
|
+
if (!n || n.length == 0)
|
|
626
|
+
return !1;
|
|
627
|
+
let l = [];
|
|
628
|
+
for (let o of n)
|
|
629
|
+
l.push(o.id);
|
|
630
|
+
t.removeRowsById(l);
|
|
631
|
+
}
|
|
632
|
+
function Re(e, t) {
|
|
633
|
+
if (!t)
|
|
634
|
+
return !1;
|
|
635
|
+
let n = T(e);
|
|
636
|
+
typeof t == "object" ? n.addRows(t, !0) : this.$message.error("添加子表数据,参数不识别!");
|
|
637
|
+
}
|
|
638
|
+
function Dt(e, t) {
|
|
639
|
+
Ae(e), Re(e, t);
|
|
640
|
+
}
|
|
641
|
+
function Vt(e, t) {
|
|
642
|
+
!t && t.length <= 0 && (t = []), t.map((n) => {
|
|
643
|
+
n.hasOwnProperty("label") || (n.label = n.text);
|
|
644
|
+
}), q({
|
|
645
|
+
field: e,
|
|
646
|
+
componentProps: {
|
|
647
|
+
options: t
|
|
648
|
+
}
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
function Bt({ field: e, dict: t, label: n, type: l, subTableName: o }) {
|
|
652
|
+
var d, m;
|
|
653
|
+
const i = t.split(",").map((r) => encodeURIComponent(r)).join(",");
|
|
654
|
+
if (l == "subTable") {
|
|
655
|
+
const r = k.value.find((h) => h.key === o);
|
|
656
|
+
if (r) {
|
|
657
|
+
const h = r.columns.findIndex((g) => g.key === e);
|
|
658
|
+
h !== -1 && le.get({
|
|
659
|
+
url: `/sys/dict/loadDict/${i}`,
|
|
660
|
+
params: { keyword: "", pageSize: 1e3 }
|
|
661
|
+
}).then((g) => {
|
|
662
|
+
const C = t.split(","), N = { customOptions: !0, dictTable: C[0], dictCode: C[2], dictText: C[1], options: g };
|
|
663
|
+
n && (N.title = n), r.columns[h] = w(w({}, r.columns[h]), N), window.findSubTableInfo = r;
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
} else if (l == "subForm") {
|
|
667
|
+
if ((m = (d = P[o]) == null ? void 0 : d.value) != null && m[0]) {
|
|
668
|
+
const r = {
|
|
669
|
+
field: e,
|
|
670
|
+
componentProps: {
|
|
671
|
+
dict: i
|
|
672
|
+
}
|
|
673
|
+
};
|
|
674
|
+
n && (r.label = n), P[o].value[0].updateSchema(r);
|
|
675
|
+
}
|
|
676
|
+
} else {
|
|
677
|
+
const r = {
|
|
678
|
+
field: e,
|
|
679
|
+
componentProps: {
|
|
680
|
+
dict: i
|
|
681
|
+
}
|
|
682
|
+
};
|
|
683
|
+
n && (r.label = n), q(r);
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
function It(e, t, n) {
|
|
687
|
+
const l = k.value.find((o) => o.key === e);
|
|
688
|
+
if (l) {
|
|
689
|
+
!n && n.length <= 0 && (n = []), n.map((i) => {
|
|
690
|
+
i.hasOwnProperty("label") || (i.label = i.text);
|
|
691
|
+
});
|
|
692
|
+
const o = l.columns.findIndex((i) => i.key === t);
|
|
693
|
+
o !== -1 && (l.columns[o] = ce(w({}, l.columns[o]), { options: n, dictCode: "" }));
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
function jt(e, t, n) {
|
|
697
|
+
var l, o;
|
|
698
|
+
(o = (l = P[e]) == null ? void 0 : l.value) != null && o[0] && (!n && n.length <= 0 && (n = []), n.map((i) => {
|
|
699
|
+
i.hasOwnProperty("label") || (i.label = i.text);
|
|
700
|
+
}), P[e].value[0].updateSchema({
|
|
701
|
+
field: t,
|
|
702
|
+
componentProps: {
|
|
703
|
+
dictCode: "",
|
|
704
|
+
options: n
|
|
705
|
+
}
|
|
706
|
+
}));
|
|
707
|
+
}
|
|
708
|
+
function Nt(e, t) {
|
|
709
|
+
return f && f.beforeSubmit ? f.beforeSubmit(e, t) : Promise.resolve();
|
|
710
|
+
}
|
|
711
|
+
function Jt(e, t) {
|
|
712
|
+
let n = J(K);
|
|
713
|
+
Object.keys(n).map((l) => {
|
|
714
|
+
l.endsWith("_load") || l.endsWith("_disabled") || (K[l] = !0);
|
|
715
|
+
}), e && e.length > 0 ? Object.keys(n).map((l) => {
|
|
716
|
+
!l.endsWith("_load") && e.indexOf(l) < 0 && (K[l] = !1);
|
|
717
|
+
}) : t && t.length > 0 && Object.keys(n).map((l) => {
|
|
718
|
+
t.indexOf(l) >= 0 && (K[l] = !1);
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
function Lt(e, t) {
|
|
722
|
+
return _(this, null, function* () {
|
|
723
|
+
O.value = t, yield he(), M.value = "", S.value = !0, yield Fe(e), yield je(() => {
|
|
724
|
+
ie("js", "loaded");
|
|
725
|
+
});
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
function T(e) {
|
|
729
|
+
let t = P[e].value;
|
|
730
|
+
if (t instanceof Array && (t = t[0]), !t) {
|
|
731
|
+
s.warning("子表ref找不到:" + e);
|
|
732
|
+
return;
|
|
733
|
+
}
|
|
734
|
+
return t;
|
|
735
|
+
}
|
|
736
|
+
function Ut() {
|
|
737
|
+
let e = y.reportPrintUrl, t = M.value.id, n = An();
|
|
738
|
+
On(e, t, n);
|
|
739
|
+
}
|
|
740
|
+
const [Kt, { openModal: Ee }] = En(), re = v(""), se = v(""), ue = v(!0);
|
|
741
|
+
function Yt(e) {
|
|
742
|
+
re.value = e.id, se.value = e.key, ue.value = !1, Ee(!0, { isUpdate: !1, tableType: "3" });
|
|
743
|
+
}
|
|
744
|
+
function Wt(e) {
|
|
745
|
+
let n = T(e.key).getSelectedData();
|
|
746
|
+
if (n.length != 1) {
|
|
747
|
+
s.warning("请选择一条数据");
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
750
|
+
re.value = e.id, se.value = e.key, ue.value = !1, Ee(!0, { isUpdate: !0, record: n[0] });
|
|
751
|
+
}
|
|
752
|
+
function qt(e) {
|
|
753
|
+
const t = e[Ne];
|
|
754
|
+
let n = Je(e, [Ne]);
|
|
755
|
+
if (n.id) {
|
|
756
|
+
let l = Je(w({}, n), "id"), o = [{ rowKey: n.id, values: l }];
|
|
757
|
+
T(t).setValues(o);
|
|
758
|
+
} else
|
|
759
|
+
T(t).addRows(n, { isOnlineJS: !1, setActive: !1, emitChange: !0, isModalData: !0 });
|
|
760
|
+
}
|
|
761
|
+
function Ht() {
|
|
762
|
+
if (u.themeTemplate === oe)
|
|
763
|
+
return;
|
|
764
|
+
let e = k.value;
|
|
765
|
+
if (e && e.length > 0) {
|
|
766
|
+
for (let t of e)
|
|
767
|
+
if (t.relationType != 1) {
|
|
768
|
+
let n = T(t.key);
|
|
769
|
+
n && n.clearSelection();
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
function Gt() {
|
|
774
|
+
let e = $(), t = J(W[x.value]);
|
|
775
|
+
Y(t, (n) => {
|
|
776
|
+
A(n);
|
|
777
|
+
}, e);
|
|
778
|
+
}
|
|
779
|
+
function zt(e, t) {
|
|
780
|
+
let n = k.value;
|
|
781
|
+
if (n && n.length > 0) {
|
|
782
|
+
let l = n.filter((o) => o.key === e);
|
|
783
|
+
if (l.length == 0)
|
|
784
|
+
return;
|
|
785
|
+
if (l[0].relationType == 1)
|
|
786
|
+
T(e).executeFillRule();
|
|
787
|
+
else {
|
|
788
|
+
let o = J(W[e]), i = J(t.row);
|
|
789
|
+
Y(o, (d) => {
|
|
790
|
+
const { row: m, target: r } = t;
|
|
791
|
+
let h = [{ rowKey: m.id, values: w({}, d) }];
|
|
792
|
+
r.setValues(h);
|
|
793
|
+
}, i);
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
let xe = {
|
|
798
|
+
tableName: x,
|
|
799
|
+
loading: E,
|
|
800
|
+
subActiveKey: ee,
|
|
801
|
+
onlineFormRef: a,
|
|
802
|
+
getFieldsValue: $,
|
|
803
|
+
setFieldsValue: A,
|
|
804
|
+
submitFlowFlag: F,
|
|
805
|
+
subFormHeight: Ce,
|
|
806
|
+
subTableHeight: _e,
|
|
807
|
+
refMap: P,
|
|
808
|
+
triggleChangeValues: Ct,
|
|
809
|
+
triggleChangeValue: _t,
|
|
810
|
+
sh: K,
|
|
811
|
+
clearSubRows: Ae,
|
|
812
|
+
addSubRows: Re,
|
|
813
|
+
clearThenAddRows: Dt,
|
|
814
|
+
changeOptions: Vt,
|
|
815
|
+
isUpdate: S,
|
|
816
|
+
getSubTableInstance: T,
|
|
817
|
+
updateSchema: q,
|
|
818
|
+
executeMainFillRule: Gt,
|
|
819
|
+
executeSubFillRule: zt,
|
|
820
|
+
// update-begin--author:liaozhiyang---date:20240313---for:【QQYUN-8350】js增强根据主表限制子表options
|
|
821
|
+
changeSubTableOptions: It,
|
|
822
|
+
changeSubFormbleOptions: jt,
|
|
823
|
+
// update-end--author:liaozhiyang---date:20240313---for:【QQYUN-8350】js增强根据主表限制子表options
|
|
824
|
+
changeRemoteOptions: Bt,
|
|
825
|
+
changEvent: () => {
|
|
826
|
+
},
|
|
827
|
+
onlineFormValueChange: gt,
|
|
828
|
+
// update-begin--author:liaozhiyang---date:20240705---for:【TV360X-1754】js增强-提交表单并且发起流程
|
|
829
|
+
submitFormAndFlow: bt
|
|
830
|
+
// update-end--author:liaozhiyang---date:20240705---for:【TV360X-1754】js增强-提交表单并且发起流程
|
|
831
|
+
};
|
|
832
|
+
return Le(xe), {
|
|
833
|
+
//主表
|
|
834
|
+
tableName: x,
|
|
835
|
+
onlineFormRef: a,
|
|
836
|
+
registerForm: tt,
|
|
837
|
+
loading: E,
|
|
838
|
+
//子表
|
|
839
|
+
subActiveKey: ee,
|
|
840
|
+
hasSubTable: He,
|
|
841
|
+
subTabInfo: k,
|
|
842
|
+
refMap: P,
|
|
843
|
+
//一对一子表
|
|
844
|
+
subFormHeight: Ce,
|
|
845
|
+
getSubTableForeignKeyValue: Ot,
|
|
846
|
+
isUpdate: S,
|
|
847
|
+
handleSubFormChange: At,
|
|
848
|
+
//一对多子表
|
|
849
|
+
subTableHeight: _e,
|
|
850
|
+
onlineFormDisabled: ye,
|
|
851
|
+
subDataSource: Z,
|
|
852
|
+
getSubTableAuthPre: Oe,
|
|
853
|
+
handleAdded: xt,
|
|
854
|
+
handleSubTableDefaultValue: ve,
|
|
855
|
+
handleValueChange: Rt,
|
|
856
|
+
openSubFormModalForAdd: Yt,
|
|
857
|
+
openSubFormModalForEdit: Wt,
|
|
858
|
+
getBtnAuth: (e, t) => {
|
|
859
|
+
const n = Oe(t);
|
|
860
|
+
let o = Bn().getOnlineSubTableAuth(n);
|
|
861
|
+
return o != null && o.length ? !o.find((d) => d === e) : !0;
|
|
862
|
+
},
|
|
863
|
+
handleRemoved: Et,
|
|
864
|
+
//父组件调用
|
|
865
|
+
show: at,
|
|
866
|
+
createRootProperties: mt,
|
|
867
|
+
handleSubmit: we,
|
|
868
|
+
sh: K,
|
|
869
|
+
handleCgButtonClick: ie,
|
|
870
|
+
handleCustomFormSh: Jt,
|
|
871
|
+
handleCustomFormEdit: Lt,
|
|
872
|
+
//跳转
|
|
873
|
+
dbData: M,
|
|
874
|
+
onOpenReportPrint: Ut,
|
|
875
|
+
onlineExtConfigJson: y,
|
|
876
|
+
//一对多子表弹窗操作数据
|
|
877
|
+
registerPopModal: Kt,
|
|
878
|
+
popTableId: re,
|
|
879
|
+
popTableName: se,
|
|
880
|
+
getPopFormData: qt,
|
|
881
|
+
popModalRequest: ue,
|
|
882
|
+
onCloseModal: Ht,
|
|
883
|
+
ERP: oe,
|
|
884
|
+
rowNumber: ae,
|
|
885
|
+
isSetFormLabelLength: Q,
|
|
886
|
+
subFormWrapRef: c,
|
|
887
|
+
getSubAddBtnCfg: Ue,
|
|
888
|
+
getSubRemoveBtnCfg: Ke,
|
|
889
|
+
getSubOpenAddBtnCfg: Ye,
|
|
890
|
+
getSubOpenEditBtnCfg: We
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
}, Nn = ["id"], Jn = { key: 1 };
|
|
894
|
+
function Ln(u, p, s, a, R, E) {
|
|
895
|
+
const B = D("BasicForm"), O = D("online-sub-form"), F = D("a-button"), S = D("JVxeTable"), I = D("a-tab-pane"), Q = D("a-tabs"), L = D("Loading"), ae = D("online-pop-modal");
|
|
896
|
+
return V(), te("div", {
|
|
897
|
+
id: a.tableName + "_form",
|
|
898
|
+
class: rn(["onlineFormWrap", [`formTemplate_${s.formTemplate}`]])
|
|
899
|
+
}, [
|
|
900
|
+
H(B, {
|
|
901
|
+
ref: "onlineFormRef",
|
|
902
|
+
onRegister: a.registerForm,
|
|
903
|
+
name: "online-form_" + a.tableName
|
|
904
|
+
}, null, 8, ["onRegister", "name"]),
|
|
905
|
+
s.themeTemplate !== a.ERP && a.hasSubTable ? (V(), ne(Q, {
|
|
906
|
+
key: 0,
|
|
907
|
+
activeKey: a.subActiveKey,
|
|
908
|
+
"onUpdate:activeKey": p[0] || (p[0] = (c) => a.subActiveKey = c)
|
|
909
|
+
}, {
|
|
910
|
+
default: G(() => [
|
|
911
|
+
(V(!0), te(sn, null, un(a.subTabInfo, (c, U) => (V(), ne(I, {
|
|
912
|
+
tab: c.describe,
|
|
913
|
+
key: U + "",
|
|
914
|
+
forceRender: !0
|
|
915
|
+
}, {
|
|
916
|
+
default: G(() => [
|
|
917
|
+
c.relationType == 1 ? (V(), te("div", {
|
|
918
|
+
key: 0,
|
|
919
|
+
ref_for: !0,
|
|
920
|
+
ref: "subFormWrapRef",
|
|
921
|
+
style: cn({ "overflow-y": "auto", "overflow-x": "hidden", "max-height": a.subFormHeight + "px" })
|
|
922
|
+
}, [
|
|
923
|
+
H(O, {
|
|
924
|
+
ref_for: !0,
|
|
925
|
+
ref: a.refMap[c.key],
|
|
926
|
+
table: c.key,
|
|
927
|
+
disabled: a.onlineFormDisabled,
|
|
928
|
+
"form-template": s.formTemplate,
|
|
929
|
+
"main-id": a.getSubTableForeignKeyValue(c.foreignKey),
|
|
930
|
+
properties: c.properties,
|
|
931
|
+
"required-fields": c.requiredFields,
|
|
932
|
+
"is-update": a.isUpdate,
|
|
933
|
+
onFormChange: (y) => a.handleSubFormChange(y, c.key)
|
|
934
|
+
}, null, 8, ["table", "disabled", "form-template", "main-id", "properties", "required-fields", "is-update", "onFormChange"])
|
|
935
|
+
], 4)) : (V(), te("div", Jn, [
|
|
936
|
+
H(S, {
|
|
937
|
+
ref_for: !0,
|
|
938
|
+
ref: a.refMap[c.key],
|
|
939
|
+
toolbar: "",
|
|
940
|
+
"keep-source": "",
|
|
941
|
+
"row-number": a.rowNumber,
|
|
942
|
+
"row-selection": "",
|
|
943
|
+
height: (
|
|
944
|
+
// 【VUEN-803】一对多子表固定340高度,修复自定义列组件被遮挡的问题
|
|
945
|
+
a.subTableHeight
|
|
946
|
+
),
|
|
947
|
+
disabled: a.onlineFormDisabled,
|
|
948
|
+
columns: c.columns,
|
|
949
|
+
dataSource: a.subDataSource[c.key],
|
|
950
|
+
addBtnCfg: a.getSubAddBtnCfg,
|
|
951
|
+
removeBtnCfg: a.getSubRemoveBtnCfg,
|
|
952
|
+
onValueChange: (y) => a.handleValueChange(y, c.key),
|
|
953
|
+
onRemoved: (y) => a.handleRemoved(y, c.key),
|
|
954
|
+
authPre: a.getSubTableAuthPre(c.key),
|
|
955
|
+
onAdded: (y) => a.handleAdded(c, y),
|
|
956
|
+
onExecuteFillRule: (y) => a.handleSubTableDefaultValue(c, y)
|
|
957
|
+
}, {
|
|
958
|
+
toolbarSuffix: G(() => [
|
|
959
|
+
!a.onlineFormDisabled && a.getSubOpenAddBtnCfg.enabled && a.getBtnAuth("add", c.key) ? (V(), ne(F, {
|
|
960
|
+
key: 0,
|
|
961
|
+
type: "primary",
|
|
962
|
+
preIcon: a.getSubOpenAddBtnCfg.buttonIcon,
|
|
963
|
+
onClick: (y) => a.openSubFormModalForAdd(c)
|
|
964
|
+
}, {
|
|
965
|
+
default: G(() => [
|
|
966
|
+
Ve("span", null, Be(a.getSubOpenAddBtnCfg.buttonName), 1)
|
|
967
|
+
]),
|
|
968
|
+
_: 2
|
|
969
|
+
}, 1032, ["preIcon", "onClick"])) : fe("", !0),
|
|
970
|
+
!a.onlineFormDisabled && a.getSubOpenEditBtnCfg.enabled && a.getBtnAuth("update", c.key) ? (V(), ne(F, {
|
|
971
|
+
key: 1,
|
|
972
|
+
type: "primary",
|
|
973
|
+
preIcon: a.getSubOpenEditBtnCfg.buttonIcon,
|
|
974
|
+
onClick: (y) => a.openSubFormModalForEdit(c)
|
|
975
|
+
}, {
|
|
976
|
+
default: G(() => [
|
|
977
|
+
Ve("span", null, Be(a.getSubOpenEditBtnCfg.buttonName), 1)
|
|
978
|
+
]),
|
|
979
|
+
_: 2
|
|
980
|
+
}, 1032, ["preIcon", "onClick"])) : fe("", !0)
|
|
981
|
+
]),
|
|
982
|
+
_: 2
|
|
983
|
+
}, 1032, ["row-number", "height", "disabled", "columns", "dataSource", "addBtnCfg", "removeBtnCfg", "onValueChange", "onRemoved", "authPre", "onAdded", "onExecuteFillRule"])
|
|
984
|
+
]))
|
|
985
|
+
]),
|
|
986
|
+
_: 2
|
|
987
|
+
}, 1032, ["tab"]))), 128))
|
|
988
|
+
]),
|
|
989
|
+
_: 1
|
|
990
|
+
}, 8, ["activeKey"])) : fe("", !0),
|
|
991
|
+
H(L, {
|
|
992
|
+
loading: a.loading,
|
|
993
|
+
absolute: !1
|
|
994
|
+
}, null, 8, ["loading"]),
|
|
995
|
+
fn(u.$slots, "bottom", {}, void 0, !0),
|
|
996
|
+
H(ae, {
|
|
997
|
+
formTableType: "3",
|
|
998
|
+
request: a.popModalRequest,
|
|
999
|
+
id: a.popTableId,
|
|
1000
|
+
onRegister: a.registerPopModal,
|
|
1001
|
+
onSuccess: a.getPopFormData,
|
|
1002
|
+
taskId: s.taskId,
|
|
1003
|
+
tableName: a.popTableName,
|
|
1004
|
+
topTip: "",
|
|
1005
|
+
isVxeTableData: ""
|
|
1006
|
+
}, null, 8, ["request", "id", "onRegister", "onSuccess", "taskId", "tableName"])
|
|
1007
|
+
], 10, Nn);
|
|
1008
|
+
}
|
|
1009
|
+
const Dl = /* @__PURE__ */ In(jn, [["render", Ln], ["__scopeId", "data-v-3f26e7bd"]]);
|
|
1010
|
+
export {
|
|
1011
|
+
Dl as default
|
|
1012
|
+
};
|