@oinone/kunlun-vue-admin-base 6.3.8 → 6.3.9
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/oinone-kunlun-vue-admin-base.css +1 -1
- package/dist/oinone-kunlun-vue-admin-base.esm.js +23 -21
- package/dist/oinone-kunlun-vue-admin-base.scss +1 -1
- package/dist/types/src/action/server-actions/ServerActionWidget.d.ts +3 -0
- package/package.json +8 -8
- package/src/action/server-actions/ServerActionWidget.ts +6 -13
- package/src/basic/table/BaseTableWidget.ts +26 -16
|
@@ -16,6 +16,9 @@ export declare class ServerActionWidget extends ActionWidget<RuntimeServerAction
|
|
|
16
16
|
protected clickAction(): Promise<ClickResult>;
|
|
17
17
|
protected formValidateProcess(e: HttpClientError): void;
|
|
18
18
|
protected convertFormValidateResults(e: HttpClientError): FormValidateResult[];
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated 6.x please using {@link formValidateErrorProcess}
|
|
21
|
+
*/
|
|
19
22
|
protected notifyValidateResults(e: HttpClientError): void;
|
|
20
23
|
protected clickActionAfter(result: ClickResult): Promise<ClickResult>;
|
|
21
24
|
protected clickActionAfterRefreshData(result: ClickResult, refreshParent?: boolean): Promise<ClickResult>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oinone/kunlun-vue-admin-base",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.9",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prebuild": "rimraf dist",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"doc": "typedoc --out docs src/index.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@oinone/kunlun-vue-admin-layout": "6.3.
|
|
18
|
-
"@oinone/kunlun-vue-router": "6.3.
|
|
19
|
-
"@oinone/kunlun-vue-ui": "6.3.
|
|
20
|
-
"@oinone/kunlun-vue-ui-antd": "6.3.
|
|
21
|
-
"@oinone/kunlun-vue-ui-common": "6.3.
|
|
22
|
-
"@oinone/kunlun-vue-ui-el": "6.3.
|
|
23
|
-
"@oinone/kunlun-vue-widget": "6.3.
|
|
17
|
+
"@oinone/kunlun-vue-admin-layout": "6.3.9",
|
|
18
|
+
"@oinone/kunlun-vue-router": "6.3.9",
|
|
19
|
+
"@oinone/kunlun-vue-ui": "6.3.9",
|
|
20
|
+
"@oinone/kunlun-vue-ui-antd": "6.3.9",
|
|
21
|
+
"@oinone/kunlun-vue-ui-common": "6.3.9",
|
|
22
|
+
"@oinone/kunlun-vue-ui-el": "6.3.9",
|
|
23
|
+
"@oinone/kunlun-vue-widget": "6.3.9",
|
|
24
24
|
"@wangeditor/editor": "5.1.23",
|
|
25
25
|
"@wangeditor/editor-for-vue": "5.1.11",
|
|
26
26
|
"@wangeditor/plugin-upload-attachment": "1.1.0",
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
Dialog,
|
|
3
3
|
Drawer,
|
|
4
4
|
executeViewAction,
|
|
5
|
+
formValidateErrorProcess,
|
|
5
6
|
FunctionCache,
|
|
6
7
|
FunctionService,
|
|
7
8
|
MultiTabsManager,
|
|
@@ -16,7 +17,7 @@ import {
|
|
|
16
17
|
UpdateOneWithRelationsService
|
|
17
18
|
} from '@oinone/kunlun-engine';
|
|
18
19
|
import { ActionType, ViewType } from '@oinone/kunlun-meta';
|
|
19
|
-
import { HttpClientError,
|
|
20
|
+
import { HttpClientError, SystemErrorCode } from '@oinone/kunlun-request';
|
|
20
21
|
import { SPI } from '@oinone/kunlun-spi';
|
|
21
22
|
import { BooleanHelper, CallChaining, debugConsole, OioNotification } from '@oinone/kunlun-vue-ui-antd';
|
|
22
23
|
import { VueWidget, Widget, WidgetSubjection } from '@oinone/kunlun-vue-widget';
|
|
@@ -135,19 +136,11 @@ export class ServerActionWidget extends ActionWidget<RuntimeServerAction> {
|
|
|
135
136
|
return results;
|
|
136
137
|
}
|
|
137
138
|
|
|
139
|
+
/**
|
|
140
|
+
* @deprecated 6.x please using {@link formValidateErrorProcess}
|
|
141
|
+
*/
|
|
138
142
|
protected notifyValidateResults(e: HttpClientError): void {
|
|
139
|
-
|
|
140
|
-
if (!error) {
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
if (error.extensions?.errorCode !== SystemErrorCode.FORM_VALIDATE_ERROR) {
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
for (const messageItem of error.extensions?.messages || []) {
|
|
147
|
-
if (RequestErrorInterceptor.ignoredFormValidateMessage(messageItem)) {
|
|
148
|
-
MessageHub.error(messageItem.message);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
143
|
+
formValidateErrorProcess(e);
|
|
151
144
|
}
|
|
152
145
|
|
|
153
146
|
protected async clickActionAfter(result: ClickResult): Promise<ClickResult> {
|
|
@@ -3,22 +3,23 @@ import {
|
|
|
3
3
|
ActiveRecord,
|
|
4
4
|
ActiveRecords,
|
|
5
5
|
ActiveRecordsOperator,
|
|
6
|
+
formValidateErrorProcess,
|
|
6
7
|
FunctionCache,
|
|
7
8
|
FunctionMetadata,
|
|
8
9
|
FunctionService,
|
|
9
10
|
isRelation2MField,
|
|
10
11
|
parseConfigs,
|
|
12
|
+
RelationUpdateType,
|
|
11
13
|
RuntimeAction,
|
|
12
14
|
RuntimeFunctionDefinition,
|
|
13
15
|
RuntimeM2MField,
|
|
14
16
|
RuntimeO2MField,
|
|
15
17
|
SubmitCacheManager,
|
|
16
18
|
SubmitValue,
|
|
17
|
-
translateValueByKey
|
|
18
|
-
RelationUpdateType
|
|
19
|
+
translateValueByKey
|
|
19
20
|
} from '@oinone/kunlun-engine';
|
|
20
21
|
import { Expression, ExpressionRunParam } from '@oinone/kunlun-expression';
|
|
21
|
-
import { MessageHub } from '@oinone/kunlun-request';
|
|
22
|
+
import { HttpClientError, MessageHub } from '@oinone/kunlun-request';
|
|
22
23
|
import { BooleanHelper, CallChaining, Optional, ReturnPromise } from '@oinone/kunlun-shared';
|
|
23
24
|
import {
|
|
24
25
|
ActiveEditorContext,
|
|
@@ -341,7 +342,7 @@ export class BaseTableWidget<
|
|
|
341
342
|
return false;
|
|
342
343
|
}
|
|
343
344
|
const data = await this.rowEditorClosedForSubmit(context);
|
|
344
|
-
const useDiffUpdate = [RelationUpdateType.diff, RelationUpdateType.batch].includes(this.relationUpdateType)
|
|
345
|
+
const useDiffUpdate = [RelationUpdateType.diff, RelationUpdateType.batch].includes(this.relationUpdateType);
|
|
345
346
|
if (this.inline) {
|
|
346
347
|
if (res && data) {
|
|
347
348
|
if (this.createMode && useDiffUpdate) {
|
|
@@ -349,7 +350,6 @@ export class BaseTableWidget<
|
|
|
349
350
|
} else {
|
|
350
351
|
this.updateSubviewFieldWidget(context, data);
|
|
351
352
|
}
|
|
352
|
-
|
|
353
353
|
}
|
|
354
354
|
} else if (data) {
|
|
355
355
|
try {
|
|
@@ -580,27 +580,37 @@ export class BaseTableWidget<
|
|
|
580
580
|
protected async executeRowEditorUpdate(functionDefinition: RuntimeFunctionDefinition, data: ActiveRecord) {
|
|
581
581
|
const { rootRuntimeContext, model } = this;
|
|
582
582
|
const requestFields = rootRuntimeContext.getRequestModelFields();
|
|
583
|
-
|
|
584
|
-
|
|
583
|
+
const sessionPath = this.currentTriggerCreateAction?.sessionPath;
|
|
584
|
+
try {
|
|
585
|
+
if (sessionPath) {
|
|
586
|
+
return await FunctionService.INSTANCE.simpleExecute<Record<string, unknown>>(
|
|
587
|
+
model,
|
|
588
|
+
functionDefinition,
|
|
589
|
+
{
|
|
590
|
+
requestFields,
|
|
591
|
+
variables: {
|
|
592
|
+
path: sessionPath,
|
|
593
|
+
relationExcludeUpdate: true
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
data
|
|
597
|
+
);
|
|
598
|
+
}
|
|
599
|
+
return await FunctionService.INSTANCE.simpleExecute<Record<string, unknown>>(
|
|
585
600
|
model,
|
|
586
601
|
functionDefinition,
|
|
587
602
|
{
|
|
588
603
|
requestFields,
|
|
589
604
|
variables: {
|
|
590
|
-
|
|
605
|
+
relationExcludeUpdate: true
|
|
591
606
|
}
|
|
592
607
|
},
|
|
593
608
|
data
|
|
594
609
|
);
|
|
610
|
+
} catch (e) {
|
|
611
|
+
formValidateErrorProcess(e as HttpClientError);
|
|
612
|
+
throw e;
|
|
595
613
|
}
|
|
596
|
-
return FunctionService.INSTANCE.simpleExecute<Record<string, unknown>>(
|
|
597
|
-
model,
|
|
598
|
-
functionDefinition,
|
|
599
|
-
{
|
|
600
|
-
requestFields
|
|
601
|
-
},
|
|
602
|
-
data
|
|
603
|
-
);
|
|
604
614
|
}
|
|
605
615
|
|
|
606
616
|
protected refreshRowEditorUpdate(context: RowContext, data: ActiveRecord, res: unknown) {
|