super-page-runtime 2.0.49 → 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.
Files changed (25) hide show
  1. package/dist/es/components/runtime/utils/assemblys-config.js +13 -0
  2. package/dist/es/components/runtime/utils/common-util.d.ts +1 -1
  3. package/dist/es/components/runtime/utils/common-util.js +2 -2
  4. package/dist/es/components/runtime/utils/events/print-label.js +2 -1
  5. package/dist/es/components/runtime/utils/events/standard-event.js +55 -44
  6. package/dist/es/components/runtime/utils/page-helper-util.js +0 -40
  7. package/dist/es/components/runtime/utils/page-init-util.js +11 -0
  8. package/dist/es/components/runtime/utils/table-utils.js +2 -2
  9. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +10 -2
  10. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +4 -0
  11. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +20 -0
  12. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +10 -6
  13. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +10 -6
  14. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +1 -1
  15. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +2 -2
  16. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +4 -0
  17. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +48 -0
  18. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +1 -1
  19. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +35 -27
  20. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +21 -18
  21. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +67 -26
  22. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +14 -2
  23. package/dist/es/components/runtime/views/super-page-dialog.vue.js +35 -5
  24. package/dist/es/components/runtime/views/super-page.vue.js +17 -3
  25. 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
  {
@@ -263,6 +269,13 @@ const assemblyGroups = [
263
269
  return import("../views/assemblys/data/table/table-runtime.vue.js");
264
270
  })
265
271
  },
272
+ {
273
+ name: "tree",
274
+ label: "树控件",
275
+ runtimeComponent: defineAsyncComponent(() => {
276
+ return import("../views/assemblys/data/tree/tree-runtime.vue.js");
277
+ })
278
+ },
266
279
  {
267
280
  name: "bar-code",
268
281
  label: "条码",
@@ -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
@@ -2,7 +2,7 @@ import { getBaseUrl, getRealRestApiPath, upperFirstCase, packageTemplateFiles, d
2
2
  import http from "agilebuilder-ui/src/utils/request";
3
3
  import { getI18n } from "agilebuilder-ui/src/utils/util";
4
4
  import { ElMessage, ElMessageBox } from "element-plus";
5
- import { getToken } from "agilebuilder-ui/src/utils/auth";
5
+ import { setSessionCache, getToken } from "agilebuilder-ui/src/utils/auth";
6
6
  import { getComponentRef } from "../global-refs.js";
7
7
  import eventBus from "../eventBus.js";
8
8
  import axios from "axios";
@@ -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) {
@@ -276,9 +278,9 @@ function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
276
278
  param["additionalParamMap"] = additionalParamMap;
277
279
  let exportResult;
278
280
  if (isPdf) {
279
- exportResult = exportFormPdf(fileName, backendUrl, param);
281
+ exportResult = exportFormPdf(fileName, backendUrl, param, pageContext.isTest);
280
282
  } else {
281
- exportResult = exportFormReportSuccess(fileName, backendUrl, param);
283
+ exportResult = exportFormReportSuccess(fileName, backendUrl, param, pageContext.isTest);
282
284
  }
283
285
  if (exportResult) {
284
286
  exportResult.then(() => {
@@ -286,9 +288,9 @@ function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
286
288
  });
287
289
  }
288
290
  }
289
- function exportFormReportSuccess(fileName, backendUrl, param) {
291
+ function exportFormReportSuccess(fileName, backendUrl, param, isTest) {
290
292
  return new Promise((resolve, reject) => {
291
- const baseUrl = getBaseUrl(backendUrl);
293
+ const baseUrl = getBaseUrl(backendUrl, isTest);
292
294
  const path = baseUrl + "/dsc/commons/export-reports";
293
295
  axios.defaults.headers.common.Authorization = getToken();
294
296
  const request = axios.post(path, param, {
@@ -318,14 +320,14 @@ function exportFormReportSuccess(fileName, backendUrl, param) {
318
320
  });
319
321
  });
320
322
  }
321
- function exportFormPdf(fileName, backendUrl, param) {
323
+ function exportFormPdf(fileName, backendUrl, param, isTest) {
322
324
  return new Promise((resolve, reject) => {
323
- const baseUrl = getBaseUrl(backendUrl);
325
+ const baseUrl = getBaseUrl(backendUrl, isTest);
324
326
  const path = baseUrl + "/dsc/commons/export-pdf";
325
327
  axios.defaults.headers.common.Authorization = getToken();
326
328
  const request = axios.post(path, param, {
327
329
  headers: {
328
- "content-type": "application/x-www-form-urlencoded"
330
+ "content-type": "application/json"
329
331
  },
330
332
  responseType: "blob"
331
333
  });
@@ -462,7 +464,7 @@ function getSaveFormRequestWithRow(pageContext, configureObj, url, isUnControlVe
462
464
  param.tableName = otherParams.tableName;
463
465
  }
464
466
  }
465
- return getSaveFormRequestByParam(systemCode, backendUrl, param, url, pageContext.entity.data);
467
+ return getSaveFormRequestByParam(systemCode, backendUrl, param, url, pageContext.entity.data, pageContext.isTest);
466
468
  }
467
469
  function getSaveFormRequest(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo) {
468
470
  return getSaveFormRequestWithRow(
@@ -476,10 +478,10 @@ function getSaveFormRequest(pageContext, configureObj, url, isUnControlVersion,
476
478
  null
477
479
  );
478
480
  }
479
- function getSaveFormRequestByParam(systemCode, backendUrl, param, url, formData) {
480
- const baseUrl = getBaseUrl(backendUrl);
481
+ function getSaveFormRequestByParam(systemCode, backendUrl, param, url, formData, isTest) {
482
+ const baseUrl = getBaseUrl(backendUrl, isTest);
481
483
  let path = baseUrl + url;
482
- path = getRealRestApiPath(path, systemCode, backendUrl);
484
+ path = getRealRestApiPath(path, systemCode, backendUrl, isTest);
483
485
  let request;
484
486
  if (formData && (formData.id || formData.ID)) {
485
487
  request = http.put(path, param);
@@ -713,9 +715,9 @@ function getSubmitFormRequest(pageContext, configureObj, url, isUnControlVersion
713
715
  ids2,
714
716
  null
715
717
  );
716
- const baseUrl = getBaseUrl(backendUrl);
718
+ const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
717
719
  let path = baseUrl + url;
718
- path = getRealRestApiPath(path, systemCode, backendUrl);
720
+ path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
719
721
  http.post(path, param).then((result) => {
720
722
  resolve(result);
721
723
  }).catch((error) => {
@@ -752,9 +754,9 @@ function deleteFunc(params) {
752
754
  const configureBase = configureObj.props.base;
753
755
  const systemCode = pageContext.systemCode;
754
756
  const backendUrl = pageContext.backendUrl;
755
- const baseUrl = getBaseUrl(backendUrl);
757
+ const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
756
758
  let path = baseUrl + "/dsc/commons/" + tableName;
757
- path = getRealRestApiPath(path, systemCode, backendUrl);
759
+ path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
758
760
  const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
759
761
  const isWorkflow = pageContext.workflowCode ? true : false;
760
762
  const functionCodes = getPermissionCodes(configureObj, pageContext);
@@ -863,7 +865,7 @@ function downloadTemplateFunc(params) {
863
865
  const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
864
866
  param += "&isPermission=" + isPermission;
865
867
  }
866
- const baseUrl = getBaseUrl(backendUrl);
868
+ const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
867
869
  window.open(baseUrl + "/dsc/commons/download-files" + param);
868
870
  }
869
871
  function doImportFinally(params, fileObj) {
@@ -921,9 +923,9 @@ function doImportFinally(params, fileObj) {
921
923
  param.append("isPermission", isPermission + "");
922
924
  const systemCode = pageContext.systemCode;
923
925
  const backendUrl = pageContext.backendUrl;
924
- const baseUrl = getBaseUrl(backendUrl);
926
+ const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
925
927
  let path = baseUrl + "/dsc/commons/import-data";
926
- path = getRealRestApiPath(path, systemCode, backendUrl);
928
+ path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
927
929
  http.post(path, param).then((data) => {
928
930
  if (isAsync) {
929
931
  ElMessage({
@@ -1106,8 +1108,8 @@ function workflowSaveFunc(params) {
1106
1108
  const dataModel = pageContext.entity.data;
1107
1109
  const systemCode = pageContext.systemCode;
1108
1110
  const backendUrl = pageContext.backendUrl;
1109
- let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons";
1110
- path = getRealRestApiPath(path, systemCode, backendUrl);
1111
+ let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons";
1112
+ path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
1111
1113
  if (!path) {
1112
1114
  ElMessage({
1113
1115
  showClose: true,
@@ -1152,6 +1154,9 @@ function dealCompleteTaskParam(commonEntity, isInit, pageContext, params, operat
1152
1154
  pageContext.initFormNo = commonEntity.formNo;
1153
1155
  pageContext.emailTemplateCode = commonEntity.emailTemplateCode;
1154
1156
  }
1157
+ if (formParam.entity) {
1158
+ cacheFormDataId(formParam.entity.id || formParam.entity.ID, pageContext);
1159
+ }
1155
1160
  const completeTaskResult = formParam.completeTaskResult;
1156
1161
  if (completeTaskResult) {
1157
1162
  const completeTaskTipType = completeTaskResult.completeTaskTipType;
@@ -1196,8 +1201,8 @@ function submitProcessFunc(params) {
1196
1201
  const pageContext = params.pageContext;
1197
1202
  const systemCode = pageContext.systemCode;
1198
1203
  const backendUrl = pageContext.backendUrl;
1199
- let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/submit";
1200
- path = getRealRestApiPath(path, systemCode, backendUrl);
1204
+ let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/submit";
1205
+ path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
1201
1206
  if (!path) {
1202
1207
  ElMessage({
1203
1208
  showClose: true,
@@ -1233,8 +1238,8 @@ function completeTaskFunc(params, operationResult) {
1233
1238
  const pageContext = params.pageContext;
1234
1239
  const systemCode = pageContext.systemCode;
1235
1240
  const backendUrl = pageContext.backendUrl;
1236
- let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/complete-tasks";
1237
- 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);
1238
1243
  if (!path) {
1239
1244
  ElMessage({
1240
1245
  showClose: true,
@@ -1279,7 +1284,7 @@ function doAssign(params, selectNodeInfo) {
1279
1284
  const pageContext = params.pageContext;
1280
1285
  const configureObj = params.configureObj;
1281
1286
  const backendUrl = pageContext.backendUrl;
1282
- const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/assigns";
1287
+ const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/assigns";
1283
1288
  const assigneeId = selectNodeInfo.id ? selectNodeInfo.id : selectNodeInfo.ID ? selectNodeInfo.ID : null;
1284
1289
  const requestParam = getWorkflowSaveParams(params);
1285
1290
  requestParam["assigneeId"] = assigneeId;
@@ -1340,8 +1345,8 @@ function doAddSigner(params, selectNodeInfo) {
1340
1345
  const buttonConfigureObj = params.configureObj;
1341
1346
  const systemCode = pageContext.systemCode;
1342
1347
  const backendUrl = pageContext.backendUrl;
1343
- let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/add-signers";
1344
- 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);
1345
1350
  if (!path) {
1346
1351
  ElMessage({
1347
1352
  showClose: true,
@@ -1380,8 +1385,8 @@ function doCreateCopyTask(params, selectNodeInfo) {
1380
1385
  const buttonConfigureObj = params.configureObj;
1381
1386
  const systemCode = pageContext.systemCode;
1382
1387
  const backendUrl = pageContext.backendUrl;
1383
- let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/add-signers";
1384
- 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);
1385
1390
  if (!path) {
1386
1391
  ElMessage({
1387
1392
  showClose: true,
@@ -1410,7 +1415,7 @@ function transactTask(params, requestParam, path, successMessageTip) {
1410
1415
  const pageContext = params.pageContext;
1411
1416
  const systemCode = pageContext.systemCode;
1412
1417
  const backendUrl = pageContext.backendUrl;
1413
- path = getRealRestApiPath(path, systemCode, backendUrl);
1418
+ path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
1414
1419
  if (!path) {
1415
1420
  ElMessage({
1416
1421
  showClose: true,
@@ -1443,14 +1448,14 @@ function transactTask(params, requestParam, path, successMessageTip) {
1443
1448
  function drawTaskFunc(params) {
1444
1449
  const pageContext = params.pageContext;
1445
1450
  const backendUrl = pageContext.backendUrl;
1446
- const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/draw-tasks";
1451
+ const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/draw-tasks";
1447
1452
  const requestParam = getWorkflowSaveParams(params);
1448
1453
  return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulDrawTask");
1449
1454
  }
1450
1455
  function abandonReceiveFunc(params) {
1451
1456
  const pageContext = params.pageContext;
1452
1457
  const backendUrl = pageContext.backendUrl;
1453
- const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/abandon-receives";
1458
+ const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/abandon-receives";
1454
1459
  const requestParam = getWorkflowSaveParams(params);
1455
1460
  return transactTask(
1456
1461
  params,
@@ -1462,7 +1467,7 @@ function abandonReceiveFunc(params) {
1462
1467
  function returnToPreviousTaskFunc(params) {
1463
1468
  const pageContext = params.pageContext;
1464
1469
  const backendUrl = pageContext.backendUrl;
1465
- 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";
1466
1471
  const requestParam = getWorkflowSaveParams(params);
1467
1472
  return transactTask(
1468
1473
  params,
@@ -1474,7 +1479,7 @@ function returnToPreviousTaskFunc(params) {
1474
1479
  function endInstanceFunc(params) {
1475
1480
  const pageContext = params.pageContext;
1476
1481
  const backendUrl = pageContext.backendUrl;
1477
- const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/end-instance";
1482
+ const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/end-instance";
1478
1483
  const requestParam = getWorkflowSaveParams(params);
1479
1484
  return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulEndInstance");
1480
1485
  }
@@ -1489,8 +1494,8 @@ function getTaskInformitions(params) {
1489
1494
  const systemCode = pageContext.systemCode;
1490
1495
  const backendUrl = pageContext.backendUrl;
1491
1496
  const completeTaskParam = pageContext.completeTaskParam;
1492
- let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/returnable-task/" + completeTaskParam.taskId;
1493
- 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);
1494
1499
  if (!path) {
1495
1500
  ElMessage({
1496
1501
  showClose: true,
@@ -1513,7 +1518,7 @@ function doReturnTaskTo(params, selectTaskNode) {
1513
1518
  const pageContext = params.pageContext;
1514
1519
  const configureObj = params.configureObj;
1515
1520
  const backendUrl = pageContext.backendUrl;
1516
- const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/returnTaskTo";
1521
+ const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/returnTaskTo";
1517
1522
  const requestParam = getWorkflowSaveParams(params);
1518
1523
  if (selectTaskNode.nodeName) {
1519
1524
  requestParam["returnToNodeName"] = selectTaskNode.nodeName;
@@ -1537,9 +1542,9 @@ function getRemoveSigner(params) {
1537
1542
  const pageContext = params.pageContext;
1538
1543
  const systemCode = pageContext.systemCode;
1539
1544
  const backendUrl = pageContext.backendUrl;
1540
- let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/get-remove-signers";
1545
+ let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/get-remove-signers";
1541
1546
  const requestParam = getWorkflowSaveParams(params);
1542
- path = getRealRestApiPath(path, systemCode, backendUrl);
1547
+ path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
1543
1548
  if (!path) {
1544
1549
  ElMessage({
1545
1550
  showClose: true,
@@ -1556,8 +1561,8 @@ function doRemoveSigners(params, selectRemoveTasks) {
1556
1561
  const configureObj = params.configureObj;
1557
1562
  const systemCode = pageContext.systemCode;
1558
1563
  const backendUrl = pageContext.backendUrl;
1559
- let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/remove-signers";
1560
- 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);
1561
1566
  if (!path) {
1562
1567
  this.$message({
1563
1568
  showClose: true,
@@ -1587,7 +1592,7 @@ function doRemoveSigners(params, selectRemoveTasks) {
1587
1592
  function retrieveTaskFunc(params) {
1588
1593
  const pageContext = params.pageContext;
1589
1594
  const backendUrl = pageContext.backendUrl;
1590
- const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/retrieves";
1595
+ const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/retrieves";
1591
1596
  const requestParam = getWorkflowSaveParams(params);
1592
1597
  return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulRetrieve");
1593
1598
  }
@@ -1800,6 +1805,12 @@ function isTaskComplete(completeTaskParam) {
1800
1805
  }
1801
1806
  return taskComplete;
1802
1807
  }
1808
+ function cacheFormDataId(dataId, pageContext) {
1809
+ const additionalParamMap = getAdditionalParamMap(pageContext);
1810
+ if (dataId && additionalParamMap) {
1811
+ setSessionCache(additionalParamMap._t_ + "_id", dataId);
1812
+ }
1813
+ }
1803
1814
  export {
1804
1815
  dealAfterOperate,
1805
1816
  dealCompleteTaskParam,
@@ -243,45 +243,6 @@ function getChartDatasFromPage(pageContext2, configure2) {
243
243
  function queryOptionDatasources(pageContext2, dataSourceConf, query) {
244
244
  return updateOptionDatasources(pageContext2, dataSourceConf ? [dataSourceConf] : [], query);
245
245
  }
246
- function queryOptions(component, pageContext2, query) {
247
- if (!component.props || !component.props.dataOrigin) {
248
- return new Promise(function(resolve, reject) {
249
- resolve([]);
250
- });
251
- }
252
- const dataOriginInfo = component.props.dataOrigin;
253
- if (dataOriginInfo.optionValueSetType == "dynamicData") {
254
- if (!dataOriginInfo.dynamicDataSourceCode) {
255
- return new Promise(function(resolve, reject) {
256
- throw new Error("未指定动态数据源!");
257
- });
258
- }
259
- return queryByDynamicCode(dataOriginInfo.dynamicDataSourceCode, query);
260
- } else if (dataOriginInfo.optionValueSetType == "dataTable") {
261
- if (!dataOriginInfo.tableName) {
262
- return new Promise(function(resolve, reject) {
263
- throw new Error("未指定查询的数据表!");
264
- });
265
- }
266
- const tempObj = getTableQueryInfo(dataOriginInfo, pageContext2);
267
- return queryByTable(tempObj);
268
- } else {
269
- return new Promise(function(resolve, reject) {
270
- throw new Error("无有效的查询设置!");
271
- });
272
- }
273
- }
274
- function queryByDynamicCode(dynamicCode, query) {
275
- const param = {
276
- code: dynamicCode,
277
- query
278
- };
279
- return http.post("", param);
280
- }
281
- function queryByTable(tableQueryInfo) {
282
- const param = tableQueryInfo.props;
283
- return http.post("", param);
284
- }
285
246
  function autoSetAfterSelect(component, pageContext2, autoSets, selItems) {
286
247
  if (!autoSets || autoSets.length == 0) {
287
248
  return;
@@ -669,7 +630,6 @@ export {
669
630
  getVariableValue,
670
631
  monitorFieldChange,
671
632
  queryOptionDatasources,
672
- queryOptions,
673
633
  setValueForVariableName,
674
634
  setVariableValue,
675
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,6 +108,15 @@ 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
122
  if (requestObj["_t_"])
@@ -218,6 +228,7 @@ function queryPageSuperGrids(pageDesign, pageContext, publishVersion) {
218
228
  }
219
229
  function packageFormRules(pageContext, configure) {
220
230
  var _a;
231
+ debugger;
221
232
  const isWorkflow = pageContext.workflowCode ? true : false;
222
233
  if (isWorkflow) {
223
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, {
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./exportpdf-runtime.vue2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -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
+ };
@@ -86,17 +86,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
86
86
  hisGroupValue = headerInfo.groupValue;
87
87
  refresh();
88
88
  });
89
- function refresh() {
89
+ function refresh(isHandle) {
90
90
  if (!dataConfig) {
91
91
  console.log("无数据源配置,不需要查询!");
92
92
  return;
93
93
  }
94
94
  dataConfig.services[0].groupValue = headerInfo.groupValue;
95
- dataConfig.isRefresh = true;
95
+ if (isHandle !== true) {
96
+ dataConfig.autoRefresh = true;
97
+ }
96
98
  updateChartDatasources(props.pageContext, [dataConfig], headerInfo.drillParams);
97
99
  }
98
100
  const monitorFields = headerInfo.monitorFields;
99
- monitorFieldChange(props.pageContext, monitorFields, refresh);
101
+ monitorFieldChange(props.pageContext, monitorFields, () => {
102
+ refresh(true);
103
+ });
100
104
  function updateChartDatas(resultData) {
101
105
  if (!resultData) {
102
106
  resultData = [];
@@ -111,17 +115,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
111
115
  return;
112
116
  }
113
117
  resultData.hasRender = true;
114
- if (!dataConfig.isRefresh) {
118
+ if (!dataConfig.autoRefresh) {
115
119
  hisGroupValue = resultData.groupValue;
116
120
  if (hisGroupValue && headerInfo.groupComponent !== "checkbox") {
117
121
  hisGroupValue = hisGroupValue.join(",");
118
122
  }
119
123
  headerInfo.groupValue = hisGroupValue;
120
124
  }
121
- if (!dataConfig.isRefresh || !enableDrill) {
125
+ if (!dataConfig.autoRefresh || !enableDrill) {
122
126
  clearChartSelected(props.pageContext, props.configure, chartRef.value.chart);
123
127
  }
124
- dataConfig.isRefresh = false;
128
+ dataConfig.autoRefresh = false;
125
129
  updateChartOption(props.pageContext, props.configure, chartOption, resultData);
126
130
  }
127
131
  __expose({
@@ -84,17 +84,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
84
84
  hisGroupValue = headerInfo.groupValue;
85
85
  refresh();
86
86
  });
87
- function refresh() {
87
+ function refresh(isHandle) {
88
88
  if (!dataConfig) {
89
89
  console.log("无数据源配置,不需要查询!");
90
90
  return;
91
91
  }
92
92
  dataConfig.services[0].groupValue = headerInfo.groupValue;
93
- dataConfig.isRefresh = true;
93
+ if (isHandle !== true) {
94
+ dataConfig.autoRefresh = true;
95
+ }
94
96
  updateChartDatasources(props.pageContext, [dataConfig], headerInfo.drillParams);
95
97
  }
96
98
  const monitorFields = headerInfo.monitorFields;
97
- monitorFieldChange(props.pageContext, monitorFields, refresh);
99
+ monitorFieldChange(props.pageContext, monitorFields, () => {
100
+ refresh(true);
101
+ });
98
102
  function updateChartDatas(resultData) {
99
103
  if (!resultData) {
100
104
  resultData = [];
@@ -109,17 +113,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
109
113
  return;
110
114
  }
111
115
  resultData.hasRender = true;
112
- if (!dataConfig.isRefresh) {
116
+ if (!dataConfig.autoRefresh) {
113
117
  hisGroupValue = resultData.groupValue;
114
118
  if (hisGroupValue && headerInfo.groupComponent !== "checkbox") {
115
119
  hisGroupValue = hisGroupValue.join(",");
116
120
  }
117
121
  headerInfo.groupValue = hisGroupValue;
118
122
  }
119
- if (!dataConfig.isRefresh || !enableDrill) {
123
+ if (!dataConfig.autoRefresh || !enableDrill) {
120
124
  clearChartSelected(props.pageContext, props.configure, chartRef.value.chart);
121
125
  }
122
- dataConfig.isRefresh = false;
126
+ dataConfig.autoRefresh = false;
123
127
  updateChartOption(props.pageContext, props.configure, chartOption, resultData);
124
128
  console.log("chartOption--pie", chartOption);
125
129
  }
@@ -77,7 +77,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
77
77
  return templateShowName;
78
78
  }
79
79
  function exportForm(row) {
80
- emits("export", row);
80
+ emits("export", props.configure, row);
81
81
  }
82
82
  function closeExportForm() {
83
83
  emits("close");
@@ -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
  }
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./tree-runtime.vue2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,48 @@
1
+ import { defineComponent, computed, ref, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, createVNode, normalizeStyle } from "vue";
2
+ import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
+ import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
4
+ const _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "tree-runtime",
6
+ props: {
7
+ pageContext: {},
8
+ configure: {}
9
+ },
10
+ setup(__props) {
11
+ const props = __props;
12
+ const entity = props.pageContext.entity ? props.pageContext.entity : {};
13
+ let dynamicFields = getFormModelFields(props.pageContext, props.configure);
14
+ computed({
15
+ get() {
16
+ return getVariableValue(entity, dynamicFields);
17
+ },
18
+ set(value) {
19
+ setVariableValue(entity, dynamicFields, value);
20
+ }
21
+ });
22
+ const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
23
+ const runtimeStyle = runtimeInfo.style;
24
+ const runtimeClass = runtimeInfo.class;
25
+ runtimeInfo.headerStyle;
26
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
27
+ return (_ctx, _cache) => {
28
+ const _component_el_tree = resolveComponent("el-tree");
29
+ return openBlock(), createElementBlock("div", {
30
+ class: normalizeClass(unref(runtimeClass))
31
+ }, [
32
+ createVNode(_component_el_tree, {
33
+ style: normalizeStyle([unref(runtimeStyle), { "width": "fit-content" }]),
34
+ data: designProperty.value.staticData,
35
+ "default-expand-all": designProperty.value.defaultExpandAll,
36
+ "expand-on-click-node": designProperty.value.expandOnClickNode,
37
+ indent: designProperty.value.retractWidth ? designProperty.value.retractWidth : 18,
38
+ accordion: designProperty.value.accordion,
39
+ "show-checkbox": designProperty.value.showCheckbox,
40
+ props: _ctx.defaultProps
41
+ }, null, 8, ["style", "data", "default-expand-all", "expand-on-click-node", "indent", "accordion", "show-checkbox", "props"])
42
+ ], 2);
43
+ };
44
+ }
45
+ });
46
+ export {
47
+ _sfc_main as default
48
+ };
@@ -67,7 +67,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
67
67
  }
68
68
  autoSetAfterSelect(props.configure, props.pageContext, autoSets, selItems);
69
69
  }
70
- handleEvent(value, props.pageContext, props.configure, "change");
70
+ handleFormEvent(value, props.pageContext, props.configure, "change");
71
71
  }
72
72
  function updateOptions(newOptions) {
73
73
  listOptions.value = newOptions ? newOptions : [];
@@ -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 { queryOptions, formatVariableValue, formatValueByType } from "../../../../utils/page-helper-util.js";
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
- getFormModelFields(props.pageContext, props.configure);
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 = formatVariableValue(props.pageContext, contentVariable);
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
- return resultValue == void 0 || resultValue == null ? "" : resultValue;
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({ "el-input__suffix": designProperty.value.iconPosition != "outer", "el-input-group__append": designProperty.value.iconPosition == "outer" }),
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({ "el-input__suffix": designProperty.value.iconPosition != "outer", "el-input-group__append": designProperty.value.iconPosition == "outer" })
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,6 +1,6 @@
1
1
  import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, createTextVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
- import { formatVariableValue } from "../../../../utils/page-helper-util.js";
3
+ import { getVariableValue } from "../../../../utils/page-helper-util.js";
4
4
  import { handleFormEvent } from "../../../../utils/events/event-util.js";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "link-runtime",
@@ -10,29 +10,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10
10
  },
11
11
  setup(__props) {
12
12
  const props = __props;
13
- getFormModelFields(props.pageContext, props.configure);
13
+ const modelFields = getFormModelFields(props.pageContext, props.configure);
14
14
  const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
15
15
  const runtimeStyle = runtimeInfo.style;
16
16
  const runtimeClass = runtimeInfo.class;
17
17
  const headerStyle = runtimeInfo.headerStyle;
18
18
  const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
19
- let contentVariable = designProperty.value.formatting;
20
- if (!contentVariable) {
21
- const propsBase = props.configure.props.base ? props.configure.props.base : {};
22
- contentVariable = propsBase.prop;
23
- }
24
- if (!contentVariable) {
25
- contentVariable = "${page." + props.configure.uuid + "}";
26
- }
19
+ console.log("designProperty", designProperty.value);
20
+ let formatting = designProperty.value.formatting;
21
+ const entity = props.pageContext.entity ? props.pageContext.entity : {};
27
22
  const dynamicValue = computed(() => {
28
- const resultValue = formatVariableValue(props.pageContext, contentVariable);
29
- return resultValue == void 0 || resultValue == null ? "" : resultValue;
23
+ let resultValue = getVariableValue(entity, modelFields);
24
+ resultValue = resultValue == void 0 || resultValue == null ? "" : resultValue;
25
+ if (formatting) {
26
+ resultValue = formatting.replace(/\${value}/g, resultValue);
27
+ }
28
+ return resultValue;
30
29
  });
31
30
  let tooltipVariable = designProperty.value.tooltip;
32
- const tooltipValue = computed(() => {
33
- const resultValue = formatVariableValue(props.pageContext, tooltipVariable);
34
- return resultValue == void 0 || resultValue == null ? "" : resultValue;
35
- });
31
+ let tooltipValue = null;
32
+ if (tooltipVariable) {
33
+ tooltipValue = computed(() => {
34
+ let resultValue = getVariableValue(entity, modelFields);
35
+ resultValue = resultValue == void 0 || resultValue == null ? "" : resultValue;
36
+ return tooltipVariable.replace(/\${value}/g, resultValue);
37
+ });
38
+ }
36
39
  return (_ctx, _cache) => {
37
40
  const _component_el_link = resolveComponent("el-link");
38
41
  const _component_el_tooltip = resolveComponent("el-tooltip");
@@ -50,8 +53,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
50
53
  ]),
51
54
  default: withCtx(() => [
52
55
  createVNode(_component_el_tooltip, {
53
- disabled: !tooltipValue.value,
54
- content: tooltipValue.value
56
+ disabled: !unref(tooltipValue),
57
+ content: unref(tooltipValue)
55
58
  }, {
56
59
  default: withCtx(() => [
57
60
  createVNode(_component_el_link, {
@@ -1,6 +1,6 @@
1
- import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, createTextVNode } from "vue";
1
+ import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, Fragment, renderList, createTextVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
- import { formatVariableValue } from "../../../../utils/page-helper-util.js";
3
+ import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
4
4
  import { handleFormEvent } from "../../../../utils/events/event-util.js";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "tag-runtime",
@@ -10,24 +10,61 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10
10
  },
11
11
  setup(__props) {
12
12
  const props = __props;
13
- getFormModelFields(props.pageContext, props.configure);
13
+ const modelFields = getFormModelFields(props.pageContext, props.configure);
14
14
  const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
15
15
  const runtimeStyle = runtimeInfo.style;
16
16
  const runtimeClass = runtimeInfo.class;
17
17
  const headerStyle = runtimeInfo.headerStyle;
18
18
  const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
19
- let contentVariable = designProperty.value.formatting;
20
- if (!contentVariable) {
21
- const propsBase = props.configure.props.base ? props.configure.props.base : {};
22
- contentVariable = propsBase.prop;
23
- }
24
- if (!contentVariable) {
25
- contentVariable = "${page." + props.configure.uuid + "}";
26
- }
27
- const dynamicValue = computed(() => {
28
- const resultValue = formatVariableValue(props.pageContext, contentVariable);
29
- return resultValue == void 0 || resultValue == null ? "" : resultValue;
19
+ let formatting = designProperty.value.formatting;
20
+ const entity = props.pageContext.entity ? props.pageContext.entity : {};
21
+ const dynamicValues = computed(() => {
22
+ let resultValue = getVariableValue(entity, modelFields);
23
+ if (resultValue === void 0 || resultValue === null) {
24
+ resultValue = [];
25
+ }
26
+ if (!Array.isArray(resultValue)) {
27
+ resultValue = (resultValue + "").split(",");
28
+ }
29
+ const options = [];
30
+ let no = 1;
31
+ for (const val of resultValue) {
32
+ if (val === void 0 || val === null || val === "") {
33
+ continue;
34
+ }
35
+ const o = {
36
+ value: val,
37
+ label: val
38
+ };
39
+ if (formatting) {
40
+ o.label = formatting.replace(/\${value}/g, o.value).replace(/\${no}/g, no);
41
+ }
42
+ options.push(o);
43
+ no++;
44
+ }
45
+ return options;
30
46
  });
47
+ function closeTag($event, tag) {
48
+ if (designProperty.value.closable) {
49
+ let resultValue = getVariableValue(entity, modelFields);
50
+ if (resultValue === void 0 || resultValue === null) {
51
+ resultValue = [];
52
+ }
53
+ const isArray = Array.isArray(resultValue);
54
+ if (!isArray) {
55
+ resultValue = (resultValue + "").split(",");
56
+ }
57
+ const index = resultValue.indexOf(tag.value);
58
+ if (index > -1) {
59
+ resultValue.splice(index, 1);
60
+ }
61
+ if (!isArray) {
62
+ resultValue = resultValue.join(",");
63
+ }
64
+ setVariableValue(entity, modelFields, resultValue);
65
+ }
66
+ handleFormEvent($event, props.pageContext, props.configure, "remove");
67
+ }
31
68
  return (_ctx, _cache) => {
32
69
  const _component_el_tag = resolveComponent("el-tag");
33
70
  const _component_el_form_item = resolveComponent("el-form-item");
@@ -44,18 +81,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
44
81
  }, toDisplayString(designProperty.value.title), 5)) : createCommentVNode("", true)
45
82
  ]),
46
83
  default: withCtx(() => [
47
- createVNode(_component_el_tag, {
48
- size: designProperty.value.size,
49
- closable: designProperty.value.closable,
50
- type: designProperty.value.type,
51
- onClose: _cache[0] || (_cache[0] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "remove")),
52
- onClick: _cache[1] || (_cache[1] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
53
- }, {
54
- default: withCtx(() => [
55
- createTextVNode(toDisplayString(dynamicValue.value), 1)
56
- ]),
57
- _: 1
58
- }, 8, ["size", "closable", "type"])
84
+ (openBlock(true), createElementBlock(Fragment, null, renderList(dynamicValues.value, (tag) => {
85
+ return openBlock(), createBlock(_component_el_tag, {
86
+ key: tag,
87
+ size: designProperty.value.size,
88
+ closable: designProperty.value.closable,
89
+ type: designProperty.value.type,
90
+ style: { "margin-right": "4px" },
91
+ onClose: ($event) => closeTag($event, tag),
92
+ onClick: _cache[0] || (_cache[0] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
93
+ }, {
94
+ default: withCtx(() => [
95
+ createTextVNode(toDisplayString(tag.label), 1)
96
+ ]),
97
+ _: 2
98
+ }, 1032, ["size", "closable", "type", "onClose"]);
99
+ }), 128))
59
100
  ]),
60
101
  _: 1
61
102
  }, 8, ["required", "class", "label-width", "style"]);
@@ -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
- return openBlock(), createBlock(_component_el_drawer, {
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: "btt",
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", "with-header", "title", "size"]);
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,8 +313,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
306
313
  showExportForm.value = false;
307
314
  buttonParams.value = null;
308
315
  }
309
- function doExportFormReport(templateFile) {
310
- const isPdf = false;
316
+ function doExportFormReport(buttonConfigure2, templateFile) {
317
+ let isPdf = false;
318
+ if (buttonConfigure2.name === "export-pdf") {
319
+ isPdf = true;
320
+ }
311
321
  exportFormReport(
312
322
  buttonParams.value.pageContext,
313
323
  buttonParams.value.configureObj,
@@ -397,6 +407,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
397
407
  function openDialog(configureObj, eventParams, myJumpPageSetting) {
398
408
  getPopPageSetting(configureObj, eventParams, myJumpPageSetting).then((openPageParams) => {
399
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
+ }
400
414
  const jumpMode = openPageParams.jumpMode;
401
415
  const popPageSetting = openPageParams;
402
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.49",
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.38",
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",