@oinone/kunlun-vue-admin-base 6.2.13 → 6.3.1
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 +72 -52
- package/dist/oinone-kunlun-vue-admin-base.scss +1 -1
- package/dist/types/src/field/form/html/expressionRichtext/ExpressionRichText.vue.d.ts +7 -0
- package/dist/types/src/file/excel/typing/index.d.ts +3 -1
- package/package.json +22 -22
- package/src/basic/table/BaseTableWidget.ts +5 -2
- package/src/field/eip/form/work-scope/service.ts +4 -2
- package/src/field/form/html/expressionRichtext/ExpressionRichText.vue +17 -7
- package/src/field/transfer/ExportFieldTransfer.ts +4 -2
- package/src/file/excel/action/ExportWorkbookActionWidget.ts +18 -4
- package/src/file/excel/typing/index.ts +1 -1
|
@@ -17,6 +17,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
17
17
|
type: PropType<string[]>;
|
|
18
18
|
default: () => never[];
|
|
19
19
|
};
|
|
20
|
+
readonly: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
};
|
|
20
23
|
}, {
|
|
21
24
|
editorStyle: import("vue").ComputedRef<CSSStyle>;
|
|
22
25
|
editorId: string;
|
|
@@ -55,7 +58,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
55
58
|
type: PropType<string[]>;
|
|
56
59
|
default: () => never[];
|
|
57
60
|
};
|
|
61
|
+
readonly: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
};
|
|
58
64
|
}>>, {
|
|
59
65
|
richTextToolbarExcludeKeys: string[];
|
|
66
|
+
readonly: boolean;
|
|
60
67
|
}>;
|
|
61
68
|
export default _default;
|
|
@@ -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.
|
|
3
|
+
"version": "6.3.1",
|
|
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.
|
|
18
|
-
"@oinone/kunlun-vue-router": "6.
|
|
19
|
-
"@oinone/kunlun-vue-ui": "6.
|
|
20
|
-
"@oinone/kunlun-vue-ui-antd": "6.
|
|
21
|
-
"@oinone/kunlun-vue-ui-common": "6.
|
|
22
|
-
"@oinone/kunlun-vue-ui-el": "6.
|
|
23
|
-
"@oinone/kunlun-vue-widget": "6.
|
|
17
|
+
"@oinone/kunlun-vue-admin-layout": "6.3.1",
|
|
18
|
+
"@oinone/kunlun-vue-router": "6.3.1",
|
|
19
|
+
"@oinone/kunlun-vue-ui": "6.3.1",
|
|
20
|
+
"@oinone/kunlun-vue-ui-antd": "6.3.1",
|
|
21
|
+
"@oinone/kunlun-vue-ui-common": "6.3.1",
|
|
22
|
+
"@oinone/kunlun-vue-ui-el": "6.3.1",
|
|
23
|
+
"@oinone/kunlun-vue-widget": "6.3.1",
|
|
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",
|
|
@@ -29,20 +29,20 @@
|
|
|
29
29
|
"smooth-signature": "1.0.15"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@oinone/kunlun-dsl": "~6.
|
|
33
|
-
"@oinone/kunlun-engine": "~6.
|
|
34
|
-
"@oinone/kunlun-environment": "~6.
|
|
35
|
-
"@oinone/kunlun-event": "~6.
|
|
36
|
-
"@oinone/kunlun-expression": "~6.
|
|
37
|
-
"@oinone/kunlun-meta": "~6.
|
|
38
|
-
"@oinone/kunlun-request": "~6.
|
|
39
|
-
"@oinone/kunlun-router": "~6.
|
|
40
|
-
"@oinone/kunlun-service": "~6.
|
|
41
|
-
"@oinone/kunlun-shared": "~6.
|
|
42
|
-
"@oinone/kunlun-spi": "~6.
|
|
43
|
-
"@oinone/kunlun-state": "~6.
|
|
44
|
-
"@oinone/kunlun-theme": "~6.
|
|
45
|
-
"@oinone/kunlun-vue-expression": "~6.
|
|
32
|
+
"@oinone/kunlun-dsl": "~6.3.0",
|
|
33
|
+
"@oinone/kunlun-engine": "~6.3.0",
|
|
34
|
+
"@oinone/kunlun-environment": "~6.3.0",
|
|
35
|
+
"@oinone/kunlun-event": "~6.3.0",
|
|
36
|
+
"@oinone/kunlun-expression": "~6.3.0",
|
|
37
|
+
"@oinone/kunlun-meta": "~6.3.0",
|
|
38
|
+
"@oinone/kunlun-request": "~6.3.0",
|
|
39
|
+
"@oinone/kunlun-router": "~6.3.0",
|
|
40
|
+
"@oinone/kunlun-service": "~6.3.0",
|
|
41
|
+
"@oinone/kunlun-shared": "~6.3.0",
|
|
42
|
+
"@oinone/kunlun-spi": "~6.3.0",
|
|
43
|
+
"@oinone/kunlun-state": "~6.3.0",
|
|
44
|
+
"@oinone/kunlun-theme": "~6.3.0",
|
|
45
|
+
"@oinone/kunlun-vue-expression": "~6.3.0",
|
|
46
46
|
"@types/crypto-js": "4.1.1",
|
|
47
47
|
"@types/file-saver": "2.0.7",
|
|
48
48
|
"@types/lodash": "4.14.182",
|
|
@@ -14,7 +14,8 @@ import {
|
|
|
14
14
|
RuntimeO2MField,
|
|
15
15
|
SubmitCacheManager,
|
|
16
16
|
SubmitValue,
|
|
17
|
-
translateValueByKey
|
|
17
|
+
translateValueByKey,
|
|
18
|
+
RelationUpdateType
|
|
18
19
|
} from '@oinone/kunlun-engine';
|
|
19
20
|
import { Expression, ExpressionRunParam } from '@oinone/kunlun-expression';
|
|
20
21
|
import { MessageHub } from '@oinone/kunlun-request';
|
|
@@ -340,13 +341,15 @@ export class BaseTableWidget<
|
|
|
340
341
|
return false;
|
|
341
342
|
}
|
|
342
343
|
const data = await this.rowEditorClosedForSubmit(context);
|
|
344
|
+
const useDiffUpdate = [RelationUpdateType.diff, RelationUpdateType.batch].includes(this.relationUpdateType)
|
|
343
345
|
if (this.inline) {
|
|
344
346
|
if (res && data) {
|
|
345
|
-
if (this.createMode) {
|
|
347
|
+
if (this.createMode && useDiffUpdate) {
|
|
346
348
|
this.createSubviewFieldWidget(context, data);
|
|
347
349
|
} else {
|
|
348
350
|
this.updateSubviewFieldWidget(context, data);
|
|
349
351
|
}
|
|
352
|
+
|
|
350
353
|
}
|
|
351
354
|
} else if (data) {
|
|
352
355
|
try {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { http } from '@oinone/kunlun-service';
|
|
2
|
+
import { SYSTEM_MODULE_NAME } from '@oinone/kunlun-meta';
|
|
2
3
|
|
|
3
4
|
export async function queryWorkScope() {
|
|
4
5
|
const body = `
|
|
@@ -11,7 +12,7 @@ export async function queryWorkScope() {
|
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
`;
|
|
14
|
-
const result = await http.mutate(
|
|
15
|
+
const result = await http.mutate(SYSTEM_MODULE_NAME.EIP, body);
|
|
15
16
|
return result.data.eipConnGroupQuery.queryListByWrapper as unknown as any[];
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -25,6 +26,7 @@ export async function queryOpenInterface() {
|
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
}`;
|
|
28
|
-
const result = await http.mutate(
|
|
29
|
+
const result = await http.mutate(SYSTEM_MODULE_NAME.EIP, body);
|
|
29
30
|
return result.data.eipOpenInterfaceQuery.queryListByWrapper as unknown as any[];
|
|
30
31
|
}
|
|
32
|
+
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
</div>
|
|
15
15
|
</template>
|
|
16
16
|
<script lang="ts">
|
|
17
|
-
import { computed, onBeforeUnmount, PropType, ref, shallowRef, watch
|
|
17
|
+
import { computed, defineComponent, nextTick, onBeforeUnmount, onMounted, PropType, ref, shallowRef, watch } from 'vue';
|
|
18
18
|
import { ZH_CN_CODE } from '@oinone/kunlun-vue-ui-common';
|
|
19
19
|
import { translateValueByKey } from '@oinone/kunlun-engine';
|
|
20
20
|
import { Editor, Toolbar } from '@wangeditor/editor-for-vue';
|
|
21
|
-
import {
|
|
21
|
+
import { i18nChangeLanguage } from '@wangeditor/editor';
|
|
22
22
|
import {
|
|
23
|
-
IVariableContextItem,
|
|
24
|
-
ExpressionElementClass,
|
|
25
|
-
OioWangEditExpressionModalMenuConf,
|
|
26
23
|
EXPRESSION_MODAL_CLASS_NAME,
|
|
27
|
-
EXPRESSION_MODAL_PANEL_CLASS_NAME
|
|
24
|
+
EXPRESSION_MODAL_PANEL_CLASS_NAME,
|
|
25
|
+
ExpressionElementClass,
|
|
26
|
+
IVariableContextItem,
|
|
27
|
+
OioWangEditExpressionModalMenuConf
|
|
28
28
|
} from '@oinone/kunlun-vue-expression';
|
|
29
29
|
import '@wangeditor/editor/dist/css/style.css';
|
|
30
30
|
import { CSSStyle, uniqueKeyGenerator } from '@oinone/kunlun-shared';
|
|
@@ -47,6 +47,9 @@ export default defineComponent({
|
|
|
47
47
|
richTextToolbarExcludeKeys: {
|
|
48
48
|
type: Array as PropType<string[]>,
|
|
49
49
|
default: () => []
|
|
50
|
+
},
|
|
51
|
+
readonly: {
|
|
52
|
+
type: Boolean
|
|
50
53
|
}
|
|
51
54
|
},
|
|
52
55
|
setup(props) {
|
|
@@ -75,7 +78,7 @@ export default defineComponent({
|
|
|
75
78
|
const editorConfig = computed(() => {
|
|
76
79
|
return {
|
|
77
80
|
placeholder: `${translateValueByKey('请输入内容')}...`,
|
|
78
|
-
EXTEND_CONF: { contextItems: props.contextItems }
|
|
81
|
+
EXTEND_CONF: { contextItems: props.contextItems },
|
|
79
82
|
};
|
|
80
83
|
});
|
|
81
84
|
|
|
@@ -142,6 +145,13 @@ export default defineComponent({
|
|
|
142
145
|
});
|
|
143
146
|
};
|
|
144
147
|
|
|
148
|
+
onMounted(async () => {
|
|
149
|
+
await nextTick();
|
|
150
|
+
if (props.readonly) {
|
|
151
|
+
editorRef.value.disable();
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
|
|
145
155
|
// 组件销毁时,也及时销毁编辑器
|
|
146
156
|
onBeforeUnmount(() => {
|
|
147
157
|
editorRef.value.destroy?.();
|
|
@@ -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
|
);
|
|
@@ -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
|
}
|