@oinone/kunlun-vue-admin-base 6.2.11 → 6.3.0

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.
Files changed (34) hide show
  1. package/dist/oinone-kunlun-vue-admin-base.css +1 -1
  2. package/dist/oinone-kunlun-vue-admin-base.esm.js +1163 -1090
  3. package/dist/oinone-kunlun-vue-admin-base.scss +1 -1
  4. package/dist/types/src/basic/form-item/DefaultFormItem.vue.d.ts +7 -6
  5. package/dist/types/src/container/collapse/DefaultCollapse.vue.d.ts +6 -0
  6. package/dist/types/src/container/collapse/DefaultCollapseWidget.d.ts +5 -1
  7. package/dist/types/src/field/form/float/Plat.vue.d.ts +2 -2
  8. package/dist/types/src/field/form/html/expressionRichtext/ExpressionRichText.vue.d.ts +7 -0
  9. package/dist/types/src/permission/permission/field/ActionPermissionWidget.d.ts +1 -1
  10. package/dist/types/src/spi/LayoutManager.d.ts +20 -17
  11. package/dist/types/src/spi/MaskManager.d.ts +33 -5
  12. package/dist/types/src/tags/context/runtime-context-helper.d.ts +1 -0
  13. package/dist/types/src/typing/tree.d.ts +5 -0
  14. package/dist/types/src/view/tree/AbstractTreeElementWidget.d.ts +2 -0
  15. package/dist/types/src/view/tree/DefaultTree.vue.d.ts +15 -3
  16. package/package.json +22 -22
  17. package/src/basic/element/BaseElementViewWidget.ts +11 -2
  18. package/src/basic/form-item/DefaultFormItem.vue +1 -1
  19. package/src/basic/table/BaseTableWidget.ts +5 -2
  20. package/src/container/collapse/DefaultCollapse.vue +7 -3
  21. package/src/container/collapse/DefaultCollapseWidget.ts +19 -1
  22. package/src/field/eip/form/work-scope/service.ts +4 -2
  23. package/src/field/form/html/expressionRichtext/ExpressionRichText.vue +17 -7
  24. package/src/main-view/DefaultMetadataMainViewWidget.ts +7 -24
  25. package/src/permission/permission/field/ActionPermissionWidget.ts +3 -1
  26. package/src/spi/LayoutManager.ts +20 -17
  27. package/src/spi/MaskManager.ts +36 -6
  28. package/src/tags/context/runtime-context-helper.ts +11 -9
  29. package/src/typing/tree.ts +6 -0
  30. package/src/util/tree-utils.ts +24 -17
  31. package/src/view/tree/AbstractTreeElementWidget.ts +15 -1
  32. package/src/view/tree/DefaultTree.vue +19 -18
  33. package/src/view/tree/TreeWidget.ts +9 -2
  34. package/src/view/tree/style/index.scss +0 -2
@@ -1,3 +1,4 @@
1
+ import { PropType } from 'vue';
1
2
  declare const _default: import("vue").DefineComponent<{
2
3
  itemName: {
3
4
  type: StringConstructor;
@@ -17,7 +18,7 @@ declare const _default: import("vue").DefineComponent<{
17
18
  default: boolean;
18
19
  };
19
20
  layout: {
20
- type: import("vue").PropType<import("@oinone/kunlun-vue-ui-antd").FormLayout>;
21
+ type: PropType<import("@oinone/kunlun-vue-ui-antd").FormLayout>;
21
22
  };
22
23
  label: {
23
24
  type: (BooleanConstructor | StringConstructor)[];
@@ -34,10 +35,10 @@ declare const _default: import("vue").DefineComponent<{
34
35
  default: undefined;
35
36
  };
36
37
  validateTrigger: {
37
- type: import("vue").PropType<string | string[]>;
38
+ type: PropType<string | string[]>;
38
39
  };
39
40
  validatorInfo: {
40
- type: import("vue").PropType<import("../../typing").ValidatorInfo>;
41
+ type: PropType<import("../../typing").ValidatorInfo>;
41
42
  };
42
43
  }, {
43
44
  required: import("vue").ComputedRef<boolean>;
@@ -60,7 +61,7 @@ declare const _default: import("vue").DefineComponent<{
60
61
  default: boolean;
61
62
  };
62
63
  layout: {
63
- type: import("vue").PropType<import("@oinone/kunlun-vue-ui-antd").FormLayout>;
64
+ type: PropType<import("@oinone/kunlun-vue-ui-antd").FormLayout>;
64
65
  };
65
66
  label: {
66
67
  type: (BooleanConstructor | StringConstructor)[];
@@ -77,10 +78,10 @@ declare const _default: import("vue").DefineComponent<{
77
78
  default: undefined;
78
79
  };
79
80
  validateTrigger: {
80
- type: import("vue").PropType<string | string[]>;
81
+ type: PropType<string | string[]>;
81
82
  };
82
83
  validatorInfo: {
83
- type: import("vue").PropType<import("../../typing").ValidatorInfo>;
84
+ type: PropType<import("../../typing").ValidatorInfo>;
84
85
  };
85
86
  }>>, {
86
87
  required: boolean;
@@ -11,6 +11,9 @@ declare const _default: import("vue").DefineComponent<{
11
11
  onActiveKeyChange: {
12
12
  type: PropType<(key: string | string[]) => void>;
13
13
  };
14
+ setAllKeys: {
15
+ type: PropType<(keys: string[]) => void>;
16
+ };
14
17
  type: {
15
18
  type: PropType<OioCollapseType | "bordered" | "stripe" | "simple" | "ghost">;
16
19
  default: OioCollapseType;
@@ -59,6 +62,9 @@ declare const _default: import("vue").DefineComponent<{
59
62
  onActiveKeyChange: {
60
63
  type: PropType<(key: string | string[]) => void>;
61
64
  };
65
+ setAllKeys: {
66
+ type: PropType<(keys: string[]) => void>;
67
+ };
62
68
  type: {
63
69
  type: PropType<OioCollapseType | "bordered" | "stripe" | "simple" | "ghost">;
64
70
  default: OioCollapseType;
@@ -2,7 +2,9 @@ import { BasePackWidget } from '../../basic';
2
2
  export declare class DefaultCollapseWidget extends BasePackWidget {
3
3
  protected defaultAllInvisible: boolean;
4
4
  initialize(props: any): this;
5
- private activeKey;
5
+ protected allKeys: string[] | undefined;
6
+ setAllKeys(keys: string[]): void;
7
+ protected activeKey: string | string[] | undefined;
6
8
  getActiveKey(): string | string[] | undefined;
7
9
  setActiveKey(key: string | string[] | undefined): void;
8
10
  onActiveKeyChange(key: string | string[]): void;
@@ -12,4 +14,6 @@ export declare class DefaultCollapseWidget extends BasePackWidget {
12
14
  protected get collapseMethod(): string;
13
15
  get accordion(): boolean | undefined;
14
16
  protected get expandIconPosition(): any;
17
+ onExpandAll(): void;
18
+ onCollapseAll(): void;
15
19
  }
@@ -47,7 +47,7 @@ declare const _default: import("vue").DefineComponent<{
47
47
  default: boolean;
48
48
  };
49
49
  layout: {
50
- type: PropType<import("@oinone/kunlun-vue-ui-common").FormLayout>;
50
+ type: PropType<import("@oinone/kunlun-vue-ui-antd").FormLayout>;
51
51
  };
52
52
  label: {
53
53
  type: (BooleanConstructor | StringConstructor)[];
@@ -141,7 +141,7 @@ declare const _default: import("vue").DefineComponent<{
141
141
  default: boolean;
142
142
  };
143
143
  layout: {
144
- type: PropType<import("@oinone/kunlun-vue-ui-common").FormLayout>;
144
+ type: PropType<import("@oinone/kunlun-vue-ui-antd").FormLayout>;
145
145
  };
146
146
  label: {
147
147
  type: (BooleanConstructor | StringConstructor)[];
@@ -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;
@@ -33,7 +33,7 @@ interface Menu {
33
33
  module: string;
34
34
  }
35
35
  export declare class ActionPermissionWidget extends FormFieldWidget<unknown, RuntimeO2MField> {
36
- private class;
36
+ get class(): string;
37
37
  initialize(props: any): this;
38
38
  /**
39
39
  * 挂载时
@@ -8,31 +8,31 @@ export interface LayoutRegisterOptions extends SPIOptions {
8
8
  /**
9
9
  * 视图类型
10
10
  */
11
- viewType: ViewType;
11
+ viewType: ViewType | ViewType[];
12
12
  /**
13
- * 视图模型所在模块编码,一般是驼峰风格的英文 designerCommon
13
+ * 视图模型所在模块编码,一般是下划线风格的英文 designer_common
14
14
  */
15
- module?: string;
15
+ module?: string | string[];
16
16
  /**
17
- * 视图模型所在模块名称,一般是下划线风格的英文 designer_common
17
+ * 视图模型所在模块名称,一般是驼峰风格的英文 designerCommon
18
18
  */
19
- moduleName?: string;
19
+ moduleName?: string | string[];
20
20
  /**
21
- * 布局名称,对应viewActionQuery.load.resView.baseLayoutName
21
+ * 布局名称,对应 viewActionQuery.load.resView.baseLayoutName
22
22
  */
23
- layoutName?: string;
23
+ layoutName?: string | string[];
24
24
  /**
25
25
  * 视图的模型编码
26
26
  */
27
- model?: string;
27
+ model?: string | string[];
28
28
  /**
29
29
  * 视图的模型名称
30
30
  */
31
- modelName?: string;
31
+ modelName?: string | string[];
32
32
  /**
33
33
  * 视图的名称
34
34
  */
35
- viewName?: string;
35
+ viewName?: string | string[];
36
36
  /**
37
37
  * 是否为内嵌视图(子视图特有),表单页内有个o2m的子表格,该表格的inline为true
38
38
  */
@@ -40,23 +40,23 @@ export interface LayoutRegisterOptions extends SPIOptions {
40
40
  /**
41
41
  * 模型字段类型(子视图特有)
42
42
  */
43
- ttype?: ModelFieldType;
43
+ ttype?: ModelFieldType | ModelFieldType[];
44
44
  /**
45
45
  * 关联模型字段类型(子视图特有)
46
46
  */
47
- relatedTtype?: ModelFieldType;
47
+ relatedTtype?: ModelFieldType | ModelFieldType[];
48
48
  /**
49
49
  * 字段(子视图特有)
50
50
  */
51
- field?: string;
51
+ field?: string | string[];
52
52
  /**
53
53
  * 动作名称
54
54
  */
55
- actionName?: string;
55
+ actionName?: string | string[];
56
56
  /**
57
57
  * 动作使用的组件名称
58
58
  */
59
- actionWidget?: string;
59
+ actionWidget?: string | string[];
60
60
  }
61
61
  export declare class LayoutManager {
62
62
  private static Token;
@@ -64,6 +64,9 @@ export declare class LayoutManager {
64
64
  static register(options: LayoutRegisterOptions, template: string): boolean;
65
65
  static selector(options: LayoutRegisterOptions): DslDefinition | undefined;
66
66
  }
67
+ /**
68
+ * @deprecated please use {@link LayoutRegisterOptions}
69
+ */
67
70
  export declare type ILayoutOption = LayoutRegisterOptions;
68
- export declare function registerLayout(layoutTpl: string, layoutOption: ILayoutOption): boolean;
69
- export declare function generatorLayout(layoutOption: ILayoutOption): DslDefinition | undefined;
71
+ export declare function registerLayout(layoutTpl: string, layoutOption: LayoutRegisterOptions): boolean;
72
+ export declare function generatorLayout(layoutOption: LayoutRegisterOptions): DslDefinition | undefined;
@@ -1,8 +1,33 @@
1
+ import { ViewType } from '@oinone/kunlun-meta';
1
2
  import { SPIOptions } from '@oinone/kunlun-spi';
2
3
  export interface MaskRegisterOptions extends SPIOptions {
3
- module?: string;
4
- moduleName?: string;
5
- model?: string;
4
+ /**
5
+ * 视图类型
6
+ */
7
+ viewType?: ViewType | ViewType[];
8
+ /**
9
+ * 模块编码
10
+ */
11
+ module?: string | string[];
12
+ /**
13
+ * 模块名称
14
+ */
15
+ moduleName?: string | string[];
16
+ /**
17
+ * 模型编码
18
+ */
19
+ model?: string | string[];
20
+ /**
21
+ * 模型名称
22
+ */
23
+ modelName?: string | string[];
24
+ /**
25
+ * 视图名称
26
+ */
27
+ viewName?: string | string[];
28
+ /**
29
+ * 动作名称
30
+ */
6
31
  actionName?: string | string[];
7
32
  }
8
33
  export declare class MaskManager {
@@ -11,6 +36,9 @@ export declare class MaskManager {
11
36
  static register(options: MaskRegisterOptions, template: string): boolean;
12
37
  static selector(options: MaskRegisterOptions): string | undefined;
13
38
  }
39
+ /**
40
+ * @deprecated please use {@link MaskRegisterOptions}
41
+ */
14
42
  export declare type IMaskOption = MaskRegisterOptions;
15
- export declare function registerMask(maskTpl: string, maskOption?: IMaskOption): boolean;
16
- export declare function generatorMask(maskOption?: IMaskOption): string | undefined;
43
+ export declare function registerMask(maskTpl: string, maskOption?: MaskRegisterOptions): boolean;
44
+ export declare function generatorMask(maskOption?: MaskRegisterOptions): string | undefined;
@@ -1,5 +1,6 @@
1
1
  import { DslDefinition } from '@oinone/kunlun-dsl';
2
2
  import { RuntimeContext, RuntimeContextService, RuntimeModelField, RuntimeView, RuntimeViewAction } from '@oinone/kunlun-engine';
3
+ export declare function seekViewMask(viewAction: RuntimeViewAction, moduleName?: string): DslDefinition;
3
4
  export declare function createRuntimeContextByViewAction(viewAction: RuntimeViewAction, inline: boolean, nodeHandle?: string, rootHandle?: string): RuntimeContext | undefined;
4
5
  export declare function createRuntimeContextByView(view: RuntimeView, inline: boolean, nodeHandle?: string, rootHandle?: string): RuntimeContext;
5
6
  export declare function createRuntimeContextByFieldSubview(view: RuntimeView, field: RuntimeModelField, inline: boolean, nodeHandle?: string, rootHandle?: string): RuntimeContext;
@@ -1,3 +1,4 @@
1
+ import { DslDefinition } from '@oinone/kunlun-dsl';
1
2
  import { ActiveRecord, Pagination, RefreshCallChainingParameters } from '@oinone/kunlun-engine';
2
3
  import { TreeNode } from '@oinone/kunlun-shared';
3
4
  import { Slot } from 'vue';
@@ -61,6 +62,10 @@ export interface TreeNodeMetadata {
61
62
  * 行内按钮插槽
62
63
  */
63
64
  rowActionsSlot?: Slot;
65
+ /**
66
+ * 当配置了 nodes 节点时,根元数据节点具有该属性
67
+ */
68
+ nodes?: DslDefinition;
64
69
  /**
65
70
  * 图标 iconfont/https
66
71
  */
@@ -26,6 +26,8 @@ export declare abstract class AbstractTreeElementWidget<V extends TreeData = Tre
26
26
  get checkAll(): boolean | undefined;
27
27
  get checkAllLabel(): any;
28
28
  get searchRemote(): any;
29
+ get viewModel(): string | undefined;
30
+ get width(): string | undefined;
29
31
  initialize(props: any): this;
30
32
  protected runtimeInitialed(): void;
31
33
  protected generatorRootNode(metadata: TreeNodeMetadata): OioTreeNode<V>;
@@ -3,13 +3,19 @@ import { ViewType } from '@oinone/kunlun-meta';
3
3
  import { OioTreeNode } from '@oinone/kunlun-vue-ui-antd';
4
4
  import { PropType } from 'vue';
5
5
  import { TreeData } from '../../typing';
6
- declare const _default: import("vue").DefineComponent<{
6
+ declare const __default__: import("vue").DefineComponent<{
7
7
  viewType: {
8
8
  type: PropType<ViewType>;
9
9
  };
10
+ viewModel: {
11
+ type: StringConstructor;
12
+ };
10
13
  template: {
11
14
  type: PropType<DslDefinition>;
12
15
  };
16
+ width: {
17
+ type: StringConstructor;
18
+ };
13
19
  autoExpandParent: {
14
20
  type: BooleanConstructor;
15
21
  };
@@ -139,7 +145,7 @@ declare const _default: import("vue").DefineComponent<{
139
145
  };
140
146
  }, {
141
147
  treeData: import("vue").ComputedRef<OioTreeNode<TreeData>[]>;
142
- isSameModel: import("vue").ComputedRef<boolean>;
148
+ width: import("vue").ComputedRef<string>;
143
149
  internalExpandedKeys: import("vue").Ref<string[]>;
144
150
  selectedKeys: import("vue").WritableComputedRef<string[]>;
145
151
  expandedKeys: import("vue").WritableComputedRef<string[]>;
@@ -161,9 +167,15 @@ declare const _default: import("vue").DefineComponent<{
161
167
  viewType: {
162
168
  type: PropType<ViewType>;
163
169
  };
170
+ viewModel: {
171
+ type: StringConstructor;
172
+ };
164
173
  template: {
165
174
  type: PropType<DslDefinition>;
166
175
  };
176
+ width: {
177
+ type: StringConstructor;
178
+ };
167
179
  autoExpandParent: {
168
180
  type: BooleanConstructor;
169
181
  };
@@ -309,4 +321,4 @@ declare const _default: import("vue").DefineComponent<{
309
321
  enableSearch: boolean;
310
322
  searchPlaceHolder: string;
311
323
  }>;
312
- export default _default;
324
+ export default __default__;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oinone/kunlun-vue-admin-base",
3
- "version": "6.2.11",
3
+ "version": "6.3.0",
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.11",
18
- "@oinone/kunlun-vue-router": "6.2.11",
19
- "@oinone/kunlun-vue-ui": "6.2.11",
20
- "@oinone/kunlun-vue-ui-antd": "6.2.11",
21
- "@oinone/kunlun-vue-ui-common": "6.2.11",
22
- "@oinone/kunlun-vue-ui-el": "6.2.11",
23
- "@oinone/kunlun-vue-widget": "6.2.11",
17
+ "@oinone/kunlun-vue-admin-layout": "6.3.0",
18
+ "@oinone/kunlun-vue-router": "6.3.0",
19
+ "@oinone/kunlun-vue-ui": "6.3.0",
20
+ "@oinone/kunlun-vue-ui-antd": "6.3.0",
21
+ "@oinone/kunlun-vue-ui-common": "6.3.0",
22
+ "@oinone/kunlun-vue-ui-el": "6.3.0",
23
+ "@oinone/kunlun-vue-widget": "6.3.0",
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.2.0",
33
- "@oinone/kunlun-engine": "~6.2.0",
34
- "@oinone/kunlun-environment": "~6.2.0",
35
- "@oinone/kunlun-event": "~6.2.0",
36
- "@oinone/kunlun-expression": "~6.2.0",
37
- "@oinone/kunlun-meta": "~6.2.0",
38
- "@oinone/kunlun-request": "~6.2.0",
39
- "@oinone/kunlun-router": "~6.2.0",
40
- "@oinone/kunlun-service": "~6.2.0",
41
- "@oinone/kunlun-shared": "~6.2.0",
42
- "@oinone/kunlun-spi": "~6.2.0",
43
- "@oinone/kunlun-state": "~6.2.0",
44
- "@oinone/kunlun-theme": "~6.2.0",
45
- "@oinone/kunlun-vue-expression": "~6.2.0",
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",
@@ -1,4 +1,11 @@
1
- import { parseConfigs, RelationUpdateType, ROOT_HANDLE, SubmitType, SubmitValue } from '@oinone/kunlun-engine';
1
+ import {
2
+ ExperimentalConfigManager,
3
+ parseConfigs,
4
+ RelationUpdateType,
5
+ ROOT_HANDLE,
6
+ SubmitType,
7
+ SubmitValue
8
+ } from '@oinone/kunlun-engine';
2
9
  import { LifeCycleHeart, LifeCycleTypes } from '@oinone/kunlun-event';
3
10
  import { ViewMode } from '@oinone/kunlun-meta';
4
11
  import { Router } from '@oinone/kunlun-router';
@@ -228,7 +235,9 @@ export abstract class BaseElementViewWidget<
228
235
  mainViewFilter
229
236
  );
230
237
  this.setViewFilter?.(internalFilter);
231
- this.internalDomain = RSQLHelper.concatByAnd(this.viewAction?.domain, this.getDsl().domain as string | undefined);
238
+ if (!ExperimentalConfigManager.baseElementViewWidgetNext()) {
239
+ this.internalDomain = RSQLHelper.concatByAnd(this.viewAction?.domain, this.getDsl().domain as string | undefined);
240
+ }
232
241
  }
233
242
 
234
243
  protected refreshConditionContext(): Record<string, unknown> | undefined {
@@ -4,7 +4,7 @@ import { translateValueByKey } from '@oinone/kunlun-engine';
4
4
  import { BooleanHelper } from '@oinone/kunlun-shared';
5
5
  import { OioFormItem, PropRecordHelper } from '@oinone/kunlun-vue-ui-antd';
6
6
  import { Tooltip as ATooltip } from 'ant-design-vue';
7
- import { computed, createVNode, defineComponent, Slot, VNode, vShow, withDirectives } from 'vue';
7
+ import { computed, createVNode, defineComponent, PropType, Slot, VNode, vShow, withDirectives } from 'vue';
8
8
  import { ValidatorStatus } from '../../typing';
9
9
  import { BaseFormItemProps } from './props';
10
10
 
@@ -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 {
@@ -29,6 +29,9 @@ export default defineComponent({
29
29
  onActiveKeyChange: {
30
30
  type: Function as PropType<(key: string | string[]) => void>
31
31
  },
32
+ setAllKeys: {
33
+ type: Function as PropType<(keys: string[]) => void>
34
+ },
32
35
  type: {
33
36
  type: String as PropType<OioCollapseType | keyof typeof OioCollapseType>,
34
37
  default: OioCollapseType.bordered
@@ -58,9 +61,10 @@ export default defineComponent({
58
61
  };
59
62
 
60
63
  onMounted(() => {
61
- if (props.expandAll && !props.accordion) {
62
- const panelKeys = origin.value?.getPanelKeys();
63
- if (panelKeys) {
64
+ const panelKeys = origin.value?.getPanelKeys();
65
+ if (panelKeys) {
66
+ props.setAllKeys?.(panelKeys);
67
+ if (props.expandAll && !props.accordion) {
64
68
  onUpdateActiveKey(panelKeys);
65
69
  }
66
70
  }
@@ -17,7 +17,15 @@ export class DefaultCollapseWidget extends BasePackWidget {
17
17
  }
18
18
 
19
19
  @Widget.Reactive()
20
- private activeKey: string | string[] | undefined;
20
+ protected allKeys: string[] | undefined;
21
+
22
+ @Widget.Method()
23
+ public setAllKeys(keys: string[]) {
24
+ this.allKeys = keys;
25
+ }
26
+
27
+ @Widget.Reactive()
28
+ protected activeKey: string | string[] | undefined;
21
29
 
22
30
  public getActiveKey() {
23
31
  return this.activeKey;
@@ -69,4 +77,14 @@ export class DefaultCollapseWidget extends BasePackWidget {
69
77
  protected get expandIconPosition() {
70
78
  return this.getDsl()?.expandIconPosition?.toLowerCase() || OioCollapseExpandIconPosition.right;
71
79
  }
80
+
81
+ @Widget.Method()
82
+ public onExpandAll() {
83
+ this.setActiveKey(this.allKeys);
84
+ }
85
+
86
+ @Widget.Method()
87
+ public onCollapseAll() {
88
+ this.setActiveKey([]);
89
+ }
72
90
  }
@@ -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('base', body);
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('base', body);
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, defineComponent } from 'vue';
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 { DomEditor, i18nChangeLanguage } from '@wangeditor/editor';
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?.();