super-page-runtime 2.0.43-beta1 → 2.0.43-beta2
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.
- package/dist/es/components/runtime/utils/common-util.js +5 -5
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +3 -1
- package/dist/es/components/runtime/utils/events/standard-event.js +7 -1
- package/dist/es/components/runtime/utils/events/validator-util.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +16 -22
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +3 -1
- package/package.json +2 -2
|
@@ -37,11 +37,11 @@ function packageTemplateFiles(templateFiles) {
|
|
|
37
37
|
}
|
|
38
38
|
const currentLocale = getLanguageWithLocale();
|
|
39
39
|
if (Array.isArray(templateFiles)) {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
const templateFilesResult = [];
|
|
41
|
+
const fileCodes = [];
|
|
42
42
|
const fileSeperate = "~-~-";
|
|
43
43
|
templateFiles.forEach((template) => {
|
|
44
|
-
|
|
44
|
+
const showName = template.templateName;
|
|
45
45
|
if (showName.indexOf(fileSeperate) > 0) {
|
|
46
46
|
const fileCode = showName.substring(0, showName.indexOf(fileSeperate));
|
|
47
47
|
const fileLanguage = showName.substring(
|
|
@@ -53,8 +53,8 @@ function packageTemplateFiles(templateFiles) {
|
|
|
53
53
|
);
|
|
54
54
|
if (currentLocale === fileLanguage && fileCodes.indexOf(fileCode) < 0) {
|
|
55
55
|
templateFilesResult.push({
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
templateUuid: template.templateUuid,
|
|
57
|
+
templateName: fileName
|
|
58
58
|
});
|
|
59
59
|
fileCodes.push(fileCode);
|
|
60
60
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PageContext } from '../interfaces/page-design-types';
|
|
2
|
+
|
|
1
3
|
export declare const standardEvents: {
|
|
2
4
|
save: (params: any) => Promise<unknown>;
|
|
3
5
|
saveList: (params: any) => Promise<unknown>;
|
|
@@ -40,7 +42,7 @@ export declare const standardEvents: {
|
|
|
40
42
|
queryCharts: (params: any) => void;
|
|
41
43
|
};
|
|
42
44
|
export declare function exportFormReport(pageContext: any, configureObj: any, templateFile: any, isPdf: any): void;
|
|
43
|
-
export declare function getSaveFormRequestWithRow(pageContext:
|
|
45
|
+
export declare function getSaveFormRequestWithRow(pageContext: PageContext, configureObj: any, url: string, isUnControlVersion: boolean, mainDefaultValueColumns: any, dynamicColumnInfo: any, row: any, commonParams: any): any;
|
|
44
46
|
export declare function getSaveFormRequest(pageContext: any, configureObj: any, url: any, isUnControlVersion: any, mainDefaultValueColumns: any, dynamicColumnInfo: any): any;
|
|
45
47
|
/**
|
|
46
48
|
* 按钮执行后页面处理方式:刷新、关闭弹框等等
|
|
@@ -415,7 +415,7 @@ function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion
|
|
|
415
415
|
}
|
|
416
416
|
return param;
|
|
417
417
|
}
|
|
418
|
-
function getSaveFormRequestWithRow(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, row) {
|
|
418
|
+
function getSaveFormRequestWithRow(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, row, commonParams) {
|
|
419
419
|
const systemCode = pageContext.systemCode;
|
|
420
420
|
const backendUrl = pageContext.backendUrl;
|
|
421
421
|
const param = getCommonFormRequestParam(
|
|
@@ -427,6 +427,11 @@ function getSaveFormRequestWithRow(pageContext, configureObj, url, isUnControlVe
|
|
|
427
427
|
null,
|
|
428
428
|
row
|
|
429
429
|
);
|
|
430
|
+
if (commonParams) {
|
|
431
|
+
if (commonParams.tableName) {
|
|
432
|
+
param.tableName = commonParams.tableName;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
430
435
|
return getSaveFormRequestByParam(systemCode, backendUrl, param, url, pageContext.entity.data);
|
|
431
436
|
}
|
|
432
437
|
function getSaveFormRequest(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo) {
|
|
@@ -437,6 +442,7 @@ function getSaveFormRequest(pageContext, configureObj, url, isUnControlVersion,
|
|
|
437
442
|
isUnControlVersion,
|
|
438
443
|
mainDefaultValueColumns,
|
|
439
444
|
dynamicColumnInfo,
|
|
445
|
+
null,
|
|
440
446
|
null
|
|
441
447
|
);
|
|
442
448
|
}
|
|
@@ -290,11 +290,11 @@ function packageCustomRules(orgCustomRules, orgRules) {
|
|
|
290
290
|
}
|
|
291
291
|
function validateSubTables(pageContext) {
|
|
292
292
|
if (!pageContext) {
|
|
293
|
-
return;
|
|
293
|
+
return true;
|
|
294
294
|
}
|
|
295
295
|
const tableUuidArr = pageContext.tableUuids;
|
|
296
296
|
if (!tableUuidArr) {
|
|
297
|
-
return;
|
|
297
|
+
return true;
|
|
298
298
|
}
|
|
299
299
|
for (let i = 0; i < tableUuidArr.length; i++) {
|
|
300
300
|
const tableUuid = tableUuidArr[i];
|
|
@@ -24,23 +24,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
onMounted(() => {
|
|
25
25
|
if (configureBase.templateFiles && configureBase.templateFiles.length > 0) {
|
|
26
26
|
templateFiles.value = packageTemplateFiles(configureBase.templateFiles);
|
|
27
|
-
} else if (configureBase.
|
|
27
|
+
} else if (configureBase.templateUuid && configureBase.templateName) {
|
|
28
28
|
templateFiles.value.push({
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
templateUuid: configureBase.templateUuid,
|
|
30
|
+
templateName: configureBase.templateName
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
templateFiles.value.forEach((item) => {
|
|
34
|
-
if (item && item.
|
|
35
|
-
item.
|
|
34
|
+
if (item && item.templateName) {
|
|
35
|
+
item.templateName = formatTemplateShowName(item.templateName);
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
|
-
function getFileds(
|
|
40
|
-
console.log("
|
|
39
|
+
function getFileds(templateShowName) {
|
|
40
|
+
console.log("templateShowName", templateShowName);
|
|
41
41
|
let field;
|
|
42
42
|
let formatStr;
|
|
43
|
-
let newValue =
|
|
43
|
+
let newValue = templateShowName;
|
|
44
44
|
const prefixIndex = newValue.indexOf(prefix);
|
|
45
45
|
const suffixIndex = newValue.indexOf(suffix);
|
|
46
46
|
console.log("prefixIndex", prefixIndex);
|
|
@@ -50,14 +50,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
50
|
newValue = newValue.substring(0, suffixIndex) + newValue.substring(suffixIndex + suffix.length);
|
|
51
51
|
console.log("non replacement value === newValue", newValue);
|
|
52
52
|
} else {
|
|
53
|
-
field = newValue.substring(
|
|
54
|
-
|
|
55
|
-
suffixIndex
|
|
56
|
-
);
|
|
57
|
-
formatStr = newValue.substring(
|
|
58
|
-
prefixIndex,
|
|
59
|
-
suffixIndex + suffix.length
|
|
60
|
-
);
|
|
53
|
+
field = newValue.substring(prefixIndex + prefix.length, suffixIndex);
|
|
54
|
+
formatStr = newValue.substring(prefixIndex, suffixIndex + suffix.length);
|
|
61
55
|
console.log("field", field);
|
|
62
56
|
console.log("formatStr", formatStr);
|
|
63
57
|
fields.value.push(field);
|
|
@@ -69,18 +63,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
69
63
|
}
|
|
70
64
|
return fields.value;
|
|
71
65
|
}
|
|
72
|
-
function
|
|
73
|
-
const fields2 = getFileds(
|
|
66
|
+
function formatTemplateShowName(templateShowName) {
|
|
67
|
+
const fields2 = getFileds(templateShowName);
|
|
74
68
|
console.log("fields", fields2);
|
|
75
69
|
fields2.forEach((field) => {
|
|
76
70
|
const formatStr = prefix + field + suffix;
|
|
77
71
|
let formatValue;
|
|
78
|
-
if (
|
|
72
|
+
if (templateShowName.indexOf(formatStr) !== -1 && dataModel.hasOwnProperty(field)) {
|
|
79
73
|
formatValue = dataModel[field] ? dataModel[field] : "";
|
|
80
|
-
|
|
74
|
+
templateShowName = templateShowName.replace(formatStr, formatValue);
|
|
81
75
|
}
|
|
82
76
|
});
|
|
83
|
-
return
|
|
77
|
+
return templateShowName;
|
|
84
78
|
}
|
|
85
79
|
function exportForm(row) {
|
|
86
80
|
emits("export", row);
|
|
@@ -111,7 +105,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
111
105
|
prop: "templateShowPath"
|
|
112
106
|
}, {
|
|
113
107
|
default: withCtx((scope) => [
|
|
114
|
-
createTextVNode(toDisplayString(scope.row.
|
|
108
|
+
createTextVNode(toDisplayString(scope.row.templateName), 1)
|
|
115
109
|
]),
|
|
116
110
|
_: 1
|
|
117
111
|
}, 8, ["label"]),
|
|
@@ -315,6 +315,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
315
315
|
const tableConfigure = configure;
|
|
316
316
|
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
317
317
|
return new Promise((resolve, reject) => {
|
|
318
|
+
const commonParams = { tableName: tableConfigure.props.dataOrigin.tableName };
|
|
318
319
|
getSaveFormRequestWithRow(
|
|
319
320
|
pageContext,
|
|
320
321
|
buttonConfigure,
|
|
@@ -322,7 +323,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
322
323
|
false,
|
|
323
324
|
mainDefaultValueColumns,
|
|
324
325
|
dynamicColumnInfo,
|
|
325
|
-
row
|
|
326
|
+
row,
|
|
327
|
+
commonParams
|
|
326
328
|
).then((commonEntity) => {
|
|
327
329
|
if (commonEntity) {
|
|
328
330
|
resolve(commonEntity.entity);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-page-runtime",
|
|
3
|
-
"version": "2.0.43-
|
|
3
|
+
"version": "2.0.43-beta2",
|
|
4
4
|
"description": "AgileBuilder super page runtime",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/es/index.js",
|
|
@@ -69,4 +69,4 @@
|
|
|
69
69
|
"vue-router": "^4.3.0",
|
|
70
70
|
"vuex": "^4.1.0"
|
|
71
71
|
}
|
|
72
|
-
}
|
|
72
|
+
}
|