super-page-runtime 2.0.32 → 2.0.35

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.
@@ -33,7 +33,7 @@ function getCommonFormData(pageContext) {
33
33
  const pageCode = pageContext.code;
34
34
  const pageVersion = pageContext.version;
35
35
  const additionalParamMap = getAdditionalParamMap(pageContext);
36
- const dataId = additionalParamMap && additionalParamMap.id ? additionalParamMap.id : 1;
36
+ const dataId = additionalParamMap && additionalParamMap.id ? additionalParamMap.id : null;
37
37
  const ids = additionalParamMap ? additionalParamMap.ids : null;
38
38
  const taskId = additionalParamMap ? additionalParamMap.taskId : null;
39
39
  const permissionPrefix = pageCode;
@@ -46,13 +46,13 @@ function getCommonFormData(pageContext) {
46
46
  id: dataId,
47
47
  systemCode,
48
48
  functionCode: permissionPrefix + ".gets",
49
- tableNames: pageContext.tableNames
49
+ listCodes: pageContext.listCodes
50
50
  };
51
51
  if (!param.id && additionalParamMap && additionalParamMap._t_ && getSessionCache(additionalParamMap._t_ + "_id")) {
52
52
  param.id = getSessionCache(additionalParamMap._t_ + "_id");
53
53
  }
54
54
  if (ids) {
55
- param["ids"] = ids;
55
+ param["ids"] = formatAdditionalParamMapIds(ids);
56
56
  }
57
57
  if (pageContext.notIdInitializationList) {
58
58
  param["noIdAndTaskIdInitSetting"] = JSON.stringify(pageContext.notIdInitializationList);
@@ -72,7 +72,7 @@ function getCommonFormData(pageContext) {
72
72
  const listCode = getListCode(pageCode, pageVersion, tableUuid);
73
73
  listCodes.push(listCode);
74
74
  });
75
- param["tableNames"] = listCodes;
75
+ param["listCodes"] = listCodes;
76
76
  }
77
77
  const urlForView = backendUrl + "/dsc/commons/gets";
78
78
  http.post(urlForView, param).then((commonEntity) => {
@@ -109,7 +109,7 @@ function getWorkflowFormData(pageContext) {
109
109
  const pageCode = pageContext.code;
110
110
  const pageVersion = pageContext.version;
111
111
  const additionalParamMap = getAdditionalParamMap(pageContext);
112
- const dataId = additionalParamMap && additionalParamMap.id ? additionalParamMap.id : null;
112
+ const dataId = additionalParamMap && additionalParamMap.id ? additionalParamMap.id : 25;
113
113
  const ids = additionalParamMap ? additionalParamMap.ids : null;
114
114
  const taskId = additionalParamMap ? additionalParamMap.taskId : null;
115
115
  const permissionPrefix = pageCode;
@@ -121,10 +121,18 @@ function getWorkflowFormData(pageContext) {
121
121
  isWorkflowEntity: true,
122
122
  systemCode,
123
123
  functionCode: permissionPrefix + ".gets",
124
- tableNames: pageContext.tableNames
124
+ listCodes: pageContext.listCodes
125
125
  };
126
+ if (pageContext.tableUuids) {
127
+ const listCodes = [];
128
+ pageContext.tableUuids.forEach((tableUuid) => {
129
+ const listCode = getListCode(pageCode, pageVersion, tableUuid);
130
+ listCodes.push(listCode);
131
+ });
132
+ param["listCodes"] = listCodes;
133
+ }
126
134
  if (ids) {
127
- param["ids"] = ids;
135
+ param["ids"] = formatAdditionalParamMapIds(ids);
128
136
  }
129
137
  if (taskId) {
130
138
  param["taskId"] = this.taskId;
@@ -271,6 +279,18 @@ function changeActionPermissionToMap(pageContext) {
271
279
  }
272
280
  pageContext.actionPermissionMap = actionPermissionMap;
273
281
  }
282
+ function formatAdditionalParamMapIds(ids) {
283
+ if (ids) {
284
+ if (typeof ids === "string") {
285
+ ids = ids.split(",");
286
+ } else if (typeof ids === "number") {
287
+ ids = [ids];
288
+ } else {
289
+ console.error("ids参数类型错误");
290
+ }
291
+ }
292
+ return ids;
293
+ }
274
294
  window["$PageUtil"] = functions;
275
295
  export {
276
296
  getFormData,
@@ -9,7 +9,7 @@ function generateCodeByRule(rules, data) {
9
9
  value += "".padEnd(item.length, item.supplementaryCharacters);
10
10
  } else {
11
11
  if (filedValue.length > item.length) {
12
- value += filedValue.substring(0, item.supplementaryCharacters);
12
+ value += filedValue.substring(0, item.length);
13
13
  } else {
14
14
  value += filedValue.padEnd(item.length, item.supplementaryCharacters);
15
15
  }
@@ -265,7 +265,7 @@ function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
265
265
  tableName,
266
266
  isPermission: isPermission + "",
267
267
  systemCode,
268
- tableNames: pageContext.tableNames,
268
+ listCodes: pageContext.listCodes,
269
269
  pageCode: pageContext.code,
270
270
  pageVersion: pageContext.version
271
271
  };
@@ -383,7 +383,7 @@ function saveFunc(params, isListButton) {
383
383
  }
384
384
  });
385
385
  }
386
- function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, ids, row) {
386
+ function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, ids2, row) {
387
387
  const isWorkflow = pageContext.workflowCode ? true : false;
388
388
  const systemCode = pageContext.systemCode;
389
389
  const isPermission = configureObj.props.base.isPermission === void 0 || configureObj.props.base.isPermission === "true" || configureObj.props.base.isPermission;
@@ -399,12 +399,12 @@ function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion
399
399
  isWorkflowEntity: isWorkflow,
400
400
  functionCode: functionCodes,
401
401
  isPermission: isPermission + "",
402
- tableNames: pageContext.tableNames,
402
+ listCodes: pageContext.listCodes,
403
403
  pageCode: pageContext.code,
404
404
  pageVersion: pageContext.version
405
405
  };
406
- if (ids) {
407
- param["ids"] = ids;
406
+ if (ids2) {
407
+ param["ids"] = ids2;
408
408
  }
409
409
  if (pageContext.judgeHeavyList) {
410
410
  if (isArrayFn(pageContext.judgeHeavyList)) {
@@ -648,7 +648,7 @@ function submitForm(params, isListButton, eventName, url) {
648
648
  const configureObj = params.configureObj;
649
649
  const mainDefaultValueColumns = params.mainDefaultValueColumns;
650
650
  const dynamicColumnInfo = params.dynamicColumnInfo;
651
- const ids = params.ids;
651
+ const ids2 = params.ids;
652
652
  const successOperation = configureObj.props.base.successOperation;
653
653
  let isUnControlVersion = false;
654
654
  if (successOperation && successOperation === "noOperation") {
@@ -662,7 +662,7 @@ function submitForm(params, isListButton, eventName, url) {
662
662
  mainDefaultValueColumns,
663
663
  dynamicColumnInfo,
664
664
  eventName,
665
- ids
665
+ ids2
666
666
  );
667
667
  if (request) {
668
668
  request.then((data) => {
@@ -682,7 +682,7 @@ function submitForm(params, isListButton, eventName, url) {
682
682
  }
683
683
  });
684
684
  }
685
- function getSubmitFormRequest(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, eventName, ids) {
685
+ function getSubmitFormRequest(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, eventName, ids2) {
686
686
  return new Promise((resolve, reject) => {
687
687
  const buttonName = configureObj.props.base.title;
688
688
  const operationI18nTip = "superPageRuntimeMessage.whetherToConfirm" + upperFirstCase(eventName);
@@ -703,7 +703,7 @@ function getSubmitFormRequest(pageContext, configureObj, url, isUnControlVersion
703
703
  isUnControlVersion,
704
704
  mainDefaultValueColumns,
705
705
  dynamicColumnInfo,
706
- ids,
706
+ ids2,
707
707
  null
708
708
  );
709
709
  const baseUrl = getBaseUrl(backendUrl);
@@ -721,8 +721,8 @@ function getSubmitFormRequest(pageContext, configureObj, url, isUnControlVersion
721
721
  }
722
722
  function deleteFunc(params) {
723
723
  return new Promise((resolve, reject) => {
724
- const ids = params.ids;
725
- if (!ids || ids.length === 0) {
724
+ const ids2 = params.ids;
725
+ if (!ids2 || ids2.length === 0) {
726
726
  ElMessage({
727
727
  showClose: true,
728
728
  type: "warning",
@@ -752,12 +752,12 @@ function deleteFunc(params) {
752
752
  const isWorkflow = pageContext.workflowCode ? true : false;
753
753
  const functionCodes = getPermissionCodes(configureObj, pageContext);
754
754
  const param = {
755
- ids,
755
+ ids: ids2,
756
756
  functionCode: functionCodes,
757
757
  isPermission: isPermission + "",
758
758
  systemCode,
759
759
  isWorkflowEntity: isWorkflow,
760
- tableNames: pageContext.tableNames,
760
+ listCodes: pageContext.listCodes,
761
761
  pageCode: pageContext.code,
762
762
  pageVersion: pageContext.version
763
763
  };
@@ -950,11 +950,11 @@ function doImportFinally(params, fileObj) {
950
950
  console.log("error==", error);
951
951
  });
952
952
  }
953
- function judgeDataNumber(buttonConfigureObj, ids) {
953
+ function judgeDataNumber(buttonConfigureObj, ids2) {
954
954
  const buttonConfigureBase = buttonConfigureObj.props.base;
955
955
  if (buttonConfigureBase.conditionsForExecution && buttonConfigureBase.conditionsForExecution !== "") {
956
956
  if (buttonConfigureBase.conditionsForExecution === "one") {
957
- if (!ids || ids.length !== 1) {
957
+ if (!ids2 || ids2.length !== 1) {
958
958
  ElMessage({
959
959
  showClose: true,
960
960
  type: "warning",
@@ -965,7 +965,7 @@ function judgeDataNumber(buttonConfigureObj, ids) {
965
965
  return false;
966
966
  }
967
967
  } else if (buttonConfigureBase.conditionsForExecution === "more") {
968
- if (!ids || ids.length <= 0) {
968
+ if (!ids2 || ids2.length <= 0) {
969
969
  ElMessage({
970
970
  showClose: true,
971
971
  type: "warning",
@@ -1038,7 +1038,7 @@ function getWorkflowSaveParams(params) {
1038
1038
  definitionId: pageContext.definitionId,
1039
1039
  functionCode: functionCodes,
1040
1040
  systemCode,
1041
- tableNames: pageContext.tableNames,
1041
+ listCodes: pageContext.listCodes,
1042
1042
  pageCode: pageContext.code,
1043
1043
  pageVersion: pageContext.version
1044
1044
  };
@@ -1076,7 +1076,15 @@ function getWorkflowSaveParams(params) {
1076
1076
  const additionalParamMap = getAdditionalParamMap(pageContext);
1077
1077
  param["additionalParamMap"] = additionalParamMap;
1078
1078
  if (additionalParamMap.ids && additionalParamMap.ids.length > 0) {
1079
- param["ids"] = additionalParamMap.ids;
1079
+ if (typeof additionalParamMap.ids === "string") {
1080
+ param["ids"] = additionalParamMap.ids.split(",");
1081
+ } else if (Array.isArray(additionalParamMap.ids)) {
1082
+ param["ids"] = additionalParamMap.ids;
1083
+ } else if (typeof ids === "number") {
1084
+ param["ids"] = [additionalParamMap.ids];
1085
+ } else {
1086
+ console.error("ids参数类型错误");
1087
+ }
1080
1088
  }
1081
1089
  const successOperation = configureObj.props.base.successOperation;
1082
1090
  if (successOperation && successOperation === "noOperation") {
@@ -1282,7 +1290,7 @@ function getTransactTaskParam(params) {
1282
1290
  const permissionPrefix = pageContext.code;
1283
1291
  const additionalParamMap = getAdditionalParamMap(pageContext);
1284
1292
  const dataId = dataModel.ID !== void 0 && dataModel.ID !== null ? dataModel.ID : dataModel.id;
1285
- ({
1293
+ const requestParams = {
1286
1294
  beanName: pageContext.beanName,
1287
1295
  id: dataId,
1288
1296
  entity: dataModel,
@@ -1290,14 +1298,15 @@ function getTransactTaskParam(params) {
1290
1298
  tableName: pageContext.tableName,
1291
1299
  functionCode: permissionPrefix + ".xxx",
1292
1300
  isWorkflowEntity: true,
1293
- tableNames: pageContext.tableNames,
1301
+ listCodes: pageContext.listCodes,
1294
1302
  pageCode: pageContext.code,
1295
1303
  pageVersion: pageContext.version
1296
- });
1297
- ({
1304
+ };
1305
+ requestParams["completeTaskParam"] = {
1298
1306
  taskId: pageContext.completeTaskParam.taskId,
1299
1307
  systemCode
1300
- });
1308
+ };
1309
+ return requestParams;
1301
1310
  }
1302
1311
  function getAdditionalParamMap(pageContext) {
1303
1312
  if (pageContext.entity) {
@@ -200,14 +200,14 @@ function validateWorkflowFormDataModel(dataModel, pageContext) {
200
200
  const subTablePageInfo = pageContext.subTablePageInfo;
201
201
  let result = false;
202
202
  const handleModels = JSON.parse(JSON.stringify(dataModel));
203
- let rules = pageContext.rules;
203
+ const rules = pageContext.workflowRules;
204
204
  if (!rules) {
205
205
  result = true;
206
206
  } else {
207
207
  result = validator(handleModels, rules, null, null, true);
208
208
  }
209
209
  if (result === true) {
210
- let workflowFieldPermissionRules = pageContext.workflowRules;
210
+ const workflowFieldPermissionRules = pageContext.workflowRules;
211
211
  if (!workflowFieldPermissionRules) {
212
212
  result = true;
213
213
  } else {
@@ -291,7 +291,7 @@ function validateCommonFormDataModel(dataModel, pageContext, rules) {
291
291
  }
292
292
  function packageCustomRules(orgCustomRules, orgRules) {
293
293
  if (!orgCustomRules) {
294
- return;
294
+ return orgRules;
295
295
  }
296
296
  if (!orgRules) {
297
297
  orgRules = {};
@@ -19,7 +19,10 @@ function formatScanRuleSets(ruleList) {
19
19
  function packageScanRuleSets(scanRuleSets2) {
20
20
  return new Promise((resolve, reject) => {
21
21
  if (Object.keys(scanRuleSets2).length > 0) {
22
- http.post("/dc/setting-barcode-analysis/by-codes", Object.keys(scanRuleSets2)).then((res2) => {
22
+ http.post(
23
+ window["$vueApp"].config.globalProperties.baseAPI + "/dc/setting-barcode-analysis/by-codes",
24
+ Object.keys(scanRuleSets2)
25
+ ).then((res2) => {
23
26
  res2.forEach((rule) => {
24
27
  const ruleOuts = JSON.parse(rule.barcodeAnalysisOuts);
25
28
  const needOutsFields = /* @__PURE__ */ new Set();
@@ -49,6 +52,7 @@ function analysisScanValue(scanValue, scanRuleSets) {
49
52
  if (!scanValue) {
50
53
  return null;
51
54
  }
55
+ debugger;
52
56
  const scanSets = Object.values(scanRuleSets);
53
57
  for (let i = 0; i < scanSets.length; i++) {
54
58
  const scanSet = scanSets[i];
@@ -57,7 +57,7 @@ export interface PageDesign extends Component {
57
57
  initChartServiceConfigs?: Array<any>;
58
58
  rules?: object;
59
59
  tableUuids?: Array<any>;
60
- tableNames?: Array<any>;
60
+ listCodes?: Array<any>;
61
61
  formNoRuleCode?: string;
62
62
  judgeHeavyList?: Array<any>;
63
63
  conversionCodes?: Array<any>;
@@ -89,7 +89,7 @@ export interface PageContext extends Component {
89
89
  workflowVersion?: number;
90
90
  rules?: object;
91
91
  tableUuids?: Array<any>;
92
- tableNames?: Array<any>;
92
+ listCodes?: Array<any>;
93
93
  formNoRuleCode?: string;
94
94
  judgeHeavyList?: Array<any>;
95
95
  conversionCodes?: Array<any>;
@@ -19,11 +19,14 @@ function convertToPageContext(pageDesign, pageRequest) {
19
19
  code: pageDesign.code,
20
20
  version: pageDesign.version,
21
21
  dimensions: pageDesign.dimensions,
22
+ systemCode: pageDesign.systemCode,
23
+ systemVersion: pageDesign.systemVersion,
24
+ backendUrl: pageDesign.backendUrl,
22
25
  rules: [],
23
26
  // rules: pageDesign.rules, // 表单验证规则。在runtime object-render中实时获得
24
27
  tableUuids: pageDesign.tableUuids,
25
28
  // 表格uuid集合
26
- tableNames: pageDesign.tableNames,
29
+ listCodes: pageDesign.listCodes,
27
30
  // 当前页面中表格对应的数据表名集合,后台保存子表记录时需要
28
31
  formNoRuleCode: pageDesign.formNoRuleCode,
29
32
  // 表单编号规则
@@ -6,7 +6,9 @@ function getDataTypeMapRequest(backendUrl, tableName) {
6
6
  return http.get(baseUrl + "/dsc/commons/tables/" + tableName + "/data-types");
7
7
  }
8
8
  function popupToPage(params) {
9
- eventBus.$emit(params.pageCode + "_open-dialog", params);
9
+ const pageCode = params.pageContext && params.pageContext.code;
10
+ console.log("弹框显示页面--popupToPage====params=", params);
11
+ eventBus.$emit(pageCode + "_open-dialog", params);
10
12
  }
11
13
  export {
12
14
  getDataTypeMapRequest,
@@ -24,7 +24,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
24
  });
25
25
  return;
26
26
  }
27
- emits("result", this.selections[0]);
27
+ emits("result", selections.value[0]);
28
28
  }
29
29
  function select(selection) {
30
30
  selections.value = selection;
@@ -18,7 +18,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  const runtimeStyle = runtimeInfo.style;
19
19
  const runtimeClass = runtimeInfo.class;
20
20
  const headerStyle = runtimeInfo.headerStyle;
21
- const contentClass = runtimeInfo.contentClass;
21
+ const contentStyle = runtimeInfo.contentStyle;
22
22
  function test() {
23
23
  props.configure.props.title = "teee";
24
24
  }
@@ -34,7 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
34
  }, createSlots({
35
35
  default: withCtx(() => [
36
36
  createElementVNode("div", {
37
- class: normalizeClass(unref(contentClass))
37
+ style: normalizeStyle(unref(contentStyle))
38
38
  }, [
39
39
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.configure.items, (element, itemIndex) => {
40
40
  return openBlock(), createBlock(_sfc_main$1, {
@@ -43,7 +43,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
43
43
  configure: element
44
44
  }, null, 8, ["pageContext", "configure"]);
45
45
  }), 128))
46
- ], 2)
46
+ ], 4)
47
47
  ]),
48
48
  _: 2
49
49
  }, [
@@ -1,6 +1,6 @@
1
- import { defineComponent, ref, resolveComponent, openBlock, createBlock, normalizeStyle, unref, normalizeClass, withCtx, createElementBlock, Fragment, renderList } from "vue";
1
+ import { defineComponent, ref, resolveComponent, openBlock, createBlock, normalizeStyle, unref, normalizeClass, withCtx, createElementBlock, Fragment, renderList, createVNode } from "vue";
2
2
  import _sfc_main$1 from "../../object-render.vue.js";
3
- import "../../../../utils/global-refs.js";
3
+ import { PageDimensions } from "../../../../utils/interfaces/page-design-types.js";
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "flex-runtime",
6
6
  props: {
@@ -14,7 +14,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14
14
  const runtimeStyle = runtimeInfo.style;
15
15
  const runtimeClass = runtimeInfo.class;
16
16
  const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
17
+ if (props.configure.items) {
18
+ const pageDimensions = props.pageContext && props.pageContext.dimensions ? props.pageContext.dimensions : PageDimensions.PC;
19
+ for (let item of props.configure.items) {
20
+ const itemCommon = item.runtime && item.runtime.common ? item.runtime.common : {};
21
+ const sizeStyle = itemCommon.style ? itemCommon.style[pageDimensions + "_style"] : void 0;
22
+ const itemStyle = {};
23
+ if (sizeStyle) {
24
+ item.flexSpan = sizeStyle.flexSpan ? sizeStyle.flexSpan : -2;
25
+ Object.assign(itemStyle, sizeStyle);
26
+ delete itemStyle.height;
27
+ delete sizeStyle.width;
28
+ }
29
+ item.itemStyle = itemStyle;
30
+ if (itemCommon.style) {
31
+ itemCommon.style[pageDimensions + "_class"] = "";
32
+ }
33
+ }
34
+ }
17
35
  return (_ctx, _cache) => {
36
+ const _component_el_col = resolveComponent("el-col");
18
37
  const _component_el_row = resolveComponent("el-row");
19
38
  return openBlock(), createBlock(_component_el_row, {
20
39
  ref_key: "thisRef",
@@ -27,11 +46,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
46
  }, {
28
47
  default: withCtx(() => [
29
48
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.configure.items, (element, itemIndex) => {
30
- return openBlock(), createBlock(_sfc_main$1, {
49
+ return openBlock(), createBlock(_component_el_col, {
31
50
  key: element.uuid,
32
- pageContext: _ctx.pageContext,
33
- configure: element
34
- }, null, 8, ["pageContext", "configure"]);
51
+ style: normalizeStyle(element.itemStyle),
52
+ span: element.flexSpan
53
+ }, {
54
+ default: withCtx(() => [
55
+ createVNode(_sfc_main$1, {
56
+ pageContext: _ctx.pageContext,
57
+ configure: element
58
+ }, null, 8, ["pageContext", "configure"])
59
+ ]),
60
+ _: 2
61
+ }, 1032, ["style", "span"]);
35
62
  }), 128))
36
63
  ]),
37
64
  _: 1
@@ -1,4 +1,4 @@
1
- import { defineComponent, resolveComponent, openBlock, createBlock, unref, normalizeStyle, normalizeClass, withCtx, createElementBlock, Fragment, renderList } from "vue";
1
+ import { defineComponent, ref, resolveComponent, openBlock, createBlock, unref, normalizeStyle, normalizeClass, withCtx, createElementBlock, toDisplayString, createCommentVNode, Fragment, renderList } from "vue";
2
2
  import _sfc_main$1 from "../../object-render.vue.js";
3
3
  import "../../../../utils/global-refs.js";
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -14,8 +14,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14
14
  }
15
15
  const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
16
16
  const runtimeProps = runtimeInfo.props ? runtimeInfo.props : {};
17
- const runtimeStyle = runtimeInfo.style;
17
+ const runtimeStyle = ref(runtimeInfo.style ? runtimeInfo.style : {});
18
18
  const runtimeClass = runtimeInfo.class;
19
+ const titleStyle = ref(runtimeInfo.titleStyle ? runtimeInfo.titleStyle : {});
19
20
  return (_ctx, _cache) => {
20
21
  const _component_el_form = resolveComponent("el-form");
21
22
  return openBlock(), createBlock(_component_el_form, {
@@ -23,10 +24,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
24
  "label-width": unref(runtimeProps).labelWidth,
24
25
  "label-position": unref(runtimeProps).labelPosition,
25
26
  size: unref(runtimeProps).componentSize,
26
- style: normalizeStyle(unref(runtimeStyle)),
27
+ style: normalizeStyle(runtimeStyle.value),
27
28
  class: normalizeClass(unref(runtimeClass))
28
29
  }, {
29
30
  default: withCtx(() => [
31
+ unref(runtimeProps).formTitle ? (openBlock(), createElementBlock("div", {
32
+ key: 0,
33
+ class: "amb-widget-form-title",
34
+ style: normalizeStyle(titleStyle.value)
35
+ }, toDisplayString(unref(runtimeProps).formTitle), 5)) : createCommentVNode("", true),
30
36
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.configure.items, (element, itemIndex) => {
31
37
  return openBlock(), createBlock(_sfc_main$1, {
32
38
  key: element.uuid,
@@ -5,7 +5,7 @@ import { getFormModelFields } from "../../../../utils/page-init-util.js";
5
5
  import { generateCodeByRule } from "../../../../utils/barcode-util.js";
6
6
  import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
7
7
  import { handleEvent } from "../../../../utils/events/event-util.js";
8
- import "agilebuilder-ui/src/utils/request";
8
+ import http from "agilebuilder-ui/src/utils/request";
9
9
  const _hoisted_1 = ["src"];
10
10
  const _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  __name: "barcode-runtime",
@@ -69,24 +69,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
69
69
  });
70
70
  }
71
71
  function handleSelectedRule() {
72
- const rule = JSON.parse(
73
- '[{"fieldName":"-1","fixedValue":"|"},{"fixedValue":"","fieldLength":"10","suppliement":"x","fieldName":"passenger"},{"fixedValue":"","fieldLength":"","suppliement":"","fieldName":"passengerNumber"},{"fixedValue":"AAA","fieldLength":"","suppliement":"","fieldName":"-1"}]'
74
- );
75
- rule.forEach((item) => {
76
- if (item.fieldName !== "-1" && item.fieldName !== -1) {
77
- watchVariableNames.value.push(item.fieldName);
78
- watch(
79
- () => props.pageContext.entity.data[item.fieldName],
80
- (newValue, oldValue) => {
81
- if (newValue !== void 0 && newValue !== null) {
82
- const codeValue = generateCodeByRule(rule, props.pageContext.entity.data);
83
- if (codeValue) {
84
- generateCode(codeValue);
72
+ http.get(
73
+ window["$vueApp"].config.globalProperties.baseAPI + "/dc/setting-barcode-models/by-code/" + designProperty.value.generateRule
74
+ ).then((res) => {
75
+ const rule = JSON.parse(res.barcodeModelItems);
76
+ rule.forEach((item) => {
77
+ if (item.propDbName !== "-1" && item.propDbName !== -1) {
78
+ watchVariableNames.value.push(item.propDbName);
79
+ watch(
80
+ () => props.pageContext.entity.data[item.propDbName],
81
+ (newValue, oldValue) => {
82
+ if (newValue !== void 0 && newValue !== null) {
83
+ const codeValue = generateCodeByRule(rule, props.pageContext.entity.data);
84
+ if (codeValue) {
85
+ generateCode(codeValue);
86
+ }
85
87
  }
86
88
  }
87
- }
88
- );
89
- }
89
+ );
90
+ }
91
+ });
92
+ }).catch((error) => {
93
+ console.error("获取条码规则失败:", error);
90
94
  });
91
95
  }
92
96
  function generateFixedFormatCode() {
@@ -29,7 +29,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
29
29
  const runtimeStyle = runtimeInfo.style;
30
30
  const runtimeClass = runtimeInfo.class;
31
31
  const entity = props.pageContext.entity ? props.pageContext.entity : {};
32
- let dynamicFields = getModelFields(props.pageContext, props.configure, "${data." + prop + "}");
32
+ let dynamicFields = getModelFields(props.pageContext, props.configure, prop);
33
33
  const listViewShowFlag = ref(false);
34
34
  const baseURL = window["$vueApp"].config.globalProperties.baseURL;
35
35
  const listViewOptions = ref({
@@ -390,7 +390,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
390
390
  }
391
391
  function getSelectionIds() {
392
392
  const dataIds = [];
393
- if (selections.value !== null) {
393
+ if (selections.value) {
394
394
  selections.value.forEach((item) => {
395
395
  dataIds.push(item.id ? item.id : item.ID ? item.ID : null);
396
396
  });
@@ -52,8 +52,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
52
52
  disabled: designProperty.value.state == "disabled",
53
53
  multiple: designProperty.value.multiple,
54
54
  treeType: designProperty.value.treeType,
55
- modelValue: unref(dataModel)[unref(fieldName)],
56
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(dataModel)[unref(fieldName)] = $event),
55
+ value: unref(dataModel)[unref(fieldName)],
57
56
  models: unref(dataModel),
58
57
  fields: unref(autoSetFields),
59
58
  size: designProperty.value.size,
@@ -61,7 +60,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
61
60
  separator: designProperty.value.separator,
62
61
  onChange: changeValue,
63
62
  onShowTree: showTree
64
- }, null, 8, ["disabled", "multiple", "treeType", "modelValue", "models", "fields", "size", "separator"])
63
+ }, null, 8, ["disabled", "multiple", "treeType", "value", "models", "fields", "size", "separator"])
65
64
  ]),
66
65
  _: 1
67
66
  }, 8, ["required", "class", "label-width", "style"]);
@@ -12,7 +12,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
12
12
  const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
13
13
  const headerStyle = runtimeInfo.headerStyle;
14
14
  const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
15
- let contentVariable = designProperty.value;
15
+ let contentVariable = designProperty.value["value"];
16
16
  const dynamicValue = computed(() => {
17
17
  if (!contentVariable) {
18
18
  return "";
@@ -26,6 +26,10 @@ declare const _default: import('vue').DefineComponent<{
26
26
  type: BooleanConstructor;
27
27
  required: false;
28
28
  };
29
+ dimensions: {
30
+ type: StringConstructor;
31
+ required: false;
32
+ };
29
33
  publishVersion: {
30
34
  type: NumberConstructor;
31
35
  required: false;
@@ -68,6 +72,10 @@ declare const _default: import('vue').DefineComponent<{
68
72
  type: BooleanConstructor;
69
73
  required: false;
70
74
  };
75
+ dimensions: {
76
+ type: StringConstructor;
77
+ required: false;
78
+ };
71
79
  publishVersion: {
72
80
  type: NumberConstructor;
73
81
  required: false;
@@ -9,7 +9,7 @@ import _sfc_main$3 from "./assemblys/common/task-informition-dialog.vue.js";
9
9
  import _sfc_main$4 from "./assemblys/common/remove-signer-dialog.vue.js";
10
10
  import eventBus from "../utils/eventBus.js";
11
11
  import { getFormData } from "../utils/api/api-util.js";
12
- import { getTaskInformitions, getRemoveSigner, exportFormReport, doImportFinally, doAddSigner, doCreateCopyTask, doAssign, doReturnTaskTo, doRemoveSigners, getAdditionalParamMap, updateValuesWhenCloseDialog, refreshFormOrListPage } from "../utils/events/standard-event.js";
12
+ import { getTaskInformitions, getRemoveSigner, exportFormReport, doImportFinally, doAddSigner, doCreateCopyTask, doAssign, doReturnTaskTo, doRemoveSigners, updateValuesWhenCloseDialog, refreshFormOrListPage, getAdditionalParamMap } from "../utils/events/standard-event.js";
13
13
  import { ElMessage } from "element-plus";
14
14
  import { useI18n } from "vue-i18n";
15
15
  import { DepartmentUserTree } from "agilebuilder-ui";
@@ -51,6 +51,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
51
51
  type: Boolean,
52
52
  required: false
53
53
  },
54
+ dimensions: {
55
+ type: String,
56
+ required: false
57
+ },
54
58
  // 系统版本号
55
59
  publishVersion: {
56
60
  type: Number,
@@ -99,12 +103,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
99
103
  const buttonPageContext = ref(null);
100
104
  const route = useRoute();
101
105
  function initPageDesign(pageDesign) {
102
- console.log("pageDesign==", pageDesign);
103
- pageContext.value = convertToPageContext(pageDesign, props.pageRequest);
106
+ const tempContext = convertToPageContext(pageDesign, props.pageRequest);
107
+ tempContext.isTest = props.isTest;
108
+ if (tempContext.isTest && props.dimensions) {
109
+ tempContext.dimensions = props.dimensions;
110
+ }
111
+ pageContext.value = tempContext;
104
112
  if (pageContext.value == null) {
105
113
  return;
106
114
  }
107
- pageContext.value.isTest = props.isTest;
108
115
  setTimeout(() => {
109
116
  initOptionDatas(pageContext.value, pageDesign.initOptionConfigs);
110
117
  }, 0);
@@ -175,7 +182,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
175
182
  parentPageContext.value = params.pageContext;
176
183
  parentConfigureObj.value = params.configureObj;
177
184
  parentEventParams.value = params.eventParams;
178
- openDialog(parentConfigureObj.value, parentEventParams.value);
185
+ params.jumpPageSetting;
186
+ openDialog(parentConfigureObj.value, parentEventParams.value, params.jumpPageSetting);
179
187
  });
180
188
  watch(
181
189
  () => pageContext.value.isRefresh,
@@ -261,7 +269,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
261
269
  function sessionCacheDataId() {
262
270
  const dataModel = pageContext.value.entity.data;
263
271
  const dataIdSessio = dataModel.ID == null ? dataModel.id : dataModel.ID;
264
- if (route.query._t_) {
272
+ if (route.query && route.query._t_ && dataIdSessio) {
265
273
  setSessionCache(route.query._t_ + "_id", dataIdSessio);
266
274
  }
267
275
  }
@@ -351,51 +359,66 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
351
359
  showRemoveSigner.value = false;
352
360
  doRemoveSigners(buttonParams.value, selectRemoveTasks);
353
361
  }
354
- const router = useRouter();
355
- function openDialog(configureObj, eventParams) {
356
- const myJumpPageSetting = configureObj && configureObj["props"] && configureObj["props"].linkPage ? configureObj["props"].linkPage : null;
357
- if (myJumpPageSetting && myJumpPageSetting.jumpPageUrl) {
358
- const additionalParamMap = getAdditionalParamMap(pageContext);
359
- let dataId = eventParams ? eventParams.id : null;
360
- let ids = eventParams ? eventParams.ids : null;
361
- const dataModel = pageContext.value.entity.data;
362
- const pageModel = pageContext.value.entity.page;
363
- let entity = {};
364
- if (pageModel) {
365
- Object.assign(entity, pageModel);
366
- }
367
- if (dataModel) {
368
- Object.assign(entity, dataModel);
369
- }
370
- jumpToPage(myJumpPageSetting, null, dataId, entity, additionalParamMap, ids).then(
371
- (openPageParams) => {
372
- if (openPageParams) {
373
- const jumpMode = openPageParams.jumpMode;
374
- const popPageSetting = openPageParams;
375
- popPageSetting.parentPageCode = parentPageContext.value.code;
376
- popPageSetting.parentPageVersion = parentPageContext.value.version;
377
- popPageSetting.isNewPage = true;
378
- if (jumpMode === "popup") {
379
- eventBus.$on(
380
- eventPageInfo.value + "close-dialog",
381
- (params) => {
382
- closeFunc(params);
383
- }
384
- );
385
- jumpPageSetting.value = popPageSetting;
386
- isShowDialog.value = true;
387
- } else if (jumpMode === "refresh") {
388
- router.push({
389
- path: "/dsc/page",
390
- query: popPageSetting
391
- });
362
+ function getPopPageSetting(configureObj, eventParams, jumpPageSetting2) {
363
+ return new Promise((resolve, reject) => {
364
+ if (jumpPageSetting2) {
365
+ resolve(jumpPageSetting2);
366
+ } else {
367
+ const myJumpPageSetting = configureObj && configureObj["props"] && configureObj["props"].linkPage ? configureObj["props"].linkPage : null;
368
+ if (myJumpPageSetting && myJumpPageSetting.jumpPageUrl) {
369
+ const additionalParamMap = getAdditionalParamMap(pageContext);
370
+ let dataId = eventParams ? eventParams.id : null;
371
+ let ids = eventParams ? eventParams.ids : null;
372
+ const dataModel = pageContext.value.entity.data;
373
+ const pageModel = pageContext.value.entity.page;
374
+ let entity = {};
375
+ if (pageModel) {
376
+ Object.assign(entity, pageModel);
377
+ }
378
+ if (dataModel) {
379
+ Object.assign(entity, dataModel);
380
+ }
381
+ jumpToPage(myJumpPageSetting, null, dataId, entity, additionalParamMap, ids).then(
382
+ (openPageParams) => {
383
+ resolve(openPageParams);
392
384
  }
385
+ );
386
+ } else {
387
+ resolve(false);
388
+ }
389
+ }
390
+ });
391
+ }
392
+ const router = useRouter();
393
+ function openDialog(configureObj, eventParams, myJumpPageSetting) {
394
+ getPopPageSetting(configureObj, eventParams, myJumpPageSetting).then(
395
+ (openPageParams) => {
396
+ if (openPageParams) {
397
+ const jumpMode = openPageParams.jumpMode;
398
+ const popPageSetting = openPageParams;
399
+ popPageSetting.parentPageCode = parentPageContext.value.code;
400
+ popPageSetting.parentPageVersion = parentPageContext.value.version;
401
+ popPageSetting.isNewPage = true;
402
+ if (jumpMode === "popup") {
403
+ eventBus.$on(
404
+ eventPageInfo.value + "close-dialog",
405
+ (params) => {
406
+ closeFunc(params);
407
+ }
408
+ );
409
+ jumpPageSetting.value = popPageSetting;
410
+ isShowDialog.value = true;
411
+ } else if (jumpMode === "refresh") {
412
+ router.push({
413
+ path: "/dsc/page",
414
+ query: popPageSetting
415
+ });
393
416
  }
417
+ } else {
418
+ console.error("页面配置信息不存在");
394
419
  }
395
- );
396
- } else {
397
- console.error("页面配置信息不存在");
398
- }
420
+ }
421
+ );
399
422
  }
400
423
  function closeFunc(params) {
401
424
  const jumpMode = params.jumpMode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-page-runtime",
3
- "version": "2.0.32",
3
+ "version": "2.0.35",
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.23",
51
+ "agilebuilder-ui": "1.0.28",
52
52
  "axios": "^1.6.8",
53
53
  "cypress": "^13.6.6",
54
54
  "element-plus": "^2.6.1",