super-page-runtime 2.0.49-beta1 → 2.0.52
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/dist/es/components/runtime/utils/assemblys-config.js +6 -0
- package/dist/es/components/runtime/utils/common-util.d.ts +1 -1
- package/dist/es/components/runtime/utils/common-util.js +2 -2
- package/dist/es/components/runtime/utils/events/print-label.js +2 -1
- package/dist/es/components/runtime/utils/events/standard-event.js +72 -40
- package/dist/es/components/runtime/utils/events/validator-util.js +26 -6
- package/dist/es/components/runtime/utils/page-helper-util.js +2 -41
- package/dist/es/components/runtime/utils/page-init-util.js +13 -1
- package/dist/es/components/runtime/utils/table-utils.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +10 -2
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +20 -0
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +35 -27
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +14 -2
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +35 -5
- package/dist/es/components/runtime/views/super-page.vue.js +21 -4
- package/package.json +2 -2
|
@@ -188,6 +188,12 @@ const assemblyGroups = [
|
|
|
188
188
|
runtimeComponent: defineAsyncComponent(() => {
|
|
189
189
|
return import("../views/assemblys/button/print-label/printlabel-runtime.vue.js");
|
|
190
190
|
})
|
|
191
|
+
}, {
|
|
192
|
+
name: "export-pdf",
|
|
193
|
+
label: "打印标签",
|
|
194
|
+
runtimeComponent: defineAsyncComponent(() => {
|
|
195
|
+
return import("../views/assemblys/button/export-pdf/exportpdf-runtime.vue.js");
|
|
196
|
+
})
|
|
191
197
|
}]
|
|
192
198
|
},
|
|
193
199
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare function isArrayFn(value: any): boolean;
|
|
2
2
|
export declare function getBaseUrl(backendUrl: any, isTest?: boolean): any;
|
|
3
|
-
export declare function getRealRestApiPath(orgRestApiPath: any, systemCode: any, backendUrl: any): any;
|
|
3
|
+
export declare function getRealRestApiPath(orgRestApiPath: any, systemCode: any, backendUrl: any, isTest?: boolean): any;
|
|
4
4
|
/**
|
|
5
5
|
* 封装模板文件列表
|
|
6
6
|
* @param templateFiles
|
|
@@ -18,11 +18,11 @@ function getBaseUrl(backendUrl, isTest) {
|
|
|
18
18
|
return baseUrl;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
function getRealRestApiPath(orgRestApiPath, systemCode, backendUrl) {
|
|
21
|
+
function getRealRestApiPath(orgRestApiPath, systemCode, backendUrl, isTest) {
|
|
22
22
|
let path = orgRestApiPath;
|
|
23
23
|
if (orgRestApiPath) {
|
|
24
24
|
if (backendUrl && !isFullPath(orgRestApiPath)) {
|
|
25
|
-
const baseUrl = getBaseUrl(backendUrl);
|
|
25
|
+
const baseUrl = getBaseUrl(backendUrl, isTest);
|
|
26
26
|
path = baseUrl + "/" + systemCode + orgRestApiPath;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import http from "agilebuilder-ui/src/utils/request";
|
|
2
|
-
import { hiprint } from "vue-plugin-hiprint";
|
|
2
|
+
import { disAutoConnect, hiprint } from "vue-plugin-hiprint";
|
|
3
3
|
import { generateCodeByRule } from "../barcode-util.js";
|
|
4
|
+
disAutoConnect();
|
|
4
5
|
function printLabel(params, templateUuid) {
|
|
5
6
|
http.post(window["$vueApp"].config.globalProperties.baseAPI + "/dc/print-models/by-codes", [
|
|
6
7
|
templateUuid
|
|
@@ -35,7 +35,9 @@ const standardEvents = {
|
|
|
35
35
|
exportPDF: function(params) {
|
|
36
36
|
console.log("表单标准事件导出报告exportPDF--params=", params);
|
|
37
37
|
const pageContext = params.pageContext;
|
|
38
|
-
pageContext.code;
|
|
38
|
+
const pagCode = pageContext.code;
|
|
39
|
+
const eventPageInfo = pagCode + "_";
|
|
40
|
+
eventBus.$emit(eventPageInfo + "export-pdf-report", params);
|
|
39
41
|
},
|
|
40
42
|
// 表单标准事件提交submit
|
|
41
43
|
submit: function(params) {
|
|
@@ -275,8 +277,10 @@ function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
|
|
|
275
277
|
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
276
278
|
param["additionalParamMap"] = additionalParamMap;
|
|
277
279
|
let exportResult;
|
|
278
|
-
{
|
|
279
|
-
exportResult =
|
|
280
|
+
if (isPdf) {
|
|
281
|
+
exportResult = exportFormPdf(fileName, backendUrl, param, pageContext.isTest);
|
|
282
|
+
} else {
|
|
283
|
+
exportResult = exportFormReportSuccess(fileName, backendUrl, param, pageContext.isTest);
|
|
280
284
|
}
|
|
281
285
|
if (exportResult) {
|
|
282
286
|
exportResult.then(() => {
|
|
@@ -284,9 +288,9 @@ function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
|
|
|
284
288
|
});
|
|
285
289
|
}
|
|
286
290
|
}
|
|
287
|
-
function exportFormReportSuccess(fileName, backendUrl, param) {
|
|
291
|
+
function exportFormReportSuccess(fileName, backendUrl, param, isTest) {
|
|
288
292
|
return new Promise((resolve, reject) => {
|
|
289
|
-
const baseUrl = getBaseUrl(backendUrl);
|
|
293
|
+
const baseUrl = getBaseUrl(backendUrl, isTest);
|
|
290
294
|
const path = baseUrl + "/dsc/commons/export-reports";
|
|
291
295
|
axios.defaults.headers.common.Authorization = getToken();
|
|
292
296
|
const request = axios.post(path, param, {
|
|
@@ -316,6 +320,34 @@ function exportFormReportSuccess(fileName, backendUrl, param) {
|
|
|
316
320
|
});
|
|
317
321
|
});
|
|
318
322
|
}
|
|
323
|
+
function exportFormPdf(fileName, backendUrl, param, isTest) {
|
|
324
|
+
return new Promise((resolve, reject) => {
|
|
325
|
+
const baseUrl = getBaseUrl(backendUrl, isTest);
|
|
326
|
+
const path = baseUrl + "/dsc/commons/export-pdf";
|
|
327
|
+
axios.defaults.headers.common.Authorization = getToken();
|
|
328
|
+
const request = axios.post(path, param, {
|
|
329
|
+
headers: {
|
|
330
|
+
"content-type": "application/json"
|
|
331
|
+
},
|
|
332
|
+
responseType: "blob"
|
|
333
|
+
});
|
|
334
|
+
request.then((response) => {
|
|
335
|
+
const blob = new Blob([response.data]);
|
|
336
|
+
const elink = document.createElement("a");
|
|
337
|
+
elink.download = fileName.substring(0, fileName.lastIndexOf(".")) + ".pdf";
|
|
338
|
+
elink.style.display = "none";
|
|
339
|
+
elink.target = "_blank";
|
|
340
|
+
elink.href = URL.createObjectURL(blob);
|
|
341
|
+
document.body.appendChild(elink);
|
|
342
|
+
elink.click();
|
|
343
|
+
URL.revokeObjectURL(elink.href);
|
|
344
|
+
document.body.removeChild(elink);
|
|
345
|
+
resolve(true);
|
|
346
|
+
}).catch((error) => {
|
|
347
|
+
reject(error);
|
|
348
|
+
});
|
|
349
|
+
});
|
|
350
|
+
}
|
|
319
351
|
function saveFunc(params, isListButton) {
|
|
320
352
|
return new Promise((resolve, reject) => {
|
|
321
353
|
const pageContext = params.pageContext;
|
|
@@ -432,7 +464,7 @@ function getSaveFormRequestWithRow(pageContext, configureObj, url, isUnControlVe
|
|
|
432
464
|
param.tableName = otherParams.tableName;
|
|
433
465
|
}
|
|
434
466
|
}
|
|
435
|
-
return getSaveFormRequestByParam(systemCode, backendUrl, param, url, pageContext.entity.data);
|
|
467
|
+
return getSaveFormRequestByParam(systemCode, backendUrl, param, url, pageContext.entity.data, pageContext.isTest);
|
|
436
468
|
}
|
|
437
469
|
function getSaveFormRequest(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo) {
|
|
438
470
|
return getSaveFormRequestWithRow(
|
|
@@ -446,10 +478,10 @@ function getSaveFormRequest(pageContext, configureObj, url, isUnControlVersion,
|
|
|
446
478
|
null
|
|
447
479
|
);
|
|
448
480
|
}
|
|
449
|
-
function getSaveFormRequestByParam(systemCode, backendUrl, param, url, formData) {
|
|
450
|
-
const baseUrl = getBaseUrl(backendUrl);
|
|
481
|
+
function getSaveFormRequestByParam(systemCode, backendUrl, param, url, formData, isTest) {
|
|
482
|
+
const baseUrl = getBaseUrl(backendUrl, isTest);
|
|
451
483
|
let path = baseUrl + url;
|
|
452
|
-
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
484
|
+
path = getRealRestApiPath(path, systemCode, backendUrl, isTest);
|
|
453
485
|
let request;
|
|
454
486
|
if (formData && (formData.id || formData.ID)) {
|
|
455
487
|
request = http.put(path, param);
|
|
@@ -683,9 +715,9 @@ function getSubmitFormRequest(pageContext, configureObj, url, isUnControlVersion
|
|
|
683
715
|
ids2,
|
|
684
716
|
null
|
|
685
717
|
);
|
|
686
|
-
const baseUrl = getBaseUrl(backendUrl);
|
|
718
|
+
const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
|
|
687
719
|
let path = baseUrl + url;
|
|
688
|
-
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
720
|
+
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
689
721
|
http.post(path, param).then((result) => {
|
|
690
722
|
resolve(result);
|
|
691
723
|
}).catch((error) => {
|
|
@@ -722,9 +754,9 @@ function deleteFunc(params) {
|
|
|
722
754
|
const configureBase = configureObj.props.base;
|
|
723
755
|
const systemCode = pageContext.systemCode;
|
|
724
756
|
const backendUrl = pageContext.backendUrl;
|
|
725
|
-
const baseUrl = getBaseUrl(backendUrl);
|
|
757
|
+
const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
|
|
726
758
|
let path = baseUrl + "/dsc/commons/" + tableName;
|
|
727
|
-
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
759
|
+
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
728
760
|
const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
|
|
729
761
|
const isWorkflow = pageContext.workflowCode ? true : false;
|
|
730
762
|
const functionCodes = getPermissionCodes(configureObj, pageContext);
|
|
@@ -833,7 +865,7 @@ function downloadTemplateFunc(params) {
|
|
|
833
865
|
const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
|
|
834
866
|
param += "&isPermission=" + isPermission;
|
|
835
867
|
}
|
|
836
|
-
const baseUrl = getBaseUrl(backendUrl);
|
|
868
|
+
const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
|
|
837
869
|
window.open(baseUrl + "/dsc/commons/download-files" + param);
|
|
838
870
|
}
|
|
839
871
|
function doImportFinally(params, fileObj) {
|
|
@@ -891,9 +923,9 @@ function doImportFinally(params, fileObj) {
|
|
|
891
923
|
param.append("isPermission", isPermission + "");
|
|
892
924
|
const systemCode = pageContext.systemCode;
|
|
893
925
|
const backendUrl = pageContext.backendUrl;
|
|
894
|
-
const baseUrl = getBaseUrl(backendUrl);
|
|
926
|
+
const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
|
|
895
927
|
let path = baseUrl + "/dsc/commons/import-data";
|
|
896
|
-
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
928
|
+
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
897
929
|
http.post(path, param).then((data) => {
|
|
898
930
|
if (isAsync) {
|
|
899
931
|
ElMessage({
|
|
@@ -1076,8 +1108,8 @@ function workflowSaveFunc(params) {
|
|
|
1076
1108
|
const dataModel = pageContext.entity.data;
|
|
1077
1109
|
const systemCode = pageContext.systemCode;
|
|
1078
1110
|
const backendUrl = pageContext.backendUrl;
|
|
1079
|
-
let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons";
|
|
1080
|
-
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1111
|
+
let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons";
|
|
1112
|
+
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
1081
1113
|
if (!path) {
|
|
1082
1114
|
ElMessage({
|
|
1083
1115
|
showClose: true,
|
|
@@ -1169,8 +1201,8 @@ function submitProcessFunc(params) {
|
|
|
1169
1201
|
const pageContext = params.pageContext;
|
|
1170
1202
|
const systemCode = pageContext.systemCode;
|
|
1171
1203
|
const backendUrl = pageContext.backendUrl;
|
|
1172
|
-
let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/submit";
|
|
1173
|
-
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1204
|
+
let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/submit";
|
|
1205
|
+
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
1174
1206
|
if (!path) {
|
|
1175
1207
|
ElMessage({
|
|
1176
1208
|
showClose: true,
|
|
@@ -1206,8 +1238,8 @@ function completeTaskFunc(params, operationResult) {
|
|
|
1206
1238
|
const pageContext = params.pageContext;
|
|
1207
1239
|
const systemCode = pageContext.systemCode;
|
|
1208
1240
|
const backendUrl = pageContext.backendUrl;
|
|
1209
|
-
let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/complete-tasks";
|
|
1210
|
-
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1241
|
+
let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/complete-tasks";
|
|
1242
|
+
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
1211
1243
|
if (!path) {
|
|
1212
1244
|
ElMessage({
|
|
1213
1245
|
showClose: true,
|
|
@@ -1252,7 +1284,7 @@ function doAssign(params, selectNodeInfo) {
|
|
|
1252
1284
|
const pageContext = params.pageContext;
|
|
1253
1285
|
const configureObj = params.configureObj;
|
|
1254
1286
|
const backendUrl = pageContext.backendUrl;
|
|
1255
|
-
const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/assigns";
|
|
1287
|
+
const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/assigns";
|
|
1256
1288
|
const assigneeId = selectNodeInfo.id ? selectNodeInfo.id : selectNodeInfo.ID ? selectNodeInfo.ID : null;
|
|
1257
1289
|
const requestParam = getWorkflowSaveParams(params);
|
|
1258
1290
|
requestParam["assigneeId"] = assigneeId;
|
|
@@ -1313,8 +1345,8 @@ function doAddSigner(params, selectNodeInfo) {
|
|
|
1313
1345
|
const buttonConfigureObj = params.configureObj;
|
|
1314
1346
|
const systemCode = pageContext.systemCode;
|
|
1315
1347
|
const backendUrl = pageContext.backendUrl;
|
|
1316
|
-
let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/add-signers";
|
|
1317
|
-
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1348
|
+
let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/add-signers";
|
|
1349
|
+
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
1318
1350
|
if (!path) {
|
|
1319
1351
|
ElMessage({
|
|
1320
1352
|
showClose: true,
|
|
@@ -1353,8 +1385,8 @@ function doCreateCopyTask(params, selectNodeInfo) {
|
|
|
1353
1385
|
const buttonConfigureObj = params.configureObj;
|
|
1354
1386
|
const systemCode = pageContext.systemCode;
|
|
1355
1387
|
const backendUrl = pageContext.backendUrl;
|
|
1356
|
-
let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/add-signers";
|
|
1357
|
-
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1388
|
+
let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/add-signers";
|
|
1389
|
+
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
1358
1390
|
if (!path) {
|
|
1359
1391
|
ElMessage({
|
|
1360
1392
|
showClose: true,
|
|
@@ -1383,7 +1415,7 @@ function transactTask(params, requestParam, path, successMessageTip) {
|
|
|
1383
1415
|
const pageContext = params.pageContext;
|
|
1384
1416
|
const systemCode = pageContext.systemCode;
|
|
1385
1417
|
const backendUrl = pageContext.backendUrl;
|
|
1386
|
-
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1418
|
+
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
1387
1419
|
if (!path) {
|
|
1388
1420
|
ElMessage({
|
|
1389
1421
|
showClose: true,
|
|
@@ -1416,14 +1448,14 @@ function transactTask(params, requestParam, path, successMessageTip) {
|
|
|
1416
1448
|
function drawTaskFunc(params) {
|
|
1417
1449
|
const pageContext = params.pageContext;
|
|
1418
1450
|
const backendUrl = pageContext.backendUrl;
|
|
1419
|
-
const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/draw-tasks";
|
|
1451
|
+
const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/draw-tasks";
|
|
1420
1452
|
const requestParam = getWorkflowSaveParams(params);
|
|
1421
1453
|
return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulDrawTask");
|
|
1422
1454
|
}
|
|
1423
1455
|
function abandonReceiveFunc(params) {
|
|
1424
1456
|
const pageContext = params.pageContext;
|
|
1425
1457
|
const backendUrl = pageContext.backendUrl;
|
|
1426
|
-
const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/abandon-receives";
|
|
1458
|
+
const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/abandon-receives";
|
|
1427
1459
|
const requestParam = getWorkflowSaveParams(params);
|
|
1428
1460
|
return transactTask(
|
|
1429
1461
|
params,
|
|
@@ -1435,7 +1467,7 @@ function abandonReceiveFunc(params) {
|
|
|
1435
1467
|
function returnToPreviousTaskFunc(params) {
|
|
1436
1468
|
const pageContext = params.pageContext;
|
|
1437
1469
|
const backendUrl = pageContext.backendUrl;
|
|
1438
|
-
const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/return-to-previous-tasks";
|
|
1470
|
+
const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/return-to-previous-tasks";
|
|
1439
1471
|
const requestParam = getWorkflowSaveParams(params);
|
|
1440
1472
|
return transactTask(
|
|
1441
1473
|
params,
|
|
@@ -1447,7 +1479,7 @@ function returnToPreviousTaskFunc(params) {
|
|
|
1447
1479
|
function endInstanceFunc(params) {
|
|
1448
1480
|
const pageContext = params.pageContext;
|
|
1449
1481
|
const backendUrl = pageContext.backendUrl;
|
|
1450
|
-
const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/end-instance";
|
|
1482
|
+
const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/end-instance";
|
|
1451
1483
|
const requestParam = getWorkflowSaveParams(params);
|
|
1452
1484
|
return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulEndInstance");
|
|
1453
1485
|
}
|
|
@@ -1462,8 +1494,8 @@ function getTaskInformitions(params) {
|
|
|
1462
1494
|
const systemCode = pageContext.systemCode;
|
|
1463
1495
|
const backendUrl = pageContext.backendUrl;
|
|
1464
1496
|
const completeTaskParam = pageContext.completeTaskParam;
|
|
1465
|
-
let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/returnable-task/" + completeTaskParam.taskId;
|
|
1466
|
-
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1497
|
+
let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/returnable-task/" + completeTaskParam.taskId;
|
|
1498
|
+
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
1467
1499
|
if (!path) {
|
|
1468
1500
|
ElMessage({
|
|
1469
1501
|
showClose: true,
|
|
@@ -1486,7 +1518,7 @@ function doReturnTaskTo(params, selectTaskNode) {
|
|
|
1486
1518
|
const pageContext = params.pageContext;
|
|
1487
1519
|
const configureObj = params.configureObj;
|
|
1488
1520
|
const backendUrl = pageContext.backendUrl;
|
|
1489
|
-
const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/returnTaskTo";
|
|
1521
|
+
const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/returnTaskTo";
|
|
1490
1522
|
const requestParam = getWorkflowSaveParams(params);
|
|
1491
1523
|
if (selectTaskNode.nodeName) {
|
|
1492
1524
|
requestParam["returnToNodeName"] = selectTaskNode.nodeName;
|
|
@@ -1510,9 +1542,9 @@ function getRemoveSigner(params) {
|
|
|
1510
1542
|
const pageContext = params.pageContext;
|
|
1511
1543
|
const systemCode = pageContext.systemCode;
|
|
1512
1544
|
const backendUrl = pageContext.backendUrl;
|
|
1513
|
-
let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/get-remove-signers";
|
|
1545
|
+
let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/get-remove-signers";
|
|
1514
1546
|
const requestParam = getWorkflowSaveParams(params);
|
|
1515
|
-
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1547
|
+
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
1516
1548
|
if (!path) {
|
|
1517
1549
|
ElMessage({
|
|
1518
1550
|
showClose: true,
|
|
@@ -1529,8 +1561,8 @@ function doRemoveSigners(params, selectRemoveTasks) {
|
|
|
1529
1561
|
const configureObj = params.configureObj;
|
|
1530
1562
|
const systemCode = pageContext.systemCode;
|
|
1531
1563
|
const backendUrl = pageContext.backendUrl;
|
|
1532
|
-
let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/remove-signers";
|
|
1533
|
-
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1564
|
+
let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/remove-signers";
|
|
1565
|
+
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
1534
1566
|
if (!path) {
|
|
1535
1567
|
this.$message({
|
|
1536
1568
|
showClose: true,
|
|
@@ -1560,7 +1592,7 @@ function doRemoveSigners(params, selectRemoveTasks) {
|
|
|
1560
1592
|
function retrieveTaskFunc(params) {
|
|
1561
1593
|
const pageContext = params.pageContext;
|
|
1562
1594
|
const backendUrl = pageContext.backendUrl;
|
|
1563
|
-
const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/retrieves";
|
|
1595
|
+
const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/retrieves";
|
|
1564
1596
|
const requestParam = getWorkflowSaveParams(params);
|
|
1565
1597
|
return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulRetrieve");
|
|
1566
1598
|
}
|
|
@@ -74,10 +74,25 @@ function getEndObjectRule(rule, props, currentProp) {
|
|
|
74
74
|
}
|
|
75
75
|
function getValidator(columns) {
|
|
76
76
|
const rules = {};
|
|
77
|
+
if (columns) {
|
|
78
|
+
columns.forEach((editField) => {
|
|
79
|
+
const prop = editField.model;
|
|
80
|
+
if (prop && editField.validations) {
|
|
81
|
+
const validations = editField.validations;
|
|
82
|
+
if (prop.indexOf(".") > 0) {
|
|
83
|
+
setObjectPropRule(editField.prop, rules, validations);
|
|
84
|
+
} else {
|
|
85
|
+
if (validations && validations.length > 0) {
|
|
86
|
+
rules[prop] = [...validations];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
77
92
|
return rules;
|
|
78
93
|
}
|
|
79
94
|
function validator(entity, rules, columns, rowIndex, isSql) {
|
|
80
|
-
return validatorEntity(entity, rules, columns, rowIndex, true);
|
|
95
|
+
return validatorEntity(entity, rules, columns, rowIndex, true, isSql);
|
|
81
96
|
}
|
|
82
97
|
function sublistVerify(rules) {
|
|
83
98
|
if (!rules) {
|
|
@@ -103,7 +118,7 @@ function sublistVerify(rules) {
|
|
|
103
118
|
function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdate, isSql) {
|
|
104
119
|
let validateRules = sublistVerify(rules);
|
|
105
120
|
if ((!rules || rules === null) && columns) {
|
|
106
|
-
validateRules = getValidator();
|
|
121
|
+
validateRules = getValidator(columns);
|
|
107
122
|
}
|
|
108
123
|
if (!validateRules || Object.keys(validateRules).length === 0) {
|
|
109
124
|
entity["validateErrorField"] = "";
|
|
@@ -121,6 +136,11 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
|
|
|
121
136
|
if (errors) {
|
|
122
137
|
result = errors[0].message;
|
|
123
138
|
fieldName = errors[0]["field"];
|
|
139
|
+
if (typeof rowIndex !== "undefined" && rowIndex !== null) {
|
|
140
|
+
result = getI18n().t("superPageRuntimeMessage.recordLine", {
|
|
141
|
+
row: rowIndex + 1
|
|
142
|
+
}) + "," + result;
|
|
143
|
+
}
|
|
124
144
|
ElMessage({
|
|
125
145
|
message: result,
|
|
126
146
|
showClose: true,
|
|
@@ -133,11 +153,11 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
|
|
|
133
153
|
}
|
|
134
154
|
if (fieldName && isShouldRepeateValdate === true) {
|
|
135
155
|
const reg1 = /[A-Z]+/;
|
|
136
|
-
if (reg1.test(fieldName) && entity[fieldName.toLowerCase()] !== void 0) {
|
|
156
|
+
if (isSql !== void 0 && isSql === true && reg1.test(fieldName) && entity[fieldName.toLowerCase()] !== void 0) {
|
|
137
157
|
const copyEntity = JSON.parse(JSON.stringify(entity));
|
|
138
158
|
copyEntity[fieldName.toUpperCase()] = entity[fieldName.toLowerCase()];
|
|
139
159
|
delete copyEntity[fieldName.toLowerCase()];
|
|
140
|
-
result = validatorEntity(copyEntity, rules, columns, rowIndex, false);
|
|
160
|
+
result = validatorEntity(copyEntity, rules, columns, rowIndex, false, isSql);
|
|
141
161
|
}
|
|
142
162
|
}
|
|
143
163
|
}
|
|
@@ -185,7 +205,7 @@ function validateWorkflowFormDataModel(dataModel, pageContext) {
|
|
|
185
205
|
if (!rules || Object.keys(rules).length === 0) {
|
|
186
206
|
result = true;
|
|
187
207
|
} else {
|
|
188
|
-
result = validator(handleModels, rules, null, null);
|
|
208
|
+
result = validator(handleModels, rules, null, null, true);
|
|
189
209
|
}
|
|
190
210
|
if (result === true) {
|
|
191
211
|
const workflowFieldPermissionRules = pageContext.workflowRules;
|
|
@@ -249,7 +269,7 @@ function validateCommonFormDataModel(dataModel, pageContext, rules) {
|
|
|
249
269
|
if (!rules || Object.keys(rules).length === 0) {
|
|
250
270
|
resolve(handleModels);
|
|
251
271
|
} else {
|
|
252
|
-
const validateEntityResult = validator(handleModels, rules, null, null);
|
|
272
|
+
const validateEntityResult = validator(handleModels, rules, null, null, true);
|
|
253
273
|
if (validateEntityResult === true) {
|
|
254
274
|
const validateResult = validateSubTables(pageContext);
|
|
255
275
|
if (validateResult === true) {
|
|
@@ -77,7 +77,8 @@ function getTableQueryInfo(dataOriginInfo, pageContext2) {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
if (f.propValue)
|
|
80
|
+
if (f.propValue)
|
|
81
|
+
;
|
|
81
82
|
searchForm.push(tempObj);
|
|
82
83
|
}
|
|
83
84
|
infoObj.props.searchForm = searchForm;
|
|
@@ -242,45 +243,6 @@ function getChartDatasFromPage(pageContext2, configure2) {
|
|
|
242
243
|
function queryOptionDatasources(pageContext2, dataSourceConf, query) {
|
|
243
244
|
return updateOptionDatasources(pageContext2, dataSourceConf ? [dataSourceConf] : [], query);
|
|
244
245
|
}
|
|
245
|
-
function queryOptions(component, pageContext2, query) {
|
|
246
|
-
if (!component.props || !component.props.dataOrigin) {
|
|
247
|
-
return new Promise(function(resolve, reject) {
|
|
248
|
-
resolve([]);
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
const dataOriginInfo = component.props.dataOrigin;
|
|
252
|
-
if (dataOriginInfo.optionValueSetType == "dynamicData") {
|
|
253
|
-
if (!dataOriginInfo.dynamicDataSourceCode) {
|
|
254
|
-
return new Promise(function(resolve, reject) {
|
|
255
|
-
throw new Error("未指定动态数据源!");
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
return queryByDynamicCode(dataOriginInfo.dynamicDataSourceCode, query);
|
|
259
|
-
} else if (dataOriginInfo.optionValueSetType == "dataTable") {
|
|
260
|
-
if (!dataOriginInfo.tableName) {
|
|
261
|
-
return new Promise(function(resolve, reject) {
|
|
262
|
-
throw new Error("未指定查询的数据表!");
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
const tempObj = getTableQueryInfo(dataOriginInfo, pageContext2);
|
|
266
|
-
return queryByTable(tempObj);
|
|
267
|
-
} else {
|
|
268
|
-
return new Promise(function(resolve, reject) {
|
|
269
|
-
throw new Error("无有效的查询设置!");
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
function queryByDynamicCode(dynamicCode, query) {
|
|
274
|
-
const param = {
|
|
275
|
-
code: dynamicCode,
|
|
276
|
-
query
|
|
277
|
-
};
|
|
278
|
-
return http.post("", param);
|
|
279
|
-
}
|
|
280
|
-
function queryByTable(tableQueryInfo) {
|
|
281
|
-
const param = tableQueryInfo.props;
|
|
282
|
-
return http.post("", param);
|
|
283
|
-
}
|
|
284
246
|
function autoSetAfterSelect(component, pageContext2, autoSets, selItems) {
|
|
285
247
|
if (!autoSets || autoSets.length == 0) {
|
|
286
248
|
return;
|
|
@@ -668,7 +630,6 @@ export {
|
|
|
668
630
|
getVariableValue,
|
|
669
631
|
monitorFieldChange,
|
|
670
632
|
queryOptionDatasources,
|
|
671
|
-
queryOptions,
|
|
672
633
|
setValueForVariableName,
|
|
673
634
|
setVariableValue,
|
|
674
635
|
setVariableValueWithProp,
|
|
@@ -3,6 +3,7 @@ import { useRoute } from "vue-router";
|
|
|
3
3
|
import { getAdditionalParamMap } from "./events/standard-event.js";
|
|
4
4
|
import { PageDimensions } from "./interfaces/page-design-types.js";
|
|
5
5
|
import { formatVariableValue, setVariableValue, getFormPropName } from "./page-helper-util.js";
|
|
6
|
+
import { getSessionCache } from "agilebuilder-ui/src/utils/auth";
|
|
6
7
|
function queryPageDesignByCode(pageCode) {
|
|
7
8
|
return http.get(
|
|
8
9
|
window["$vueApp"].config.globalProperties.baseAPI + "/component/super-page-design/runtime/" + pageCode
|
|
@@ -107,9 +108,19 @@ function getRequestObject(pageRequest) {
|
|
|
107
108
|
}
|
|
108
109
|
if (route.query) {
|
|
109
110
|
Object.assign(requestObj, route.query);
|
|
111
|
+
const paramStoreId = route.query.paramStoreId;
|
|
112
|
+
if (paramStoreId) {
|
|
113
|
+
const additionalParamMapJson = getSessionCache(paramStoreId);
|
|
114
|
+
if (additionalParamMapJson) {
|
|
115
|
+
const additionalParamMap = JSON.parse(additionalParamMapJson);
|
|
116
|
+
Object.assign(requestObj, additionalParamMap);
|
|
117
|
+
console.log("已获取到附加参数", additionalParamMap);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
110
120
|
}
|
|
111
121
|
}
|
|
112
|
-
if (requestObj["_t_"])
|
|
122
|
+
if (requestObj["_t_"])
|
|
123
|
+
;
|
|
113
124
|
return requestObj;
|
|
114
125
|
}
|
|
115
126
|
function getModelFields(pageContext, formItemConfigure, prop) {
|
|
@@ -217,6 +228,7 @@ function queryPageSuperGrids(pageDesign, pageContext, publishVersion) {
|
|
|
217
228
|
}
|
|
218
229
|
function packageFormRules(pageContext, configure) {
|
|
219
230
|
var _a;
|
|
231
|
+
debugger;
|
|
220
232
|
const isWorkflow = pageContext.workflowCode ? true : false;
|
|
221
233
|
if (isWorkflow) {
|
|
222
234
|
if (configure.name !== "button-detail" && pageContext.fieldPermissionMap) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getBaseUrl } from "./common-util.js";
|
|
2
2
|
import http from "agilebuilder-ui/src/utils/request";
|
|
3
3
|
import eventBus from "./eventBus.js";
|
|
4
|
-
function getDataTypeMapRequest(backendUrl, tableName) {
|
|
5
|
-
const baseUrl = getBaseUrl(backendUrl);
|
|
4
|
+
function getDataTypeMapRequest(backendUrl, tableName, isTest) {
|
|
5
|
+
const baseUrl = getBaseUrl(backendUrl, isTest);
|
|
6
6
|
return http.get(baseUrl + "/dsc/commons/tables/" + tableName + "/data-types");
|
|
7
7
|
}
|
|
8
8
|
function popupToPage(params) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
|
|
2
2
|
import { ArrowDown } from "@element-plus/icons-vue";
|
|
3
3
|
import { formatVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
-
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
4
|
+
import { handleEvent, handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
5
5
|
const _hoisted_1 = { key: 1 };
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "dropdown-runtime",
|
|
@@ -45,6 +45,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
45
|
} else {
|
|
46
46
|
listOptions = ref(designProperty.value.options ? designProperty.value.options : []);
|
|
47
47
|
}
|
|
48
|
+
function visibleChange(isVisible) {
|
|
49
|
+
if (isVisible) {
|
|
50
|
+
handleFormEvent(isVisible, props.pageContext, props.configure, "menuShow");
|
|
51
|
+
} else {
|
|
52
|
+
handleFormEvent(isVisible, props.pageContext, props.configure, "menuHidden");
|
|
53
|
+
}
|
|
54
|
+
}
|
|
48
55
|
return (_ctx, _cache) => {
|
|
49
56
|
const _component_el_button = resolveComponent("el-button");
|
|
50
57
|
const _component_el_icon = resolveComponent("el-icon");
|
|
@@ -60,7 +67,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
60
67
|
disabled: designProperty.value.state === "disabled",
|
|
61
68
|
type: designProperty.value.buttonType,
|
|
62
69
|
size: designProperty.value.size,
|
|
63
|
-
trigger: designProperty.value.trigger
|
|
70
|
+
trigger: designProperty.value.trigger,
|
|
71
|
+
onVisibleChange: visibleChange
|
|
64
72
|
}, {
|
|
65
73
|
dropdown: withCtx(() => [
|
|
66
74
|
createVNode(_component_el_dropdown_menu, null, {
|
package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createBlock } from "vue";
|
|
2
|
+
import _sfc_main$1 from "../button/button-runtime.vue2.js";
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "exportpdf-runtime",
|
|
5
|
+
props: {
|
|
6
|
+
pageContext: {},
|
|
7
|
+
configure: {}
|
|
8
|
+
},
|
|
9
|
+
setup(__props) {
|
|
10
|
+
return (_ctx, _cache) => {
|
|
11
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
|
12
|
+
configure: _ctx.configure,
|
|
13
|
+
pageContext: _ctx.pageContext
|
|
14
|
+
}, null, 8, ["configure", "pageContext"]);
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
_sfc_main as default
|
|
20
|
+
};
|
|
@@ -90,7 +90,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
90
90
|
function getUrlToListData() {
|
|
91
91
|
let urlToListData2 = baseURL + "/dsc/commons/list";
|
|
92
92
|
if (urlToListData2) {
|
|
93
|
-
urlToListData2 = getRealRestApiPath(urlToListData2, systemCode, backendUrl);
|
|
93
|
+
urlToListData2 = getRealRestApiPath(urlToListData2, systemCode, backendUrl, pageContext.isTest);
|
|
94
94
|
}
|
|
95
95
|
return urlToListData2;
|
|
96
96
|
}
|
|
@@ -163,7 +163,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
163
163
|
if (!backendUrl && !tableName) {
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
|
-
getDataTypeMapRequest(backendUrl, tableName).then((result) => {
|
|
166
|
+
getDataTypeMapRequest(backendUrl, tableName, pageContext.isTest).then((result) => {
|
|
167
167
|
if (!pageContext["dataTypeMaps"]) {
|
|
168
168
|
pageContext["dataTypeMaps"] = {};
|
|
169
169
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createElementVNode, createTextVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
|
-
import {
|
|
3
|
+
import { getVariableValue, formatValueByType } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { SuperIcon } from "agilebuilder-ui";
|
|
5
|
-
import { handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import { getCustomFunc, handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
6
6
|
const _hoisted_1 = { style: { "overflow": "hidden", "white-space": "nowrap" } };
|
|
7
7
|
const _hoisted_2 = ["title"];
|
|
8
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -11,9 +11,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
11
11
|
pageContext: {},
|
|
12
12
|
configure: {}
|
|
13
13
|
},
|
|
14
|
-
setup(__props) {
|
|
14
|
+
setup(__props, { expose: __expose }) {
|
|
15
15
|
const props = __props;
|
|
16
|
-
|
|
16
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
17
|
+
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
17
18
|
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
18
19
|
const runtimeStyle = runtimeInfo.style;
|
|
19
20
|
const runtimeClass = runtimeInfo.class;
|
|
@@ -21,28 +22,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
22
|
const appendClass = runtimeInfo.appendClass;
|
|
22
23
|
const appendStyle = runtimeInfo.appendStyle;
|
|
23
24
|
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
24
|
-
const listOptions = designProperty.value.options ? designProperty.value.options : [];
|
|
25
|
-
const dataOrigin = props.configure.props && props.configure.props.dataOrigin ? props.configure.props.dataOrigin : {};
|
|
26
|
-
const valueType = dataOrigin.optionValueSetType;
|
|
27
|
-
if (valueType == "dynamicData" || valueType == "dynamicData" || valueType == "service") {
|
|
28
|
-
queryOptions(props.configure, props.pageContext, "").then((results) => {
|
|
29
|
-
listOptions.value = results;
|
|
30
|
-
}).catch((error) => {
|
|
31
|
-
console.log("lable组件查询数据源失败!", error);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
let contentVariable = designProperty.value.formatting;
|
|
35
|
-
if (!contentVariable) {
|
|
36
|
-
const propsBase = props.configure.props.base ? props.configure.props.base : {};
|
|
37
|
-
contentVariable = propsBase.prop;
|
|
38
|
-
}
|
|
39
|
-
if (!contentVariable) {
|
|
40
|
-
contentVariable = "${page." + props.configure.uuid + "}";
|
|
41
|
-
}
|
|
25
|
+
const listOptions = ref(designProperty.value.options ? designProperty.value.options : []);
|
|
42
26
|
const formatType = designProperty.value.formatType;
|
|
27
|
+
console.log("designProperty.value", designProperty.value);
|
|
43
28
|
const dynamicValue = computed(() => {
|
|
44
|
-
let resultValue =
|
|
45
|
-
console.log("formatType", formatType);
|
|
29
|
+
let resultValue = getVariableValue(entity, dynamicFields);
|
|
46
30
|
if (formatType) {
|
|
47
31
|
if (designProperty.value.hasOptions) {
|
|
48
32
|
let selItems = null;
|
|
@@ -52,11 +36,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
36
|
if (selItems && selItems.length > 0) {
|
|
53
37
|
resultValue = selItems[0].label;
|
|
54
38
|
}
|
|
39
|
+
} else if ("custom" === formatType) {
|
|
40
|
+
const func = getCustomFunc(props.pageContext, designProperty.value.formatFunc);
|
|
41
|
+
if (func) {
|
|
42
|
+
resultValue = func.apply(func, [
|
|
43
|
+
{
|
|
44
|
+
pageContext: props.pageContext,
|
|
45
|
+
configureObj: props.configure,
|
|
46
|
+
value: resultValue
|
|
47
|
+
}
|
|
48
|
+
]);
|
|
49
|
+
}
|
|
55
50
|
} else {
|
|
56
51
|
resultValue = formatValueByType(resultValue, formatType, designProperty.value);
|
|
57
52
|
}
|
|
58
53
|
}
|
|
59
|
-
|
|
54
|
+
resultValue = resultValue === void 0 || resultValue === null ? "" : resultValue;
|
|
55
|
+
return resultValue;
|
|
56
|
+
});
|
|
57
|
+
function updateOptions(newOptions) {
|
|
58
|
+
listOptions.value = newOptions ? newOptions : [];
|
|
59
|
+
}
|
|
60
|
+
__expose({
|
|
61
|
+
updateOptions
|
|
60
62
|
});
|
|
61
63
|
return (_ctx, _cache) => {
|
|
62
64
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
@@ -81,7 +83,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
81
83
|
createElementVNode("span", _hoisted_1, [
|
|
82
84
|
designProperty.value.preIconValue || designProperty.value.preText ? (openBlock(), createElementBlock("span", {
|
|
83
85
|
key: 0,
|
|
84
|
-
class: normalizeClass({
|
|
86
|
+
class: normalizeClass({
|
|
87
|
+
"el-input__suffix": designProperty.value.iconPosition != "outer",
|
|
88
|
+
"el-input-group__append": designProperty.value.iconPosition == "outer"
|
|
89
|
+
}),
|
|
85
90
|
style: normalizeStyle(unref(appendStyle))
|
|
86
91
|
}, [
|
|
87
92
|
designProperty.value.preIconType && designProperty.value.preIconValue ? (openBlock(), createBlock(unref(SuperIcon), {
|
|
@@ -95,7 +100,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
95
100
|
]),
|
|
96
101
|
designProperty.value.sufIconValue || designProperty.value.sufText ? (openBlock(), createElementBlock("span", {
|
|
97
102
|
key: 0,
|
|
98
|
-
class: normalizeClass({
|
|
103
|
+
class: normalizeClass({
|
|
104
|
+
"el-input__suffix": designProperty.value.iconPosition != "outer",
|
|
105
|
+
"el-input-group__append": designProperty.value.iconPosition == "outer"
|
|
106
|
+
})
|
|
99
107
|
}, [
|
|
100
108
|
designProperty.value.sufIconType && designProperty.value.sufIconValue ? (openBlock(), createBlock(unref(SuperIcon), {
|
|
101
109
|
key: 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, openBlock, createElementBlock, Fragment, renderList, createBlock, createCommentVNode } from "vue";
|
|
1
|
+
import { defineComponent, ref, openBlock, createElementBlock, Fragment, renderList, createBlock, createCommentVNode, unref, normalizeStyle, toDisplayString } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../../object-render.vue.js";
|
|
3
3
|
import { getClickEventFuncByType } from "../../../../utils/events/event-util.js";
|
|
4
4
|
import { isVisibleWorkflowButton } from "../../../../utils/events/standard-event.js";
|
|
@@ -16,6 +16,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
16
|
const buttonInfo = props.pageContext.workflowButtonComponent;
|
|
17
17
|
const completeTaskParam = props.pageContext.completeTaskParam;
|
|
18
18
|
const visibleBtns = ref([]);
|
|
19
|
+
let taskName = ref("");
|
|
20
|
+
let activityNameColor = "";
|
|
21
|
+
if (props.configure.props.base.showActivityName) {
|
|
22
|
+
activityNameColor = props.configure.props.base.activityNameColor || "red";
|
|
23
|
+
if (props.pageContext.entity && props.pageContext.entity.task && props.pageContext.entity.task.name) {
|
|
24
|
+
taskName.value = props.pageContext.entity.task.name;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
19
27
|
props.configure.items.forEach((item) => {
|
|
20
28
|
if (isVisibleBtn(item)) {
|
|
21
29
|
visibleBtns.value.push(item);
|
|
@@ -50,7 +58,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
58
|
configure: element
|
|
51
59
|
}, null, 8, ["pageContext", "configure"])) : createCommentVNode("", true)
|
|
52
60
|
], 64);
|
|
53
|
-
}), 256))
|
|
61
|
+
}), 256)),
|
|
62
|
+
unref(taskName) ? (openBlock(), createElementBlock("span", {
|
|
63
|
+
key: 0,
|
|
64
|
+
style: normalizeStyle({ color: unref(activityNameColor) })
|
|
65
|
+
}, " 当前环节: " + toDisplayString(unref(taskName)), 5)) : createCommentVNode("", true)
|
|
54
66
|
]);
|
|
55
67
|
};
|
|
56
68
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createCommentVNode } from "vue";
|
|
2
|
-
import "element-plus";
|
|
3
2
|
import _sfc_main$1 from "./super-page.vue.js";
|
|
4
3
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
4
|
__name: "super-page-dialog",
|
|
@@ -20,8 +19,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
19
|
const pageCode = ref(null);
|
|
21
20
|
const dataId = ref(null);
|
|
22
21
|
const taskId = ref(null);
|
|
22
|
+
const dialogType = ref(null);
|
|
23
23
|
const pageRequest = ref({});
|
|
24
|
+
const draggable = ref(false);
|
|
25
|
+
const overflow = ref(false);
|
|
26
|
+
const showPosition = ref("rtl");
|
|
24
27
|
if (myJumpPageSetting) {
|
|
28
|
+
dialogType.value = myJumpPageSetting && myJumpPageSetting["dialogType"] ? myJumpPageSetting["dialogType"] : "dialog";
|
|
29
|
+
draggable.value = myJumpPageSetting && myJumpPageSetting["draggable"] ? myJumpPageSetting["draggable"] : false;
|
|
30
|
+
overflow.value = myJumpPageSetting && myJumpPageSetting["overflow"] ? myJumpPageSetting["overflow"] : false;
|
|
31
|
+
showPosition.value = myJumpPageSetting && myJumpPageSetting["showPosition"] ? myJumpPageSetting["showPosition"] : "rtl";
|
|
25
32
|
title.value = myJumpPageSetting && myJumpPageSetting["jumpPageTitle"] ? myJumpPageSetting["jumpPageTitle"] : null;
|
|
26
33
|
width.value = myJumpPageSetting && myJumpPageSetting["jumpPageWidth"] ? myJumpPageSetting["jumpPageWidth"] : "100%";
|
|
27
34
|
pageCode.value = myJumpPageSetting && myJumpPageSetting["pageCode"];
|
|
@@ -52,12 +59,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
59
|
}
|
|
53
60
|
return (_ctx, _cache) => {
|
|
54
61
|
const _component_el_drawer = resolveComponent("el-drawer");
|
|
55
|
-
|
|
62
|
+
const _component_el_dialog = resolveComponent("el-dialog");
|
|
63
|
+
return dialogType.value && dialogType.value === "drawer" ? (openBlock(), createBlock(_component_el_drawer, {
|
|
64
|
+
key: 0,
|
|
56
65
|
modelValue: showContent.value,
|
|
57
66
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => showContent.value = $event),
|
|
58
|
-
"with-header": !title.value,
|
|
59
67
|
title: title.value,
|
|
60
|
-
direction:
|
|
68
|
+
direction: showPosition.value,
|
|
61
69
|
size: width.value,
|
|
62
70
|
onOpen: _cache[1] || (_cache[1] = ($event) => emits("open")),
|
|
63
71
|
onOpened: _cache[2] || (_cache[2] = ($event) => emits("opened")),
|
|
@@ -72,7 +80,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
72
80
|
}, null, 8, ["pageCode", "pageRequest"])) : createCommentVNode("", true)
|
|
73
81
|
]),
|
|
74
82
|
_: 1
|
|
75
|
-
}, 8, ["modelValue", "
|
|
83
|
+
}, 8, ["modelValue", "title", "direction", "size"])) : (openBlock(), createBlock(_component_el_dialog, {
|
|
84
|
+
key: 1,
|
|
85
|
+
"model-value": "",
|
|
86
|
+
title: title.value,
|
|
87
|
+
"close-on-click-modal": false,
|
|
88
|
+
"append-to-body": "",
|
|
89
|
+
width: width.value,
|
|
90
|
+
draggable: draggable.value,
|
|
91
|
+
overflow: overflow.value,
|
|
92
|
+
onOpen: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("open")),
|
|
93
|
+
onOpend: _cache[6] || (_cache[6] = ($event) => _ctx.$emit("opend")),
|
|
94
|
+
onClose: _cache[7] || (_cache[7] = ($event) => emits("close")),
|
|
95
|
+
onClosed: _cache[8] || (_cache[8] = ($event) => _ctx.$emit("closed"))
|
|
96
|
+
}, {
|
|
97
|
+
default: withCtx(() => [
|
|
98
|
+
pageCode.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
99
|
+
key: 0,
|
|
100
|
+
pageCode: pageCode.value,
|
|
101
|
+
pageRequest: pageRequest.value
|
|
102
|
+
}, null, 8, ["pageCode", "pageRequest"])) : createCommentVNode("", true)
|
|
103
|
+
]),
|
|
104
|
+
_: 1
|
|
105
|
+
}, 8, ["title", "width", "draggable", "overflow"]));
|
|
76
106
|
};
|
|
77
107
|
}
|
|
78
108
|
});
|
|
@@ -18,6 +18,7 @@ import _sfc_main$5 from "./super-page-dialog.vue.js";
|
|
|
18
18
|
import { useRoute, useRouter } from "vue-router";
|
|
19
19
|
import { jumpToPage } from "agilebuilder-ui/src/utils/jump-page-utils";
|
|
20
20
|
import { setSessionCache } from "agilebuilder-ui/src/utils/auth";
|
|
21
|
+
import { deepCopy } from "../utils/common-util.js";
|
|
21
22
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
22
23
|
__name: "super-page",
|
|
23
24
|
props: {
|
|
@@ -136,6 +137,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
136
137
|
buttonPageContext.value = params.pageContext;
|
|
137
138
|
showExportForm.value = true;
|
|
138
139
|
});
|
|
140
|
+
eventBus.$on(eventPageInfo.value + "export-pdf-report", (params) => {
|
|
141
|
+
buttonParams.value = params;
|
|
142
|
+
buttonConfigure.value = params.configureObj;
|
|
143
|
+
buttonPageContext.value = params.pageContext;
|
|
144
|
+
showExportForm.value = true;
|
|
145
|
+
});
|
|
139
146
|
eventBus.$on(eventPageInfo.value + "import-file", (params) => {
|
|
140
147
|
buttonParams.value = params;
|
|
141
148
|
clickImport();
|
|
@@ -182,7 +189,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
182
189
|
parentPageContext.value = params.pageContext;
|
|
183
190
|
parentConfigureObj.value = params.configureObj;
|
|
184
191
|
parentEventParams.value = params.eventParams;
|
|
185
|
-
params.jumpPageSetting;
|
|
186
192
|
openDialog(parentConfigureObj.value, parentEventParams.value, params.jumpPageSetting);
|
|
187
193
|
});
|
|
188
194
|
watch(
|
|
@@ -290,6 +296,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
290
296
|
removeCustomFuncFromWindow(pageDesignResult.value);
|
|
291
297
|
}
|
|
292
298
|
eventBus.$off(eventPageInfo.value + "export-form-report");
|
|
299
|
+
eventBus.$off(eventPageInfo.value + "export-pdf-report");
|
|
293
300
|
eventBus.$off(eventPageInfo.value + "import-file");
|
|
294
301
|
eventBus.$off(eventPageInfo.value + "assign-task");
|
|
295
302
|
eventBus.$off(eventPageInfo.value + "copy-task");
|
|
@@ -306,11 +313,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
306
313
|
showExportForm.value = false;
|
|
307
314
|
buttonParams.value = null;
|
|
308
315
|
}
|
|
309
|
-
function doExportFormReport(templateFile) {
|
|
316
|
+
function doExportFormReport(buttonConfigure2, templateFile) {
|
|
317
|
+
let isPdf = false;
|
|
318
|
+
if (buttonConfigure2.name === "export-pdf") {
|
|
319
|
+
isPdf = true;
|
|
320
|
+
}
|
|
310
321
|
exportFormReport(
|
|
311
322
|
buttonParams.value.pageContext,
|
|
312
323
|
buttonParams.value.configureObj,
|
|
313
|
-
templateFile
|
|
324
|
+
templateFile,
|
|
325
|
+
isPdf
|
|
314
326
|
);
|
|
315
327
|
}
|
|
316
328
|
const _selectFile_ = ref(null);
|
|
@@ -322,7 +334,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
322
334
|
if (!_selectFile_.value) {
|
|
323
335
|
return;
|
|
324
336
|
}
|
|
325
|
-
if (_selectFile_.value.value === "" || _selectFile_.value.value === null)
|
|
337
|
+
if (_selectFile_.value.value === "" || _selectFile_.value.value === null)
|
|
338
|
+
return;
|
|
326
339
|
const fileObj = _selectFile_.value.files[0];
|
|
327
340
|
if (fileObj) {
|
|
328
341
|
_selectFile_.value.value = null;
|
|
@@ -394,6 +407,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
394
407
|
function openDialog(configureObj, eventParams, myJumpPageSetting) {
|
|
395
408
|
getPopPageSetting(configureObj, eventParams, myJumpPageSetting).then((openPageParams) => {
|
|
396
409
|
if (openPageParams) {
|
|
410
|
+
const myJumpPageSettingOrg = configureObj && configureObj["props"] && configureObj["props"].linkPage ? configureObj["props"].linkPage : null;
|
|
411
|
+
if (myJumpPageSettingOrg) {
|
|
412
|
+
Object.assign(openPageParams, deepCopy(myJumpPageSettingOrg));
|
|
413
|
+
}
|
|
397
414
|
const jumpMode = openPageParams.jumpMode;
|
|
398
415
|
const popPageSetting = openPageParams;
|
|
399
416
|
popPageSetting.parentPageCode = parentPageContext.value.code;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-page-runtime",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.52",
|
|
4
4
|
"description": "AgileBuilder super page runtime",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/es/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
49
49
|
"@vue/eslint-config-prettier": "^8.0.0",
|
|
50
50
|
"@vue/test-utils": "^2.4.4",
|
|
51
|
-
"agilebuilder-ui": "1.0.
|
|
51
|
+
"agilebuilder-ui": "1.0.41",
|
|
52
52
|
"axios": "^1.6.8",
|
|
53
53
|
"cypress": "^13.6.6",
|
|
54
54
|
"element-plus": "^2.6.1",
|