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