super-page-runtime 2.0.16 → 2.0.22
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/api/api-util.js +16 -14
- package/dist/es/components/runtime/utils/api/page-expose-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/api/page-expose-util.js +202 -0
- package/dist/es/components/runtime/utils/assemblys-config.js +29 -7
- package/dist/es/components/runtime/utils/common-util.d.ts +3 -2
- package/dist/es/components/runtime/utils/common-util.js +21 -11
- package/dist/es/components/runtime/utils/events/event-util.js +9 -14
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +1 -0
- package/dist/es/components/runtime/utils/events/standard-event.js +128 -110
- package/dist/es/components/runtime/utils/events/validator-util.js +4 -3
- package/dist/es/components/runtime/utils/global-refs.js +12 -0
- package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +3 -1
- package/dist/es/components/runtime/utils/page-helper-util.js +4 -4
- package/dist/es/components/runtime/utils/page-init-util.js +6 -3
- package/dist/es/components/runtime/utils/table-utils.js +4 -5
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +17 -17
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +17 -17
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +1 -1
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +1 -1
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +13 -8
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +12 -13
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +2 -1
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +11 -11
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +28 -28
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +12 -12
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +7 -5
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +14 -14
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +15 -15
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +33 -33
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +40 -37
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +10 -10
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +13 -13
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +91 -39
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +27 -27
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +42 -0
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +13 -13
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +10 -10
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +14 -14
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +8 -3
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +40 -0
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +40 -0
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +5 -7
- package/dist/es/components/runtime/views/super-page.vue.js +2 -2
- package/package.json +3 -2
- package/dist/lib/_virtual/AttributeMap.js +0 -4
- package/dist/lib/_virtual/Delta.js +0 -4
- package/dist/lib/_virtual/Op.js +0 -4
- package/dist/lib/_virtual/OpIterator.js +0 -4
- package/dist/lib/_virtual/__vite-browser-external.js +0 -3
- package/dist/lib/_virtual/_commonjsHelpers.js +0 -8
- package/dist/lib/_virtual/_plugin-vue_export-helper.js +0 -9
- package/dist/lib/_virtual/dayjs.min.js +0 -4
- package/dist/lib/_virtual/index.js +0 -4
- package/dist/lib/_virtual/index2.js +0 -4
- package/dist/lib/_virtual/index3.js +0 -4
- package/dist/lib/assets/chart-themes/theme1.d.ts +0 -4
- package/dist/lib/assets/chart-themes/theme1.js +0 -7
- package/dist/lib/assets/chart-themes/theme2.d.ts +0 -4
- package/dist/lib/assets/chart-themes/theme2.js +0 -7
- package/dist/lib/assets/chart-themes/theme3.d.ts +0 -4
- package/dist/lib/assets/chart-themes/theme3.js +0 -7
- package/dist/lib/components/runtime/index.d.ts +0 -4
- package/dist/lib/components/runtime/utils/api/api-util.d.ts +0 -11
- package/dist/lib/components/runtime/utils/api/api-util.js +0 -128
- package/dist/lib/components/runtime/utils/assemblys-config.js +0 -258
- package/dist/lib/components/runtime/utils/charts/chart-util.d.ts +0 -11
- package/dist/lib/components/runtime/utils/charts/chart-util.js +0 -28
- package/dist/lib/components/runtime/utils/common-util.d.ts +0 -16
- package/dist/lib/components/runtime/utils/common-util.js +0 -94
- package/dist/lib/components/runtime/utils/eventBus.d.ts +0 -7
- package/dist/lib/components/runtime/utils/eventBus.js +0 -10
- package/dist/lib/components/runtime/utils/events/event-util.d.ts +0 -48
- package/dist/lib/components/runtime/utils/events/event-util.js +0 -526
- package/dist/lib/components/runtime/utils/events/standard-event.d.ts +0 -61
- package/dist/lib/components/runtime/utils/events/standard-event.js +0 -1625
- package/dist/lib/components/runtime/utils/events/validator-util.d.ts +0 -4
- package/dist/lib/components/runtime/utils/events/validator-util.js +0 -389
- package/dist/lib/components/runtime/utils/global-refs.d.ts +0 -59
- package/dist/lib/components/runtime/utils/global-refs.js +0 -65
- package/dist/lib/components/runtime/utils/interfaces/page-design-types.d.ts +0 -223
- package/dist/lib/components/runtime/utils/interfaces/page-design-types.js +0 -9
- package/dist/lib/components/runtime/utils/page-helper-util.d.ts +0 -106
- package/dist/lib/components/runtime/utils/page-helper-util.js +0 -622
- package/dist/lib/components/runtime/utils/page-init-util.d.ts +0 -38
- package/dist/lib/components/runtime/utils/page-init-util.js +0 -200
- package/dist/lib/components/runtime/utils/page-permission-util.d.ts +0 -26
- package/dist/lib/components/runtime/utils/page-permission-util.js +0 -525
- package/dist/lib/components/runtime/utils/store-util.d.ts +0 -15
- package/dist/lib/components/runtime/utils/store-util.js +0 -17
- package/dist/lib/components/runtime/utils/store.d.ts +0 -2
- package/dist/lib/components/runtime/utils/store.js +0 -3
- package/dist/lib/components/runtime/utils/table-utils.js +0 -24
- package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +0 -54
- package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +0 -35
- package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +0 -110
- package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +0 -432
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +0 -43
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +0 -61
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +0 -126
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +0 -52
- package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +0 -54
- package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +0 -54
- package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +0 -56
- package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +0 -24
- package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +0 -147
- package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +0 -35
- package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +0 -127
- package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +0 -26
- package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +0 -104
- package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +0 -72
- package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +0 -74
- package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +0 -79
- package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +0 -43
- package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +0 -44
- package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +0 -30
- package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +0 -69
- package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +0 -75
- package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +0 -642
- package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +0 -453
- package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +0 -88
- package/dist/lib/components/runtime/views/assemblys/error-render.vue.d.ts +0 -22
- package/dist/lib/components/runtime/views/assemblys/error-render.vue.js +0 -22
- package/dist/lib/components/runtime/views/assemblys/error-render.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +0 -156
- package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +0 -82
- package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +0 -64
- package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +0 -40
- package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +0 -74
- package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +0 -63
- package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +0 -127
- package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +0 -127
- package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +0 -77
- package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +0 -29
- package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +0 -157
- package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +0 -164
- package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +0 -201
- package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +0 -63
- package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +0 -63
- package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +0 -65
- package/dist/lib/components/runtime/views/assemblys/object-render.vue.d.ts +0 -17
- package/dist/lib/components/runtime/views/assemblys/object-render.vue.js +0 -142
- package/dist/lib/components/runtime/views/assemblys/object-render.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +0 -61
- package/dist/lib/components/runtime/views/super-page-dialog.vue.d.ts +0 -36
- package/dist/lib/components/runtime/views/super-page-dialog.vue.js +0 -73
- package/dist/lib/components/runtime/views/super-page-dialog.vue2.js +0 -3
- package/dist/lib/components/runtime/views/super-page.vue.d.ts +0 -91
- package/dist/lib/components/runtime/views/super-page.vue.js +0 -496
- package/dist/lib/components/runtime/views/super-page.vue2.js +0 -3
- package/dist/lib/favicon.ico +0 -0
- package/dist/lib/index.d.ts +0 -8
- package/dist/lib/index.js +0 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getBaseUrl, getRealRestApiPath,
|
|
1
|
+
import { getBaseUrl, getRealRestApiPath, upperFirstCase, packageTemplateFiles, isArrayFn } 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";
|
|
@@ -7,7 +7,7 @@ import { setSessionCache, getToken } from "agilebuilder-ui/src/utils/auth";
|
|
|
7
7
|
import { getComponentRef } from "../global-refs.js";
|
|
8
8
|
import eventBus from "../eventBus.js";
|
|
9
9
|
import axios from "axios";
|
|
10
|
-
import { doAfterClickEvent,
|
|
10
|
+
import { doAfterClickEvent, handleEvent } from "./event-util.js";
|
|
11
11
|
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";
|
|
@@ -210,13 +210,13 @@ const standardEvents = {
|
|
|
210
210
|
function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
|
|
211
211
|
const templateUUID = templateFile.templateUUID;
|
|
212
212
|
const fileName = templateFile.templateShowPath;
|
|
213
|
-
const
|
|
213
|
+
const systemCode = pageContext.systemCode;
|
|
214
214
|
const logSetting = configureObj.props.logSetting;
|
|
215
|
-
const additionalParamMap = pageContext.entity.request;
|
|
216
215
|
const isWorkflowForm = pageContext.workflowCode ? true : false;
|
|
217
216
|
const beanName = pageContext.beanName;
|
|
218
217
|
const button = configureObj.props.base;
|
|
219
218
|
const tableName = configureObj.tableName;
|
|
219
|
+
const backendUrl = pageContext.backendUrl;
|
|
220
220
|
const viewModels = pageContext.entity.data;
|
|
221
221
|
const isPermission = button.isPermission === void 0 || button.isPermission === "true" || button.isPermission;
|
|
222
222
|
const param = {
|
|
@@ -231,20 +231,19 @@ function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
|
|
|
231
231
|
functionCode: button.functionCode,
|
|
232
232
|
tableName,
|
|
233
233
|
isPermission: isPermission + "",
|
|
234
|
-
systemCode
|
|
234
|
+
systemCode,
|
|
235
235
|
tableNames: pageContext.tableNames
|
|
236
236
|
};
|
|
237
237
|
if (logSetting) {
|
|
238
238
|
param["logSettingText"] = logSetting;
|
|
239
239
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
240
|
+
let additionalParamMap = getAdditionalParamMap(pageContext);
|
|
241
|
+
param["additionalParamMap"] = additionalParamMap;
|
|
243
242
|
let exportResult;
|
|
244
243
|
if (isPdf) {
|
|
245
|
-
exportResult = exportFormPdf(fileName,
|
|
244
|
+
exportResult = exportFormPdf(fileName, backendUrl, param);
|
|
246
245
|
} else {
|
|
247
|
-
exportResult = exportFormReportSuccess(fileName,
|
|
246
|
+
exportResult = exportFormReportSuccess(fileName, backendUrl, param);
|
|
248
247
|
}
|
|
249
248
|
if (exportResult) {
|
|
250
249
|
exportResult.then(() => {
|
|
@@ -252,9 +251,9 @@ function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
|
|
|
252
251
|
});
|
|
253
252
|
}
|
|
254
253
|
}
|
|
255
|
-
function exportFormReportSuccess(fileName,
|
|
254
|
+
function exportFormReportSuccess(fileName, backendUrl, param) {
|
|
256
255
|
return new Promise((resolve, reject) => {
|
|
257
|
-
const baseUrl = getBaseUrl(
|
|
256
|
+
const baseUrl = getBaseUrl(backendUrl);
|
|
258
257
|
const path = baseUrl + "/dsc/commons/export-reports";
|
|
259
258
|
axios.defaults.headers.common.Authorization = getToken();
|
|
260
259
|
const request = axios.post(path, param, {
|
|
@@ -284,9 +283,9 @@ function exportFormReportSuccess(fileName, system, param) {
|
|
|
284
283
|
});
|
|
285
284
|
});
|
|
286
285
|
}
|
|
287
|
-
function exportFormPdf(fileName,
|
|
286
|
+
function exportFormPdf(fileName, backendUrl, param) {
|
|
288
287
|
return new Promise((resolve, reject) => {
|
|
289
|
-
const baseUrl = getBaseUrl(
|
|
288
|
+
const baseUrl = getBaseUrl(backendUrl);
|
|
290
289
|
const path = baseUrl + "/dsc/commons/export-pdf";
|
|
291
290
|
axios.defaults.headers.common.Authorization = getToken();
|
|
292
291
|
const request = axios.post(path, param, {
|
|
@@ -351,7 +350,7 @@ function saveFunc(params, isListButton) {
|
|
|
351
350
|
}
|
|
352
351
|
function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, ids) {
|
|
353
352
|
const isWorkflow = pageContext.workflowCode ? true : false;
|
|
354
|
-
const
|
|
353
|
+
const systemCode = pageContext.systemCode;
|
|
355
354
|
const isPermission = configureObj.props.base.isPermission === void 0 || configureObj.props.base.isPermission === "true" || configureObj.props.base.isPermission;
|
|
356
355
|
const param = {
|
|
357
356
|
entity: pageContext.entity.data,
|
|
@@ -394,7 +393,7 @@ function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion
|
|
|
394
393
|
param["logSettingText"] = logSetting;
|
|
395
394
|
}
|
|
396
395
|
if (!param["systemCode"]) {
|
|
397
|
-
param["systemCode"] =
|
|
396
|
+
param["systemCode"] = systemCode;
|
|
398
397
|
}
|
|
399
398
|
const beanName = configureObj.props.base.beanName;
|
|
400
399
|
if (beanName) {
|
|
@@ -406,17 +405,16 @@ function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion
|
|
|
406
405
|
if (mainDefaultValueColumns) {
|
|
407
406
|
param["mainDefaultValueColumns"] = mainDefaultValueColumns;
|
|
408
407
|
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
param["additionalParamMap"] = additionalParamMap;
|
|
412
|
-
}
|
|
408
|
+
let additionalParamMap = getAdditionalParamMap(pageContext);
|
|
409
|
+
param["additionalParamMap"] = additionalParamMap;
|
|
413
410
|
if (isUnControlVersion !== void 0) {
|
|
414
411
|
param["unControlVersion"] = isUnControlVersion;
|
|
415
412
|
}
|
|
416
413
|
return param;
|
|
417
414
|
}
|
|
418
415
|
function getSaveFormRequest(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo) {
|
|
419
|
-
const
|
|
416
|
+
const systemCode = pageContext.systemCode;
|
|
417
|
+
const backendUrl = pageContext.backendUrl;
|
|
420
418
|
const param = getCommonFormRequestParam(
|
|
421
419
|
pageContext,
|
|
422
420
|
configureObj,
|
|
@@ -425,12 +423,12 @@ function getSaveFormRequest(pageContext, configureObj, url, isUnControlVersion,
|
|
|
425
423
|
dynamicColumnInfo,
|
|
426
424
|
null
|
|
427
425
|
);
|
|
428
|
-
return getSaveFormRequestByParam(
|
|
426
|
+
return getSaveFormRequestByParam(systemCode, backendUrl, param, url, pageContext.entity.data);
|
|
429
427
|
}
|
|
430
|
-
function getSaveFormRequestByParam(
|
|
431
|
-
const baseUrl = getBaseUrl(
|
|
428
|
+
function getSaveFormRequestByParam(systemCode, backendUrl, param, url, formData) {
|
|
429
|
+
const baseUrl = getBaseUrl(backendUrl);
|
|
432
430
|
let path = baseUrl + url;
|
|
433
|
-
path = getRealRestApiPath(path,
|
|
431
|
+
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
434
432
|
let request;
|
|
435
433
|
if (formData && (formData.id || formData.ID)) {
|
|
436
434
|
request = http.put(path, param);
|
|
@@ -471,16 +469,10 @@ function dealAfterWithForm(pageContext, configureObj, data, successTip) {
|
|
|
471
469
|
}
|
|
472
470
|
function afterSuccessOperateInForm(pageContext, configureObj, dataModel) {
|
|
473
471
|
let successOperation = configureObj.props.base.successOperation;
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
"afterSuccessOperateInForm---successOperation=-",
|
|
477
|
-
successOperation,
|
|
478
|
-
dataModel,
|
|
479
|
-
isNeedValueMapping
|
|
480
|
-
);
|
|
481
|
-
if (!successOperation || successOperation === "" || successOperation === null) {
|
|
482
|
-
successOperation = "refresh";
|
|
472
|
+
if (!successOperation || successOperation === null) {
|
|
473
|
+
return;
|
|
483
474
|
}
|
|
475
|
+
const isNeedValueMapping = configureObj.props.base.isNeedValueMapping;
|
|
484
476
|
if (successOperation === "noOperation") {
|
|
485
477
|
if (dataModel) {
|
|
486
478
|
pageContext.entity.data = dataModel;
|
|
@@ -529,8 +521,7 @@ function updateValuesWhenCloseDialog(parentPageContext, parentConfigureObj, sour
|
|
|
529
521
|
parentPageContext.entity.data,
|
|
530
522
|
targetTableName
|
|
531
523
|
);
|
|
532
|
-
|
|
533
|
-
handleEventByEventName(parentPageContext, parentConfigureObj, updateValueEventName, {
|
|
524
|
+
handleEvent(null, parentPageContext, parentConfigureObj, "setValueCallback", {
|
|
534
525
|
sourceModel,
|
|
535
526
|
sourceTableName,
|
|
536
527
|
jumpPageSetting,
|
|
@@ -617,7 +608,8 @@ function getSubmitFormRequest(pageContext, configureObj, url, isUnControlVersion
|
|
|
617
608
|
type: "warning"
|
|
618
609
|
}
|
|
619
610
|
).then(() => {
|
|
620
|
-
const
|
|
611
|
+
const systemCode = pageContext.systemCode;
|
|
612
|
+
const backendUrl = pageContext.backendUrl;
|
|
621
613
|
const param = getCommonFormRequestParam(
|
|
622
614
|
pageContext,
|
|
623
615
|
configureObj,
|
|
@@ -626,7 +618,7 @@ function getSubmitFormRequest(pageContext, configureObj, url, isUnControlVersion
|
|
|
626
618
|
dynamicColumnInfo,
|
|
627
619
|
ids
|
|
628
620
|
);
|
|
629
|
-
getSaveFormRequestByParam(
|
|
621
|
+
getSaveFormRequestByParam(systemCode, backendUrl, param, url, pageContext.entity.data).then((result) => {
|
|
630
622
|
resolve(result);
|
|
631
623
|
}).catch((error) => {
|
|
632
624
|
reject(error);
|
|
@@ -658,19 +650,20 @@ function deleteFunc(params) {
|
|
|
658
650
|
).then(() => {
|
|
659
651
|
const pageContext = params.pageContext;
|
|
660
652
|
const configureObj = params.configureObj;
|
|
661
|
-
const system = pageContext.entity.system;
|
|
662
653
|
const tableName = pageContext.tableName;
|
|
663
654
|
const configureBase = configureObj.props.base;
|
|
664
|
-
const
|
|
655
|
+
const systemCode = pageContext.systemCode;
|
|
656
|
+
const backendUrl = pageContext.backendUrl;
|
|
657
|
+
const baseUrl = getBaseUrl(backendUrl);
|
|
665
658
|
let path = baseUrl + "/dsc/commons/" + tableName;
|
|
666
|
-
path = getRealRestApiPath(path,
|
|
659
|
+
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
667
660
|
const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
|
|
668
661
|
const isWorkflow = pageContext.workflowCode ? true : false;
|
|
669
662
|
const param = {
|
|
670
663
|
ids,
|
|
671
664
|
functionCode: configureBase.functionCode,
|
|
672
665
|
isPermission: isPermission + "",
|
|
673
|
-
systemCode
|
|
666
|
+
systemCode,
|
|
674
667
|
isWorkflowEntity: isWorkflow,
|
|
675
668
|
tableNames: pageContext.tableNames
|
|
676
669
|
};
|
|
@@ -728,7 +721,8 @@ function downloadTemplateFunc(params) {
|
|
|
728
721
|
templateUUID = templateFilesResult[0].templateUUID;
|
|
729
722
|
templateShowPath = templateFilesResult[0].templateShowPath;
|
|
730
723
|
}
|
|
731
|
-
const
|
|
724
|
+
const systemCode = pageContext.systemCode;
|
|
725
|
+
const backendUrl = pageContext.backendUrl;
|
|
732
726
|
const showName = templateShowPath;
|
|
733
727
|
let param = "?1=1";
|
|
734
728
|
if (templateUUID && showName && templateUUID !== "undefined" && showName !== "undefined" && templateUUID !== "null" && showName !== "null") {
|
|
@@ -740,8 +734,8 @@ function downloadTemplateFunc(params) {
|
|
|
740
734
|
if (logSetting && logSetting !== "") {
|
|
741
735
|
param += "&logSettingText=" + logSetting;
|
|
742
736
|
}
|
|
743
|
-
if (
|
|
744
|
-
param += "&systemCode=" +
|
|
737
|
+
if (systemCode) {
|
|
738
|
+
param += "&systemCode=" + systemCode;
|
|
745
739
|
}
|
|
746
740
|
const listCode = params.listCode;
|
|
747
741
|
if (listCode) {
|
|
@@ -760,7 +754,7 @@ function downloadTemplateFunc(params) {
|
|
|
760
754
|
const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
|
|
761
755
|
param += "&isPermission=" + isPermission;
|
|
762
756
|
}
|
|
763
|
-
const baseUrl = getBaseUrl(
|
|
757
|
+
const baseUrl = getBaseUrl(backendUrl);
|
|
764
758
|
window.open(baseUrl + "/dsc/commons/download-files" + param);
|
|
765
759
|
}
|
|
766
760
|
function doImportFinally(params, fileObj) {
|
|
@@ -811,16 +805,15 @@ function doImportFinally(params, fileObj) {
|
|
|
811
805
|
if (buttonConfigureBase.functionCode) {
|
|
812
806
|
param.append("functionCode", buttonConfigureBase.functionCode);
|
|
813
807
|
}
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
param.append("additionalParamMapStr", JSON.stringify(additionalParamMap));
|
|
817
|
-
}
|
|
808
|
+
let additionalParamMap = getAdditionalParamMap(pageContext);
|
|
809
|
+
param.append("additionalParamMapStr", JSON.stringify(additionalParamMap));
|
|
818
810
|
const isPermission = buttonConfigureBase.isPermission === void 0 || buttonConfigureBase.isPermission === "true" || buttonConfigureBase.isPermission;
|
|
819
811
|
param.append("isPermission", isPermission + "");
|
|
820
|
-
const
|
|
821
|
-
const
|
|
812
|
+
const systemCode = pageContext.systemCode;
|
|
813
|
+
const backendUrl = pageContext.backendUrl;
|
|
814
|
+
const baseUrl = getBaseUrl(backendUrl);
|
|
822
815
|
let path = baseUrl + "/dsc/commons/import-data";
|
|
823
|
-
path = getRealRestApiPath(path,
|
|
816
|
+
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
824
817
|
http.post(path, param).then((data) => {
|
|
825
818
|
if (isAsync) {
|
|
826
819
|
ElMessage({
|
|
@@ -922,8 +915,8 @@ function getWorkflowSaveParams(params) {
|
|
|
922
915
|
const pageContext = params.pageContext;
|
|
923
916
|
const configureObj = params.configureObj;
|
|
924
917
|
const dataModel = pageContext.entity.data;
|
|
925
|
-
const
|
|
926
|
-
const permissionPrefix =
|
|
918
|
+
const systemCode = pageContext.systemCode;
|
|
919
|
+
const permissionPrefix = systemCode + "." + pageContext.code;
|
|
927
920
|
let functionCode = configureObj.props.base.functionCode;
|
|
928
921
|
if (!functionCode) {
|
|
929
922
|
functionCode = permissionPrefix + ".xxx";
|
|
@@ -940,7 +933,7 @@ function getWorkflowSaveParams(params) {
|
|
|
940
933
|
emailTemplateCode: pageContext.emailTemplateCode,
|
|
941
934
|
definitionId: pageContext.definitionId,
|
|
942
935
|
functionCode,
|
|
943
|
-
systemCode
|
|
936
|
+
systemCode,
|
|
944
937
|
tableNames: pageContext.tableNames
|
|
945
938
|
};
|
|
946
939
|
if (pageContext.completeTaskParam) {
|
|
@@ -980,14 +973,12 @@ function getWorkflowSaveParams(params) {
|
|
|
980
973
|
param["logSettingText"] = logSetting;
|
|
981
974
|
}
|
|
982
975
|
if (!param.systemCode) {
|
|
983
|
-
param.systemCode =
|
|
976
|
+
param.systemCode = systemCode;
|
|
984
977
|
}
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
param["ids"] = additionalParamMap.ids;
|
|
990
|
-
}
|
|
978
|
+
let additionalParamMap = getAdditionalParamMap(pageContext);
|
|
979
|
+
param["additionalParamMap"] = additionalParamMap;
|
|
980
|
+
if (additionalParamMap.ids && additionalParamMap.ids.length > 0) {
|
|
981
|
+
param["ids"] = additionalParamMap.ids;
|
|
991
982
|
}
|
|
992
983
|
const successOperation = configureObj.props.base.successOperation;
|
|
993
984
|
if (successOperation && successOperation === "noOperation") {
|
|
@@ -1000,9 +991,10 @@ function workflowSaveFunc(params) {
|
|
|
1000
991
|
return new Promise((resolve, reject) => {
|
|
1001
992
|
const pageContext = params.pageContext;
|
|
1002
993
|
const dataModel = pageContext.entity.data;
|
|
1003
|
-
const
|
|
1004
|
-
|
|
1005
|
-
path =
|
|
994
|
+
const systemCode = pageContext.systemCode;
|
|
995
|
+
const backendUrl = pageContext.backendUrl;
|
|
996
|
+
let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons";
|
|
997
|
+
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1006
998
|
if (!path) {
|
|
1007
999
|
ElMessage({
|
|
1008
1000
|
showClose: true,
|
|
@@ -1072,6 +1064,10 @@ function dealCompleteTaskParam(commonEntity, isInit, pageContext, params, operat
|
|
|
1072
1064
|
pageContext.workflowButtonComponent = completeTaskParam.buttonComponent;
|
|
1073
1065
|
pageContext.completeTaskParam = completeTaskParam;
|
|
1074
1066
|
}
|
|
1067
|
+
if (!pageContext.entity) {
|
|
1068
|
+
pageContext.entity = {};
|
|
1069
|
+
}
|
|
1070
|
+
pageContext.entity.task = formParam.taskParamMap;
|
|
1075
1071
|
setStoreInfo(pageCode, pageVersion, "_currentActivityName", formParam.taskName);
|
|
1076
1072
|
}
|
|
1077
1073
|
if (params) {
|
|
@@ -1085,9 +1081,10 @@ function dealCompleteTaskParam(commonEntity, isInit, pageContext, params, operat
|
|
|
1085
1081
|
function submitProcessFunc(params) {
|
|
1086
1082
|
return new Promise((resolve, reject) => {
|
|
1087
1083
|
const pageContext = params.pageContext;
|
|
1088
|
-
const
|
|
1089
|
-
|
|
1090
|
-
path =
|
|
1084
|
+
const systemCode = pageContext.systemCode;
|
|
1085
|
+
const backendUrl = pageContext.backendUrl;
|
|
1086
|
+
let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/submit";
|
|
1087
|
+
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1091
1088
|
if (!path) {
|
|
1092
1089
|
ElMessage({
|
|
1093
1090
|
showClose: true,
|
|
@@ -1121,9 +1118,10 @@ function submitProcessFunc(params) {
|
|
|
1121
1118
|
function completeTaskFunc(params, operationResult) {
|
|
1122
1119
|
return new Promise((resolve, reject) => {
|
|
1123
1120
|
const pageContext = params.pageContext;
|
|
1124
|
-
const
|
|
1125
|
-
|
|
1126
|
-
path =
|
|
1121
|
+
const systemCode = pageContext.systemCode;
|
|
1122
|
+
const backendUrl = pageContext.backendUrl;
|
|
1123
|
+
let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/complete-tasks";
|
|
1124
|
+
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1127
1125
|
if (!path) {
|
|
1128
1126
|
ElMessage({
|
|
1129
1127
|
showClose: true,
|
|
@@ -1167,8 +1165,8 @@ function doAssign(params, selectNodeInfo) {
|
|
|
1167
1165
|
if (selectNodeInfo) {
|
|
1168
1166
|
const pageContext = params.pageContext;
|
|
1169
1167
|
const configureObj = params.configureObj;
|
|
1170
|
-
const
|
|
1171
|
-
const path = getBaseUrl(
|
|
1168
|
+
const backendUrl = pageContext.backendUrl;
|
|
1169
|
+
const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/assigns";
|
|
1172
1170
|
const assigneeId = selectNodeInfo.id ? selectNodeInfo.id : selectNodeInfo.ID ? selectNodeInfo.ID : null;
|
|
1173
1171
|
const requestParam = getWorkflowSaveParams(params);
|
|
1174
1172
|
requestParam["assigneeId"] = assigneeId;
|
|
@@ -1183,9 +1181,9 @@ function getTransactTaskParam(params) {
|
|
|
1183
1181
|
const pageContext = params.pageContext;
|
|
1184
1182
|
const dataModel = pageContext.entity.data;
|
|
1185
1183
|
const pageModel = pageContext.entity.page;
|
|
1186
|
-
const
|
|
1187
|
-
const permissionPrefix =
|
|
1188
|
-
const additionalParamMap = pageContext
|
|
1184
|
+
const systemCode = pageContext.systemCode;
|
|
1185
|
+
const permissionPrefix = systemCode + "." + pageContext.code;
|
|
1186
|
+
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
1189
1187
|
const dataId = dataModel.ID !== void 0 && dataModel.ID !== null ? dataModel.ID : dataModel.id;
|
|
1190
1188
|
({
|
|
1191
1189
|
beanName: pageContext.beanName,
|
|
@@ -1200,9 +1198,22 @@ function getTransactTaskParam(params) {
|
|
|
1200
1198
|
});
|
|
1201
1199
|
({
|
|
1202
1200
|
taskId: pageContext.completeTaskParam.taskId,
|
|
1203
|
-
systemCode
|
|
1201
|
+
systemCode
|
|
1204
1202
|
});
|
|
1205
1203
|
}
|
|
1204
|
+
function getAdditionalParamMap(pageContext) {
|
|
1205
|
+
if (pageContext.entity) {
|
|
1206
|
+
let additionalParamMap = pageContext.entity.page;
|
|
1207
|
+
if (!additionalParamMap) {
|
|
1208
|
+
additionalParamMap = {};
|
|
1209
|
+
}
|
|
1210
|
+
const requestMap = pageContext.entity.request;
|
|
1211
|
+
if (requestMap) {
|
|
1212
|
+
Object.assign(additionalParamMap, requestMap);
|
|
1213
|
+
}
|
|
1214
|
+
return additionalParamMap;
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1206
1217
|
function addSignerFunc(params) {
|
|
1207
1218
|
const pageContext = params.pageContext;
|
|
1208
1219
|
const pagCode = pageContext.code;
|
|
@@ -1213,9 +1224,10 @@ function doAddSigner(params, selectNodeInfo) {
|
|
|
1213
1224
|
if (selectNodeInfo) {
|
|
1214
1225
|
const pageContext = params.pageContext;
|
|
1215
1226
|
const buttonConfigureObj = params.configureObj;
|
|
1216
|
-
const
|
|
1217
|
-
|
|
1218
|
-
path =
|
|
1227
|
+
const systemCode = pageContext.systemCode;
|
|
1228
|
+
const backendUrl = pageContext.backendUrl;
|
|
1229
|
+
let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/add-signers";
|
|
1230
|
+
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1219
1231
|
if (!path) {
|
|
1220
1232
|
ElMessage({
|
|
1221
1233
|
showClose: true,
|
|
@@ -1252,9 +1264,10 @@ function doCreateCopyTask(params, selectNodeInfo) {
|
|
|
1252
1264
|
if (selectNodeInfo) {
|
|
1253
1265
|
const pageContext = params.pageContext;
|
|
1254
1266
|
const buttonConfigureObj = params.configureObj;
|
|
1255
|
-
const
|
|
1256
|
-
|
|
1257
|
-
path =
|
|
1267
|
+
const systemCode = pageContext.systemCode;
|
|
1268
|
+
const backendUrl = pageContext.backendUrl;
|
|
1269
|
+
let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/add-signers";
|
|
1270
|
+
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1258
1271
|
if (!path) {
|
|
1259
1272
|
ElMessage({
|
|
1260
1273
|
showClose: true,
|
|
@@ -1281,8 +1294,9 @@ function doCreateCopyTask(params, selectNodeInfo) {
|
|
|
1281
1294
|
function transactTask(params, requestParam, path, successMessageTip) {
|
|
1282
1295
|
return new Promise((resolve, reject) => {
|
|
1283
1296
|
const pageContext = params.pageContext;
|
|
1284
|
-
const
|
|
1285
|
-
|
|
1297
|
+
const systemCode = pageContext.systemCode;
|
|
1298
|
+
const backendUrl = pageContext.backendUrl;
|
|
1299
|
+
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1286
1300
|
if (!path) {
|
|
1287
1301
|
ElMessage({
|
|
1288
1302
|
showClose: true,
|
|
@@ -1314,15 +1328,15 @@ function transactTask(params, requestParam, path, successMessageTip) {
|
|
|
1314
1328
|
}
|
|
1315
1329
|
function drawTaskFunc(params) {
|
|
1316
1330
|
const pageContext = params.pageContext;
|
|
1317
|
-
const
|
|
1318
|
-
const path = getBaseUrl(
|
|
1331
|
+
const backendUrl = pageContext.backendUrl;
|
|
1332
|
+
const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/draw-tasks";
|
|
1319
1333
|
const requestParam = getWorkflowSaveParams(params);
|
|
1320
1334
|
return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulDrawTask");
|
|
1321
1335
|
}
|
|
1322
1336
|
function abandonReceiveFunc(params) {
|
|
1323
1337
|
const pageContext = params.pageContext;
|
|
1324
|
-
const
|
|
1325
|
-
const path = getBaseUrl(
|
|
1338
|
+
const backendUrl = pageContext.backendUrl;
|
|
1339
|
+
const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/abandon-receives";
|
|
1326
1340
|
const requestParam = getWorkflowSaveParams(params);
|
|
1327
1341
|
return transactTask(
|
|
1328
1342
|
params,
|
|
@@ -1333,8 +1347,8 @@ function abandonReceiveFunc(params) {
|
|
|
1333
1347
|
}
|
|
1334
1348
|
function returnToPreviousTaskFunc(params) {
|
|
1335
1349
|
const pageContext = params.pageContext;
|
|
1336
|
-
const
|
|
1337
|
-
const path = getBaseUrl(
|
|
1350
|
+
const backendUrl = pageContext.backendUrl;
|
|
1351
|
+
const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/return-to-previous-tasks";
|
|
1338
1352
|
const requestParam = getWorkflowSaveParams(params);
|
|
1339
1353
|
return transactTask(
|
|
1340
1354
|
params,
|
|
@@ -1345,8 +1359,8 @@ function returnToPreviousTaskFunc(params) {
|
|
|
1345
1359
|
}
|
|
1346
1360
|
function endInstanceFunc(params) {
|
|
1347
1361
|
const pageContext = params.pageContext;
|
|
1348
|
-
const
|
|
1349
|
-
const path = getBaseUrl(
|
|
1362
|
+
const backendUrl = pageContext.backendUrl;
|
|
1363
|
+
const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/end-instance";
|
|
1350
1364
|
const requestParam = getWorkflowSaveParams(params);
|
|
1351
1365
|
return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulEndInstance");
|
|
1352
1366
|
}
|
|
@@ -1358,10 +1372,11 @@ function returnTaskToFunc(params) {
|
|
|
1358
1372
|
}
|
|
1359
1373
|
function getTaskInformitions(params) {
|
|
1360
1374
|
const pageContext = params.pageContext;
|
|
1361
|
-
const
|
|
1375
|
+
const systemCode = pageContext.systemCode;
|
|
1376
|
+
const backendUrl = pageContext.backendUrl;
|
|
1362
1377
|
const completeTaskParam = pageContext.completeTaskParam;
|
|
1363
|
-
let path = getBaseUrl(
|
|
1364
|
-
path = getRealRestApiPath(path,
|
|
1378
|
+
let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/returnable-task/" + completeTaskParam.taskId;
|
|
1379
|
+
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1365
1380
|
if (!path) {
|
|
1366
1381
|
ElMessage({
|
|
1367
1382
|
showClose: true,
|
|
@@ -1370,8 +1385,8 @@ function getTaskInformitions(params) {
|
|
|
1370
1385
|
});
|
|
1371
1386
|
return;
|
|
1372
1387
|
}
|
|
1373
|
-
const permissionPrefix =
|
|
1374
|
-
|
|
1388
|
+
const permissionPrefix = systemCode + "." + pageContext.code;
|
|
1389
|
+
let additionalParamMap = getAdditionalParamMap(pageContext);
|
|
1375
1390
|
const requestParams = {
|
|
1376
1391
|
beanName: pageContext.beanName,
|
|
1377
1392
|
additionalParamMap,
|
|
@@ -1383,8 +1398,8 @@ function getTaskInformitions(params) {
|
|
|
1383
1398
|
function doReturnTaskTo(params, selectTaskNode) {
|
|
1384
1399
|
const pageContext = params.pageContext;
|
|
1385
1400
|
const configureObj = params.configureObj;
|
|
1386
|
-
const
|
|
1387
|
-
const path = getBaseUrl(
|
|
1401
|
+
const backendUrl = pageContext.backendUrl;
|
|
1402
|
+
const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/returnTaskTo";
|
|
1388
1403
|
const requestParam = getWorkflowSaveParams(params);
|
|
1389
1404
|
if (selectTaskNode.nodeName) {
|
|
1390
1405
|
requestParam["returnToNodeName"] = selectTaskNode.nodeName;
|
|
@@ -1406,10 +1421,11 @@ function removeSignerfunc(params) {
|
|
|
1406
1421
|
}
|
|
1407
1422
|
function getRemoveSigner(params) {
|
|
1408
1423
|
const pageContext = params.pageContext;
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1424
|
+
const systemCode = pageContext.systemCode;
|
|
1425
|
+
const backendUrl = pageContext.backendUrl;
|
|
1426
|
+
let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/get-remove-signers";
|
|
1411
1427
|
const requestParam = getWorkflowSaveParams(params);
|
|
1412
|
-
path = getRealRestApiPath(path,
|
|
1428
|
+
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1413
1429
|
if (!path) {
|
|
1414
1430
|
ElMessage({
|
|
1415
1431
|
showClose: true,
|
|
@@ -1424,9 +1440,10 @@ function doRemoveSigners(params, selectRemoveTasks) {
|
|
|
1424
1440
|
if (selectRemoveTasks) {
|
|
1425
1441
|
const pageContext = params.pageContext;
|
|
1426
1442
|
const configureObj = params.configureObj;
|
|
1427
|
-
const
|
|
1428
|
-
|
|
1429
|
-
path =
|
|
1443
|
+
const systemCode = pageContext.systemCode;
|
|
1444
|
+
const backendUrl = pageContext.backendUrl;
|
|
1445
|
+
let path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/remove-signers";
|
|
1446
|
+
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
1430
1447
|
if (!path) {
|
|
1431
1448
|
this.$message({
|
|
1432
1449
|
showClose: true,
|
|
@@ -1455,8 +1472,8 @@ function doRemoveSigners(params, selectRemoveTasks) {
|
|
|
1455
1472
|
}
|
|
1456
1473
|
function retrieveTaskFunc(params) {
|
|
1457
1474
|
const pageContext = params.pageContext;
|
|
1458
|
-
const
|
|
1459
|
-
const path = getBaseUrl(
|
|
1475
|
+
const backendUrl = pageContext.backendUrl;
|
|
1476
|
+
const path = getBaseUrl(backendUrl) + "/dsc/workflow-commons/retrieves";
|
|
1460
1477
|
const requestParam = getWorkflowSaveParams(params);
|
|
1461
1478
|
return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulRetrieve");
|
|
1462
1479
|
}
|
|
@@ -1469,7 +1486,7 @@ function lineEditCreateFunc(params) {
|
|
|
1469
1486
|
}
|
|
1470
1487
|
}
|
|
1471
1488
|
function isVisibleWorkflowButton(standardEventName, buttonInfo, completeTaskParam) {
|
|
1472
|
-
let isVisible =
|
|
1489
|
+
let isVisible = true;
|
|
1473
1490
|
if (standardEventName && buttonInfo) {
|
|
1474
1491
|
if (standardEventName === "workflowSave") {
|
|
1475
1492
|
isVisible = isVisibleWorkflowSave(buttonInfo);
|
|
@@ -1663,6 +1680,7 @@ export {
|
|
|
1663
1680
|
doRemoveSigners,
|
|
1664
1681
|
doReturnTaskTo,
|
|
1665
1682
|
exportFormReport,
|
|
1683
|
+
getAdditionalParamMap,
|
|
1666
1684
|
getRemoveSigner,
|
|
1667
1685
|
getSaveFormRequest,
|
|
1668
1686
|
getTaskInformitions,
|
|
@@ -2,6 +2,7 @@ import Validator from "async-validator";
|
|
|
2
2
|
import { ElMessage } from "element-plus";
|
|
3
3
|
import { getComponentRef } from "../global-refs.js";
|
|
4
4
|
import { getI18n } from "agilebuilder-ui/src/utils/util";
|
|
5
|
+
import { getAdditionalParamMap } from "./standard-event.js";
|
|
5
6
|
function setObjectPropRule(prop, rules, leafRule) {
|
|
6
7
|
const rule = {};
|
|
7
8
|
if (!rules) {
|
|
@@ -169,7 +170,7 @@ function validateDataModelFunc(pageContext, configureObj, isEnableRequired) {
|
|
|
169
170
|
const data = { ...pageModel, ...dataModel };
|
|
170
171
|
const rules = pageContext.rules;
|
|
171
172
|
if (isEnableRequired === void 0 || isEnableRequired === null) {
|
|
172
|
-
isEnableRequired = configureObj.props.verification.required;
|
|
173
|
+
isEnableRequired = configureObj.props.verification ? configureObj.props.verification.required : false;
|
|
173
174
|
if (typeof isEnableRequired === "undefined") {
|
|
174
175
|
isEnableRequired = false;
|
|
175
176
|
}
|
|
@@ -192,7 +193,7 @@ function validateDataModel(isEnableRequired, dataModel, rules, pageContext) {
|
|
|
192
193
|
}
|
|
193
194
|
function validateWorkflowFormDataModel(dataModel, pageContext) {
|
|
194
195
|
return new Promise((resolve, reject) => {
|
|
195
|
-
const additionalParamMap = pageContext
|
|
196
|
+
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
196
197
|
const contextParameter = pageContext.entity.context;
|
|
197
198
|
const taskParamMap = pageContext.entity.task;
|
|
198
199
|
const isSql = true;
|
|
@@ -389,7 +390,7 @@ function getWorkflowRules(pageContext) {
|
|
|
389
390
|
const dataModel = pageContext.entity.data;
|
|
390
391
|
const pageModel = pageContext.entity.page;
|
|
391
392
|
const data = { ...pageModel, ...dataModel };
|
|
392
|
-
const additionalParamMap = pageContext
|
|
393
|
+
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
393
394
|
const contextParameter = pageContext.entity.context;
|
|
394
395
|
const taskParamMap = pageContext.entity.task;
|
|
395
396
|
const isSql = true;
|
|
@@ -36,6 +36,17 @@ function getComponentRef(pageContext, componentUuid) {
|
|
|
36
36
|
const objRef = globalRefs[cacheKey][componentUuid];
|
|
37
37
|
return objRef ? objRef.value : objRef;
|
|
38
38
|
}
|
|
39
|
+
function getComponentRefByCode(pageContext, componentCode) {
|
|
40
|
+
if (!pageContext) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const cacheKey = getPageRefKeyByCode(pageContext.code, pageContext.version);
|
|
44
|
+
if (!globalRefs[cacheKey]) {
|
|
45
|
+
globalRefs[cacheKey] = {};
|
|
46
|
+
}
|
|
47
|
+
const objRef = globalRefs[cacheKey][componentCode];
|
|
48
|
+
return objRef ? objRef.value : objRef;
|
|
49
|
+
}
|
|
39
50
|
function removePageAllRef(pageContext) {
|
|
40
51
|
if (!pageContext) {
|
|
41
52
|
return;
|
|
@@ -60,6 +71,7 @@ export {
|
|
|
60
71
|
addComponentRef,
|
|
61
72
|
addComponentRefByCode,
|
|
62
73
|
getComponentRef,
|
|
74
|
+
getComponentRefByCode,
|
|
63
75
|
initComponentRefState,
|
|
64
76
|
removePageAllRef
|
|
65
77
|
};
|
|
@@ -68,6 +68,7 @@ export interface PageDesign extends Component {
|
|
|
68
68
|
notIdInitializationList?: Array<any>;
|
|
69
69
|
subTablePageInfo?: object;
|
|
70
70
|
customEvents?: Array<any>;
|
|
71
|
+
contextParam?: object;
|
|
71
72
|
}
|
|
72
73
|
/**
|
|
73
74
|
* 运行时页面对象
|
|
@@ -76,6 +77,7 @@ export interface PageContext extends Component {
|
|
|
76
77
|
isTest?: boolean;
|
|
77
78
|
systemCode?: string;
|
|
78
79
|
systemVersion?: number;
|
|
80
|
+
backendUrl?: string;
|
|
79
81
|
code: string;
|
|
80
82
|
version: number;
|
|
81
83
|
dimensions: string;
|
|
@@ -126,7 +128,7 @@ export interface PageContext extends Component {
|
|
|
126
128
|
actionPermissionMap?: Map<string, any>;
|
|
127
129
|
workflowButtonComponent?: object;
|
|
128
130
|
completeTaskParam?: object;
|
|
129
|
-
customRules?:
|
|
131
|
+
customRules?: Record<string, any>;
|
|
130
132
|
initFormNo?: string;
|
|
131
133
|
definitionId?: number;
|
|
132
134
|
dataTypeMaps?: Object;
|