@jeecg/online 3.5.3-beta2 → 3.5.3-vite4
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-2f71787c.mjs +125 -0
- package/AuthButtonTree-d73bccf5.mjs +156 -0
- package/AuthDataConfig-32cf23d2.mjs +212 -0
- package/AuthDataTree-03d62d3f.mjs +139 -0
- package/AuthFieldConfig-b1217a0c.mjs +139 -0
- package/AuthFieldTree-888e04a9.mjs +232 -0
- package/AuthManagerDrawer-f127b8a2.mjs +114 -0
- package/AuthSetterModal-37da78ed.mjs +261 -0
- package/CgformCopyList-3adab58f.mjs +245 -0
- package/CgformModal-6938d8c2.mjs +613 -0
- package/CgreportModal-77ec8c17.mjs +12 -0
- package/CgreportModal.vue_vue_type_script_setup_true_lang-52dcec5e.mjs +567 -0
- package/CheckDictTable-414313f2.mjs +211 -0
- package/CodeFileListModal-4831ce3d.mjs +158 -0
- package/CodeFileViewModal-5990dac4.mjs +244 -0
- package/CodeGeneratorModal-7df9e25d.mjs +234 -0
- package/CustomButtonList-1c9bd859.mjs +363 -0
- package/DBAttributeTable-cd1c41e5.mjs +473 -0
- package/DbToOnlineModal-dc5d2030.mjs +160 -0
- package/DetailForm-e4538e7a.mjs +446 -0
- package/EnhanceJavaModal-7f53d2ca.mjs +260 -0
- package/EnhanceJsHistory-c30805ce.mjs +184 -0
- package/EnhanceJsModal-0b133341.mjs +233 -0
- package/EnhanceSqlModal-33a94c83.mjs +259 -0
- package/ExtendConfigModal-60f2cf86.mjs +111 -0
- package/FieldExtendJsonModal-48f7d67f.mjs +220 -0
- package/FileSelectModal-64aaf623.mjs +91 -0
- package/ForeignKeyTable-cb1abd1d.mjs +69 -0
- package/IndexTable-4e94cd1f.mjs +89 -0
- package/JModalTip-abe1515a.mjs +46 -0
- package/JOnlineSearchSelect-5608a5cf.mjs +94 -0
- package/LeftDepart-ca7a7375.mjs +82 -0
- package/LeftRole-d0fa8398.mjs +86 -0
- package/LeftUser-0c88c240.mjs +105 -0
- package/LinkTableConfigModal-77d7c0b9.mjs +230 -0
- package/LinkTableFieldConfigModal-c5689ab0.mjs +178 -0
- package/LinkTableListPiece-34266919.mjs +34 -0
- package/ModalFormDemo-0eeea994.mjs +78 -0
- package/OnlCgformErpList-7a0388d8.mjs +425 -0
- package/OnlCgformErpSubTable-fc6ade76.mjs +388 -0
- package/OnlineAutoList-85e6a30d.mjs +472 -0
- package/OnlineAutoModal-2a146238.mjs +206 -0
- package/OnlineAutoTreeList-f8d0e100.mjs +495 -0
- package/OnlineCustomModal-456a85a6.mjs +227 -0
- package/OnlineDetailModal-f967f080.mjs +177 -0
- package/OnlineForm-630a22c2.mjs +778 -0
- package/OnlineFormDetail-1b216792.mjs +296 -0
- package/OnlineQueryForm-1c5949a7.mjs +378 -0
- package/OnlineSearchFormItem-7c2ea9ed.mjs +352 -0
- package/OnlineSelectCascade-c7baf52b.mjs +160 -0
- package/OnlineSubFormDetail-0aa4966c.mjs +140 -0
- package/PageAttributeTable-811185fd.mjs +404 -0
- package/ProcessOnlineForm-27be6f6f.mjs +177 -0
- package/QueryTable-4ba771ef.mjs +115 -0
- package/SuperQuery-3821f984.mjs +845 -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-fe20103a.mjs +6 -0
- package/enhance.api-138e6826.mjs +104 -0
- package/enhance.data-efc7e155.mjs +175 -0
- package/index-074b92e5.mjs +236 -0
- package/index-6a09a912.mjs +58 -0
- package/index-9d32ae88.mjs +313 -0
- package/main.index.js +7 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/useCgformList-2d6a5955.mjs +388 -0
- package/useExtendComponent-48d37d9b.mjs +3919 -0
- package/useListButton-cef1371a.mjs +656 -0
- package/useOnlinePopEvent-e9a042f8.mjs +19 -0
- package/useOnlineTest-0df0ae86.mjs +43 -0
- package/useSchemas-fc8d97ce.mjs +669 -0
- package/useTableSync-dc333087.mjs +83 -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 -524
- package/OnlineAutoModal.js +0 -226
- package/OnlineAutoTreeList.js +0 -553
- package/OnlineCustomModal.js +0 -286
- package/OnlineDetailModal.js +0 -190
- package/OnlineForm.js +0 -1018
- 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 -1021
- package/SuperQueryValComponent.js +0 -9
- package/SuperQueryValComponent.vue_vue_type_script_lang.js +0 -162
- 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,656 @@
|
|
|
1
|
+
var Pe = Object.defineProperty, ve = Object.defineProperties;
|
|
2
|
+
var be = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var fe = Object.getOwnPropertySymbols;
|
|
4
|
+
var Ee = Object.prototype.hasOwnProperty, Oe = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var pe = (l, u, i) => u in l ? Pe(l, u, { enumerable: !0, configurable: !0, writable: !0, value: i }) : l[u] = i, T = (l, u) => {
|
|
6
|
+
for (var i in u || (u = {}))
|
|
7
|
+
Ee.call(u, i) && pe(l, i, u[i]);
|
|
8
|
+
if (fe)
|
|
9
|
+
for (var i of fe(u))
|
|
10
|
+
Oe.call(u, i) && pe(l, i, u[i]);
|
|
11
|
+
return l;
|
|
12
|
+
}, q = (l, u) => ve(l, be(u));
|
|
13
|
+
var Q = (l, u, i) => new Promise((M, S) => {
|
|
14
|
+
var v = (m) => {
|
|
15
|
+
try {
|
|
16
|
+
y(i.next(m));
|
|
17
|
+
} catch (D) {
|
|
18
|
+
S(D);
|
|
19
|
+
}
|
|
20
|
+
}, p = (m) => {
|
|
21
|
+
try {
|
|
22
|
+
y(i.throw(m));
|
|
23
|
+
} catch (D) {
|
|
24
|
+
S(D);
|
|
25
|
+
}
|
|
26
|
+
}, y = (m) => m.done ? M(m.value) : Promise.resolve(m.value).then(v, p);
|
|
27
|
+
y((i = i.apply(l, u)).next());
|
|
28
|
+
});
|
|
29
|
+
import { E as X, S as Re } from "./useExtendComponent-48d37d9b.mjs";
|
|
30
|
+
import { useRoute as Me } from "vue-router";
|
|
31
|
+
import { router as Fe } from "/@/router";
|
|
32
|
+
import { ref as w, onBeforeUnmount as Te, toRaw as B, nextTick as de, reactive as ue } from "vue";
|
|
33
|
+
import { defHttp as R } from "/@/utils/http/axios";
|
|
34
|
+
import { useMessage as ye } from "/@/hooks/web/useMessage";
|
|
35
|
+
import { filterObj as we } from "/@/utils/common/compUtils";
|
|
36
|
+
import { u as Be, G as ke } from "./OnlineForm-630a22c2.mjs";
|
|
37
|
+
import { onMountedOrActivated as Ue } from "/@/hooks/core/onMountedOrActivated";
|
|
38
|
+
import { useModal as V } from "/@/components/Modal";
|
|
39
|
+
import { E as me } from "./constant-fe20103a.mjs";
|
|
40
|
+
import { pick as Ne } from "lodash-es";
|
|
41
|
+
import { Modal as _e } from "ant-design-vue";
|
|
42
|
+
import { useMethods as Ie } from "/@/hooks/system/useMethods";
|
|
43
|
+
import { getToken as Ce } from "/@/utils/auth";
|
|
44
|
+
import { goJmReportViewPage as Qe } from "/@/utils";
|
|
45
|
+
const $e = {
|
|
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
|
+
}, Ve = {
|
|
65
|
+
getColumns: "/online/cgform/api/getColumns/",
|
|
66
|
+
getQueryInfo: "/online/cgform/api/getQueryInfo/",
|
|
67
|
+
getData: "/online/cgform/api/getData/",
|
|
68
|
+
getTreeData: "/online/cgform/api/getTreeData/",
|
|
69
|
+
optPre: "/online/cgform/api/form/",
|
|
70
|
+
buttonAction: "/online/cgform/api/doButton",
|
|
71
|
+
exportXls: "/online/cgform/api/exportXlsOld/",
|
|
72
|
+
importXls: "/online/cgform/api/importXls/",
|
|
73
|
+
startProcess: "/act/process/extActProcess/startMutilProcess",
|
|
74
|
+
getErpColumns: "/online/cgform/api/getErpColumns/"
|
|
75
|
+
};
|
|
76
|
+
let ge = {
|
|
77
|
+
sortField: "id",
|
|
78
|
+
sortType: "asc",
|
|
79
|
+
currentPage: 1,
|
|
80
|
+
pageSize: 10,
|
|
81
|
+
total: 0,
|
|
82
|
+
selectedRowKeys: [],
|
|
83
|
+
queryParam: {},
|
|
84
|
+
acceptHrefParams: {},
|
|
85
|
+
description: "",
|
|
86
|
+
currentTableName: "",
|
|
87
|
+
isDesForm: !1,
|
|
88
|
+
desFormCode: "",
|
|
89
|
+
cache: !1,
|
|
90
|
+
isTree: !1,
|
|
91
|
+
hasChildrenField: ""
|
|
92
|
+
};
|
|
93
|
+
const Le = {
|
|
94
|
+
current: 1,
|
|
95
|
+
pageSize: 10,
|
|
96
|
+
pageSizeOptions: ["10", "20", "30"],
|
|
97
|
+
showTotal: (l, u) => u[0] + "-" + u[1] + " 共" + l + "条",
|
|
98
|
+
showQuickJumper: !0,
|
|
99
|
+
showSizeChanger: !0,
|
|
100
|
+
total: 0
|
|
101
|
+
}, { createMessage: $, createErrorModal: je } = ye();
|
|
102
|
+
function lt(l = {}) {
|
|
103
|
+
var r;
|
|
104
|
+
console.log("-------------------------useOnlineTableContext----------------------->");
|
|
105
|
+
const u = (r = l.code) != null ? r : "", i = w(u), M = Me(), S = w(), v = w(), p = w(!1), y = w([]), m = w(!0), D = w();
|
|
106
|
+
let b = {};
|
|
107
|
+
const d = {
|
|
108
|
+
execButtonEnhance: function(e, t) {
|
|
109
|
+
if (o[X][e])
|
|
110
|
+
if (Re === e)
|
|
111
|
+
g(e);
|
|
112
|
+
else {
|
|
113
|
+
let n = B(t);
|
|
114
|
+
return o[X][e].call(o, o, n);
|
|
115
|
+
}
|
|
116
|
+
else if (o[X][e + "_hook"])
|
|
117
|
+
if (t) {
|
|
118
|
+
let n = B(t);
|
|
119
|
+
g(e + "_hook", n);
|
|
120
|
+
} else
|
|
121
|
+
g(e + "_hook");
|
|
122
|
+
else
|
|
123
|
+
console.log("增强没找到!", e);
|
|
124
|
+
},
|
|
125
|
+
/**
|
|
126
|
+
* get 是否是树形表单
|
|
127
|
+
* @param status 如果有值 则视为set方法
|
|
128
|
+
*/
|
|
129
|
+
isTree: function(e) {
|
|
130
|
+
return typeof e == "boolean" ? (o.isTreeTable = e, e) : o.isTreeTable;
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
function g(e, t) {
|
|
134
|
+
let a = o[X][e].toLocaleString().match(ke);
|
|
135
|
+
if (a.length > 1) {
|
|
136
|
+
let s = a[1];
|
|
137
|
+
k(s, t);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
const o = new Proxy($e, {
|
|
141
|
+
get(e, t) {
|
|
142
|
+
if (typeof d[t] == "function")
|
|
143
|
+
return d[t];
|
|
144
|
+
{
|
|
145
|
+
let n = b[i.value];
|
|
146
|
+
return Reflect.get(n, t);
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
set(e, t, n) {
|
|
150
|
+
let a = G();
|
|
151
|
+
return Reflect.set(typeof n == "function" ? d : a, t, n);
|
|
152
|
+
},
|
|
153
|
+
deleteProperty(e, t) {
|
|
154
|
+
return t === i.value ? (delete b[t], !0) : !1;
|
|
155
|
+
}
|
|
156
|
+
}), { executeJsEnhanced: k } = Be({}, o);
|
|
157
|
+
function x() {
|
|
158
|
+
let e = M.params.id;
|
|
159
|
+
return e || (e = ""), e;
|
|
160
|
+
}
|
|
161
|
+
Ue(() => {
|
|
162
|
+
console.log("-------------------onMountedOrActivated-------------------"), !u && A();
|
|
163
|
+
}), Te(() => {
|
|
164
|
+
console.log("-------------------onBeforeUnmount-------------------"), delete b[i.value];
|
|
165
|
+
});
|
|
166
|
+
function G() {
|
|
167
|
+
let e = b[i.value];
|
|
168
|
+
if (!e) {
|
|
169
|
+
l.themeTemplate == me && (ge.pageSize = 5);
|
|
170
|
+
let t = Object.assign({}, ge, { onlineUrl: Ve });
|
|
171
|
+
e = JSON.parse(JSON.stringify(t)), b[i.value] = e;
|
|
172
|
+
}
|
|
173
|
+
return e;
|
|
174
|
+
}
|
|
175
|
+
function W() {
|
|
176
|
+
let e = {}, t = M.query;
|
|
177
|
+
t && (Object.keys(t).map((n) => {
|
|
178
|
+
e[n] = t[n];
|
|
179
|
+
}), o.acceptHrefParams = e);
|
|
180
|
+
}
|
|
181
|
+
function L(e = "") {
|
|
182
|
+
let t;
|
|
183
|
+
return e == me ? t = `${o.onlineUrl.getErpColumns}${i.value}` : t = `${o.onlineUrl.getColumns}${i.value}`, new Promise((n, a) => {
|
|
184
|
+
R.get(
|
|
185
|
+
{
|
|
186
|
+
url: t
|
|
187
|
+
},
|
|
188
|
+
{ isTransformResponse: !1 }
|
|
189
|
+
).then((s) => {
|
|
190
|
+
s.success ? n(s.result) : ($.warning(s.message), a());
|
|
191
|
+
}).catch(() => {
|
|
192
|
+
a();
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
function E() {
|
|
197
|
+
return new Promise((e, t) => {
|
|
198
|
+
let n = `${o.onlineUrl.getData}${i.value}`;
|
|
199
|
+
o.isTree() === !0 && (n = `${o.onlineUrl.getTreeData}${i.value}`);
|
|
200
|
+
let a = j();
|
|
201
|
+
o.isErpSubTable === !0 && (a[o.foreignKeyField] = o.foreignKeyValue, delete a.hasQuery), console.log("------查询参数-----", a), R.get({ url: n, params: a }, { isTransformResponse: !1 }).then((s) => {
|
|
202
|
+
console.log("--onlineList-查询列表数据", s), s.success ? (Y(s.result), e(!0)) : (s.message === "NO_DB_SYNC" ? je({
|
|
203
|
+
title: "数据库未同步",
|
|
204
|
+
content: "请先同步数据库再查看此页面!",
|
|
205
|
+
// 点击确定后自动返回上一页
|
|
206
|
+
onOk: () => Fe.back()
|
|
207
|
+
}) : $.warning(s.message), t(!1));
|
|
208
|
+
}).catch(() => {
|
|
209
|
+
let s = "请求列表数据异常!";
|
|
210
|
+
$.warning(s), t(!1);
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
function j() {
|
|
215
|
+
const { sortField: e, sortType: t, acceptHrefParams: n, queryParam: a } = o;
|
|
216
|
+
let s = {};
|
|
217
|
+
o.isTree() === !0 ? s.hasQuery = "false" : s.hasQuery = "true";
|
|
218
|
+
let c = Object.assign({}, s, n, a, { column: e, order: t });
|
|
219
|
+
p.value ? (c.pageNo = p.value.current, c.pageSize = p.value.pageSize) : c.pageSize = -521;
|
|
220
|
+
let f = J();
|
|
221
|
+
return c.superQueryMatchType = f.matchType || "", c.superQueryParams = f.params || "", we(c);
|
|
222
|
+
}
|
|
223
|
+
function Y(e) {
|
|
224
|
+
let t = 0;
|
|
225
|
+
Number(e.total) > 0 ? (o.isTree() === !0 ? (y.value = _(e.records), de(() => {
|
|
226
|
+
re(y.value);
|
|
227
|
+
})) : y.value = e.records, t = Number(e.total)) : y.value = [], p.value && (p.value = q(T({}, p.value), { total: t }));
|
|
228
|
+
}
|
|
229
|
+
function K(e, t, n) {
|
|
230
|
+
n && n.order ? (o.sortField = n.field, o.sortType = n.order == "ascend" ? "asc" : "desc") : (o.sortField = "id", o.sortType = "asc"), p.value && (p.value = e), E();
|
|
231
|
+
}
|
|
232
|
+
function Z(e) {
|
|
233
|
+
o.description = e.description, o.currentTableName = e.currentTableName, o.isDesForm = e.isDesForm, o.desFormCode = e.desFormCode, o.ID = i.value;
|
|
234
|
+
let { acceptHrefParams: t, queryParam: n, superQuery: a, currentPage: s, pageSize: c } = o;
|
|
235
|
+
W(), n ? S.value && S.value.initDefaultValues(n, t) : o.queryParam = {}, a ? v.value && v.value.initDefaultValues(a) : o.superQuery = { params: "", matchType: "" }, e.paginationFlag == "Y" ? p.value = q(T({}, Le), { current: s, pageSize: c }) : p.value = !1;
|
|
236
|
+
}
|
|
237
|
+
function ee() {
|
|
238
|
+
return Q(this, null, function* () {
|
|
239
|
+
m.value = !0, yield de(), m.value = !1;
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
const U = {
|
|
243
|
+
loadData: E,
|
|
244
|
+
getLoadDataParams: j,
|
|
245
|
+
reloadTable: ee
|
|
246
|
+
};
|
|
247
|
+
Object.keys(U).map((e) => {
|
|
248
|
+
o[e] = U[e];
|
|
249
|
+
});
|
|
250
|
+
let N = w(!1);
|
|
251
|
+
function te() {
|
|
252
|
+
return Q(this, null, function* () {
|
|
253
|
+
p.value && (p.value = q(T({}, p.value), { current: 1 })), o.clearSelectedRow(), yield E();
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
function _(e) {
|
|
257
|
+
if (e)
|
|
258
|
+
return e.map((t) => {
|
|
259
|
+
let n = o.hasChildrenField;
|
|
260
|
+
if (t[n] == "1") {
|
|
261
|
+
let a = { id: t.id + "_loadChild", name: "loading...", isLoading: !0 };
|
|
262
|
+
a.jeecg_row_key = a.id, t.children = [a];
|
|
263
|
+
}
|
|
264
|
+
return t;
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
const F = w([]);
|
|
268
|
+
function H(e) {
|
|
269
|
+
F.value = e;
|
|
270
|
+
}
|
|
271
|
+
function re(e) {
|
|
272
|
+
let t = F.value;
|
|
273
|
+
if (t.length > 0) {
|
|
274
|
+
const { sortField: n, sortType: a, pidField: s } = o;
|
|
275
|
+
let c = Object.assign({}, { column: n, order: a });
|
|
276
|
+
c.hasQuery = "in";
|
|
277
|
+
let f = Object.assign({});
|
|
278
|
+
f.rule = "in", f.type = "text", f.val = t.join(","), f.field = s, f = [f], c.superQueryParams = encodeURI(JSON.stringify(f)), c.superQueryMatchType = "and", c.batchFlag = "true";
|
|
279
|
+
let O = `${o.onlineUrl.getTreeData}${i.value}`;
|
|
280
|
+
console.log("--onlineList-查询子节点参数", f), R.get({ url: O, params: c }, { isTransformResponse: !1 }).then((h) => {
|
|
281
|
+
if (console.log("--onlineList-查询子节点列表数据", h), h.success && h.result.records && h.result.records.length > 0) {
|
|
282
|
+
let Se = h.result.records;
|
|
283
|
+
const ie = /* @__PURE__ */ new Map();
|
|
284
|
+
for (let C of Se) {
|
|
285
|
+
let P = C[s];
|
|
286
|
+
if (t.join(",").includes(P)) {
|
|
287
|
+
let z = ie.get(P);
|
|
288
|
+
z == null && (z = []), z.push(C), ie.set(P, z);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
let De = ie, ce = (C) => {
|
|
292
|
+
C && C.forEach((P) => {
|
|
293
|
+
t.includes(P.id) && (P.children = _(De.get(P.id)), ce(P.children));
|
|
294
|
+
});
|
|
295
|
+
};
|
|
296
|
+
ce(e);
|
|
297
|
+
}
|
|
298
|
+
}).catch(() => {
|
|
299
|
+
let h = "loadDataByExpandedRows请求列表数据异常!";
|
|
300
|
+
$.warning(h);
|
|
301
|
+
});
|
|
302
|
+
} else
|
|
303
|
+
return Promise.resolve();
|
|
304
|
+
}
|
|
305
|
+
function J() {
|
|
306
|
+
if (!o.superQuery)
|
|
307
|
+
return {};
|
|
308
|
+
const {
|
|
309
|
+
superQuery: { params: e, matchType: t },
|
|
310
|
+
currentTableName: n
|
|
311
|
+
} = o;
|
|
312
|
+
let a = n + "@", s = [];
|
|
313
|
+
if (e.length > 0)
|
|
314
|
+
for (let f of e) {
|
|
315
|
+
let O = T({}, f), h = O.field;
|
|
316
|
+
h.startsWith(a) && (O.field = h.replace(a, "")), s.push(O);
|
|
317
|
+
}
|
|
318
|
+
let c = s.length > 0 ? JSON.stringify(s) : "";
|
|
319
|
+
return console.log("高级查询条件", s, t), {
|
|
320
|
+
params: encodeURIComponent(c),
|
|
321
|
+
matchType: t
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
const I = w(!1);
|
|
325
|
+
function ne(e, t) {
|
|
326
|
+
o.superQuery = {
|
|
327
|
+
params: e,
|
|
328
|
+
matchType: t
|
|
329
|
+
}, e.length == 0 ? I.value = !1 : I.value = !0, E();
|
|
330
|
+
}
|
|
331
|
+
const [ae, { openModal: le }] = V();
|
|
332
|
+
function oe(e) {
|
|
333
|
+
if (e || (e = {}), !e.row) {
|
|
334
|
+
let t = o.selectedRows;
|
|
335
|
+
if (!t || t.length == 0 || t.length > 1) {
|
|
336
|
+
$.warning("请选择一条数据");
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
e.row = t[0];
|
|
340
|
+
}
|
|
341
|
+
e.code = i.value, le(!0, e);
|
|
342
|
+
}
|
|
343
|
+
o.openCustomModal = oe;
|
|
344
|
+
function A() {
|
|
345
|
+
let e = x();
|
|
346
|
+
i.value = e;
|
|
347
|
+
}
|
|
348
|
+
!u && A();
|
|
349
|
+
function se(e) {
|
|
350
|
+
let t = e.head.extConfigJson;
|
|
351
|
+
t && (D.value = JSON.parse(t));
|
|
352
|
+
}
|
|
353
|
+
return T({
|
|
354
|
+
ID: i,
|
|
355
|
+
onlineQueryFormOuter: S,
|
|
356
|
+
superQueryButtonRef: v,
|
|
357
|
+
loading: N,
|
|
358
|
+
reload: te,
|
|
359
|
+
dataSource: y,
|
|
360
|
+
pagination: p,
|
|
361
|
+
tableReloading: m,
|
|
362
|
+
handleSpecialConfig: Z,
|
|
363
|
+
onlineTableContext: o,
|
|
364
|
+
handleChangeInTable: K,
|
|
365
|
+
getColumnList: L,
|
|
366
|
+
getTreeDataByResult: _,
|
|
367
|
+
expandedRowKeys: F,
|
|
368
|
+
handleExpandedRowsChange: H,
|
|
369
|
+
onlineExtConfigJson: D,
|
|
370
|
+
handleFormConfig: se,
|
|
371
|
+
superQueryStatus: I,
|
|
372
|
+
handleSuperQuery: ne,
|
|
373
|
+
registerCustomModal: ae
|
|
374
|
+
}, U);
|
|
375
|
+
}
|
|
376
|
+
const he = "onl_";
|
|
377
|
+
function ot(l, u) {
|
|
378
|
+
const i = {
|
|
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
|
+
}, [M, { openModal: S }] = V(), [v, { openModal: p }] = V(), [y, { openModal: m }] = V(), [D, { openModal: b }] = V(), { createMessage: d } = ye(), g = ue(i), o = ue([]), k = ue([]);
|
|
390
|
+
function x(r) {
|
|
391
|
+
if (o.length = 0, k.length = 0, r && r.length > 0)
|
|
392
|
+
for (let e = 0; e < r.length; e++) {
|
|
393
|
+
let t = Ne(r[e], "buttonCode", "buttonName", "buttonStyle", "optType", "exp", "buttonIcon");
|
|
394
|
+
t.buttonStyle == "button" ? k.push(t) : t.buttonStyle == "link" && o.push(t);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
function G(r) {
|
|
398
|
+
Object.keys(g).forEach((e) => {
|
|
399
|
+
g[e] = !0;
|
|
400
|
+
}), r && r.length > 0 && Object.keys(g).forEach((e) => {
|
|
401
|
+
r.indexOf(e) >= 0 && (g[e] = !1);
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
function W(r) {
|
|
405
|
+
let e = { isUpdate: !1 };
|
|
406
|
+
r && (e.param = r), S(!0, e);
|
|
407
|
+
}
|
|
408
|
+
function L(r) {
|
|
409
|
+
l.beforeEdit(r).then(() => {
|
|
410
|
+
S(!0, {
|
|
411
|
+
isUpdate: !0,
|
|
412
|
+
record: r
|
|
413
|
+
});
|
|
414
|
+
}).catch((e) => {
|
|
415
|
+
d.warning(e);
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
const E = (r) => ({
|
|
419
|
+
label: "删除",
|
|
420
|
+
popConfirm: {
|
|
421
|
+
title: "是否删除?",
|
|
422
|
+
confirm: j.bind(null, r)
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
function j(r) {
|
|
426
|
+
l.beforeDelete(r).then(() => {
|
|
427
|
+
H(r.id);
|
|
428
|
+
}).catch((e) => {
|
|
429
|
+
d.warning(e);
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
function Y(r) {
|
|
433
|
+
let e = N(r), t = e && (e == "1" || e == "3" || e == "4") || !e;
|
|
434
|
+
return B(g.update) === !0 && t ? [
|
|
435
|
+
{
|
|
436
|
+
label: "编辑",
|
|
437
|
+
onClick: L.bind(null, r)
|
|
438
|
+
}
|
|
439
|
+
] : [];
|
|
440
|
+
}
|
|
441
|
+
function K(r) {
|
|
442
|
+
return {
|
|
443
|
+
label: "提交流程",
|
|
444
|
+
popConfirm: {
|
|
445
|
+
title: "确认提交流程吗?",
|
|
446
|
+
confirm: F.bind(null, r)
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
function Z(r) {
|
|
451
|
+
return {
|
|
452
|
+
label: "审批进度",
|
|
453
|
+
onClick: ee.bind(null, r)
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
function ee(r) {
|
|
457
|
+
const { currentTableName: e } = l;
|
|
458
|
+
let t = he + e, n = r.id;
|
|
459
|
+
b(!0, {
|
|
460
|
+
flowCode: t,
|
|
461
|
+
dataId: n
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
function U(r) {
|
|
465
|
+
let e = [];
|
|
466
|
+
if (B(g.detail) === !0 && e.push({
|
|
467
|
+
label: "详情",
|
|
468
|
+
onClick: te.bind(null, r)
|
|
469
|
+
}), l.hasBpmStatus === !0 && B(g.bpm) === !0) {
|
|
470
|
+
let s = N(r);
|
|
471
|
+
!s || s == "1" ? e.push(K(r)) : e.push(Z(r));
|
|
472
|
+
}
|
|
473
|
+
if (u.value) {
|
|
474
|
+
let { reportPrintShow: s, reportPrintUrl: c } = u.value;
|
|
475
|
+
s && c && e.push({
|
|
476
|
+
label: "打印",
|
|
477
|
+
onClick() {
|
|
478
|
+
let f = c, O = r.id, h = Ce();
|
|
479
|
+
Qe(f, O, h);
|
|
480
|
+
}
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
let t = N(r), n = t && t == "1" || !t;
|
|
484
|
+
B(g.delete) === !0 && n && e.push(E(r));
|
|
485
|
+
let a = o;
|
|
486
|
+
if (a && a.length > 0)
|
|
487
|
+
for (let s of a)
|
|
488
|
+
se(s.exp || "", r) === !0 && e.push({
|
|
489
|
+
label: s.buttonName,
|
|
490
|
+
onClick: J.bind(null, r, s.buttonCode, s.optType)
|
|
491
|
+
});
|
|
492
|
+
return e;
|
|
493
|
+
}
|
|
494
|
+
function N(r) {
|
|
495
|
+
const e = "bpm_status";
|
|
496
|
+
let t = r[e];
|
|
497
|
+
return t || (t = r[e.toUpperCase()]), t;
|
|
498
|
+
}
|
|
499
|
+
function te(r) {
|
|
500
|
+
m(!0, {
|
|
501
|
+
isUpdate: !0,
|
|
502
|
+
disableSubmit: !0,
|
|
503
|
+
record: r
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
function _(r) {
|
|
507
|
+
const {
|
|
508
|
+
currentTableName: e,
|
|
509
|
+
onlineUrl: { startProcess: t }
|
|
510
|
+
} = l;
|
|
511
|
+
let n = {
|
|
512
|
+
url: t,
|
|
513
|
+
params: {
|
|
514
|
+
flowCode: he + e,
|
|
515
|
+
id: r.id,
|
|
516
|
+
// TODO 流程表单没有
|
|
517
|
+
formUrl: "modules/bpm/task/form/OnlineFormDetail",
|
|
518
|
+
formUrlMobile: "check/onlineForm/detail"
|
|
519
|
+
}
|
|
520
|
+
}, a = { isTransformResponse: !1 };
|
|
521
|
+
return new Promise((s, c) => {
|
|
522
|
+
R.post(n, a).then((f) => {
|
|
523
|
+
f.success ? (s(f), d.success(f.message)) : (c(), d.warning(f.message));
|
|
524
|
+
});
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
function F(r) {
|
|
528
|
+
return Q(this, null, function* () {
|
|
529
|
+
yield _(r), l.loadData();
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
function H(r) {
|
|
533
|
+
console.log("删除数据id值", r);
|
|
534
|
+
let e = `${l.onlineUrl.optPre}${l.ID}/${r}`;
|
|
535
|
+
return new Promise((t, n) => {
|
|
536
|
+
R.delete(
|
|
537
|
+
{
|
|
538
|
+
url: e
|
|
539
|
+
},
|
|
540
|
+
{ isTransformResponse: !1 }
|
|
541
|
+
).then((a) => {
|
|
542
|
+
a.success ? (d.success(a.message), l.loadData(), t(!0)) : (d.warning(a.message), n());
|
|
543
|
+
});
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
function re() {
|
|
547
|
+
let r = l.selectedRowKeys;
|
|
548
|
+
if (r.length <= 0)
|
|
549
|
+
return d.warning("请选择一条记录!"), !1;
|
|
550
|
+
{
|
|
551
|
+
let e = [];
|
|
552
|
+
r.forEach(function(n) {
|
|
553
|
+
let a = n;
|
|
554
|
+
a && a.endsWith("_loadChild") && (a = a.replace("_loadChild", "")), e.indexOf(a) < 0 && e.push(a);
|
|
555
|
+
});
|
|
556
|
+
let t = e.join(",");
|
|
557
|
+
_e.confirm({
|
|
558
|
+
title: "确认删除",
|
|
559
|
+
content: "是否删除选中数据",
|
|
560
|
+
okText: "确认",
|
|
561
|
+
cancelText: "取消",
|
|
562
|
+
onOk: () => Q(this, null, function* () {
|
|
563
|
+
yield H(t), l.clearSelectedRow();
|
|
564
|
+
})
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
function J(r, e, t) {
|
|
569
|
+
if (t == "js")
|
|
570
|
+
l.execButtonEnhance(e, r);
|
|
571
|
+
else if (t == "action") {
|
|
572
|
+
let n = {
|
|
573
|
+
formId: l.ID,
|
|
574
|
+
buttonCode: e,
|
|
575
|
+
dataId: r.id
|
|
576
|
+
}, a = `${l.onlineUrl.buttonAction}`;
|
|
577
|
+
R.post(
|
|
578
|
+
{
|
|
579
|
+
url: a,
|
|
580
|
+
params: n
|
|
581
|
+
},
|
|
582
|
+
{ isTransformResponse: !1 }
|
|
583
|
+
).then((s) => {
|
|
584
|
+
s.success ? (l.loadData(), d.success("处理完成!")) : d.warning(s.message);
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
function I(r) {
|
|
589
|
+
l.execButtonEnhance(r);
|
|
590
|
+
}
|
|
591
|
+
function ne(r) {
|
|
592
|
+
let e = l.selectedRowKeys;
|
|
593
|
+
if (!e || e.length == 0)
|
|
594
|
+
return d.warning("请先选中一条记录"), !1;
|
|
595
|
+
let t = e.join(","), n = {
|
|
596
|
+
formId: l.ID,
|
|
597
|
+
buttonCode: r,
|
|
598
|
+
dataId: t
|
|
599
|
+
}, a = `${l.onlineUrl.buttonAction}`;
|
|
600
|
+
R.post(
|
|
601
|
+
{
|
|
602
|
+
url: a,
|
|
603
|
+
params: n
|
|
604
|
+
},
|
|
605
|
+
{ isTransformResponse: !1 }
|
|
606
|
+
).then((s) => {
|
|
607
|
+
s.success ? (l.loadData(), l.clearSelectedRow(), d.success("处理完成!")) : d.warning(s.message);
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
function ae() {
|
|
611
|
+
p(!0);
|
|
612
|
+
}
|
|
613
|
+
const le = () => `${l.onlineUrl.importXls}${l.ID}`, { handleExportXlsx: oe } = Ie();
|
|
614
|
+
function A() {
|
|
615
|
+
let r = l.getLoadDataParams(), e = l.selectedRowKeys;
|
|
616
|
+
e && e.length > 0 && (r.selections = e.join(",")), l.isErpSubTable === !0 && l.foreignKeyField && l.foreignKeyValue && (r[l.foreignKeyField] = l.foreignKeyValue);
|
|
617
|
+
let t = JSON.stringify(we(r)), n = `${l.onlineUrl.exportXls}${l.ID}`;
|
|
618
|
+
const a = l.description;
|
|
619
|
+
return oe(a, n, { paramsStr: t });
|
|
620
|
+
}
|
|
621
|
+
function se(r, e) {
|
|
622
|
+
if (!r || r == "")
|
|
623
|
+
return !0;
|
|
624
|
+
let t = r.split("#"), n = e[t[0]], a = t[1].toLowerCase();
|
|
625
|
+
return a === "eq" ? n == t[2] : a === "ne" ? n != t[2] : a === "empty" ? t[2] === "true" ? !n || n == "" : n && n.length > 0 : a === "in" ? t[2].split(",").indexOf(String(n)) >= 0 : !1;
|
|
626
|
+
}
|
|
627
|
+
return {
|
|
628
|
+
buttonSwitch: g,
|
|
629
|
+
cgLinkButtonList: o,
|
|
630
|
+
cgTopButtonList: k,
|
|
631
|
+
importUrl: le,
|
|
632
|
+
registerModal: M,
|
|
633
|
+
handleAdd: W,
|
|
634
|
+
handleEdit: L,
|
|
635
|
+
handleBatchDelete: re,
|
|
636
|
+
registerImportModal: v,
|
|
637
|
+
onImportExcel: ae,
|
|
638
|
+
onExportExcel: A,
|
|
639
|
+
getDropDownActions: U,
|
|
640
|
+
getActions: Y,
|
|
641
|
+
cgButtonJsHandler: I,
|
|
642
|
+
cgButtonActionHandler: ne,
|
|
643
|
+
cgButtonLinkHandler: J,
|
|
644
|
+
initButtonList: x,
|
|
645
|
+
initButtonSwitch: G,
|
|
646
|
+
getDeleteButton: E,
|
|
647
|
+
handleSubmitFlow: F,
|
|
648
|
+
getSubmitFlowButton: K,
|
|
649
|
+
registerDetailModal: y,
|
|
650
|
+
registerBpmModal: D
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
export {
|
|
654
|
+
ot as a,
|
|
655
|
+
lt as u
|
|
656
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createContext as i } from "/@/hooks/core/useContext";
|
|
2
|
+
import r from "/@/utils/mitt";
|
|
3
|
+
import "vue";
|
|
4
|
+
const l = Symbol(), c = "openpopmodal";
|
|
5
|
+
function E(o) {
|
|
6
|
+
const t = r();
|
|
7
|
+
function e(n) {
|
|
8
|
+
o(n), console.log("事件触发完成,", n);
|
|
9
|
+
}
|
|
10
|
+
t.on(c, e), m({
|
|
11
|
+
onlineEmitter: t
|
|
12
|
+
}), console.log("事件绑完成,");
|
|
13
|
+
}
|
|
14
|
+
function m(o) {
|
|
15
|
+
return i(o, l, { readonly: !1, native: !0 });
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
E as u
|
|
19
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ref as n } from "vue";
|
|
2
|
+
function D(b, h, p) {
|
|
3
|
+
const a = n(!1), o = n([]), i = n([]);
|
|
4
|
+
function c() {
|
|
5
|
+
}
|
|
6
|
+
function l(e) {
|
|
7
|
+
}
|
|
8
|
+
function s(e) {
|
|
9
|
+
}
|
|
10
|
+
function f(e, t, J) {
|
|
11
|
+
}
|
|
12
|
+
function u(e, t) {
|
|
13
|
+
}
|
|
14
|
+
function r() {
|
|
15
|
+
}
|
|
16
|
+
function d(e) {
|
|
17
|
+
console.log("表的配置信息", JSON.stringify(e)), console.log("---------------------------------------");
|
|
18
|
+
}
|
|
19
|
+
function g(e) {
|
|
20
|
+
}
|
|
21
|
+
function m(e, t) {
|
|
22
|
+
}
|
|
23
|
+
function T(e) {
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
aiTestMode: a,
|
|
27
|
+
aiTestTable: o,
|
|
28
|
+
aiTableList: i,
|
|
29
|
+
initVirtualData: c,
|
|
30
|
+
genButtons: l,
|
|
31
|
+
genEnhanceJavaData: s,
|
|
32
|
+
genEnhanceJsData: f,
|
|
33
|
+
genEnhanceSqlData: u,
|
|
34
|
+
setTaleConfig: r,
|
|
35
|
+
tableJsonGetHelper: d,
|
|
36
|
+
fieldsJsonGetHelper: g,
|
|
37
|
+
refreshCacheTableName: m,
|
|
38
|
+
getCacheTableName: T
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
D as u
|
|
43
|
+
};
|