super-page-runtime 2.0.76 → 2.0.81

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 (27) hide show
  1. package/dist/es/_virtual/_plugin-vue_export-helper.js +10 -0
  2. package/dist/es/components/runtime/utils/api/api-util.d.ts +2 -2
  3. package/dist/es/components/runtime/utils/api/api-util.js +23 -14
  4. package/dist/es/components/runtime/utils/api/page-expose-util.js +136 -66
  5. package/dist/es/components/runtime/utils/common-util.d.ts +8 -0
  6. package/dist/es/components/runtime/utils/common-util.js +20 -0
  7. package/dist/es/components/runtime/utils/events/event-util.js +43 -2
  8. package/dist/es/components/runtime/utils/events/standard-event.js +84 -41
  9. package/dist/es/components/runtime/utils/events/validator-util.d.ts +1 -0
  10. package/dist/es/components/runtime/utils/events/validator-util.js +42 -55
  11. package/dist/es/components/runtime/utils/global-refs.d.ts +6 -0
  12. package/dist/es/components/runtime/utils/global-refs.js +11 -0
  13. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +1 -0
  14. package/dist/es/components/runtime/utils/page-helper-util.js +4 -6
  15. package/dist/es/components/runtime/utils/page-init-util.d.ts +3 -1
  16. package/dist/es/components/runtime/utils/page-init-util.js +71 -16
  17. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +9 -2
  18. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +2 -1
  19. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +4 -2
  20. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +5 -17
  21. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -1
  22. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +3 -2
  23. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +35 -15
  24. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +2 -2
  25. package/dist/es/components/runtime/views/super-page.vue.js +10 -7
  26. package/dist/es/style.css +3 -0
  27. package/package.json +2 -2
@@ -74,9 +74,9 @@ const standardEvents = {
74
74
  back: function(params) {
75
75
  console.log("表单标准事件返回back--params=", params);
76
76
  const pageContext = params.pageContext;
77
- const dataModel = pageContext.entity ? pageContext.entity.data : {};
77
+ const dataModel2 = pageContext.entity ? pageContext.entity.data : {};
78
78
  const isNeedValueMapping = params.configureObj.props && params.configureObj.props.base ? params.configureObj.props.base.isNeedValueMapping : false;
79
- closeDialog(pageContext, dataModel, isNeedValueMapping);
79
+ closeDialog(pageContext, dataModel2, isNeedValueMapping);
80
80
  },
81
81
  // 列表标准事件删除delete
82
82
  delete: function(params) {
@@ -243,10 +243,11 @@ const standardEvents = {
243
243
  }
244
244
  };
245
245
  function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
246
+ var _a;
246
247
  const templateUUID = templateFile.templateUuid;
247
248
  const fileName = templateFile.templateName;
248
249
  const systemCode = pageContext.systemCode;
249
- const logSetting = configureObj.props.logSetting;
250
+ const logSetting = (_a = configureObj.props.base) == null ? void 0 : _a.logSetting;
250
251
  const isWorkflowForm = pageContext.workflowCode ? true : false;
251
252
  const beanName = pageContext.beanName;
252
253
  const button = configureObj.props.base;
@@ -273,7 +274,7 @@ function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
273
274
  pageVersion: pageContext.version
274
275
  };
275
276
  if (logSetting) {
276
- param["logSettingText"] = logSetting;
277
+ param["logSettingText"] = logSetting.join("");
277
278
  }
278
279
  const additionalParamMap = getAdditionalParamMap(pageContext);
279
280
  param["additionalParamMap"] = additionalParamMap;
@@ -387,6 +388,7 @@ function saveFunc(params, isListButton) {
387
388
  });
388
389
  }
389
390
  function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, ids2, row) {
391
+ var _a;
390
392
  const isWorkflow = pageContext.workflowCode ? true : false;
391
393
  const systemCode = pageContext.systemCode;
392
394
  const isPermission = configureObj.props.base.isPermission === void 0 || configureObj.props.base.isPermission === "true" || configureObj.props.base.isPermission;
@@ -424,9 +426,18 @@ function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion
424
426
  param["dataConversionRule"] = conversionCodes;
425
427
  }
426
428
  }
427
- const logSetting = configureObj.props.logSetting;
429
+ console.log("getCommonFormRequestParam--------configureObj----", configureObj);
430
+ const autoSetValueData = configureObj.props.setValueList;
431
+ if (autoSetValueData) {
432
+ if (isArrayFn(autoSetValueData)) {
433
+ param["autoSetValueData"] = JSON.stringify(autoSetValueData);
434
+ } else if (typeof autoSetValueData === "string") {
435
+ param["autoSetValueData"] = autoSetValueData;
436
+ }
437
+ }
438
+ const logSetting = (_a = configureObj.props.base) == null ? void 0 : _a.logSetting;
428
439
  if (logSetting) {
429
- param["logSettingText"] = logSetting;
440
+ param["logSettingText"] = logSetting.join("");
430
441
  }
431
442
  if (!param["systemCode"]) {
432
443
  param["systemCode"] = systemCode;
@@ -465,7 +476,14 @@ function getSaveFormRequestWithRow(pageContext, configureObj, url, isUnControlVe
465
476
  param.tableName = otherParams.tableName;
466
477
  }
467
478
  }
468
- return getSaveFormRequestByParam(systemCode, backendUrl, param, url, pageContext.entity.data, pageContext.isTest);
479
+ return getSaveFormRequestByParam(
480
+ systemCode,
481
+ backendUrl,
482
+ param,
483
+ url,
484
+ pageContext.entity.data,
485
+ pageContext.isTest
486
+ );
469
487
  }
470
488
  function getSaveFormRequest(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo) {
471
489
  return getSaveFormRequestWithRow(
@@ -495,8 +513,11 @@ function dealAfterOperate(pageContext, configureObj, data, successTip, isListBut
495
513
  const buttonForPageType = getPageType(pageContext, configureObj, isListButton);
496
514
  if (buttonForPageType && buttonForPageType === "list") {
497
515
  dealAfterWithList(pageContext, configureObj, data, successTip);
516
+ pageContext.canClick = true;
498
517
  } else if (buttonForPageType && buttonForPageType === "form") {
499
518
  dealAfterWithForm(pageContext, configureObj, data, successTip);
519
+ } else {
520
+ pageContext.canClick = true;
500
521
  }
501
522
  }
502
523
  function getPageType(pageContext, configureObj, isListButton) {
@@ -514,15 +535,17 @@ function getPageType(pageContext, configureObj, isListButton) {
514
535
  function dealAfterWithForm(pageContext, configureObj, data, successTip) {
515
536
  if (data) {
516
537
  const commonEntity = data;
517
- let dataModel;
538
+ let dataModel2;
518
539
  if (commonEntity.entity) {
519
- dataModel = commonEntity.entity;
540
+ dataModel2 = commonEntity.entity;
520
541
  }
521
542
  if (commonEntity.formNo) {
522
543
  pageContext.initFormNo = commonEntity.formNo;
523
544
  }
524
- const totalModel = { ...dataModel, ...pageContext.entity.page };
545
+ const totalModel = { ...dataModel2, ...pageContext.entity.page };
525
546
  afterSuccessOperateInForm(pageContext, configureObj, totalModel);
547
+ } else {
548
+ pageContext.canClick = true;
526
549
  }
527
550
  if (successTip) {
528
551
  ElMessage({
@@ -532,26 +555,30 @@ function dealAfterWithForm(pageContext, configureObj, data, successTip) {
532
555
  });
533
556
  }
534
557
  }
535
- function afterSuccessOperateInForm(pageContext, configureObj, dataModel) {
558
+ function afterSuccessOperateInForm(pageContext, configureObj, dataModel2) {
536
559
  const successOperation = configureObj.props.base.successOperation;
537
560
  if (!successOperation || successOperation === null) {
538
561
  return;
539
562
  }
540
563
  const isNeedValueMapping = configureObj.props.base.isNeedValueMapping;
541
564
  if (successOperation === "noOperation") {
542
- if (dataModel) {
543
- pageContext.entity.data = dataModel;
565
+ if (dataModel2) {
566
+ pageContext.entity.data = dataModel2;
544
567
  }
568
+ pageContext.canClick = true;
545
569
  } else if (successOperation === "refresh") {
546
- if (dataModel && (dataModel.id || dataModel.ID)) {
547
- refreshPage(pageContext);
570
+ if (dataModel2 && (dataModel2.id || dataModel2.ID)) {
571
+ refreshPage(pageContext, dataModel2.ID ? dataModel2.ID : dataModel2.id);
572
+ } else {
573
+ pageContext.canClick = true;
548
574
  }
549
575
  } else if (successOperation === "closeWindow" || successOperation === "closeWindowAndRefresh") {
550
- closeDialog(pageContext, dataModel, isNeedValueMapping);
576
+ closeDialog(pageContext, dataModel2, isNeedValueMapping);
577
+ pageContext.canClick = true;
551
578
  console.log("afterSuccessOperateInForm--successOperation=--", successOperation);
552
579
  }
553
580
  }
554
- function closeDialog(pageContext, dataModel, isNeedValueMapping) {
581
+ function closeDialog(pageContext, dataModel2, isNeedValueMapping) {
555
582
  const jumpMode = pageContext.entity && pageContext.entity.request ? pageContext.entity.request.jumpMode : null;
556
583
  if (jumpMode === "openWindow" || jumpMode === "newTab") {
557
584
  if (window.parent) {
@@ -561,12 +588,12 @@ function closeDialog(pageContext, dataModel, isNeedValueMapping) {
561
588
  }
562
589
  } else {
563
590
  const sourceTableName = pageContext.tableName;
564
- const isNeedValueMappingFinal = isNeedValueMapping !== void 0 && isNeedValueMapping === true && dataModel && dataModel !== void 0;
591
+ const isNeedValueMappingFinal = isNeedValueMapping !== void 0 && isNeedValueMapping === true && dataModel2 && dataModel2 !== void 0;
565
592
  const parentPageCode = pageContext.entity && pageContext.entity.request ? pageContext.entity.request.parentPageCode : null;
566
593
  const eventPageInfo = parentPageCode + "_";
567
594
  eventBus.$emit(eventPageInfo + "close-dialog", {
568
595
  isNeedValueMapping: isNeedValueMappingFinal,
569
- dataModel,
596
+ dataModel: dataModel2,
570
597
  sourceTableName,
571
598
  jumpMode
572
599
  });
@@ -599,7 +626,7 @@ function updateWithPageValue(sourceModel, valueMappings, parentPageContext) {
599
626
  const sourceFields = sourceField.split(".");
600
627
  const targetValue = getVariableValue(sourceEntity, sourceFields);
601
628
  const targetField = valueMapping.target;
602
- const targetFields = getModelFields(parentPageContext, null, targetField);
629
+ const targetFields = getModelFields(null, targetField);
603
630
  setVariableValue(parentPageContext.entity, targetFields, targetValue);
604
631
  });
605
632
  }
@@ -648,7 +675,7 @@ function refreshFormOrListPage(pageContext, configureObj) {
648
675
  console.error("tableUuid is empty");
649
676
  }
650
677
  } else if (buttonForPageType && buttonForPageType === "form") {
651
- refreshPage(pageContext);
678
+ refreshPage(pageContext, dataModel.ID ? dataModel.ID : dataModel.id);
652
679
  }
653
680
  }
654
681
  }
@@ -738,6 +765,7 @@ function deleteFunc(params) {
738
765
  type: "warning",
739
766
  message: getI18n().t("superPageRuntimeMessage.pleaseSelectRecord")
740
767
  });
768
+ resolve(true);
741
769
  return;
742
770
  }
743
771
  ElMessageBox.confirm(
@@ -749,12 +777,13 @@ function deleteFunc(params) {
749
777
  type: "warning"
750
778
  }
751
779
  ).then(() => {
780
+ var _a;
752
781
  const pageContext = params.pageContext;
753
782
  const configureObj = params.configureObj;
754
783
  const configureBase = configureObj.props.base;
755
784
  const systemCode = pageContext.systemCode;
756
785
  const backendUrl = pageContext.backendUrl;
757
- let tableUuid = configureObj.props.base.tableUuid;
786
+ const tableUuid = configureObj.props.base.tableUuid;
758
787
  const tableName = getTableNameByTableUuid(pageContext, tableUuid);
759
788
  const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
760
789
  let path = baseUrl + "/dsc/commons/" + tableName;
@@ -783,9 +812,9 @@ function deleteFunc(params) {
783
812
  param["deleteLogicSetting"] = deleteLogicSetting;
784
813
  }
785
814
  }
786
- const logSetting = configureObj.props.logSetting;
815
+ const logSetting = (_a = configureObj.props.base) == null ? void 0 : _a.logSetting;
787
816
  if (logSetting) {
788
- param["logSettingText"] = logSetting;
817
+ param["logSettingText"] = logSetting.join("");
789
818
  }
790
819
  const isSafeDelete = configureObj.props.base.isSafeDelete;
791
820
  if (isSafeDelete) {
@@ -816,6 +845,7 @@ function deleteFunc(params) {
816
845
  });
817
846
  }
818
847
  function downloadTemplateFunc(params) {
848
+ var _a;
819
849
  const pageContext = params.pageContext;
820
850
  const configureObj = params.configureObj;
821
851
  const configureBase = configureObj.props.base;
@@ -834,10 +864,12 @@ function downloadTemplateFunc(params) {
834
864
  param += "&fileName=" + encodeURI(templateUUID) + "&showName=" + encodeURI(showName);
835
865
  } else if (showName) {
836
866
  param += "&showName=" + encodeURI(showName);
867
+ } else if (pageContext.label) {
868
+ param += "&showName=" + encodeURI(pageContext.label) + ".xlsx";
837
869
  }
838
- const logSetting = configureObj.props.logSetting;
839
- if (logSetting && logSetting !== "") {
840
- param += "&logSettingText=" + logSetting;
870
+ const logSetting = (_a = configureObj.props.base) == null ? void 0 : _a.logSetting;
871
+ if (logSetting) {
872
+ param += "&logSettingText=" + logSetting.join("");
841
873
  }
842
874
  if (systemCode) {
843
875
  param += "&systemCode=" + systemCode;
@@ -866,7 +898,7 @@ function downloadTemplateFunc(params) {
866
898
  if (token) {
867
899
  param += "&JWT=" + token;
868
900
  }
869
- let runCurrentRoleKey = "_RUN_CURRENT_ROLE";
901
+ const runCurrentRoleKey = "_RUN_CURRENT_ROLE";
870
902
  const currentRole = getSessionCache(runCurrentRoleKey);
871
903
  if (currentRole) {
872
904
  param += "&" + runCurrentRoleKey + "=" + currentRole;
@@ -1022,7 +1054,8 @@ function exportFunc(params) {
1022
1054
  const functionCodes = getPermissionCodes(params.configureObj, pageContext);
1023
1055
  const exportFileName = pageName;
1024
1056
  const exportOptions = {
1025
- backendUrl: pageContext.backendUrl
1057
+ backendUrl: pageContext.backendUrl,
1058
+ pageContext
1026
1059
  };
1027
1060
  console.log("exportFunc======exportOptions=", exportOptions);
1028
1061
  window["$vueApp"].config.globalProperties.$exportDataNew(
@@ -1039,21 +1072,22 @@ function exportFunc(params) {
1039
1072
  });
1040
1073
  }
1041
1074
  function getWorkflowSaveParams(params) {
1075
+ var _a;
1042
1076
  const pageContext = params.pageContext;
1043
1077
  const configureObj = params.configureObj;
1044
- const dataModel = pageContext.entity.data;
1078
+ const dataModel2 = pageContext.entity.data;
1045
1079
  const systemCode = pageContext.systemCode;
1046
1080
  const permissionPrefix = pageContext.code;
1047
1081
  let functionCodes = getPermissionCodes(configureObj, pageContext);
1048
1082
  if (!functionCodes) {
1049
1083
  functionCodes = permissionPrefix + ".xxx";
1050
1084
  }
1051
- if (!dataModel.id && !dataModel.ID) {
1052
- dataModel["page_code"] = pageContext.code;
1053
- dataModel["page_version"] = pageContext.version;
1085
+ if (!dataModel2.id && !dataModel2.ID) {
1086
+ dataModel2["page_code"] = pageContext.code;
1087
+ dataModel2["page_version"] = pageContext.version;
1054
1088
  }
1055
1089
  const param = {
1056
- entity: dataModel,
1090
+ entity: dataModel2,
1057
1091
  pageMoel: pageContext.entity.page,
1058
1092
  formNoRuleCode: pageContext.formNoRuleCode,
1059
1093
  tableName: pageContext.tableName,
@@ -1086,12 +1120,21 @@ function getWorkflowSaveParams(params) {
1086
1120
  param["dataConversionRule"] = conversionCodes;
1087
1121
  }
1088
1122
  }
1123
+ console.log("getWorkflowSaveParams----configureObj=", configureObj);
1124
+ const autoSetValueData = configureObj.props.setValueList;
1125
+ if (autoSetValueData) {
1126
+ if (isArrayFn(autoSetValueData)) {
1127
+ param["autoSetValueData"] = JSON.stringify(autoSetValueData);
1128
+ } else if (typeof autoSetValueData === "string") {
1129
+ param["autoSetValueData"] = autoSetValueData;
1130
+ }
1131
+ }
1089
1132
  if (pageContext.beanName) {
1090
1133
  param["beanName"] = pageContext.beanName;
1091
1134
  }
1092
- const logSetting = configureObj.props.logSetting;
1135
+ const logSetting = (_a = configureObj.props.base) == null ? void 0 : _a.logSetting;
1093
1136
  if (logSetting) {
1094
- param["logSettingText"] = logSetting;
1137
+ param["logSettingText"] = logSetting.join("");
1095
1138
  }
1096
1139
  if (!param.systemCode) {
1097
1140
  param.systemCode = systemCode;
@@ -1119,7 +1162,7 @@ function getWorkflowSaveParams(params) {
1119
1162
  function workflowSaveFunc(params) {
1120
1163
  return new Promise((resolve, reject) => {
1121
1164
  const pageContext = params.pageContext;
1122
- const dataModel = pageContext.entity.data;
1165
+ const dataModel2 = pageContext.entity.data;
1123
1166
  const systemCode = pageContext.systemCode;
1124
1167
  const backendUrl = pageContext.backendUrl;
1125
1168
  let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons";
@@ -1134,7 +1177,7 @@ function workflowSaveFunc(params) {
1134
1177
  }
1135
1178
  const param = getWorkflowSaveParams(params);
1136
1179
  let request;
1137
- if (dataModel.id || dataModel.ID) {
1180
+ if (dataModel2.id || dataModel2.ID) {
1138
1181
  request = http.put(path, param);
1139
1182
  } else {
1140
1183
  request = http.post(path, param);
@@ -1311,15 +1354,15 @@ function doAssign(params, selectNodeInfo) {
1311
1354
  }
1312
1355
  function getTransactTaskParam(params) {
1313
1356
  const pageContext = params.pageContext;
1314
- const dataModel = pageContext.entity.data;
1357
+ const dataModel2 = pageContext.entity.data;
1315
1358
  const systemCode = pageContext.systemCode;
1316
1359
  const permissionPrefix = pageContext.code;
1317
1360
  const additionalParamMap = getAdditionalParamMap(pageContext);
1318
- const dataId = dataModel.ID !== void 0 && dataModel.ID !== null ? dataModel.ID : dataModel.id;
1361
+ const dataId = dataModel2.ID !== void 0 && dataModel2.ID !== null ? dataModel2.ID : dataModel2.id;
1319
1362
  const requestParams = {
1320
1363
  beanName: pageContext.beanName,
1321
1364
  id: dataId,
1322
- entity: dataModel,
1365
+ entity: dataModel2,
1323
1366
  additionalParamMap,
1324
1367
  tableName: pageContext.tableName,
1325
1368
  functionCode: permissionPrefix + ".xxx",
@@ -9,4 +9,5 @@ export declare function validateDataModelFunc(pageContext: any, configureObj: an
9
9
  */
10
10
  export declare function packageCustomRules(orgCustomRules: any, orgRules: any): any;
11
11
  export declare function i18nValidateRulesMessage(rules: any): {};
12
+ export declare function i18nValidatePropRulesMessage(propRules: any, isResetMessage: boolean): void;
12
13
  export declare function getWorkflowRules(pageContext: any): any;
@@ -75,25 +75,10 @@ function getEndObjectRule(rule, props, currentProp) {
75
75
  }
76
76
  function getValidator(columns) {
77
77
  const rules = {};
78
- if (columns) {
79
- columns.forEach((editField) => {
80
- const prop = editField.model;
81
- if (prop && editField.validations) {
82
- const validations = editField.validations;
83
- if (prop.indexOf(".") > 0) {
84
- setObjectPropRule(editField.prop, rules, validations);
85
- } else {
86
- if (validations && validations.length > 0) {
87
- rules[prop] = [...validations];
88
- }
89
- }
90
- }
91
- });
92
- }
93
78
  return rules;
94
79
  }
95
80
  function validator(entity, rules, columns, rowIndex, isSql) {
96
- return validatorEntity(entity, rules, columns, rowIndex, true, isSql);
81
+ return validatorEntity(entity, rules, columns, rowIndex, true);
97
82
  }
98
83
  function sublistVerify(rules) {
99
84
  if (!rules) {
@@ -119,7 +104,7 @@ function sublistVerify(rules) {
119
104
  function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdate, isSql) {
120
105
  let validateRules = sublistVerify(rules);
121
106
  if ((!rules || rules === null) && columns) {
122
- validateRules = getValidator(columns);
107
+ validateRules = getValidator();
123
108
  }
124
109
  if (!validateRules || Object.keys(validateRules).length === 0) {
125
110
  entity["validateErrorField"] = "";
@@ -137,11 +122,6 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
137
122
  if (errors) {
138
123
  result = errors[0].message;
139
124
  fieldName = errors[0]["field"];
140
- if (typeof rowIndex !== "undefined" && rowIndex !== null) {
141
- result = getI18n().t("superPageRuntimeMessage.recordLine", {
142
- row: rowIndex + 1
143
- }) + "," + result;
144
- }
145
125
  ElMessage({
146
126
  message: result,
147
127
  showClose: true,
@@ -154,11 +134,11 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
154
134
  }
155
135
  if (fieldName && isShouldRepeateValdate === true) {
156
136
  const reg1 = /[A-Z]+/;
157
- if (isSql !== void 0 && isSql === true && reg1.test(fieldName) && entity[fieldName.toLowerCase()] !== void 0) {
137
+ if (reg1.test(fieldName) && entity[fieldName.toLowerCase()] !== void 0) {
158
138
  const copyEntity = JSON.parse(JSON.stringify(entity));
159
139
  copyEntity[fieldName.toUpperCase()] = entity[fieldName.toLowerCase()];
160
140
  delete copyEntity[fieldName.toLowerCase()];
161
- result = validatorEntity(copyEntity, rules, columns, rowIndex, false, isSql);
141
+ result = validatorEntity(copyEntity, rules, columns, rowIndex, false);
162
142
  }
163
143
  }
164
144
  }
@@ -206,7 +186,7 @@ function validateWorkflowFormDataModel(dataModel, pageContext) {
206
186
  if (!rules || Object.keys(rules).length === 0) {
207
187
  result = true;
208
188
  } else {
209
- result = validator(handleModels, rules, null, null, true);
189
+ result = validator(handleModels, rules, null, null);
210
190
  }
211
191
  if (result === true) {
212
192
  const workflowFieldPermissionRules = pageContext.workflowRules;
@@ -270,7 +250,7 @@ function validateCommonFormDataModel(dataModel, pageContext, rules) {
270
250
  if (!rules || Object.keys(rules).length === 0) {
271
251
  resolve(handleModels);
272
252
  } else {
273
- const validateEntityResult = validator(handleModels, rules, null, null, true);
253
+ const validateEntityResult = validator(handleModels, rules, null, null);
274
254
  if (validateEntityResult === true) {
275
255
  const validateResult = validateSubTables(pageContext);
276
256
  if (validateResult === true) {
@@ -360,35 +340,7 @@ function i18nValidateRulesMessage(rules) {
360
340
  for (let i = 0; i < propNames.length; i++) {
361
341
  const propName = propNames[i];
362
342
  const propRules = rules[propName];
363
- propRules.forEach((rule) => {
364
- const label = rule["label"];
365
- const i18nLabel = getI18n().t(label);
366
- if (rule["required"]) {
367
- rule["message"] = getI18n().t("superPageRuntimeMessage.required", { label: i18nLabel });
368
- }
369
- if (rule["myType"]) {
370
- rule["message"] = getI18n().t("superPageRuntimeMessage.formatMismatch", {
371
- label: i18nLabel
372
- });
373
- }
374
- if (rule["patternType"]) {
375
- rule["message"] = getI18n().t("superPageRuntimeMessage.formatMismatch", {
376
- label: i18nLabel
377
- });
378
- }
379
- if (rule["max"] !== void 0 && rule["max"] !== null) {
380
- rule["message"] = getI18n().t("superPageRuntimeMessage.overMaxLength", {
381
- label: i18nLabel,
382
- value: rule["max"]
383
- });
384
- }
385
- if (rule["min"] !== void 0 && rule["min"] !== null) {
386
- rule["message"] = getI18n().t("superPageRuntimeMessage.limitMinLength", {
387
- label: i18nLabel,
388
- value: rule["min"]
389
- });
390
- }
391
- });
343
+ i18nValidatePropRulesMessage(propRules, true);
392
344
  if (propName.indexOf(".") > 0) {
393
345
  setObjectPropRule(propName, newRules, propRules);
394
346
  } else {
@@ -399,6 +351,40 @@ function i18nValidateRulesMessage(rules) {
399
351
  }
400
352
  return newRules;
401
353
  }
354
+ function i18nValidatePropRulesMessage(propRules, isResetMessage) {
355
+ propRules.forEach((rule) => {
356
+ if (rule.message && !isResetMessage) {
357
+ return;
358
+ }
359
+ const label = rule["label"];
360
+ const i18nLabel = getI18n().t(label);
361
+ if (rule["required"]) {
362
+ rule["message"] = getI18n().t("superPageRuntimeMessage.required", { label: i18nLabel });
363
+ }
364
+ if (rule["myType"]) {
365
+ rule["message"] = getI18n().t("superPageRuntimeMessage.formatMismatch", {
366
+ label: i18nLabel
367
+ });
368
+ }
369
+ if (rule["patternType"]) {
370
+ rule["message"] = getI18n().t("superPageRuntimeMessage.formatMismatch", {
371
+ label: i18nLabel
372
+ });
373
+ }
374
+ if (rule["max"] !== void 0 && rule["max"] !== null) {
375
+ rule["message"] = getI18n().t("superPageRuntimeMessage.overMaxLength", {
376
+ label: i18nLabel,
377
+ value: rule["max"]
378
+ });
379
+ }
380
+ if (rule["min"] !== void 0 && rule["min"] !== null) {
381
+ rule["message"] = getI18n().t("superPageRuntimeMessage.limitMinLength", {
382
+ label: i18nLabel,
383
+ value: rule["min"]
384
+ });
385
+ }
386
+ });
387
+ }
402
388
  function getWorkflowRules(pageContext) {
403
389
  const dataModel = pageContext.entity.data;
404
390
  const pageModel = pageContext.entity.page;
@@ -463,6 +449,7 @@ function validateCustomRuleEvents(pageContext) {
463
449
  }
464
450
  export {
465
451
  getWorkflowRules,
452
+ i18nValidatePropRulesMessage,
466
453
  i18nValidateRulesMessage,
467
454
  packageCustomRules,
468
455
  setObjectPropRule,
@@ -57,3 +57,9 @@ export declare function removePageAllRef(pageContext: PageContext): void;
57
57
  * @param pageVersion
58
58
  */
59
59
  export declare function initComponentRefState(pageContext: PageContext): void;
60
+ /**
61
+ * 获取所有组件引用对象
62
+ * @param pageDesign 页面设计对象
63
+ * @returns
64
+ */
65
+ export declare function getAllComponentRefs(pageContext: PageContext): any;
@@ -67,9 +67,20 @@ function getPageRefKey(pageCode, pageVersion) {
67
67
  function getPageRefKeyByCode(pageCode, pageVersion) {
68
68
  return getPageRefKey(pageCode, pageVersion) + "-code";
69
69
  }
70
+ function getAllComponentRefs(pageContext) {
71
+ if (!pageContext) {
72
+ return;
73
+ }
74
+ const cacheKey = getPageRefKeyByCode(pageContext.code, pageContext.version);
75
+ if (!globalRefs[cacheKey]) {
76
+ globalRefs[cacheKey] = {};
77
+ }
78
+ return globalRefs[cacheKey];
79
+ }
70
80
  export {
71
81
  addComponentRef,
72
82
  addComponentRefByCode,
83
+ getAllComponentRefs,
73
84
  getComponentRef,
74
85
  getComponentRefByCode,
75
86
  initComponentRefState,
@@ -136,6 +136,7 @@ export interface PageContext extends Component {
136
136
  searchFormData?: Array<object>;
137
137
  selectOptions?: object;
138
138
  chartDataSourceMap?: any;
139
+ refercePropMap?: object;
139
140
  [otherProp: string]: any;
140
141
  }
141
142
  /**
@@ -77,8 +77,7 @@ function getTableQueryInfo(dataOriginInfo, pageContext2) {
77
77
  }
78
78
  }
79
79
  }
80
- if (f.propValue)
81
- ;
80
+ if (f.propValue) ;
82
81
  searchForm.push(tempObj);
83
82
  }
84
83
  infoObj.props.searchForm = searchForm;
@@ -306,14 +305,13 @@ function setVariableValue(entity, fields, newValue) {
306
305
  let tempObj = entity;
307
306
  for (let i = 0; i < fields.length; i++) {
308
307
  const fieldName = fields[i];
309
- if (i + 1 == fields.length) {
308
+ if (i + 1 === fields.length) {
310
309
  tempObj[fieldName] = newValue;
311
310
  } else {
312
- tempObj = tempObj[fieldName];
313
- if (tempObj == void 0) {
311
+ if (tempObj[fieldName] === void 0) {
314
312
  tempObj[fieldName] = {};
315
- tempObj = tempObj[fieldName];
316
313
  }
314
+ tempObj = tempObj[fieldName];
317
315
  }
318
316
  }
319
317
  }
@@ -17,7 +17,8 @@ export declare function queryPageDesignByCode(pageCode: string): Promise<any>;
17
17
  * @param pageDesign 页面设计对象
18
18
  */
19
19
  export declare function convertToPageContext(pageDesign: PageDesign, pageRequest: object): PageContext | null;
20
- export declare function getModelFields(pageContext: PageContext, formItemConfigure: Component, prop?: string): string[];
20
+ export declare function packageAdditionalMapWithRoute(route: any, requestObj: any): void;
21
+ export declare function getModelFields(formItemConfigure: any, prop?: string): string[];
21
22
  /**
22
23
  * 获取表单元素模型名称
23
24
  * @param pageContext 页面对象
@@ -39,3 +40,4 @@ export declare function getPermissionCodes(configure: Component, pageContext: Pa
39
40
  */
40
41
  export declare function queryPageSuperGrids(pageDesign: any, pageContext: any, publishVersion: any): Promise<any>;
41
42
  export declare function packageFormRules(pageContext: PageContext, configure: any): void;
43
+ export declare function controlObjectRenderState(pageContext: PageContext, propName: string): void;