@jeecg/online 3.6.0-beta → 3.6.2-GA
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 → AuthButtonConfig-f142147a.mjs} +1 -1
- package/{AuthButtonTree-09e57bc4.mjs → AuthButtonTree-c2602a7c.mjs} +1 -1
- package/{AuthDataConfig-6e7e61ec.mjs → AuthDataConfig-8e5c7b0c.mjs} +1 -1
- package/{AuthDataTree-e83286c5.mjs → AuthDataTree-9dc58b20.mjs} +1 -1
- package/{AuthFieldConfig-f1ec2708.mjs → AuthFieldConfig-e9a45f94.mjs} +1 -1
- package/{AuthFieldTree-bb72e21f.mjs → AuthFieldTree-d836be59.mjs} +1 -1
- package/{AuthManagerDrawer-28a2d108.mjs → AuthManagerDrawer-5b558c23.mjs} +4 -4
- package/{AuthSetterModal-2990d553.mjs → AuthSetterModal-0cc557cf.mjs} +58 -52
- package/{CgformCopyList-36a4cbf0.mjs → CgformCopyList-86157923.mjs} +39 -37
- package/{CgformModal-7399a5ac.mjs → CgformModal-5cf02d51.mjs} +90 -90
- package/{CheckDictTable-3a8a54b3.mjs → CheckDictTable-27102064.mjs} +1 -1
- package/{CodeFileListModal-72f0d3bb.mjs → CodeFileListModal-f747daae.mjs} +2 -2
- package/{CodeFileViewModal-9eb88c47.mjs → CodeFileViewModal-a9fb2900.mjs} +1 -1
- package/{CodeGeneratorModal-a89958f5.mjs → CodeGeneratorModal-3a0e9f0e.mjs} +5 -5
- package/{CustomButtonList-c44aec5a.mjs → CustomButtonList-b9b27a93.mjs} +1 -1
- package/{DBAttributeTable-7d285e8d.mjs → DBAttributeTable-6bdcb1e8.mjs} +1 -1
- package/{DbToOnlineModal-d23cbeb1.mjs → DbToOnlineModal-3705e91a.mjs} +2 -2
- package/{DetailForm-2901d215.mjs → DetailForm-cdeb54e3.mjs} +32 -31
- package/{EnhanceJavaModal-153899a9.mjs → EnhanceJavaModal-c13de6e0.mjs} +1 -1
- package/{EnhanceJsHistory-7f5db3b1.mjs → EnhanceJsHistory-154101f0.mjs} +1 -1
- package/{EnhanceJsModal-c2fb75b8.mjs → EnhanceJsModal-6158804c.mjs} +2 -2
- package/{EnhanceSqlModal-965e9b0a.mjs → EnhanceSqlModal-221c22dc.mjs} +1 -1
- package/{ExtendConfigModal-8f08466f.mjs → ExtendConfigModal-0564ef83.mjs} +2 -2
- package/{FieldExtendJsonModal-adfcf5a7.mjs → FieldExtendJsonModal-40d961c1.mjs} +1 -1
- package/{FileSelectModal-432d4521.mjs → FileSelectModal-de40a706.mjs} +1 -1
- package/{ForeignKeyTable-faab7ccf.mjs → ForeignKeyTable-22989042.mjs} +1 -1
- package/{IndexTable-0a2d3718.mjs → IndexTable-833d34ff.mjs} +1 -1
- package/JModalTip-0413ad6a.mjs +49 -0
- package/{JOnlineSearchSelect-7e908492.mjs → JOnlineSearchSelect-9ea89e13.mjs} +1 -1
- package/{LeftDepart-54f245b3.mjs → LeftDepart-b0a535c0.mjs} +1 -1
- package/{LeftRole-c138f892.mjs → LeftRole-22c90d6b.mjs} +1 -1
- package/{LeftUser-9c812f8a.mjs → LeftUser-a44d63dd.mjs} +1 -1
- package/{LinkTableConfigModal-c2c5c7e6.mjs → LinkTableConfigModal-5edaa08d.mjs} +1 -1
- package/{LinkTableFieldConfigModal-a3553b1f.mjs → LinkTableFieldConfigModal-06693eaa.mjs} +1 -1
- package/{LinkTableListPiece-7f793b08.mjs → LinkTableListPiece-46e8af51.mjs} +1 -1
- package/{ModalFormDemo-65685b0e.mjs → ModalFormDemo-d107fa87.mjs} +1 -1
- package/{OnlCgformErpList-52c87ed3.mjs → OnlCgformErpList-4c51cdb3.mjs} +59 -54
- package/{OnlCgformErpSubTable-6e7fb17b.mjs → OnlCgformErpSubTable-d7081b9f.mjs} +39 -34
- package/{OnlCgformInnerSubTable-f0727b8f.mjs → OnlCgformInnerSubTable-4c3925bb.mjs} +46 -41
- package/{OnlCgformInnerTableList-9f89c173.mjs → OnlCgformInnerTableList-1e5014fa.mjs} +156 -142
- package/{OnlCgformTabList-15516315.mjs → OnlCgformTabList-c59c7cc7.mjs} +47 -42
- package/{OnlineAutoList-63a0224f.mjs → OnlineAutoList-a7a9de5d.mjs} +185 -180
- package/{OnlineAutoModal-ffe19c3f.mjs → OnlineAutoModal-a33f1a63.mjs} +14 -13
- package/{OnlineAutoTreeList-317c7105.mjs → OnlineAutoTreeList-ec27d271.mjs} +24 -19
- package/{OnlineCustomModal-3939ce78.mjs → OnlineCustomModal-3e6792d3.mjs} +9 -8
- package/{OnlineDetailModal-bfb1375f.mjs → OnlineDetailModal-f40e37e1.mjs} +13 -12
- package/{OnlineForm-069f6092.mjs → OnlineForm-fb3a2379.mjs} +8 -7
- package/{OnlineFormDetail-ad5735fb.mjs → OnlineFormDetail-52b1c303.mjs} +10 -9
- package/{OnlineQueryForm-0771c80f.mjs → OnlineQueryForm-7c70734e.mjs} +8 -7
- package/{OnlineSearchFormItem-0db5834f.mjs → OnlineSearchFormItem-fe308194.mjs} +2 -2
- package/{OnlineSelectCascade-a05c30f4.mjs → OnlineSelectCascade-abc345f9.mjs} +1 -1
- package/{OnlineSubFormDetail-583d01eb.mjs → OnlineSubFormDetail-02326a8c.mjs} +19 -18
- package/{OnlineTabAutoModal-747e071d.mjs → OnlineTabAutoModal-6d9da8b0.mjs} +20 -19
- package/{OnlineTabDetailModal-887f0174.mjs → OnlineTabDetailModal-d23bd4c9.mjs} +36 -35
- package/{OnlineTabForm-b1dcd4b4.mjs → OnlineTabForm-29ca07f7.mjs} +132 -131
- package/{OnlineTabFormDetail-8e494a96.mjs → OnlineTabFormDetail-aa7e1144.mjs} +36 -35
- package/{PageAttributeTable-5966b201.mjs → PageAttributeTable-d82946c5.mjs} +4 -4
- package/{ProcessOnlineForm-4382bea7.mjs → ProcessOnlineForm-84f4d02d.mjs} +23 -22
- package/{QueryTable-6e8053ad.mjs → QueryTable-d4599fca.mjs} +1 -1
- package/README.md +4 -2
- package/{SuperQuery-78db6998.mjs → SuperQuery-07162778.mjs} +243 -241
- package/{SuperQueryValComponent-471110b5.mjs → SuperQueryValComponent-7ad86d4b.mjs} +1 -1
- package/SuperQueryValComponent.vue_vue_type_script_lang-e9196096.mjs +101 -0
- package/cgformState-d9f8ec42.mjs +28 -0
- package/index-73993b18.mjs +56 -0
- package/{index-7e9a23f2.mjs → index-e1bda35b.mjs} +43 -41
- package/main.index.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/{useCgformList-0c603af1.mjs → useCgformList-b135794d.mjs} +81 -105
- package/{useExtendComponent-aa1cdfc8.mjs → useExtendComponent-f4e29152.mjs} +666 -657
- package/useListButton-4dd33e7a.mjs +676 -0
- package/{useSchemas-43429d80.mjs → useSchemas-0433a403.mjs} +94 -90
- package/JModalTip-e1938b49.mjs +0 -46
- package/SuperQueryValComponent.vue_vue_type_script_lang-e3ad7ee8.mjs +0 -101
- package/index-b70302f2.mjs +0 -56
- package/useListButton-0f18bf6a.mjs +0 -671
|
@@ -1,671 +0,0 @@
|
|
|
1
|
-
var De = Object.defineProperty, ve = Object.defineProperties;
|
|
2
|
-
var Ee = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var me = Object.getOwnPropertySymbols;
|
|
4
|
-
var Pe = Object.prototype.hasOwnProperty, Oe = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var ge = (i, f, u) => f in i ? De(i, f, { enumerable: !0, configurable: !0, writable: !0, value: u }) : i[f] = u, F = (i, f) => {
|
|
6
|
-
for (var u in f || (f = {}))
|
|
7
|
-
Pe.call(f, u) && ge(i, u, f[u]);
|
|
8
|
-
if (me)
|
|
9
|
-
for (var u of me(f))
|
|
10
|
-
Oe.call(f, u) && ge(i, u, f[u]);
|
|
11
|
-
return i;
|
|
12
|
-
}, Y = (i, f) => ve(i, Ee(f));
|
|
13
|
-
var V = (i, f, u) => new Promise((R, w) => {
|
|
14
|
-
var S = (g) => {
|
|
15
|
-
try {
|
|
16
|
-
h(u.next(g));
|
|
17
|
-
} catch (D) {
|
|
18
|
-
w(D);
|
|
19
|
-
}
|
|
20
|
-
}, d = (g) => {
|
|
21
|
-
try {
|
|
22
|
-
h(u.throw(g));
|
|
23
|
-
} catch (D) {
|
|
24
|
-
w(D);
|
|
25
|
-
}
|
|
26
|
-
}, h = (g) => g.done ? R(g.value) : Promise.resolve(g.value).then(S, d);
|
|
27
|
-
h((u = u.apply(i, f)).next());
|
|
28
|
-
});
|
|
29
|
-
import { E as x, p as Re } from "./useExtendComponent-aa1cdfc8.mjs";
|
|
30
|
-
import { useRoute as Te } from "vue-router";
|
|
31
|
-
import { router as ke } from "/@/router";
|
|
32
|
-
import { ref as y, onBeforeUnmount as Fe, toRaw as M, nextTick as he, reactive as pe } from "vue";
|
|
33
|
-
import { defHttp as O } from "/@/utils/http/axios";
|
|
34
|
-
import { useMessage as we } from "/@/hooks/web/useMessage";
|
|
35
|
-
import { filterObj as Se } from "/@/utils/common/compUtils";
|
|
36
|
-
import { u as Me, G as Be } from "./useCustomHook-acb00837.mjs";
|
|
37
|
-
import { onMountedOrActivated as Ie } from "/@/hooks/core/onMountedOrActivated";
|
|
38
|
-
import { useModal as L } from "/@/components/Modal";
|
|
39
|
-
import { E as de, a as Ce } from "./constant-754f1a9d.mjs";
|
|
40
|
-
import { pick as Ne } from "lodash-es";
|
|
41
|
-
import { Modal as Ue } from "ant-design-vue";
|
|
42
|
-
import { useMethods as _e } from "/@/hooks/system/useMethods";
|
|
43
|
-
import { getToken as $e } from "/@/utils/auth";
|
|
44
|
-
import { goJmReportViewPage as Qe } from "/@/utils";
|
|
45
|
-
const je = {
|
|
46
|
-
acceptHrefParams: "<p> 跳转时获取的参数信息",
|
|
47
|
-
currentPage: "<p> 当前页数",
|
|
48
|
-
currentTableName: "<p> 当前表名",
|
|
49
|
-
description: "<p> 当前表描述",
|
|
50
|
-
hasChildrenField: "<p> 是否有子节点的字段名,仅树形表单下有效",
|
|
51
|
-
isDesForm: "<p> xx",
|
|
52
|
-
isTree: "<m> 是否是树形表单 ",
|
|
53
|
-
loadData: "<m> 加载列表数据",
|
|
54
|
-
pageSize: "<p> 每一页显示条数",
|
|
55
|
-
queryParam: "<p> 查询条件对象,每次点击查询后才会更新此数据",
|
|
56
|
-
selectedRowKeys: "<p> 选中的行的id数组",
|
|
57
|
-
sortField: "<p> 排序字段",
|
|
58
|
-
sortType: "<p> 排序规则",
|
|
59
|
-
total: "<p> 总页数",
|
|
60
|
-
foreignKeyValue: "<p> Erp一对多子表外键选中对应主表字段的值",
|
|
61
|
-
isErpSubTable: "<p> 是否Erp一对多子表",
|
|
62
|
-
foreignKeyField: "<p> Erp一对多子表外键字段",
|
|
63
|
-
themeTemplate: "<p> 主题模板",
|
|
64
|
-
isInnerSubTable: "<p> 是否内嵌一对多子表",
|
|
65
|
-
innerSubTableName: "<p> 内嵌一对多子表名",
|
|
66
|
-
mTableSelectedRcordId: "<p>内嵌主表展开行的id"
|
|
67
|
-
}, Ve = {
|
|
68
|
-
getColumns: "/online/cgform/api/getColumns/",
|
|
69
|
-
getQueryInfo: "/online/cgform/api/getQueryInfo/",
|
|
70
|
-
getData: "/online/cgform/api/getData/",
|
|
71
|
-
getTreeData: "/online/cgform/api/getTreeData/",
|
|
72
|
-
optPre: "/online/cgform/api/form/",
|
|
73
|
-
buttonAction: "/online/cgform/api/doButton",
|
|
74
|
-
exportXls: "/online/cgform/api/exportXlsOld/",
|
|
75
|
-
importXls: "/online/cgform/api/importXls/",
|
|
76
|
-
startProcess: "/act/process/extActProcess/startMutilProcess",
|
|
77
|
-
getErpColumns: "/online/cgform/api/getErpColumns/",
|
|
78
|
-
// 内嵌主题一对多子表数据请求接口
|
|
79
|
-
list: "/online/cgform/api/subform/list/"
|
|
80
|
-
};
|
|
81
|
-
let ye = {
|
|
82
|
-
sortField: "id",
|
|
83
|
-
sortType: "asc",
|
|
84
|
-
currentPage: 1,
|
|
85
|
-
pageSize: 10,
|
|
86
|
-
total: 0,
|
|
87
|
-
selectedRowKeys: [],
|
|
88
|
-
queryParam: {},
|
|
89
|
-
acceptHrefParams: {},
|
|
90
|
-
description: "",
|
|
91
|
-
currentTableName: "",
|
|
92
|
-
isDesForm: !1,
|
|
93
|
-
desFormCode: "",
|
|
94
|
-
cache: !1,
|
|
95
|
-
isTree: !1,
|
|
96
|
-
hasChildrenField: ""
|
|
97
|
-
};
|
|
98
|
-
const Ke = {
|
|
99
|
-
current: 1,
|
|
100
|
-
pageSize: 10,
|
|
101
|
-
pageSizeOptions: ["10", "20", "30"],
|
|
102
|
-
showTotal: (i, f) => f[0] + "-" + f[1] + " 共" + i + "条",
|
|
103
|
-
showQuickJumper: !0,
|
|
104
|
-
showSizeChanger: !0,
|
|
105
|
-
total: 0
|
|
106
|
-
}, { createMessage: K, createErrorModal: Le } = we();
|
|
107
|
-
function it(i = {}) {
|
|
108
|
-
var X;
|
|
109
|
-
const f = (X = i.code) != null ? X : "", u = y(f), R = Te(), w = y(), S = y(), d = y(!1), h = y([]), g = y(!0), D = y();
|
|
110
|
-
let E = {};
|
|
111
|
-
const B = {
|
|
112
|
-
execButtonEnhance: function(r, a) {
|
|
113
|
-
if (l[x][r])
|
|
114
|
-
if (Re === r)
|
|
115
|
-
m(r);
|
|
116
|
-
else {
|
|
117
|
-
let e = M(a);
|
|
118
|
-
return l[x][r].call(l, l, e);
|
|
119
|
-
}
|
|
120
|
-
else if (l[x][r + "_hook"])
|
|
121
|
-
if (a) {
|
|
122
|
-
let e = M(a);
|
|
123
|
-
m(r + "_hook", e);
|
|
124
|
-
} else
|
|
125
|
-
m(r + "_hook");
|
|
126
|
-
},
|
|
127
|
-
/**
|
|
128
|
-
* get 是否是树形表单
|
|
129
|
-
* @param status 如果有值 则视为set方法
|
|
130
|
-
*/
|
|
131
|
-
isTree: function(r) {
|
|
132
|
-
return typeof r == "boolean" ? (l.isTreeTable = r, r) : l.isTreeTable;
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
function m(r, a) {
|
|
136
|
-
let t = l[x][r].toLocaleString().match(Be);
|
|
137
|
-
if (t.length > 1) {
|
|
138
|
-
let n = t[1];
|
|
139
|
-
T(n, a);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
const l = new Proxy(je, {
|
|
143
|
-
get(r, a) {
|
|
144
|
-
if (typeof B[a] == "function")
|
|
145
|
-
return B[a];
|
|
146
|
-
{
|
|
147
|
-
let e = E[u.value];
|
|
148
|
-
return Reflect.get(e, a);
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
set(r, a, e) {
|
|
152
|
-
let t = Z();
|
|
153
|
-
return Reflect.set(typeof e == "function" ? B : t, a, e);
|
|
154
|
-
},
|
|
155
|
-
deleteProperty(r, a) {
|
|
156
|
-
return a === u.value ? (delete E[a], !0) : !1;
|
|
157
|
-
}
|
|
158
|
-
}), { executeJsEnhanced: T } = Me({}, l);
|
|
159
|
-
function I() {
|
|
160
|
-
let r = R.params.id;
|
|
161
|
-
return r || (r = ""), r;
|
|
162
|
-
}
|
|
163
|
-
Ie(() => {
|
|
164
|
-
!f && q();
|
|
165
|
-
}), Fe(() => {
|
|
166
|
-
delete E[u.value];
|
|
167
|
-
});
|
|
168
|
-
function Z() {
|
|
169
|
-
let r = E[u.value];
|
|
170
|
-
if (!r) {
|
|
171
|
-
i.themeTemplate == de && (ye.pageSize = 5);
|
|
172
|
-
let a = Object.assign({}, ye, { onlineUrl: Ve });
|
|
173
|
-
r = JSON.parse(JSON.stringify(a)), E[u.value] = r;
|
|
174
|
-
}
|
|
175
|
-
return r;
|
|
176
|
-
}
|
|
177
|
-
function ee() {
|
|
178
|
-
let r = {}, a = R.query;
|
|
179
|
-
a && (Object.keys(a).map((e) => {
|
|
180
|
-
r[e] = a[e];
|
|
181
|
-
}), l.acceptHrefParams = r);
|
|
182
|
-
}
|
|
183
|
-
function te(r = "") {
|
|
184
|
-
let a;
|
|
185
|
-
return r == de ? a = `${l.onlineUrl.getErpColumns}${u.value}` : a = `${l.onlineUrl.getColumns}${u.value}`, new Promise((e, t) => {
|
|
186
|
-
O.get(
|
|
187
|
-
{
|
|
188
|
-
url: a
|
|
189
|
-
},
|
|
190
|
-
{ isTransformResponse: !1 }
|
|
191
|
-
).then((n) => {
|
|
192
|
-
n.success ? e(n.result) : (K.warning(n.message), t());
|
|
193
|
-
}).catch(() => {
|
|
194
|
-
t();
|
|
195
|
-
});
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
function P() {
|
|
199
|
-
return new Promise((r, a) => {
|
|
200
|
-
let e = C(), t = `${l.onlineUrl.getData}${u.value}`;
|
|
201
|
-
l.isTree() === !0 ? t = `${l.onlineUrl.getTreeData}${u.value}` : l.isInnerSubTable === !0 && (t = `${l.onlineUrl.list}${l.innerSubTableName}/${l.mTableSelectedRcordId}`, e = { tabletype: 3 }), l.isErpSubTable === !0 && (e[l.foreignKeyField] = l.foreignKeyValue, delete e.hasQuery), O.get({ url: t, params: e }, { isTransformResponse: !1 }).then((n) => {
|
|
202
|
-
n.success ? (l.isInnerSubTable === !0 ? H({ records: n.result, total: n.result.length }) : H(n.result), r(!0)) : (n.message === "NO_DB_SYNC" ? Le({
|
|
203
|
-
title: "数据库未同步",
|
|
204
|
-
content: "请先同步数据库再查看此页面!",
|
|
205
|
-
// 点击确定后自动返回上一页
|
|
206
|
-
onOk: () => ke.back()
|
|
207
|
-
}) : K.warning(n.message), a(!1));
|
|
208
|
-
}).catch(() => {
|
|
209
|
-
let n = "请求列表数据异常!";
|
|
210
|
-
K.warning(n), a(!1);
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
function C() {
|
|
215
|
-
const { sortField: r, sortType: a, acceptHrefParams: e, queryParam: t } = l;
|
|
216
|
-
let n = {};
|
|
217
|
-
l.isTree(), n.hasQuery = "true";
|
|
218
|
-
let s = Object.assign({}, n, e, t, { column: r, order: a });
|
|
219
|
-
d.value ? (s.pageNo = d.value.current, s.pageSize = d.value.pageSize) : s.pageSize = -521;
|
|
220
|
-
let o = le();
|
|
221
|
-
return s.superQueryMatchType = o.matchType || "", s.superQueryParams = o.params || "", Se(s);
|
|
222
|
-
}
|
|
223
|
-
function H(r) {
|
|
224
|
-
let a = 0;
|
|
225
|
-
Number(r.total) > 0 ? (l.isTree() === !0 ? (h.value = _(r.records), he(() => {
|
|
226
|
-
z(h.value);
|
|
227
|
-
})) : h.value = r.records, a = Number(r.total)) : h.value = [], d.value && (d.value = Y(F({}, d.value), { total: a }));
|
|
228
|
-
}
|
|
229
|
-
function re(r, a, e) {
|
|
230
|
-
e && e.order ? (l.sortField = e.field, l.sortType = e.order == "ascend" ? "asc" : "desc") : (l.sortField = "id", l.sortType = "asc"), d.value && (d.value = r), P();
|
|
231
|
-
}
|
|
232
|
-
function J(r) {
|
|
233
|
-
l.description = r.description, l.currentTableName = r.currentTableName, l.isDesForm = r.isDesForm, l.desFormCode = r.desFormCode, l.ID = u.value;
|
|
234
|
-
let { acceptHrefParams: a, queryParam: e, superQuery: t, currentPage: n, pageSize: s } = l;
|
|
235
|
-
ee(), e ? w.value && w.value.initDefaultValues(e, a) : l.queryParam = {}, t ? S.value && S.value.initDefaultValues(t) : l.superQuery = { params: "", matchType: "" }, r.paginationFlag == "Y" ? d.value = Y(F({}, Ke), { current: n, pageSize: s }) : d.value = !1;
|
|
236
|
-
}
|
|
237
|
-
function ne() {
|
|
238
|
-
return V(this, null, function* () {
|
|
239
|
-
g.value = !0, yield he(), g.value = !1;
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
const N = {
|
|
243
|
-
loadData: P,
|
|
244
|
-
getLoadDataParams: C,
|
|
245
|
-
reloadTable: ne
|
|
246
|
-
};
|
|
247
|
-
Object.keys(N).map((r) => {
|
|
248
|
-
l[r] = N[r];
|
|
249
|
-
});
|
|
250
|
-
let ae = y(!1);
|
|
251
|
-
function U() {
|
|
252
|
-
return V(this, null, function* () {
|
|
253
|
-
d.value && (d.value = Y(F({}, d.value), { current: 1 })), i.themeTemplate !== de && l.clearSelectedRow(), yield P();
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
function _(r) {
|
|
257
|
-
if (r)
|
|
258
|
-
return r.map((a) => {
|
|
259
|
-
let e = l.hasChildrenField;
|
|
260
|
-
if (a[e] == "1") {
|
|
261
|
-
let t = { id: a.id + "_loadChild", name: "loading...", isLoading: !0 };
|
|
262
|
-
t.jeecg_row_key = t.id, a.children = [t];
|
|
263
|
-
}
|
|
264
|
-
return a;
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
const $ = y([]);
|
|
268
|
-
function A(r) {
|
|
269
|
-
$.value = r;
|
|
270
|
-
}
|
|
271
|
-
function z(r) {
|
|
272
|
-
let a = $.value;
|
|
273
|
-
if (a.length > 0) {
|
|
274
|
-
const { sortField: e, sortType: t, pidField: n } = l;
|
|
275
|
-
let s = Object.assign({}, { column: e, order: t });
|
|
276
|
-
s.hasQuery = "in";
|
|
277
|
-
let o = Object.assign({});
|
|
278
|
-
o.rule = "in", o.type = "text", o.val = a.join(","), o.field = n, o = [o], s.superQueryParams = encodeURI(JSON.stringify(o)), s.superQueryMatchType = "and", s.batchFlag = "true";
|
|
279
|
-
let c = `${l.onlineUrl.getTreeData}${u.value}`;
|
|
280
|
-
O.get({ url: c, params: s }, { isTransformResponse: !1 }).then((p) => {
|
|
281
|
-
if (p.success && p.result.records && p.result.records.length > 0) {
|
|
282
|
-
let b = p.result.records;
|
|
283
|
-
const Q = /* @__PURE__ */ new Map();
|
|
284
|
-
for (let j of b) {
|
|
285
|
-
let v = j[n];
|
|
286
|
-
if (a.join(",").includes(v)) {
|
|
287
|
-
let W = Q.get(v);
|
|
288
|
-
W == null && (W = []), W.push(j), Q.set(v, W);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
let fe = Q, G = (j) => {
|
|
292
|
-
j && j.forEach((v) => {
|
|
293
|
-
a.includes(v.id) && (v.children = _(fe.get(v.id)), G(v.children));
|
|
294
|
-
});
|
|
295
|
-
};
|
|
296
|
-
G(r);
|
|
297
|
-
}
|
|
298
|
-
}).catch(() => {
|
|
299
|
-
let p = "loadDataByExpandedRows请求列表数据异常!";
|
|
300
|
-
K.warning(p);
|
|
301
|
-
});
|
|
302
|
-
} else
|
|
303
|
-
return Promise.resolve();
|
|
304
|
-
}
|
|
305
|
-
function le() {
|
|
306
|
-
if (!l.superQuery)
|
|
307
|
-
return {};
|
|
308
|
-
const {
|
|
309
|
-
superQuery: { params: r, matchType: a },
|
|
310
|
-
currentTableName: e
|
|
311
|
-
} = l;
|
|
312
|
-
let t = e + "@", n = [];
|
|
313
|
-
if (r.length > 0)
|
|
314
|
-
for (let o of r) {
|
|
315
|
-
let c = F({}, o), p = c.field;
|
|
316
|
-
p.startsWith(t) && (c.field = p.replace(t, "")), n.push(c);
|
|
317
|
-
}
|
|
318
|
-
let s = n.length > 0 ? JSON.stringify(n) : "";
|
|
319
|
-
return {
|
|
320
|
-
params: encodeURIComponent(s),
|
|
321
|
-
matchType: a
|
|
322
|
-
};
|
|
323
|
-
}
|
|
324
|
-
const k = y(!1);
|
|
325
|
-
function ie(r, a) {
|
|
326
|
-
l.superQuery = {
|
|
327
|
-
params: r,
|
|
328
|
-
matchType: a
|
|
329
|
-
}, r.length == 0 || r.length == null ? k.value = !1 : k.value = !0, P();
|
|
330
|
-
}
|
|
331
|
-
const [se, { openModal: oe }] = L();
|
|
332
|
-
function ue(r) {
|
|
333
|
-
if (r || (r = {}), !r.row) {
|
|
334
|
-
let a = l.selectedRows;
|
|
335
|
-
if (!a || a.length == 0 || a.length > 1) {
|
|
336
|
-
K.warning("请选择一条数据");
|
|
337
|
-
return;
|
|
338
|
-
}
|
|
339
|
-
r.row = a[0];
|
|
340
|
-
}
|
|
341
|
-
r.code = u.value, oe(!0, r);
|
|
342
|
-
}
|
|
343
|
-
l.openCustomModal = ue;
|
|
344
|
-
function q() {
|
|
345
|
-
let r = I();
|
|
346
|
-
u.value = r;
|
|
347
|
-
}
|
|
348
|
-
!f && q();
|
|
349
|
-
function ce(r) {
|
|
350
|
-
let a = r.head.extConfigJson;
|
|
351
|
-
a && (D.value = JSON.parse(a));
|
|
352
|
-
}
|
|
353
|
-
return F({
|
|
354
|
-
ID: u,
|
|
355
|
-
onlineQueryFormOuter: w,
|
|
356
|
-
superQueryButtonRef: S,
|
|
357
|
-
loading: ae,
|
|
358
|
-
reload: U,
|
|
359
|
-
dataSource: h,
|
|
360
|
-
pagination: d,
|
|
361
|
-
tableReloading: g,
|
|
362
|
-
handleSpecialConfig: J,
|
|
363
|
-
onlineTableContext: l,
|
|
364
|
-
handleChangeInTable: re,
|
|
365
|
-
getColumnList: te,
|
|
366
|
-
getTreeDataByResult: _,
|
|
367
|
-
expandedRowKeys: $,
|
|
368
|
-
handleExpandedRowsChange: A,
|
|
369
|
-
onlineExtConfigJson: D,
|
|
370
|
-
handleFormConfig: ce,
|
|
371
|
-
superQueryStatus: k,
|
|
372
|
-
handleSuperQuery: ie,
|
|
373
|
-
registerCustomModal: se
|
|
374
|
-
}, N);
|
|
375
|
-
}
|
|
376
|
-
const be = "onl_";
|
|
377
|
-
function st(i, f, u = {}) {
|
|
378
|
-
const R = {
|
|
379
|
-
add: !0,
|
|
380
|
-
addSub: !0,
|
|
381
|
-
update: !0,
|
|
382
|
-
delete: !0,
|
|
383
|
-
batch_delete: !0,
|
|
384
|
-
import: !0,
|
|
385
|
-
export: !0,
|
|
386
|
-
detail: !0,
|
|
387
|
-
super_query: !0,
|
|
388
|
-
bpm: !0
|
|
389
|
-
}, [w, { openModal: S }] = L(), [d, { openModal: h }] = L(), [g, { openModal: D }] = L(), [E, { openModal: B }] = L(), { createMessage: m } = we(), l = pe(R), T = pe([]), I = pe([]);
|
|
390
|
-
function Z(e) {
|
|
391
|
-
if (T.length = 0, I.length = 0, e && e.length > 0)
|
|
392
|
-
for (let t = 0; t < e.length; t++) {
|
|
393
|
-
let n = Ne(e[t], "buttonCode", "buttonName", "buttonStyle", "optType", "exp", "buttonIcon");
|
|
394
|
-
n.buttonStyle == "button" ? I.push(n) : n.buttonStyle == "link" && T.push(n);
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
function ee(e) {
|
|
398
|
-
Object.keys(l).forEach((t) => {
|
|
399
|
-
l[t] = !0;
|
|
400
|
-
}), e && e.length > 0 && Object.keys(l).forEach((t) => {
|
|
401
|
-
e.indexOf(t) >= 0 && (l[t] = !1);
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
function te(e) {
|
|
405
|
-
let t = { isUpdate: !1 };
|
|
406
|
-
e && (t.param = e), S(!0, t);
|
|
407
|
-
}
|
|
408
|
-
function P(e) {
|
|
409
|
-
i.beforeEdit(e).then(() => {
|
|
410
|
-
S(!0, {
|
|
411
|
-
isUpdate: !0,
|
|
412
|
-
record: e
|
|
413
|
-
});
|
|
414
|
-
}).catch((t) => {
|
|
415
|
-
m.warning(t);
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
const C = (e) => ({
|
|
419
|
-
label: "删除",
|
|
420
|
-
popConfirm: {
|
|
421
|
-
title: "是否删除?",
|
|
422
|
-
confirm: H.bind(null, e)
|
|
423
|
-
}
|
|
424
|
-
});
|
|
425
|
-
function H(e) {
|
|
426
|
-
i.beforeDelete(e).then(() => {
|
|
427
|
-
z(e.id, !1);
|
|
428
|
-
}).catch((t) => {
|
|
429
|
-
m.warning(t);
|
|
430
|
-
});
|
|
431
|
-
}
|
|
432
|
-
function re(e) {
|
|
433
|
-
let t = U(e), n = t && (t == "1" || t == "3" || t == "4") || !t;
|
|
434
|
-
return M(l.update) === !0 && n ? [
|
|
435
|
-
{
|
|
436
|
-
label: "编辑",
|
|
437
|
-
onClick: (s) => {
|
|
438
|
-
u.editClickCallback && u.editClickCallback(e.id, s), P(e);
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
] : [];
|
|
442
|
-
}
|
|
443
|
-
function J(e) {
|
|
444
|
-
return {
|
|
445
|
-
label: "提交流程",
|
|
446
|
-
popConfirm: {
|
|
447
|
-
title: "确认提交流程吗?",
|
|
448
|
-
confirm: A.bind(null, e)
|
|
449
|
-
}
|
|
450
|
-
};
|
|
451
|
-
}
|
|
452
|
-
function ne(e) {
|
|
453
|
-
return {
|
|
454
|
-
label: "审批进度",
|
|
455
|
-
onClick: N.bind(null, e)
|
|
456
|
-
};
|
|
457
|
-
}
|
|
458
|
-
function N(e) {
|
|
459
|
-
const { currentTableName: t } = i;
|
|
460
|
-
let n = be + t, s = e.id;
|
|
461
|
-
B(!0, {
|
|
462
|
-
flowCode: n,
|
|
463
|
-
dataId: s
|
|
464
|
-
});
|
|
465
|
-
}
|
|
466
|
-
function ae(e, t = {}) {
|
|
467
|
-
let n = [];
|
|
468
|
-
if (M(l.detail) === !0 && n.push({
|
|
469
|
-
label: "详情",
|
|
470
|
-
onClick: _.bind(null, e)
|
|
471
|
-
}), t.themeTemplate != Ce && i.hasBpmStatus === !0 && M(l.bpm) === !0) {
|
|
472
|
-
let p = U(e);
|
|
473
|
-
!p || p == "1" ? n.push(J(e)) : n.push(ne(e));
|
|
474
|
-
}
|
|
475
|
-
if (f.value) {
|
|
476
|
-
let { reportPrintShow: p, reportPrintUrl: b } = f.value;
|
|
477
|
-
p && b && n.push({
|
|
478
|
-
label: "打印",
|
|
479
|
-
onClick() {
|
|
480
|
-
let Q = b, fe = e.id, G = $e();
|
|
481
|
-
Qe(Q, fe, G);
|
|
482
|
-
}
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
let s = U(e), o = s && s == "1" || !s;
|
|
486
|
-
M(l.delete) === !0 && o && n.push(C(e));
|
|
487
|
-
let c = T;
|
|
488
|
-
if (c && c.length > 0)
|
|
489
|
-
for (let p of c)
|
|
490
|
-
r(p.exp || "", e) === !0 && n.push({
|
|
491
|
-
label: p.buttonName,
|
|
492
|
-
onClick: k.bind(null, e, p.buttonCode, p.optType)
|
|
493
|
-
});
|
|
494
|
-
return n;
|
|
495
|
-
}
|
|
496
|
-
function U(e) {
|
|
497
|
-
const t = "bpm_status";
|
|
498
|
-
let n = e[t];
|
|
499
|
-
return n || (n = e[t.toUpperCase()]), n;
|
|
500
|
-
}
|
|
501
|
-
function _(e) {
|
|
502
|
-
D(!0, {
|
|
503
|
-
isUpdate: !0,
|
|
504
|
-
disableSubmit: !0,
|
|
505
|
-
record: e
|
|
506
|
-
});
|
|
507
|
-
}
|
|
508
|
-
function $(e) {
|
|
509
|
-
const {
|
|
510
|
-
currentTableName: t,
|
|
511
|
-
onlineUrl: { startProcess: n }
|
|
512
|
-
} = i;
|
|
513
|
-
let s = {
|
|
514
|
-
url: n,
|
|
515
|
-
params: {
|
|
516
|
-
flowCode: be + t,
|
|
517
|
-
id: e.id,
|
|
518
|
-
// TODO 流程表单没有
|
|
519
|
-
formUrl: "modules/bpm/task/form/OnlineFormDetail",
|
|
520
|
-
formUrlMobile: "check/onlineForm/detail"
|
|
521
|
-
}
|
|
522
|
-
}, o = { isTransformResponse: !1 };
|
|
523
|
-
return new Promise((c, p) => {
|
|
524
|
-
O.post(s, o).then((b) => {
|
|
525
|
-
b.success ? (c(b), m.success(b.message)) : (p(), m.warning(b.message));
|
|
526
|
-
});
|
|
527
|
-
});
|
|
528
|
-
}
|
|
529
|
-
function A(e) {
|
|
530
|
-
return V(this, null, function* () {
|
|
531
|
-
yield $(e), i.loadData();
|
|
532
|
-
});
|
|
533
|
-
}
|
|
534
|
-
function z(e, t = !0) {
|
|
535
|
-
let n = `${i.onlineUrl.optPre}${i.ID}/${e}`;
|
|
536
|
-
return new Promise((s, o) => {
|
|
537
|
-
O.delete(
|
|
538
|
-
{
|
|
539
|
-
url: n
|
|
540
|
-
},
|
|
541
|
-
{ isTransformResponse: !1 }
|
|
542
|
-
).then((c) => {
|
|
543
|
-
c.success ? (m.success(c.message), i.loadData(), t || u.singleDelCallback && u.singleDelCallback(e), s(!0)) : (m.warning(c.message), o());
|
|
544
|
-
});
|
|
545
|
-
});
|
|
546
|
-
}
|
|
547
|
-
function le() {
|
|
548
|
-
let e = i.selectedRowKeys;
|
|
549
|
-
if (e.length <= 0)
|
|
550
|
-
return m.warning("请选择一条记录!"), !1;
|
|
551
|
-
{
|
|
552
|
-
let t = [];
|
|
553
|
-
e.forEach(function(s) {
|
|
554
|
-
let o = s;
|
|
555
|
-
o && o.endsWith("_loadChild") && (o = o.replace("_loadChild", "")), t.indexOf(o) < 0 && t.push(o);
|
|
556
|
-
});
|
|
557
|
-
let n = t.join(",");
|
|
558
|
-
Ue.confirm({
|
|
559
|
-
title: "确认删除",
|
|
560
|
-
content: "是否删除选中数据",
|
|
561
|
-
okText: "确认",
|
|
562
|
-
cancelText: "取消",
|
|
563
|
-
onOk: () => V(this, null, function* () {
|
|
564
|
-
yield z(n), i.clearSelectedRow();
|
|
565
|
-
})
|
|
566
|
-
});
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
function k(e, t, n) {
|
|
570
|
-
if (n == "js")
|
|
571
|
-
i.execButtonEnhance(t, e);
|
|
572
|
-
else if (n == "action") {
|
|
573
|
-
let s = {
|
|
574
|
-
formId: i.ID,
|
|
575
|
-
buttonCode: t,
|
|
576
|
-
dataId: e.id
|
|
577
|
-
}, o = `${i.onlineUrl.buttonAction}`;
|
|
578
|
-
O.post(
|
|
579
|
-
{
|
|
580
|
-
url: o,
|
|
581
|
-
params: s
|
|
582
|
-
},
|
|
583
|
-
{ isTransformResponse: !1 }
|
|
584
|
-
).then((c) => {
|
|
585
|
-
c.success ? (i.loadData(), m.success("处理完成!")) : m.warning(c.message);
|
|
586
|
-
});
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
function ie(e) {
|
|
590
|
-
i.execButtonEnhance(e);
|
|
591
|
-
}
|
|
592
|
-
function se(e) {
|
|
593
|
-
let t = i.selectedRowKeys;
|
|
594
|
-
if (!t || t.length == 0)
|
|
595
|
-
return m.warning("请先选中一条记录"), !1;
|
|
596
|
-
let n = t.join(","), s = {
|
|
597
|
-
formId: i.ID,
|
|
598
|
-
buttonCode: e,
|
|
599
|
-
dataId: n
|
|
600
|
-
}, o = `${i.onlineUrl.buttonAction}`;
|
|
601
|
-
O.post(
|
|
602
|
-
{
|
|
603
|
-
url: o,
|
|
604
|
-
params: s
|
|
605
|
-
},
|
|
606
|
-
{ isTransformResponse: !1 }
|
|
607
|
-
).then((c) => {
|
|
608
|
-
c.success ? (i.loadData(), i.clearSelectedRow(), m.success("处理完成!")) : m.warning(c.message);
|
|
609
|
-
});
|
|
610
|
-
}
|
|
611
|
-
function oe() {
|
|
612
|
-
h(!0);
|
|
613
|
-
}
|
|
614
|
-
const ue = () => `${i.onlineUrl.importXls}${i.ID}`, { handleExportXlsx: q } = _e();
|
|
615
|
-
function ce() {
|
|
616
|
-
let e = i.getLoadDataParams(), t = i.selectedRowKeys;
|
|
617
|
-
t && t.length > 0 && (e.selections = t.join(",")), i.isErpSubTable === !0 && i.foreignKeyField && i.foreignKeyValue && (e[i.foreignKeyField] = i.foreignKeyValue);
|
|
618
|
-
let n = JSON.stringify(Se(e)), s = `${i.onlineUrl.exportXls}${i.ID}`;
|
|
619
|
-
const o = i.description;
|
|
620
|
-
return q(o, s, { paramsStr: n });
|
|
621
|
-
}
|
|
622
|
-
function X(e, t) {
|
|
623
|
-
const n = [];
|
|
624
|
-
e.split("||").forEach((o) => {
|
|
625
|
-
const c = [];
|
|
626
|
-
o.trim().split("&&").forEach((p) => {
|
|
627
|
-
c.push(a(p.trim(), t));
|
|
628
|
-
}), n.push(c.join("&&"));
|
|
629
|
-
});
|
|
630
|
-
const s = n.join("||");
|
|
631
|
-
return new Function(`return ${s}`)();
|
|
632
|
-
}
|
|
633
|
-
function r(e, t) {
|
|
634
|
-
return !e || e == "" ? !0 : e.indexOf("||") == -1 && e.indexOf("&&") == -1 ? a(e, t) : X(e, t);
|
|
635
|
-
}
|
|
636
|
-
function a(e, t) {
|
|
637
|
-
if (!e || e == "")
|
|
638
|
-
return !0;
|
|
639
|
-
let n = e.split("#"), s = t[n[0]], o = n[1].toLowerCase();
|
|
640
|
-
return o === "eq" ? s == n[2] : o === "ne" ? s != n[2] : o === "empty" ? n[2] === "true" ? !s || s == "" : s && s.length > 0 : o === "in" ? n[2].split(",").indexOf(String(s)) >= 0 : !1;
|
|
641
|
-
}
|
|
642
|
-
return {
|
|
643
|
-
buttonSwitch: l,
|
|
644
|
-
cgLinkButtonList: T,
|
|
645
|
-
cgTopButtonList: I,
|
|
646
|
-
importUrl: ue,
|
|
647
|
-
registerModal: w,
|
|
648
|
-
handleAdd: te,
|
|
649
|
-
handleEdit: P,
|
|
650
|
-
handleBatchDelete: le,
|
|
651
|
-
registerImportModal: d,
|
|
652
|
-
onImportExcel: oe,
|
|
653
|
-
onExportExcel: ce,
|
|
654
|
-
getDropDownActions: ae,
|
|
655
|
-
getActions: re,
|
|
656
|
-
cgButtonJsHandler: ie,
|
|
657
|
-
cgButtonActionHandler: se,
|
|
658
|
-
cgButtonLinkHandler: k,
|
|
659
|
-
initButtonList: Z,
|
|
660
|
-
initButtonSwitch: ee,
|
|
661
|
-
getDeleteButton: C,
|
|
662
|
-
handleSubmitFlow: A,
|
|
663
|
-
getSubmitFlowButton: J,
|
|
664
|
-
registerDetailModal: g,
|
|
665
|
-
registerBpmModal: E
|
|
666
|
-
};
|
|
667
|
-
}
|
|
668
|
-
export {
|
|
669
|
-
st as a,
|
|
670
|
-
it as u
|
|
671
|
-
};
|