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