super-page-runtime 2.0.25 → 2.0.28

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 (31) hide show
  1. package/dist/es/components/runtime/utils/api/api-util.js +9 -1
  2. package/dist/es/components/runtime/utils/assemblys-config.js +6 -0
  3. package/dist/es/components/runtime/utils/barcode-util.d.ts +8 -0
  4. package/dist/es/components/runtime/utils/barcode-util.js +36 -0
  5. package/dist/es/components/runtime/utils/common-util.js +1 -1
  6. package/dist/es/components/runtime/utils/events/event-util.js +1 -12
  7. package/dist/es/components/runtime/utils/events/print-label.d.ts +5 -0
  8. package/dist/es/components/runtime/utils/events/print-label.js +153 -0
  9. package/dist/es/components/runtime/utils/events/standard-event.d.ts +2 -0
  10. package/dist/es/components/runtime/utils/events/standard-event.js +61 -27
  11. package/dist/es/components/runtime/utils/page-helper-util.js +1 -0
  12. package/dist/es/components/runtime/utils/page-init-util.d.ts +1 -1
  13. package/dist/es/components/runtime/utils/page-init-util.js +16 -7
  14. package/dist/es/components/runtime/utils/table-utils.js +1 -10
  15. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +4 -0
  16. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +96 -0
  17. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +1 -1
  18. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +5 -33
  19. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +4 -3
  20. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +15 -9
  21. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +3 -2
  22. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +25 -1
  23. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +77 -39
  24. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +1 -1
  25. package/dist/es/components/runtime/views/super-page-dialog.vue.js +3 -0
  26. package/dist/es/components/runtime/views/super-page.vue.js +49 -39
  27. package/dist/es/i18n/langs/cn.js +54 -0
  28. package/dist/es/i18n/langs/en.js +54 -0
  29. package/dist/es/index.d.ts +3 -0
  30. package/dist/es/index.js +4 -0
  31. package/package.json +4 -3
@@ -1,7 +1,7 @@
1
1
  import { getSystemBackendUrl } from "agilebuilder-ui/src/utils/common-util";
2
2
  import { getSessionCache } from "agilebuilder-ui/src/utils/auth";
3
3
  import http from "agilebuilder-ui/src/utils/request";
4
- import { getBaseUrl } from "../common-util.js";
4
+ import { getBaseUrl, getListCode } from "../common-util.js";
5
5
  import { getAdditionalParamMap, dealCompleteTaskParam } from "../events/standard-event.js";
6
6
  import { packageCustomRules, getWorkflowRules } from "../events/validator-util.js";
7
7
  import { handleEvent } from "../events/event-util.js";
@@ -66,6 +66,14 @@ function getCommonFormData(pageContext) {
66
66
  if (taskId) {
67
67
  param["taskId"] = taskId;
68
68
  }
69
+ if (pageContext.tableUuids) {
70
+ let listCodes = [];
71
+ pageContext.tableUuids.forEach((tableUuid) => {
72
+ const listCode = getListCode(pageCode, pageVersion, tableUuid);
73
+ listCodes.push(listCode);
74
+ });
75
+ param["tableNames"] = listCodes;
76
+ }
69
77
  const urlForView = backendUrl + "/dsc/commons/gets";
70
78
  http.post(urlForView, param).then((commonEntity) => {
71
79
  if (commonEntity) {
@@ -182,6 +182,12 @@ const assemblyGroups = [
182
182
  runtimeComponent: defineAsyncComponent(() => {
183
183
  return import("../views/assemblys/button/dropdown/dropdown-runtime.vue.js");
184
184
  })
185
+ }, {
186
+ name: "print-label",
187
+ label: "打印标签",
188
+ runtimeComponent: defineAsyncComponent(() => {
189
+ return import("../views/assemblys/button/print-label/printlabel-runtime.vue.js");
190
+ })
185
191
  }]
186
192
  },
187
193
  {
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 跟据规则生成条码
3
+ */
4
+ export declare function generateCodeByRule(rules: any[], data: any): string;
5
+ declare const _default: {
6
+ generateCodeByRule: typeof generateCodeByRule;
7
+ };
8
+ export default _default;
@@ -0,0 +1,36 @@
1
+ function generateCodeByRule(rules, data) {
2
+ let allVariablesPresent = true;
3
+ let value = "";
4
+ rules.forEach((item) => {
5
+ if (item.propDbName !== "-1" && item.propDbName !== -1) {
6
+ const filedValue = data[item.propDbName];
7
+ if (item.supplementaryCharacters && item.length) {
8
+ if (!filedValue) {
9
+ value += "".padEnd(item.length, item.supplementaryCharacters);
10
+ } else {
11
+ if (filedValue.length > item.length) {
12
+ value += filedValue.substring(0, item.supplementaryCharacters);
13
+ } else {
14
+ value += filedValue.padEnd(item.length, item.supplementaryCharacters);
15
+ }
16
+ }
17
+ } else {
18
+ if (!filedValue) {
19
+ allVariablesPresent = false;
20
+ } else {
21
+ value += filedValue;
22
+ }
23
+ }
24
+ } else {
25
+ value += item.fixedValue;
26
+ }
27
+ });
28
+ console.log("跟据规则生成条码:" + value);
29
+ if (allVariablesPresent) {
30
+ return value;
31
+ }
32
+ return null;
33
+ }
34
+ export {
35
+ generateCodeByRule
36
+ };
@@ -65,7 +65,7 @@ function upperFirstCase(str) {
65
65
  return str.toLowerCase().replace(/( |^)[a-z]/g, (L) => L.toUpperCase());
66
66
  }
67
67
  function getListCode(pageCode, pageVersion, tableUuid) {
68
- return pageCode + "__V" + pageVersion + "__" + tableUuid;
68
+ return "V" + pageVersion + "__" + pageCode + "__" + tableUuid;
69
69
  }
70
70
  function deepCopy(srcObj) {
71
71
  if (typeof srcObj !== "object" || srcObj === null) {
@@ -104,6 +104,7 @@ function handleEventUtil($event, pageContext, configure, eventType, isExecute, o
104
104
  const isListButton = isListPage(pageContext);
105
105
  if (isListButton) {
106
106
  otherParams["selections"] = selections;
107
+ otherParams["id"] = selectionIds && selectionIds.length > 0 ? selectionIds[0] : null;
107
108
  otherParams["ids"] = selectionIds;
108
109
  }
109
110
  const tableConfigure = gridRef.getTableConfigure();
@@ -590,25 +591,13 @@ function headerClick(pageContext, configureObj, params) {
590
591
  function fileUploadBeforeUpload(params) {
591
592
  return getHandleEvent(null, params.pageContext, params.configureObj, "before-upload", params);
592
593
  }
593
- function fileUploadUploaded(pageContext, configureObj, params) {
594
- return handleEvent(null, pageContext, configureObj, "uploaded", params);
595
- }
596
- function fileUploadBeforeDelete(pageContext, configureObj, params) {
597
- return handleEvent(null, pageContext, configureObj, "before-delete", params);
598
- }
599
- function fileUploadDeleted(pageContext, configureObj, params) {
600
- return handleEvent(null, pageContext, configureObj, "deleted", params);
601
- }
602
594
  export {
603
595
  canExecuteButton,
604
596
  cellClick,
605
597
  cellDblClick,
606
598
  doAfterClickEvent,
607
599
  doBeforeClickEvent,
608
- fileUploadBeforeDelete,
609
600
  fileUploadBeforeUpload,
610
- fileUploadDeleted,
611
- fileUploadUploaded,
612
601
  getClickEventFuncByType,
613
602
  getCustomFunc,
614
603
  getEventFuncByType,
@@ -0,0 +1,5 @@
1
+ export declare function printLabel(params: any, templateUuid: string): void;
2
+ declare const _default: {
3
+ printLabel: typeof printLabel;
4
+ };
5
+ export default _default;
@@ -0,0 +1,153 @@
1
+ import http from "agilebuilder-ui/src/utils/request";
2
+ import { hiprint } from "vue-plugin-hiprint";
3
+ import { generateCodeByRule } from "../barcode-util.js";
4
+ function printLabel(params, templateUuid) {
5
+ http.post(window["$vueApp"].config.globalProperties.baseAPI + "/dc/print-models/by-codes", [
6
+ templateUuid
7
+ ]).then((res) => {
8
+ const templateJson = JSON.parse(res[0].template);
9
+ const barCodeOptions = [];
10
+ templateJson.panels.forEach((panel) => {
11
+ panel.printElements.forEach((element) => {
12
+ if (element.options.textType === "barcode" || element.options.textType === "qrcode") {
13
+ barCodeOptions.push(element.options);
14
+ }
15
+ });
16
+ });
17
+ const printTemplate = new hiprint.PrintTemplate({
18
+ template: templateJson
19
+ });
20
+ const ext = {
21
+ callback: () => {
22
+ console.log("浏览器打印窗口已打开");
23
+ },
24
+ styleHandler: () => {
25
+ return "";
26
+ }
27
+ };
28
+ const options = { leftOffset: -1, topOffset: -1 };
29
+ if (params.pageContext.pageType) {
30
+ if (params.pageContext.pageType === "list") {
31
+ printListData(params, barCodeOptions, printTemplate, options, ext);
32
+ } else if (params.pageContext.pageType === "form") {
33
+ printFormData(params, barCodeOptions, printTemplate, options, ext);
34
+ }
35
+ } else {
36
+ printFormData(params, barCodeOptions, printTemplate, options, ext);
37
+ }
38
+ });
39
+ }
40
+ function printListData(params, barCodeOptions, printTemplate, options, ext) {
41
+ if (barCodeOptions.length > 0) {
42
+ const valuePromises = [];
43
+ const selections = JSON.parse(JSON.stringify(params.selections));
44
+ barCodeOptions.forEach((barCodeOption) => {
45
+ valuePromises.push(resloveListData(barCodeOption, selections));
46
+ });
47
+ Promise.all(valuePromises).then((allBarValues) => {
48
+ allBarValues.forEach((barValues) => {
49
+ barValues.forEach((item) => {
50
+ const index = item.index;
51
+ const selection = selections[index];
52
+ if (!selection[item.type]) {
53
+ selection[item.type] = {};
54
+ }
55
+ selection[item.type][item.name] = item.value;
56
+ });
57
+ });
58
+ printTemplate.print(selections, options, ext);
59
+ });
60
+ } else {
61
+ printTemplate.print(params.selections, options, ext);
62
+ }
63
+ }
64
+ function resloveListData(barCodeOption, selections) {
65
+ return new Promise((reslove, reject) => {
66
+ const fields = barCodeOption.field.split(".");
67
+ const barcodeValues = [];
68
+ if (fields.length < 2) {
69
+ reslove([]);
70
+ }
71
+ try {
72
+ getBarcodeModelsByName(fields[1]).then((res) => {
73
+ selections.forEach((selection, index) => {
74
+ const barcodeValue = {
75
+ type: fields[0],
76
+ name: fields[1],
77
+ value: null,
78
+ index
79
+ // 记录当前行索引
80
+ };
81
+ barcodeValue.value = generateCodeByRule(JSON.parse(res.barcodeModelItems), selection);
82
+ barcodeValues.push(barcodeValue);
83
+ });
84
+ reslove(barcodeValues);
85
+ });
86
+ } catch (error) {
87
+ console.error("获取条码规则失败:", error);
88
+ reslove([]);
89
+ }
90
+ });
91
+ }
92
+ function printFormData(params, barCodeOptions, printTemplate, options, ext) {
93
+ if (barCodeOptions.length > 0) {
94
+ const valuePromises = [];
95
+ barCodeOptions.forEach((barCodeOption) => {
96
+ valuePromises.push(getFormBarCodeValue(params.pageContext, barCodeOption));
97
+ });
98
+ Promise.all(valuePromises).then((barcodeRuleValues) => {
99
+ const codeValue = {};
100
+ barcodeRuleValues.forEach((item) => {
101
+ if (item.type && item.name && item.value) {
102
+ if (!codeValue[item.type]) {
103
+ codeValue[item.type] = {};
104
+ }
105
+ codeValue[item.type][item.name] = item.value;
106
+ }
107
+ });
108
+ const data = {};
109
+ Object.assign(data, params.pageContext.entity, codeValue);
110
+ printTemplate.print(data, options, ext);
111
+ });
112
+ } else {
113
+ const data = {};
114
+ Object.assign(data, params.pageContext.entity);
115
+ printTemplate.print(data, options, ext);
116
+ }
117
+ }
118
+ function getFormBarCodeValue(pageContext, barCodeOption) {
119
+ return new Promise((reslove, reject) => {
120
+ const fields = barCodeOption.field.split(".");
121
+ const barcodeRule = {
122
+ type: null,
123
+ name: null,
124
+ value: null
125
+ };
126
+ if (fields.length < 2) {
127
+ reslove(barcodeRule);
128
+ }
129
+ barcodeRule.type = fields[0];
130
+ barcodeRule.name = fields[1];
131
+ try {
132
+ getBarcodeModelsByName(barcodeRule.name).then((res) => {
133
+ const rule = JSON.parse(res.barcodeModelItems);
134
+ barcodeRule.value = generateCodeByRule(rule, pageContext.entity.data);
135
+ reslove(barcodeRule);
136
+ });
137
+ } catch (error) {
138
+ console.error("获取条码规则失败:", error);
139
+ reslove(barcodeRule);
140
+ }
141
+ });
142
+ }
143
+ function getBarcodeModelsByName(name) {
144
+ const encodedParam = encodeURIComponent(name);
145
+ return http.get(
146
+ window["$vueApp"].config.globalProperties.baseAPI + `/dc/setting-barcode-models/by-name?name=${encodedParam}`
147
+ );
148
+ }
149
+ const printLabelUtil = { printLabel };
150
+ export {
151
+ printLabelUtil as default,
152
+ printLabel
153
+ };
@@ -36,6 +36,8 @@ export declare const standardEvents: {
36
36
  retrieveTask: (params: any) => Promise<unknown>;
37
37
  viewDetail: (params: any) => void;
38
38
  lineEditCreate: (params: any) => void;
39
+ printLabel: (params: any) => void;
40
+ queryCharts: (params: any) => void;
39
41
  };
40
42
  export declare function exportFormReport(pageContext: any, configureObj: any, templateFile: any, isPdf: any): void;
41
43
  export declare function getSaveFormRequestWithRow(pageContext: any, configureObj: any, url: any, isUnControlVersion: any, mainDefaultValueColumns: any, dynamicColumnInfo: any, row: any): any;
@@ -12,6 +12,8 @@ import { setStoreInfo } from "../store-util.js";
12
12
  import { refreshPage } from "../api/api-util.js";
13
13
  import { updateWithPageValue } from "agilebuilder-ui/src/utils/jump-page-utils";
14
14
  import { getPermissionCodes } from "../page-init-util.js";
15
+ import { updateChartDatasources } from "../page-helper-util.js";
16
+ import printLabelUtil from "./print-label.js";
15
17
  const standardEvents = {
16
18
  // 表单标准事件保存save
17
19
  save: function(params) {
@@ -206,6 +208,37 @@ const standardEvents = {
206
208
  lineEditCreate: function(params) {
207
209
  console.log("列表行编辑 新建lineEditCreate--params=", params);
208
210
  return lineEditCreateFunc(params);
211
+ },
212
+ printLabel: function(params) {
213
+ console.log("打印标签 打印标签事件--params=", params);
214
+ return printLabel(params);
215
+ },
216
+ queryCharts: function(params) {
217
+ console.log("查询统计图--params=", params);
218
+ const pageContext = params.pageContext;
219
+ const chartConfigs = pageContext.initChartServiceConfigs;
220
+ if (!chartConfigs || chartConfigs.length == 0) {
221
+ console.log("无需要查询的统计图数据");
222
+ return;
223
+ }
224
+ const configure = params.configureObj;
225
+ let runtimeProps = null;
226
+ if (configure && configure.runtime) {
227
+ runtimeProps = configure.runtime.props;
228
+ }
229
+ const hisState = runtimeProps ? runtimeProps.state : void 0;
230
+ if (runtimeProps) {
231
+ runtimeProps.state = "disabled";
232
+ }
233
+ updateChartDatasources(pageContext, chartConfigs, void 0).then(() => {
234
+ if (runtimeProps) {
235
+ runtimeProps.state = hisState;
236
+ }
237
+ }).catch(() => {
238
+ if (runtimeProps) {
239
+ runtimeProps.state = hisState;
240
+ }
241
+ });
209
242
  }
210
243
  };
211
244
  function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
@@ -241,7 +274,7 @@ function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
241
274
  if (logSetting) {
242
275
  param["logSettingText"] = logSetting;
243
276
  }
244
- let additionalParamMap = getAdditionalParamMap(pageContext);
277
+ const additionalParamMap = getAdditionalParamMap(pageContext);
245
278
  param["additionalParamMap"] = additionalParamMap;
246
279
  let exportResult;
247
280
  if (isPdf) {
@@ -363,7 +396,6 @@ function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion
363
396
  }
364
397
  const param = {
365
398
  entity,
366
- pageModel: pageContext.entity.page,
367
399
  tableName: pageContext.tableName,
368
400
  formNoRuleCode: pageContext.formNoRuleCode,
369
401
  isWorkflowEntity: isWorkflow,
@@ -391,14 +423,6 @@ function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion
391
423
  param["dataConversionRule"] = conversionCodes;
392
424
  }
393
425
  }
394
- const autoSetValueData = configureObj.props.base.setValueList;
395
- if (autoSetValueData) {
396
- if (isArrayFn(autoSetValueData)) {
397
- param["autoSetValueData"] = autoSetValueData.join(",");
398
- } else if (typeof autoSetValueData === "string") {
399
- param["autoSetValueData"] = autoSetValueData;
400
- }
401
- }
402
426
  const logSetting = configureObj.props.logSetting;
403
427
  if (logSetting) {
404
428
  param["logSettingText"] = logSetting;
@@ -416,7 +440,7 @@ function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion
416
440
  if (mainDefaultValueColumns) {
417
441
  param["mainDefaultValueColumns"] = mainDefaultValueColumns;
418
442
  }
419
- let additionalParamMap = getAdditionalParamMap(pageContext);
443
+ const additionalParamMap = getAdditionalParamMap(pageContext);
420
444
  param["additionalParamMap"] = additionalParamMap;
421
445
  if (isUnControlVersion !== void 0) {
422
446
  param["unControlVersion"] = isUnControlVersion;
@@ -491,7 +515,7 @@ function dealAfterWithForm(pageContext, configureObj, data, successTip) {
491
515
  }
492
516
  }
493
517
  function afterSuccessOperateInForm(pageContext, configureObj, dataModel) {
494
- let successOperation = configureObj.props.base.successOperation;
518
+ const successOperation = configureObj.props.base.successOperation;
495
519
  if (!successOperation || successOperation === null) {
496
520
  return;
497
521
  }
@@ -521,7 +545,11 @@ function closeDialog(pageContext, dataModel, isNeedValueMapping) {
521
545
  const isNeedValueMappingFinal = isNeedValueMapping !== void 0 && isNeedValueMapping === true && dataModel && dataModel !== void 0;
522
546
  const parentPageCode = pageContext.entity && pageContext.entity.request ? pageContext.entity.request.parentPageCode : null;
523
547
  const eventPageInfo = parentPageCode + "_";
524
- eventBus.$emit(eventPageInfo + "close-dialog", { isNeedValueMapping: isNeedValueMappingFinal, dataModel, sourceTableName });
548
+ eventBus.$emit(eventPageInfo + "close-dialog", {
549
+ isNeedValueMapping: isNeedValueMappingFinal,
550
+ dataModel,
551
+ sourceTableName
552
+ });
525
553
  } else if (jumpMode === "openWindow" || jumpMode === "newTab") {
526
554
  if (window.parent) {
527
555
  window.parent.close();
@@ -555,7 +583,7 @@ function updateValuesWhenCloseDialog(parentPageContext, parentConfigureObj, sour
555
583
  function dealAfterWithList(pageContext, configureObj, row, successTip) {
556
584
  let successOperation = configureObj.props.base.successOperation;
557
585
  const isNeedValueMapping = configureObj.props.base.isNeedValueMapping;
558
- let tableUuid = configureObj.props.base.tableUuid;
586
+ const tableUuid = configureObj.props.base.tableUuid;
559
587
  if (!successOperation) {
560
588
  successOperation = "refresh";
561
589
  }
@@ -841,7 +869,7 @@ function doImportFinally(params, fileObj) {
841
869
  if (functionCodes) {
842
870
  param.append("functionCode", functionCodes);
843
871
  }
844
- let additionalParamMap = getAdditionalParamMap(pageContext);
872
+ const additionalParamMap = getAdditionalParamMap(pageContext);
845
873
  param.append("additionalParamMapStr", JSON.stringify(additionalParamMap));
846
874
  const isPermission = buttonConfigureBase.isPermission === void 0 || buttonConfigureBase.isPermission === "true" || buttonConfigureBase.isPermission;
847
875
  param.append("isPermission", isPermission + "");
@@ -996,14 +1024,6 @@ function getWorkflowSaveParams(params) {
996
1024
  param["dataConversionRule"] = conversionCodes;
997
1025
  }
998
1026
  }
999
- const autoSetValueData = configureObj.props.base.setValueList;
1000
- if (autoSetValueData) {
1001
- if (isArrayFn(autoSetValueData)) {
1002
- param["autoSetValueData"] = autoSetValueData.join(",");
1003
- } else if (typeof autoSetValueData === "string") {
1004
- param["autoSetValueData"] = autoSetValueData;
1005
- }
1006
- }
1007
1027
  if (pageContext.beanName) {
1008
1028
  param["beanName"] = pageContext.beanName;
1009
1029
  }
@@ -1014,7 +1034,7 @@ function getWorkflowSaveParams(params) {
1014
1034
  if (!param.systemCode) {
1015
1035
  param.systemCode = systemCode;
1016
1036
  }
1017
- let additionalParamMap = getAdditionalParamMap(pageContext);
1037
+ const additionalParamMap = getAdditionalParamMap(pageContext);
1018
1038
  param["additionalParamMap"] = additionalParamMap;
1019
1039
  if (additionalParamMap.ids && additionalParamMap.ids.length > 0) {
1020
1040
  param["ids"] = additionalParamMap.ids;
@@ -1219,7 +1239,6 @@ function doAssign(params, selectNodeInfo) {
1219
1239
  function getTransactTaskParam(params) {
1220
1240
  const pageContext = params.pageContext;
1221
1241
  const dataModel = pageContext.entity.data;
1222
- const pageModel = pageContext.entity.page;
1223
1242
  const systemCode = pageContext.systemCode;
1224
1243
  const permissionPrefix = pageContext.code;
1225
1244
  const additionalParamMap = getAdditionalParamMap(pageContext);
@@ -1228,7 +1247,6 @@ function getTransactTaskParam(params) {
1228
1247
  beanName: pageContext.beanName,
1229
1248
  id: dataId,
1230
1249
  entity: dataModel,
1231
- pageModel,
1232
1250
  additionalParamMap,
1233
1251
  tableName: pageContext.tableName,
1234
1252
  functionCode: permissionPrefix + ".xxx",
@@ -1427,7 +1445,7 @@ function getTaskInformitions(params) {
1427
1445
  return;
1428
1446
  }
1429
1447
  const permissionPrefix = pageContext.code;
1430
- let additionalParamMap = getAdditionalParamMap(pageContext);
1448
+ const additionalParamMap = getAdditionalParamMap(pageContext);
1431
1449
  const requestParams = {
1432
1450
  beanName: pageContext.beanName,
1433
1451
  additionalParamMap,
@@ -1526,6 +1544,22 @@ function lineEditCreateFunc(params) {
1526
1544
  gridRef.createRow(params);
1527
1545
  }
1528
1546
  }
1547
+ function printLabel(params) {
1548
+ let templateUuid = null;
1549
+ try {
1550
+ if (params.menuItem) {
1551
+ templateUuid = params.menuItem.templateUuid;
1552
+ } else {
1553
+ templateUuid = params.configureObj.props.base.template[0].templateUuid;
1554
+ }
1555
+ if (!templateUuid) {
1556
+ throw new Error("未找到模板");
1557
+ }
1558
+ } catch (e) {
1559
+ console.error("打印标签失败,未在配置中找到找到模板", e, params);
1560
+ }
1561
+ printLabelUtil.printLabel(params, templateUuid);
1562
+ }
1529
1563
  function isVisibleWorkflowButton(standardEventName, buttonInfo, completeTaskParam) {
1530
1564
  let isVisible = true;
1531
1565
  if (standardEventName && buttonInfo) {
@@ -339,6 +339,7 @@ function setValueForVariableName(entity, variableName, newValue) {
339
339
  setVariableValue(entity, fields, newValue);
340
340
  }
341
341
  function setVariableValue(entity, fields, newValue) {
342
+ debugger;
342
343
  if (!entity || !fields || fields.length == 0) {
343
344
  return;
344
345
  }
@@ -22,7 +22,7 @@ export declare function convertToPageContext(pageDesign: PageDesign, pageRequest
22
22
  * @param pageContext 页面对象
23
23
  * @param formItemConfigure 表单元素配置参数
24
24
  */
25
- export declare function getFormModelFields(pageContext: PageContext, formItemConfigure: Component): string[];
25
+ export declare function getFormModelFields(pageContext: PageContext, formItemConfigure: Component, prop?: string): string[];
26
26
  /**
27
27
  * 获取组件的权限编码
28
28
  * @param configure
@@ -49,9 +49,9 @@ function convertToPageContext(pageDesign, pageRequest) {
49
49
  system: {}
50
50
  }
51
51
  };
52
- if (pageDesign.props.activeWorkflow && pageDesign.props.workflowSource && pageDesign.props.workflowSource === "link") {
52
+ if (pageDesign.props && pageDesign.props.activeWorkflow && pageDesign.props.workflowSource && pageDesign.props.workflowSource === "link") {
53
53
  pageContext.workflowCode = pageDesign.props.linkWorkflowCode;
54
- } else if (pageDesign.props.activeWorkflow && pageDesign.props.workflowSource && pageDesign.props.workflowSource === "create") {
54
+ } else if (pageDesign.props && pageDesign.props.activeWorkflow && pageDesign.props.workflowSource && pageDesign.props.workflowSource === "create") {
55
55
  pageContext.workflowCode = pageDesign.props.createWorkflowCode;
56
56
  }
57
57
  if (pageDesign.variables) {
@@ -111,15 +111,21 @@ function getRequestObject(pageRequest) {
111
111
  ;
112
112
  return requestObj;
113
113
  }
114
- function getFormModelFields(pageContext, formItemConfigure) {
114
+ function getFormModelFields(pageContext, formItemConfigure, prop) {
115
115
  if (!formItemConfigure) {
116
116
  return ["temp"];
117
117
  }
118
118
  const entity = pageContext.entity;
119
- const propsBase = formItemConfigure.props.base ? formItemConfigure.props.base : {};
120
- let propName = propsBase.prop;
119
+ let propsBase;
120
+ let propName = prop;
121
+ if (!prop) {
122
+ propsBase = formItemConfigure.props.base ? formItemConfigure.props.base : {};
123
+ propName = propsBase.prop;
124
+ }
121
125
  let fields = null;
122
- if (!propName || !propName.startsWith("${")) {
126
+ if (prop) {
127
+ fields = ["data", prop];
128
+ } else if (!propName || !propName.startsWith("${")) {
123
129
  fields = ["page", formItemConfigure.uuid];
124
130
  } else {
125
131
  propName = propName.substring(2, propName.length - 1);
@@ -129,7 +135,7 @@ function getFormModelFields(pageContext, formItemConfigure) {
129
135
  }
130
136
  }
131
137
  if (entity.data.ID == void 0 && entity.data.ID == void 0) {
132
- if (propsBase.defaultValue) {
138
+ if (propsBase && propsBase.defaultValue) {
133
139
  let defaultValue = formatVariableValue(pageContext, propsBase.defaultValue);
134
140
  if (defaultValue != null && defaultValue != void 0) {
135
141
  let isMultiple = false;
@@ -204,6 +210,9 @@ function packageFormRules(pageContext, configure) {
204
210
  const prop = configure.props && configure.props.base ? configure.props.base.prop : null;
205
211
  if (prop) {
206
212
  const propName = getFormPropName(prop);
213
+ if (!pageContext.rules) {
214
+ pageContext.rules = {};
215
+ }
207
216
  if (!pageContext.rules[propName]) {
208
217
  pageContext.rules[propName] = [];
209
218
  }
@@ -1,15 +1,6 @@
1
1
  import { getBaseUrl } from "./common-util.js";
2
2
  import http from "agilebuilder-ui/src/utils/request";
3
3
  import eventBus from "./eventBus.js";
4
- function getDataTypeMap(backendUrl, tableName) {
5
- return new Promise((resolve, reject) => {
6
- getDataTypeMapRequest(backendUrl, tableName).then((dataTypeMap) => {
7
- resolve(dataTypeMap);
8
- }).catch(() => {
9
- reject(new Error("获得数据表:" + tableName + "的字段类型集合失败"));
10
- });
11
- });
12
- }
13
4
  function getDataTypeMapRequest(backendUrl, tableName) {
14
5
  const baseUrl = getBaseUrl(backendUrl);
15
6
  return http.get(baseUrl + "/dsc/commons/tables/" + tableName + "/data-types");
@@ -18,6 +9,6 @@ function popupToPage(params) {
18
9
  eventBus.$emit(params.pageCode + "_open-dialog", params);
19
10
  }
20
11
  export {
21
- getDataTypeMap,
12
+ getDataTypeMapRequest,
22
13
  popupToPage
23
14
  };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./printlabel-runtime.vue2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };