super-page-runtime 2.1.48 → 2.1.50

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 (23) hide show
  1. package/dist/es/components/runtime/utils/api/api-util.d.ts +1 -18
  2. package/dist/es/components/runtime/utils/api/api-util.js +2 -306
  3. package/dist/es/components/runtime/utils/api/page-expose-util.js +8 -1
  4. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +1 -0
  5. package/dist/es/components/runtime/utils/events/standard-event.d.ts +11 -1
  6. package/dist/es/components/runtime/utils/events/standard-event.js +334 -36
  7. package/dist/es/components/runtime/utils/page-helper-util.d.ts +3 -1
  8. package/dist/es/components/runtime/utils/page-helper-util.js +21 -2
  9. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +480 -0
  10. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +44 -0
  11. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +4 -0
  12. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +64 -0
  13. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +4 -0
  14. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +242 -0
  15. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +4 -0
  16. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +301 -34
  17. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +46 -14
  18. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +28 -4
  19. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +3 -1
  20. package/dist/es/components/runtime/views/super-page-dialog.vue.d.ts +4 -0
  21. package/dist/es/components/runtime/views/super-page-dialog.vue.js +5 -1
  22. package/dist/es/components/runtime/views/super-page.vue.js +3 -2
  23. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { deepCopy, getBaseUrl, getRealRestApiPath, upperFirstCase, isWorkflowPage, packageTemplateFiles, isArrayFn } from "../common-util.js";
1
+ import { deepCopy, getBaseUrl, getRealRestApiPath, upperFirstCase, isWorkflowPage, packageTemplateFiles, isArrayFn, getListCode } from "../common-util.js";
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";
@@ -6,13 +6,13 @@ import { getToken, getSessionCache, setSessionCache } from "agilebuilder-ui/src/
6
6
  import { getComponentRef } from "../global-refs.js";
7
7
  import eventBus from "../eventBus.js";
8
8
  import axios from "axios";
9
- import { getTableUuid, doAfterClickEvent, handleEvent } from "./event-util.js";
9
+ import { getTableUuid, handleEvent, doAfterClickEvent } from "./event-util.js";
10
10
  import { setStoreInfo } from "../store-util.js";
11
- import { refreshPage } from "../api/api-util.js";
12
11
  import { getPermissionCodes, getDefaultValue, getModelFields } from "../page-init-util.js";
13
12
  import { updateChartDatasources, getVariableValue, setVariableValue } from "../page-helper-util.js";
14
13
  import printLabelUtil from "./print-label.js";
15
14
  import { getTableNameByTableUuid } from "../table-utils.js";
15
+ import { packageCustomRules, getWorkflowRules } from "./validator-util.js";
16
16
  const standardEvents = {
17
17
  // 表单标准事件保存save
18
18
  save: function(params) {
@@ -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 dataModel2 = pageContext.entity ? pageContext.entity.data : {};
77
+ const dataModel = 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, dataModel2, isNeedValueMapping);
79
+ closeDialog(pageContext, dataModel, isNeedValueMapping);
80
80
  },
81
81
  // 列表标准事件删除delete
82
82
  delete: function(params) {
@@ -228,7 +228,7 @@ const standardEvents = {
228
228
  resetCharts: function(params) {
229
229
  var _a, _b;
230
230
  console.log("重置统计图--params=", params);
231
- let pageContext = params.pageContext;
231
+ const pageContext = params.pageContext;
232
232
  pageContext.entity.data = deepCopy((_a = pageContext.initChartData) == null ? void 0 : _a.data);
233
233
  pageContext.entity.page = deepCopy((_b = pageContext.initChartData) == null ? void 0 : _b.page);
234
234
  params.isInitChart = true;
@@ -281,7 +281,7 @@ function exportPageCharts(params) {
281
281
  if (runtimeProps) {
282
282
  runtimeProps.state = "disabled";
283
283
  }
284
- let exportChartList = [];
284
+ const exportChartList = [];
285
285
  for (let i = 0; i < chartConfigs.length; i++) {
286
286
  const chartDataSourceConfig = chartConfigs[i];
287
287
  const chartUuid = chartDataSourceConfig.uuid;
@@ -312,11 +312,7 @@ function exportPageCharts(params) {
312
312
  const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
313
313
  const path = baseUrl + "/dsc/commons/exportChart";
314
314
  axios.defaults.headers.common.Authorization = getToken();
315
- request = axios.post(
316
- path,
317
- param,
318
- { responseType: "blob" }
319
- );
315
+ request = axios.post(path, param, { responseType: "blob" });
320
316
  request.then((res) => {
321
317
  const link = document.createElement("a");
322
318
  link.style.display = "none";
@@ -624,14 +620,14 @@ function getPageType(pageContext, configureObj, isListButton) {
624
620
  function dealAfterWithForm(pageContext, configureObj, data, successTip) {
625
621
  if (data) {
626
622
  const commonEntity = data;
627
- let dataModel2;
623
+ let dataModel;
628
624
  if (commonEntity.entity) {
629
- dataModel2 = commonEntity.entity;
625
+ dataModel = commonEntity.entity;
630
626
  }
631
627
  if (commonEntity.formNo) {
632
628
  pageContext.initFormNo = commonEntity.formNo;
633
629
  }
634
- const totalModel = { ...dataModel2, ...pageContext.entity.page };
630
+ const totalModel = { ...dataModel, ...pageContext.entity.page };
635
631
  afterSuccessOperateInForm(pageContext, configureObj, totalModel);
636
632
  } else {
637
633
  pageContext.canClick = true;
@@ -644,30 +640,30 @@ function dealAfterWithForm(pageContext, configureObj, data, successTip) {
644
640
  });
645
641
  }
646
642
  }
647
- function afterSuccessOperateInForm(pageContext, configureObj, dataModel2) {
643
+ function afterSuccessOperateInForm(pageContext, configureObj, dataModel) {
648
644
  const successOperation = configureObj.props.base.successOperation;
649
645
  if (!successOperation || successOperation === null) {
650
646
  return;
651
647
  }
652
648
  const isNeedValueMapping = configureObj.props.base.isNeedValueMapping;
653
649
  if (successOperation === "noOperation") {
654
- if (dataModel2) {
655
- pageContext.entity.data = dataModel2;
650
+ if (dataModel) {
651
+ pageContext.entity.data = dataModel;
656
652
  }
657
653
  pageContext.canClick = true;
658
654
  } else if (successOperation === "refresh") {
659
- if (dataModel2 && (dataModel2.id || dataModel2.ID)) {
660
- refreshPage(pageContext, dataModel2.ID ? dataModel2.ID : dataModel2.id);
655
+ if (dataModel && (dataModel.id || dataModel.ID)) {
656
+ refreshPage(pageContext, dataModel.ID ? dataModel.ID : dataModel.id);
661
657
  } else {
662
658
  pageContext.canClick = true;
663
659
  }
664
660
  } else if (successOperation === "closeWindow" || successOperation === "closeWindowAndRefresh") {
665
- closeDialog(pageContext, dataModel2, isNeedValueMapping);
661
+ closeDialog(pageContext, dataModel, isNeedValueMapping);
666
662
  pageContext.canClick = true;
667
663
  console.log("afterSuccessOperateInForm--successOperation=--", successOperation);
668
664
  }
669
665
  }
670
- function closeDialog(pageContext, dataModel2, isNeedValueMapping) {
666
+ function closeDialog(pageContext, dataModel, isNeedValueMapping) {
671
667
  const jumpMode = pageContext.entity && pageContext.entity.request ? pageContext.entity.request.jumpMode : null;
672
668
  if (jumpMode === "openWindow" || jumpMode === "newTab") {
673
669
  if (window.parent) {
@@ -677,12 +673,12 @@ function closeDialog(pageContext, dataModel2, isNeedValueMapping) {
677
673
  }
678
674
  } else {
679
675
  const sourceTableName = pageContext.tableName;
680
- const isNeedValueMappingFinal = isNeedValueMapping !== void 0 && isNeedValueMapping === true && dataModel2 && dataModel2 !== void 0;
676
+ const isNeedValueMappingFinal = isNeedValueMapping !== void 0 && isNeedValueMapping === true && dataModel && dataModel !== void 0;
681
677
  const parentPageCode = pageContext.entity && pageContext.entity.request ? pageContext.entity.request.parentPageCode : null;
682
678
  const eventPageInfo = parentPageCode + "_";
683
679
  eventBus.$emit(eventPageInfo + "close-dialog", {
684
680
  isNeedValueMapping: isNeedValueMappingFinal,
685
- dataModel: dataModel2,
681
+ dataModel,
686
682
  sourceTableName,
687
683
  jumpMode
688
684
  });
@@ -764,6 +760,7 @@ function refreshFormOrListPage(pageContext, configureObj) {
764
760
  console.error("tableUuid is empty");
765
761
  }
766
762
  } else if (buttonForPageType && buttonForPageType === "form") {
763
+ const dataModel = pageContext.entity.data;
767
764
  refreshPage(pageContext, dataModel.ID ? dataModel.ID : dataModel.id);
768
765
  }
769
766
  }
@@ -780,8 +777,11 @@ function submitForm(params, isListButton, eventName, url) {
780
777
  if (successOperation && successOperation === "noOperation") {
781
778
  isUnControlVersion = true;
782
779
  }
783
- const tableUuid = configureObj.props.base.tableUuid ? configureObj.props.base.tableUuid : params.tableUuid;
784
- const tableName = getTableNameByTableUuid(pageContext, tableUuid);
780
+ let tableName = pageContext.tableName;
781
+ if (isListButton) {
782
+ const tableUuid = configureObj.props.base.tableUuid ? configureObj.props.base.tableUuid : params.tableUuid;
783
+ tableName = getTableNameByTableUuid(pageContext, tableUuid);
784
+ }
785
785
  const request = getSubmitFormRequest(
786
786
  pageContext,
787
787
  configureObj,
@@ -1169,19 +1169,19 @@ function getWorkflowSaveParams(params) {
1169
1169
  var _a;
1170
1170
  const pageContext = params.pageContext;
1171
1171
  const configureObj = params.configureObj;
1172
- const dataModel2 = pageContext.entity.data;
1172
+ const dataModel = pageContext.entity.data;
1173
1173
  const systemCode = pageContext.systemCode;
1174
1174
  const permissionPrefix = pageContext.code;
1175
1175
  let functionCodes = getPermissionCodes(configureObj, pageContext);
1176
1176
  if (!functionCodes) {
1177
1177
  functionCodes = permissionPrefix + ".xxx";
1178
1178
  }
1179
- if (!dataModel2.id && !dataModel2.ID) {
1180
- dataModel2["page_code"] = pageContext.code;
1181
- dataModel2["page_version"] = pageContext.version;
1179
+ if (!dataModel.id && !dataModel.ID) {
1180
+ dataModel["page_code"] = pageContext.code;
1181
+ dataModel["page_version"] = pageContext.version;
1182
1182
  }
1183
1183
  const param = {
1184
- entity: dataModel2,
1184
+ entity: dataModel,
1185
1185
  pageMoel: pageContext.entity.page,
1186
1186
  formNoRuleCode: pageContext.formNoRuleCode,
1187
1187
  tableName: pageContext.tableName,
@@ -1256,7 +1256,7 @@ function getWorkflowSaveParams(params) {
1256
1256
  function workflowSaveFunc(params) {
1257
1257
  return new Promise((resolve, reject) => {
1258
1258
  const pageContext = params.pageContext;
1259
- const dataModel2 = pageContext.entity.data;
1259
+ const dataModel = pageContext.entity.data;
1260
1260
  const systemCode = pageContext.systemCode;
1261
1261
  const backendUrl = pageContext.backendUrl;
1262
1262
  let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons";
@@ -1271,7 +1271,7 @@ function workflowSaveFunc(params) {
1271
1271
  }
1272
1272
  const param = getWorkflowSaveParams(params);
1273
1273
  let request;
1274
- if (dataModel2.id || dataModel2.ID) {
1274
+ if (dataModel.id || dataModel.ID) {
1275
1275
  request = http.put(path, param);
1276
1276
  } else {
1277
1277
  request = http.post(path, param);
@@ -1447,15 +1447,15 @@ function doAssign(params, selectNodeInfo) {
1447
1447
  }
1448
1448
  function getTransactTaskParam(params) {
1449
1449
  const pageContext = params.pageContext;
1450
- const dataModel2 = pageContext.entity.data;
1450
+ const dataModel = pageContext.entity.data;
1451
1451
  const systemCode = pageContext.systemCode;
1452
1452
  const permissionPrefix = pageContext.code;
1453
1453
  const additionalParamMap = getAdditionalParamMap(pageContext);
1454
- const dataId = dataModel2.ID !== void 0 && dataModel2.ID !== null ? dataModel2.ID : dataModel2.id;
1454
+ const dataId = dataModel.ID !== void 0 && dataModel.ID !== null ? dataModel.ID : dataModel.id;
1455
1455
  const requestParams = {
1456
1456
  beanName: pageContext.beanName,
1457
1457
  id: dataId,
1458
- entity: dataModel2,
1458
+ entity: dataModel,
1459
1459
  additionalParamMap,
1460
1460
  tableName: pageContext.tableName,
1461
1461
  functionCode: permissionPrefix + ".xxx",
@@ -1962,6 +1962,302 @@ function cacheFormDataId(dataId, pageContext) {
1962
1962
  setSessionCache(additionalParamMap._t_ + "_id", dataId);
1963
1963
  }
1964
1964
  }
1965
+ function refreshPage(pageContext, id) {
1966
+ if (!pageContext.entity.page) {
1967
+ pageContext.entity.page = {};
1968
+ }
1969
+ pageContext.entity.page["_isRefresh"] = true;
1970
+ getFormData(pageContext, id).then((commonEntity) => {
1971
+ pageContext.isRefresh = true;
1972
+ });
1973
+ }
1974
+ function getFormData(pageContext, id) {
1975
+ const pageType = pageContext.pageType;
1976
+ if (pageType && pageType === "form") {
1977
+ console.log("获取表单数据getData--pageContext=", pageContext);
1978
+ pageContext.canClick = false;
1979
+ const isWorkflow = isWorkflowPage(pageContext);
1980
+ if (isWorkflow) {
1981
+ return getWorkflowFormData(pageContext, id);
1982
+ } else {
1983
+ return getCommonFormData(pageContext, id);
1984
+ }
1985
+ } else {
1986
+ return new Promise((resolve, reject) => {
1987
+ resolve(true);
1988
+ });
1989
+ }
1990
+ }
1991
+ function getCommonFormData(pageContext, id) {
1992
+ return new Promise((resolve, reject) => {
1993
+ const systemCode = pageContext.systemCode;
1994
+ const pageCode = pageContext.code;
1995
+ const pageVersion = pageContext.version;
1996
+ const additionalParamMap = getAdditionalParamMap(pageContext);
1997
+ const dataId = id ? id : additionalParamMap && additionalParamMap.id ? additionalParamMap.id : null;
1998
+ const ids2 = id ? [id] : additionalParamMap ? additionalParamMap.ids : null;
1999
+ const taskId = additionalParamMap ? additionalParamMap.taskId : null;
2000
+ const permissionPrefix = pageCode;
2001
+ console.log("getCommonFormData-----pageContext=", pageContext);
2002
+ const backendUrl = getBaseUrl(pageContext.backendUrl, pageContext.isTest);
2003
+ const param = {
2004
+ pageCode,
2005
+ pageVersion,
2006
+ tableName: pageContext.tableName,
2007
+ formNoRuleCode: pageContext.formNoRuleCode,
2008
+ id: dataId,
2009
+ systemCode,
2010
+ functionCode: permissionPrefix + ".gets",
2011
+ listCodesMap: pageContext.listCodesMap
2012
+ };
2013
+ if (!param.id && additionalParamMap && additionalParamMap._t_ && getSessionCache(additionalParamMap._t_ + "_id")) {
2014
+ param.id = getSessionCache(additionalParamMap._t_ + "_id");
2015
+ }
2016
+ if (ids2) {
2017
+ param["ids"] = formatAdditionalParamMapIds(ids2);
2018
+ }
2019
+ if (pageContext.notIdInitializationList) {
2020
+ param["noIdAndTaskIdInitSetting"] = JSON.stringify(pageContext.notIdInitializationList);
2021
+ }
2022
+ if (additionalParamMap) {
2023
+ param["additionalParamMap"] = additionalParamMap;
2024
+ }
2025
+ if (pageContext.beanName) {
2026
+ param["beanName"] = pageContext.beanName;
2027
+ }
2028
+ if (taskId) {
2029
+ param["taskId"] = taskId;
2030
+ }
2031
+ console.log("getCommonFormData---listCodesMap=", pageContext.listCodesMap);
2032
+ if ((!pageContext.listCodesMap || Object.keys(pageContext.listCodesMap).length === 0) && pageContext.tableUuids) {
2033
+ const listCodesMap = {};
2034
+ pageContext.tableUuids.forEach((tableUuid) => {
2035
+ const listCode = getListCode(pageCode, pageVersion, tableUuid);
2036
+ listCodesMap[listCode] = listCode;
2037
+ });
2038
+ param["listCodesMap"] = listCodesMap;
2039
+ }
2040
+ if (pageContext.refercePropMap) {
2041
+ param["refercePropMap"] = pageContext.refercePropMap;
2042
+ }
2043
+ const urlForView = backendUrl + "/dsc/commons/gets";
2044
+ http.post(urlForView, param).then((commonEntity) => {
2045
+ if (commonEntity) {
2046
+ pageContext.entity.data = commonEntity.entity;
2047
+ pageContext.initFormNo = commonEntity.formNo;
2048
+ }
2049
+ const customRules = pageContext.customRules;
2050
+ const formRules = pageContext.rules;
2051
+ const newFormRules = packageCustomRules(customRules, formRules);
2052
+ pageContext.rules = newFormRules;
2053
+ const pageDesign = {
2054
+ runtime: { events: pageContext.events },
2055
+ systemCode: "",
2056
+ systemVersion: 0,
2057
+ code: "",
2058
+ version: 0,
2059
+ workflowCode: "",
2060
+ workflowVersion: 0,
2061
+ name: "",
2062
+ uuid: "",
2063
+ label: ""
2064
+ };
2065
+ handleEvent(null, pageContext, pageDesign, "load");
2066
+ pageContext.canClick = true;
2067
+ resolve(commonEntity);
2068
+ }).catch((error) => {
2069
+ pageContext.canClick = true;
2070
+ reject(error);
2071
+ });
2072
+ });
2073
+ }
2074
+ function getWorkflowFormData(pageContext, id) {
2075
+ return new Promise((resolve, reject) => {
2076
+ const systemCode = pageContext.systemCode;
2077
+ const pageCode = pageContext.code;
2078
+ const pageVersion = pageContext.version;
2079
+ const additionalParamMap = getAdditionalParamMap(pageContext);
2080
+ const dataId = id ? id : additionalParamMap && additionalParamMap.id ? additionalParamMap.id : null;
2081
+ const ids2 = id ? [id] : additionalParamMap ? additionalParamMap.ids : null;
2082
+ const taskId = additionalParamMap ? additionalParamMap.taskId : null;
2083
+ const permissionPrefix = pageCode;
2084
+ const param = {
2085
+ pageCode,
2086
+ pageVersion,
2087
+ tableName: pageContext.tableName,
2088
+ formNoRuleCode: pageContext.formNoRuleCode,
2089
+ isWorkflowEntity: true,
2090
+ systemCode,
2091
+ functionCode: permissionPrefix + ".gets",
2092
+ listCodesMap: pageContext.listCodesMap
2093
+ };
2094
+ console.log("getWorkflowFormData---listCodesMap=", pageContext.listCodesMap);
2095
+ if ((!pageContext.listCodesMap || Object.keys(pageContext.listCodesMap).length === 0) && pageContext.tableUuids) {
2096
+ const listCodesMap = {};
2097
+ pageContext.tableUuids.forEach((tableUuid) => {
2098
+ const listCode = getListCode(pageCode, pageVersion, tableUuid);
2099
+ listCodesMap[listCode] = listCode;
2100
+ });
2101
+ param["listCodesMap"] = listCodesMap;
2102
+ }
2103
+ if (ids2) {
2104
+ param["ids"] = formatAdditionalParamMapIds(ids2);
2105
+ }
2106
+ if (taskId) {
2107
+ param["taskId"] = taskId;
2108
+ } else if (dataId) {
2109
+ param["id"] = dataId;
2110
+ } else {
2111
+ if (additionalParamMap && additionalParamMap._t_ && getSessionCache(additionalParamMap._t_ + "_id")) {
2112
+ param["id"] = getSessionCache(additionalParamMap._t_ + "_id");
2113
+ }
2114
+ if (pageContext.notIdInitializationList) {
2115
+ param["noIdAndTaskIdInitSetting"] = JSON.stringify(pageContext.notIdInitializationList);
2116
+ }
2117
+ }
2118
+ if (additionalParamMap) {
2119
+ param["additionalParamMap"] = additionalParamMap;
2120
+ }
2121
+ if (pageContext.beanName) {
2122
+ param["beanName"] = pageContext.beanName;
2123
+ }
2124
+ if (pageContext.refercePropMap) {
2125
+ param["refercePropMap"] = pageContext.refercePropMap;
2126
+ }
2127
+ const baseUrl = getBaseUrl(pageContext.backendUrl, pageContext.isTest);
2128
+ const urlForView = baseUrl + "/dsc/workflow-commons/gets";
2129
+ http.post(urlForView, param).then((commonEntity) => {
2130
+ pageContext.definitionId = commonEntity.definitionId;
2131
+ pageContext.entity.task = commonEntity.taskParamMap;
2132
+ dealCompleteTaskParam(commonEntity, true, pageContext);
2133
+ pageContext.workflowRules = getWorkflowRules(pageContext);
2134
+ const pageType = pageContext.pageType;
2135
+ if (pageType && pageType === "form") {
2136
+ changePermissionListToMap(pageContext);
2137
+ const pageDesign = {
2138
+ runtime: { events: pageContext.events },
2139
+ systemCode: "",
2140
+ systemVersion: 0,
2141
+ code: "",
2142
+ version: 0,
2143
+ workflowCode: "",
2144
+ workflowVersion: 0,
2145
+ name: "",
2146
+ uuid: "",
2147
+ label: ""
2148
+ };
2149
+ handleEvent(null, pageContext, pageDesign, "load");
2150
+ }
2151
+ pageContext.canClick = true;
2152
+ resolve(commonEntity);
2153
+ }).catch((error) => {
2154
+ pageContext.canClick = true;
2155
+ reject(error);
2156
+ });
2157
+ });
2158
+ }
2159
+ function formatAdditionalParamMapIds(ids2) {
2160
+ if (ids2) {
2161
+ if (typeof ids2 === "string") {
2162
+ ids2 = ids2.split(",");
2163
+ } else if (typeof ids2 === "number") {
2164
+ ids2 = [ids2];
2165
+ } else
2166
+ ;
2167
+ }
2168
+ return ids2;
2169
+ }
2170
+ function changePermissionListToMap(pageContext) {
2171
+ changeFieldPermissionToMap(pageContext);
2172
+ changeActionPermissionToMap(pageContext);
2173
+ }
2174
+ function changeFieldPermissionToMap(pageContext) {
2175
+ const fieldPermissionMap = /* @__PURE__ */ new Map();
2176
+ const fieldPermissions = pageContext.fieldPermissions;
2177
+ if (typeof fieldPermissions !== "undefined") {
2178
+ for (let i = 0; i < fieldPermissions.length; i++) {
2179
+ const prop = fieldPermissions[i].name;
2180
+ if (prop) {
2181
+ if (prop.indexOf("$") === 0 && prop.indexOf(".") > 0) {
2182
+ const fieldPermissionOrg = fieldPermissions[i];
2183
+ const fieldPermission = JSON.parse(JSON.stringify(fieldPermissionOrg));
2184
+ const subModelName = prop.substring(1, prop.indexOf("."));
2185
+ const subProp = prop.substring(prop.indexOf(".") + 1);
2186
+ fieldPermission.name = subProp;
2187
+ if (fieldPermission && fieldPermission.name === "all_fields") {
2188
+ if (fieldPermission.canEdit === false) {
2189
+ if (fieldPermission.rowIndexes) {
2190
+ fieldPermissionMap.set(subModelName, [
2191
+ {
2192
+ name: "all_fields",
2193
+ canEdit: false,
2194
+ rowIndexes: fieldPermission.rowIndexes
2195
+ }
2196
+ ]);
2197
+ } else {
2198
+ fieldPermissionMap.set(subModelName, [{ name: "all_fields", canEdit: false }]);
2199
+ }
2200
+ } else {
2201
+ if (fieldPermission.rowIndexes) {
2202
+ fieldPermissionMap.set(subModelName, [
2203
+ {
2204
+ name: "all_fields",
2205
+ canEdit: true,
2206
+ rowIndexes: fieldPermission.rowIndexes
2207
+ }
2208
+ ]);
2209
+ } else {
2210
+ fieldPermissionMap.set(subModelName, [{ name: "all_fields", canEdit: true }]);
2211
+ }
2212
+ }
2213
+ } else {
2214
+ let subTableFieldPermission = fieldPermissionMap.get(subModelName);
2215
+ if (subTableFieldPermission) {
2216
+ subTableFieldPermission.push(fieldPermission);
2217
+ } else {
2218
+ subTableFieldPermission = [];
2219
+ subTableFieldPermission.push(fieldPermission);
2220
+ }
2221
+ fieldPermissionMap.set(subModelName, subTableFieldPermission);
2222
+ }
2223
+ } else {
2224
+ fieldPermissionMap.set(prop, fieldPermissions[i]);
2225
+ }
2226
+ }
2227
+ }
2228
+ }
2229
+ pageContext.fieldPermissionMap = fieldPermissionMap;
2230
+ }
2231
+ function changeActionPermissionToMap(pageContext) {
2232
+ const fieldPermissionMap = pageContext.fieldPermissionMap;
2233
+ const actionPermissionMap = /* @__PURE__ */ new Map();
2234
+ const actionPermissions = pageContext.actionPermissions;
2235
+ if (typeof actionPermissions !== "undefined" && actionPermissions !== null) {
2236
+ const subModelNames = Object.keys(actionPermissions);
2237
+ subModelNames.forEach((subModelName) => {
2238
+ const oneTableActionPermission = actionPermissions[subModelName];
2239
+ const subTableFieldPermission = fieldPermissionMap.get(subModelName);
2240
+ if (subTableFieldPermission && subTableFieldPermission.length > 0 && subTableFieldPermission[0].name === "all_fields" && subTableFieldPermission[0].canEdit === false) {
2241
+ oneTableActionPermission.canUpdate = false;
2242
+ oneTableActionPermission.canAdd = false;
2243
+ } else {
2244
+ const canUpdate = oneTableActionPermission.canUpdate;
2245
+ const updateRowIndexes = oneTableActionPermission.updateRowIndexes;
2246
+ if (canUpdate !== void 0 && canUpdate === false && updateRowIndexes !== void 0 && updateRowIndexes !== null && updateRowIndexes.length > 0) {
2247
+ fieldPermissionMap.set(subModelName, [
2248
+ {
2249
+ name: "all_fields",
2250
+ canEdit: false,
2251
+ rowIndexes: updateRowIndexes
2252
+ }
2253
+ ]);
2254
+ }
2255
+ }
2256
+ actionPermissionMap.set(subModelName, oneTableActionPermission);
2257
+ });
2258
+ }
2259
+ pageContext.actionPermissionMap = actionPermissionMap;
2260
+ }
1965
2261
  export {
1966
2262
  dealAfterOperate,
1967
2263
  dealCompleteTaskParam,
@@ -1973,6 +2269,7 @@ export {
1973
2269
  doReturnTaskTo,
1974
2270
  exportFormReport,
1975
2271
  getAdditionalParamMap,
2272
+ getFormData,
1976
2273
  getRemoveSigner,
1977
2274
  getSaveFormRequest,
1978
2275
  getSaveFormRequestWithRow,
@@ -1980,6 +2277,7 @@ export {
1980
2277
  isVisibleWorkflowButton,
1981
2278
  judgeDataNumber,
1982
2279
  refreshFormOrListPage,
2280
+ refreshPage,
1983
2281
  standardEvents,
1984
2282
  updateValuesWhenCloseDialog
1985
2283
  };
@@ -109,7 +109,7 @@ export declare function formatValueByType(value: any, formatType: string, format
109
109
  * @param entity
110
110
  * @param variable
111
111
  */
112
- export declare function getValueFromVariable(entity: any, variable: string): any;
112
+ export declare function getValueFromVariable(entity: any, variable: string, row?: any): any;
113
113
  /**
114
114
  * 从对象中获取值
115
115
  * @param valueSource 源对象
@@ -139,3 +139,5 @@ export declare function caculateShowCondition(pageContext: PageContext, configur
139
139
  export declare function monitorFieldChange(pageContext: PageContext, monitorFields: Array<string>, triggerFunc: Function): void;
140
140
  export declare function getFormPropName(prop: any): any;
141
141
  export declare function getSizeConfig(pageContext: PageContext, configure: Component): any;
142
+ export declare function isPromise(p: any): boolean;
143
+ export declare function decomposeVariable(variable: string): string[];
@@ -408,7 +408,7 @@ function formatValueByType(value, formatType, formatInfo) {
408
408
  }
409
409
  return value;
410
410
  }
411
- function getValueFromVariable(entity, variable) {
411
+ function getValueFromVariable(entity, variable, row) {
412
412
  if (variable == null || variable == void 0) {
413
413
  return variable;
414
414
  }
@@ -442,8 +442,12 @@ function getValueFromVariable(entity, variable) {
442
442
  valueSource = entity.system;
443
443
  } else if (paramName.startsWith("fixed.")) {
444
444
  return paramName.substring(6);
445
+ } else if (paramName.startsWith("row.")) {
446
+ paramName = paramName.substring(4);
447
+ valueSource = row;
448
+ paramType = "row";
445
449
  }
446
- if (!paramName || !paramName) {
450
+ if (!paramName) {
447
451
  console.log("获取变量失败", variable, entity);
448
452
  return "";
449
453
  }
@@ -628,6 +632,9 @@ function getSizeConfig(pageContext2, configure2) {
628
632
  if (configure2.props && configure2.props.size && configure2.props.size[pageModeType]) {
629
633
  sizeConfig = configure2.props.size[pageModeType];
630
634
  }
635
+ if (!sizeConfig && configure2.props && configure2.props.size) {
636
+ sizeConfig = configure2.props.size["pc"];
637
+ }
631
638
  return sizeConfig;
632
639
  }
633
640
  function getPageModeType(pageContext2) {
@@ -637,9 +644,20 @@ function getPageModeType(pageContext2) {
637
644
  }
638
645
  return dimensions;
639
646
  }
647
+ function isPromise(p) {
648
+ return p && Object.prototype.toString.call(p) === "[object Promise]";
649
+ }
650
+ function decomposeVariable(variable) {
651
+ if (!variable) {
652
+ return [];
653
+ }
654
+ const paramNames = variable.match(/\${(.*?)}/);
655
+ return paramNames ? paramNames[1].split(".") : [];
656
+ }
640
657
  export {
641
658
  autoSetAfterSelect,
642
659
  caculateShowCondition,
660
+ decomposeVariable,
643
661
  formatValueByType,
644
662
  formatVariableValue,
645
663
  getChartDatasFromPage,
@@ -651,6 +669,7 @@ export {
651
669
  getValueFromSource,
652
670
  getValueFromVariable,
653
671
  getVariableValue,
672
+ isPromise,
654
673
  monitorFieldChange,
655
674
  queryOptionDatasources,
656
675
  setValueForVariableName,