super-page-runtime 2.0.22 → 2.0.25
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 +4 -4
- package/dist/es/components/runtime/utils/api/page-expose-util.js +5 -1
- package/dist/es/components/runtime/utils/assemblys-config.js +16 -7
- package/dist/es/components/runtime/utils/common-util.js +1 -1
- package/dist/es/components/runtime/utils/events/event-util.d.ts +14 -0
- package/dist/es/components/runtime/utils/events/event-util.js +94 -20
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +1 -0
- package/dist/es/components/runtime/utils/events/standard-event.js +69 -27
- package/dist/es/components/runtime/utils/form/scan-util.js +191 -0
- package/dist/es/components/runtime/utils/page-helper-util.js +18 -2
- package/dist/es/components/runtime/utils/page-init-util.js +5 -13
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +207 -0
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +91 -59
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +24 -1
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +21 -3
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +3 -0
- package/dist/es/components/runtime/views/super-page.vue.js +16 -5
- package/package.json +2 -2
|
@@ -36,7 +36,7 @@ function getCommonFormData(pageContext) {
|
|
|
36
36
|
const dataId = additionalParamMap ? additionalParamMap.id : null;
|
|
37
37
|
const ids = additionalParamMap ? additionalParamMap.ids : null;
|
|
38
38
|
const taskId = additionalParamMap ? additionalParamMap.taskId : null;
|
|
39
|
-
const permissionPrefix =
|
|
39
|
+
const permissionPrefix = pageCode;
|
|
40
40
|
const backendUrl = getSystemBackendUrl(pageContext.backendUrl);
|
|
41
41
|
const param = {
|
|
42
42
|
pageCode,
|
|
@@ -45,7 +45,7 @@ function getCommonFormData(pageContext) {
|
|
|
45
45
|
formNoRuleCode: pageContext.formNoRuleCode,
|
|
46
46
|
id: dataId,
|
|
47
47
|
systemCode,
|
|
48
|
-
functionCode: permissionPrefix + ".
|
|
48
|
+
functionCode: permissionPrefix + ".gets",
|
|
49
49
|
tableNames: pageContext.tableNames
|
|
50
50
|
};
|
|
51
51
|
if (!param.id && additionalParamMap && additionalParamMap._t_ && getSessionCache(additionalParamMap._t_ + "_id")) {
|
|
@@ -104,7 +104,7 @@ function getWorkflowFormData(pageContext) {
|
|
|
104
104
|
const dataId = additionalParamMap ? additionalParamMap.id : null;
|
|
105
105
|
const ids = additionalParamMap ? additionalParamMap.ids : null;
|
|
106
106
|
const taskId = additionalParamMap ? additionalParamMap.taskId : null;
|
|
107
|
-
const permissionPrefix =
|
|
107
|
+
const permissionPrefix = pageCode;
|
|
108
108
|
const param = {
|
|
109
109
|
pageCode,
|
|
110
110
|
pageVersion,
|
|
@@ -112,7 +112,7 @@ function getWorkflowFormData(pageContext) {
|
|
|
112
112
|
formNoRuleCode: pageContext.formNoRuleCode,
|
|
113
113
|
isWorkflowEntity: true,
|
|
114
114
|
systemCode,
|
|
115
|
-
functionCode: permissionPrefix + ".
|
|
115
|
+
functionCode: permissionPrefix + ".gets",
|
|
116
116
|
tableNames: pageContext.tableNames
|
|
117
117
|
};
|
|
118
118
|
if (ids) {
|
|
@@ -187,7 +187,11 @@ const functions = {
|
|
|
187
187
|
if (!params.taskParamMap) {
|
|
188
188
|
params.requestParams = pageContext.entity.task;
|
|
189
189
|
}
|
|
190
|
-
|
|
190
|
+
let baseUrl = pageContext.backendUrl;
|
|
191
|
+
if (!baseUrl) {
|
|
192
|
+
baseUrl = window["$vueApp"].config.globalProperties.baseURL;
|
|
193
|
+
}
|
|
194
|
+
return http.post(`${baseUrl}/dsc/service-flow/execute/${pageCode}/${flowCode}`, params);
|
|
191
195
|
},
|
|
192
196
|
openPage: function(pageContext, openParam) {
|
|
193
197
|
eventBus.$emit(pageContext.code + "_open-dialog", {
|
|
@@ -249,13 +249,22 @@ const assemblyGroups = [
|
|
|
249
249
|
{
|
|
250
250
|
name: "data",
|
|
251
251
|
label: "数据",
|
|
252
|
-
items: [
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
252
|
+
items: [
|
|
253
|
+
{
|
|
254
|
+
name: "table",
|
|
255
|
+
label: "表格",
|
|
256
|
+
runtimeComponent: defineAsyncComponent(() => {
|
|
257
|
+
return import("../views/assemblys/data/table/table-runtime.vue.js");
|
|
258
|
+
})
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
name: "bar-code",
|
|
262
|
+
label: "条码",
|
|
263
|
+
runtimeComponent: defineAsyncComponent(() => {
|
|
264
|
+
return import("../views/assemblys/data/bar-code/barcode-runtime.vue.js");
|
|
265
|
+
})
|
|
266
|
+
}
|
|
267
|
+
]
|
|
259
268
|
}
|
|
260
269
|
];
|
|
261
270
|
function getRuntimeComponentByName(name) {
|
|
@@ -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 + "
|
|
68
|
+
return pageCode + "__V" + pageVersion + "__" + tableUuid;
|
|
69
69
|
}
|
|
70
70
|
function deepCopy(srcObj) {
|
|
71
71
|
if (typeof srcObj !== "object" || srcObj === null) {
|
|
@@ -5,6 +5,13 @@ import { PageDesign, Component, PageContext } from '../interfaces/page-design-ty
|
|
|
5
5
|
* @param pageDesign
|
|
6
6
|
*/
|
|
7
7
|
export declare function initPageEvents(pageDesign: PageDesign, pageContext: PageContext): void;
|
|
8
|
+
/**
|
|
9
|
+
* 获取自定义方法
|
|
10
|
+
* @param pageContext
|
|
11
|
+
* @param funcName
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export declare function getCustomFunc(pageContext: PageContext, funcName: any): any;
|
|
8
15
|
/**
|
|
9
16
|
* 页面销毁时,将window上注册的函数移除掉
|
|
10
17
|
* @param pageDesign
|
|
@@ -21,6 +28,13 @@ export declare function doAfterClickEvent(pageContext: PageContext, configure: C
|
|
|
21
28
|
* @param eventType change、click等事件类型
|
|
22
29
|
*/
|
|
23
30
|
export declare function getEventFuncByType(pageContext: PageContext, events: Array<any>, eventType: string): any;
|
|
31
|
+
/**
|
|
32
|
+
* 根据事件类型,获得事件名称
|
|
33
|
+
* @param events
|
|
34
|
+
* @param eventType
|
|
35
|
+
* @returns
|
|
36
|
+
*/
|
|
37
|
+
export declare function getEventNameByType(events: Array<any>, eventType: string): any;
|
|
24
38
|
/**
|
|
25
39
|
* 获得事件Function对象
|
|
26
40
|
* @param events 该组件所有事件集合
|
|
@@ -1,18 +1,71 @@
|
|
|
1
1
|
import { isPromise } from "agilebuilder-ui/src/utils/common-util";
|
|
2
2
|
import { judgeDataNumber, standardEvents, getAdditionalParamMap, dealAfterOperate } from "./standard-event.js";
|
|
3
3
|
import { validateDataModelFunc } from "./validator-util.js";
|
|
4
|
-
import { getComponentRef } from "../global-refs.js";
|
|
4
|
+
import { getComponentRef, getComponentRefByCode } from "../global-refs.js";
|
|
5
5
|
import { ElMessage } from "element-plus";
|
|
6
6
|
import { analysisCondition } from "agilebuilder-ui/src/utils/util";
|
|
7
7
|
import { getListCode } from "../common-util.js";
|
|
8
8
|
import eventBus from "../eventBus.js";
|
|
9
|
-
import "
|
|
10
|
-
import "dayjs";
|
|
11
|
-
import "agilebuilder-ui/src/utils/calculator/calculator-util";
|
|
12
|
-
import "vue";
|
|
9
|
+
import { getValueFromSource } from "../page-helper-util.js";
|
|
13
10
|
function initPageEvents(pageDesign, pageContext) {
|
|
14
11
|
if (pageDesign && pageDesign.customEvents) {
|
|
15
|
-
|
|
12
|
+
const customEvents = transferToFunction(pageDesign.customEvents);
|
|
13
|
+
appendDefaultMethod(pageContext, customEvents);
|
|
14
|
+
console.log("initPage customEvents", customEvents);
|
|
15
|
+
pageContext.customEvents = customEvents;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function getCustomFunc(pageContext, funcName) {
|
|
19
|
+
if (pageContext.customEvents) {
|
|
20
|
+
return pageContext.customEvents[funcName];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function appendDefaultMethod(pageContext, customEvents) {
|
|
24
|
+
if (!customEvents) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
for (const pro in customEvents) {
|
|
28
|
+
const func = customEvents[pro];
|
|
29
|
+
func.get = function(code) {
|
|
30
|
+
if (code) {
|
|
31
|
+
return getComponentRefByCode(pageContext, code);
|
|
32
|
+
} else {
|
|
33
|
+
return void 0;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
func.getByUuid = function(uuid) {
|
|
37
|
+
if (uuid) {
|
|
38
|
+
return getComponentRef(pageContext, uuid);
|
|
39
|
+
} else {
|
|
40
|
+
return void 0;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
func.getPageContext = function() {
|
|
44
|
+
return pageContext;
|
|
45
|
+
};
|
|
46
|
+
func.getContextValue = function(fieldName) {
|
|
47
|
+
let contextData = pageContext && pageContext.entity ? pageContext.entity.context : null;
|
|
48
|
+
contextData = contextData ? contextData : {};
|
|
49
|
+
return getValueFromSource(contextData, fieldName, "context");
|
|
50
|
+
};
|
|
51
|
+
func.getContext = function() {
|
|
52
|
+
return pageContext && pageContext.entity ? pageContext.entity.context : {};
|
|
53
|
+
};
|
|
54
|
+
func.getSystem = function() {
|
|
55
|
+
return pageContext && pageContext.entity ? pageContext.entity.system : {};
|
|
56
|
+
};
|
|
57
|
+
func.getTask = function() {
|
|
58
|
+
return pageContext && pageContext.entity ? pageContext.entity.task : {};
|
|
59
|
+
};
|
|
60
|
+
func.getRequest = function() {
|
|
61
|
+
return pageContext && pageContext.entity ? pageContext.entity.request : {};
|
|
62
|
+
};
|
|
63
|
+
func.getPage = function() {
|
|
64
|
+
return pageContext && pageContext.entity ? pageContext.entity.page : {};
|
|
65
|
+
};
|
|
66
|
+
func.getCustomFunc = function(funcName) {
|
|
67
|
+
return getCustomFunc(pageContext, funcName);
|
|
68
|
+
};
|
|
16
69
|
}
|
|
17
70
|
}
|
|
18
71
|
function removeCustomFuncFromWindow(pageDesign) {
|
|
@@ -36,8 +89,6 @@ function handleEventUtil($event, pageContext, configure, eventType, isExecute, o
|
|
|
36
89
|
const pageCode = pageContext.code;
|
|
37
90
|
const pageVersion = pageContext.version;
|
|
38
91
|
const events = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
|
|
39
|
-
configure.name;
|
|
40
|
-
debugger;
|
|
41
92
|
let eventFun;
|
|
42
93
|
if (eventType && eventType === "click") {
|
|
43
94
|
const tableUuid = configure.props.base.tableUuid ? configure.props.base.tableUuid : pageContext.tableUuids && pageContext.tableUuids.length > 0 ? pageContext.tableUuids[0] : null;
|
|
@@ -253,35 +304,50 @@ function doClickEvent(pageContext, configure, clickEventFunObj, eventParams) {
|
|
|
253
304
|
doClickCustomEvent(pageContext, configure, clickEventFunObj, eventParams);
|
|
254
305
|
}
|
|
255
306
|
}
|
|
256
|
-
function getEventByEventName(pageContext,
|
|
307
|
+
function getEventByEventName(pageContext, eventObj) {
|
|
257
308
|
const eventsObj = pageContext.customEvents;
|
|
258
|
-
if (eventsObj &&
|
|
259
|
-
|
|
309
|
+
if (eventsObj && eventObj) {
|
|
310
|
+
let key = "";
|
|
311
|
+
if (typeof eventObj === "object") {
|
|
312
|
+
key = eventObj.componentUuid + "_" + eventObj.name;
|
|
313
|
+
} else {
|
|
314
|
+
key = eventObj;
|
|
315
|
+
}
|
|
316
|
+
return eventsObj[key];
|
|
260
317
|
}
|
|
261
318
|
}
|
|
262
319
|
function getEventFuncByType(pageContext, events, eventType) {
|
|
263
320
|
if (events && eventType) {
|
|
264
|
-
const eventArr = events.filter((item) => item.name === eventType
|
|
321
|
+
const eventArr = events.filter((item) => item.name === eventType);
|
|
265
322
|
if (eventArr && eventArr.length > 0) {
|
|
266
323
|
const event = eventArr[0];
|
|
267
324
|
if (event.isStandard) {
|
|
268
325
|
return standardEvents[event.eventName];
|
|
269
326
|
} else {
|
|
270
|
-
return getEventByEventName(pageContext, event
|
|
327
|
+
return getEventByEventName(pageContext, event);
|
|
271
328
|
}
|
|
272
329
|
}
|
|
273
330
|
}
|
|
274
331
|
}
|
|
332
|
+
function getEventNameByType(events, eventType) {
|
|
333
|
+
if (events && eventType) {
|
|
334
|
+
const eventArr = events.filter((item) => item.name === eventType);
|
|
335
|
+
if (eventArr && eventArr.length > 0) {
|
|
336
|
+
const event = eventArr[0];
|
|
337
|
+
return event.eventName;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
275
341
|
function getClickEventFuncByType(pageContext, events, eventType) {
|
|
276
342
|
if (events && eventType) {
|
|
277
|
-
const eventArr = events.filter((item) => item.name === eventType
|
|
343
|
+
const eventArr = events.filter((item) => item.name === eventType);
|
|
278
344
|
if (eventArr && eventArr.length > 0) {
|
|
279
345
|
const event = eventArr[0];
|
|
280
346
|
if (event.isStandard) {
|
|
281
347
|
return { func: standardEvents[event.eventName], isStandard: true, event };
|
|
282
348
|
} else {
|
|
283
349
|
return {
|
|
284
|
-
func: getEventByEventName(pageContext, event
|
|
350
|
+
func: getEventByEventName(pageContext, event),
|
|
285
351
|
isStandard: false,
|
|
286
352
|
event
|
|
287
353
|
};
|
|
@@ -305,19 +371,25 @@ function callItemEvent(pageContext, configureObj, eventFun, eventParams, otherPa
|
|
|
305
371
|
eventParams[key] = otherParams[key];
|
|
306
372
|
}
|
|
307
373
|
}
|
|
308
|
-
return eventFun(eventParams);
|
|
374
|
+
return eventFun.apply(eventFun, [eventParams]);
|
|
309
375
|
}
|
|
310
376
|
function transferToFunction(customEvents) {
|
|
311
377
|
const eventsObj = {};
|
|
312
378
|
customEvents.forEach((event) => {
|
|
313
|
-
if (event.jsContent) {
|
|
314
|
-
eventsObj[event.eventName] = new Function("params", event.jsContent);
|
|
379
|
+
if (!event.isStandard && event.jsContent) {
|
|
315
380
|
if (event.name === "customFunc") {
|
|
381
|
+
let newFunc = null;
|
|
316
382
|
if (event.funcParam) {
|
|
317
|
-
|
|
383
|
+
const args = event.funcParam.split(",");
|
|
384
|
+
newFunc = new Function(args, event.jsContent);
|
|
318
385
|
} else {
|
|
319
|
-
|
|
386
|
+
newFunc = new Function(event.jsContent);
|
|
320
387
|
}
|
|
388
|
+
eventsObj[event.eventName] = newFunc;
|
|
389
|
+
} else {
|
|
390
|
+
let key = event.componentUuid + "_";
|
|
391
|
+
key += event.name;
|
|
392
|
+
eventsObj[key] = new Function("params", event.jsContent);
|
|
321
393
|
}
|
|
322
394
|
}
|
|
323
395
|
});
|
|
@@ -538,7 +610,9 @@ export {
|
|
|
538
610
|
fileUploadDeleted,
|
|
539
611
|
fileUploadUploaded,
|
|
540
612
|
getClickEventFuncByType,
|
|
613
|
+
getCustomFunc,
|
|
541
614
|
getEventFuncByType,
|
|
615
|
+
getEventNameByType,
|
|
542
616
|
getHandleEvent,
|
|
543
617
|
gridSelectAllRecords,
|
|
544
618
|
gridSelectRecord,
|
|
@@ -38,6 +38,7 @@ export declare const standardEvents: {
|
|
|
38
38
|
lineEditCreate: (params: any) => void;
|
|
39
39
|
};
|
|
40
40
|
export declare function exportFormReport(pageContext: any, configureObj: any, templateFile: any, isPdf: any): void;
|
|
41
|
+
export declare function getSaveFormRequestWithRow(pageContext: any, configureObj: any, url: any, isUnControlVersion: any, mainDefaultValueColumns: any, dynamicColumnInfo: any, row: any): any;
|
|
41
42
|
export declare function getSaveFormRequest(pageContext: any, configureObj: any, url: any, isUnControlVersion: any, mainDefaultValueColumns: any, dynamicColumnInfo: any): any;
|
|
42
43
|
/**
|
|
43
44
|
* 按钮执行后页面处理方式:刷新、关闭弹框等等
|
|
@@ -11,6 +11,7 @@ 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";
|
|
14
|
+
import { getPermissionCodes } from "../page-init-util.js";
|
|
14
15
|
const standardEvents = {
|
|
15
16
|
// 表单标准事件保存save
|
|
16
17
|
save: function(params) {
|
|
@@ -219,6 +220,7 @@ function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
|
|
|
219
220
|
const backendUrl = pageContext.backendUrl;
|
|
220
221
|
const viewModels = pageContext.entity.data;
|
|
221
222
|
const isPermission = button.isPermission === void 0 || button.isPermission === "true" || button.isPermission;
|
|
223
|
+
const functionCodes = getPermissionCodes(configureObj, pageContext);
|
|
222
224
|
const param = {
|
|
223
225
|
entity: viewModels,
|
|
224
226
|
fileName: templateUUID,
|
|
@@ -228,11 +230,13 @@ function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
|
|
|
228
230
|
beanName,
|
|
229
231
|
isWorkflowForm,
|
|
230
232
|
// 是否是流程表单
|
|
231
|
-
functionCode:
|
|
233
|
+
functionCode: functionCodes,
|
|
232
234
|
tableName,
|
|
233
235
|
isPermission: isPermission + "",
|
|
234
236
|
systemCode,
|
|
235
|
-
tableNames: pageContext.tableNames
|
|
237
|
+
tableNames: pageContext.tableNames,
|
|
238
|
+
pageCode: pageContext.code,
|
|
239
|
+
pageVersion: pageContext.version
|
|
236
240
|
};
|
|
237
241
|
if (logSetting) {
|
|
238
242
|
param["logSettingText"] = logSetting;
|
|
@@ -348,19 +352,26 @@ function saveFunc(params, isListButton) {
|
|
|
348
352
|
}
|
|
349
353
|
});
|
|
350
354
|
}
|
|
351
|
-
function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, ids) {
|
|
355
|
+
function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, ids, row) {
|
|
352
356
|
const isWorkflow = pageContext.workflowCode ? true : false;
|
|
353
357
|
const systemCode = pageContext.systemCode;
|
|
354
358
|
const isPermission = configureObj.props.base.isPermission === void 0 || configureObj.props.base.isPermission === "true" || configureObj.props.base.isPermission;
|
|
359
|
+
const functionCodes = getPermissionCodes(configureObj, pageContext);
|
|
360
|
+
let entity = row;
|
|
361
|
+
if (!entity) {
|
|
362
|
+
entity = pageContext.entity.data;
|
|
363
|
+
}
|
|
355
364
|
const param = {
|
|
356
|
-
entity
|
|
365
|
+
entity,
|
|
357
366
|
pageModel: pageContext.entity.page,
|
|
358
367
|
tableName: pageContext.tableName,
|
|
359
368
|
formNoRuleCode: pageContext.formNoRuleCode,
|
|
360
369
|
isWorkflowEntity: isWorkflow,
|
|
361
|
-
functionCode:
|
|
370
|
+
functionCode: functionCodes,
|
|
362
371
|
isPermission: isPermission + "",
|
|
363
|
-
tableNames: pageContext.tableNames
|
|
372
|
+
tableNames: pageContext.tableNames,
|
|
373
|
+
pageCode: pageContext.code,
|
|
374
|
+
pageVersion: pageContext.version
|
|
364
375
|
};
|
|
365
376
|
if (ids) {
|
|
366
377
|
param["ids"] = ids;
|
|
@@ -412,7 +423,7 @@ function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion
|
|
|
412
423
|
}
|
|
413
424
|
return param;
|
|
414
425
|
}
|
|
415
|
-
function
|
|
426
|
+
function getSaveFormRequestWithRow(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, row) {
|
|
416
427
|
const systemCode = pageContext.systemCode;
|
|
417
428
|
const backendUrl = pageContext.backendUrl;
|
|
418
429
|
const param = getCommonFormRequestParam(
|
|
@@ -421,10 +432,22 @@ function getSaveFormRequest(pageContext, configureObj, url, isUnControlVersion,
|
|
|
421
432
|
isUnControlVersion,
|
|
422
433
|
mainDefaultValueColumns,
|
|
423
434
|
dynamicColumnInfo,
|
|
424
|
-
null
|
|
435
|
+
null,
|
|
436
|
+
row
|
|
425
437
|
);
|
|
426
438
|
return getSaveFormRequestByParam(systemCode, backendUrl, param, url, pageContext.entity.data);
|
|
427
439
|
}
|
|
440
|
+
function getSaveFormRequest(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo) {
|
|
441
|
+
return getSaveFormRequestWithRow(
|
|
442
|
+
pageContext,
|
|
443
|
+
configureObj,
|
|
444
|
+
url,
|
|
445
|
+
isUnControlVersion,
|
|
446
|
+
mainDefaultValueColumns,
|
|
447
|
+
dynamicColumnInfo,
|
|
448
|
+
null
|
|
449
|
+
);
|
|
450
|
+
}
|
|
428
451
|
function getSaveFormRequestByParam(systemCode, backendUrl, param, url, formData) {
|
|
429
452
|
const baseUrl = getBaseUrl(backendUrl);
|
|
430
453
|
let path = baseUrl + url;
|
|
@@ -532,7 +555,7 @@ function updateValuesWhenCloseDialog(parentPageContext, parentConfigureObj, sour
|
|
|
532
555
|
function dealAfterWithList(pageContext, configureObj, row, successTip) {
|
|
533
556
|
let successOperation = configureObj.props.base.successOperation;
|
|
534
557
|
const isNeedValueMapping = configureObj.props.base.isNeedValueMapping;
|
|
535
|
-
|
|
558
|
+
let tableUuid = configureObj.props.base.tableUuid;
|
|
536
559
|
if (!successOperation) {
|
|
537
560
|
successOperation = "refresh";
|
|
538
561
|
}
|
|
@@ -616,7 +639,8 @@ function getSubmitFormRequest(pageContext, configureObj, url, isUnControlVersion
|
|
|
616
639
|
isUnControlVersion,
|
|
617
640
|
mainDefaultValueColumns,
|
|
618
641
|
dynamicColumnInfo,
|
|
619
|
-
ids
|
|
642
|
+
ids,
|
|
643
|
+
null
|
|
620
644
|
);
|
|
621
645
|
getSaveFormRequestByParam(systemCode, backendUrl, param, url, pageContext.entity.data).then((result) => {
|
|
622
646
|
resolve(result);
|
|
@@ -659,13 +683,16 @@ function deleteFunc(params) {
|
|
|
659
683
|
path = getRealRestApiPath(path, systemCode, backendUrl);
|
|
660
684
|
const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
|
|
661
685
|
const isWorkflow = pageContext.workflowCode ? true : false;
|
|
686
|
+
const functionCodes = getPermissionCodes(configureObj, pageContext);
|
|
662
687
|
const param = {
|
|
663
688
|
ids,
|
|
664
|
-
functionCode:
|
|
689
|
+
functionCode: functionCodes,
|
|
665
690
|
isPermission: isPermission + "",
|
|
666
691
|
systemCode,
|
|
667
692
|
isWorkflowEntity: isWorkflow,
|
|
668
|
-
tableNames: pageContext.tableNames
|
|
693
|
+
tableNames: pageContext.tableNames,
|
|
694
|
+
pageCode: pageContext.code,
|
|
695
|
+
pageVersion: pageContext.version
|
|
669
696
|
};
|
|
670
697
|
if (configureBase.beanName) {
|
|
671
698
|
param["beanName"] = configureBase.beanName;
|
|
@@ -689,7 +716,8 @@ function deleteFunc(params) {
|
|
|
689
716
|
http.delete(path, {
|
|
690
717
|
data: param
|
|
691
718
|
}).then((data) => {
|
|
692
|
-
const
|
|
719
|
+
const tableUuid = configureObj.props.base.tableUuid;
|
|
720
|
+
const gridRef = getComponentRef(pageContext, tableUuid);
|
|
693
721
|
if (gridRef) {
|
|
694
722
|
gridRef.isDeleteChange(true);
|
|
695
723
|
gridRef.clearSelections();
|
|
@@ -744,12 +772,19 @@ function downloadTemplateFunc(params) {
|
|
|
744
772
|
if (pageContext.beanName) {
|
|
745
773
|
param += "&beanName=" + pageContext.beanName;
|
|
746
774
|
}
|
|
747
|
-
|
|
748
|
-
|
|
775
|
+
const functionCodes = getPermissionCodes(configureObj, pageContext);
|
|
776
|
+
if (functionCodes) {
|
|
777
|
+
param += "&functionCode=" + functionCodes;
|
|
749
778
|
}
|
|
750
779
|
if (pageContext.tableName) {
|
|
751
780
|
param += "&tableName=" + pageContext.tableName;
|
|
752
781
|
}
|
|
782
|
+
if (pageContext.code) {
|
|
783
|
+
param += "&pageCode=" + pageContext.code;
|
|
784
|
+
}
|
|
785
|
+
if (pageContext.version) {
|
|
786
|
+
param += "&pageVersion=" + pageContext.version;
|
|
787
|
+
}
|
|
753
788
|
if (configureBase) {
|
|
754
789
|
const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
|
|
755
790
|
param += "&isPermission=" + isPermission;
|
|
@@ -802,8 +837,9 @@ function doImportFinally(params, fileObj) {
|
|
|
802
837
|
if (isWorkflowEntity !== null && isWorkflowEntity !== void 0) {
|
|
803
838
|
param.append("isWorkflowEntity", isWorkflowEntity + "");
|
|
804
839
|
}
|
|
805
|
-
|
|
806
|
-
|
|
840
|
+
const functionCodes = getPermissionCodes(buttonConfigureObj, pageContext);
|
|
841
|
+
if (functionCodes) {
|
|
842
|
+
param.append("functionCode", functionCodes);
|
|
807
843
|
}
|
|
808
844
|
let additionalParamMap = getAdditionalParamMap(pageContext);
|
|
809
845
|
param.append("additionalParamMapStr", JSON.stringify(additionalParamMap));
|
|
@@ -897,12 +933,13 @@ function exportFunc(params) {
|
|
|
897
933
|
isAsync = false;
|
|
898
934
|
}
|
|
899
935
|
const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
|
|
936
|
+
const functionCodes = getPermissionCodes(params.configureObj, pageContext);
|
|
900
937
|
const exportFileName = pageName;
|
|
901
938
|
window["$vueApp"].config.globalProperties.$exportDataNew(
|
|
902
939
|
dataParam,
|
|
903
940
|
exportFileName,
|
|
904
941
|
listCode,
|
|
905
|
-
|
|
942
|
+
functionCodes,
|
|
906
943
|
null,
|
|
907
944
|
null,
|
|
908
945
|
isAsync,
|
|
@@ -916,10 +953,10 @@ function getWorkflowSaveParams(params) {
|
|
|
916
953
|
const configureObj = params.configureObj;
|
|
917
954
|
const dataModel = pageContext.entity.data;
|
|
918
955
|
const systemCode = pageContext.systemCode;
|
|
919
|
-
const permissionPrefix =
|
|
920
|
-
let
|
|
921
|
-
if (!
|
|
922
|
-
|
|
956
|
+
const permissionPrefix = pageContext.code;
|
|
957
|
+
let functionCodes = getPermissionCodes(configureObj, pageContext);
|
|
958
|
+
if (!functionCodes) {
|
|
959
|
+
functionCodes = permissionPrefix + ".xxx";
|
|
923
960
|
}
|
|
924
961
|
if (!dataModel.id && !dataModel.ID) {
|
|
925
962
|
dataModel["pageCode"] = pageContext.code;
|
|
@@ -932,9 +969,11 @@ function getWorkflowSaveParams(params) {
|
|
|
932
969
|
tableName: pageContext.tableName,
|
|
933
970
|
emailTemplateCode: pageContext.emailTemplateCode,
|
|
934
971
|
definitionId: pageContext.definitionId,
|
|
935
|
-
functionCode,
|
|
972
|
+
functionCode: functionCodes,
|
|
936
973
|
systemCode,
|
|
937
|
-
tableNames: pageContext.tableNames
|
|
974
|
+
tableNames: pageContext.tableNames,
|
|
975
|
+
pageCode: pageContext.code,
|
|
976
|
+
pageVersion: pageContext.version
|
|
938
977
|
};
|
|
939
978
|
if (pageContext.completeTaskParam) {
|
|
940
979
|
param["completeTaskParam"] = {
|
|
@@ -1182,7 +1221,7 @@ function getTransactTaskParam(params) {
|
|
|
1182
1221
|
const dataModel = pageContext.entity.data;
|
|
1183
1222
|
const pageModel = pageContext.entity.page;
|
|
1184
1223
|
const systemCode = pageContext.systemCode;
|
|
1185
|
-
const permissionPrefix =
|
|
1224
|
+
const permissionPrefix = pageContext.code;
|
|
1186
1225
|
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
1187
1226
|
const dataId = dataModel.ID !== void 0 && dataModel.ID !== null ? dataModel.ID : dataModel.id;
|
|
1188
1227
|
({
|
|
@@ -1194,7 +1233,9 @@ function getTransactTaskParam(params) {
|
|
|
1194
1233
|
tableName: pageContext.tableName,
|
|
1195
1234
|
functionCode: permissionPrefix + ".xxx",
|
|
1196
1235
|
isWorkflowEntity: true,
|
|
1197
|
-
tableNames: pageContext.tableNames
|
|
1236
|
+
tableNames: pageContext.tableNames,
|
|
1237
|
+
pageCode: pageContext.code,
|
|
1238
|
+
pageVersion: pageContext.version
|
|
1198
1239
|
});
|
|
1199
1240
|
({
|
|
1200
1241
|
taskId: pageContext.completeTaskParam.taskId,
|
|
@@ -1385,7 +1426,7 @@ function getTaskInformitions(params) {
|
|
|
1385
1426
|
});
|
|
1386
1427
|
return;
|
|
1387
1428
|
}
|
|
1388
|
-
const permissionPrefix =
|
|
1429
|
+
const permissionPrefix = pageContext.code;
|
|
1389
1430
|
let additionalParamMap = getAdditionalParamMap(pageContext);
|
|
1390
1431
|
const requestParams = {
|
|
1391
1432
|
beanName: pageContext.beanName,
|
|
@@ -1683,6 +1724,7 @@ export {
|
|
|
1683
1724
|
getAdditionalParamMap,
|
|
1684
1725
|
getRemoveSigner,
|
|
1685
1726
|
getSaveFormRequest,
|
|
1727
|
+
getSaveFormRequestWithRow,
|
|
1686
1728
|
getTaskInformitions,
|
|
1687
1729
|
isVisibleWorkflowButton,
|
|
1688
1730
|
judgeDataNumber,
|