@jeecg/online 3.9.0-beta → 3.9.1-RC
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-cbc75a49.mjs → AccountLoginForm-BXyvcSds.mjs} +50 -53
- package/{AiModal-5bec5218.mjs → AiModal-BgVzn074.mjs} +18 -20
- package/{AppForgetPassword-dbc8377e.mjs → AppForgetPassword-B-2CvL62.mjs} +59 -63
- package/AppLogin-BMBmx2oq.mjs +272 -0
- package/AppLoginHeader-BtKXOMRR.mjs +23 -0
- package/{AppNameEmail-7c6a1406.mjs → AppNameEmail-DCqMNjaK.mjs} +20 -24
- package/{AppRegister-29a00a9d.mjs → AppRegister-C5iH-245.mjs} +33 -37
- package/{AppTenant-92890383.mjs → AppTenant-etPXeUcW.mjs} +49 -55
- package/AppThirdForm-NMob-JaS.mjs +185 -0
- package/AuthButtonConfig-zUioaGwn.mjs +155 -0
- package/AuthButtonTree-DYZwphe6.mjs +159 -0
- package/{AuthDataConfig-c978c469.mjs → AuthDataConfig-uQ5WT7rx.mjs} +57 -62
- package/AuthDataTree-Cr28_YKx.mjs +134 -0
- package/{AuthFieldConfig-558283bc.mjs → AuthFieldConfig-DjdaPIXF.mjs} +95 -101
- package/{AuthFieldTree-106db4e2.mjs → AuthFieldTree-DHmnDQ0I.mjs} +94 -99
- package/AuthManagerDrawer-DUb6QylS.mjs +108 -0
- package/{AuthSetterModal-90a76886.mjs → AuthSetterModal-BBFdNv1M.mjs} +89 -100
- package/BuiltInButtonList-Cgg5maxI.mjs +4 -0
- package/{BuiltInButtonList.vue_vue_type_script_setup_true_lang-07d0b7d0.mjs → BuiltInButtonList.vue_vue_type_script_setup_true_lang-5-4hU0bi.mjs} +8 -8
- package/{CgformAddressModal-690b8940.mjs → CgformAddressModal-BVoww1fk.mjs} +57 -63
- package/CgformCopyList-7e96RMbJ.mjs +176 -0
- package/{CgformModal-b04a492a.mjs → CgformModal-RH-Tr08S.mjs} +240 -241
- package/{CgreportAigcModal-8fdcbd31.mjs → CgreportAigcModal-rEfIpPF9.mjs} +35 -38
- package/{CgreportModal-da62724c.mjs → CgreportModal-Bajb_3ku.mjs} +49 -50
- package/{CheckDictTable-7320189b.mjs → CheckDictTable-BxJFrctQ.mjs} +44 -52
- package/{CodeFileListModal-e5ec210d.mjs → CodeFileListModal-C3uqsFvi.mjs} +32 -36
- package/{CodeFileViewModal-09053f3a.mjs → CodeFileViewModal-bEtZDbAY.mjs} +78 -81
- package/CodeGeneratorModal-ZWEIXRbY.mjs +291 -0
- package/{CustomButtonList-704e6d1c.mjs → CustomButtonList-7wjonhtu.mjs} +82 -85
- package/{DBAttributeTable-4a65c897.mjs → DBAttributeTable-DA2XttIQ.mjs} +50 -60
- package/{DbToOnlineModal-cc398c70.mjs → DbToOnlineModal-CDVqmEJH.mjs} +43 -45
- package/DetailForm-CnfJBMys.mjs +472 -0
- package/{DropMenuItem-884f9464.mjs → DropMenuItem-D8YWMle-.mjs} +8 -11
- package/EnhanceJavaModal-W8_oGY-U.mjs +255 -0
- package/{EnhanceJsHistory-95ca545c.mjs → EnhanceJsHistory-ZzXedCNI.mjs} +48 -49
- package/{EnhanceJsModal-742b0ee2.mjs → EnhanceJsModal-Djb5ItH4.mjs} +95 -104
- package/EnhanceSqlModal-DxPdRcQc.mjs +258 -0
- package/ErrorTip-BDS1uxkW.mjs +4 -0
- package/{ErrorTip.vue_vue_type_script_setup_true_lang-49d35987.mjs → ErrorTip.vue_vue_type_script_setup_true_lang-Bl9zMjvW.mjs} +11 -11
- package/ExtendConfigModal-CxJIWvV4.mjs +102 -0
- package/{FieldExtendJsonModal-fe7f7902.mjs → FieldExtendJsonModal-Bvmbb6yd.mjs} +27 -30
- package/{FileSelectModal-cf41604b.mjs → FileSelectModal-DXqL5msQ.mjs} +27 -31
- package/{ForeignKeyTable-4a59ded1.mjs → ForeignKeyTable-D6AlLbfd.mjs} +17 -25
- package/{IndexTable-87d67830.mjs → IndexTable-B7ef6Aox.mjs} +9 -17
- package/JModalTip-DHrn6ksJ.mjs +46 -0
- package/{JOnlineSearchSelect-d8c57973.mjs → JOnlineSearchSelect-CAv2Dm9V.mjs} +21 -23
- package/{LeftDepart-463bf432.mjs → LeftDepart-BC1jpYJP.mjs} +8 -11
- package/{LeftRole-1631d3d4.mjs → LeftRole-sq_2p6Qk.mjs} +16 -19
- package/{LeftUser-5774a5db.mjs → LeftUser-CYh4PBgd.mjs} +7 -10
- package/{LinkTableConfigModal-1bab1423.mjs → LinkTableConfigModal-BOWs0A5-.mjs} +38 -40
- package/{LinkTableFieldConfigModal-49470140.mjs → LinkTableFieldConfigModal-D7FTBP3E.mjs} +50 -52
- package/LinkTableListPiece-Bfu6vfo0.mjs +31 -0
- package/{ModalFormDemo-dbd0aa28.mjs → ModalFormDemo-C1qQT6lj.mjs} +13 -16
- package/{OnlCgformErpList-35ad1d6e.mjs → OnlCgformErpList-CavWG8GK.mjs} +139 -200
- package/OnlCgformErpSubTable-D3QM8oWi.mjs +382 -0
- package/OnlCgformInnerSubTable-BqmooFqy.mjs +213 -0
- package/OnlCgformInnerTableList-Dr1KdoSC.mjs +421 -0
- package/OnlCgformTabList-DCy3oudh.mjs +371 -0
- package/OnlineAutoList-C4pkORGb.mjs +500 -0
- package/OnlineAutoModal-Cuf_wcbU.mjs +222 -0
- package/{OnlineAutoTreeList-5153f09d.mjs → OnlineAutoTreeList-LDE9Sm7X.mjs} +124 -182
- package/OnlineCustomModal-Jz4MxkH0.mjs +209 -0
- package/OnlineDetailModal-So0YEah1.mjs +160 -0
- package/{OnlineForm-20604e4f.mjs → OnlineForm-CvcbzRIZ.mjs} +47 -74
- package/OnlineFormDetail-KaD6cV31.mjs +321 -0
- package/OnlineFormUrlAdd-CktstdFD.mjs +86 -0
- package/OnlineFormUrlDetail-C4qptuTQ.mjs +85 -0
- package/OnlineFormUrlEdit-C06vTiM_.mjs +84 -0
- package/{OnlineFormUrlSuccess-302ecb21.mjs → OnlineFormUrlSuccess-Cvbte2lW.mjs} +27 -30
- package/{OnlineQueryForm-5eeceb51.mjs → OnlineQueryForm-6E1IRi95.mjs} +139 -168
- package/{OnlineSearchFormItem-5536a1a6.mjs → OnlineSearchFormItem-CdRuXQPu.mjs} +112 -118
- package/{OnlineSelectCascade-180e8c9a.mjs → OnlineSelectCascade-O7iXAgdH.mjs} +31 -33
- package/OnlineSubFormDetail-DcMpAk8Z.mjs +109 -0
- package/OnlineTabAutoModal-DSOVDlOz.mjs +285 -0
- package/OnlineTabDetailModal-OXQ_2VLI.mjs +187 -0
- package/{OnlineTabForm-827e7089.mjs → OnlineTabForm-Cg3_IX2H.mjs} +228 -254
- package/OnlineTabFormDetail-BgFkUkva.mjs +299 -0
- package/{PageAttributeTable-5703e2f1.mjs → PageAttributeTable-C803SekP.mjs} +46 -59
- package/{PhoneLoginForm-15dc68ed.mjs → PhoneLoginForm-8a0Uehov.mjs} +40 -43
- package/ProcessOnlineForm-COeEaGc8.mjs +182 -0
- package/{QueryTable-26c9ee22.mjs → QueryTable-DHYaYbKC.mjs} +23 -31
- package/SetSwitchOptions-B4Q6l-54.mjs +58 -0
- package/ShareAddView-CxZuNTQB.mjs +11 -0
- package/ShareEditView-Dqdzjmpc.mjs +17 -0
- package/ShareView-B9TiMmkR.mjs +4 -0
- package/{ShareView.vue_vue_type_script_setup_true_lang-d1597c0d.mjs → ShareView.vue_vue_type_script_setup_true_lang-BCdP9KMD.mjs} +21 -21
- package/SingleView-BDXeMLV-.mjs +4 -0
- package/{SingleView.vue_vue_type_style_index_0_lang-914483d0.mjs → SingleView.vue_vue_type_style_index_0_lang-D3QcMcYT.mjs} +27 -27
- package/{SuperQuery-c95f86ee.mjs → SuperQuery-CgkajEWI.mjs} +342 -371
- package/SuperQueryValComponent-UO10kRg5.mjs +4 -0
- package/TaskOpinionList-C8rcU6ee.mjs +10 -0
- package/{aiModal-b44fa135.mjs → aiModal-DTU-w5Xx.mjs} +33 -36
- package/{enhance.data-6601ff44.mjs → enhance.data-DRCzy5Bx.mjs} +5 -5
- package/index-0kQBIHx0.mjs +58 -0
- package/{index-02f6dc7d.mjs → index-B1H394jP.mjs} +35 -38
- package/index-CXD6__bJ.mjs +195 -0
- package/{index-abbfd327.mjs → index-DIjQbz6A.mjs} +37 -41
- package/{index-30da2fc0.mjs → index-Dbr1qL3H.mjs} +474 -609
- package/{index-19eaef11.mjs → index-dmWvLQET.mjs} +2 -2
- package/{index-391aec04.mjs → index-pGbTziKP.mjs} +32 -44
- package/{index-22a99f2e.mjs → index-siZ6JDIW.mjs} +17 -20
- package/main.index.js +8 -9
- package/online.css +1 -0
- package/package.json +1 -1
- package/{useCgformList-aaa30c8c.mjs → useCgformList-_o9GP7ca.mjs} +3 -3
- package/useExtendComponent-P9wrWQwT.mjs +4479 -0
- package/{useListButton-308458cd.mjs → useListButton-DyOAscwT.mjs} +7 -9
- package/{useSchemas-b074f3a1.mjs → useSchemas-svH7q1tm.mjs} +69 -42
- package/{useTableSync-dbfba20e.mjs → useTableSync-BAWujyoc.mjs} +1 -1
- package/{utils-9fce7606.mjs → utils-DcQ65Qmw.mjs} +1 -1
- package/AppLogin-786949d3.mjs +0 -287
- package/AppLoginHeader-37034b2f.mjs +0 -27
- package/AppThirdForm-760064e5.mjs +0 -189
- package/AuthButtonConfig-78180aec.mjs +0 -160
- package/AuthButtonTree-62c8e70c.mjs +0 -165
- package/AuthDataTree-0647a06c.mjs +0 -139
- package/AuthManagerDrawer-ec5190d2.mjs +0 -119
- package/BuiltInButtonList-bb6cf95c.mjs +0 -10
- package/CgformCopyList-af9c99a4.mjs +0 -260
- package/CodeGeneratorModal-aba790e3.mjs +0 -298
- package/DetailForm-a2bf8c33.mjs +0 -498
- package/EnhanceJavaModal-fe8d475d.mjs +0 -264
- package/EnhanceSqlModal-6e36bc4f.mjs +0 -268
- package/ErrorTip-bb616e32.mjs +0 -7
- package/ExtendConfigModal-74d657c7.mjs +0 -117
- package/JModalTip-5401f43d.mjs +0 -49
- package/LinkTableListPiece-47f4286c.mjs +0 -34
- package/OnlCgformErpSubTable-5093d438.mjs +0 -444
- package/OnlCgformInnerSubTable-f1dc90db.mjs +0 -270
- package/OnlCgformInnerTableList-1b82a7da.mjs +0 -482
- package/OnlCgformTabList-d66d1261.mjs +0 -432
- package/OnlineAutoList-fbba2a52.mjs +0 -559
- package/OnlineAutoModal-68909692.mjs +0 -261
- package/OnlineCustomModal-b5f8c799.mjs +0 -247
- package/OnlineDetailModal-ac078a9a.mjs +0 -199
- package/OnlineForm.vue_vue_type_style_index_0_scoped_60bd1850_lang-4ed993c7.mjs +0 -1
- package/OnlineFormDetail-719118b6.mjs +0 -350
- package/OnlineFormUrlAdd-5b675f48.mjs +0 -117
- package/OnlineFormUrlDetail-91156bf2.mjs +0 -122
- package/OnlineFormUrlEdit-fb810de6.mjs +0 -115
- package/OnlineSubFormDetail-4d64e7be.mjs +0 -148
- package/OnlineTabAutoModal-c127ed50.mjs +0 -320
- package/OnlineTabDetailModal-e4e9f7e3.mjs +0 -227
- package/OnlineTabFormDetail-0f96377e.mjs +0 -329
- package/ProcessOnlineForm-1fcbe0af.mjs +0 -219
- package/SetSwitchOptions-a3428177.mjs +0 -62
- package/ShareAddView-0512e884.mjs +0 -89
- package/ShareEditView-b89dfbd3.mjs +0 -95
- package/ShareView-faf1a0ab.mjs +0 -83
- package/SingleView-21d3a558.mjs +0 -71
- package/SuperQueryValComponent-5a9ccfd4.mjs +0 -8
- package/TaskOpinionList-73ecb3c8.mjs +0 -101
- package/dayjs.min-eea532a3.mjs +0 -301
- package/index-26940246.mjs +0 -219
- package/index-94b6319e.mjs +0 -57
- package/style.css +0 -1
- package/useExtendComponent-ad499dff.mjs +0 -4164
- /package/{SuperQueryValComponent.vue_vue_type_script_lang-8fe34917.mjs → SuperQueryValComponent.vue_vue_type_script_lang-BM-iwlLi.mjs} +0 -0
- /package/{auth.api-53df4c33.mjs → auth.api-2QmzY0ji.mjs} +0 -0
- /package/{auth.data-e44c7975.mjs → auth.data-Cp8D9uZ7.mjs} +0 -0
- /package/{button.data-fe45d43b.mjs → button.data-CyUX77GQ.mjs} +0 -0
- /package/{cgform.data-0ca62d09.mjs → cgform.data-CviSPXEg.mjs} +0 -0
- /package/{cgformState-d9f8ec42.mjs → cgformState-CUyRXfhW.mjs} +0 -0
- /package/{constant-fa63bd66.mjs → constant-DnbpmwZg.mjs} +0 -0
- /package/{enhance.api-138e6826.mjs → enhance.api-BqHb-YGL.mjs} +0 -0
- /package/{index-5e89258d.mjs → index-aVGkB_J9.mjs} +0 -0
- /package/{shareStore-7de6c7a6.mjs → shareStore-k-kzyga5.mjs} +0 -0
- /package/{useCustomHook-3a17a690.mjs → useCustomHook-B35kFqDB.mjs} +0 -0
- /package/{useFormUrl-2ee1a82d.mjs → useFormUrl-D8ASmaz6.mjs} +0 -0
- /package/{useOnlinePopEvent-687070b7.mjs → useOnlinePopEvent-FOvbs0Ta.mjs} +0 -0
- /package/{useOnlineTest-e4bd8be3.mjs → useOnlineTest-_onDRxjY.mjs} +0 -0
|
@@ -0,0 +1,4479 @@
|
|
|
1
|
+
var xn = Object.defineProperty, On = Object.defineProperties;
|
|
2
|
+
var Pn = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var yt = Object.getOwnPropertySymbols;
|
|
4
|
+
var Dn = Object.prototype.hasOwnProperty, In = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var wt = (n, e, t) => e in n ? xn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, ce = (n, e) => {
|
|
6
|
+
for (var t in e || (e = {}))
|
|
7
|
+
Dn.call(e, t) && wt(n, t, e[t]);
|
|
8
|
+
if (yt)
|
|
9
|
+
for (var t of yt(e))
|
|
10
|
+
In.call(e, t) && wt(n, t, e[t]);
|
|
11
|
+
return n;
|
|
12
|
+
}, ke = (n, e) => On(n, Pn(e));
|
|
13
|
+
var K = (n, e, t) => new Promise((i, a) => {
|
|
14
|
+
var r = (m) => {
|
|
15
|
+
try {
|
|
16
|
+
w(t.next(m));
|
|
17
|
+
} catch (C) {
|
|
18
|
+
a(C);
|
|
19
|
+
}
|
|
20
|
+
}, f = (m) => {
|
|
21
|
+
try {
|
|
22
|
+
w(t.throw(m));
|
|
23
|
+
} catch (C) {
|
|
24
|
+
a(C);
|
|
25
|
+
}
|
|
26
|
+
}, w = (m) => m.done ? i(m.value) : Promise.resolve(m.value).then(r, f);
|
|
27
|
+
w((t = t.apply(n, e)).next());
|
|
28
|
+
});
|
|
29
|
+
import { add as Mn } from "/@/components/Form/src/componentMap";
|
|
30
|
+
import { propTypes as re } from "/@/utils/propTypes";
|
|
31
|
+
import { computed as pe, watch as he, h as _e, unref as Ce, ref as D, reactive as Se, toRaw as be, nextTick as Ne, resolveComponent as se, createBlock as De, openBlock as ie, createElementBlock as de, normalizeClass as ze, createVNode as fe, defineComponent as Mt, mergeProps as Rt, withCtx as oe, createTextVNode as xe, createCommentVNode as Oe, toDisplayString as Pe, watchEffect as Rn, inject as kn, onMounted as kt, onBeforeUnmount as $n, createElementVNode as me, Fragment as Qe, renderList as rt, markRaw as En, defineAsyncComponent as jn } from "vue";
|
|
32
|
+
import { FormOutlined as Ln, DiffOutlined as An, PrinterOutlined as Nn, EditOutlined as Vn, PlusOutlined as ut, MinusCircleFilled as Bn } from "@ant-design/icons-vue";
|
|
33
|
+
import { useModal as Me, useModalInner as $t, BasicModal as Et } from "/@/components/Modal";
|
|
34
|
+
import { useMessage as $e } from "/@/hooks/web/useMessage";
|
|
35
|
+
import { BasicForm as jt, useForm as Lt } from "/@/components/Form/index";
|
|
36
|
+
import { defHttp as ge } from "/@/utils/http/axios";
|
|
37
|
+
import { pick as Ke } from "lodash-es";
|
|
38
|
+
import { L as ot } from "./constant-DnbpmwZg.mjs";
|
|
39
|
+
import { replaceUserInfoByExpression as Wn, getFileAccessHttpUrl as Ye } from "/@/utils/common/compUtils";
|
|
40
|
+
import { UploadTypeEnum as Jn } from "/@/components/Form/src/jeecg/components/JUpload";
|
|
41
|
+
import { isArray as Ct, isObject as At } from "/@/utils/is";
|
|
42
|
+
import { duplicateCheck as Yn } from "/@/views/system/user/user.api";
|
|
43
|
+
import { useUserStore as qn } from "/@/store/modules/user";
|
|
44
|
+
import { replaceAll as Un, _eval as ct, goJmReportViewPage as Hn, split as St, getWeekMonthQuarterYear as zn, importViewsFile as Qn } from "/@/utils";
|
|
45
|
+
import * as Nt from "/@/utils/desform/customExpression";
|
|
46
|
+
import { usePermissionStore as Kn } from "/@/store/modules/permission";
|
|
47
|
+
import { filterMultiDictText as Zn, filterMultiDictObjs as Gn } from "/@/utils/dict/JDictSelectUtil";
|
|
48
|
+
import { TableAction as Xn, BasicTable as ei } from "/@/components/Table";
|
|
49
|
+
import { useListPage as ti } from "/@/hooks/system/useListPage";
|
|
50
|
+
import { useRouter as ni } from "vue-router";
|
|
51
|
+
import { Button as tt, Tag as ii } from "ant-design-vue";
|
|
52
|
+
import { getAreaTextByCode as li } from "/@/components/Form/src/utils/Area";
|
|
53
|
+
import { createImgPreview as si } from "/@/components/Preview";
|
|
54
|
+
import ri from "./LinkTableListPiece-Bfu6vfo0.mjs";
|
|
55
|
+
import { getToken as Vt } from "/@/utils/auth";
|
|
56
|
+
import { downloadFile as oi } from "/@/api/common/api";
|
|
57
|
+
import { getItemColor as ai } from "/@/utils/dict/DictColors";
|
|
58
|
+
import { useAppInject as Bt } from "/@/hooks/web/useAppInject";
|
|
59
|
+
import { _ as je } from "./index-0kQBIHx0.mjs";
|
|
60
|
+
import Ze from "/@/assets/images/placeholderImage.png";
|
|
61
|
+
import ui from "./OnlineSelectCascade-O7iXAgdH.mjs";
|
|
62
|
+
import { Loading as Wt } from "/@/components/Loading";
|
|
63
|
+
import ci from "./JModalTip-DHrn6ksJ.mjs";
|
|
64
|
+
import { useDebounceFn as di } from "@vueuse/core";
|
|
65
|
+
const fi = "jeecg_submit_form_and_flow", Us = "flow_submit_id", pi = "online_form_table_name", Ae = "validate-failed", Hs = "setup", zs = "EnhanceJS", Qs = {
|
|
66
|
+
password: "text",
|
|
67
|
+
file: "text",
|
|
68
|
+
image: "text",
|
|
69
|
+
textarea: "text",
|
|
70
|
+
umeditor: "text",
|
|
71
|
+
markdown: "text",
|
|
72
|
+
checkbox: "list_multi",
|
|
73
|
+
radio: "list"
|
|
74
|
+
}, mi = ".jeecg-online-modal .ant-modal-content", hi = "online_";
|
|
75
|
+
class te {
|
|
76
|
+
constructor(e, t) {
|
|
77
|
+
this._data = t, this.field = e, this.label = t.title, this.hidden = !1, this.order = t.order || 999, this.required = !1, this.onlyValidator = "", this.setFieldsValue = "", this.hasChange = !0, e.indexOf("@") > 0 ? this.pre = e.substring(0, e.indexOf("@") + 1) : this.pre = "", this.schemaProp = {}, this.searchForm = !1, this.disabled = !1, this.popContainer = "", this.handleWidgetAttr(t), this.inPopover = !1, this.labelLength = ot, this.initLabelLength();
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* 获取最终的表单配置项,外面获取调用此方法
|
|
81
|
+
*/
|
|
82
|
+
getFormItemSchema() {
|
|
83
|
+
let e = this.getItem();
|
|
84
|
+
return this.addDefaultChangeEvent(e), e;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* 获取表单配置,子类重写此方法
|
|
88
|
+
*/
|
|
89
|
+
getItem() {
|
|
90
|
+
let e = {
|
|
91
|
+
field: this.field,
|
|
92
|
+
label: this.label,
|
|
93
|
+
labelLength: this.labelLength,
|
|
94
|
+
component: "Input",
|
|
95
|
+
itemProps: {
|
|
96
|
+
labelCol: {
|
|
97
|
+
class: "online-form-label"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}, t = this.getRule();
|
|
101
|
+
return t.length > 0 && this.onlyValidator && (e.rules = t), this.hidden === !0 && (e.show = !1), e;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* 设置表单ref
|
|
105
|
+
* popup、分类树需要关联设置其他表单值的时候用到
|
|
106
|
+
* @param ref
|
|
107
|
+
*/
|
|
108
|
+
setFormRef(e) {
|
|
109
|
+
this.formRef = e;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* 设置表单元素隐藏
|
|
113
|
+
*/
|
|
114
|
+
isHidden() {
|
|
115
|
+
return this.hidden = !0, this;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* 设置是否必填项
|
|
119
|
+
* @param array
|
|
120
|
+
*/
|
|
121
|
+
isRequired(e) {
|
|
122
|
+
return e && e.length > 0 && e.indexOf(this.field) >= 0 && (this.required = !0), this;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* 初始化 label长度
|
|
126
|
+
*/
|
|
127
|
+
initLabelLength() {
|
|
128
|
+
let e = this.getExtendData();
|
|
129
|
+
e && e.labelLength && (this.labelLength = e.labelLength);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* 获取扩展参数
|
|
133
|
+
*/
|
|
134
|
+
getExtendData() {
|
|
135
|
+
let e = {}, { fieldExtendJson: t } = this._data;
|
|
136
|
+
if (t && typeof t == "string")
|
|
137
|
+
try {
|
|
138
|
+
let i = JSON.parse(t);
|
|
139
|
+
e = ce({}, i);
|
|
140
|
+
} catch (i) {
|
|
141
|
+
}
|
|
142
|
+
return e;
|
|
143
|
+
}
|
|
144
|
+
/***
|
|
145
|
+
* 获取和此字段相关的其他字段 需要设置其为隐藏
|
|
146
|
+
*/
|
|
147
|
+
getRelatedHideFields() {
|
|
148
|
+
return [];
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* placeholder
|
|
152
|
+
*/
|
|
153
|
+
getPlaceholder(e) {
|
|
154
|
+
let t = "请输入";
|
|
155
|
+
return [
|
|
156
|
+
"list",
|
|
157
|
+
"radio",
|
|
158
|
+
"checkbox",
|
|
159
|
+
"date",
|
|
160
|
+
"datetime",
|
|
161
|
+
"time",
|
|
162
|
+
"list_multi",
|
|
163
|
+
"sel_search",
|
|
164
|
+
"popup",
|
|
165
|
+
"cat_tree",
|
|
166
|
+
"sel_depart",
|
|
167
|
+
"sel_user",
|
|
168
|
+
"pca",
|
|
169
|
+
"link_down",
|
|
170
|
+
"sel_tree",
|
|
171
|
+
"switch",
|
|
172
|
+
"link_table",
|
|
173
|
+
"link_table_field",
|
|
174
|
+
"popup_dict",
|
|
175
|
+
"LinkTableForQuery",
|
|
176
|
+
"CascaderPcaForQuery",
|
|
177
|
+
"select_user2",
|
|
178
|
+
"rangeDate",
|
|
179
|
+
"rangeTime",
|
|
180
|
+
"rangeNumber"
|
|
181
|
+
].includes(e) ? t = "请选择" : ["file", "image"].includes(e) && (t = "请上传"), t + this.label;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* 唯一校验
|
|
185
|
+
*/
|
|
186
|
+
setOnlyValidateFun(e) {
|
|
187
|
+
e && (this.onlyValidator = (t, i) => K(this, null, function* () {
|
|
188
|
+
let a = yield e(t, i);
|
|
189
|
+
return a ? Promise.reject(a) : Promise.resolve();
|
|
190
|
+
}));
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* 获取校验规则
|
|
194
|
+
*/
|
|
195
|
+
getRule() {
|
|
196
|
+
let e = [];
|
|
197
|
+
const { view: t, errorInfo: i, pattern: a, type: r, fieldExtendJson: f } = this._data;
|
|
198
|
+
if (this.required === !0) {
|
|
199
|
+
let w = this.getPlaceholder(t);
|
|
200
|
+
if (f) {
|
|
201
|
+
const m = JSON.parse(f);
|
|
202
|
+
m.validateError && (w = m.validateError);
|
|
203
|
+
}
|
|
204
|
+
i && (w = i), t == "sel_depart" || t == "sel_user" ? (this.schemaProp.required = !0, e.push({ required: !0, message: w })) : e.push({ required: !0, message: w });
|
|
205
|
+
}
|
|
206
|
+
if (t == "sel_user" && a === "only" && this.onlyValidator && e.push({ validator: this.onlyValidator }), t === "list" || t === "radio" || t === "markdown" || t === "pca" || t.indexOf("sel") >= 0 || t === "time" || t.indexOf("upload") >= 0 || t.indexOf("file") >= 0 || t.indexOf("image") >= 0)
|
|
207
|
+
return e;
|
|
208
|
+
if (a)
|
|
209
|
+
if (a === "only")
|
|
210
|
+
this.onlyValidator && e.push({ validator: this.onlyValidator });
|
|
211
|
+
else if (a === "z")
|
|
212
|
+
r == "number" || r == "integer" || e.push({ pattern: /^-?\d+$/, message: "请输入整数" });
|
|
213
|
+
else {
|
|
214
|
+
let w = i || "正则校验失败", m;
|
|
215
|
+
try {
|
|
216
|
+
m = new RegExp(a), m || (m = a);
|
|
217
|
+
} catch (C) {
|
|
218
|
+
m = a;
|
|
219
|
+
}
|
|
220
|
+
e.push({ pattern: m, message: w });
|
|
221
|
+
}
|
|
222
|
+
return e;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* 添加默认的change事件
|
|
226
|
+
* @param schema
|
|
227
|
+
*/
|
|
228
|
+
addDefaultChangeEvent(e) {
|
|
229
|
+
this.hasChange && (e.componentProps || (e.componentProps = {}), this.disabled == !0 && (e.componentProps.disabled = !0), e.componentProps.hasOwnProperty("onChange") || (e.componentProps.onChange = (t, i) => {
|
|
230
|
+
t instanceof Event && (t = t.target.value), t instanceof Array && (t = t.join(",")), !this.formRef || !this.formRef.value || !this.formRef.value.$formValueChange || this.formRef.value.$formValueChange(this.field, t, i);
|
|
231
|
+
}, e.component === "JPopup" && (e.componentProps.onPopUpChange = e.componentProps.onChange))), Object.keys(this.schemaProp).map((t) => {
|
|
232
|
+
e[t] = this.schemaProp[t];
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
noChange() {
|
|
236
|
+
this.hasChange = !1;
|
|
237
|
+
}
|
|
238
|
+
updateField(e) {
|
|
239
|
+
this.field = e;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* 高级查询 没有表单ref对象 手动设置setFieldValue方法用于 popup设置表单值
|
|
243
|
+
*/
|
|
244
|
+
setFunctionForFieldValue(e) {
|
|
245
|
+
e && (this.setFieldsValue = e);
|
|
246
|
+
}
|
|
247
|
+
asSearchForm() {
|
|
248
|
+
this.searchForm = !0;
|
|
249
|
+
}
|
|
250
|
+
/**获取modal作为类下拉组件pop的父容器*/
|
|
251
|
+
getModalAsContainer() {
|
|
252
|
+
let e = this.getPopContainer();
|
|
253
|
+
if (e != "body") {
|
|
254
|
+
const t = document.querySelectorAll(e);
|
|
255
|
+
if (t && t.length > 1) {
|
|
256
|
+
const i = [];
|
|
257
|
+
if (t.forEach((a) => {
|
|
258
|
+
a.offsetWidth == 0 && a.offsetHeight == 0 || i.push(a);
|
|
259
|
+
}), i.length === 1)
|
|
260
|
+
return i[0];
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return document.querySelector(e);
|
|
264
|
+
}
|
|
265
|
+
/**区分modal表单和查询表单*/
|
|
266
|
+
getPopContainer() {
|
|
267
|
+
return this.searchForm === !0 ? "body" : this.inPopover === !0 ? `.${this.popContainer}` : this.popContainer ? `.${this.popContainer} .ant-modal-content` : mi;
|
|
268
|
+
}
|
|
269
|
+
handleWidgetAttr(e) {
|
|
270
|
+
e.ui && e.ui.widgetattrs && e.ui.widgetattrs.disabled == !0 && (this.disabled = !0);
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* 设置 popContainer
|
|
274
|
+
*/
|
|
275
|
+
setCustomPopContainer(e) {
|
|
276
|
+
this.popContainer = e;
|
|
277
|
+
}
|
|
278
|
+
//update-begin-author:taoyan date:2022-8-5 for: 他表字段/关联记录用
|
|
279
|
+
// 获取他表字段的 配置信息
|
|
280
|
+
getLinkFieldInfo() {
|
|
281
|
+
return "";
|
|
282
|
+
}
|
|
283
|
+
// 1.将他表字段的配置信息设置到关联记录字段上
|
|
284
|
+
setOtherInfo(e) {
|
|
285
|
+
}
|
|
286
|
+
//update-end-author:taoyan date:2022-8-5 for: 他表字段/关联记录用
|
|
287
|
+
// 表单设计器高级查询用
|
|
288
|
+
isInPopover() {
|
|
289
|
+
this.inPopover = !0;
|
|
290
|
+
}
|
|
291
|
+
handleDictTableParams() {
|
|
292
|
+
if (!this.formRef.value)
|
|
293
|
+
return;
|
|
294
|
+
const e = this._data.dictTable;
|
|
295
|
+
if (!e)
|
|
296
|
+
return;
|
|
297
|
+
const t = e.match(/\${([^}]+)}/g);
|
|
298
|
+
if (!t || t.length == 0)
|
|
299
|
+
return;
|
|
300
|
+
const i = t.map((f) => f.replace("${", "").replace("}", "")), a = pe(() => {
|
|
301
|
+
const f = this.formRef.value.formModel;
|
|
302
|
+
return i.map((w) => f[w]).join("");
|
|
303
|
+
});
|
|
304
|
+
let r = null;
|
|
305
|
+
he(a, () => {
|
|
306
|
+
r && clearTimeout(r), r = setTimeout(() => {
|
|
307
|
+
const f = this.formRef.value.formModel;
|
|
308
|
+
let w = e.replace(/\${([^}]+)}/g, (m, C) => f[C] == null ? "" : f[C]);
|
|
309
|
+
this.updateDictTable(w);
|
|
310
|
+
}, 150);
|
|
311
|
+
}, { immediate: !0 });
|
|
312
|
+
}
|
|
313
|
+
updateDictTable(e) {
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* 获取表字典的编码,可替换系统变量
|
|
317
|
+
* @param dictTable
|
|
318
|
+
* @param dictText
|
|
319
|
+
* @param dictCode
|
|
320
|
+
*/
|
|
321
|
+
genDictTableCode(e, t, i) {
|
|
322
|
+
return e = Wn(e), encodeURI(`${e},${t},${i}`);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
class Ft extends te {
|
|
326
|
+
getItem() {
|
|
327
|
+
let e = super.getItem();
|
|
328
|
+
return this.hidden === !0 && (e.show = !1), e;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
var Jt = /* @__PURE__ */ ((n) => (n.datetime = "YYYY-MM-DD HH:mm:ss", n.date = "YYYY-MM-DD", n))(Jt || {});
|
|
332
|
+
class gi extends te {
|
|
333
|
+
constructor(e, t, i) {
|
|
334
|
+
super(e, t), this.format = Jt[t.view], this.showTime = t.view != "date";
|
|
335
|
+
let a = t.fieldExtendJson;
|
|
336
|
+
t.view == "date" && a && (a = JSON.parse(a), a.picker && a.picker != "default" ? this.picker = a.picker : this.picker = void 0), this.allowSelectRange = ["eq", "ne"].includes(i == null ? void 0 : i.rule);
|
|
337
|
+
}
|
|
338
|
+
getItem() {
|
|
339
|
+
let e = super.getItem();
|
|
340
|
+
return Object.assign({}, e, {
|
|
341
|
+
component: "DatePickerInFilter",
|
|
342
|
+
componentProps: {
|
|
343
|
+
placeholder: `请选择${this.label}`,
|
|
344
|
+
showTime: this.showTime,
|
|
345
|
+
valueFormat: this.format,
|
|
346
|
+
allowSelectRange: this.allowSelectRange,
|
|
347
|
+
// update-begin--author:liaozhiyang---date:20240430---for:【issues/6094】online 日期(年月日)控件增加年、年月,年周,年季度等格式
|
|
348
|
+
picker: this.picker,
|
|
349
|
+
// update-end--author:liaozhiyang---date:20240430---for:【issues/6094】online 日期(年月日)控件增加年、年月,年周,年季度等格式
|
|
350
|
+
style: {
|
|
351
|
+
width: "100%"
|
|
352
|
+
},
|
|
353
|
+
getPopupContainer: (t) => this.getModalAsContainer()
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
class bi extends te {
|
|
359
|
+
constructor(e, t) {
|
|
360
|
+
super(e, t), this.schema = t, this.options = this.getOptions(t.enum, t.type), this.dictTable = t.dictTable, this.dictText = t.dictText, this.dictCode = t.dictCode, this.multi = t.multi || !1;
|
|
361
|
+
}
|
|
362
|
+
getItem() {
|
|
363
|
+
let e = super.getItem(), t = this.getFormComponent(), i = this.getComponentProps();
|
|
364
|
+
return Object.assign({}, e, {
|
|
365
|
+
component: t,
|
|
366
|
+
componentProps: i,
|
|
367
|
+
renderComponentContent: this.getSlots(i)
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
getFormComponent() {
|
|
371
|
+
return this.options.length > 0 ? "Select" : "JDictSelectTag";
|
|
372
|
+
}
|
|
373
|
+
setFormRef(e) {
|
|
374
|
+
super.setFormRef(e), this.handleDictTableParams();
|
|
375
|
+
}
|
|
376
|
+
updateDictTable(e) {
|
|
377
|
+
this.formRef.value.updateSchema({
|
|
378
|
+
field: this.field,
|
|
379
|
+
componentProps: {
|
|
380
|
+
dictCode: this.genDictTableCode(e, this.dictText, this.dictCode)
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
getComponentProps() {
|
|
385
|
+
let t = {
|
|
386
|
+
allowClear: !0,
|
|
387
|
+
mode: this.multi === !0 ? "multiple" : "combobox",
|
|
388
|
+
style: {
|
|
389
|
+
width: "100%"
|
|
390
|
+
},
|
|
391
|
+
getPopupContainer: (i) => this.getModalAsContainer(),
|
|
392
|
+
// 下拉框展开/关闭的回调
|
|
393
|
+
onDropdownVisibleChange: (i) => {
|
|
394
|
+
i && typeof this.schema.updateOptions == "function" && this.schema.updateOptions();
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
return this.options.length > 0 ? (t.options = this.options, this.options.some((a) => a.color) && (t.useDicColor = !0)) : this.dictTable ? t.dictCode = this.genDictTableCode(this.dictTable, this.dictText, this.dictCode) : (t.dictCode = this.dictCode, t.useDicColor = !0), t;
|
|
398
|
+
}
|
|
399
|
+
getSlots(e) {
|
|
400
|
+
const { useDicColor: t } = e;
|
|
401
|
+
return function() {
|
|
402
|
+
return {
|
|
403
|
+
option(i) {
|
|
404
|
+
const a = {};
|
|
405
|
+
return t && i.color && (a.color = "#fff", a.height = "20px", a.lineHeight = "20px", a.padding = "0 6px", a.fontSize = "12px", a.borderRadius = "8px", a.backgroundColor = i.color, a.display = "inline-block"), _e("span", {
|
|
406
|
+
style: a
|
|
407
|
+
}, i.text || i.label);
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
getOptions(e, t) {
|
|
413
|
+
if (!e || e.length == 0)
|
|
414
|
+
return [];
|
|
415
|
+
let i = t == "number", a = [];
|
|
416
|
+
for (let r of e) {
|
|
417
|
+
if (r == null) break;
|
|
418
|
+
let f = r.value;
|
|
419
|
+
i && (f = parseInt(f)), a.push(ke(ce({}, r), {
|
|
420
|
+
value: f,
|
|
421
|
+
label: r.title
|
|
422
|
+
}));
|
|
423
|
+
}
|
|
424
|
+
return a;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
class vi extends te {
|
|
428
|
+
getItem() {
|
|
429
|
+
let e = super.getItem();
|
|
430
|
+
return Object.assign({}, e, {
|
|
431
|
+
component: "InputPassword"
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
class yi extends te {
|
|
436
|
+
getItem() {
|
|
437
|
+
let e = super.getItem(), t = this.getComponentProps();
|
|
438
|
+
return Object.assign({}, e, {
|
|
439
|
+
component: "JUpload",
|
|
440
|
+
componentProps: t
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
getComponentProps() {
|
|
444
|
+
let e = this.getExtendData();
|
|
445
|
+
return e && e.uploadnum ? {
|
|
446
|
+
maxCount: Number(e.uploadnum)
|
|
447
|
+
} : {};
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
class wi extends te {
|
|
451
|
+
getItem() {
|
|
452
|
+
let e = super.getItem(), t = this.getComponentProps();
|
|
453
|
+
return Object.assign({}, e, {
|
|
454
|
+
component: "JUpload",
|
|
455
|
+
componentProps: t
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
getComponentProps() {
|
|
459
|
+
let e = {
|
|
460
|
+
fileType: Jn.image
|
|
461
|
+
}, t = this.getExtendData();
|
|
462
|
+
return t && t.uploadnum && (e.maxCount = Number(t.uploadnum)), e;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
class Ci extends te {
|
|
466
|
+
getItem() {
|
|
467
|
+
let e = super.getItem();
|
|
468
|
+
return Object.assign({}, e, {
|
|
469
|
+
component: "InputTextArea",
|
|
470
|
+
componentProps: {
|
|
471
|
+
autoSize: {
|
|
472
|
+
minRows: 4,
|
|
473
|
+
maxRows: 10
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
class Si extends te {
|
|
480
|
+
constructor(e, t) {
|
|
481
|
+
super(e, t), this.dictTable = t.dictTable, this.dictText = t.dictText, this.dictCode = t.dictCode;
|
|
482
|
+
}
|
|
483
|
+
setFormRef(e) {
|
|
484
|
+
super.setFormRef(e), this.handleDictTableParams();
|
|
485
|
+
}
|
|
486
|
+
updateDictTable(e) {
|
|
487
|
+
this.formRef.value.updateSchema({
|
|
488
|
+
field: this.field,
|
|
489
|
+
componentProps: {
|
|
490
|
+
dictCode: this.genDictTableCode(e, this.dictText, this.dictCode)
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
getItem() {
|
|
495
|
+
let e = super.getItem(), t = this.getComponentProps();
|
|
496
|
+
return Object.assign({}, e, {
|
|
497
|
+
component: "JSelectMultiple",
|
|
498
|
+
componentProps: t
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
getComponentProps() {
|
|
502
|
+
if (!this.dictTable && !this.dictCode)
|
|
503
|
+
return {};
|
|
504
|
+
{
|
|
505
|
+
let e = {};
|
|
506
|
+
return this.dictTable ? e.dictCode = this.genDictTableCode(this.dictTable, this.dictText, this.dictCode) : (e.dictCode = this.dictCode, e.useDicColor = !0), e.triggerChange = !0, e.popContainer = this.getPopContainer(), e;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
class Fi extends te {
|
|
511
|
+
constructor(e, t) {
|
|
512
|
+
super(e, t), t.dictTable && t.dictText && t.dictCode ? (this.dict = this.genDictTableCode(t.dictTable, t.dictText, t.dictCode), this.type = 1) : (this.dict = encodeURI(`${t.dictCode}`), this.type = 0);
|
|
513
|
+
}
|
|
514
|
+
setFormRef(e) {
|
|
515
|
+
super.setFormRef(e), this.handleDictTableParams();
|
|
516
|
+
}
|
|
517
|
+
updateDictTable(e) {
|
|
518
|
+
this.formRef.value.updateSchema({
|
|
519
|
+
field: this.field,
|
|
520
|
+
componentProps: {
|
|
521
|
+
dict: this.genDictTableCode(e, this._data.dictText, this._data.dictCode)
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
getItem() {
|
|
526
|
+
let e = super.getItem(), t = this.getPopContainer();
|
|
527
|
+
return Object.assign({}, e, {
|
|
528
|
+
component: "JSearchSelect",
|
|
529
|
+
componentProps: {
|
|
530
|
+
dict: this.dict,
|
|
531
|
+
pageSize: 10,
|
|
532
|
+
// update-begin--author:liaozhiyang---date:20240628---for:【issues/6336】online下拉搜索框设置数据字典编辑弹窗报错
|
|
533
|
+
async: !!this.type,
|
|
534
|
+
// update-end--author:liaozhiyang---date:20240628---for:【issues/6336】online下拉搜索框设置数据字典编辑弹窗报错
|
|
535
|
+
useDicColor: !0,
|
|
536
|
+
popContainer: t
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
class Ti extends te {
|
|
542
|
+
constructor(e, t) {
|
|
543
|
+
super(e, t), this.code = t.code, this.multi = t.popupMulti, this.fieldConfig = this.getFieldConfig(t);
|
|
544
|
+
}
|
|
545
|
+
getItem() {
|
|
546
|
+
let e = super.getItem(), t = this.getComponentProps();
|
|
547
|
+
return Object.assign({}, e, {
|
|
548
|
+
component: "JPopup",
|
|
549
|
+
componentProps: t
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
getComponentProps() {
|
|
553
|
+
let e = {
|
|
554
|
+
code: this.code,
|
|
555
|
+
multi: this.multi,
|
|
556
|
+
fieldConfig: this.fieldConfig
|
|
557
|
+
};
|
|
558
|
+
return this.formRef ? e.formElRef = this.formRef : e.setFieldsValue = this.setFieldsValue, this.inPopover === !0 && (e.getContainer = () => this.getModalAsContainer()), e.getFormValues = () => Ce(this.formRef).getFieldsValue(), e;
|
|
559
|
+
}
|
|
560
|
+
getFieldConfig(e) {
|
|
561
|
+
let { destFields: t, orgFields: i, dictText: a } = e;
|
|
562
|
+
if (!t || t.length == 0)
|
|
563
|
+
return [];
|
|
564
|
+
let r = t.split(","), f = i.split(","), w = a ? a.split(",") : null, m = [];
|
|
565
|
+
const C = this.pre;
|
|
566
|
+
for (let O = 0; O < r.length; O++)
|
|
567
|
+
m.push({
|
|
568
|
+
target: C + r[O],
|
|
569
|
+
source: f[O],
|
|
570
|
+
label: w ? w[O] : void 0
|
|
571
|
+
});
|
|
572
|
+
return m;
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
class _i extends te {
|
|
576
|
+
constructor(e, t) {
|
|
577
|
+
super(e, t), this.dictCode = `${t.code},${t.destFields},${t.orgFields}`, this.multi = t.popupMulti;
|
|
578
|
+
}
|
|
579
|
+
getItem() {
|
|
580
|
+
const e = super.getItem(), t = this.getComponentProps();
|
|
581
|
+
return Object.assign({}, e, {
|
|
582
|
+
component: "JPopupDict",
|
|
583
|
+
componentProps: t
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
getComponentProps() {
|
|
587
|
+
const e = {
|
|
588
|
+
dictCode: this.dictCode,
|
|
589
|
+
multi: this.multi
|
|
590
|
+
};
|
|
591
|
+
return this.inPopover && (e.getContainer = () => this.getModalAsContainer()), e.getFormValues = () => Ce(this.formRef).getFieldsValue(), e;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
class xi extends te {
|
|
595
|
+
constructor(e, t) {
|
|
596
|
+
super(e, t), this.multi = !1, this.pid = t.pidValue, this.pcode = t.pcode, this.textField = t.textField;
|
|
597
|
+
}
|
|
598
|
+
getItem() {
|
|
599
|
+
let e = super.getItem(), t = this.getComponentProps();
|
|
600
|
+
return Object.assign({}, e, {
|
|
601
|
+
componentProps: t,
|
|
602
|
+
component: "JCategorySelect"
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* 1. 不带返回值的
|
|
607
|
+
* 2. 带文本返回的
|
|
608
|
+
*/
|
|
609
|
+
getComponentProps() {
|
|
610
|
+
let e = {
|
|
611
|
+
placeholder: "请选择" + this.label
|
|
612
|
+
};
|
|
613
|
+
if (this.pcode)
|
|
614
|
+
e.pcode = this.pcode;
|
|
615
|
+
else {
|
|
616
|
+
let t = this.pid || "EMPTY_PID";
|
|
617
|
+
e.pid = t;
|
|
618
|
+
}
|
|
619
|
+
return this.textField ? ke(ce({
|
|
620
|
+
loadTriggleChange: !0,
|
|
621
|
+
multiple: this.multi
|
|
622
|
+
}, e), {
|
|
623
|
+
back: this.textField,
|
|
624
|
+
onChange: (t, i) => {
|
|
625
|
+
this.formRef && (this.formRef.value.setFieldsValue(i), this.formRef.value.$formValueChange(this.field, t));
|
|
626
|
+
}
|
|
627
|
+
}) : ce({
|
|
628
|
+
multiple: this.multi
|
|
629
|
+
}, e);
|
|
630
|
+
}
|
|
631
|
+
getRelatedHideFields() {
|
|
632
|
+
let e = [];
|
|
633
|
+
return this.textField && e.push(this.textField), e;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
class Oi extends te {
|
|
637
|
+
getItem() {
|
|
638
|
+
let e = super.getItem(), t = this.getComponentProps();
|
|
639
|
+
return Object.assign({}, e, {
|
|
640
|
+
component: "JSelectDept",
|
|
641
|
+
componentProps: t
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
getComponentProps() {
|
|
645
|
+
let e = this.getExtendData(), t = {
|
|
646
|
+
checkStrictly: !0,
|
|
647
|
+
showButton: !1
|
|
648
|
+
};
|
|
649
|
+
return e.text && (t.labelKey = e.text), e.store && (t.rowKey = e.store), e.multiSelect === !1 && (t.multiple = !1), e.multiSelect === !0 && (t.multiple = !0), t.maxTagCount = 3, this.inPopover === !0 && (t.getContainer = () => this.getModalAsContainer()), t;
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
class Pi extends te {
|
|
653
|
+
constructor(e, t) {
|
|
654
|
+
super(e, t), this.showButton = t.showButton !== !1;
|
|
655
|
+
}
|
|
656
|
+
getItem() {
|
|
657
|
+
let e = super.getItem(), t = this.getComponentProps();
|
|
658
|
+
return Object.assign({}, e, {
|
|
659
|
+
component: "JSelectUser",
|
|
660
|
+
componentProps: t
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
getComponentProps() {
|
|
664
|
+
let e = this.getExtendData(), t = {
|
|
665
|
+
showSelected: !1,
|
|
666
|
+
allowClear: !0,
|
|
667
|
+
isRadioSelection: !1,
|
|
668
|
+
showButton: this.showButton
|
|
669
|
+
};
|
|
670
|
+
return e.text && (t.labelKey = e.text), e.store && (t.rowKey = e.store), e.multiSelect === !1 && (t.isRadioSelection = !0), t.maxTagCount = 3, this.inPopover === !0 && (t.getContainer = () => this.getModalAsContainer()), t;
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
class Di extends te {
|
|
674
|
+
getItem() {
|
|
675
|
+
let e = super.getItem();
|
|
676
|
+
return Object.assign({}, e, {
|
|
677
|
+
component: "JEditor",
|
|
678
|
+
componentProps: {
|
|
679
|
+
//update-begin-author:taoyan date:2022-6-1 for: VUEN-1159 第一次加载时,点击第一个输入框,光标会跑到富文本输入框
|
|
680
|
+
options: {
|
|
681
|
+
auto_focus: !1
|
|
682
|
+
}
|
|
683
|
+
//update-end-author:taoyan date:2022-6-1 for: VUEN-1159 第一次加载时,点击第一个输入框,光标会跑到富文本输入框
|
|
684
|
+
// fileMax:1,
|
|
685
|
+
// showImageUpload:false,
|
|
686
|
+
// width:"966px",
|
|
687
|
+
// height:"200px"
|
|
688
|
+
}
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
class Ii extends te {
|
|
693
|
+
getItem() {
|
|
694
|
+
let e = super.getItem();
|
|
695
|
+
return Object.assign({}, e, {
|
|
696
|
+
component: "JMarkdownEditor",
|
|
697
|
+
componentProps: {
|
|
698
|
+
// height: 300,
|
|
699
|
+
}
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
class Mi extends te {
|
|
704
|
+
getItem() {
|
|
705
|
+
let e = super.getItem();
|
|
706
|
+
return Object.assign({}, e, {
|
|
707
|
+
component: "JAreaLinkage",
|
|
708
|
+
componentProps: {
|
|
709
|
+
saveCode: "region",
|
|
710
|
+
getPopupContainer: () => document.querySelector("body")
|
|
711
|
+
}
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
class Ri extends te {
|
|
716
|
+
constructor(e, t) {
|
|
717
|
+
super(e, t), this.dict = t.dict, this.pidField = t.pidField, this.pidValue = t.pidValue, this.hasChildField = t.hasChildField;
|
|
718
|
+
}
|
|
719
|
+
getItem() {
|
|
720
|
+
let e = super.getItem();
|
|
721
|
+
return Object.assign({}, e, {
|
|
722
|
+
component: "JTreeSelect",
|
|
723
|
+
componentProps: {
|
|
724
|
+
dict: this.dict,
|
|
725
|
+
pidField: this.pidField,
|
|
726
|
+
pidValue: this.pidValue,
|
|
727
|
+
// update-begin--author:liaozhiyang---date:20240509---for:【issues/6197】解决自定义树组件是否含有子节点功能不生效
|
|
728
|
+
hasChildField: this.hasChildField
|
|
729
|
+
// update-end--author:liaozhiyang---date:20240509---for:【issues/6197】解决自定义树组件是否含有子节点功能不生效
|
|
730
|
+
}
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
class ki extends te {
|
|
735
|
+
constructor(e, t) {
|
|
736
|
+
super(e, t), this.dictTable = t.dictTable, this.dictText = t.dictText, this.dictCode = t.dictCode;
|
|
737
|
+
}
|
|
738
|
+
setFormRef(e) {
|
|
739
|
+
super.setFormRef(e), this.handleDictTableParams();
|
|
740
|
+
}
|
|
741
|
+
updateDictTable(e) {
|
|
742
|
+
this.formRef.value.updateSchema({
|
|
743
|
+
field: this.field,
|
|
744
|
+
componentProps: {
|
|
745
|
+
dictCode: this.genDictTableCode(e, this.dictText, this.dictCode)
|
|
746
|
+
}
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
getItem() {
|
|
750
|
+
let e = super.getItem(), t = this.getComponentProps();
|
|
751
|
+
return Object.assign({}, e, {
|
|
752
|
+
component: "JDictSelectTag",
|
|
753
|
+
componentProps: t
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
getComponentProps() {
|
|
757
|
+
return !this.dictTable && !this.dictCode ? {} : this.dictTable ? {
|
|
758
|
+
dictCode: this.genDictTableCode(this.dictTable, this.dictText, this.dictCode),
|
|
759
|
+
type: "radio"
|
|
760
|
+
} : {
|
|
761
|
+
// update-begin--author:liaozhiyang---date:20230110---for:【QQYUN-7799】字典组件(原生组件除外)加上颜色配置
|
|
762
|
+
useDicColor: !0,
|
|
763
|
+
// update-end--author:liaozhiyang---date:20230110---for:【QQYUN-7799】字典组件(原生组件除外)加上颜色配置
|
|
764
|
+
dictCode: this.dictCode,
|
|
765
|
+
type: "radio"
|
|
766
|
+
};
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
class $i extends te {
|
|
770
|
+
constructor(e, t) {
|
|
771
|
+
super(e, t), this.options = this.getOptions(t.enum);
|
|
772
|
+
}
|
|
773
|
+
setFormRef(e) {
|
|
774
|
+
super.setFormRef(e), this.handleDictTableParams();
|
|
775
|
+
}
|
|
776
|
+
updateDictTable(e) {
|
|
777
|
+
this.formRef.value.updateSchema({
|
|
778
|
+
field: this.field,
|
|
779
|
+
componentProps: {
|
|
780
|
+
options: [],
|
|
781
|
+
dictCode: this.genDictTableCode(e, this._data.dictText, this._data.dictCode)
|
|
782
|
+
}
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
getItem() {
|
|
786
|
+
let e = super.getItem();
|
|
787
|
+
return Object.assign({}, e, {
|
|
788
|
+
component: "JCheckbox",
|
|
789
|
+
componentProps: {
|
|
790
|
+
options: this.options,
|
|
791
|
+
triggerChange: !0,
|
|
792
|
+
// update-begin--author:liaozhiyang---date:20230110---for:【QQYUN-7799】字典组件(原生组件除外)加上颜色配置
|
|
793
|
+
useDicColor: !0
|
|
794
|
+
// update-end--author:liaozhiyang---date:20230110---for:【QQYUN-7799】字典组件(原生组件除外)加上颜色配置
|
|
795
|
+
}
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
getOptions(e) {
|
|
799
|
+
if (!e || e.length == 0)
|
|
800
|
+
return [];
|
|
801
|
+
let t = [];
|
|
802
|
+
for (let i of e)
|
|
803
|
+
t.push({
|
|
804
|
+
value: i.value,
|
|
805
|
+
label: i.title,
|
|
806
|
+
// update-begin--author:liaozhiyang---date:20230110---for:【QQYUN-7799】字典组件(原生组件除外)加上颜色配置
|
|
807
|
+
color: i.color
|
|
808
|
+
// update-end--author:liaozhiyang---date:20230110---for:【QQYUN-7799】字典组件(原生组件除外)加上颜色配置
|
|
809
|
+
});
|
|
810
|
+
return t;
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
class Ei extends te {
|
|
814
|
+
constructor(e, t) {
|
|
815
|
+
super(e, t);
|
|
816
|
+
}
|
|
817
|
+
getItem() {
|
|
818
|
+
let e = super.getItem(), t = this.getComponentProps();
|
|
819
|
+
return Object.assign({}, e, {
|
|
820
|
+
component: "JSwitch",
|
|
821
|
+
componentProps: t
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
getComponentProps() {
|
|
825
|
+
let { fieldExtendJson: e } = this._data, t = ["Y", "N"];
|
|
826
|
+
if (e && typeof e == "string") {
|
|
827
|
+
const i = JSON.parse(e);
|
|
828
|
+
Ct(i) && i.length == 2 ? t = i : At(i) && Ct(i.switchOptions) && (t = i.switchOptions);
|
|
829
|
+
}
|
|
830
|
+
return {
|
|
831
|
+
options: t
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
class ji extends te {
|
|
836
|
+
getItem() {
|
|
837
|
+
let e = super.getItem();
|
|
838
|
+
return Object.assign({}, e, {
|
|
839
|
+
component: "TimePicker",
|
|
840
|
+
componentProps: {
|
|
841
|
+
placeholder: `请选择${this.label}`,
|
|
842
|
+
valueFormat: "HH:mm:ss",
|
|
843
|
+
getPopupContainer: (t) => this.getModalAsContainer(),
|
|
844
|
+
style: {
|
|
845
|
+
width: "100%"
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
});
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
class Li extends te {
|
|
852
|
+
constructor(e, t) {
|
|
853
|
+
super(e, t);
|
|
854
|
+
const { dictTable: i, dictText: a, dictCode: r, pidField: f, idField: w, origin: m, condition: C } = t;
|
|
855
|
+
this.table = i, this.txt = a, this.store = r, this.idField = w, this.pidField = f, this.origin = m, this.condition = C, this.options = [], this.next = t.next || "", this.type = t.type;
|
|
856
|
+
}
|
|
857
|
+
getItem() {
|
|
858
|
+
let e = super.getItem(), t = this.getComponentProps();
|
|
859
|
+
return Object.assign({}, e, {
|
|
860
|
+
component: "OnlineSelectCascade",
|
|
861
|
+
componentProps: t
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
getComponentProps() {
|
|
865
|
+
let e = {
|
|
866
|
+
table: this.table,
|
|
867
|
+
txt: this.txt,
|
|
868
|
+
store: this.store,
|
|
869
|
+
pidField: this.pidField,
|
|
870
|
+
idField: this.idField,
|
|
871
|
+
origin: this.origin,
|
|
872
|
+
pidValue: "-1",
|
|
873
|
+
style: {
|
|
874
|
+
width: "100%"
|
|
875
|
+
},
|
|
876
|
+
onChange: (t) => {
|
|
877
|
+
this.valueChange(t);
|
|
878
|
+
},
|
|
879
|
+
onNext: (t) => {
|
|
880
|
+
this.nextOptionsChange(t);
|
|
881
|
+
}
|
|
882
|
+
};
|
|
883
|
+
return this._data.origin === !0 && (e.condition = this.condition), e;
|
|
884
|
+
}
|
|
885
|
+
nextOptionsChange(e) {
|
|
886
|
+
return K(this, null, function* () {
|
|
887
|
+
if (!this.formRef || !this.next)
|
|
888
|
+
return;
|
|
889
|
+
yield this.formRef.value.updateSchema({
|
|
890
|
+
field: this.next,
|
|
891
|
+
componentProps: {
|
|
892
|
+
pidValue: e
|
|
893
|
+
}
|
|
894
|
+
});
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
valueChange(e) {
|
|
898
|
+
return K(this, null, function* () {
|
|
899
|
+
if (!this.formRef)
|
|
900
|
+
return;
|
|
901
|
+
let t = this.formRef.value;
|
|
902
|
+
t.$formValueChange(this.field, e), this.next && (yield t.setFieldsValue({ [this.next]: "" }));
|
|
903
|
+
});
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
class Tt extends te {
|
|
907
|
+
constructor(e, t) {
|
|
908
|
+
super(e, t), this.slot = "";
|
|
909
|
+
let i = t.fieldExtendJson;
|
|
910
|
+
t.view == "date" && i && (i = JSON.parse(i), i.picker && i.picker != "default" ? this.picker = i.picker : this.picker = void 0), this.precision = t.dbPointLength;
|
|
911
|
+
}
|
|
912
|
+
getItem() {
|
|
913
|
+
let e = super.getItem(), t = this.slot;
|
|
914
|
+
const i = {};
|
|
915
|
+
return this.picker && (i.picker = this.picker), this.precision && (i.precision = this.precision), Object.assign({}, e, {
|
|
916
|
+
slot: t,
|
|
917
|
+
componentProps: i
|
|
918
|
+
});
|
|
919
|
+
}
|
|
920
|
+
groupDate() {
|
|
921
|
+
return this.slot = "groupDate", this;
|
|
922
|
+
}
|
|
923
|
+
groupDatetime() {
|
|
924
|
+
return this.slot = "groupDatetime", this;
|
|
925
|
+
}
|
|
926
|
+
groupTime() {
|
|
927
|
+
return this.slot = "groupTime", this;
|
|
928
|
+
}
|
|
929
|
+
groupNumber() {
|
|
930
|
+
return this.slot = "groupNumber", this;
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
class Ai extends te {
|
|
934
|
+
constructor(e, t) {
|
|
935
|
+
super(e, t), this.dbPointLength = t.dbPointLength;
|
|
936
|
+
}
|
|
937
|
+
getItem() {
|
|
938
|
+
let e = super.getItem(), t = this.getComponentProps();
|
|
939
|
+
return Object.assign({}, e, {
|
|
940
|
+
component: "InputNumber",
|
|
941
|
+
componentProps: t
|
|
942
|
+
});
|
|
943
|
+
}
|
|
944
|
+
getComponentProps() {
|
|
945
|
+
const e = {
|
|
946
|
+
style: {
|
|
947
|
+
width: "100%"
|
|
948
|
+
}
|
|
949
|
+
};
|
|
950
|
+
return this.dbPointLength >= 0 && (e.precision = this.dbPointLength), e;
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
class Ni extends te {
|
|
954
|
+
constructor(e, t) {
|
|
955
|
+
super(e, t), this.dictTable = t.dictTable, this.dictText = t.dictText, this.dictCode = t.dictCode, this.view = t.view, this.componentString = "", this.linkFields = [];
|
|
956
|
+
}
|
|
957
|
+
getItem() {
|
|
958
|
+
let e = super.getItem();
|
|
959
|
+
const t = this.getComponentProps();
|
|
960
|
+
return Object.assign({}, e, {
|
|
961
|
+
component: this.componentString,
|
|
962
|
+
componentProps: t
|
|
963
|
+
});
|
|
964
|
+
}
|
|
965
|
+
getComponentProps() {
|
|
966
|
+
let e = {
|
|
967
|
+
textField: this.dictText,
|
|
968
|
+
tableName: this.dictTable,
|
|
969
|
+
valueField: this.dictCode
|
|
970
|
+
}, t = this.getExtendData();
|
|
971
|
+
if (t.multiSelect ? e.multi = !0 : e.multi = !1, t.imageField ? e.imageField = t.imageField : e.imageField = "", t.showType == "select") {
|
|
972
|
+
this.componentString = "LinkTableSelect";
|
|
973
|
+
let i = this.getPopContainer();
|
|
974
|
+
e.popContainer = i;
|
|
975
|
+
} else
|
|
976
|
+
this.componentString = "LinkTableCard";
|
|
977
|
+
return this.linkFields.length > 0 && (e.linkFields = this.linkFields), e;
|
|
978
|
+
}
|
|
979
|
+
// 他表字段用于翻译
|
|
980
|
+
setOtherInfo(e) {
|
|
981
|
+
this.linkFields = e;
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
class Vi extends te {
|
|
985
|
+
constructor(e, t) {
|
|
986
|
+
super(e, t), this.dictTable = t.dictTable, this.dictText = t.dictText;
|
|
987
|
+
}
|
|
988
|
+
getItem() {
|
|
989
|
+
let e = super.getItem();
|
|
990
|
+
return Object.assign({}, e, {
|
|
991
|
+
componentProps: {
|
|
992
|
+
readOnly: !0,
|
|
993
|
+
allowClear: !1,
|
|
994
|
+
disabled: !0,
|
|
995
|
+
style: {
|
|
996
|
+
background: "none",
|
|
997
|
+
color: "rgba(0, 0, 0, 0.85)",
|
|
998
|
+
border: "none"
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
/**
|
|
1004
|
+
* 获取他表字段的关联信息
|
|
1005
|
+
*/
|
|
1006
|
+
getLinkFieldInfo() {
|
|
1007
|
+
return [this.dictTable, `${this.field},${this.dictText}`];
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
class Bi extends te {
|
|
1011
|
+
constructor(e, t) {
|
|
1012
|
+
super(e, t), this.code = t.code, this.titleField = t.titleField, this.multi = t.multi || !1;
|
|
1013
|
+
}
|
|
1014
|
+
getItem() {
|
|
1015
|
+
let e = super.getItem();
|
|
1016
|
+
return Object.assign({}, e, {
|
|
1017
|
+
component: "LinkTableForQuery",
|
|
1018
|
+
componentProps: {
|
|
1019
|
+
code: this.code,
|
|
1020
|
+
multi: this.multi,
|
|
1021
|
+
field: this.titleField,
|
|
1022
|
+
style: {
|
|
1023
|
+
width: "100%"
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
});
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
class Wi extends te {
|
|
1030
|
+
constructor(e, t, i) {
|
|
1031
|
+
var a;
|
|
1032
|
+
super(e, t), this.schema = t, this.areaLevel = (a = t.areaLevel) != null ? a : 3, this.allowChangeLevel = ["eq", "ne"].includes(i == null ? void 0 : i.rule);
|
|
1033
|
+
}
|
|
1034
|
+
getItem() {
|
|
1035
|
+
let e = super.getItem();
|
|
1036
|
+
return Object.assign({}, e, {
|
|
1037
|
+
component: "CascaderPcaInFilter",
|
|
1038
|
+
componentProps: {
|
|
1039
|
+
areaLevel: this.areaLevel,
|
|
1040
|
+
allowChangeLevel: this.allowChangeLevel,
|
|
1041
|
+
placeholder: "请选择…",
|
|
1042
|
+
style: {
|
|
1043
|
+
width: "100%"
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
class Ji extends te {
|
|
1050
|
+
constructor(e, t) {
|
|
1051
|
+
super(e, t), this.multi = t.multi === !0, this.store = t.store || "", this.query = t.query || !1;
|
|
1052
|
+
}
|
|
1053
|
+
getItem() {
|
|
1054
|
+
let e = super.getItem(), t = this.getComponentProps();
|
|
1055
|
+
return Object.assign({}, e, {
|
|
1056
|
+
component: "UserSelect",
|
|
1057
|
+
componentProps: t
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
getComponentProps() {
|
|
1061
|
+
let e = {
|
|
1062
|
+
multi: this.multi,
|
|
1063
|
+
store: this.store,
|
|
1064
|
+
query: this.query
|
|
1065
|
+
};
|
|
1066
|
+
return this.inPopover === !0 && (e.getContainer = () => this.getModalAsContainer()), e;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
class Yi extends te {
|
|
1070
|
+
constructor(e, t) {
|
|
1071
|
+
super(e, t);
|
|
1072
|
+
let i = t.view;
|
|
1073
|
+
this.format = t.format, this.datetime = !1, i === "rangeNumber" ? this.componentType = "JRangeNumber" : i === "rangeTime" ? this.componentType = "RangeTime" : (this.componentType = "RangeDate", t.datetime === !0 && (this.datetime = !0));
|
|
1074
|
+
}
|
|
1075
|
+
getItem() {
|
|
1076
|
+
let e = super.getItem();
|
|
1077
|
+
return Object.assign({}, e, {
|
|
1078
|
+
component: this.componentType,
|
|
1079
|
+
componentProps: {
|
|
1080
|
+
datetime: this.datetime,
|
|
1081
|
+
format: this.format,
|
|
1082
|
+
getPopupContainer: (t) => this.getModalAsContainer()
|
|
1083
|
+
}
|
|
1084
|
+
});
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
class nt {
|
|
1088
|
+
static createFormSchema(e, t, i) {
|
|
1089
|
+
switch (t.view) {
|
|
1090
|
+
case "password":
|
|
1091
|
+
return new vi(e, t);
|
|
1092
|
+
case "list":
|
|
1093
|
+
return new bi(e, t);
|
|
1094
|
+
case "radio":
|
|
1095
|
+
return new ki(e, t);
|
|
1096
|
+
case "checkbox":
|
|
1097
|
+
return new $i(e, t);
|
|
1098
|
+
case "date":
|
|
1099
|
+
case "datetime":
|
|
1100
|
+
return new gi(e, t, i);
|
|
1101
|
+
case "time":
|
|
1102
|
+
return new ji(e, t);
|
|
1103
|
+
case "file":
|
|
1104
|
+
return new yi(e, t);
|
|
1105
|
+
case "image":
|
|
1106
|
+
return new wi(e, t);
|
|
1107
|
+
case "textarea":
|
|
1108
|
+
return new Ci(e, t);
|
|
1109
|
+
case "list_multi":
|
|
1110
|
+
return new Si(e, t);
|
|
1111
|
+
case "sel_search":
|
|
1112
|
+
return new Fi(e, t);
|
|
1113
|
+
case "popup":
|
|
1114
|
+
return new Ti(e, t);
|
|
1115
|
+
case "cat_tree":
|
|
1116
|
+
return new xi(e, t);
|
|
1117
|
+
case "sel_depart":
|
|
1118
|
+
return new Oi(e, t);
|
|
1119
|
+
case "sel_user":
|
|
1120
|
+
return new Pi(e, t);
|
|
1121
|
+
case "umeditor":
|
|
1122
|
+
return new Di(e, t);
|
|
1123
|
+
case "markdown":
|
|
1124
|
+
return new Ii(e, t);
|
|
1125
|
+
case "pca":
|
|
1126
|
+
return new Mi(e, t);
|
|
1127
|
+
// update-end--author:liaozhiyang---date:20240607---for:【TV360X-501】省市区换新组件
|
|
1128
|
+
case "link_down":
|
|
1129
|
+
return new Li(e, t);
|
|
1130
|
+
case "sel_tree":
|
|
1131
|
+
return new Ri(e, t);
|
|
1132
|
+
case "switch":
|
|
1133
|
+
return new Ei(e, t);
|
|
1134
|
+
case "link_table":
|
|
1135
|
+
return new Ni(e, t);
|
|
1136
|
+
case "link_table_field":
|
|
1137
|
+
return new Vi(e, t);
|
|
1138
|
+
// update-begin--author:liaozhiyang---date:20240130---for:【QQYUN-7961】popupDict字典
|
|
1139
|
+
case "popup_dict":
|
|
1140
|
+
return new _i(e, t);
|
|
1141
|
+
// update-end--author:liaozhiyang---date:20240130---for:【QQYUN-7961】popupDict字典
|
|
1142
|
+
case "slot":
|
|
1143
|
+
return new Tt(e, t);
|
|
1144
|
+
case "LinkTableForQuery":
|
|
1145
|
+
return new Bi(e, t);
|
|
1146
|
+
case "CascaderPcaForQuery":
|
|
1147
|
+
return new Wi(e, t, i);
|
|
1148
|
+
case "select_user2":
|
|
1149
|
+
return new Ji(e, t);
|
|
1150
|
+
case "rangeDate":
|
|
1151
|
+
case "rangeTime":
|
|
1152
|
+
case "rangeNumber":
|
|
1153
|
+
return new Yi(e, t);
|
|
1154
|
+
case "hidden":
|
|
1155
|
+
return new Ft(e, t).isHidden();
|
|
1156
|
+
default:
|
|
1157
|
+
return t.type == "number" ? new Ai(e, t) : new Ft(e, t);
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
static createSlotFormSchema(e, t) {
|
|
1161
|
+
let i = new Tt(e, t), a = t.view;
|
|
1162
|
+
if (a == "date")
|
|
1163
|
+
i.groupDate();
|
|
1164
|
+
else if (a == "datetime")
|
|
1165
|
+
i.groupDatetime();
|
|
1166
|
+
else if (a == "time")
|
|
1167
|
+
i.groupTime();
|
|
1168
|
+
else {
|
|
1169
|
+
let r = t.type;
|
|
1170
|
+
(r == "number" || r == "integer") && i.groupNumber();
|
|
1171
|
+
}
|
|
1172
|
+
return i;
|
|
1173
|
+
}
|
|
1174
|
+
/**
|
|
1175
|
+
* 表单ID 默认是隐藏的
|
|
1176
|
+
*/
|
|
1177
|
+
static createIdField() {
|
|
1178
|
+
return {
|
|
1179
|
+
label: "",
|
|
1180
|
+
field: "id",
|
|
1181
|
+
component: "Input",
|
|
1182
|
+
show: !1
|
|
1183
|
+
};
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
function dt(n) {
|
|
1187
|
+
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
1188
|
+
}
|
|
1189
|
+
var qe = { exports: {} }, qi = qe.exports, _t;
|
|
1190
|
+
function Ui() {
|
|
1191
|
+
return _t || (_t = 1, (function(n, e) {
|
|
1192
|
+
(function(t, i) {
|
|
1193
|
+
n.exports = i();
|
|
1194
|
+
})(qi, (function() {
|
|
1195
|
+
var t = 1e3, i = 6e4, a = 36e5, r = "millisecond", f = "second", w = "minute", m = "hour", C = "day", O = "week", v = "month", P = "quarter", S = "year", N = "date", E = "Invalid Date", U = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, V = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, L = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(c) {
|
|
1196
|
+
var p = ["th", "st", "nd", "rd"], l = c % 100;
|
|
1197
|
+
return "[" + c + (p[(l - 20) % 10] || p[l] || p[0]) + "]";
|
|
1198
|
+
} }, q = function(c, p, l) {
|
|
1199
|
+
var d = String(c);
|
|
1200
|
+
return !d || d.length >= p ? c : "" + Array(p + 1 - d.length).join(l) + c;
|
|
1201
|
+
}, A = { s: q, z: function(c) {
|
|
1202
|
+
var p = -c.utcOffset(), l = Math.abs(p), d = Math.floor(l / 60), o = l % 60;
|
|
1203
|
+
return (p <= 0 ? "+" : "-") + q(d, 2, "0") + ":" + q(o, 2, "0");
|
|
1204
|
+
}, m: function c(p, l) {
|
|
1205
|
+
if (p.date() < l.date()) return -c(l, p);
|
|
1206
|
+
var d = 12 * (l.year() - p.year()) + (l.month() - p.month()), o = p.clone().add(d, v), s = l - o < 0, g = p.clone().add(d + (s ? -1 : 1), v);
|
|
1207
|
+
return +(-(d + (l - o) / (s ? o - g : g - o)) || 0);
|
|
1208
|
+
}, a: function(c) {
|
|
1209
|
+
return c < 0 ? Math.ceil(c) || 0 : Math.floor(c);
|
|
1210
|
+
}, p: function(c) {
|
|
1211
|
+
return { M: v, y: S, w: O, d: C, D: N, h: m, m: w, s: f, ms: r, Q: P }[c] || String(c || "").toLowerCase().replace(/s$/, "");
|
|
1212
|
+
}, u: function(c) {
|
|
1213
|
+
return c === void 0;
|
|
1214
|
+
} }, Q = "en", H = {};
|
|
1215
|
+
H[Q] = L;
|
|
1216
|
+
var ee = "$isDayjsObject", x = function(c) {
|
|
1217
|
+
return c instanceof M || !(!c || !c[ee]);
|
|
1218
|
+
}, I = function c(p, l, d) {
|
|
1219
|
+
var o;
|
|
1220
|
+
if (!p) return Q;
|
|
1221
|
+
if (typeof p == "string") {
|
|
1222
|
+
var s = p.toLowerCase();
|
|
1223
|
+
H[s] && (o = s), l && (H[s] = l, o = s);
|
|
1224
|
+
var g = p.split("-");
|
|
1225
|
+
if (!o && g.length > 1) return c(g[0]);
|
|
1226
|
+
} else {
|
|
1227
|
+
var T = p.name;
|
|
1228
|
+
H[T] = p, o = T;
|
|
1229
|
+
}
|
|
1230
|
+
return !d && o && (Q = o), o || !d && Q;
|
|
1231
|
+
}, _ = function(c, p) {
|
|
1232
|
+
if (x(c)) return c.clone();
|
|
1233
|
+
var l = typeof p == "object" ? p : {};
|
|
1234
|
+
return l.date = c, l.args = arguments, new M(l);
|
|
1235
|
+
}, F = A;
|
|
1236
|
+
F.l = I, F.i = x, F.w = function(c, p) {
|
|
1237
|
+
return _(c, { locale: p.$L, utc: p.$u, x: p.$x, $offset: p.$offset });
|
|
1238
|
+
};
|
|
1239
|
+
var M = (function() {
|
|
1240
|
+
function c(l) {
|
|
1241
|
+
this.$L = I(l.locale, null, !0), this.parse(l), this.$x = this.$x || l.x || {}, this[ee] = !0;
|
|
1242
|
+
}
|
|
1243
|
+
var p = c.prototype;
|
|
1244
|
+
return p.parse = function(l) {
|
|
1245
|
+
this.$d = (function(d) {
|
|
1246
|
+
var o = d.date, s = d.utc;
|
|
1247
|
+
if (o === null) return /* @__PURE__ */ new Date(NaN);
|
|
1248
|
+
if (F.u(o)) return /* @__PURE__ */ new Date();
|
|
1249
|
+
if (o instanceof Date) return new Date(o);
|
|
1250
|
+
if (typeof o == "string" && !/Z$/i.test(o)) {
|
|
1251
|
+
var g = o.match(U);
|
|
1252
|
+
if (g) {
|
|
1253
|
+
var T = g[2] - 1 || 0, u = (g[7] || "0").substring(0, 3);
|
|
1254
|
+
return s ? new Date(Date.UTC(g[1], T, g[3] || 1, g[4] || 0, g[5] || 0, g[6] || 0, u)) : new Date(g[1], T, g[3] || 1, g[4] || 0, g[5] || 0, g[6] || 0, u);
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
return new Date(o);
|
|
1258
|
+
})(l), this.init();
|
|
1259
|
+
}, p.init = function() {
|
|
1260
|
+
var l = this.$d;
|
|
1261
|
+
this.$y = l.getFullYear(), this.$M = l.getMonth(), this.$D = l.getDate(), this.$W = l.getDay(), this.$H = l.getHours(), this.$m = l.getMinutes(), this.$s = l.getSeconds(), this.$ms = l.getMilliseconds();
|
|
1262
|
+
}, p.$utils = function() {
|
|
1263
|
+
return F;
|
|
1264
|
+
}, p.isValid = function() {
|
|
1265
|
+
return this.$d.toString() !== E;
|
|
1266
|
+
}, p.isSame = function(l, d) {
|
|
1267
|
+
var o = _(l);
|
|
1268
|
+
return this.startOf(d) <= o && o <= this.endOf(d);
|
|
1269
|
+
}, p.isAfter = function(l, d) {
|
|
1270
|
+
return _(l) < this.startOf(d);
|
|
1271
|
+
}, p.isBefore = function(l, d) {
|
|
1272
|
+
return this.endOf(d) < _(l);
|
|
1273
|
+
}, p.$g = function(l, d, o) {
|
|
1274
|
+
return F.u(l) ? this[d] : this.set(o, l);
|
|
1275
|
+
}, p.unix = function() {
|
|
1276
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
1277
|
+
}, p.valueOf = function() {
|
|
1278
|
+
return this.$d.getTime();
|
|
1279
|
+
}, p.startOf = function(l, d) {
|
|
1280
|
+
var o = this, s = !!F.u(d) || d, g = F.p(l), T = function(J, Y) {
|
|
1281
|
+
var Z = F.w(o.$u ? Date.UTC(o.$y, Y, J) : new Date(o.$y, Y, J), o);
|
|
1282
|
+
return s ? Z : Z.endOf(C);
|
|
1283
|
+
}, u = function(J, Y) {
|
|
1284
|
+
return F.w(o.toDate()[J].apply(o.toDate("s"), (s ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(Y)), o);
|
|
1285
|
+
}, y = this.$W, k = this.$M, z = this.$D, X = "set" + (this.$u ? "UTC" : "");
|
|
1286
|
+
switch (g) {
|
|
1287
|
+
case S:
|
|
1288
|
+
return s ? T(1, 0) : T(31, 11);
|
|
1289
|
+
case v:
|
|
1290
|
+
return s ? T(1, k) : T(0, k + 1);
|
|
1291
|
+
case O:
|
|
1292
|
+
var G = this.$locale().weekStart || 0, R = (y < G ? y + 7 : y) - G;
|
|
1293
|
+
return T(s ? z - R : z + (6 - R), k);
|
|
1294
|
+
case C:
|
|
1295
|
+
case N:
|
|
1296
|
+
return u(X + "Hours", 0);
|
|
1297
|
+
case m:
|
|
1298
|
+
return u(X + "Minutes", 1);
|
|
1299
|
+
case w:
|
|
1300
|
+
return u(X + "Seconds", 2);
|
|
1301
|
+
case f:
|
|
1302
|
+
return u(X + "Milliseconds", 3);
|
|
1303
|
+
default:
|
|
1304
|
+
return this.clone();
|
|
1305
|
+
}
|
|
1306
|
+
}, p.endOf = function(l) {
|
|
1307
|
+
return this.startOf(l, !1);
|
|
1308
|
+
}, p.$set = function(l, d) {
|
|
1309
|
+
var o, s = F.p(l), g = "set" + (this.$u ? "UTC" : ""), T = (o = {}, o[C] = g + "Date", o[N] = g + "Date", o[v] = g + "Month", o[S] = g + "FullYear", o[m] = g + "Hours", o[w] = g + "Minutes", o[f] = g + "Seconds", o[r] = g + "Milliseconds", o)[s], u = s === C ? this.$D + (d - this.$W) : d;
|
|
1310
|
+
if (s === v || s === S) {
|
|
1311
|
+
var y = this.clone().set(N, 1);
|
|
1312
|
+
y.$d[T](u), y.init(), this.$d = y.set(N, Math.min(this.$D, y.daysInMonth())).$d;
|
|
1313
|
+
} else T && this.$d[T](u);
|
|
1314
|
+
return this.init(), this;
|
|
1315
|
+
}, p.set = function(l, d) {
|
|
1316
|
+
return this.clone().$set(l, d);
|
|
1317
|
+
}, p.get = function(l) {
|
|
1318
|
+
return this[F.p(l)]();
|
|
1319
|
+
}, p.add = function(l, d) {
|
|
1320
|
+
var o, s = this;
|
|
1321
|
+
l = Number(l);
|
|
1322
|
+
var g = F.p(d), T = function(k) {
|
|
1323
|
+
var z = _(s);
|
|
1324
|
+
return F.w(z.date(z.date() + Math.round(k * l)), s);
|
|
1325
|
+
};
|
|
1326
|
+
if (g === v) return this.set(v, this.$M + l);
|
|
1327
|
+
if (g === S) return this.set(S, this.$y + l);
|
|
1328
|
+
if (g === C) return T(1);
|
|
1329
|
+
if (g === O) return T(7);
|
|
1330
|
+
var u = (o = {}, o[w] = i, o[m] = a, o[f] = t, o)[g] || 1, y = this.$d.getTime() + l * u;
|
|
1331
|
+
return F.w(y, this);
|
|
1332
|
+
}, p.subtract = function(l, d) {
|
|
1333
|
+
return this.add(-1 * l, d);
|
|
1334
|
+
}, p.format = function(l) {
|
|
1335
|
+
var d = this, o = this.$locale();
|
|
1336
|
+
if (!this.isValid()) return o.invalidDate || E;
|
|
1337
|
+
var s = l || "YYYY-MM-DDTHH:mm:ssZ", g = F.z(this), T = this.$H, u = this.$m, y = this.$M, k = o.weekdays, z = o.months, X = o.meridiem, G = function(Y, Z, ne, Fe) {
|
|
1338
|
+
return Y && (Y[Z] || Y(d, s)) || ne[Z].slice(0, Fe);
|
|
1339
|
+
}, R = function(Y) {
|
|
1340
|
+
return F.s(T % 12 || 12, Y, "0");
|
|
1341
|
+
}, J = X || function(Y, Z, ne) {
|
|
1342
|
+
var Fe = Y < 12 ? "AM" : "PM";
|
|
1343
|
+
return ne ? Fe.toLowerCase() : Fe;
|
|
1344
|
+
};
|
|
1345
|
+
return s.replace(V, (function(Y, Z) {
|
|
1346
|
+
return Z || (function(ne) {
|
|
1347
|
+
switch (ne) {
|
|
1348
|
+
case "YY":
|
|
1349
|
+
return String(d.$y).slice(-2);
|
|
1350
|
+
case "YYYY":
|
|
1351
|
+
return F.s(d.$y, 4, "0");
|
|
1352
|
+
case "M":
|
|
1353
|
+
return y + 1;
|
|
1354
|
+
case "MM":
|
|
1355
|
+
return F.s(y + 1, 2, "0");
|
|
1356
|
+
case "MMM":
|
|
1357
|
+
return G(o.monthsShort, y, z, 3);
|
|
1358
|
+
case "MMMM":
|
|
1359
|
+
return G(z, y);
|
|
1360
|
+
case "D":
|
|
1361
|
+
return d.$D;
|
|
1362
|
+
case "DD":
|
|
1363
|
+
return F.s(d.$D, 2, "0");
|
|
1364
|
+
case "d":
|
|
1365
|
+
return String(d.$W);
|
|
1366
|
+
case "dd":
|
|
1367
|
+
return G(o.weekdaysMin, d.$W, k, 2);
|
|
1368
|
+
case "ddd":
|
|
1369
|
+
return G(o.weekdaysShort, d.$W, k, 3);
|
|
1370
|
+
case "dddd":
|
|
1371
|
+
return k[d.$W];
|
|
1372
|
+
case "H":
|
|
1373
|
+
return String(T);
|
|
1374
|
+
case "HH":
|
|
1375
|
+
return F.s(T, 2, "0");
|
|
1376
|
+
case "h":
|
|
1377
|
+
return R(1);
|
|
1378
|
+
case "hh":
|
|
1379
|
+
return R(2);
|
|
1380
|
+
case "a":
|
|
1381
|
+
return J(T, u, !0);
|
|
1382
|
+
case "A":
|
|
1383
|
+
return J(T, u, !1);
|
|
1384
|
+
case "m":
|
|
1385
|
+
return String(u);
|
|
1386
|
+
case "mm":
|
|
1387
|
+
return F.s(u, 2, "0");
|
|
1388
|
+
case "s":
|
|
1389
|
+
return String(d.$s);
|
|
1390
|
+
case "ss":
|
|
1391
|
+
return F.s(d.$s, 2, "0");
|
|
1392
|
+
case "SSS":
|
|
1393
|
+
return F.s(d.$ms, 3, "0");
|
|
1394
|
+
case "Z":
|
|
1395
|
+
return g;
|
|
1396
|
+
}
|
|
1397
|
+
return null;
|
|
1398
|
+
})(Y) || g.replace(":", "");
|
|
1399
|
+
}));
|
|
1400
|
+
}, p.utcOffset = function() {
|
|
1401
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1402
|
+
}, p.diff = function(l, d, o) {
|
|
1403
|
+
var s, g = this, T = F.p(d), u = _(l), y = (u.utcOffset() - this.utcOffset()) * i, k = this - u, z = function() {
|
|
1404
|
+
return F.m(g, u);
|
|
1405
|
+
};
|
|
1406
|
+
switch (T) {
|
|
1407
|
+
case S:
|
|
1408
|
+
s = z() / 12;
|
|
1409
|
+
break;
|
|
1410
|
+
case v:
|
|
1411
|
+
s = z();
|
|
1412
|
+
break;
|
|
1413
|
+
case P:
|
|
1414
|
+
s = z() / 3;
|
|
1415
|
+
break;
|
|
1416
|
+
case O:
|
|
1417
|
+
s = (k - y) / 6048e5;
|
|
1418
|
+
break;
|
|
1419
|
+
case C:
|
|
1420
|
+
s = (k - y) / 864e5;
|
|
1421
|
+
break;
|
|
1422
|
+
case m:
|
|
1423
|
+
s = k / a;
|
|
1424
|
+
break;
|
|
1425
|
+
case w:
|
|
1426
|
+
s = k / i;
|
|
1427
|
+
break;
|
|
1428
|
+
case f:
|
|
1429
|
+
s = k / t;
|
|
1430
|
+
break;
|
|
1431
|
+
default:
|
|
1432
|
+
s = k;
|
|
1433
|
+
}
|
|
1434
|
+
return o ? s : F.a(s);
|
|
1435
|
+
}, p.daysInMonth = function() {
|
|
1436
|
+
return this.endOf(v).$D;
|
|
1437
|
+
}, p.$locale = function() {
|
|
1438
|
+
return H[this.$L];
|
|
1439
|
+
}, p.locale = function(l, d) {
|
|
1440
|
+
if (!l) return this.$L;
|
|
1441
|
+
var o = this.clone(), s = I(l, d, !0);
|
|
1442
|
+
return s && (o.$L = s), o;
|
|
1443
|
+
}, p.clone = function() {
|
|
1444
|
+
return F.w(this.$d, this);
|
|
1445
|
+
}, p.toDate = function() {
|
|
1446
|
+
return new Date(this.valueOf());
|
|
1447
|
+
}, p.toJSON = function() {
|
|
1448
|
+
return this.isValid() ? this.toISOString() : null;
|
|
1449
|
+
}, p.toISOString = function() {
|
|
1450
|
+
return this.$d.toISOString();
|
|
1451
|
+
}, p.toString = function() {
|
|
1452
|
+
return this.$d.toUTCString();
|
|
1453
|
+
}, c;
|
|
1454
|
+
})(), j = M.prototype;
|
|
1455
|
+
return _.prototype = j, [["$ms", r], ["$s", f], ["$m", w], ["$H", m], ["$W", C], ["$M", v], ["$y", S], ["$D", N]].forEach((function(c) {
|
|
1456
|
+
j[c[1]] = function(p) {
|
|
1457
|
+
return this.$g(p, c[0], c[1]);
|
|
1458
|
+
};
|
|
1459
|
+
})), _.extend = function(c, p) {
|
|
1460
|
+
return c.$i || (c(p, M, _), c.$i = !0), _;
|
|
1461
|
+
}, _.locale = I, _.isDayjs = x, _.unix = function(c) {
|
|
1462
|
+
return _(1e3 * c);
|
|
1463
|
+
}, _.en = H[Q], _.Ls = H, _.p = {}, _;
|
|
1464
|
+
}));
|
|
1465
|
+
})(qe)), qe.exports;
|
|
1466
|
+
}
|
|
1467
|
+
var Hi = Ui();
|
|
1468
|
+
const we = /* @__PURE__ */ dt(Hi);
|
|
1469
|
+
var Ue = { exports: {} }, zi = Ue.exports, xt;
|
|
1470
|
+
function Qi() {
|
|
1471
|
+
return xt || (xt = 1, (function(n, e) {
|
|
1472
|
+
(function(t, i) {
|
|
1473
|
+
n.exports = i();
|
|
1474
|
+
})(zi, (function() {
|
|
1475
|
+
var t = "week", i = "year";
|
|
1476
|
+
return function(a, r, f) {
|
|
1477
|
+
var w = r.prototype;
|
|
1478
|
+
w.week = function(m) {
|
|
1479
|
+
if (m === void 0 && (m = null), m !== null) return this.add(7 * (m - this.week()), "day");
|
|
1480
|
+
var C = this.$locale().yearStart || 1;
|
|
1481
|
+
if (this.month() === 11 && this.date() > 25) {
|
|
1482
|
+
var O = f(this).startOf(i).add(1, i).date(C), v = f(this).endOf(t);
|
|
1483
|
+
if (O.isBefore(v)) return 1;
|
|
1484
|
+
}
|
|
1485
|
+
var P = f(this).startOf(i).date(C).startOf(t).subtract(1, "millisecond"), S = this.diff(P, t, !0);
|
|
1486
|
+
return S < 0 ? f(this).startOf("week").week() : Math.ceil(S);
|
|
1487
|
+
}, w.weeks = function(m) {
|
|
1488
|
+
return m === void 0 && (m = null), this.week(m);
|
|
1489
|
+
};
|
|
1490
|
+
};
|
|
1491
|
+
}));
|
|
1492
|
+
})(Ue)), Ue.exports;
|
|
1493
|
+
}
|
|
1494
|
+
var Ki = Qi();
|
|
1495
|
+
const Zi = /* @__PURE__ */ dt(Ki);
|
|
1496
|
+
var He = { exports: {} }, Gi = He.exports, Ot;
|
|
1497
|
+
function Xi() {
|
|
1498
|
+
return Ot || (Ot = 1, (function(n, e) {
|
|
1499
|
+
(function(t, i) {
|
|
1500
|
+
n.exports = i();
|
|
1501
|
+
})(Gi, (function() {
|
|
1502
|
+
var t = "month", i = "quarter";
|
|
1503
|
+
return function(a, r) {
|
|
1504
|
+
var f = r.prototype;
|
|
1505
|
+
f.quarter = function(C) {
|
|
1506
|
+
return this.$utils().u(C) ? Math.ceil((this.month() + 1) / 3) : this.month(this.month() % 3 + 3 * (C - 1));
|
|
1507
|
+
};
|
|
1508
|
+
var w = f.add;
|
|
1509
|
+
f.add = function(C, O) {
|
|
1510
|
+
return C = Number(C), this.$utils().p(O) === i ? this.add(3 * C, t) : w.bind(this)(C, O);
|
|
1511
|
+
};
|
|
1512
|
+
var m = f.startOf;
|
|
1513
|
+
f.startOf = function(C, O) {
|
|
1514
|
+
var v = this.$utils(), P = !!v.u(O) || O;
|
|
1515
|
+
if (v.p(C) === i) {
|
|
1516
|
+
var S = this.quarter() - 1;
|
|
1517
|
+
return P ? this.month(3 * S).startOf(t).startOf("day") : this.month(3 * S + 2).endOf(t).endOf("day");
|
|
1518
|
+
}
|
|
1519
|
+
return m.bind(this)(C, O);
|
|
1520
|
+
};
|
|
1521
|
+
};
|
|
1522
|
+
}));
|
|
1523
|
+
})(He)), He.exports;
|
|
1524
|
+
}
|
|
1525
|
+
var el = Xi();
|
|
1526
|
+
const tl = /* @__PURE__ */ dt(el);
|
|
1527
|
+
we.extend(Zi);
|
|
1528
|
+
we.extend(tl);
|
|
1529
|
+
const Yt = Object.keys(Nt), nl = Yt.join(","), il = Yt.map((n) => Nt[n]), qt = /#{([^}]+)?}/g, Ut = /{{([^}]+)?}}/g, Ve = /\${([^}]+)?}/g, Ht = { ADD: "add" };
|
|
1530
|
+
function it(n, e, t) {
|
|
1531
|
+
if (ft(e.defVal)) {
|
|
1532
|
+
const i = { field: n, type: e.type, value: e.defVal, view: e.view, fieldExtendJson: e.fieldExtendJson }, a = t.findIndex((r) => r.field === n);
|
|
1533
|
+
a === -1 ? t.push(i) : t[a] = i;
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
function ll(n, e) {
|
|
1537
|
+
ft(n.fieldDefaultValue) && e.push({ field: n.key, type: n.type, value: n.fieldDefaultValue });
|
|
1538
|
+
}
|
|
1539
|
+
function at(n, e, t) {
|
|
1540
|
+
return K(this, null, function* () {
|
|
1541
|
+
if (Array.isArray(n) && n.length > 0) {
|
|
1542
|
+
let i = {};
|
|
1543
|
+
for (let a of n) {
|
|
1544
|
+
let { value: r, type: f, field: w } = a;
|
|
1545
|
+
r = yield zt(r, Ht.ADD, t || {}), f === "number" && r && (r = Number.parseFloat(r)), r = sl(a, r), i[w] = r;
|
|
1546
|
+
}
|
|
1547
|
+
e(i);
|
|
1548
|
+
}
|
|
1549
|
+
});
|
|
1550
|
+
}
|
|
1551
|
+
function sl(n, e) {
|
|
1552
|
+
const { type: t, field: i, view: a, fieldExtendJson: r } = n;
|
|
1553
|
+
if (a == "date" && r) {
|
|
1554
|
+
const f = JSON.parse(r), { picker: w } = f;
|
|
1555
|
+
if (w && w != "default" && e) {
|
|
1556
|
+
let m;
|
|
1557
|
+
try {
|
|
1558
|
+
if (w === "year") {
|
|
1559
|
+
const O = e.split("-")[0];
|
|
1560
|
+
m = we().year(O).format("YYYY-MM-DD");
|
|
1561
|
+
}
|
|
1562
|
+
if (w === "month") {
|
|
1563
|
+
const C = e.split("-"), O = C[0], v = +C[1] + 1;
|
|
1564
|
+
m = we().year(O).month(v).format("YYYY-MM-DD");
|
|
1565
|
+
}
|
|
1566
|
+
if (w === "week") {
|
|
1567
|
+
const C = e.split("-"), O = C[0], v = C[1].match(/^(\d+)周$/)[1];
|
|
1568
|
+
m = we().year(O).week(v).format("YYYY-MM-DD");
|
|
1569
|
+
}
|
|
1570
|
+
if (w === "quarter") {
|
|
1571
|
+
const C = e.split("-"), O = C[0], v = C[1].match(/^[Qq](\d)$/)[1];
|
|
1572
|
+
m = we().year(O).quarter(v).format("YYYY-MM-DD");
|
|
1573
|
+
}
|
|
1574
|
+
} catch (C) {
|
|
1575
|
+
m = e;
|
|
1576
|
+
}
|
|
1577
|
+
return m;
|
|
1578
|
+
}
|
|
1579
|
+
return e;
|
|
1580
|
+
}
|
|
1581
|
+
return e;
|
|
1582
|
+
}
|
|
1583
|
+
function Ks(n, e, t) {
|
|
1584
|
+
return K(this, null, function* () {
|
|
1585
|
+
let { defVal: i, type: a } = e;
|
|
1586
|
+
if (ft(i)) {
|
|
1587
|
+
let r = yield zt(i, Ht.ADD, {});
|
|
1588
|
+
if (a === "number" && r)
|
|
1589
|
+
if (e.mode == "group" && typeof r == "string" && r.indexOf(",") != -1) {
|
|
1590
|
+
const f = r.split(",");
|
|
1591
|
+
r = [], f[0] && r.push(Number.parseFloat(f[0])), f[1] && r.push(Number.parseFloat(f[1]));
|
|
1592
|
+
} else
|
|
1593
|
+
r = Number.parseFloat(r);
|
|
1594
|
+
t[n] = r;
|
|
1595
|
+
}
|
|
1596
|
+
});
|
|
1597
|
+
}
|
|
1598
|
+
function ft(n) {
|
|
1599
|
+
return !!(n || n === 0);
|
|
1600
|
+
}
|
|
1601
|
+
function zt(n, e, t) {
|
|
1602
|
+
return K(this, null, function* () {
|
|
1603
|
+
if (n != null && Qt(n)) {
|
|
1604
|
+
let i = yield rl(n, e, t);
|
|
1605
|
+
if (i != null)
|
|
1606
|
+
return i;
|
|
1607
|
+
}
|
|
1608
|
+
return n;
|
|
1609
|
+
});
|
|
1610
|
+
}
|
|
1611
|
+
function Qt(n) {
|
|
1612
|
+
let e = 0, t = 0, i = 0;
|
|
1613
|
+
if (n.replace(Ve, () => i++), i > 1)
|
|
1614
|
+
return !1;
|
|
1615
|
+
n.replace(qt, () => e++), n.replace(Ut, () => t++);
|
|
1616
|
+
let a = e + t;
|
|
1617
|
+
return !(i > 0 && a > 0);
|
|
1618
|
+
}
|
|
1619
|
+
function Kt(n, e) {
|
|
1620
|
+
let t = /* @__PURE__ */ new Map();
|
|
1621
|
+
return n.replace(e, function(i, a) {
|
|
1622
|
+
return t.set(i, a.trim()), i;
|
|
1623
|
+
}), t;
|
|
1624
|
+
}
|
|
1625
|
+
function rl(n, e, t) {
|
|
1626
|
+
return K(this, null, function* () {
|
|
1627
|
+
return Ve.test(n) ? yield lt(n, Ve, cl, [t]) : (n = yield lt(n, qt, ol), n = yield lt(n, Ut, ul), n);
|
|
1628
|
+
});
|
|
1629
|
+
}
|
|
1630
|
+
function lt(a, r, f) {
|
|
1631
|
+
return K(this, arguments, function* (n, e, t, i = []) {
|
|
1632
|
+
let w = Kt(n, e);
|
|
1633
|
+
for (let m of w.keys()) {
|
|
1634
|
+
let C = w.get(m), O = yield t.apply(null, [C, m, ...i]);
|
|
1635
|
+
if (m === n)
|
|
1636
|
+
return O;
|
|
1637
|
+
n = Un(n, m, O);
|
|
1638
|
+
}
|
|
1639
|
+
return n;
|
|
1640
|
+
});
|
|
1641
|
+
}
|
|
1642
|
+
function ol(n, e) {
|
|
1643
|
+
return K(this, null, function* () {
|
|
1644
|
+
switch (n) {
|
|
1645
|
+
case "date":
|
|
1646
|
+
return we().format("YYYY-MM-DD");
|
|
1647
|
+
case "time":
|
|
1648
|
+
return we().format("HH:mm:ss");
|
|
1649
|
+
case "datetime":
|
|
1650
|
+
return we().format("YYYY-MM-DD HH:mm:ss");
|
|
1651
|
+
default:
|
|
1652
|
+
let t = al(n);
|
|
1653
|
+
return t != null ? t : e;
|
|
1654
|
+
}
|
|
1655
|
+
});
|
|
1656
|
+
}
|
|
1657
|
+
function al(n) {
|
|
1658
|
+
let t = qn().getUserInfo;
|
|
1659
|
+
if (t)
|
|
1660
|
+
switch (n) {
|
|
1661
|
+
case "sysUserId":
|
|
1662
|
+
return t.id;
|
|
1663
|
+
// 当前登录用户登录账号
|
|
1664
|
+
case "sysUserCode":
|
|
1665
|
+
case "sys_user_code":
|
|
1666
|
+
return t.username;
|
|
1667
|
+
// 当前登录用户真实名称
|
|
1668
|
+
case "sysUserName":
|
|
1669
|
+
return t.realname;
|
|
1670
|
+
// 当前登录用户部门编号
|
|
1671
|
+
case "sysOrgCode":
|
|
1672
|
+
case "sys_org_code":
|
|
1673
|
+
return t.orgCode;
|
|
1674
|
+
}
|
|
1675
|
+
return null;
|
|
1676
|
+
}
|
|
1677
|
+
function ul(n, e) {
|
|
1678
|
+
return K(this, null, function* () {
|
|
1679
|
+
let t = ct(`(function (${nl}){ return ${n} })`);
|
|
1680
|
+
try {
|
|
1681
|
+
return t.apply(null, il);
|
|
1682
|
+
} catch (i) {
|
|
1683
|
+
return e;
|
|
1684
|
+
}
|
|
1685
|
+
});
|
|
1686
|
+
}
|
|
1687
|
+
function cl(n, e, t) {
|
|
1688
|
+
return K(this, null, function* () {
|
|
1689
|
+
let i = {};
|
|
1690
|
+
typeof t == "function" ? i = t() : t && (i = ce({}, t)), n = Zt(n).exp;
|
|
1691
|
+
let a = `/sys/fillRule/executeRuleByCode/${n}`, { success: r, message: f, result: w } = yield ge.put({ url: a, params: i }, { isTransformResponse: !1 });
|
|
1692
|
+
return r ? w : e;
|
|
1693
|
+
});
|
|
1694
|
+
}
|
|
1695
|
+
function Zt(n) {
|
|
1696
|
+
let e = n.split("?");
|
|
1697
|
+
if (e.length > 1) {
|
|
1698
|
+
let t = "", i = [], r = e[1].split("&");
|
|
1699
|
+
return r.forEach((f, w) => {
|
|
1700
|
+
let [m, C] = f.split("=");
|
|
1701
|
+
C = C.trim(), m === "onl_watch" ? i = C.split(",") : (t += `${m}=${C}`, w < r.length - 1 && (t += "&"));
|
|
1702
|
+
}), {
|
|
1703
|
+
exp: e[0] + (t === "" ? "" : "?" + t),
|
|
1704
|
+
watchFields: i
|
|
1705
|
+
};
|
|
1706
|
+
}
|
|
1707
|
+
return { exp: n, watchFields: [] };
|
|
1708
|
+
}
|
|
1709
|
+
function Zs(n) {
|
|
1710
|
+
const e = /* @__PURE__ */ new Map();
|
|
1711
|
+
if (Array.isArray(n) && n.length > 0)
|
|
1712
|
+
for (let t of n) {
|
|
1713
|
+
let { value: i, field: a } = t;
|
|
1714
|
+
if (!(i == null || i == "") && Qt(i) && Ve.test(i)) {
|
|
1715
|
+
let r = Kt(i, Ve);
|
|
1716
|
+
for (let f of r.keys()) {
|
|
1717
|
+
let w = r.get(f);
|
|
1718
|
+
const { watchFields: m } = Zt(w);
|
|
1719
|
+
for (const C of m) {
|
|
1720
|
+
let O = e.get(C);
|
|
1721
|
+
Array.isArray(O) || (O = [], e.set(C, O)), !O.includes(a) && O.push(a);
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
return e;
|
|
1727
|
+
}
|
|
1728
|
+
const pt = "link_down", dl = "link_table_field", fl = "link_table";
|
|
1729
|
+
function Gt(n, e) {
|
|
1730
|
+
us();
|
|
1731
|
+
const t = n.modalClass, i = D([]), a = D(""), r = D({}), f = Se({}), w = D(!1), m = D([]), C = D({}), O = {}, v = D([]), P = Se({}), S = D("");
|
|
1732
|
+
S.value = { sm: 24, xs: 24, md: 12, lg: 12, xl: 12, xxl: 12 };
|
|
1733
|
+
const N = D({ xs: { span: 24 }, sm: { span: 4 }, md: { span: 4 }, lg: { span: 4 }, xl: { span: 4 }, xxl: { span: 4 } }), E = D(null), U = D(94);
|
|
1734
|
+
function V(x, I, _, F = {}) {
|
|
1735
|
+
var T;
|
|
1736
|
+
hl(P), P[a.value] = [];
|
|
1737
|
+
let M = [], j = [], c = [], p = {}, l = {};
|
|
1738
|
+
Object.keys(x).map((u) => {
|
|
1739
|
+
var k, z, X;
|
|
1740
|
+
const y = x[u];
|
|
1741
|
+
if (y.view == "tab") {
|
|
1742
|
+
w.value = !0, P[u] = [];
|
|
1743
|
+
let G = {
|
|
1744
|
+
key: u,
|
|
1745
|
+
// 这个foreignKey是主表的字段
|
|
1746
|
+
foreignKey: y.foreignKey,
|
|
1747
|
+
describe: y.describe,
|
|
1748
|
+
relationType: y.relationType,
|
|
1749
|
+
requiredFields: y.required || [],
|
|
1750
|
+
order: y.order,
|
|
1751
|
+
id: y.id
|
|
1752
|
+
};
|
|
1753
|
+
y.relationType == 1 ? (O[u] = D(null), G.properties = y.properties) : (L(y), O[u] = D(), G.columns = y.columns, p[u] = []), M.push(G), bl(u, y);
|
|
1754
|
+
} else if (it(u, y, P[a.value]), y.view === pt) {
|
|
1755
|
+
let G = ml(y, u);
|
|
1756
|
+
for (let R of G) {
|
|
1757
|
+
const J = R.key == u ? y : (k = y.others) == null ? void 0 : k.find((ne) => ne.field === R.key);
|
|
1758
|
+
J && it(R.key, J, P[a.value]), f[R.key] = !0, f[R.key + "_load"] = !0, q(F, R);
|
|
1759
|
+
let Y = nt.createFormSchema(R.key, R);
|
|
1760
|
+
f[R.key + "_disabled"] = (z = Y.disabled) != null ? z : !1, _ && Y.setOnlyValidateFun(_), Y.isRequired(I), Y.setFormRef(e), Y.handleWidgetAttr(y);
|
|
1761
|
+
let Z = Pt(j, R.key);
|
|
1762
|
+
Z == -1 ? j.push(Y) : j[Z] = Y;
|
|
1763
|
+
}
|
|
1764
|
+
} else if (it(u, y, P[a.value]), f[u] = !0, f[u + "_load"] = !0, Pt(j, u) == -1) {
|
|
1765
|
+
q(F, y);
|
|
1766
|
+
let R = nt.createFormSchema(u, y);
|
|
1767
|
+
if (f[u + "_disabled"] = (X = R.disabled) != null ? X : !1, _ && R.setOnlyValidateFun(_), R.isRequired(I), R.setFormRef(e), j.push(R), c.push(...R.getRelatedHideFields()), y.view === dl) {
|
|
1768
|
+
let J = R.getLinkFieldInfo();
|
|
1769
|
+
J && (l[J[0]] ? l[J[0]].push(J[1]) : l[J[0]] = [J[1]]);
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
}), j.sort(function(u, y) {
|
|
1773
|
+
return u.order - y.order;
|
|
1774
|
+
});
|
|
1775
|
+
const d = [];
|
|
1776
|
+
(() => {
|
|
1777
|
+
for (let u = 0, y = j.length; u < y; u++) {
|
|
1778
|
+
const k = j[u];
|
|
1779
|
+
A(k == null ? void 0 : k._data, "isOneRow") && (d.push(j.splice(u, 1)[0]), u--, y--);
|
|
1780
|
+
}
|
|
1781
|
+
})(), j = [...j, ...d];
|
|
1782
|
+
let o = [];
|
|
1783
|
+
o.push(nt.createIdField());
|
|
1784
|
+
let s = null, g = !1;
|
|
1785
|
+
for (let u of j) {
|
|
1786
|
+
const y = u.label.length;
|
|
1787
|
+
s ? (s.label.length < y || s.label.length === y && !s.required && u.required) && (s = u) : s = u, u.required && (g = !0), u.view && u.view == fl && l[u.field] && u.setOtherInfo(l[u.field]), c.indexOf(u.field) >= 0 && u.isHidden(), t && u.setCustomPopContainer(t);
|
|
1788
|
+
const k = u.getFormItemSchema();
|
|
1789
|
+
if (k.component === "JDictSelectTag" && ((T = u == null ? void 0 : u._data) == null ? void 0 : T.type) === "number" && (k.componentProps.stringToNumber = !0), n.formTemplate > 1 && A(u == null ? void 0 : u._data, "isOneRow")) {
|
|
1790
|
+
k.colProps = { span: 24 };
|
|
1791
|
+
const z = Q(), { labelCol: X = {} } = z, G = {}, R = {};
|
|
1792
|
+
Object.keys(X).forEach((J) => {
|
|
1793
|
+
if (["xs", "sm", "md", "lg", "xl", "xxl"].includes(J)) {
|
|
1794
|
+
const Y = X[J].span, Z = Math.round(Y / n.formTemplate);
|
|
1795
|
+
G[J] = { span: Z }, R[J] = { span: 24 - Z - 1 };
|
|
1796
|
+
}
|
|
1797
|
+
}), k.itemProps = { labelCol: G, wrapperCol: R };
|
|
1798
|
+
}
|
|
1799
|
+
k.component === "JPopup" && (k.changeEvent = "popUpChange"), o.push(k);
|
|
1800
|
+
}
|
|
1801
|
+
if (i.value = o, M.sort(function(u, y) {
|
|
1802
|
+
return u.order - y.order;
|
|
1803
|
+
}), M.forEach((u) => {
|
|
1804
|
+
const y = u.columns;
|
|
1805
|
+
u.columns && y.forEach((k) => {
|
|
1806
|
+
var z;
|
|
1807
|
+
if (u.relationType == 0 && ["popup", "popup_dict"].includes(k.type)) {
|
|
1808
|
+
let X = !0;
|
|
1809
|
+
k.fieldExtendJson && (X = JSON.parse(k.fieldExtendJson).popupMulti);
|
|
1810
|
+
const G = (z = k.props) != null ? z : {};
|
|
1811
|
+
k.props = ke(ce({}, G), { multi: X });
|
|
1812
|
+
}
|
|
1813
|
+
if (k.type === "date" && k.fieldExtendJson) {
|
|
1814
|
+
const X = JSON.parse(k.fieldExtendJson);
|
|
1815
|
+
X.picker && X.picker != "default" && Object.assign(k, { picker: X.picker });
|
|
1816
|
+
}
|
|
1817
|
+
});
|
|
1818
|
+
}), m.value = M, C.value = p, F.formLabelLengthShow && F.formLabelLength)
|
|
1819
|
+
U.value = F.formLabelLength * 14 + 10 + +`${g ? 13 : 0}`, E.value = null;
|
|
1820
|
+
else if (s) {
|
|
1821
|
+
let u = s.label.length;
|
|
1822
|
+
u = u > ot ? ot : u;
|
|
1823
|
+
const y = s.required, k = u * 14 + 10 + +`${y ? 13 : 0}`;
|
|
1824
|
+
U.value = k;
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
he(
|
|
1828
|
+
f,
|
|
1829
|
+
(x) => {
|
|
1830
|
+
let I = e.value, _ = [], F = be(x);
|
|
1831
|
+
Object.keys(F).map((M) => {
|
|
1832
|
+
if (!M.endsWith("_load")) {
|
|
1833
|
+
let j = {
|
|
1834
|
+
field: M,
|
|
1835
|
+
show: F[M]
|
|
1836
|
+
}, c = M + "_load";
|
|
1837
|
+
F.hasOwnProperty(c) && (j.ifShow = F[c]);
|
|
1838
|
+
let p = M + "_disabled";
|
|
1839
|
+
F.hasOwnProperty(p) && (j.dynamicDisabled = () => F[p]), _.push(j);
|
|
1840
|
+
}
|
|
1841
|
+
}), I && I.updateSchema(_);
|
|
1842
|
+
},
|
|
1843
|
+
{ immediate: !1 }
|
|
1844
|
+
);
|
|
1845
|
+
function L(x) {
|
|
1846
|
+
Xt(x, (I) => {
|
|
1847
|
+
ll(I, P[x.key]);
|
|
1848
|
+
});
|
|
1849
|
+
}
|
|
1850
|
+
function q(x, I, _ = "labelLength") {
|
|
1851
|
+
const { formLabelLengthShow: F, formLabelLength: M } = x;
|
|
1852
|
+
if (F && M) {
|
|
1853
|
+
let j = I == null ? void 0 : I.fieldExtendJson;
|
|
1854
|
+
j ? (j = JSON.parse(j), j[_] = M) : j = { [_]: M }, I.fieldExtendJson = JSON.stringify(j);
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
function A(x = {}, I) {
|
|
1858
|
+
let _ = x == null ? void 0 : x.fieldExtendJson;
|
|
1859
|
+
if (_)
|
|
1860
|
+
return _ = JSON.parse(_), _[I];
|
|
1861
|
+
}
|
|
1862
|
+
he(
|
|
1863
|
+
() => n.formTemplate,
|
|
1864
|
+
() => {
|
|
1865
|
+
const x = Q();
|
|
1866
|
+
S.value = x.baseColProps, N.value = x.labelCol, E.value = x.wrapperCol;
|
|
1867
|
+
},
|
|
1868
|
+
{ immediate: !0 }
|
|
1869
|
+
);
|
|
1870
|
+
function Q() {
|
|
1871
|
+
let x = n.formTemplate;
|
|
1872
|
+
return x == 2 ? {
|
|
1873
|
+
baseColProps: { sm: 24, xs: 24, md: 12, lg: 12, xl: 12, xxl: 12 }
|
|
1874
|
+
// update-begin--author:liaozhiyang---date:20230105---for:【QQYUN-7632】 label栅格改成labelwidth固宽
|
|
1875
|
+
// labelCol: { xs: { span: 24 }, sm: { span: 4 }, md: { span: 4 }, lg: { span: 4 }, xl: { span: 4 }, xxl: { span: 4 } },
|
|
1876
|
+
// wrapperCol: { xs: { span: 24 }, sm: { span: 19 }, md: { span: 19 }, lg: { span: 19 }, xl: { span: 19 }, xxl: { span: 19 } },
|
|
1877
|
+
// update-end--author:liaozhiyang---date:20230105---for:【QQYUN-7632】 label栅格改成labelwidth固宽
|
|
1878
|
+
} : x == 3 ? {
|
|
1879
|
+
baseColProps: { sm: 24, xs: 24, md: 8, lg: 8, xl: 8, xxl: 8 }
|
|
1880
|
+
// update-begin--author:liaozhiyang---date:20230105---for:【QQYUN-7632】 label栅格改成labelwidth固宽
|
|
1881
|
+
// labelCol: { xs: { span: 24 }, sm: { span: 6 }, md: { span: 6 }, lg: { span: 6 }, xl: { span: 6 }, xxl: { span: 6 } },
|
|
1882
|
+
// wrapperCol: { xs: { span: 24 }, sm: { span: 17 }, md: { span: 17 }, lg: { span: 17 }, xxl: { span: 17 } },
|
|
1883
|
+
// update-end--author:liaozhiyang---date:20230105---for:【QQYUN-7632】 label栅格改成labelwidth固宽
|
|
1884
|
+
} : x == 4 ? {
|
|
1885
|
+
baseColProps: { sm: 24, xs: 24, md: 6, lg: 6, xl: 6, xxl: 6 }
|
|
1886
|
+
// update-begin--author:liaozhiyang---date:20230105---for:【QQYUN-7632】 label栅格改成labelwidth固宽
|
|
1887
|
+
// labelCol: { xs: { span: 24 }, sm: { span: 4 }, md: { span: 4 }, lg: { span: 4 }, xl: { span: 4 }, xxl: { span: 4 } },
|
|
1888
|
+
// wrapperCol: { xs: { span: 24 }, sm: { span: 18 }, md: { span: 18 }, lg: { span: 18 }, xl: { span: 18 }, xxl: { span: 18 } },
|
|
1889
|
+
// update-end--author:liaozhiyang---date:20230105---for:【QQYUN-7632】 label栅格改成labelwidth固宽
|
|
1890
|
+
} : {
|
|
1891
|
+
baseColProps: { sm: 24, xs: 24, md: 24, lg: 24, xl: 24, xxl: 24 }
|
|
1892
|
+
// update-begin--author:liaozhiyang---date:20230105---for:【QQYUN-7632】 label栅格改成labelwidth固宽
|
|
1893
|
+
// labelCol: { xs: { span: 24 }, sm: { span: 4 }, md: { span: 4 }, lg: { span: 4 }, xl: { span: 4 }, xxl: { span: 4 } },
|
|
1894
|
+
// wrapperCol:{ xs: { span: 24 }, sm: { span: 18 }, md: { span: 18 }, lg: { span: 18 }, xl: { span: 18 }, xxl: { span: 18 } },
|
|
1895
|
+
// update-end--author:liaozhiyang---date:20230105---for:【QQYUN-7632】 label栅格改成labelwidth固宽
|
|
1896
|
+
};
|
|
1897
|
+
}
|
|
1898
|
+
function H(x, I) {
|
|
1899
|
+
return new Promise((_) => {
|
|
1900
|
+
I || _("");
|
|
1901
|
+
let M = {
|
|
1902
|
+
tableName: a.value.replace(/\$\d+/, ""),
|
|
1903
|
+
fieldName: x.field,
|
|
1904
|
+
fieldVal: I
|
|
1905
|
+
}, j = r.value;
|
|
1906
|
+
j.id && (M.dataId = j.id), Yn(M).then((c) => {
|
|
1907
|
+
c.success ? _("") : _(c.message);
|
|
1908
|
+
}).catch((c) => {
|
|
1909
|
+
_(c);
|
|
1910
|
+
});
|
|
1911
|
+
});
|
|
1912
|
+
}
|
|
1913
|
+
function ee(x) {
|
|
1914
|
+
return Object.keys(x).map((I) => {
|
|
1915
|
+
x[I] && x[I] instanceof Array && (x[I] = x[I].join(","));
|
|
1916
|
+
}), x;
|
|
1917
|
+
}
|
|
1918
|
+
return {
|
|
1919
|
+
formSchemas: i,
|
|
1920
|
+
defaultValueFields: P,
|
|
1921
|
+
tableName: a,
|
|
1922
|
+
dbData: r,
|
|
1923
|
+
checkOnlyFieldValue: H,
|
|
1924
|
+
createFormSchemas: V,
|
|
1925
|
+
fieldDisplayStatus: f,
|
|
1926
|
+
subTabInfo: m,
|
|
1927
|
+
hasSubTable: w,
|
|
1928
|
+
subDataSource: C,
|
|
1929
|
+
baseColProps: S,
|
|
1930
|
+
changeDataIfArray2String: ee,
|
|
1931
|
+
linkDownList: v,
|
|
1932
|
+
refMap: O,
|
|
1933
|
+
labelCol: N,
|
|
1934
|
+
wrapperCol: E,
|
|
1935
|
+
labelWidth: U
|
|
1936
|
+
};
|
|
1937
|
+
}
|
|
1938
|
+
function Xt(n, e) {
|
|
1939
|
+
const t = {
|
|
1940
|
+
inputNumber: "input-number",
|
|
1941
|
+
sel_depart: "depart-select",
|
|
1942
|
+
sel_user: "user-select",
|
|
1943
|
+
list_multi: "select-multiple",
|
|
1944
|
+
input_pop: "textarea",
|
|
1945
|
+
sel_search: "select-search",
|
|
1946
|
+
"select-dict-search": "selectDictSearch"
|
|
1947
|
+
};
|
|
1948
|
+
n.columns.forEach((r) => {
|
|
1949
|
+
r.type === "radio" ? r.type = "select" : t[r.type] ? r.type = t[r.type] : r.type === "popup" && i(r), r.type === "depart-select" && (r.checkStrictly = !0), r.type === "user-select" && a(r), r.type === "pca" && (r.width = "230px"), (r.width == 120 || r.width == "120px") && (r.type == "image" || r.type == "file") && (r.width = "130px"), r.width || (r.width = "200px"), e && e(r);
|
|
1950
|
+
});
|
|
1951
|
+
function i(r) {
|
|
1952
|
+
let { destFields: f, orgFields: w } = r, m = [];
|
|
1953
|
+
if (!(!f || f.length == 0)) {
|
|
1954
|
+
let C = f.split(","), O = w.split(",");
|
|
1955
|
+
for (let v = 0; v < C.length; v++)
|
|
1956
|
+
m.push({
|
|
1957
|
+
target: C[v],
|
|
1958
|
+
source: O[v]
|
|
1959
|
+
});
|
|
1960
|
+
}
|
|
1961
|
+
r.fieldConfig = m;
|
|
1962
|
+
}
|
|
1963
|
+
function a(r) {
|
|
1964
|
+
let f = r.fieldExtendJson, w = !1;
|
|
1965
|
+
if (f)
|
|
1966
|
+
try {
|
|
1967
|
+
JSON.parse(f).multiSelect === !1 && (w = !0);
|
|
1968
|
+
} catch (m) {
|
|
1969
|
+
}
|
|
1970
|
+
r.isRadioSelection = w;
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
function pl(n) {
|
|
1974
|
+
let e = {};
|
|
1975
|
+
const t = {
|
|
1976
|
+
addSubRows: "<m> 一对多子表,新增自定义行",
|
|
1977
|
+
changeOptions: "<m> 改变下拉框选项",
|
|
1978
|
+
clearSubRows: "<m> 清空一对多子表行",
|
|
1979
|
+
clearThenAddRows: "<m> 清空一对多子表行,然后新增自定义行",
|
|
1980
|
+
executeMainFillRule: "<m> 刷新主表的增值规制值",
|
|
1981
|
+
executeSubFillRule: "<m> 刷新子表的增值规制值",
|
|
1982
|
+
getFieldsValue: "<m> 获取表单控件的值",
|
|
1983
|
+
getSubTableInstance: "<m> 获取子表实例",
|
|
1984
|
+
isUpdate: "<p> 判断是否为编辑模式",
|
|
1985
|
+
loading: "<p> 页面加载状态",
|
|
1986
|
+
onlineFormRef: "<p> 当前表单ref对象",
|
|
1987
|
+
refMap: "<p> 子表ref对象map",
|
|
1988
|
+
setFieldsValue: "<m> 设置表单控件的值",
|
|
1989
|
+
sh: "<p> 表单控件的显示隐藏状态",
|
|
1990
|
+
subActiveKey: "<p> 子表激活tab,对应子表表名",
|
|
1991
|
+
subFormHeight: "<p> 一对一子表表单高度",
|
|
1992
|
+
submitFlowFlag: "<p> 是否提交流程状态",
|
|
1993
|
+
subTableHeight: "<p> 一对多子表表格高度",
|
|
1994
|
+
tableName: "<p> 当前表名",
|
|
1995
|
+
triggleChangeValues: "<m> 修改多个表单值",
|
|
1996
|
+
triggleChangeValue: "<m> 修改表单值",
|
|
1997
|
+
updateSchema: "<m> 修改表单控件配置",
|
|
1998
|
+
// update-begin--author:liaozhiyang---date:20240313---for:【QQYUN-8350】js增强根据主表限制子表options
|
|
1999
|
+
changeSubTableOptions: "<m> 改变一对多子表下拉框选项",
|
|
2000
|
+
changeSubFormbleOptions: "<m> 改变一对一子表下拉框选项",
|
|
2001
|
+
// update-end--author:liaozhiyang---date:20240313---for:【QQYUN-8350】js增强根据主表限制子表options
|
|
2002
|
+
// update-begin--author:liaozhiyang---date:20240321---for:【QQYUN-5806】js增强改变下拉搜索options
|
|
2003
|
+
changeRemoteOptions: "<m> 改变远程下拉框选项",
|
|
2004
|
+
// update-end--author:liaozhiyang---date:20240321---for:【QQYUN-5806】js增强改变下拉搜索options
|
|
2005
|
+
// update-begin--author:liaozhiyang---date:20240705---for:【TV360X-1754】js增强-提交表单并且发起流程
|
|
2006
|
+
submitFormAndFlow: "<m> 提交表单且发起流程"
|
|
2007
|
+
// update-end--author:liaozhiyang---date:20240705---for:【TV360X-1754】js增强-提交表单并且发起流程
|
|
2008
|
+
}, i = new Proxy(t, {
|
|
2009
|
+
get(v, P) {
|
|
2010
|
+
return Reflect.get(e, P);
|
|
2011
|
+
}
|
|
2012
|
+
});
|
|
2013
|
+
function a(v, P) {
|
|
2014
|
+
e[v] = P;
|
|
2015
|
+
}
|
|
2016
|
+
function r(v) {
|
|
2017
|
+
Object.keys(v).map((P) => {
|
|
2018
|
+
e[P] = v[P];
|
|
2019
|
+
});
|
|
2020
|
+
}
|
|
2021
|
+
a("$nextTick", Ne), a("addObject2Context", a);
|
|
2022
|
+
const f = (v, P) => pe(() => {
|
|
2023
|
+
const { buttonSwitch: S } = n, N = {
|
|
2024
|
+
enabled: !0,
|
|
2025
|
+
buttonIcon: P[0],
|
|
2026
|
+
buttonName: P[1]
|
|
2027
|
+
};
|
|
2028
|
+
if ((S == null ? void 0 : S[v]) === !1)
|
|
2029
|
+
return N.enabled = !1, N;
|
|
2030
|
+
const { cgBIBtnMap: E } = n;
|
|
2031
|
+
return E != null && E[v] ? E[v] : N;
|
|
2032
|
+
}), w = f("form_sub_add", ["ant-design:plus-outlined", "新增"]), m = f("form_sub_batch_delete", ["ant-design:minus-outlined", "删除"]), C = f("form_sub_open_add", ["ant-design:expand-alt-outlined", "新增"]), O = f("form_sub_open_edit", ["ant-design:form-outlined", ""]);
|
|
2033
|
+
return {
|
|
2034
|
+
onlineFormContext: i,
|
|
2035
|
+
addObject2Context: a,
|
|
2036
|
+
resetContext: r,
|
|
2037
|
+
getSubAddBtnCfg: w,
|
|
2038
|
+
getSubRemoveBtnCfg: m,
|
|
2039
|
+
getSubOpenAddBtnCfg: C,
|
|
2040
|
+
getSubOpenEditBtnCfg: O
|
|
2041
|
+
};
|
|
2042
|
+
}
|
|
2043
|
+
function ml(n, e) {
|
|
2044
|
+
const {
|
|
2045
|
+
config: { table: t, key: i, txt: a, linkField: r, idField: f, pidField: w, condition: m },
|
|
2046
|
+
others: C,
|
|
2047
|
+
order: O,
|
|
2048
|
+
title: v
|
|
2049
|
+
} = n;
|
|
2050
|
+
let P = {
|
|
2051
|
+
dictTable: t,
|
|
2052
|
+
dictText: a,
|
|
2053
|
+
dictCode: i,
|
|
2054
|
+
pidField: w,
|
|
2055
|
+
idField: f,
|
|
2056
|
+
view: pt,
|
|
2057
|
+
type: n.type
|
|
2058
|
+
}, S = [], N = ce({
|
|
2059
|
+
key: e,
|
|
2060
|
+
title: v,
|
|
2061
|
+
order: O,
|
|
2062
|
+
condition: m,
|
|
2063
|
+
origin: !0
|
|
2064
|
+
}, P);
|
|
2065
|
+
if (r && r.length > 0) {
|
|
2066
|
+
let E = r.split(",");
|
|
2067
|
+
N.next = E[0];
|
|
2068
|
+
for (let U = 0; U < E.length; U++)
|
|
2069
|
+
for (let V of C)
|
|
2070
|
+
if (V.field == E[U]) {
|
|
2071
|
+
let L = ce({
|
|
2072
|
+
key: V.field,
|
|
2073
|
+
title: V.title,
|
|
2074
|
+
order: V.order,
|
|
2075
|
+
origin: !1
|
|
2076
|
+
}, P);
|
|
2077
|
+
U + 1 < E.length && (L.next = E[U + 1]), S.push(L);
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
return S.push(N), S;
|
|
2081
|
+
}
|
|
2082
|
+
function Pt(n, e) {
|
|
2083
|
+
let t = -1;
|
|
2084
|
+
for (let i = 0; i < n.length; i++)
|
|
2085
|
+
if (n[i].field === e) {
|
|
2086
|
+
t = i;
|
|
2087
|
+
break;
|
|
2088
|
+
}
|
|
2089
|
+
return t;
|
|
2090
|
+
}
|
|
2091
|
+
function Ee(n) {
|
|
2092
|
+
return new Promise((e) => {
|
|
2093
|
+
(function t() {
|
|
2094
|
+
let i = n.value;
|
|
2095
|
+
i ? e(i) : setTimeout(() => {
|
|
2096
|
+
t();
|
|
2097
|
+
}, 100);
|
|
2098
|
+
})();
|
|
2099
|
+
});
|
|
2100
|
+
}
|
|
2101
|
+
function hl(n) {
|
|
2102
|
+
Object.keys(n).map((e) => {
|
|
2103
|
+
delete n[e];
|
|
2104
|
+
});
|
|
2105
|
+
}
|
|
2106
|
+
const gl = Kn();
|
|
2107
|
+
function bl(n, e) {
|
|
2108
|
+
let t = e.hideButtons, i = hi + n + ":";
|
|
2109
|
+
t || (t = []), gl.setOnlineSubTableAuth(i, t);
|
|
2110
|
+
}
|
|
2111
|
+
function Gs(n) {
|
|
2112
|
+
const e = D([]), t = {}, i = Se({}), a = D(!1), r = D([]), f = D({}), { getIsMobile: w } = Bt(), m = pe(() => {
|
|
2113
|
+
let S = n.formTemplate;
|
|
2114
|
+
return w.value ? 24 : S == "2" ? 12 : S == "3" ? 8 : S == "4" ? 6 : 24;
|
|
2115
|
+
});
|
|
2116
|
+
function C(S) {
|
|
2117
|
+
let N = [], E = [], U = {};
|
|
2118
|
+
Object.keys(S).map((V) => {
|
|
2119
|
+
const L = S[V];
|
|
2120
|
+
if (L.view == "tab") {
|
|
2121
|
+
a.value = !0;
|
|
2122
|
+
let q = {
|
|
2123
|
+
key: V,
|
|
2124
|
+
// 这个foreignKey是主表的字段
|
|
2125
|
+
foreignKey: L.foreignKey,
|
|
2126
|
+
describe: L.describe,
|
|
2127
|
+
relationType: L.relationType,
|
|
2128
|
+
requiredFields: L.required || [],
|
|
2129
|
+
order: L.order
|
|
2130
|
+
};
|
|
2131
|
+
L.relationType == 1 ? (t[V] = D(null), q.properties = L.properties) : (O(L), t[V] = D(), q.columns = L.columns, U[V] = [], i[V] = !1), N.push(q);
|
|
2132
|
+
} else if (L.view === pt) {
|
|
2133
|
+
let q = P(L, V);
|
|
2134
|
+
for (let A of q) {
|
|
2135
|
+
let Q = v(E, A.key), H = {
|
|
2136
|
+
field: A.key,
|
|
2137
|
+
label: A.title,
|
|
2138
|
+
view: A.view,
|
|
2139
|
+
order: A.order,
|
|
2140
|
+
dictTable: A.dictTable,
|
|
2141
|
+
linkField: A.linkField || ""
|
|
2142
|
+
};
|
|
2143
|
+
Q == -1 ? E.push(H) : E[Q] = H;
|
|
2144
|
+
}
|
|
2145
|
+
} else if (L.view != "hidden") {
|
|
2146
|
+
if (v(E, V) == -1) {
|
|
2147
|
+
let A = Object.assign(
|
|
2148
|
+
{
|
|
2149
|
+
field: V,
|
|
2150
|
+
label: L.title
|
|
2151
|
+
},
|
|
2152
|
+
Ke(L, ["view", "order", "fieldExtendJson", "dictTable", "dictText", "dictCode", "dict"])
|
|
2153
|
+
);
|
|
2154
|
+
if (L.view == "file" && (A.span = 24, A.isFile = !0), L.view == "image" && (A.span = 24, A.isImage = !0), L.view == "link_table" && L.fieldExtendJson)
|
|
2155
|
+
try {
|
|
2156
|
+
let Q = JSON.parse(L.fieldExtendJson);
|
|
2157
|
+
Q.showType != "select" && (A.isCard = !0), Q.multiSelect == !0 && (A.multi = !0);
|
|
2158
|
+
} catch (Q) {
|
|
2159
|
+
}
|
|
2160
|
+
(L.view == "umeditor" || L.view == "markdown") && (A.isHtml = !0, A.span = 24), E.push(A);
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
}), E.sort(function(V, L) {
|
|
2164
|
+
return V.order - L.order;
|
|
2165
|
+
}), N.sort(function(V, L) {
|
|
2166
|
+
return V.order - L.order;
|
|
2167
|
+
}), r.value = N;
|
|
2168
|
+
for (let V = 0; V < E.length; V++) {
|
|
2169
|
+
let L = E[V];
|
|
2170
|
+
if ((L.isFile === !0 || L.isImage === !0 || L.isHtml === !0) && V > 0) {
|
|
2171
|
+
let q = E[V - 1], A = q.span || m.value;
|
|
2172
|
+
q.span = A;
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
e.value = E, f.value = U;
|
|
2176
|
+
}
|
|
2177
|
+
function O(S) {
|
|
2178
|
+
Xt(S);
|
|
2179
|
+
}
|
|
2180
|
+
function v(S, N) {
|
|
2181
|
+
let E = -1;
|
|
2182
|
+
for (let U = 0; U < S.length; U++)
|
|
2183
|
+
if (S[U].field === N) {
|
|
2184
|
+
E = U;
|
|
2185
|
+
break;
|
|
2186
|
+
}
|
|
2187
|
+
return E;
|
|
2188
|
+
}
|
|
2189
|
+
function P(S, N) {
|
|
2190
|
+
let E = [];
|
|
2191
|
+
const {
|
|
2192
|
+
config: { table: U, key: V, txt: L, linkField: q },
|
|
2193
|
+
order: A,
|
|
2194
|
+
title: Q,
|
|
2195
|
+
others: H
|
|
2196
|
+
} = S;
|
|
2197
|
+
let x = {
|
|
2198
|
+
view: "link_down",
|
|
2199
|
+
order: A,
|
|
2200
|
+
title: Q,
|
|
2201
|
+
dictTable: JSON.stringify({
|
|
2202
|
+
table: U,
|
|
2203
|
+
key: V,
|
|
2204
|
+
txt: L
|
|
2205
|
+
})
|
|
2206
|
+
};
|
|
2207
|
+
if (E.push(Object.assign({}, { linkField: q, key: N }, x)), q) {
|
|
2208
|
+
let I = q.split(",");
|
|
2209
|
+
for (let _ of I) {
|
|
2210
|
+
let F = "";
|
|
2211
|
+
for (let M of H)
|
|
2212
|
+
M.field == _ && (F = M.title);
|
|
2213
|
+
E.push(Object.assign({}, { key: _ }, x, { title: F }));
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
return E;
|
|
2217
|
+
}
|
|
2218
|
+
return {
|
|
2219
|
+
detailFormSchemas: e,
|
|
2220
|
+
hasSubTable: a,
|
|
2221
|
+
subTabInfo: r,
|
|
2222
|
+
refMap: t,
|
|
2223
|
+
showStatus: i,
|
|
2224
|
+
createFormSchemas: C,
|
|
2225
|
+
formSpan: m,
|
|
2226
|
+
subDataSource: f
|
|
2227
|
+
};
|
|
2228
|
+
}
|
|
2229
|
+
function vl(n, e = !0) {
|
|
2230
|
+
let t = Se({});
|
|
2231
|
+
const i = (v, P) => ge.get({ url: v, params: P }, { isTransformResponse: !1 }), a = (v, P) => ge.post({ url: v, params: P }, { isTransformResponse: !1 }), r = (v, P) => ge.put({ url: v, params: P }, { isTransformResponse: !1 }), f = (v, P) => ge.delete({ url: v, params: P }, { isTransformResponse: !1 });
|
|
2232
|
+
e === !0 ? (n._getAction = i, n._postAction = a, n._putAction = r, n._deleteAction = f, n._useMessage = $e) : (n.addObject2Context("_getAction", i), n.addObject2Context("_postAction", a), n.addObject2Context("_putAction", r), n.addObject2Context("_deleteAction", f), n.addObject2Context("_useMessage", $e));
|
|
2233
|
+
function w(v) {
|
|
2234
|
+
if (v) {
|
|
2235
|
+
let P, S;
|
|
2236
|
+
try {
|
|
2237
|
+
P = ct(v), S = new P(i, a, f);
|
|
2238
|
+
} catch (N) {
|
|
2239
|
+
S = {};
|
|
2240
|
+
const { createMessage: E } = $e();
|
|
2241
|
+
E.warning(`js增强代码有语法错误,请检查代码~ ${N}`);
|
|
2242
|
+
}
|
|
2243
|
+
return S;
|
|
2244
|
+
} else
|
|
2245
|
+
return {};
|
|
2246
|
+
}
|
|
2247
|
+
function m(v, P) {
|
|
2248
|
+
t && t[P] && t[P](v);
|
|
2249
|
+
}
|
|
2250
|
+
function C(v, P) {
|
|
2251
|
+
return t && t.beforeSubmit ? t.beforeSubmit(v, P) : Promise.resolve();
|
|
2252
|
+
}
|
|
2253
|
+
function O(v, P) {
|
|
2254
|
+
return t && t.beforeDelete ? t.beforeDelete(v, P) : Promise.resolve();
|
|
2255
|
+
}
|
|
2256
|
+
return e === !0 && n && (n.beforeDelete = (v) => {
|
|
2257
|
+
const P = n.EnhanceJS;
|
|
2258
|
+
return P && P.beforeDelete ? P.beforeDelete(n, v) : Promise.resolve();
|
|
2259
|
+
}, n.beforeEdit = (v) => {
|
|
2260
|
+
const P = n.EnhanceJS;
|
|
2261
|
+
return P && P.beforeEdit ? P.beforeEdit(n, v) : Promise.resolve();
|
|
2262
|
+
}), {
|
|
2263
|
+
EnhanceJS: t,
|
|
2264
|
+
initCgEnhanceJs: w,
|
|
2265
|
+
customBeforeSubmit: C,
|
|
2266
|
+
beforeDelete: O,
|
|
2267
|
+
triggerJsFun: m
|
|
2268
|
+
};
|
|
2269
|
+
}
|
|
2270
|
+
const yl = "/online/cgform/api/subform", wl = {
|
|
2271
|
+
name: "OnlineSubForm",
|
|
2272
|
+
components: {
|
|
2273
|
+
BasicForm: jt,
|
|
2274
|
+
Loading: Wt
|
|
2275
|
+
},
|
|
2276
|
+
props: {
|
|
2277
|
+
properties: {
|
|
2278
|
+
type: Object,
|
|
2279
|
+
required: !0
|
|
2280
|
+
},
|
|
2281
|
+
mainId: {
|
|
2282
|
+
type: String,
|
|
2283
|
+
default: ""
|
|
2284
|
+
},
|
|
2285
|
+
table: {
|
|
2286
|
+
type: String,
|
|
2287
|
+
default: ""
|
|
2288
|
+
},
|
|
2289
|
+
formTemplate: {
|
|
2290
|
+
type: Number,
|
|
2291
|
+
default: 1
|
|
2292
|
+
},
|
|
2293
|
+
requiredFields: {
|
|
2294
|
+
type: Array,
|
|
2295
|
+
default: []
|
|
2296
|
+
},
|
|
2297
|
+
isUpdate: {
|
|
2298
|
+
type: Boolean,
|
|
2299
|
+
default: !1
|
|
2300
|
+
},
|
|
2301
|
+
disabled: {
|
|
2302
|
+
type: Boolean,
|
|
2303
|
+
default: !1
|
|
2304
|
+
}
|
|
2305
|
+
},
|
|
2306
|
+
emits: ["formChange"],
|
|
2307
|
+
setup(n, { emit: e }) {
|
|
2308
|
+
const t = D(null), i = D(!1), { createMessage: a } = $e(), {
|
|
2309
|
+
formSchemas: r,
|
|
2310
|
+
defaultValueFields: f,
|
|
2311
|
+
changeDataIfArray2String: w,
|
|
2312
|
+
tableName: m,
|
|
2313
|
+
dbData: C,
|
|
2314
|
+
checkOnlyFieldValue: O,
|
|
2315
|
+
fieldDisplayStatus: v,
|
|
2316
|
+
createFormSchemas: P,
|
|
2317
|
+
baseColProps: S,
|
|
2318
|
+
labelCol: N,
|
|
2319
|
+
wrapperCol: E,
|
|
2320
|
+
labelWidth: U
|
|
2321
|
+
} = Gt(n, t), [V, { setProps: L, validate: q, resetFields: A, setFieldsValue: Q, getFieldsValue: H, updateSchema: ee, scrollToField: x }] = Lt({
|
|
2322
|
+
schemas: r,
|
|
2323
|
+
showActionButtonGroup: !1,
|
|
2324
|
+
baseColProps: S,
|
|
2325
|
+
// update-begin--author:liaozhiyang---date:20240429---for:【QQYUN-7632】 label栅格改成labelwidth固宽
|
|
2326
|
+
labelWidth: U,
|
|
2327
|
+
// update-end--author:liaozhiyang---date:20240429---for:【QQYUN-7632】 label栅格改成labelwidth固宽
|
|
2328
|
+
// update-begin--author:liaozhiyang---date:20240105---for:【QQYUN-7499】多列风格富文本、markdown增加独占一行功能
|
|
2329
|
+
labelCol: N,
|
|
2330
|
+
wrapperCol: E
|
|
2331
|
+
// update-end--author:liaozhiyang---date:20240105---for:【QQYUN-7499】多列风格富文本、markdown增加独占一行功能
|
|
2332
|
+
});
|
|
2333
|
+
he(
|
|
2334
|
+
() => n.table,
|
|
2335
|
+
() => {
|
|
2336
|
+
m.value = n.table;
|
|
2337
|
+
},
|
|
2338
|
+
{ immediate: !0 }
|
|
2339
|
+
), he(
|
|
2340
|
+
() => n.properties,
|
|
2341
|
+
(o) => {
|
|
2342
|
+
i.value = !1, I(), P(n.properties, n.requiredFields, O), i.value = !0;
|
|
2343
|
+
},
|
|
2344
|
+
{ deep: !0, immediate: !0 }
|
|
2345
|
+
), he(
|
|
2346
|
+
() => n.mainId,
|
|
2347
|
+
(o) => {
|
|
2348
|
+
setTimeout(() => {
|
|
2349
|
+
F();
|
|
2350
|
+
}, 100);
|
|
2351
|
+
},
|
|
2352
|
+
{ immediate: !0 }
|
|
2353
|
+
), he(
|
|
2354
|
+
() => n.disabled,
|
|
2355
|
+
(o) => {
|
|
2356
|
+
L({ disabled: o });
|
|
2357
|
+
}
|
|
2358
|
+
);
|
|
2359
|
+
function I() {
|
|
2360
|
+
return K(this, null, function* () {
|
|
2361
|
+
let o = yield Ee(t);
|
|
2362
|
+
o.$formValueChange = (s, g) => {
|
|
2363
|
+
let T = { [s]: g };
|
|
2364
|
+
e("formChange", T);
|
|
2365
|
+
};
|
|
2366
|
+
});
|
|
2367
|
+
}
|
|
2368
|
+
function _() {
|
|
2369
|
+
if (Ce(n.isUpdate) === !1) {
|
|
2370
|
+
let o = be(f[m.value]);
|
|
2371
|
+
at(o, (s) => {
|
|
2372
|
+
Q(s);
|
|
2373
|
+
});
|
|
2374
|
+
}
|
|
2375
|
+
}
|
|
2376
|
+
function F() {
|
|
2377
|
+
return K(this, null, function* () {
|
|
2378
|
+
yield Ee(i), yield A(), _();
|
|
2379
|
+
const { table: o, mainId: s } = n;
|
|
2380
|
+
if (!o || !s)
|
|
2381
|
+
return;
|
|
2382
|
+
let g = yield M(o, s);
|
|
2383
|
+
C.value = g, yield Q(g);
|
|
2384
|
+
});
|
|
2385
|
+
}
|
|
2386
|
+
function M(o, s) {
|
|
2387
|
+
let g = `${yl}/${o}/${s}`;
|
|
2388
|
+
return new Promise((T, u) => {
|
|
2389
|
+
ge.get({ url: g }, { isTransformResponse: !1 }).then((y) => {
|
|
2390
|
+
y.success ? T(y.result) : u();
|
|
2391
|
+
});
|
|
2392
|
+
}).finally(() => {
|
|
2393
|
+
C.value = "";
|
|
2394
|
+
});
|
|
2395
|
+
}
|
|
2396
|
+
function j() {
|
|
2397
|
+
return new Promise((o, s) => {
|
|
2398
|
+
q().then(() => {
|
|
2399
|
+
let g = H();
|
|
2400
|
+
g = w(g), o(g);
|
|
2401
|
+
}).catch((g) => {
|
|
2402
|
+
g.errorFields && (g.scrollToField = () => g.errorFields[0] && x(g.errorFields[0].name, { behavior: "smooth", block: "center" })), s(g);
|
|
2403
|
+
});
|
|
2404
|
+
});
|
|
2405
|
+
}
|
|
2406
|
+
function c() {
|
|
2407
|
+
let o = H();
|
|
2408
|
+
return o.id || (o.id = "sub-change-temp-id"), {
|
|
2409
|
+
row: o,
|
|
2410
|
+
target: d
|
|
2411
|
+
};
|
|
2412
|
+
}
|
|
2413
|
+
function p(o) {
|
|
2414
|
+
Q(o);
|
|
2415
|
+
}
|
|
2416
|
+
function l() {
|
|
2417
|
+
let o = H(), s = be(f[m.value]);
|
|
2418
|
+
at(s, (g) => {
|
|
2419
|
+
Q(g);
|
|
2420
|
+
}, o);
|
|
2421
|
+
}
|
|
2422
|
+
const d = {
|
|
2423
|
+
onlineFormRef: t,
|
|
2424
|
+
baseColProps: S,
|
|
2425
|
+
formSchemas: r,
|
|
2426
|
+
registerForm: V,
|
|
2427
|
+
setFieldsValue: Q,
|
|
2428
|
+
getFieldsValue: H,
|
|
2429
|
+
getFormEvent: c,
|
|
2430
|
+
setValues: p,
|
|
2431
|
+
getAll: j,
|
|
2432
|
+
executeFillRule: l,
|
|
2433
|
+
sh: v,
|
|
2434
|
+
resetFields: A,
|
|
2435
|
+
updateSchema: ee
|
|
2436
|
+
};
|
|
2437
|
+
return d;
|
|
2438
|
+
}
|
|
2439
|
+
};
|
|
2440
|
+
function Cl(n, e, t, i, a, r) {
|
|
2441
|
+
const f = se("BasicForm");
|
|
2442
|
+
return ie(), De(f, {
|
|
2443
|
+
ref: "onlineFormRef",
|
|
2444
|
+
onRegister: n.registerForm
|
|
2445
|
+
}, null, 8, ["onRegister"]);
|
|
2446
|
+
}
|
|
2447
|
+
const en = /* @__PURE__ */ je(wl, [["render", Cl], ["__scopeId", "data-v-196bf574"]]), Xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2448
|
+
__proto__: null,
|
|
2449
|
+
default: en
|
|
2450
|
+
}, Symbol.toStringTag, { value: "Module" })), st = {
|
|
2451
|
+
optPre: "/online/cgform/api/form/",
|
|
2452
|
+
urlButtonAction: "/online/cgform/api/doButton"
|
|
2453
|
+
}, Sl = {
|
|
2454
|
+
name: "OnlinePopForm",
|
|
2455
|
+
components: {
|
|
2456
|
+
BasicForm: jt,
|
|
2457
|
+
Loading: Wt,
|
|
2458
|
+
OnlineSubForm: en,
|
|
2459
|
+
PrinterOutlined: Nn,
|
|
2460
|
+
DiffOutlined: An,
|
|
2461
|
+
FormOutlined: Ln
|
|
2462
|
+
},
|
|
2463
|
+
props: {
|
|
2464
|
+
id: {
|
|
2465
|
+
type: String,
|
|
2466
|
+
default: ""
|
|
2467
|
+
},
|
|
2468
|
+
formTemplate: {
|
|
2469
|
+
type: Number,
|
|
2470
|
+
default: 1
|
|
2471
|
+
},
|
|
2472
|
+
disabled: {
|
|
2473
|
+
type: Boolean,
|
|
2474
|
+
default: !1
|
|
2475
|
+
},
|
|
2476
|
+
isTree: {
|
|
2477
|
+
type: Boolean,
|
|
2478
|
+
default: !1
|
|
2479
|
+
},
|
|
2480
|
+
pidField: {
|
|
2481
|
+
type: String,
|
|
2482
|
+
default: ""
|
|
2483
|
+
},
|
|
2484
|
+
submitTip: {
|
|
2485
|
+
type: Boolean,
|
|
2486
|
+
default: !0
|
|
2487
|
+
},
|
|
2488
|
+
modalClass: {
|
|
2489
|
+
type: String,
|
|
2490
|
+
default: ""
|
|
2491
|
+
},
|
|
2492
|
+
//是否发送请求-即表单的保存/编辑请求,false则只将表单数据抛出去
|
|
2493
|
+
request: {
|
|
2494
|
+
type: Boolean,
|
|
2495
|
+
default: !0
|
|
2496
|
+
},
|
|
2497
|
+
// 是否是vxeTable上方按钮点击打开的表单数据
|
|
2498
|
+
isVxeTableData: {
|
|
2499
|
+
type: Boolean,
|
|
2500
|
+
default: !1
|
|
2501
|
+
}
|
|
2502
|
+
},
|
|
2503
|
+
emits: ["success", "rendered", "dataChange"],
|
|
2504
|
+
setup(n, { emit: e }) {
|
|
2505
|
+
const { createMessage: t } = $e(), [i, { openModal: a }] = Me(), r = D(""), f = D(null), w = D(!0), m = D(!1), C = D(1), O = D(!1), v = D(!1), P = Se({
|
|
2506
|
+
reportPrintShow: 0,
|
|
2507
|
+
reportPrintUrl: "",
|
|
2508
|
+
joinQuery: 0,
|
|
2509
|
+
modelFullscreen: 0,
|
|
2510
|
+
modalMinWidth: ""
|
|
2511
|
+
}), { onlineFormContext: S, resetContext: N } = pl(), {
|
|
2512
|
+
formSchemas: E,
|
|
2513
|
+
defaultValueFields: U,
|
|
2514
|
+
changeDataIfArray2String: V,
|
|
2515
|
+
tableName: L,
|
|
2516
|
+
dbData: q,
|
|
2517
|
+
checkOnlyFieldValue: A,
|
|
2518
|
+
hasSubTable: Q,
|
|
2519
|
+
subTabInfo: H,
|
|
2520
|
+
refMap: ee,
|
|
2521
|
+
subDataSource: x,
|
|
2522
|
+
baseColProps: I,
|
|
2523
|
+
createFormSchemas: _,
|
|
2524
|
+
fieldDisplayStatus: F,
|
|
2525
|
+
labelCol: M,
|
|
2526
|
+
wrapperCol: j,
|
|
2527
|
+
labelWidth: c
|
|
2528
|
+
} = Gt(n, f);
|
|
2529
|
+
let { EnhanceJS: p, initCgEnhanceJs: l } = vl(S, !1);
|
|
2530
|
+
const [d, { setProps: o, validate: s, resetFields: g, setFieldsValue: T, updateSchema: u, getFieldsValue: y, scrollToField: k }] = Lt({
|
|
2531
|
+
schemas: E,
|
|
2532
|
+
showActionButtonGroup: !1,
|
|
2533
|
+
baseColProps: I,
|
|
2534
|
+
// update-begin--author:liaozhiyang---date:20240329---for:【QQYUN-7872】online表单label较长优化
|
|
2535
|
+
labelWidth: c,
|
|
2536
|
+
// update-end--author:liaozhiyang---date:20240329---for:【QQYUN-7872】online表单label较长优化
|
|
2537
|
+
// update-begin--author:liaozhiyang---date:20240105---for:【QQYUN-7499】多列风格富文本、markdown增加独占一行功能
|
|
2538
|
+
labelCol: M,
|
|
2539
|
+
wrapperCol: j
|
|
2540
|
+
// update-end--author:liaozhiyang---date:20240105---for:【QQYUN-7499】多列风格富文本、markdown增加独占一行功能
|
|
2541
|
+
}), z = D(!1);
|
|
2542
|
+
function X() {
|
|
2543
|
+
let h = n.disabled;
|
|
2544
|
+
z.value = h, o({ disabled: h });
|
|
2545
|
+
}
|
|
2546
|
+
function G(h, b, $) {
|
|
2547
|
+
return K(this, null, function* () {
|
|
2548
|
+
yield g(), q.value = "";
|
|
2549
|
+
let W = Ce(h);
|
|
2550
|
+
v.value = W, W && (yield J(b)), yield Ne(() => {
|
|
2551
|
+
!W && $ && T($), R(), et("js", "loaded"), X();
|
|
2552
|
+
});
|
|
2553
|
+
});
|
|
2554
|
+
}
|
|
2555
|
+
function R() {
|
|
2556
|
+
if (Ce(v) === !1) {
|
|
2557
|
+
let h = be(U[L.value]);
|
|
2558
|
+
at(h, (b) => {
|
|
2559
|
+
T(b);
|
|
2560
|
+
});
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
function J(h) {
|
|
2564
|
+
return K(this, null, function* () {
|
|
2565
|
+
let b = yield Z(h.id);
|
|
2566
|
+
(!b || Object.keys(b).length == 0) && (b = ce({}, be(h))), q.value = Object.assign({}, b);
|
|
2567
|
+
let $ = Y.value, W = Ke(b, ...$);
|
|
2568
|
+
n.isVxeTableData === !0 && (W = Object.assign({}, W, h)), yield T(W);
|
|
2569
|
+
});
|
|
2570
|
+
}
|
|
2571
|
+
let Y = pe(() => {
|
|
2572
|
+
let h = E.value, b = [];
|
|
2573
|
+
for (let $ of h)
|
|
2574
|
+
b.push($.field);
|
|
2575
|
+
return b;
|
|
2576
|
+
});
|
|
2577
|
+
function Z(h) {
|
|
2578
|
+
let b = `${st.optPre}${n.id}/${h}`;
|
|
2579
|
+
return new Promise(($, W) => {
|
|
2580
|
+
ge.get({ url: b }, { isTransformResponse: !1 }).then((le) => {
|
|
2581
|
+
le.success ? $(le.result) : (W(), t.warning(le.message));
|
|
2582
|
+
}).catch(() => {
|
|
2583
|
+
W();
|
|
2584
|
+
});
|
|
2585
|
+
});
|
|
2586
|
+
}
|
|
2587
|
+
function ne(h) {
|
|
2588
|
+
return K(this, null, function* () {
|
|
2589
|
+
C.value = h.head.tableType, L.value = h.head.tableName, w.value = h.head.tableType == 1, Fe(h.head.extConfigJson), _(h.schema.properties, h.schema.required, A, P), p = l(h.enhanceJs), e("rendered", P);
|
|
2590
|
+
let b = yield Ee(f);
|
|
2591
|
+
b.$formValueChange = ($, W, le) => {
|
|
2592
|
+
mn($, W), le && T(le);
|
|
2593
|
+
};
|
|
2594
|
+
});
|
|
2595
|
+
}
|
|
2596
|
+
function Fe(h) {
|
|
2597
|
+
let b = { reportPrintShow: 0, reportPrintUrl: "", joinQuery: 0, modelFullscreen: 1, modalMinWidth: "", formLabelLength: null };
|
|
2598
|
+
h && (b = JSON.parse(h)), Object.keys(b).map(($) => {
|
|
2599
|
+
P[$] = b[$];
|
|
2600
|
+
});
|
|
2601
|
+
}
|
|
2602
|
+
function Xe() {
|
|
2603
|
+
w.value === !0 ? Ie() : B();
|
|
2604
|
+
}
|
|
2605
|
+
function B() {
|
|
2606
|
+
ae().then((h) => {
|
|
2607
|
+
ue(h);
|
|
2608
|
+
});
|
|
2609
|
+
}
|
|
2610
|
+
function ae() {
|
|
2611
|
+
let h = {};
|
|
2612
|
+
return new Promise((b, $) => {
|
|
2613
|
+
s().then(
|
|
2614
|
+
(W) => b(W),
|
|
2615
|
+
({ errorFields: W }) => {
|
|
2616
|
+
$({
|
|
2617
|
+
code: Ae,
|
|
2618
|
+
key: L.value,
|
|
2619
|
+
// 滚动到未通过校验的字段上
|
|
2620
|
+
scrollToField: () => W[0] && k(W[0].name, { behavior: "smooth", block: "center" })
|
|
2621
|
+
});
|
|
2622
|
+
}
|
|
2623
|
+
);
|
|
2624
|
+
}).then((b) => (Object.assign(h, V(b)), Re())).then((b) => (Object.assign(h, b), Promise.resolve(h))).catch((b) => ((b === Ae || (b == null ? void 0 : b.code) === Ae) && (t.warning("校验未通过"), b.key && (ve(b.key), b.scrollToField && setTimeout(() => b.scrollToField(), 150))), Promise.reject(null)));
|
|
2625
|
+
}
|
|
2626
|
+
function ve(h) {
|
|
2627
|
+
let b = H.value;
|
|
2628
|
+
for (let $ = 0; $ < b.length; $++)
|
|
2629
|
+
if (h == b[$].key) {
|
|
2630
|
+
Le.value = $ + "";
|
|
2631
|
+
break;
|
|
2632
|
+
}
|
|
2633
|
+
}
|
|
2634
|
+
function Re() {
|
|
2635
|
+
return new Promise((h, b) => K(null, null, function* () {
|
|
2636
|
+
let $ = {};
|
|
2637
|
+
try {
|
|
2638
|
+
let W = H.value;
|
|
2639
|
+
for (let le = 0; le < W.length; le++) {
|
|
2640
|
+
let ye = W[le].key, Te = ee[ye].value;
|
|
2641
|
+
if (Te instanceof Array && (Te = Te[0]), W[le].relationType == 1)
|
|
2642
|
+
try {
|
|
2643
|
+
let Je = yield Te.getAll();
|
|
2644
|
+
$[ye] = [], $[ye].push(Je);
|
|
2645
|
+
} catch (Je) {
|
|
2646
|
+
return b(ce({ code: Ae, key: ye }, Je));
|
|
2647
|
+
}
|
|
2648
|
+
else {
|
|
2649
|
+
if (yield Te.fullValidateTable())
|
|
2650
|
+
return b({ code: Ae, key: ye });
|
|
2651
|
+
$[ye] = Te.getTableData();
|
|
2652
|
+
}
|
|
2653
|
+
}
|
|
2654
|
+
} catch (W) {
|
|
2655
|
+
b(W);
|
|
2656
|
+
}
|
|
2657
|
+
h($);
|
|
2658
|
+
}));
|
|
2659
|
+
}
|
|
2660
|
+
function Ie() {
|
|
2661
|
+
return K(this, null, function* () {
|
|
2662
|
+
try {
|
|
2663
|
+
let h = yield s();
|
|
2664
|
+
h = Object.assign({}, q.value, h), h = V(h), m.value = !0, ue(h);
|
|
2665
|
+
} catch (h) {
|
|
2666
|
+
if (At(h)) {
|
|
2667
|
+
const b = h.errorFields;
|
|
2668
|
+
b != null && b.length && b[0].errors && (t.warning(b[0].errors[0]), k(b[0].name, { behavior: "smooth", block: "center" }));
|
|
2669
|
+
}
|
|
2670
|
+
} finally {
|
|
2671
|
+
m.value = !1;
|
|
2672
|
+
}
|
|
2673
|
+
});
|
|
2674
|
+
}
|
|
2675
|
+
function ue(h) {
|
|
2676
|
+
bn(vt, h).then(() => {
|
|
2677
|
+
Tn(h);
|
|
2678
|
+
}).catch((b) => {
|
|
2679
|
+
t.warning(b);
|
|
2680
|
+
});
|
|
2681
|
+
}
|
|
2682
|
+
function Be(h, b, $) {
|
|
2683
|
+
b && $ ? $.setValues ? $.setValues(h) : $.setValues([
|
|
2684
|
+
{
|
|
2685
|
+
rowKey: b,
|
|
2686
|
+
values: h
|
|
2687
|
+
}
|
|
2688
|
+
]) : T(h);
|
|
2689
|
+
}
|
|
2690
|
+
function We(h, b) {
|
|
2691
|
+
let $ = {};
|
|
2692
|
+
$[h] = b, T($);
|
|
2693
|
+
}
|
|
2694
|
+
const Le = D("0"), mt = D(300), ht = D(340);
|
|
2695
|
+
function an(h) {
|
|
2696
|
+
if (v.value === !0) {
|
|
2697
|
+
let b = q.value;
|
|
2698
|
+
return un(b, h);
|
|
2699
|
+
}
|
|
2700
|
+
return "";
|
|
2701
|
+
}
|
|
2702
|
+
function un(h, b) {
|
|
2703
|
+
if (h) {
|
|
2704
|
+
let $ = h[b];
|
|
2705
|
+
return !$ && $ !== 0 && ($ = h[b.toLowerCase()], !$ && $ !== 0 && ($ = h[b.toUpperCase()])), $;
|
|
2706
|
+
}
|
|
2707
|
+
return "";
|
|
2708
|
+
}
|
|
2709
|
+
function cn(h, b) {
|
|
2710
|
+
if (p && p[b + "_onlChange"]) {
|
|
2711
|
+
let $ = p[b + "_onlChange"](), W = Object.keys(h)[0];
|
|
2712
|
+
if ($[W]) {
|
|
2713
|
+
let le = ee[b].value;
|
|
2714
|
+
le instanceof Array && (le = le[0]);
|
|
2715
|
+
let ye = le.getFormEvent(), Te = ce({
|
|
2716
|
+
column: { key: W },
|
|
2717
|
+
value: h[W]
|
|
2718
|
+
}, ye);
|
|
2719
|
+
$[W].call(S, S, Te);
|
|
2720
|
+
}
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
function dn(h, b) {
|
|
2724
|
+
if (p && p[b + "_onlChange"]) {
|
|
2725
|
+
let $ = p[b + "_onlChange"](S);
|
|
2726
|
+
$[h.column.key] && $[h.column.key].call(S, S, h);
|
|
2727
|
+
}
|
|
2728
|
+
}
|
|
2729
|
+
function fn(h, b) {
|
|
2730
|
+
}
|
|
2731
|
+
function pn(h) {
|
|
2732
|
+
return "online_" + h + ":";
|
|
2733
|
+
}
|
|
2734
|
+
function mn(h, b) {
|
|
2735
|
+
return K(this, null, function* () {
|
|
2736
|
+
if (q.value[h] != b && e("dataChange", h), !p || !p.onlChange || !h)
|
|
2737
|
+
return !1;
|
|
2738
|
+
let W = p.onlChange();
|
|
2739
|
+
if (W[h]) {
|
|
2740
|
+
let ye = {
|
|
2741
|
+
row: yield y(),
|
|
2742
|
+
column: { key: h },
|
|
2743
|
+
value: b
|
|
2744
|
+
};
|
|
2745
|
+
W[h].call(S, S, ye);
|
|
2746
|
+
}
|
|
2747
|
+
});
|
|
2748
|
+
}
|
|
2749
|
+
function et(h, b) {
|
|
2750
|
+
if (h == "js")
|
|
2751
|
+
p && p[b] && p[b].call(S, S);
|
|
2752
|
+
else if (h == "action") {
|
|
2753
|
+
let $ = q.value, W = {
|
|
2754
|
+
formId: n.id,
|
|
2755
|
+
buttonCode: b,
|
|
2756
|
+
dataId: $.id,
|
|
2757
|
+
uiFormData: Object.assign({}, $)
|
|
2758
|
+
};
|
|
2759
|
+
ge.post(
|
|
2760
|
+
{
|
|
2761
|
+
url: `${st.urlButtonAction}`,
|
|
2762
|
+
params: W
|
|
2763
|
+
},
|
|
2764
|
+
{ isTransformResponse: !1 }
|
|
2765
|
+
).then((le) => {
|
|
2766
|
+
le.success ? t.success("处理完成!") : t.warning("处理失败!");
|
|
2767
|
+
});
|
|
2768
|
+
}
|
|
2769
|
+
}
|
|
2770
|
+
function gt(h) {
|
|
2771
|
+
let b = ee[h].value, $ = [...b.getNewDataWithId(), ...x.value[h]];
|
|
2772
|
+
if (!$ || $.length == 0)
|
|
2773
|
+
return !1;
|
|
2774
|
+
let W = [];
|
|
2775
|
+
for (let le of $)
|
|
2776
|
+
W.push(le.id);
|
|
2777
|
+
b.removeRowsById(W);
|
|
2778
|
+
}
|
|
2779
|
+
function bt(h, b) {
|
|
2780
|
+
if (!b)
|
|
2781
|
+
return !1;
|
|
2782
|
+
let $ = ee[h].value;
|
|
2783
|
+
typeof b == "object" ? $.addRows(b, !0) : t.error("添加子表数据,参数不识别!");
|
|
2784
|
+
}
|
|
2785
|
+
function hn(h, b) {
|
|
2786
|
+
gt(h), bt(h, b);
|
|
2787
|
+
}
|
|
2788
|
+
function gn(h, b) {
|
|
2789
|
+
!b && b.length <= 0 && (b = []), b.map(($) => {
|
|
2790
|
+
$.hasOwnProperty("label") || ($.label = $.text);
|
|
2791
|
+
}), u({
|
|
2792
|
+
field: h,
|
|
2793
|
+
componentProps: {
|
|
2794
|
+
options: b
|
|
2795
|
+
}
|
|
2796
|
+
});
|
|
2797
|
+
}
|
|
2798
|
+
function bn(h, b) {
|
|
2799
|
+
return p && p.beforeSubmit ? p.beforeSubmit(h, b) : Promise.resolve();
|
|
2800
|
+
}
|
|
2801
|
+
function vn(h, b) {
|
|
2802
|
+
let $ = be(F);
|
|
2803
|
+
h && h.length > 0 ? Object.keys($).map((W) => {
|
|
2804
|
+
!W.endsWith("_load") && h.indexOf(W) < 0 && (F[W] = !1);
|
|
2805
|
+
}) : b && b.length > 0 && Object.keys($).map((W) => {
|
|
2806
|
+
b.indexOf(W) >= 0 && (F[W] = !1);
|
|
2807
|
+
});
|
|
2808
|
+
}
|
|
2809
|
+
function yn(h) {
|
|
2810
|
+
return K(this, null, function* () {
|
|
2811
|
+
yield g(), q.value = "", v.value = !0, yield J(h), yield Ne(() => {
|
|
2812
|
+
et("js", "loaded");
|
|
2813
|
+
});
|
|
2814
|
+
});
|
|
2815
|
+
}
|
|
2816
|
+
function wn(h) {
|
|
2817
|
+
let b = ee[h].value;
|
|
2818
|
+
return b instanceof Array && (b = b[0]), b;
|
|
2819
|
+
}
|
|
2820
|
+
function Cn() {
|
|
2821
|
+
let h = P.reportPrintUrl, b = q.value.id, $ = Vt();
|
|
2822
|
+
Hn(h, b, $);
|
|
2823
|
+
}
|
|
2824
|
+
function Sn(h) {
|
|
2825
|
+
r.value = h.id, a(!0);
|
|
2826
|
+
}
|
|
2827
|
+
function Fn(h) {
|
|
2828
|
+
}
|
|
2829
|
+
function Tn(h) {
|
|
2830
|
+
if (Object.keys(h).map((b) => {
|
|
2831
|
+
Array.isArray(h[b]) && h[b].length == 0 && (h[b] = "");
|
|
2832
|
+
}), n.request == !1)
|
|
2833
|
+
e("success", h);
|
|
2834
|
+
else {
|
|
2835
|
+
let b = `${st.optPre}${n.id}?tabletype=${C.value}`;
|
|
2836
|
+
O.value === !0 && (h[fi] = 1);
|
|
2837
|
+
let $ = v.value === !0 ? "put" : "post";
|
|
2838
|
+
ge.request({ url: b, method: $, params: h }, { isTransformResponse: !1 }).then((W) => {
|
|
2839
|
+
W.success ? (W.result && (h.id || (h.id = W.result)), e("success", h), q.value = h, v.value = !0, t.success("操作成功!")) : t.warning(W.message);
|
|
2840
|
+
}).finally(() => {
|
|
2841
|
+
m.value = !1;
|
|
2842
|
+
});
|
|
2843
|
+
}
|
|
2844
|
+
}
|
|
2845
|
+
function _n() {
|
|
2846
|
+
return K(this, null, function* () {
|
|
2847
|
+
let h = q.value, b = Y.value, $ = Ke(h, ...b);
|
|
2848
|
+
if (h)
|
|
2849
|
+
yield T($);
|
|
2850
|
+
else {
|
|
2851
|
+
let W = {};
|
|
2852
|
+
for (let le of b)
|
|
2853
|
+
W[le] = "";
|
|
2854
|
+
yield T(W);
|
|
2855
|
+
}
|
|
2856
|
+
});
|
|
2857
|
+
}
|
|
2858
|
+
let vt = {
|
|
2859
|
+
tableName: L,
|
|
2860
|
+
loading: m,
|
|
2861
|
+
subActiveKey: Le,
|
|
2862
|
+
onlineFormRef: f,
|
|
2863
|
+
getFieldsValue: y,
|
|
2864
|
+
setFieldsValue: T,
|
|
2865
|
+
submitFlowFlag: O,
|
|
2866
|
+
subFormHeight: mt,
|
|
2867
|
+
subTableHeight: ht,
|
|
2868
|
+
refMap: ee,
|
|
2869
|
+
triggleChangeValues: Be,
|
|
2870
|
+
triggleChangeValue: We,
|
|
2871
|
+
sh: F,
|
|
2872
|
+
clearSubRows: gt,
|
|
2873
|
+
addSubRows: bt,
|
|
2874
|
+
clearThenAddRows: hn,
|
|
2875
|
+
changeOptions: gn,
|
|
2876
|
+
isUpdate: v,
|
|
2877
|
+
getSubTableInstance: wn
|
|
2878
|
+
};
|
|
2879
|
+
return N(vt), {
|
|
2880
|
+
//主表
|
|
2881
|
+
tableName: L,
|
|
2882
|
+
onlineFormRef: f,
|
|
2883
|
+
registerForm: d,
|
|
2884
|
+
loading: m,
|
|
2885
|
+
//子表
|
|
2886
|
+
subActiveKey: Le,
|
|
2887
|
+
hasSubTable: Q,
|
|
2888
|
+
subTabInfo: H,
|
|
2889
|
+
refMap: ee,
|
|
2890
|
+
//一对一子表
|
|
2891
|
+
subFormHeight: mt,
|
|
2892
|
+
getSubTableForeignKeyValue: an,
|
|
2893
|
+
isUpdate: v,
|
|
2894
|
+
handleSubFormChange: cn,
|
|
2895
|
+
//一对多子表
|
|
2896
|
+
subTableHeight: ht,
|
|
2897
|
+
onlineFormDisabled: z,
|
|
2898
|
+
subDataSource: x,
|
|
2899
|
+
getSubTableAuthPre: pn,
|
|
2900
|
+
handleAdded: fn,
|
|
2901
|
+
handleValueChange: dn,
|
|
2902
|
+
openSubFormModalForAdd: Sn,
|
|
2903
|
+
openSubFormModalForEdit: Fn,
|
|
2904
|
+
registerVxeFormModal: i,
|
|
2905
|
+
vxeTableId: r,
|
|
2906
|
+
//父组件调用
|
|
2907
|
+
show: G,
|
|
2908
|
+
createRootProperties: ne,
|
|
2909
|
+
handleSubmit: Xe,
|
|
2910
|
+
sh: F,
|
|
2911
|
+
handleCgButtonClick: et,
|
|
2912
|
+
handleCustomFormSh: vn,
|
|
2913
|
+
handleCustomFormEdit: yn,
|
|
2914
|
+
//跳转
|
|
2915
|
+
dbData: q,
|
|
2916
|
+
onOpenReportPrint: Cn,
|
|
2917
|
+
onlineExtConfigJson: P,
|
|
2918
|
+
recoverFormData: _n
|
|
2919
|
+
};
|
|
2920
|
+
}
|
|
2921
|
+
}, Fl = ["id"];
|
|
2922
|
+
function Tl(n, e, t, i, a, r) {
|
|
2923
|
+
const f = se("BasicForm");
|
|
2924
|
+
return ie(), de("div", {
|
|
2925
|
+
id: i.tableName + "_form",
|
|
2926
|
+
class: ze(["onlinePopFormWrap", [`formTemplate_${t.formTemplate}`]])
|
|
2927
|
+
}, [
|
|
2928
|
+
fe(f, {
|
|
2929
|
+
ref: "onlineFormRef",
|
|
2930
|
+
onRegister: i.registerForm
|
|
2931
|
+
}, null, 8, ["onRegister"])
|
|
2932
|
+
], 10, Fl);
|
|
2933
|
+
}
|
|
2934
|
+
const tn = /* @__PURE__ */ je(Sl, [["render", Tl], ["__scopeId", "data-v-2c2d5706"]]), er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2935
|
+
__proto__: null,
|
|
2936
|
+
default: tn
|
|
2937
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
2938
|
+
function _l(n, { emit: e } = {}, t) {
|
|
2939
|
+
const i = D(null), a = D(!1), r = D(1), f = D([]), w = D(!1), m = D(0), C = D(!1), O = D(""), v = D(!1), P = D(!1), S = D(!0), N = Se({}), E = D(!0), U = D(""), V = D(!0), L = D(!1), { popModalFixedWidth: q, resetBodyStyle: A, popBodyStyle: Q } = nn(), H = D(!1), ee = D(""), { getIsMobile: x } = Bt(), I = {
|
|
2940
|
+
handleOpenModal: (B) => {
|
|
2941
|
+
}
|
|
2942
|
+
}, _ = D(""), F = D(""), M = D(""), j = D(!1);
|
|
2943
|
+
let c = {};
|
|
2944
|
+
const p = pe(() => {
|
|
2945
|
+
let B = U.value;
|
|
2946
|
+
return B || (Ce(a) === !0 ? "详情" : Ce(P) === !0 ? "编辑" : "新增");
|
|
2947
|
+
}), [l, { setModalProps: d, closeModal: o }] = $t((B) => K(null, null, function* () {
|
|
2948
|
+
U.value = "", L.value = !1, yield T(B), A(), t && t();
|
|
2949
|
+
})), s = D(!1);
|
|
2950
|
+
function g() {
|
|
2951
|
+
return K(this, null, function* () {
|
|
2952
|
+
return yield Ee(s), H.value;
|
|
2953
|
+
});
|
|
2954
|
+
}
|
|
2955
|
+
function T(B) {
|
|
2956
|
+
return K(this, null, function* () {
|
|
2957
|
+
d({ confirmLoading: !1 }), P.value = B.isUpdate, a.value = B.disableSubmit || !1, (B == null ? void 0 : B.hideSub) === !0 && (E.value = !1), B != null && B.title && (U.value = B.title), B != null && B.record ? M.value = B.record.id : M.value = "", yield Ne(() => K(null, null, function* () {
|
|
2958
|
+
yield Ee(w), y(), yield i.value.show(B == null ? void 0 : B.isUpdate, B == null ? void 0 : B.record, B == null ? void 0 : B.param);
|
|
2959
|
+
}));
|
|
2960
|
+
});
|
|
2961
|
+
}
|
|
2962
|
+
function u(B) {
|
|
2963
|
+
w.value = !0, m.value = B.modalMinWidth, B.modelFullscreen == 1 ? d({ defaultFullscreen: !0 }) : d({ defaultFullscreen: !1 }), c = B, x.value && (c.commentStatus = 0);
|
|
2964
|
+
}
|
|
2965
|
+
function y() {
|
|
2966
|
+
let B = M.value;
|
|
2967
|
+
c.commentStatus == 1 && B ? (j.value = !0, d({ defaultFullscreen: !0 })) : j.value = !1;
|
|
2968
|
+
}
|
|
2969
|
+
const k = 800, z = 1100, X = pe(() => {
|
|
2970
|
+
let B = 200 * (r.value - 1), ae = (Ce(S) ? k : z) + B;
|
|
2971
|
+
ae = G(ae);
|
|
2972
|
+
let ve = m.value;
|
|
2973
|
+
return ve && ae < ve && (ae = ve), ae;
|
|
2974
|
+
});
|
|
2975
|
+
function G(B) {
|
|
2976
|
+
let ae = N.modalMinWidth;
|
|
2977
|
+
if (ae != null && ae !== "")
|
|
2978
|
+
try {
|
|
2979
|
+
if (ae = Number.parseInt(ae), B < ae)
|
|
2980
|
+
return ae;
|
|
2981
|
+
} catch (ve) {
|
|
2982
|
+
}
|
|
2983
|
+
return B;
|
|
2984
|
+
}
|
|
2985
|
+
function R(B, ae) {
|
|
2986
|
+
i.value.handleCgButtonClick(B, ae);
|
|
2987
|
+
}
|
|
2988
|
+
function J() {
|
|
2989
|
+
v.value = !0, setTimeout(() => {
|
|
2990
|
+
v.value = !1;
|
|
2991
|
+
}, 1500), i.value.handleSubmit();
|
|
2992
|
+
}
|
|
2993
|
+
function Y() {
|
|
2994
|
+
o();
|
|
2995
|
+
}
|
|
2996
|
+
function Z(B, ae = {}) {
|
|
2997
|
+
let ve = `/online/cgform/api/getFormItem/${B}`;
|
|
2998
|
+
return new Promise((Re, Ie) => {
|
|
2999
|
+
ge.get({ url: ve, params: ae }, { isTransformResponse: !1 }).then((ue) => {
|
|
3000
|
+
ue.success ? Re(ue.result) : Ie(ue.message);
|
|
3001
|
+
}).catch(() => {
|
|
3002
|
+
Ie();
|
|
3003
|
+
});
|
|
3004
|
+
});
|
|
3005
|
+
}
|
|
3006
|
+
function ne(B, ae, ve, Re, Ie) {
|
|
3007
|
+
return K(this, null, function* () {
|
|
3008
|
+
let ue = null;
|
|
3009
|
+
if (Re && Ie) {
|
|
3010
|
+
const We = `/online/cgform/api/getFormItemBytbname/${Ie}`, Le = { taskId: Re };
|
|
3011
|
+
ue = yield ge.get({ url: We, params: Le });
|
|
3012
|
+
} else
|
|
3013
|
+
ue = yield Z(B, ae);
|
|
3014
|
+
let Be = ue.head.formTemplate;
|
|
3015
|
+
r.value = Be ? Number(Be) : 1, f.value = ue.cgButtonList, C.value = ue.head.isTree === "Y", O.value = ue.head.treeParentIdField || "", _.value = ue.head.id, F.value = ue.head.tableName, ee.value = ue.head.themeTemplate, ue.form_disable_update === !0 ? H.value = !0 : H.value = !1, s.value = !0, e && e("formConfig", ue), ve && ve(ue), yield Ne(() => K(null, null, function* () {
|
|
3016
|
+
yield (yield Ee(i)).createRootProperties(ue);
|
|
3017
|
+
}));
|
|
3018
|
+
});
|
|
3019
|
+
}
|
|
3020
|
+
function Fe(B) {
|
|
3021
|
+
B[pi] = F.value, e("success", B), V.value == !0 && o(), L.value = !1, V.value = !0;
|
|
3022
|
+
}
|
|
3023
|
+
function Xe() {
|
|
3024
|
+
i.value && i.value.onCloseModal(), P.value && (c != null ? c : {}).commentStatus == 1 && d({ defaultFullscreen: !1 });
|
|
3025
|
+
}
|
|
3026
|
+
return {
|
|
3027
|
+
// modal
|
|
3028
|
+
title: p,
|
|
3029
|
+
modalWidth: X,
|
|
3030
|
+
registerModal: l,
|
|
3031
|
+
closeModal: o,
|
|
3032
|
+
modalObject: I,
|
|
3033
|
+
onCloseEvent: Xe,
|
|
3034
|
+
// 自定义按钮
|
|
3035
|
+
cgButtonList: f,
|
|
3036
|
+
handleCgButtonClick: R,
|
|
3037
|
+
// 提交/关闭按钮
|
|
3038
|
+
disableSubmit: a,
|
|
3039
|
+
handleSubmit: J,
|
|
3040
|
+
submitLoading: v,
|
|
3041
|
+
handleCancel: Y,
|
|
3042
|
+
successThenClose: V,
|
|
3043
|
+
handleSuccess: Fe,
|
|
3044
|
+
topTipVisible: L,
|
|
3045
|
+
//表单
|
|
3046
|
+
handleFormConfig: ne,
|
|
3047
|
+
onlineFormCompRef: i,
|
|
3048
|
+
formTemplate: r,
|
|
3049
|
+
isTreeForm: C,
|
|
3050
|
+
pidFieldName: O,
|
|
3051
|
+
renderSuccess: u,
|
|
3052
|
+
formRendered: w,
|
|
3053
|
+
isUpdate: P,
|
|
3054
|
+
showSub: E,
|
|
3055
|
+
themeTemplate: ee,
|
|
3056
|
+
// 评论区域参数
|
|
3057
|
+
tableId: _,
|
|
3058
|
+
tableName: F,
|
|
3059
|
+
formDataId: M,
|
|
3060
|
+
enableComment: j,
|
|
3061
|
+
popBodyStyle: Q,
|
|
3062
|
+
popModalFixedWidth: q,
|
|
3063
|
+
getFormStatus: g
|
|
3064
|
+
};
|
|
3065
|
+
}
|
|
3066
|
+
function nn() {
|
|
3067
|
+
const e = D(800);
|
|
3068
|
+
let t = window.innerWidth - 300;
|
|
3069
|
+
t < 800 && (t = 800), e.value = t;
|
|
3070
|
+
const i = D({});
|
|
3071
|
+
function a() {
|
|
3072
|
+
let r = window.innerHeight - 210;
|
|
3073
|
+
i.value = {
|
|
3074
|
+
height: r + "px",
|
|
3075
|
+
overflowY: "auto"
|
|
3076
|
+
};
|
|
3077
|
+
}
|
|
3078
|
+
return {
|
|
3079
|
+
popModalFixedWidth: e,
|
|
3080
|
+
popBodyStyle: i,
|
|
3081
|
+
resetBodyStyle: a
|
|
3082
|
+
};
|
|
3083
|
+
}
|
|
3084
|
+
const xl = Mt({
|
|
3085
|
+
name: "OnlinePopModal",
|
|
3086
|
+
props: {
|
|
3087
|
+
/**可以是表名 可以是ID*/
|
|
3088
|
+
id: {
|
|
3089
|
+
type: String,
|
|
3090
|
+
default: ""
|
|
3091
|
+
},
|
|
3092
|
+
/*展示字段名*/
|
|
3093
|
+
showFields: {
|
|
3094
|
+
type: Array,
|
|
3095
|
+
default: () => []
|
|
3096
|
+
},
|
|
3097
|
+
/*隐藏字段名*/
|
|
3098
|
+
hideFields: {
|
|
3099
|
+
type: Array,
|
|
3100
|
+
default: () => []
|
|
3101
|
+
},
|
|
3102
|
+
topTip: {
|
|
3103
|
+
type: Boolean,
|
|
3104
|
+
default: !1
|
|
3105
|
+
},
|
|
3106
|
+
request: {
|
|
3107
|
+
type: Boolean,
|
|
3108
|
+
default: !0
|
|
3109
|
+
},
|
|
3110
|
+
saveClose: {
|
|
3111
|
+
type: Boolean,
|
|
3112
|
+
default: !1
|
|
3113
|
+
},
|
|
3114
|
+
// 是否是vxeTable上方按钮点击打开的表单数据
|
|
3115
|
+
isVxeTableData: {
|
|
3116
|
+
type: Boolean,
|
|
3117
|
+
default: !1
|
|
3118
|
+
},
|
|
3119
|
+
formTableType: {
|
|
3120
|
+
type: String,
|
|
3121
|
+
default: ""
|
|
3122
|
+
},
|
|
3123
|
+
// -update-begin--author:liaozhiyang---date:20240613---for:【TV360X-1000】流程一对多走流程的接口
|
|
3124
|
+
// 有taskId即是流程
|
|
3125
|
+
taskId: {
|
|
3126
|
+
type: String
|
|
3127
|
+
},
|
|
3128
|
+
tableName: {
|
|
3129
|
+
type: String
|
|
3130
|
+
}
|
|
3131
|
+
// -update-end--author:liaozhiyang---date:20240613---for:【TV360X-1000】流程一对多走流程的接口
|
|
3132
|
+
},
|
|
3133
|
+
components: {
|
|
3134
|
+
BasicModal: Et,
|
|
3135
|
+
OnlinePopForm: tn,
|
|
3136
|
+
JModalTip: ci,
|
|
3137
|
+
Button: tt
|
|
3138
|
+
},
|
|
3139
|
+
emits: ["success", "register", "formConfig"],
|
|
3140
|
+
setup(n, { emit: e }) {
|
|
3141
|
+
const {
|
|
3142
|
+
title: t,
|
|
3143
|
+
registerModal: i,
|
|
3144
|
+
cgButtonList: a,
|
|
3145
|
+
handleCgButtonClick: r,
|
|
3146
|
+
disableSubmit: f,
|
|
3147
|
+
handleSubmit: w,
|
|
3148
|
+
submitLoading: m,
|
|
3149
|
+
handleCancel: C,
|
|
3150
|
+
handleFormConfig: O,
|
|
3151
|
+
onlineFormCompRef: v,
|
|
3152
|
+
formTemplate: P,
|
|
3153
|
+
isTreeForm: S,
|
|
3154
|
+
pidFieldName: N,
|
|
3155
|
+
renderSuccess: E,
|
|
3156
|
+
formRendered: U,
|
|
3157
|
+
handleSuccess: V,
|
|
3158
|
+
topTipVisible: L,
|
|
3159
|
+
successThenClose: q,
|
|
3160
|
+
isUpdate: A,
|
|
3161
|
+
popBodyStyle: Q,
|
|
3162
|
+
popModalFixedWidth: H,
|
|
3163
|
+
getFormStatus: ee
|
|
3164
|
+
} = _l(!1, { emit: e });
|
|
3165
|
+
he(() => n.id, x, { immediate: !0 });
|
|
3166
|
+
function x() {
|
|
3167
|
+
return K(this, null, function* () {
|
|
3168
|
+
if (U.value = !1, !n.id)
|
|
3169
|
+
return;
|
|
3170
|
+
let p = {};
|
|
3171
|
+
n.formTableType && (p.tabletype = n.formTableType), n.taskId ? yield O(n.id, p, null, n.taskId, n.tableName) : yield O(n.id, p);
|
|
3172
|
+
});
|
|
3173
|
+
}
|
|
3174
|
+
function I() {
|
|
3175
|
+
n.saveClose === !1 && (q.value = !1), w();
|
|
3176
|
+
}
|
|
3177
|
+
function _() {
|
|
3178
|
+
L.value = !1, v.value.recoverFormData();
|
|
3179
|
+
}
|
|
3180
|
+
function F() {
|
|
3181
|
+
L.value = !0;
|
|
3182
|
+
}
|
|
3183
|
+
const M = pe(() => f.value || !A.value ? !1 : n.topTip), j = pe(() => {
|
|
3184
|
+
if (A.value == !0)
|
|
3185
|
+
return null;
|
|
3186
|
+
{
|
|
3187
|
+
let p = m.value;
|
|
3188
|
+
return [
|
|
3189
|
+
_e(tt, { type: "primary", loading: p, onClick: w }, () => "确定"),
|
|
3190
|
+
_e(tt, { onClick: C }, () => "关闭")
|
|
3191
|
+
];
|
|
3192
|
+
}
|
|
3193
|
+
});
|
|
3194
|
+
return {
|
|
3195
|
+
title: t,
|
|
3196
|
+
topTipVisible: L,
|
|
3197
|
+
handleSaveData: I,
|
|
3198
|
+
handleRecover: _,
|
|
3199
|
+
onlineFormCompRef: v,
|
|
3200
|
+
renderSuccess: E,
|
|
3201
|
+
registerModal: i,
|
|
3202
|
+
handleSubmit: w,
|
|
3203
|
+
handleSuccess: V,
|
|
3204
|
+
handleCancel: C,
|
|
3205
|
+
formTemplate: P,
|
|
3206
|
+
disableSubmit: f,
|
|
3207
|
+
cgButtonList: a,
|
|
3208
|
+
handleCgButtonClick: r,
|
|
3209
|
+
isTreeForm: S,
|
|
3210
|
+
pidFieldName: N,
|
|
3211
|
+
submitLoading: m,
|
|
3212
|
+
handleDataChange: F,
|
|
3213
|
+
isUpdate: A,
|
|
3214
|
+
showTopTip: M,
|
|
3215
|
+
modalFooter: j,
|
|
3216
|
+
popBodyStyle: Q,
|
|
3217
|
+
popModalFixedWidth: H,
|
|
3218
|
+
getFormStatus: ee
|
|
3219
|
+
};
|
|
3220
|
+
}
|
|
3221
|
+
});
|
|
3222
|
+
function Ol(n, e, t, i, a, r) {
|
|
3223
|
+
const f = se("j-modal-tip"), w = se("online-pop-form"), m = se("BasicModal");
|
|
3224
|
+
return ie(), De(m, Rt({
|
|
3225
|
+
width: n.popModalFixedWidth,
|
|
3226
|
+
dialogStyle: { top: "70px" },
|
|
3227
|
+
bodyStyle: n.popBodyStyle
|
|
3228
|
+
}, n.$attrs, {
|
|
3229
|
+
footer: n.modalFooter,
|
|
3230
|
+
cancelText: "关闭",
|
|
3231
|
+
onRegister: n.registerModal,
|
|
3232
|
+
wrapClassName: "jeecg-online-pop-modal",
|
|
3233
|
+
onOk: n.handleSubmit
|
|
3234
|
+
}), {
|
|
3235
|
+
title: oe(() => [
|
|
3236
|
+
xe(Pe(n.title) + " ", 1),
|
|
3237
|
+
n.showTopTip ? (ie(), De(f, {
|
|
3238
|
+
key: 0,
|
|
3239
|
+
visible: n.topTipVisible,
|
|
3240
|
+
onSave: n.handleSaveData,
|
|
3241
|
+
onCancel: n.handleRecover
|
|
3242
|
+
}, null, 8, ["visible", "onSave", "onCancel"])) : Oe("", !0)
|
|
3243
|
+
]),
|
|
3244
|
+
default: oe(() => [
|
|
3245
|
+
fe(w, {
|
|
3246
|
+
ref: "onlineFormCompRef",
|
|
3247
|
+
id: n.id,
|
|
3248
|
+
disabled: n.disableSubmit,
|
|
3249
|
+
"form-template": n.formTemplate,
|
|
3250
|
+
isTree: n.isTreeForm,
|
|
3251
|
+
pidField: n.pidFieldName,
|
|
3252
|
+
request: n.request,
|
|
3253
|
+
isVxeTableData: n.isVxeTableData,
|
|
3254
|
+
onRendered: n.renderSuccess,
|
|
3255
|
+
onSuccess: n.handleSuccess,
|
|
3256
|
+
onDataChange: n.handleDataChange,
|
|
3257
|
+
"modal-class": "jeecg-online-pop-modal"
|
|
3258
|
+
}, null, 8, ["id", "disabled", "form-template", "isTree", "pidField", "request", "isVxeTableData", "onRendered", "onSuccess", "onDataChange"])
|
|
3259
|
+
]),
|
|
3260
|
+
_: 1
|
|
3261
|
+
}, 16, ["width", "bodyStyle", "footer", "onRegister", "onOk"]);
|
|
3262
|
+
}
|
|
3263
|
+
const Ge = /* @__PURE__ */ je(xl, [["render", Ol]]), tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3264
|
+
__proto__: null,
|
|
3265
|
+
default: Ge
|
|
3266
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
3267
|
+
function Dt(n, e) {
|
|
3268
|
+
const t = "/online/cgform/api/getData/" + n;
|
|
3269
|
+
return ge.get({ url: t, params: e });
|
|
3270
|
+
}
|
|
3271
|
+
function Pl(n, e) {
|
|
3272
|
+
const t = "/online/cgform/api/getColumns/" + n;
|
|
3273
|
+
return ge.get({ url: t, params: e });
|
|
3274
|
+
}
|
|
3275
|
+
function ln(n) {
|
|
3276
|
+
const e = D("1"), t = D({}), i = D({}), a = D(""), r = Se({
|
|
3277
|
+
add: !0,
|
|
3278
|
+
update: !0
|
|
3279
|
+
}), f = pe(() => n.textField ? n.textField.split(",") : []), w = D([]), m = pe(() => {
|
|
3280
|
+
let x = w.value;
|
|
3281
|
+
return n.multi == !0 ? x.slice(0, 3) : x.slice(0, 6);
|
|
3282
|
+
});
|
|
3283
|
+
Rn(() => K(null, null, function* () {
|
|
3284
|
+
if (n.tableName) {
|
|
3285
|
+
let I = n.valueField || "", _ = n.textField || "", F = [];
|
|
3286
|
+
if (I && F.push(I), _) {
|
|
3287
|
+
let j = _.split(",");
|
|
3288
|
+
a.value = j[0];
|
|
3289
|
+
for (let c of j)
|
|
3290
|
+
F.push(c);
|
|
3291
|
+
}
|
|
3292
|
+
let M = n.imageField || "";
|
|
3293
|
+
M && F.push(M), t.value = {
|
|
3294
|
+
linkTableSelectFields: F.join(",")
|
|
3295
|
+
}, yield S(), yield N();
|
|
3296
|
+
}
|
|
3297
|
+
}));
|
|
3298
|
+
const C = pe(() => {
|
|
3299
|
+
let x = n.textField || "", I = [], _ = "";
|
|
3300
|
+
if (x) {
|
|
3301
|
+
let F = x.split(",");
|
|
3302
|
+
_ = F[0];
|
|
3303
|
+
for (let M = 0; M < F.length; M++)
|
|
3304
|
+
M > 0 && I.push(F[M]);
|
|
3305
|
+
}
|
|
3306
|
+
return {
|
|
3307
|
+
others: I,
|
|
3308
|
+
labelField: _
|
|
3309
|
+
};
|
|
3310
|
+
}), O = D([]), v = D([]), P = D({});
|
|
3311
|
+
function S() {
|
|
3312
|
+
return K(this, null, function* () {
|
|
3313
|
+
let x = t.value;
|
|
3314
|
+
const I = yield Pl(n.tableName, x);
|
|
3315
|
+
if (v.value = I.columns, I.columns) {
|
|
3316
|
+
let _ = n.imageField, F = I.columns.filter((M) => M.dataIndex != a.value && M.dataIndex != _);
|
|
3317
|
+
w.value = F;
|
|
3318
|
+
}
|
|
3319
|
+
if (P.value = I.dictOptions, I.hideColumns) {
|
|
3320
|
+
let _ = I.hideColumns;
|
|
3321
|
+
_.indexOf("add") >= 0 ? r.add = !1 : r.add = !0, _.indexOf("update") >= 0 ? r.update = !1 : r.update = !0;
|
|
3322
|
+
}
|
|
3323
|
+
});
|
|
3324
|
+
}
|
|
3325
|
+
function N() {
|
|
3326
|
+
return K(this, null, function* () {
|
|
3327
|
+
let x = U(), _ = (yield Dt(n.tableName, x)).records, F = [], { others: M, labelField: j } = C.value, c = n.imageField;
|
|
3328
|
+
if (_ && _.length > 0)
|
|
3329
|
+
for (let p of _) {
|
|
3330
|
+
let l = ce({}, p);
|
|
3331
|
+
E(l);
|
|
3332
|
+
let d = Object.assign({}, Ke(l, M), { id: l.id, label: l[j], value: l[n.valueField] });
|
|
3333
|
+
c && (d[c] = l[c]), F.push(d);
|
|
3334
|
+
}
|
|
3335
|
+
n.editBtnShow && F.push({}), O.value = F;
|
|
3336
|
+
});
|
|
3337
|
+
}
|
|
3338
|
+
function E(x) {
|
|
3339
|
+
let I = v.value, _ = P.value;
|
|
3340
|
+
for (let F of I) {
|
|
3341
|
+
const { dataIndex: M, customRender: j } = F;
|
|
3342
|
+
if ((x[M] || x[M] === 0) && j && j == M && _[j]) {
|
|
3343
|
+
x[M] = Zn(_[j], x[M]);
|
|
3344
|
+
continue;
|
|
3345
|
+
}
|
|
3346
|
+
let c = x[M + "_dictText"];
|
|
3347
|
+
c && (x[M] = c);
|
|
3348
|
+
}
|
|
3349
|
+
}
|
|
3350
|
+
function U() {
|
|
3351
|
+
return Object.assign({ pageSize: 100, pageNo: e.value }, t.value, i.value);
|
|
3352
|
+
}
|
|
3353
|
+
function V(x) {
|
|
3354
|
+
if (!x)
|
|
3355
|
+
i.value = {};
|
|
3356
|
+
else {
|
|
3357
|
+
let I = f.value, _ = [], F = [];
|
|
3358
|
+
for (let M = 0; M < I.length; M++)
|
|
3359
|
+
M <= 1 && (F.push(I[M]), _.push({ field: I[M], rule: "like", val: x }));
|
|
3360
|
+
_.superQueryMatchType = "or", _.superQueryParams = encodeURI(JSON.stringify(_)), i.value = _;
|
|
3361
|
+
}
|
|
3362
|
+
}
|
|
3363
|
+
function L(x) {
|
|
3364
|
+
return K(this, null, function* () {
|
|
3365
|
+
if (!x)
|
|
3366
|
+
return [];
|
|
3367
|
+
let I = n.valueField, _ = ke(ce({}, t.value), {
|
|
3368
|
+
pageSize: 100,
|
|
3369
|
+
pageNo: e.value
|
|
3370
|
+
});
|
|
3371
|
+
_.superQueryMatchType = "and";
|
|
3372
|
+
let F = [{ field: I, rule: "in", val: x }];
|
|
3373
|
+
_.superQueryParams = encodeURI(JSON.stringify(F));
|
|
3374
|
+
let j = (yield Dt(n.tableName, _)).records, c = [];
|
|
3375
|
+
if (j && j.length > 0)
|
|
3376
|
+
for (let p of j) {
|
|
3377
|
+
let l = ce({}, p);
|
|
3378
|
+
E(l), c.push(l);
|
|
3379
|
+
}
|
|
3380
|
+
return c;
|
|
3381
|
+
});
|
|
3382
|
+
}
|
|
3383
|
+
function q(x, I) {
|
|
3384
|
+
if (!x || x.length == 0)
|
|
3385
|
+
return !1;
|
|
3386
|
+
let _ = I.split(",");
|
|
3387
|
+
if (_.length != x.length)
|
|
3388
|
+
return !1;
|
|
3389
|
+
let F = !0;
|
|
3390
|
+
for (let M of x) {
|
|
3391
|
+
let j = M[n.valueField];
|
|
3392
|
+
_.indexOf(j) < 0 && (F = !1);
|
|
3393
|
+
}
|
|
3394
|
+
return F;
|
|
3395
|
+
}
|
|
3396
|
+
function A(x) {
|
|
3397
|
+
Object.keys(x).map((I) => {
|
|
3398
|
+
x[I] instanceof Array && (x[I] = x[I].join(","));
|
|
3399
|
+
});
|
|
3400
|
+
}
|
|
3401
|
+
function Q(x, I, _) {
|
|
3402
|
+
if (_ || (_ = {}), I && I.length > 0)
|
|
3403
|
+
for (let F of I) {
|
|
3404
|
+
let M = F.split(","), j = M[0], c = M[1];
|
|
3405
|
+
if (x[j])
|
|
3406
|
+
x[j].push(_[c]);
|
|
3407
|
+
else {
|
|
3408
|
+
let p = _[c] || "";
|
|
3409
|
+
x[j] = [p];
|
|
3410
|
+
}
|
|
3411
|
+
}
|
|
3412
|
+
}
|
|
3413
|
+
function H(x) {
|
|
3414
|
+
if (n.imageField) {
|
|
3415
|
+
let I = x[n.imageField];
|
|
3416
|
+
return typeof I == "string" && (I = I.split(",")[0]), Ye(I);
|
|
3417
|
+
}
|
|
3418
|
+
return "";
|
|
3419
|
+
}
|
|
3420
|
+
const ee = pe(() => !!n.imageField);
|
|
3421
|
+
return {
|
|
3422
|
+
pageNo: e,
|
|
3423
|
+
otherColumns: w,
|
|
3424
|
+
realShowColumns: m,
|
|
3425
|
+
selectOptions: O,
|
|
3426
|
+
reloadTableLinkOptions: N,
|
|
3427
|
+
textFieldArray: f,
|
|
3428
|
+
addQueryParams: V,
|
|
3429
|
+
tableColumns: v,
|
|
3430
|
+
transData: E,
|
|
3431
|
+
mainContentField: a,
|
|
3432
|
+
loadOne: L,
|
|
3433
|
+
compareData: q,
|
|
3434
|
+
formatData: A,
|
|
3435
|
+
initFormData: Q,
|
|
3436
|
+
getImageSrc: H,
|
|
3437
|
+
showImage: ee,
|
|
3438
|
+
auths: r
|
|
3439
|
+
};
|
|
3440
|
+
}
|
|
3441
|
+
const Dl = {
|
|
3442
|
+
name: "LinkTableSelect",
|
|
3443
|
+
components: {
|
|
3444
|
+
PlusOutlined: ut,
|
|
3445
|
+
EditOutlined: Vn,
|
|
3446
|
+
OnlinePopModal: Ge
|
|
3447
|
+
},
|
|
3448
|
+
props: {
|
|
3449
|
+
valueField: re.string.def(""),
|
|
3450
|
+
textField: re.string.def(""),
|
|
3451
|
+
tableName: re.string.def(""),
|
|
3452
|
+
multi: re.bool.def(!1),
|
|
3453
|
+
value: re.oneOfType([re.string, re.number, re.array]),
|
|
3454
|
+
linkFields: re.array.def([]),
|
|
3455
|
+
imageField: re.string.def(""),
|
|
3456
|
+
// update-begin--author:liaozhiyang---date:20240530---for:【TV360X-389】普通查询关联记录去掉编辑按钮
|
|
3457
|
+
editBtnShow: re.bool.def(!0)
|
|
3458
|
+
// update-end--author:liaozhiyang---date:20240530---for:【TV360X-389】普通查询关联记录去掉编辑按钮
|
|
3459
|
+
},
|
|
3460
|
+
emits: ["change", "update:value"],
|
|
3461
|
+
setup(n, { emit: e, attrs: t }) {
|
|
3462
|
+
const i = kn("tableId", D(null)), a = D(), r = D([]), { auths: f, mainContentField: w, textFieldArray: m, selectOptions: C, reloadTableLinkOptions: O, addQueryParams: v, formatData: P, initFormData: S, getImageSrc: N, showImage: E } = ln(n), [U, { openModal: V }] = Me(), L = pe(() => n.tableName), q = pe(() => n.multi === !0 ? ke(ce({}, t), {
|
|
3463
|
+
// update-end--author:liaozhiyang---date:20240617---for:【TV360X-988】关联记录组件下拉风格禁用未生效
|
|
3464
|
+
mode: "multiple"
|
|
3465
|
+
}) : ce({}, t));
|
|
3466
|
+
function A(c) {
|
|
3467
|
+
c == null || c.stopPropagation(), c == null || c.preventDefault(), V(!0, {});
|
|
3468
|
+
}
|
|
3469
|
+
function Q(c, p) {
|
|
3470
|
+
c == null || c.stopPropagation(), c == null || c.preventDefault(), f.update != !1 && V(!0, {
|
|
3471
|
+
isUpdate: !0,
|
|
3472
|
+
record: p
|
|
3473
|
+
});
|
|
3474
|
+
}
|
|
3475
|
+
const H = "custom:online:reload";
|
|
3476
|
+
kt(() => {
|
|
3477
|
+
a.value && a.value.addEventListener(H, ee);
|
|
3478
|
+
}), $n(() => {
|
|
3479
|
+
a.value && a.value.removeEventListener(H, ee);
|
|
3480
|
+
});
|
|
3481
|
+
function ee() {
|
|
3482
|
+
O();
|
|
3483
|
+
}
|
|
3484
|
+
function x(c) {
|
|
3485
|
+
return K(this, null, function* () {
|
|
3486
|
+
try {
|
|
3487
|
+
const l = document.querySelectorAll(`.online-list-${i.value} .jeecg-basic-table-form-container.online-query-form .link-table-select-box`);
|
|
3488
|
+
l && l.length > 0 && l.forEach((d) => d.dispatchEvent(new Event(H)));
|
|
3489
|
+
} catch (l) {
|
|
3490
|
+
}
|
|
3491
|
+
yield O();
|
|
3492
|
+
let p = c[n.valueField];
|
|
3493
|
+
n.multi === !0 ? r.value = [p] : r.value = p, _(r.value);
|
|
3494
|
+
});
|
|
3495
|
+
}
|
|
3496
|
+
function I(c) {
|
|
3497
|
+
v(c), O();
|
|
3498
|
+
}
|
|
3499
|
+
function _(c) {
|
|
3500
|
+
F(c), c || (v(), O());
|
|
3501
|
+
}
|
|
3502
|
+
function F(c) {
|
|
3503
|
+
let p = {}, l = n.linkFields, d = [];
|
|
3504
|
+
if (!c)
|
|
3505
|
+
S(p, l);
|
|
3506
|
+
else {
|
|
3507
|
+
let o = be(C.value), s = be(c);
|
|
3508
|
+
s instanceof Array ? d = [...s] : n.multi == !0 ? d = s.split(",") : d = [s];
|
|
3509
|
+
let g = o.filter((T) => d.indexOf(T[n.valueField]) >= 0);
|
|
3510
|
+
if (g && g.length > 0) {
|
|
3511
|
+
let T = ce({}, g[0]);
|
|
3512
|
+
if (g.length > 1)
|
|
3513
|
+
for (let y = 1; y < g.length; y++)
|
|
3514
|
+
T = M(T, g[y]);
|
|
3515
|
+
let u = w.value;
|
|
3516
|
+
T[u] = T.label, S(p, l, T);
|
|
3517
|
+
}
|
|
3518
|
+
}
|
|
3519
|
+
P(p), e("change", d.join(",") || "", p), e("update:value", d.join(",") || "");
|
|
3520
|
+
}
|
|
3521
|
+
function M(c, p) {
|
|
3522
|
+
let l = {};
|
|
3523
|
+
return Object.keys(c).map((d) => {
|
|
3524
|
+
l[d] = (c[d] || "") + "," + (p[d] || "");
|
|
3525
|
+
}), l;
|
|
3526
|
+
}
|
|
3527
|
+
he(() => n.value, (c) => K(null, null, function* () {
|
|
3528
|
+
c ? (n.multi == !0 ? r.value = c.split(",") : r.value = c, n.linkFields && n.linkFields.length > 0 && F(c)) : r.value = [];
|
|
3529
|
+
}), { immediate: !0 }), he(() => C.value, (c) => {
|
|
3530
|
+
c && c.length > 0 && n.linkFields && n.linkFields.length > 0 && r.value && r.value.length > 0 && F(r.value);
|
|
3531
|
+
});
|
|
3532
|
+
const j = (c) => {
|
|
3533
|
+
c.target.src = Ze;
|
|
3534
|
+
};
|
|
3535
|
+
return {
|
|
3536
|
+
boxRef: a,
|
|
3537
|
+
selectValue: r,
|
|
3538
|
+
selectOptions: C,
|
|
3539
|
+
registerPopModal: U,
|
|
3540
|
+
popTableName: L,
|
|
3541
|
+
textFieldArray: m,
|
|
3542
|
+
handleClickAdd: A,
|
|
3543
|
+
handleClickEdit: Q,
|
|
3544
|
+
getFormData: x,
|
|
3545
|
+
handleSearch: di(I, 800),
|
|
3546
|
+
handleChange: _,
|
|
3547
|
+
bindValue: q,
|
|
3548
|
+
showImage: E,
|
|
3549
|
+
getImageSrc: N,
|
|
3550
|
+
auths: f,
|
|
3551
|
+
placeholderImage: Ze,
|
|
3552
|
+
handleImageError: j
|
|
3553
|
+
};
|
|
3554
|
+
}
|
|
3555
|
+
}, Il = {
|
|
3556
|
+
class: "link-table-select-box",
|
|
3557
|
+
ref: "boxRef"
|
|
3558
|
+
}, Ml = {
|
|
3559
|
+
key: 1,
|
|
3560
|
+
class: "online-select-item"
|
|
3561
|
+
}, Rl = {
|
|
3562
|
+
key: 0,
|
|
3563
|
+
class: "left-avatar"
|
|
3564
|
+
}, kl = ["src"], $l = ["src"], El = { class: "right-content" }, jl = { class: "others" }, Ll = { class: "other-item ellipsis" };
|
|
3565
|
+
function Al(n, e, t, i, a, r) {
|
|
3566
|
+
const f = se("PlusOutlined"), w = se("EditOutlined"), m = se("a-select"), C = se("online-pop-modal");
|
|
3567
|
+
return ie(), de("div", Il, [
|
|
3568
|
+
fe(m, Rt({
|
|
3569
|
+
value: i.selectValue,
|
|
3570
|
+
"onUpdate:value": e[2] || (e[2] = (O) => i.selectValue = O),
|
|
3571
|
+
style: { width: "100%" },
|
|
3572
|
+
placeholder: "请选择",
|
|
3573
|
+
"option-label-prop": "label",
|
|
3574
|
+
popupClassName: "table-link-select",
|
|
3575
|
+
allowClear: "",
|
|
3576
|
+
"show-search": ""
|
|
3577
|
+
}, i.bindValue, {
|
|
3578
|
+
options: i.selectOptions,
|
|
3579
|
+
"filter-option": !1,
|
|
3580
|
+
"not-found-content": null,
|
|
3581
|
+
onSearch: i.handleSearch,
|
|
3582
|
+
onChange: i.handleChange
|
|
3583
|
+
}), {
|
|
3584
|
+
option: oe((O) => [
|
|
3585
|
+
!O.value && i.auths.add ? (ie(), de("div", {
|
|
3586
|
+
key: 0,
|
|
3587
|
+
class: "opt-add",
|
|
3588
|
+
onClick: e[0] || (e[0] = (...v) => i.handleClickAdd && i.handleClickAdd(...v))
|
|
3589
|
+
}, [
|
|
3590
|
+
fe(f),
|
|
3591
|
+
e[3] || (e[3] = xe(" 记录 ", -1))
|
|
3592
|
+
])) : (ie(), de("div", Ml, [
|
|
3593
|
+
i.showImage ? (ie(), de("div", Rl, [
|
|
3594
|
+
i.getImageSrc(O) ? (ie(), de("img", {
|
|
3595
|
+
key: 0,
|
|
3596
|
+
src: i.getImageSrc(O),
|
|
3597
|
+
alt: "",
|
|
3598
|
+
onError: e[1] || (e[1] = (...v) => i.handleImageError && i.handleImageError(...v))
|
|
3599
|
+
}, null, 40, kl)) : (ie(), de("img", {
|
|
3600
|
+
key: 1,
|
|
3601
|
+
src: i.placeholderImage,
|
|
3602
|
+
alt: ""
|
|
3603
|
+
}, null, 8, $l))
|
|
3604
|
+
])) : Oe("", !0),
|
|
3605
|
+
me("div", El, [
|
|
3606
|
+
me("div", {
|
|
3607
|
+
class: ze(["label", { noEditBtn: !(t.editBtnShow && i.auths.update) }])
|
|
3608
|
+
}, [
|
|
3609
|
+
t.editBtnShow && i.auths.update ? (ie(), De(w, {
|
|
3610
|
+
key: 0,
|
|
3611
|
+
onClick: (v) => i.handleClickEdit(v, O)
|
|
3612
|
+
}, null, 8, ["onClick"])) : Oe("", !0),
|
|
3613
|
+
xe(" " + Pe(O.label), 1)
|
|
3614
|
+
], 2),
|
|
3615
|
+
me("div", jl, [
|
|
3616
|
+
(ie(!0), de(Qe, null, rt(i.textFieldArray, (v) => (ie(), de("div", Ll, Pe(O[v]), 1))), 256))
|
|
3617
|
+
])
|
|
3618
|
+
])
|
|
3619
|
+
]))
|
|
3620
|
+
]),
|
|
3621
|
+
_: 1
|
|
3622
|
+
}, 16, ["value", "options", "onSearch", "onChange"]),
|
|
3623
|
+
fe(C, {
|
|
3624
|
+
id: i.popTableName,
|
|
3625
|
+
onRegister: i.registerPopModal,
|
|
3626
|
+
onSuccess: i.getFormData,
|
|
3627
|
+
topTip: ""
|
|
3628
|
+
}, null, 8, ["id", "onRegister", "onSuccess"])
|
|
3629
|
+
], 512);
|
|
3630
|
+
}
|
|
3631
|
+
const sn = /* @__PURE__ */ je(Dl, [["render", Al], ["__scopeId", "data-v-76bee333"]]), nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3632
|
+
__proto__: null,
|
|
3633
|
+
default: sn
|
|
3634
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
3635
|
+
function Nl(n, e) {
|
|
3636
|
+
let t = ni();
|
|
3637
|
+
const i = D([]), a = D({}), r = D([]), f = D(null);
|
|
3638
|
+
let w = D(!0), m = pe(() => {
|
|
3639
|
+
if (w.value != !0)
|
|
3640
|
+
return { x: !1 };
|
|
3641
|
+
});
|
|
3642
|
+
const [C, { openModal: O }] = Me(), v = D(""), [P, { openModal: S }] = Me(), N = D("");
|
|
3643
|
+
function E(l, d = "checkbox") {
|
|
3644
|
+
a.value = l.dictOptions, l.checkboxFlag == "Y" ? f.value = {
|
|
3645
|
+
selectedRowKeys: r,
|
|
3646
|
+
onChange: U,
|
|
3647
|
+
type: d
|
|
3648
|
+
} : f.value = null, w.value = l.scrollFlag == 1;
|
|
3649
|
+
let o = l.columns;
|
|
3650
|
+
o.forEach((u) => {
|
|
3651
|
+
var y, k;
|
|
3652
|
+
if (((y = e == null ? void 0 : e.value) == null ? void 0 : y.canResizeColumn) === 1 && (u.width || (u.fieldType === "date" || u.fieldType === "Date" ? u.width = 120 : u.fieldType === "link_table" ? u.width = 180 : u.width = 150), u.resizable = !0), u.fieldExtendJson && JSON.parse(u.fieldExtendJson).isFixed && (u.fixed = "left"), u.hrefSlotName && u.scopedSlots) {
|
|
3653
|
+
const z = (k = l.fieldHrefSlots) == null ? void 0 : k.find((X) => X.slotName === u.hrefSlotName);
|
|
3654
|
+
z && (u.fieldHref = z);
|
|
3655
|
+
}
|
|
3656
|
+
Object.keys(u).map((z) => {
|
|
3657
|
+
u[z] == null && delete u[z];
|
|
3658
|
+
});
|
|
3659
|
+
});
|
|
3660
|
+
let s = l.fieldHrefSlots;
|
|
3661
|
+
const g = {};
|
|
3662
|
+
s.forEach((u) => g[u.slotName] = u);
|
|
3663
|
+
let T = [];
|
|
3664
|
+
if (T = V(o, g), x(T), n.isTree() === !0) {
|
|
3665
|
+
let u = l.textField, y = -1;
|
|
3666
|
+
for (let k = 0; k < T.length; k++)
|
|
3667
|
+
if (T[k].dataIndex == u) {
|
|
3668
|
+
y = k;
|
|
3669
|
+
break;
|
|
3670
|
+
}
|
|
3671
|
+
if (y > 0) {
|
|
3672
|
+
let k = T.splice(y, 1);
|
|
3673
|
+
T.unshift(k[0]);
|
|
3674
|
+
}
|
|
3675
|
+
T.length > 0 && (T[0].align = "left");
|
|
3676
|
+
}
|
|
3677
|
+
i.value = T, n.reloadTable();
|
|
3678
|
+
}
|
|
3679
|
+
function U(l, d) {
|
|
3680
|
+
r.value = l, n.selectedRows = be(d), n.selectedRowKeys = be(l);
|
|
3681
|
+
}
|
|
3682
|
+
function V(l, d) {
|
|
3683
|
+
var o;
|
|
3684
|
+
for (let s of l) {
|
|
3685
|
+
let { customRender: g, hrefSlotName: T, fieldType: u } = s;
|
|
3686
|
+
if (u == "date" || u == "Date")
|
|
3687
|
+
s.customRender = ({ text: y }) => y ? y.length > 10 ? y.substring(0, 10) : y : "";
|
|
3688
|
+
else if (u == "link_table") {
|
|
3689
|
+
const y = (o = s.fieldExtendJson) != null ? o : "{}", k = JSON.parse(y);
|
|
3690
|
+
s.customRender = ({ text: z, record: X }) => {
|
|
3691
|
+
if (!z)
|
|
3692
|
+
return "";
|
|
3693
|
+
if (n.isPopList === !0)
|
|
3694
|
+
return X[s.dataIndex + "_dictText"];
|
|
3695
|
+
{
|
|
3696
|
+
let G = (z + "").split(","), R = [];
|
|
3697
|
+
X[s.dataIndex + "_dictText"] && (R = X[s.dataIndex + "_dictText"].split(","));
|
|
3698
|
+
let J = [];
|
|
3699
|
+
for (let Y = 0; Y < G.length; Y++) {
|
|
3700
|
+
let Z = _e(
|
|
3701
|
+
ri,
|
|
3702
|
+
{
|
|
3703
|
+
id: G[Y],
|
|
3704
|
+
text: R[Y],
|
|
3705
|
+
onTab: (ne) => p(ne, T, k.isListReadOnly)
|
|
3706
|
+
}
|
|
3707
|
+
);
|
|
3708
|
+
J.push(Z);
|
|
3709
|
+
}
|
|
3710
|
+
return J.length == 0 ? "" : _e("div", { style: { overflow: "hidden" } }, J);
|
|
3711
|
+
}
|
|
3712
|
+
};
|
|
3713
|
+
} else if (u === "popup_dict")
|
|
3714
|
+
s.customRender = ({ text: y, record: k }) => k[s.dataIndex + "_dictText"] != null ? k[s.dataIndex + "_dictText"] : y;
|
|
3715
|
+
else {
|
|
3716
|
+
if (!T && s.scopedSlots && s.scopedSlots.customRender && d.hasOwnProperty(s.scopedSlots.customRender) && (T = s.scopedSlots.customRender), g || T) {
|
|
3717
|
+
let y = g, k = "_replace_text_";
|
|
3718
|
+
s.ellipsis = !0, s.customRender = ({ text: z, record: X }) => {
|
|
3719
|
+
let G = z;
|
|
3720
|
+
const R = [], J = () => R.length ? R : G;
|
|
3721
|
+
if (y)
|
|
3722
|
+
if (y.startsWith(k)) {
|
|
3723
|
+
let Y = y.replace(k, "");
|
|
3724
|
+
G = X[Y];
|
|
3725
|
+
} else
|
|
3726
|
+
G = Gn(Ce(a)[y], z).map((Z) => {
|
|
3727
|
+
if (Z.hasColor) {
|
|
3728
|
+
const ne = ai(Z.color);
|
|
3729
|
+
R.push(_e(ii, {
|
|
3730
|
+
color: Z.color,
|
|
3731
|
+
style: {
|
|
3732
|
+
color: ne,
|
|
3733
|
+
"margin-left": "5px"
|
|
3734
|
+
}
|
|
3735
|
+
}, Z.text));
|
|
3736
|
+
}
|
|
3737
|
+
return Z.text;
|
|
3738
|
+
}).join(",");
|
|
3739
|
+
if (s.showLength && G && G.length > s.showLength && (G = G.substr(0, s.showLength) + "..."), T) {
|
|
3740
|
+
let Y = d[T];
|
|
3741
|
+
if (Y)
|
|
3742
|
+
return _e(
|
|
3743
|
+
"a",
|
|
3744
|
+
{
|
|
3745
|
+
onClick: () => L(Y, X)
|
|
3746
|
+
},
|
|
3747
|
+
J()
|
|
3748
|
+
);
|
|
3749
|
+
}
|
|
3750
|
+
return _e("span", {}, J());
|
|
3751
|
+
};
|
|
3752
|
+
}
|
|
3753
|
+
if (s.scopedSlots) {
|
|
3754
|
+
s.ellipsis = !0;
|
|
3755
|
+
let y = s.scopedSlots;
|
|
3756
|
+
s.slots = y, delete s.scopedSlots;
|
|
3757
|
+
}
|
|
3758
|
+
}
|
|
3759
|
+
}
|
|
3760
|
+
return l;
|
|
3761
|
+
}
|
|
3762
|
+
function L(l, d) {
|
|
3763
|
+
let o = l.href, s = /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_]*)?/, g = /\.vue(\?.*)?$/, T = /{{([^}]+)}}/g;
|
|
3764
|
+
if (typeof o == "string")
|
|
3765
|
+
if (o.startsWith("ONLINE:")) {
|
|
3766
|
+
let u = o.split(":");
|
|
3767
|
+
v.value = u[1];
|
|
3768
|
+
let y = u[2];
|
|
3769
|
+
O(!0, {
|
|
3770
|
+
isUpdate: !0,
|
|
3771
|
+
disableSubmit: !0,
|
|
3772
|
+
hideSub: !0,
|
|
3773
|
+
record: { id: d[y] }
|
|
3774
|
+
});
|
|
3775
|
+
} else
|
|
3776
|
+
o = o.trim().replace(/\${([^}]+)?}/g, (u, y) => d[y]), T.test(o) && (o = o.replace(T, function(u, y) {
|
|
3777
|
+
try {
|
|
3778
|
+
return y.trim() === "ACCESS_TOKEN" ? Vt() : ct(y);
|
|
3779
|
+
} catch (k) {
|
|
3780
|
+
return u;
|
|
3781
|
+
}
|
|
3782
|
+
})), s.test(o) ? window.open(o, "_blank") : g.test(o) ? Q(o) : t.push(o);
|
|
3783
|
+
}
|
|
3784
|
+
const A = Se({
|
|
3785
|
+
model: {
|
|
3786
|
+
title: "",
|
|
3787
|
+
okText: "关闭",
|
|
3788
|
+
width: "100%",
|
|
3789
|
+
open: !1,
|
|
3790
|
+
destroyOnClose: !0,
|
|
3791
|
+
style: {
|
|
3792
|
+
top: 0,
|
|
3793
|
+
left: 0,
|
|
3794
|
+
height: "100%",
|
|
3795
|
+
margin: 0,
|
|
3796
|
+
padding: 0
|
|
3797
|
+
},
|
|
3798
|
+
// dialogStyle: dialogStyle,
|
|
3799
|
+
bodyStyle: { padding: "8px", height: "calc(100vh - 108px)", overflow: "auto", overflowX: "hidden" },
|
|
3800
|
+
// 隐藏掉取消按钮
|
|
3801
|
+
cancelButtonProps: { style: { display: "none" } }
|
|
3802
|
+
},
|
|
3803
|
+
on: {
|
|
3804
|
+
ok: () => A.model.open = !1,
|
|
3805
|
+
cancel: () => A.model.open = !1
|
|
3806
|
+
},
|
|
3807
|
+
is: null,
|
|
3808
|
+
params: {}
|
|
3809
|
+
});
|
|
3810
|
+
function Q(l) {
|
|
3811
|
+
let d = l.indexOf("?"), o = l;
|
|
3812
|
+
if (d !== -1) {
|
|
3813
|
+
o = l.substring(0, d);
|
|
3814
|
+
let g = l.substring(d + 1, l.length).split("&"), T = {};
|
|
3815
|
+
g.forEach((u) => {
|
|
3816
|
+
let y = u.split("=");
|
|
3817
|
+
T[y[0]] = y[1];
|
|
3818
|
+
}), A.params = T;
|
|
3819
|
+
} else
|
|
3820
|
+
A.params = {};
|
|
3821
|
+
A.model.open = !0, A.model.title = "操作", A.is = En(jn(() => Qn(o)));
|
|
3822
|
+
}
|
|
3823
|
+
let H = "right";
|
|
3824
|
+
n.isTree() && (H = "right");
|
|
3825
|
+
const ee = Se({
|
|
3826
|
+
title: "操作",
|
|
3827
|
+
dataIndex: "action",
|
|
3828
|
+
slots: { customRender: "action" },
|
|
3829
|
+
fixed: H,
|
|
3830
|
+
align: "center",
|
|
3831
|
+
width: 150
|
|
3832
|
+
});
|
|
3833
|
+
he(() => e == null ? void 0 : e.value, () => {
|
|
3834
|
+
var l, d;
|
|
3835
|
+
((l = e == null ? void 0 : e.value) == null ? void 0 : l.tableFixedAction) === 1 && (ee.fixed = ((d = e == null ? void 0 : e.value) == null ? void 0 : d.tableFixedActionType) || "right", n.isTree() && (ee.fixed = "right"));
|
|
3836
|
+
});
|
|
3837
|
+
function x(l) {
|
|
3838
|
+
let d = !1;
|
|
3839
|
+
for (let o = 0; o < l.length; o++)
|
|
3840
|
+
if (l[o].dataIndex.toLowerCase() == "bpm_status") {
|
|
3841
|
+
d = !0;
|
|
3842
|
+
break;
|
|
3843
|
+
}
|
|
3844
|
+
return n.hasBpmStatus = d, d;
|
|
3845
|
+
}
|
|
3846
|
+
function I(l, d, o, s) {
|
|
3847
|
+
if (l)
|
|
3848
|
+
if (l.indexOf(",") > 0)
|
|
3849
|
+
oi(`/online/cgform/field/download/${s}/${d.id}/${o.dataIndex}`, `文件_${d.id}.zip`);
|
|
3850
|
+
else {
|
|
3851
|
+
const g = Ye(l);
|
|
3852
|
+
window.open(g);
|
|
3853
|
+
}
|
|
3854
|
+
}
|
|
3855
|
+
function _(l) {
|
|
3856
|
+
return l && l.indexOf(",") > 0 && (l = St(l)[0]), Ye(l);
|
|
3857
|
+
}
|
|
3858
|
+
function F(l) {
|
|
3859
|
+
return l ? li(l) : "";
|
|
3860
|
+
}
|
|
3861
|
+
function M(l, d) {
|
|
3862
|
+
if (!l)
|
|
3863
|
+
return "";
|
|
3864
|
+
let o = l;
|
|
3865
|
+
o.length > 10 && (o = o.substring(0, 10));
|
|
3866
|
+
let s = d == null ? void 0 : d.fieldExtendJson;
|
|
3867
|
+
return s && (s = JSON.parse(s), s.picker && s.picker != "default") ? zn(o)[s.picker] : o;
|
|
3868
|
+
}
|
|
3869
|
+
he(r, () => {
|
|
3870
|
+
n.selectedRowKeys = be(r.value);
|
|
3871
|
+
}), n.clearSelectedRow = () => {
|
|
3872
|
+
r.value = [], n.selectedRows = [], n.selectedRowKeys = [];
|
|
3873
|
+
};
|
|
3874
|
+
function j(l) {
|
|
3875
|
+
if (l) {
|
|
3876
|
+
let d = [];
|
|
3877
|
+
const o = St(l);
|
|
3878
|
+
for (let s of o)
|
|
3879
|
+
s && d.push(Ye(s));
|
|
3880
|
+
si({ imageList: d });
|
|
3881
|
+
}
|
|
3882
|
+
}
|
|
3883
|
+
const c = D();
|
|
3884
|
+
function p(l, d, o) {
|
|
3885
|
+
return K(this, null, function* () {
|
|
3886
|
+
N.value = d, (yield c.value.getFormStatus()) == !0 ? (v.value = d, O(!0, {
|
|
3887
|
+
isUpdate: !0,
|
|
3888
|
+
disableSubmit: !0,
|
|
3889
|
+
hideSub: !0,
|
|
3890
|
+
record: { id: l }
|
|
3891
|
+
})) : S(!0, {
|
|
3892
|
+
isUpdate: !0,
|
|
3893
|
+
// update-begin--author:liaozhiyang---date:20250318---for:【issues/7930】表格列表中支持关联记录配置是否只读
|
|
3894
|
+
disableSubmit: !!o,
|
|
3895
|
+
// update-end--author:liaozhiyang---date:20250318---for:【issues/7930】表格列表中支持关联记录配置是否只读
|
|
3896
|
+
record: {
|
|
3897
|
+
id: l
|
|
3898
|
+
}
|
|
3899
|
+
});
|
|
3900
|
+
});
|
|
3901
|
+
}
|
|
3902
|
+
return {
|
|
3903
|
+
columns: i,
|
|
3904
|
+
actionColumn: ee,
|
|
3905
|
+
selectedKeys: r,
|
|
3906
|
+
rowSelection: f,
|
|
3907
|
+
enableScrollBar: w,
|
|
3908
|
+
tableScroll: m,
|
|
3909
|
+
downloadRowFile: I,
|
|
3910
|
+
getImgView: _,
|
|
3911
|
+
getPcaText: F,
|
|
3912
|
+
getFormatDate: M,
|
|
3913
|
+
handleColumnResult: E,
|
|
3914
|
+
onSelectChange: U,
|
|
3915
|
+
hrefComponent: A,
|
|
3916
|
+
viewOnlineCellImage: j,
|
|
3917
|
+
hrefMainTableId: v,
|
|
3918
|
+
registerOnlineHrefModal: C,
|
|
3919
|
+
registerPopModal: P,
|
|
3920
|
+
openPopModal: S,
|
|
3921
|
+
openOnlineHrefModal: O,
|
|
3922
|
+
onlinePopModalRef: c,
|
|
3923
|
+
popTableId: N,
|
|
3924
|
+
handleClickFieldHref: L
|
|
3925
|
+
};
|
|
3926
|
+
}
|
|
3927
|
+
const Vl = Mt({
|
|
3928
|
+
name: "OnlinePopListModal",
|
|
3929
|
+
props: {
|
|
3930
|
+
/**可以是表名 可以是ID*/
|
|
3931
|
+
id: {
|
|
3932
|
+
type: String,
|
|
3933
|
+
default: ""
|
|
3934
|
+
},
|
|
3935
|
+
multi: {
|
|
3936
|
+
type: Boolean,
|
|
3937
|
+
default: !1
|
|
3938
|
+
},
|
|
3939
|
+
addAuth: {
|
|
3940
|
+
type: Boolean,
|
|
3941
|
+
default: !0
|
|
3942
|
+
}
|
|
3943
|
+
},
|
|
3944
|
+
components: {
|
|
3945
|
+
BasicModal: Et,
|
|
3946
|
+
BasicTable: ei,
|
|
3947
|
+
TableAction: Xn,
|
|
3948
|
+
PlusOutlined: ut,
|
|
3949
|
+
OnlinePopModal: Ge
|
|
3950
|
+
},
|
|
3951
|
+
emits: ["success", "register"],
|
|
3952
|
+
setup(n, { emit: e }) {
|
|
3953
|
+
const { createMessage: t } = $e(), { popModalFixedWidth: i, resetBodyStyle: a, popBodyStyle: r } = nn(), f = D(""), w = D(800), [m, { closeModal: C }] = $t((R) => {
|
|
3954
|
+
f.value = "", s.value = R.selectedRowKeys, g.value = R.selectedRows, d({ current: 1 }), l(), a();
|
|
3955
|
+
}), [O, { openModal: v }] = Me();
|
|
3956
|
+
function P() {
|
|
3957
|
+
C();
|
|
3958
|
+
}
|
|
3959
|
+
const S = pe(() => {
|
|
3960
|
+
const R = s.value;
|
|
3961
|
+
return !(R && R.length > 0);
|
|
3962
|
+
}), N = D(!1);
|
|
3963
|
+
function E() {
|
|
3964
|
+
N.value = !0;
|
|
3965
|
+
let R = be(g.value);
|
|
3966
|
+
R && R.length > 0 && (e("success", R), C()), setTimeout(() => {
|
|
3967
|
+
N.value = !1;
|
|
3968
|
+
}, 200);
|
|
3969
|
+
}
|
|
3970
|
+
function U(R) {
|
|
3971
|
+
const J = "/online/cgform/api/getData/" + n.id;
|
|
3972
|
+
return ge.get({ url: J, params: R });
|
|
3973
|
+
}
|
|
3974
|
+
function V(R) {
|
|
3975
|
+
return R.column = "id", new Promise((J, Y) => K(null, null, function* () {
|
|
3976
|
+
const Z = yield U(R);
|
|
3977
|
+
J(Z);
|
|
3978
|
+
}));
|
|
3979
|
+
}
|
|
3980
|
+
const L = {
|
|
3981
|
+
isPopList: !0,
|
|
3982
|
+
reloadTable() {
|
|
3983
|
+
},
|
|
3984
|
+
isTree() {
|
|
3985
|
+
return !1;
|
|
3986
|
+
}
|
|
3987
|
+
}, q = D({}), {
|
|
3988
|
+
columns: A,
|
|
3989
|
+
downloadRowFile: Q,
|
|
3990
|
+
getImgView: H,
|
|
3991
|
+
getPcaText: ee,
|
|
3992
|
+
getFormatDate: x,
|
|
3993
|
+
handleColumnResult: I,
|
|
3994
|
+
hrefComponent: _,
|
|
3995
|
+
viewOnlineCellImage: F
|
|
3996
|
+
} = Nl(L, q);
|
|
3997
|
+
function M() {
|
|
3998
|
+
const R = "/online/cgform/api/getColumns/" + n.id;
|
|
3999
|
+
return new Promise((J, Y) => {
|
|
4000
|
+
ge.get({ url: R }, { isTransformResponse: !1 }).then((Z) => {
|
|
4001
|
+
Z.success ? J(Z.result) : (t.warning(Z.message), Y());
|
|
4002
|
+
});
|
|
4003
|
+
});
|
|
4004
|
+
}
|
|
4005
|
+
const j = D("");
|
|
4006
|
+
he(() => n.id, () => K(null, null, function* () {
|
|
4007
|
+
let R = yield M();
|
|
4008
|
+
I(R), j.value = R.description;
|
|
4009
|
+
}), { immediate: !0 });
|
|
4010
|
+
const { tableContext: c } = ti({
|
|
4011
|
+
designScope: "process-design",
|
|
4012
|
+
pagination: !0,
|
|
4013
|
+
tableProps: {
|
|
4014
|
+
title: "",
|
|
4015
|
+
api: V,
|
|
4016
|
+
clickToRowSelect: !0,
|
|
4017
|
+
columns: A,
|
|
4018
|
+
showTableSetting: !1,
|
|
4019
|
+
immediate: !1,
|
|
4020
|
+
//showIndexColumn: true,
|
|
4021
|
+
canResize: !1,
|
|
4022
|
+
showActionColumn: !1,
|
|
4023
|
+
actionColumn: {
|
|
4024
|
+
dataIndex: "action",
|
|
4025
|
+
slots: { customRender: "action" }
|
|
4026
|
+
},
|
|
4027
|
+
useSearchForm: !1,
|
|
4028
|
+
beforeFetch: (R) => z(R)
|
|
4029
|
+
}
|
|
4030
|
+
}), [p, { reload: l, setPagination: d }, { rowSelection: o, selectedRowKeys: s, selectedRows: g }] = c;
|
|
4031
|
+
he(() => n.multi, (R) => {
|
|
4032
|
+
R == !0 ? o.type = "checkbox" : o.type = "radio";
|
|
4033
|
+
}, { immediate: !0 });
|
|
4034
|
+
function T(R) {
|
|
4035
|
+
return [
|
|
4036
|
+
{
|
|
4037
|
+
label: "编辑",
|
|
4038
|
+
onClick: u.bind(null, R)
|
|
4039
|
+
}
|
|
4040
|
+
];
|
|
4041
|
+
}
|
|
4042
|
+
function u(R) {
|
|
4043
|
+
}
|
|
4044
|
+
function y() {
|
|
4045
|
+
l();
|
|
4046
|
+
}
|
|
4047
|
+
const k = ["int", "double", "Date", "Datetime", "BigDecimal"];
|
|
4048
|
+
function z(R) {
|
|
4049
|
+
let J = f.value;
|
|
4050
|
+
if (!J)
|
|
4051
|
+
return R.superQueryMatchType = "or", R.superQueryParams = "", R;
|
|
4052
|
+
let Y = A.value, Z = [];
|
|
4053
|
+
if (Y && Y.length > 0)
|
|
4054
|
+
for (let ne of Y)
|
|
4055
|
+
ne.dbType && (ne.dbType == "string" ? Z.push({ field: ne.dataIndex, type: ne.dbType.toLowerCase(), rule: "like", val: J }) : ne.dbType == "Date" ? J.length == 10 && Z.push({ field: ne.dataIndex, type: ne.dbType.toLowerCase(), rule: "eq", val: J }) : ne.dbType == "Datetime" ? J.length == 19 && Z.push({ field: ne.dataIndex, type: ne.dbType.toLowerCase(), rule: "eq", val: J }) : k.indexOf(ne.dbType) && Z.push({ field: ne.dataIndex, type: ne.dbType.toLowerCase(), rule: "eq", val: J }));
|
|
4056
|
+
return R.superQueryMatchType = "or", R.superQueryParams = encodeURI(JSON.stringify(Z)), R;
|
|
4057
|
+
}
|
|
4058
|
+
function X() {
|
|
4059
|
+
v(!0, {});
|
|
4060
|
+
}
|
|
4061
|
+
function G(R) {
|
|
4062
|
+
let J = [R, ...g.value];
|
|
4063
|
+
e("success", J), C();
|
|
4064
|
+
}
|
|
4065
|
+
return {
|
|
4066
|
+
registerModal: m,
|
|
4067
|
+
modalWidth: w,
|
|
4068
|
+
handleCancel: P,
|
|
4069
|
+
submitDisabled: S,
|
|
4070
|
+
submitLoading: N,
|
|
4071
|
+
handleSubmit: E,
|
|
4072
|
+
registerTable: p,
|
|
4073
|
+
getTableAction: T,
|
|
4074
|
+
searchText: f,
|
|
4075
|
+
onSearch: y,
|
|
4076
|
+
downloadRowFile: Q,
|
|
4077
|
+
getImgView: H,
|
|
4078
|
+
getPcaText: ee,
|
|
4079
|
+
getFormatDate: x,
|
|
4080
|
+
hrefComponent: _,
|
|
4081
|
+
viewOnlineCellImage: F,
|
|
4082
|
+
rowSelection: o,
|
|
4083
|
+
modalTitle: j,
|
|
4084
|
+
registerPopModal: O,
|
|
4085
|
+
handleAdd: X,
|
|
4086
|
+
reload: l,
|
|
4087
|
+
popModalFixedWidth: i,
|
|
4088
|
+
popBodyStyle: r,
|
|
4089
|
+
handleDataSave: G
|
|
4090
|
+
};
|
|
4091
|
+
}
|
|
4092
|
+
}), Bl = { style: { display: "inline-block", width: "calc(100% - 140px)", "text-align": "left" } }, Wl = {
|
|
4093
|
+
key: 0,
|
|
4094
|
+
style: { "font-size": "12px", "font-style": "italic" }
|
|
4095
|
+
}, Jl = {
|
|
4096
|
+
key: 0,
|
|
4097
|
+
style: { "font-size": "12px", "font-style": "italic" }
|
|
4098
|
+
}, Yl = ["src", "onClick"], ql = ["innerHTML"], Ul = ["title"];
|
|
4099
|
+
function Hl(n, e, t, i, a, r) {
|
|
4100
|
+
const f = se("PlusOutlined"), w = se("a-button"), m = se("a-input-search"), C = se("TableAction"), O = se("BasicTable"), v = se("BasicModal"), P = se("online-pop-modal");
|
|
4101
|
+
return ie(), de(Qe, null, [
|
|
4102
|
+
fe(v, {
|
|
4103
|
+
onRegister: n.registerModal,
|
|
4104
|
+
width: n.popModalFixedWidth,
|
|
4105
|
+
dialogStyle: { top: "70px" },
|
|
4106
|
+
bodyStyle: n.popBodyStyle,
|
|
4107
|
+
title: n.modalTitle,
|
|
4108
|
+
wrapClassName: "jeecg-online-pop-list-modal"
|
|
4109
|
+
}, {
|
|
4110
|
+
footer: oe(() => [
|
|
4111
|
+
me("div", Bl, [
|
|
4112
|
+
n.addAuth ? (ie(), De(w, {
|
|
4113
|
+
key: 0,
|
|
4114
|
+
style: { "border-radius": "50px" },
|
|
4115
|
+
type: "primary",
|
|
4116
|
+
onClick: n.handleAdd
|
|
4117
|
+
}, {
|
|
4118
|
+
default: oe(() => [
|
|
4119
|
+
fe(f),
|
|
4120
|
+
e[1] || (e[1] = xe("新增记录", -1))
|
|
4121
|
+
]),
|
|
4122
|
+
_: 1
|
|
4123
|
+
}, 8, ["onClick"])) : Oe("", !0)
|
|
4124
|
+
]),
|
|
4125
|
+
fe(w, {
|
|
4126
|
+
key: "back",
|
|
4127
|
+
onClick: n.handleCancel
|
|
4128
|
+
}, {
|
|
4129
|
+
default: oe(() => [...e[2] || (e[2] = [
|
|
4130
|
+
xe("关闭", -1)
|
|
4131
|
+
])]),
|
|
4132
|
+
_: 1
|
|
4133
|
+
}, 8, ["onClick"]),
|
|
4134
|
+
fe(w, {
|
|
4135
|
+
disabled: n.submitDisabled,
|
|
4136
|
+
key: "submit",
|
|
4137
|
+
type: "primary",
|
|
4138
|
+
onClick: n.handleSubmit,
|
|
4139
|
+
loading: n.submitLoading
|
|
4140
|
+
}, {
|
|
4141
|
+
default: oe(() => [...e[3] || (e[3] = [
|
|
4142
|
+
xe("确定", -1)
|
|
4143
|
+
])]),
|
|
4144
|
+
_: 1
|
|
4145
|
+
}, 8, ["disabled", "onClick", "loading"])
|
|
4146
|
+
]),
|
|
4147
|
+
default: oe(() => [
|
|
4148
|
+
fe(O, {
|
|
4149
|
+
onRegister: n.registerTable,
|
|
4150
|
+
rowSelection: n.rowSelection
|
|
4151
|
+
}, {
|
|
4152
|
+
tableTitle: oe(() => [
|
|
4153
|
+
fe(m, {
|
|
4154
|
+
value: n.searchText,
|
|
4155
|
+
"onUpdate:value": e[0] || (e[0] = (S) => n.searchText = S),
|
|
4156
|
+
onSearch: n.onSearch,
|
|
4157
|
+
placeholder: "请输入关键词,按回车搜索",
|
|
4158
|
+
style: { width: "240px" }
|
|
4159
|
+
}, null, 8, ["value", "onSearch"])
|
|
4160
|
+
]),
|
|
4161
|
+
action: oe(({ record: S }) => [
|
|
4162
|
+
fe(C, {
|
|
4163
|
+
actions: n.getTableAction(S)
|
|
4164
|
+
}, null, 8, ["actions"])
|
|
4165
|
+
]),
|
|
4166
|
+
fileSlot: oe(({ text: S }) => [
|
|
4167
|
+
S ? (ie(), De(w, {
|
|
4168
|
+
key: 1,
|
|
4169
|
+
ghost: !0,
|
|
4170
|
+
type: "primary",
|
|
4171
|
+
preIcon: "ant-design:download",
|
|
4172
|
+
size: "small",
|
|
4173
|
+
onClick: (N) => n.downloadRowFile(S)
|
|
4174
|
+
}, {
|
|
4175
|
+
default: oe(() => [...e[4] || (e[4] = [
|
|
4176
|
+
xe(" 下载 ", -1)
|
|
4177
|
+
])]),
|
|
4178
|
+
_: 1
|
|
4179
|
+
}, 8, ["onClick"])) : (ie(), de("span", Wl, "无文件"))
|
|
4180
|
+
]),
|
|
4181
|
+
imgSlot: oe(({ text: S }) => [
|
|
4182
|
+
S ? (ie(), de("img", {
|
|
4183
|
+
key: 1,
|
|
4184
|
+
src: n.getImgView(S),
|
|
4185
|
+
alt: "图片不存在",
|
|
4186
|
+
class: "online-cell-image",
|
|
4187
|
+
onClick: (N) => n.viewOnlineCellImage(S)
|
|
4188
|
+
}, null, 8, Yl)) : (ie(), de("span", Jl, "无图片"))
|
|
4189
|
+
]),
|
|
4190
|
+
htmlSlot: oe(({ text: S }) => [
|
|
4191
|
+
me("div", { innerHTML: S }, null, 8, ql)
|
|
4192
|
+
]),
|
|
4193
|
+
pcaSlot: oe(({ text: S }) => [
|
|
4194
|
+
me("div", {
|
|
4195
|
+
title: n.getPcaText(S)
|
|
4196
|
+
}, Pe(n.getPcaText(S)), 9, Ul)
|
|
4197
|
+
]),
|
|
4198
|
+
dateSlot: oe(({ text: S, column: N }) => [
|
|
4199
|
+
me("span", null, Pe(n.getFormatDate(S, N)), 1)
|
|
4200
|
+
]),
|
|
4201
|
+
_: 1
|
|
4202
|
+
}, 8, ["onRegister", "rowSelection"])
|
|
4203
|
+
]),
|
|
4204
|
+
_: 1
|
|
4205
|
+
}, 8, ["onRegister", "width", "bodyStyle", "title"]),
|
|
4206
|
+
fe(P, {
|
|
4207
|
+
id: n.id,
|
|
4208
|
+
onRegister: n.registerPopModal,
|
|
4209
|
+
onSuccess: n.handleDataSave,
|
|
4210
|
+
topTip: ""
|
|
4211
|
+
}, null, 8, ["id", "onRegister", "onSuccess"])
|
|
4212
|
+
], 64);
|
|
4213
|
+
}
|
|
4214
|
+
const rn = /* @__PURE__ */ je(Vl, [["render", Hl]]), ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4215
|
+
__proto__: null,
|
|
4216
|
+
default: rn
|
|
4217
|
+
}, Symbol.toStringTag, { value: "Module" })), zl = {
|
|
4218
|
+
name: "LinkTableCard",
|
|
4219
|
+
props: {
|
|
4220
|
+
valueField: re.string.def(""),
|
|
4221
|
+
textField: re.string.def(""),
|
|
4222
|
+
tableName: re.string.def(""),
|
|
4223
|
+
multi: re.bool.def(!1),
|
|
4224
|
+
value: re.oneOfType([re.string, re.number]),
|
|
4225
|
+
// ["表单字段,表字典字段","表单字段,表字典字段"]
|
|
4226
|
+
linkFields: re.array.def([]),
|
|
4227
|
+
//是否是禁用页面
|
|
4228
|
+
disabled: re.bool.def(!1),
|
|
4229
|
+
// 是否是detail页面
|
|
4230
|
+
detail: re.bool.def(!1),
|
|
4231
|
+
imageField: re.string.def("")
|
|
4232
|
+
},
|
|
4233
|
+
components: {
|
|
4234
|
+
PlusOutlined: ut,
|
|
4235
|
+
MinusCircleFilled: Bn,
|
|
4236
|
+
OnlinePopListModal: rn,
|
|
4237
|
+
OnlinePopModal: Ge
|
|
4238
|
+
},
|
|
4239
|
+
emits: ["change", "update:value"],
|
|
4240
|
+
setup(n, { emit: e }) {
|
|
4241
|
+
const t = pe(() => n.tableName), [i, { openModal: a }] = Me(), [r, { openModal: f }] = Me(), w = D([]), m = D([]), C = D(null), O = D(0), v = pe(() => !(n.disabled == !0 || n.multi === !1 && m.value.length > 0)), { auths: P, otherColumns: S, realShowColumns: N, tableColumns: E, textFieldArray: U, transData: V, loadOne: L, compareData: q, formatData: A, initFormData: Q, getImageSrc: H, showImage: ee } = ln(n), x = pe(() => n.multi === !0 ? 12 : 24), I = pe(() => n.multi === !0 ? 24 : 12);
|
|
4242
|
+
function _(s) {
|
|
4243
|
+
if (s && U.value.length > 0) {
|
|
4244
|
+
let g = U.value[0];
|
|
4245
|
+
return s[g];
|
|
4246
|
+
}
|
|
4247
|
+
}
|
|
4248
|
+
function F(s) {
|
|
4249
|
+
s == null || s.stopPropagation(), s == null || s.preventDefault();
|
|
4250
|
+
}
|
|
4251
|
+
function M(s, g) {
|
|
4252
|
+
F(s), P.update != !1 && n.disabled == !1 && f(!0, {
|
|
4253
|
+
isUpdate: !0,
|
|
4254
|
+
record: g
|
|
4255
|
+
});
|
|
4256
|
+
}
|
|
4257
|
+
function j(s) {
|
|
4258
|
+
a(!0, {
|
|
4259
|
+
// update-begin--author:liaozhiyang---date:20240517---for:【TV360X-43】修复关联记录可以添加重复数据
|
|
4260
|
+
selectedRowKeys: m.value.map((g) => g.id),
|
|
4261
|
+
selectedRows: [...m.value]
|
|
4262
|
+
// update-end--author:liaozhiyang---date:20240517---for:【TV360X-43】修复关联记录可以添加重复数据
|
|
4263
|
+
});
|
|
4264
|
+
}
|
|
4265
|
+
function c(s) {
|
|
4266
|
+
let g = [];
|
|
4267
|
+
for (let T of s) {
|
|
4268
|
+
let u = ce({}, T);
|
|
4269
|
+
V(u), g.push(u);
|
|
4270
|
+
}
|
|
4271
|
+
m.value = g, d();
|
|
4272
|
+
}
|
|
4273
|
+
function p(s) {
|
|
4274
|
+
let g = m.value;
|
|
4275
|
+
for (let T = 0; T < g.length; T++)
|
|
4276
|
+
if (g[T].id === s.id) {
|
|
4277
|
+
let u = ce({}, s);
|
|
4278
|
+
V(u), g.splice(T, 1, u);
|
|
4279
|
+
}
|
|
4280
|
+
m.value = g, d();
|
|
4281
|
+
}
|
|
4282
|
+
function l(s, g) {
|
|
4283
|
+
F(s);
|
|
4284
|
+
let T = m.value;
|
|
4285
|
+
T && T.length > g && (T.splice(g, 1), m.value = T), d();
|
|
4286
|
+
}
|
|
4287
|
+
function d() {
|
|
4288
|
+
let s = m.value, g = [], T = {}, u = n.linkFields;
|
|
4289
|
+
if (s.length > 0)
|
|
4290
|
+
for (let k = 0; k < s.length; k++)
|
|
4291
|
+
g.push(s[k][n.valueField]), Q(T, u, s[k]);
|
|
4292
|
+
else
|
|
4293
|
+
Q(T, u);
|
|
4294
|
+
let y = g.join(",");
|
|
4295
|
+
A(T), e("change", y, T), e("update:value", y);
|
|
4296
|
+
}
|
|
4297
|
+
return he(() => n.value, (s) => K(null, null, function* () {
|
|
4298
|
+
if (s) {
|
|
4299
|
+
if (q(m.value, s) === !1) {
|
|
4300
|
+
let T = yield L(s);
|
|
4301
|
+
m.value = T;
|
|
4302
|
+
}
|
|
4303
|
+
n.linkFields && n.linkFields.length > 0 && d();
|
|
4304
|
+
} else
|
|
4305
|
+
m.value = [];
|
|
4306
|
+
}), { immediate: !0 }), kt(() => {
|
|
4307
|
+
C.value.offsetWidth < 250 && (O.value = 24);
|
|
4308
|
+
}), {
|
|
4309
|
+
popTableName: t,
|
|
4310
|
+
selectRecords: m,
|
|
4311
|
+
otherColumns: S,
|
|
4312
|
+
realShowColumns: N,
|
|
4313
|
+
showButton: v,
|
|
4314
|
+
selectValue: w,
|
|
4315
|
+
handleAddRecord: j,
|
|
4316
|
+
handleDeleteRecord: l,
|
|
4317
|
+
getMainContent: _,
|
|
4318
|
+
itemSpan: x,
|
|
4319
|
+
columnSpan: I,
|
|
4320
|
+
tableColumns: E,
|
|
4321
|
+
addCard: c,
|
|
4322
|
+
registerListModal: i,
|
|
4323
|
+
registerFormModal: r,
|
|
4324
|
+
handleClickEdit: M,
|
|
4325
|
+
updateCardData: p,
|
|
4326
|
+
getImageSrc: H,
|
|
4327
|
+
showImage: ee,
|
|
4328
|
+
auths: P,
|
|
4329
|
+
tableLinkCardRef: C,
|
|
4330
|
+
fixedSpan: O,
|
|
4331
|
+
placeholderImage: Ze,
|
|
4332
|
+
handleImageError: (s) => {
|
|
4333
|
+
s.target.src = Ze;
|
|
4334
|
+
}
|
|
4335
|
+
};
|
|
4336
|
+
}
|
|
4337
|
+
}, Ql = { ref: "tableLinkCardRef" }, Kl = { class: "table-link-card" }, Zl = { style: { width: "100%", height: "100%" } }, Gl = {
|
|
4338
|
+
key: 0,
|
|
4339
|
+
class: "card-button"
|
|
4340
|
+
}, Xl = ["onClick"], es = {
|
|
4341
|
+
key: 0,
|
|
4342
|
+
class: "card-delete"
|
|
4343
|
+
}, ts = { class: "card-inner" }, ns = { class: "card-main-content" }, is = { class: "other-content" }, ls = { class: "label ellipsis" }, ss = { class: "text ellipsis" }, rs = {
|
|
4344
|
+
key: 0,
|
|
4345
|
+
class: "card-item-image"
|
|
4346
|
+
}, os = ["src"];
|
|
4347
|
+
function as(n, e, t, i, a, r) {
|
|
4348
|
+
const f = se("PlusOutlined"), w = se("a-button"), m = se("minus-circle-filled"), C = se("a-col"), O = se("a-row"), v = se("online-pop-list-modal"), P = se("online-pop-modal");
|
|
4349
|
+
return ie(), de("div", Ql, [
|
|
4350
|
+
me("div", Kl, [
|
|
4351
|
+
me("div", Zl, [
|
|
4352
|
+
i.showButton ? (ie(), de("div", Gl, [
|
|
4353
|
+
fe(w, { onClick: i.handleAddRecord }, {
|
|
4354
|
+
default: oe(() => [
|
|
4355
|
+
fe(f),
|
|
4356
|
+
e[1] || (e[1] = xe("记 录", -1))
|
|
4357
|
+
]),
|
|
4358
|
+
_: 1
|
|
4359
|
+
}, 8, ["onClick"])
|
|
4360
|
+
])) : Oe("", !0),
|
|
4361
|
+
fe(O, null, {
|
|
4362
|
+
default: oe(() => [
|
|
4363
|
+
(ie(!0), de(Qe, null, rt(i.selectRecords, (S, N) => (ie(), De(C, {
|
|
4364
|
+
span: i.fixedSpan ? i.fixedSpan : i.itemSpan
|
|
4365
|
+
}, {
|
|
4366
|
+
default: oe(() => [
|
|
4367
|
+
me("div", {
|
|
4368
|
+
class: ze(["card-item", { "disabled-chunk": t.detail == !0 }]),
|
|
4369
|
+
onClick: (E) => i.handleClickEdit(E, S)
|
|
4370
|
+
}, [
|
|
4371
|
+
me("div", {
|
|
4372
|
+
class: ze(["card-item-left", { "show-right-image": i.getImageSrc(S) }])
|
|
4373
|
+
}, [
|
|
4374
|
+
t.disabled == !1 ? (ie(), de("span", es, [
|
|
4375
|
+
fe(m, {
|
|
4376
|
+
onClick: (E) => i.handleDeleteRecord(E, N)
|
|
4377
|
+
}, null, 8, ["onClick"])
|
|
4378
|
+
])) : Oe("", !0),
|
|
4379
|
+
me("div", ts, [
|
|
4380
|
+
me("div", ns, Pe(i.getMainContent(S)), 1),
|
|
4381
|
+
me("div", is, [
|
|
4382
|
+
fe(O, null, {
|
|
4383
|
+
default: oe(() => [
|
|
4384
|
+
(ie(!0), de(Qe, null, rt(i.realShowColumns, (E) => (ie(), De(C, { span: i.columnSpan }, {
|
|
4385
|
+
default: oe(() => [
|
|
4386
|
+
me("span", ls, Pe(E.title), 1),
|
|
4387
|
+
me("span", ss, Pe(S[E.dataIndex]), 1)
|
|
4388
|
+
]),
|
|
4389
|
+
_: 2
|
|
4390
|
+
}, 1032, ["span"]))), 256))
|
|
4391
|
+
]),
|
|
4392
|
+
_: 2
|
|
4393
|
+
}, 1024)
|
|
4394
|
+
])
|
|
4395
|
+
])
|
|
4396
|
+
], 2),
|
|
4397
|
+
i.getImageSrc(S) ? (ie(), de("div", rs, [
|
|
4398
|
+
i.getImageSrc(S) ? (ie(), de("img", {
|
|
4399
|
+
key: 0,
|
|
4400
|
+
src: i.getImageSrc(S),
|
|
4401
|
+
alt: "",
|
|
4402
|
+
onError: e[0] || (e[0] = (...E) => i.handleImageError && i.handleImageError(...E))
|
|
4403
|
+
}, null, 40, os)) : Oe("", !0)
|
|
4404
|
+
])) : Oe("", !0)
|
|
4405
|
+
], 10, Xl)
|
|
4406
|
+
]),
|
|
4407
|
+
_: 2
|
|
4408
|
+
}, 1032, ["span"]))), 256))
|
|
4409
|
+
]),
|
|
4410
|
+
_: 1
|
|
4411
|
+
})
|
|
4412
|
+
])
|
|
4413
|
+
]),
|
|
4414
|
+
fe(v, {
|
|
4415
|
+
onRegister: i.registerListModal,
|
|
4416
|
+
multi: t.multi,
|
|
4417
|
+
id: i.popTableName,
|
|
4418
|
+
addAuth: i.auths.add,
|
|
4419
|
+
onSuccess: i.addCard
|
|
4420
|
+
}, null, 8, ["onRegister", "multi", "id", "addAuth", "onSuccess"]),
|
|
4421
|
+
fe(P, {
|
|
4422
|
+
id: i.popTableName,
|
|
4423
|
+
onRegister: i.registerFormModal,
|
|
4424
|
+
onSuccess: i.updateCardData,
|
|
4425
|
+
topTip: ""
|
|
4426
|
+
}, null, 8, ["id", "onRegister", "onSuccess"])
|
|
4427
|
+
], 512);
|
|
4428
|
+
}
|
|
4429
|
+
const on = /* @__PURE__ */ je(zl, [["render", as], ["__scopeId", "data-v-6c31f866"]]), lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4430
|
+
__proto__: null,
|
|
4431
|
+
default: on
|
|
4432
|
+
}, Symbol.toStringTag, { value: "Module" })), It = {};
|
|
4433
|
+
function us() {
|
|
4434
|
+
n("OnlineSelectCascade", ui), n("LinkTableSelect", sn), n("LinkTableCard", on);
|
|
4435
|
+
function n(t, i) {
|
|
4436
|
+
It[t] || (Mn(t, i), It[t] = 1);
|
|
4437
|
+
}
|
|
4438
|
+
function e(t) {
|
|
4439
|
+
t.component == "LinkTableCard" && (t.component = "LinkTableSelect", t.componentProps.popContainer = "body");
|
|
4440
|
+
}
|
|
4441
|
+
return {
|
|
4442
|
+
addComponent: n,
|
|
4443
|
+
linkTableCard2Select: e
|
|
4444
|
+
};
|
|
4445
|
+
}
|
|
4446
|
+
export {
|
|
4447
|
+
zs as E,
|
|
4448
|
+
nt as F,
|
|
4449
|
+
on as L,
|
|
4450
|
+
Ge as O,
|
|
4451
|
+
fi as S,
|
|
4452
|
+
Ae as V,
|
|
4453
|
+
Nl as a,
|
|
4454
|
+
_l as b,
|
|
4455
|
+
us as c,
|
|
4456
|
+
we as d,
|
|
4457
|
+
en as e,
|
|
4458
|
+
pl as f,
|
|
4459
|
+
Ee as g,
|
|
4460
|
+
Gt as h,
|
|
4461
|
+
pi as i,
|
|
4462
|
+
Zs as j,
|
|
4463
|
+
Us as k,
|
|
4464
|
+
at as l,
|
|
4465
|
+
Gs as m,
|
|
4466
|
+
Qs as n,
|
|
4467
|
+
Ks as o,
|
|
4468
|
+
pt as p,
|
|
4469
|
+
ml as q,
|
|
4470
|
+
Pt as r,
|
|
4471
|
+
Hs as s,
|
|
4472
|
+
Xs as t,
|
|
4473
|
+
vl as u,
|
|
4474
|
+
er as v,
|
|
4475
|
+
tr as w,
|
|
4476
|
+
nr as x,
|
|
4477
|
+
ir as y,
|
|
4478
|
+
lr as z
|
|
4479
|
+
};
|