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