@oinone/kunlun-vue-admin-base 6.2.13 → 6.2.15
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 +59 -49
- package/dist/oinone-kunlun-vue-admin-base.scss +1 -1
- package/dist/types/src/field/transfer/FormTransferFieldWidget.d.ts +1 -1
- package/dist/types/src/file/excel/typing/index.d.ts +3 -1
- package/package.json +8 -8
- package/src/field/transfer/ExportFieldTransfer.ts +4 -2
- package/src/field/transfer/FormTransferFieldWidget.ts +2 -2
- package/src/file/excel/action/ExportWorkbookActionWidget.ts +18 -4
- package/src/file/excel/typing/index.ts +1 -1
|
@@ -24,7 +24,7 @@ export declare class FormTransferFieldWidget extends FormM2MFieldSelectWidget {
|
|
|
24
24
|
submit(submitValue: SubmitValue): Promise<Record<string, unknown> | undefined>;
|
|
25
25
|
protected queryPage<T = Record<string, unknown>>(option: IQueryPageOption, variables?: ObjectValue, context?: ObjectValue): Promise<QueryPageResult<T>>;
|
|
26
26
|
protected generatorFullOptions(content: any): ActiveRecord[];
|
|
27
|
-
protected originOptions:
|
|
27
|
+
protected originOptions: ActiveRecord[];
|
|
28
28
|
protected insertOptions(options: any, back?: boolean): void;
|
|
29
29
|
protected backfillSelectedValues(): void;
|
|
30
30
|
protected get leftColumns(): any;
|
|
@@ -7,7 +7,9 @@ export interface ExcelExportTask extends IdModel {
|
|
|
7
7
|
workbookDefinition?: ExcelWorkDefinition;
|
|
8
8
|
conditionWrapper?: QueryWrapper;
|
|
9
9
|
exportMethod?: ExcelExportMethodEnum;
|
|
10
|
-
selectedFields?: IModelField
|
|
10
|
+
selectedFields?: (IModelField & {
|
|
11
|
+
optionLabel?: string;
|
|
12
|
+
})[];
|
|
11
13
|
requestId?: string;
|
|
12
14
|
sync?: boolean;
|
|
13
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oinone/kunlun-vue-admin-base",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.15",
|
|
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.2.
|
|
18
|
-
"@oinone/kunlun-vue-router": "6.2.
|
|
19
|
-
"@oinone/kunlun-vue-ui": "6.2.
|
|
20
|
-
"@oinone/kunlun-vue-ui-antd": "6.2.
|
|
21
|
-
"@oinone/kunlun-vue-ui-common": "6.2.
|
|
22
|
-
"@oinone/kunlun-vue-ui-el": "6.2.
|
|
23
|
-
"@oinone/kunlun-vue-widget": "6.2.
|
|
17
|
+
"@oinone/kunlun-vue-admin-layout": "6.2.15",
|
|
18
|
+
"@oinone/kunlun-vue-router": "6.2.15",
|
|
19
|
+
"@oinone/kunlun-vue-ui": "6.2.15",
|
|
20
|
+
"@oinone/kunlun-vue-ui-antd": "6.2.15",
|
|
21
|
+
"@oinone/kunlun-vue-ui-common": "6.2.15",
|
|
22
|
+
"@oinone/kunlun-vue-ui-el": "6.2.15",
|
|
23
|
+
"@oinone/kunlun-vue-widget": "6.2.15",
|
|
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",
|
|
@@ -30,7 +30,8 @@ export class ExportFieldTransfer extends FormTransferFieldWidget {
|
|
|
30
30
|
return {
|
|
31
31
|
...target,
|
|
32
32
|
displayName: f.label || target.displayName,
|
|
33
|
-
invisible: f.invisible
|
|
33
|
+
invisible: f.invisible,
|
|
34
|
+
optionLabel: f.template?.optionLabel
|
|
34
35
|
};
|
|
35
36
|
})
|
|
36
37
|
.filter((v) => !!v && BooleanHelper.isFalse(v.invisible));
|
|
@@ -50,7 +51,8 @@ export class ExportFieldTransfer extends FormTransferFieldWidget {
|
|
|
50
51
|
}
|
|
51
52
|
return {
|
|
52
53
|
...o,
|
|
53
|
-
displayName: target.label || o.displayName
|
|
54
|
+
displayName: target.label || o.displayName,
|
|
55
|
+
optionLabel: target.template?.optionLabel
|
|
54
56
|
};
|
|
55
57
|
})
|
|
56
58
|
);
|
|
@@ -218,7 +218,7 @@ export class FormTransferFieldWidget extends FormM2MFieldSelectWidget {
|
|
|
218
218
|
return options;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
protected originOptions = [];
|
|
221
|
+
protected originOptions: ActiveRecord[] = [];
|
|
222
222
|
|
|
223
223
|
protected insertOptions(options, back = false) {
|
|
224
224
|
if (!options?.length) {
|
|
@@ -233,7 +233,7 @@ export class FormTransferFieldWidget extends FormM2MFieldSelectWidget {
|
|
|
233
233
|
});
|
|
234
234
|
this.options = this.generatorFullOptions(finalOptions);
|
|
235
235
|
if (!back) {
|
|
236
|
-
this.originOptions = options;
|
|
236
|
+
this.originOptions = this.generatorFullOptions(options);
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
ModelCache,
|
|
3
|
+
RuntimeContext,
|
|
4
|
+
RuntimeRelationField,
|
|
5
|
+
RuntimeServerAction,
|
|
6
|
+
SubmitValue
|
|
7
|
+
} from '@oinone/kunlun-engine';
|
|
2
8
|
import { ModelDefaultActionName } from '@oinone/kunlun-meta';
|
|
3
9
|
import { Condition, getSessionPath, GQL } from '@oinone/kunlun-request';
|
|
4
10
|
import { DEFAULT_TRUE_CONDITION } from '@oinone/kunlun-service';
|
|
@@ -25,7 +31,7 @@ export class ExportWorkbookActionWidget extends AbstractTaskAction<ExcelExportTa
|
|
|
25
31
|
return BooleanHelper.isTrue(this.metadataRuntimeContext.viewAction?.template?.sync);
|
|
26
32
|
}
|
|
27
33
|
|
|
28
|
-
protected generatorGQLByTask(task: ExcelExportTask, condition: string | Condition): Promise<string> {
|
|
34
|
+
protected async generatorGQLByTask(task: ExcelExportTask, condition: string | Condition): Promise<string> {
|
|
29
35
|
let queryData = '{}';
|
|
30
36
|
let rsql = condition;
|
|
31
37
|
if (condition instanceof Condition) {
|
|
@@ -43,6 +49,11 @@ export class ExportWorkbookActionWidget extends AbstractTaskAction<ExcelExportTa
|
|
|
43
49
|
: undefined;
|
|
44
50
|
|
|
45
51
|
const modelName = this.model.name || 'excelExportTask';
|
|
52
|
+
const excelExportTaskModel = await ModelCache.get('file.ExcelExportTask');
|
|
53
|
+
const selectedFieldsField = excelExportTaskModel?.modelFields.find(
|
|
54
|
+
(v) => v.data === 'selectedFields'
|
|
55
|
+
) as RuntimeRelationField;
|
|
56
|
+
const hasOptionLabel = selectedFieldsField.references === 'file.ExcelModelField';
|
|
46
57
|
return GQL.mutation(`${modelName}Mutation`, 'createExportTask')
|
|
47
58
|
.buildRequest((builder) => {
|
|
48
59
|
builder.buildObjectParameter('data', (builder) => {
|
|
@@ -65,8 +76,11 @@ export class ExportWorkbookActionWidget extends AbstractTaskAction<ExcelExportTa
|
|
|
65
76
|
}
|
|
66
77
|
if (selectedFields?.length) {
|
|
67
78
|
builder.buildArrayParameter('selectedFields', selectedFields, (builder, value) => {
|
|
68
|
-
builder.stringParameter('field', value.
|
|
79
|
+
builder.stringParameter('field', value.data);
|
|
69
80
|
builder.stringParameter('displayName', value.displayName);
|
|
81
|
+
if (hasOptionLabel) {
|
|
82
|
+
builder.stringParameter('optionLabel', value.optionLabel);
|
|
83
|
+
}
|
|
70
84
|
});
|
|
71
85
|
}
|
|
72
86
|
});
|
|
@@ -115,7 +129,7 @@ export class ExportWorkbookActionWidget extends AbstractTaskAction<ExcelExportTa
|
|
|
115
129
|
workbookDefinition: {
|
|
116
130
|
id: workbookId
|
|
117
131
|
}
|
|
118
|
-
};
|
|
132
|
+
} as ExcelExportTask;
|
|
119
133
|
break;
|
|
120
134
|
}
|
|
121
135
|
case ExcelExportMethodEnum.SELECT_TEMPLATE_FIELD: {
|
|
@@ -9,7 +9,7 @@ export interface ExcelExportTask extends IdModel {
|
|
|
9
9
|
workbookDefinition?: ExcelWorkDefinition;
|
|
10
10
|
conditionWrapper?: QueryWrapper;
|
|
11
11
|
exportMethod?: ExcelExportMethodEnum;
|
|
12
|
-
selectedFields?: IModelField[];
|
|
12
|
+
selectedFields?: (IModelField & { optionLabel?: string })[];
|
|
13
13
|
requestId?: string;
|
|
14
14
|
sync?: boolean;
|
|
15
15
|
}
|