From 1919a750aff2017dbcffd2d98c13c68a081096cd Mon Sep 17 00:00:00 2001 From: wang-xh Date: Wed, 27 Nov 2024 14:07:53 +0800 Subject: [PATCH 001/181] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E8=BF=90=E8=A1=8C=E6=97=B6=E6=89=93=E5=BC=80=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=9A=84url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/designer/src/app-providers.ts | 3 +++ packages/designer/src/components/designer.component.tsx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/designer/src/app-providers.ts b/packages/designer/src/app-providers.ts index a36c3d420e1..2ba1a680d80 100644 --- a/packages/designer/src/app-providers.ts +++ b/packages/designer/src/app-providers.ts @@ -8,6 +8,7 @@ import { MetadataPathToken, MetadataServiceToken } from "./components/types"; import { LookupSchemaRepositoryToken } from "@farris/ui-vue/components/lookup/src/property-config/lookup.property-config"; import { FieldSelectorRepositoryToken } from "@farris/ui-vue/components/field-selector"; import { LookupFieldSelectorService, LookupSchemaService } from "./components/composition/schema-repository"; +import { FTooltipDirective } from "@farris/ui-vue/components/tooltip"; export default { install(app: App): void { @@ -24,5 +25,7 @@ export default { app.provide(LookupSchemaRepositoryToken, new LookupSchemaService(metadataService)); app.provide(FieldSelectorRepositoryToken, new LookupFieldSelectorService(metadataService)); + + app.directive('tooltip', FTooltipDirective); } }; diff --git a/packages/designer/src/components/designer.component.tsx b/packages/designer/src/components/designer.component.tsx index 7aa5c6c13ea..168a3758a41 100644 --- a/packages/designer/src/components/designer.component.tsx +++ b/packages/designer/src/components/designer.component.tsx @@ -102,7 +102,7 @@ export default defineComponent({ useFormMetadataComposition.saveFormMetadata().then(() => { const metadataId = useFormSchemaComposition.getFormMetadataBasicInfo()?.id; loadingInstance.value.close(); - window.open(`${window.location.origin}/platform/common/web/renderer/index.html?metadataId=${metadataId}`); + window.open(`${window.location.origin}/platform/common/web/renderer/index.html#/?metadataId=${metadataId}`); }, () => { loadingInstance.value.close(); notifyService.error({ message: '表单保存失败' }); -- Gitee From a4c3187fce9f4f8aa7310c3c9554a32cd3ca2db3 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Thu, 28 Nov 2024 10:30:23 +0800 Subject: [PATCH 002/181] =?UTF-8?q?feature:=20=E6=94=AF=E6=8C=81=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=8E=A7=E4=BB=B6=E5=9C=A8=E5=B1=9E=E6=80=A7=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E4=B8=AD=E5=88=87=E6=8D=A2=E6=8E=A7=E4=BB=B6=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=EF=BC=9B=E6=94=AF=E6=8C=81=E6=8E=A7=E4=BB=B6=E7=9A=84?= =?UTF-8?q?=E4=B8=AD=E6=96=87=E5=B1=95=E7=A4=BA=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../composition/control-creator.service.ts | 95 ++++---- .../avatar/src/designer/use-rules.ts | 10 +- .../checkbox/src/designer/use-rules.ts | 10 +- .../checkbox/src/schema/checkbox.schema.json | 2 +- .../combo-list/src/designer/use-rules.ts | 6 +- .../components/data-view/composition/types.ts | 2 +- .../data-view/composition/use-selection.ts | 1 + .../date-picker/src/designer/use-rules.ts | 10 +- .../src/composition/dg-control.ts | 190 ++------------- .../components/designer-canvas/src/types.ts | 2 +- .../designer-outline/src/composition/types.ts | 4 + .../src/composition/use-outline-node.ts | 40 ++-- .../src/designer-outline.component.tsx | 16 +- .../designer/form-group.design.component.tsx | 2 +- .../src/designer/use-input-group-rules.ts | 8 +- .../src/designer/lookup.design.component.tsx | 6 +- .../property-config/lookup.property-config.ts | 39 +-- .../src/designer/use-design-rules.ts | 8 +- .../src/composition/use-design-rules.ts | 8 +- .../page-header.property-config.ts | 2 +- .../src/composition/entity/base-property.ts | 141 +---------- .../composition/entity/input-base-property.ts | 222 +++++++++++++++--- .../composition/entity/schema-dom-mapping.ts | 9 - .../src/designer/use-design-rules.ts | 8 +- .../switch/src/designer/use-design-rules.ts | 8 +- .../textarea/src/designer/use-design-rules.ts | 8 +- .../src/designer/use-design-rules.ts | 8 +- .../tree-view/src/tree-view.component.tsx | 6 +- 28 files changed, 388 insertions(+), 483 deletions(-) diff --git a/packages/designer/src/components/composition/control-creator.service.ts b/packages/designer/src/components/composition/control-creator.service.ts index 929ad7d99e7..0294c8cabdf 100644 --- a/packages/designer/src/components/composition/control-creator.service.ts +++ b/packages/designer/src/components/composition/control-creator.service.ts @@ -2,75 +2,73 @@ import { getSchemaByType } from "@farris/ui-vue/components/dynamic-resolver/src/ import { FormBindingType, FormSchemaEntityField, FormSchemaEntityFieldTypeName, UseControlCreator } from "../types"; import { FormMetadataConverter } from "./form-metadata-converter"; -export function useControlCreator():UseControlCreator { - /** - * 配置输入控件属性 - * @param position form或者grid - * @param field schema字段 - * @param metadata 输入控件元数据 - * @param controlClass 输入控件样式 - * @returns - */ - function setFormFieldProperty(position:string,field: FormSchemaEntityField, metadata: any,inputType='input-group',controlClass = 'col-12 col-md-6 col-xl-3 col-el-2'): any { - if(!metadata){ - metadata=getSchemaByType(inputType,{}); - } - metadata.id = field.id.length > 8 ? field.id.slice(0, 8) : field.id; - metadata.id = field.bindingField + '_' + metadata.id.replace(/-/g, '_') + '_' + Math.random().toString(36).substr(2, 4); - metadata.label = field.name; - metadata.appearance = { class: controlClass || '' }; - metadata.binding = { +export function useControlCreator(): UseControlCreator { + /** + * 配置输入控件属性 + * @param position form或者grid + * @param field schema字段 + * @param metadata 输入控件元数据 + * @param controlClass 输入控件样式 + * @returns + */ + function setFormFieldProperty(field: FormSchemaEntityField, editorType = 'input-group', controlClass = 'col-12 col-md-6 col-xl-3 col-el-2'): any { + + const formGroupMetadata = getSchemaByType('form-group') || {}; + formGroupMetadata.id = field.id.length > 8 ? field.id.slice(0, 8) : field.id; + formGroupMetadata.id = field.bindingField + '_' + formGroupMetadata.id.replace(/-/g, '_') + '_' + Math.random().toString(36).substr(2, 4); + formGroupMetadata.label = field.name; + formGroupMetadata.appearance = { class: controlClass || '' }; + formGroupMetadata.binding = { type: FormBindingType.Form, path: field.bindingField, field: field.id, fullPath: field.path }; - metadata.path = field.bindingPath; - let propertyParent=metadata; - if(position=='Form'){ - metadata.editor=metadata.editor||{}; - propertyParent=metadata.editor; - } - if(!propertyParent){ - propertyParent={}; - } - //. 层级后期调整 - propertyParent.required = field.require; + formGroupMetadata.path = field.bindingPath; + + + const formEditor = getSchemaByType(editorType) || {}; + delete formEditor.id; + delete formEditor.binding; + delete formEditor.appearance; + + formGroupMetadata.editor = formEditor; + formEditor.required = field.require; // 只读属性:若字段本身为只读,则取字段属性;若非只读,则设置为状态机 - propertyParent.readonly = field.readonly ? true : "!viewModel.stateMachine['editable']"; + formEditor.readonly = field.readonly ? true : "!viewModel.stateMachine['editable']"; const fieldTypeInSchema = field.type && field.type.$type; if (!fieldTypeInSchema) { return; } // 枚举类型 if (fieldTypeInSchema === 'EnumType') { - propertyParent.data = field.type.enumValues; - propertyParent.idField = 'value'; - propertyParent.textField = 'name'; + formEditor.data = field.type.enumValues; + formEditor.idField = 'value'; + formEditor.textField = 'name'; } // 数字类型 if (fieldTypeInSchema === 'NumericType') { - propertyParent.precision = field.type.precision; + formEditor.precision = field.type.precision; } // 数字、字符串、备注 :设置最大长度 if (['NumericType', 'StringType', 'TextType'].includes(fieldTypeInSchema)) { - propertyParent.maxLength = field.type.length; + formEditor.maxLength = field.type.length; } // 日期类型 if (fieldTypeInSchema === 'DateType' || fieldTypeInSchema === 'DateTimeType') { - propertyParent.fieldType = field.type.name; + formEditor.fieldType = field.type.name; // 日期时间类型字段:启用时间选择属性 - if (metadata.fieldType === 'DateTime') { - propertyParent.displayTime = true; - propertyParent.displayFormat = 'yyyy-MM-dd HH:mm:ss'; - propertyParent.valueFormat = 'yyyy-MM-dd HH:mm:ss'; + if (fieldTypeInSchema === 'DateTimeType') { + formEditor.displayTime = true; + formEditor.displayFormat = 'yyyy-MM-dd HH:mm:ss'; + formEditor.valueFormat = 'yyyy-MM-dd HH:mm:ss'; } } - return metadata; + return formGroupMetadata; } @@ -80,10 +78,10 @@ export function useControlCreator():UseControlCreator { * @param metadata 列元数据 * @param neddInlineEditor 是否需要列编辑器 */ - function setGridFieldProperty(field: FormSchemaEntityField, metadata: any, needInlineEditor = false):any { - const metadataConverter=new FormMetadataConverter(); - if(!metadata){ - metadata=getSchemaByType('data-grid-column',{}); + function setGridFieldProperty(field: FormSchemaEntityField, metadata: any, needInlineEditor = false): any { + const metadataConverter = new FormMetadataConverter(); + if (!metadata) { + metadata = getSchemaByType('data-grid-column', {}); } if (!metadata || !field) { return; @@ -133,9 +131,9 @@ export function useControlCreator():UseControlCreator { // 列编辑器 if (needInlineEditor) { // getSchemaByType - const editorMetadata = getSchemaByType(metadataConverter.getRealEditorType(field?.editor?.$type||''),{}); + const editorMetadata = getSchemaByType(metadataConverter.getRealEditorType(field?.editor?.$type || ''), {}); - const fieldEditor = setFormFieldProperty('Grid',field, editorMetadata); + const fieldEditor = setFormFieldProperty('Grid', field, editorMetadata); metadata.editor = fieldEditor; } @@ -164,8 +162,7 @@ export function useControlCreator():UseControlCreator { return ''; } return { - setFormFieldProperty, + setFormFieldProperty, setGridFieldProperty } } - \ No newline at end of file diff --git a/packages/ui-vue/components/avatar/src/designer/use-rules.ts b/packages/ui-vue/components/avatar/src/designer/use-rules.ts index 496b9703d51..fc315b056bf 100644 --- a/packages/ui-vue/components/avatar/src/designer/use-rules.ts +++ b/packages/ui-vue/components/avatar/src/designer/use-rules.ts @@ -1,6 +1,6 @@ /* eslint-disable max-len */ import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; +import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; import { AvatarProperty } from "../property-config/avatar.property-config"; @@ -13,12 +13,12 @@ export function useAvatarDesignerRules(designItemContext: DesignerItemContext, d resolveComponentContext, triggerBelongedComponentToMoveWhenMoved, triggerBelongedComponentToDeleteWhenDeleted } = useInputDesignerRules(designItemContext, designerHostService); - const schema = designItemContext.schema as ComponentSchema; + const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 - function getPropsConfig(componentId: string) { - const inputGroupProps=new AvatarProperty(componentId, designerHostService); - return inputGroupProps.getPropertyConfig(schema); + function getPropsConfig(componentId: string, componentInstance: DesignerComponentInstance) { + const inputGroupProps = new AvatarProperty(componentId, designerHostService); + return inputGroupProps.getPropertyConfig(schema, componentInstance); } return { diff --git a/packages/ui-vue/components/checkbox/src/designer/use-rules.ts b/packages/ui-vue/components/checkbox/src/designer/use-rules.ts index a0f4d9fc9a6..75990da76b8 100644 --- a/packages/ui-vue/components/checkbox/src/designer/use-rules.ts +++ b/packages/ui-vue/components/checkbox/src/designer/use-rules.ts @@ -1,6 +1,6 @@ /* eslint-disable max-len */ import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; +import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; import { CheckGroupProperty } from "../property-config/check-group.property-config"; import { CheckBoxProperty } from "../property-config/checkbox.property-config"; @@ -18,9 +18,9 @@ export function useCheckGroupDesignerRules(designItemContext: DesignerItemContex const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 - function getPropsConfig(componentId: string) { + function getPropsConfig(componentId: string, componentInstance: DesignerComponentInstance) { const inputGroupProps = new CheckGroupProperty(componentId, designerHostService); - return inputGroupProps.getPropertyConfig(schema); + return inputGroupProps.getPropertyConfig(schema, componentInstance); } return { @@ -48,9 +48,9 @@ export function useCheckBoxDesignerRules(designItemContext: DesignerItemContext, const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 - function getPropsConfig(componentId: string) { + function getPropsConfig(componentId: string, componentInstance: DesignerComponentInstance) { const inputGroupProps = new CheckBoxProperty(componentId, designerHostService); - return inputGroupProps.getPropertyConfig(schema); + return inputGroupProps.getPropertyConfig(schema, componentInstance); } return { diff --git a/packages/ui-vue/components/checkbox/src/schema/checkbox.schema.json b/packages/ui-vue/components/checkbox/src/schema/checkbox.schema.json index 812de8baabf..1812f021c6a 100644 --- a/packages/ui-vue/components/checkbox/src/schema/checkbox.schema.json +++ b/packages/ui-vue/components/checkbox/src/schema/checkbox.schema.json @@ -12,7 +12,7 @@ "type": { "description": "The type string of check box component", "type": "string", - "default": "checkbox" + "default": "check-box" }, "appearance": { "description": "", diff --git a/packages/ui-vue/components/combo-list/src/designer/use-rules.ts b/packages/ui-vue/components/combo-list/src/designer/use-rules.ts index be18a65e027..16d6205c3a4 100644 --- a/packages/ui-vue/components/combo-list/src/designer/use-rules.ts +++ b/packages/ui-vue/components/combo-list/src/designer/use-rules.ts @@ -1,6 +1,6 @@ /* eslint-disable max-len */ import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; +import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; import { ComboListProperty } from "../property-config/combo-list.property-config"; @@ -16,9 +16,9 @@ export function useComboListDesignerRules(designItemContext: DesignerItemContext const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 - function getPropsConfig(componentId: string) { + function getPropsConfig(componentId: string, componentInstance: DesignerComponentInstance) { const inputGroupProps=new ComboListProperty(componentId, designerHostService); - return inputGroupProps.getPropertyConfig(schema); + return inputGroupProps.getPropertyConfig(schema,componentInstance); } return { diff --git a/packages/ui-vue/components/data-view/composition/types.ts b/packages/ui-vue/components/data-view/composition/types.ts index f9bcc13afd2..79c26aed5f8 100644 --- a/packages/ui-vue/components/data-view/composition/types.ts +++ b/packages/ui-vue/components/data-view/composition/types.ts @@ -853,7 +853,7 @@ export interface UseSelection { // setSelectionRow: (visibleDatas: Ref, selectedDataId: string) => void; - clearSelection(visibleDatas: VisualData[]): void; + clearSelection(): void; findIndexInSelectedItems(item: any): number; diff --git a/packages/ui-vue/components/data-view/composition/use-selection.ts b/packages/ui-vue/components/data-view/composition/use-selection.ts index d00bab5d5c0..f698f968e60 100644 --- a/packages/ui-vue/components/data-view/composition/use-selection.ts +++ b/packages/ui-vue/components/data-view/composition/use-selection.ts @@ -132,6 +132,7 @@ export function useSelection( const selectedItems = dataView.getSelectionItems(selectedValues.value); selectedItems.forEach((selectionItem: any) => { selectionItem.__fv_checked__ = false; }); selectedValues.value = []; + currentSelectedDataId.value = ''; } /** 勾选指定节点 */ diff --git a/packages/ui-vue/components/date-picker/src/designer/use-rules.ts b/packages/ui-vue/components/date-picker/src/designer/use-rules.ts index ac75d2e5406..7d109905a6d 100644 --- a/packages/ui-vue/components/date-picker/src/designer/use-rules.ts +++ b/packages/ui-vue/components/date-picker/src/designer/use-rules.ts @@ -1,6 +1,6 @@ /* eslint-disable max-len */ import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; +import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; import { DatePickerProperty } from "../property-config/date-picker.property-config"; @@ -13,12 +13,12 @@ export function useDatePickerDesignerRules(designItemContext: DesignerItemContex resolveComponentContext, triggerBelongedComponentToMoveWhenMoved, triggerBelongedComponentToDeleteWhenDeleted } = useInputDesignerRules(designItemContext, designerHostService); - const schema = designItemContext.schema as ComponentSchema; + const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 - function getPropsConfig(componentId: string) { - const inputGroupProps=new DatePickerProperty(componentId, designerHostService); - return inputGroupProps.getPropertyConfig(schema); + function getPropsConfig(componentId: string, componentInstance: DesignerComponentInstance) { + const inputGroupProps = new DatePickerProperty(componentId, designerHostService); + return inputGroupProps.getPropertyConfig(schema, componentInstance); } return { diff --git a/packages/ui-vue/components/designer-canvas/src/composition/dg-control.ts b/packages/ui-vue/components/designer-canvas/src/composition/dg-control.ts index d9280fcd86d..7573d1de275 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/dg-control.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/dg-control.ts @@ -1,21 +1,17 @@ export const DgControl = { - Button: { type: 'Button', name: '按钮', icon: 'Button' }, + 'button': { type: 'button', name: '按钮', icon: 'Button' }, - ButtonGroup: { type: 'ButtonGroup', name: '按钮组', icon: 'ButtonGroup' }, + 'response-toolbar': { type: 'response-toolbar', name: '工具栏', icon: 'ButtonGroup' }, - ToolBar: { type: 'ToolBar', name: '工具栏', icon: 'ButtonGroup' }, + 'response-toolbar-item': { type: 'response-toolbar-item', name: '按钮', icon: 'Button' }, - ToolBarItem: { type: 'ToolBarItem', name: '工具栏项', icon: 'Button' }, - - ContentContainer: { type: 'ContentContainer', name: '容器', icon: 'ContentContainer' }, - - DisplayField: { type: 'DisplayField', name: '标签', icon: 'DisplayField' }, + 'content-container': { type: 'content-container', name: '容器', icon: 'ContentContainer' }, 'input-group': { type: 'input-group', name: '文本', icon: 'TextBox' }, 'textarea': { type: 'textarea', name: '多行文本', icon: 'MultiTextBox' }, - lookup: { type: 'lookup', name: '帮助', icon: 'LookupEdit' }, + 'lookup': { type: 'lookup', name: '帮助', icon: 'LookupEdit' }, 'number-spinner': { type: 'number-spinner', name: '数值', icon: 'NumericBox' }, @@ -25,189 +21,55 @@ export const DgControl = { 'radio-group': { type: 'radio-group', name: '单选组', icon: 'RadioGroup' }, - 'check-box': { type:'check-box', name: '复选框', icon: 'CheckBox' }, + 'check-box': { type: 'check-box', name: '复选框', icon: 'CheckBox' }, 'check-group': { type: 'check-group', name: '复选框组', icon: 'CheckGroup' }, 'combo-list': { type: 'combo-list', name: '下拉列表', icon: 'EnumField' }, - /** 暂时没用 */ - FlexLayout: { type: 'FlexLayout', name: '弹性布局' }, - /** 暂时没用 */ - FlowLayout: { type: 'FlowLayout', name: '流布局' }, - - ResponseLayout: { type: 'ResponseLayout', name: '布局容器', icon: 'ResponseLayout3' }, - ResponseLayoutItem: { type: 'ResponseLayoutItem', name: '布局', icon: 'ResponseLayout1' }, - - 'tree-grid': { type: 'tree-grid', name: '树表格', icon: 'TreeGrid' }, + 'response-form': { type: 'response-form', name: '卡片面板', icon: 'Form' }, - TreeGridField: { type: 'TreeGridField', name: '树表格列' }, + 'response-layout': { type: 'response-layout', name: '布局容器', icon: 'ResponseLayout3' }, - FieldSet: { type: 'FieldSet', name: '分组', icon: 'FieldSet' }, + 'response-layout-item': { type: 'response-layout-item', name: '布局', icon: 'ResponseLayout1' }, - Form: { type: 'Form', name: '卡片面板', icon: 'Form' }, + 'tree-grid': { type: 'tree-grid', name: '树表格', icon: 'TreeGrid' }, - QueryForm: { type: 'QueryForm', name: '查询面板', icon: 'Form' }, + 'tree-grid-column': { type: 'tree-grid-column', name: '树表格列' }, 'data-grid': { type: 'data-grid', name: '表格', icon: 'DataGrid' }, 'data-grid-column': { type: 'data-grid-column', name: '表格列' }, - Panel: { type: 'Panel', name: '面板', icon: 'ContentContainer' }, - - Module: { type: 'Module', name: '模块', icon: 'Module' }, - - Component: { type: 'Component', name: '组件', icon: 'Component' }, - - ExternalContainer: { type: 'ExternalContainer', name: '外部容器', icon: 'ContentContainer' }, + 'module': { type: 'Module', name: '模块', icon: 'Module' }, - Image: { type: 'Image', name: '图像', icon: 'Image' }, + 'component': { type: 'component', name: '组件', icon: 'Component' }, - ImageUpload: { type: 'ImageUpload', name: '图片上传', icon: 'imageupload' }, + 'tabs': { type: 'tabs', name: '标签页', icon: 'Tab' }, - HiddenContainer: { type: 'HiddenContainer', name: '隐藏区域', icon: 'ContentContainer' }, - - ModalContainer: { type: 'ModalContainer', name: '弹窗容器', icon: 'ContentContainer' }, - - RouteContainer: { type: 'RouteContainer', name: '路由区域', icon: 'ContentContainer' }, - - Tab: { type: 'Tab', name: '标签页', icon: 'Tab' }, - - TabPage: { type: 'TabPage', name: '标签页项', dependentParentControl: 'Tab' }, + 'tab-page': { type: 'tab-page', name: '标签页项', dependentParentControl: 'Tab' }, 'tab-toolbar-item': { type: 'tab-toolbar-item', name: '标签页工具栏按钮', icon: 'Button' }, - Tag: { type: 'Tag', name: 'Tag', icon: 'Tag' }, - - Sidebar: { type: 'Sidebar', name: '侧边栏', icon: 'Sidebar' }, - - HtmlTemplate: { type: 'HtmlTemplate', name: '模版容器', icon: 'HtmlTemplate' }, - - ListView: { type: 'ListView', name: '列表', icon: 'ListView' }, - - RichTextBox: { type: 'RichTextBox', name: '富文本', icon: 'RichTextBox' }, - - TimeSpinner: { type: 'TimeSpinner', name: '时间调节器', icon: 'TimePicker' }, - - TimePicker: { type: 'TimePicker', name: '时间选择', icon: 'TimePicker' }, - - Section: { type: 'Section', name: '分组面板', icon: 'Section' }, - - SectionToolbar: { type: 'SectionToolbar', name: '分组面板工具栏' }, - - SectionToolbarItem: { type: 'SectionToolbarItem', name: '分组面板按钮' }, - - QueryScheme: { type: 'QueryScheme', name: '筛选方案', icon: 'QueryScheme' }, - - FormHeader: { type: 'FormHeader', name: '翻页' }, - - Splitter: { type: 'Splitter', name: '分栏面板', icon: 'Splitter' }, - - SplitterPane: { type: 'SplitterPane', name: '分栏面板项', dependentParentControl: 'Splitter' }, - - WizardDetail: { type: 'WizardDetail', name: '向导详情页' }, - - WizardDetailContainer: { type: 'WizardDetailContainer', name: '向导详情容器' }, - - Wizard: { type: 'Wizard', name: '向导', icon: 'Wizard' }, - - MultiSelect: { type: 'MultiSelect', name: '数据分配', icon: 'MultiSelect' }, - - Steps: { type: 'Steps', name: '步骤条', icon: 'Steps' }, - - avatar: { type: 'avatar', name: '头像', icon: 'Avatar' }, - - ListFilter: { type: 'ListFilter', name: '筛选条', icon: 'ListFilter' }, - - ListNav: { type: 'ListNav', name: '列表导航', icon: 'ListNav' }, - - NumberRange: { type: 'NumberRange', name: '数字区间选择', icon: 'NumericBox' }, - - Scrollspy: { type: 'Scrollspy', name: '滚动监听', icon: 'Scrollspy' }, - - LanguageTextBox: { type: 'LanguageTextBox', name: '多语言输入框', icon: 'LanguageTextBox' }, - - ComponentRef: { type: 'ComponentRef', name: '组件引用节点' }, - - FileUpload: { type: 'FileUpload', name: '附件上传', icon: 'FileUpload' }, - - FilePreview: { type: 'FilePreview', name: '附件预览', icon: 'FilePreview' }, - - ViewChange: { type: 'ViewChange', name: '多视图切换', icon: 'Button' }, - - MultiViewContainer: { type: 'MultiViewContainer', name: '多视图', icon: 'MultiViewContainer' }, - - MultiViewItem: { type: 'MultiViewItem', name: '多视图项', dependentParentControl: 'MultiViewContainer' }, - - Footer: { type: 'Footer', name: '页脚' }, - - DiscussionEditor: { type: 'DiscussionEditor', name: '评论编辑区', icon: 'DiscussionEditor' }, - - DiscussionList: { type: 'DiscussionList', name: '评论列表', icon: 'DiscussionList' }, - - NavTab: { type: 'NavTab', name: '标签类导航', icon: 'NavTab' }, - - Tags: { type: 'Tags', name: '标记组', icon: 'Tags' }, - - Portlet: { type: 'Portlet', name: '小部件', icon: 'dingzhi' }, - - Header: { type: 'Header', name: '页头', icon: 'Header' }, - - ModalFooter: { type: 'ModalFooter', name: '弹窗页脚', icon: 'ModalFooter' }, - - ScrollCollapsibleArea: { type: 'ScrollCollapsibleArea', name: '滚动收折区域', icon: 'ScrollCollapsibleArea' }, - - PersonnelSelector: { type: 'PersonnelSelector', name: '人员选择', icon: 'PersonnelSelector' }, - - Table: { type: 'Table', name: '表格', icon: 'DataGrid' }, - - LoopContainer: { type: 'LoopContainer', name: '循环容器', icon: 'ContentContainer' }, - - FileUploadPreview: { type: 'FileUploadPreview', name: '附件上传预览', icon: 'FileUpload' }, - - DynamicArea: { type: 'DynamicArea', name: '动态区域', icon: 'ContentContainer' }, - - DynamicAreaItem: { type: 'DynamicAreaItem', name: '动态区域项', icon: 'ContentContainer' }, - - TabToolbar: { type: 'TabToolbar', name: '标签页工具栏', icon: 'TabToolbar' }, - - HeaderToolBar: { type: 'HeaderToolBar', name: '头部组件工具栏', icon: 'HeaderToolBar' }, - - ModalFooterToolBar: { type: 'ModalFooterToolBar', name: '底部组件工具栏', icon: 'ModalFooterToolBar' }, - - HeaderToolBarItem: { type: 'HeaderToolBarItem', name: '头部组件工具栏按钮', icon: 'HeaderToolBarItem' }, - - ModalFooterToolBarItem: { type: 'ModalFooterToolBarItem', name: '底部组件工具栏按钮', icon: 'ModalFooterToolBarItem' }, - - OrganizationSelector: { type: 'OrganizationSelector', name: '组织选择', icon: 'OrganizationSelector' }, - - AdminOrganizationSelector: { type: 'AdminOrganizationSelector', name: '组织选择', icon: 'OrganizationSelector' }, - - EmployeeSelector: { type: 'EmployeeSelector', name: '人员选择', icon: 'PersonnelSelector' }, - - OaRelation: { type: 'OaRelation', name: '关联行政审批', icon: 'TextBox' }, + 'time-picker': { type: 'time-picker', name: '时间选择', icon: 'TimePicker' }, - CitySelector: { type: 'CitySelector', name: '城市选择', icon: 'CitySelector' }, + 'section': { type: 'section', name: '分组面板', icon: 'Section' }, - ExtIntergration: { type: 'ExtIntergration', name: '外部服务集成', icon: 'ViewModel' }, + 'section-toolbar': { type: 'section-toolbar', name: '分组面板工具栏' }, - AppointmentCalendar: { type: 'AppointmentCalendar', name: '预约日历', icon: 'DateBox' }, + 'section-toolbar-item': { type: 'section-toolbar-item', name: '分组面板按钮' }, - /** 查询类 start */ - Charts: { type: 'Charts', name: '图表', icon: 'Charts' }, + 'splitter': { type: 'splitter', name: '分栏面板', icon: 'Splitter' }, - QdpFramework: { type: 'QdpFramework', name: '查询结果工具栏', icon: 'QdpFramework' }, + 'splitter-pane': { type: 'splitter-pane', name: '分栏面板项', dependentParentControl: 'Splitter' }, - SpreadSheet: { type: 'SpreadSheet', name: '查询表格控件', icon: 'Charts' }, + 'component-ref': { type: 'component-ref', name: '组件引用节点' }, - QdpConditionDialog: { type: 'QdpConditionDialog', name: '查询筛选对话框', icon: 'ContentContainer' }, + uploader: { type: 'uploader', name: '附件上传', icon: 'FileUpload' }, - QdpConditionDialogTab: { type: 'QdpConditionDialogTab', name: '查询筛选标签页', icon: 'Tab' }, - /** 查询类 end */ + 'page-header': { type: 'page-header', name: '页头', icon: 'Header' }, - /** 审批类 start */ - ApprovalLogs: { type: 'ApprovalLogs', name: '审批记录', icon: 'ApprovalLogs' }, + 'page-footer': { type: 'page-footer', name: '页脚', icon: 'ModalFooter' }, - ApprovalComments: { type: 'ApprovalComments', name: '审批意见', icon: 'shenpiyijian' }, - /** 审批类 end */ + 'tab-toolbar': { type: 'tab-toolbar', name: '标签页工具栏', icon: 'TabToolbar' } }; diff --git a/packages/ui-vue/components/designer-canvas/src/types.ts b/packages/ui-vue/components/designer-canvas/src/types.ts index 7ab9d7aaeb8..065e3b2d225 100644 --- a/packages/ui-vue/components/designer-canvas/src/types.ts +++ b/packages/ui-vue/components/designer-canvas/src/types.ts @@ -76,7 +76,7 @@ export interface DesignerComponentInstance { triggerBelongedComponentToDeleteWhenDeleted?: Ref; /** 获取属性配置 */ - getPropConfig: () => any; + getPropConfig: (...args) => any; } diff --git a/packages/ui-vue/components/designer-outline/src/composition/types.ts b/packages/ui-vue/components/designer-outline/src/composition/types.ts index 839cf2b182d..d20e52885c0 100644 --- a/packages/ui-vue/components/designer-outline/src/composition/types.ts +++ b/packages/ui-vue/components/designer-outline/src/composition/types.ts @@ -1,3 +1,5 @@ +import { Ref } from "vue"; + export interface UseDataView { getData: () => any; } @@ -8,4 +10,6 @@ export interface UseOutlineNode { getTitle: (componentsItem: any, parentComponentsItem: any) => any; onChanged: (selections: any[]) => any; + + currentSelectedNodeId?: Ref; } diff --git a/packages/ui-vue/components/designer-outline/src/composition/use-outline-node.ts b/packages/ui-vue/components/designer-outline/src/composition/use-outline-node.ts index daa0d876cfb..94b691f9ced 100644 --- a/packages/ui-vue/components/designer-outline/src/composition/use-outline-node.ts +++ b/packages/ui-vue/components/designer-outline/src/composition/use-outline-node.ts @@ -1,13 +1,18 @@ /* eslint-disable max-len */ /* eslint-disable @typescript-eslint/indent */ +import { DgControl } from '../../../designer-canvas/src/composition/dg-control'; +import { ref } from 'vue'; import { ComponentType } from '../types'; import { UseOutlineNode } from './types'; +import { DesignerHostService } from '../../../designer-canvas/src/composition/types'; /** * 组装控件树节点的展示文本、图标 */ -export function useOutlineNode(): UseOutlineNode { +export function useOutlineNode(designerHostService: DesignerHostService): UseOutlineNode { + /** 当前选中的树节点id */ + const currentSelectedNodeId = ref(''); /** * 获取树节点图标 */ @@ -104,16 +109,16 @@ export function useOutlineNode(): UseOutlineNode { } case ComponentType.dataGrid: case ComponentType.table: { - // const treeGrid = componentsItem.selectNode(element, (item) => item.type === (DgControl.TreeGrid && DgControl.TreeGrid.type)); - // if (treeGrid) { - // return '树表格组件'; - // } + const treeGrid = designerHostService?.formSchemaUtils.selectNode(componentsItem, (item) => item.type === (DgControl['tree-grid'] && DgControl['tree-grid'].type)); + if (treeGrid) { + return '树表格组件'; + } return '表格组件'; } case ComponentType.attachmentPanel: { return '附件组件'; } - case ComponentType.listView: case 'ListView': { + case ComponentType.listView: { return '列表视图组件'; } case ComponentType.modalFrame: { @@ -147,13 +152,8 @@ export function useOutlineNode(): UseOutlineNode { } case 'component': return getComponentShowName(componentsItem); - case 'response-form': { - return '卡片面板'; - } default: { - // 目前缺少控件的类型名称(schema里的description?) - // return schemaMap[componentsItem.type]?.description || componentsItem.id - return componentsItem.id; + return DgControl[componentsItem.type] && DgControl[componentsItem.type].name || componentsItem.id; } } @@ -161,23 +161,17 @@ export function useOutlineNode(): UseOutlineNode { function onChanged(selections: any[]) { const newSelection = selections.length ? selections[0] : null; + currentSelectedNodeId.value = newSelection.originalId; const designId = newSelection ? `${newSelection.originalId}-design-item` : ''; const newSelectedElement = document.getElementById(designId) as HTMLElement; if (newSelectedElement) { - const currentSelectedElements = document.getElementsByClassName('dgComponentSelected') as HTMLCollectionOf; - // 重复点击 - const duplicateClick = - currentSelectedElements && - currentSelectedElements.length === 1 && - currentSelectedElements[0] === newSelectedElement; - if (!duplicateClick) { - if (newSelectedElement) { - newSelectedElement.click(); - } + if (newSelectedElement) { + newSelectedElement.click(); } + } } - return { getIcon, getTitle, onChanged }; + return { getIcon, getTitle, onChanged, currentSelectedNodeId }; } diff --git a/packages/ui-vue/components/designer-outline/src/designer-outline.component.tsx b/packages/ui-vue/components/designer-outline/src/designer-outline.component.tsx index 72861b9c0f7..daba6792c4a 100644 --- a/packages/ui-vue/components/designer-outline/src/designer-outline.component.tsx +++ b/packages/ui-vue/components/designer-outline/src/designer-outline.component.tsx @@ -1,6 +1,6 @@ /* eslint-disable no-loop-func */ /* eslint-disable no-use-before-define */ -import { SetupContext, defineComponent, ref } from 'vue'; +import { SetupContext, defineComponent, ref, inject } from 'vue'; import { FTreeView } from '@farris/ui-vue/components/tree-view'; import { designerOutlineProps, DesignerOutlineProps } from './designer-outline.props'; import { useOutlineNode } from './composition/use-outline-node'; @@ -33,8 +33,9 @@ export default defineComponent({ /** 单元格高度 */ const cellHeight = ref(props.cellHeight); - const useOutlineNodeComposition = useOutlineNode(); - const { onChanged } = useOutlineNodeComposition; + const designerHostService: any = inject('designer-host-service'); + const useOutlineNodeComposition = useOutlineNode(designerHostService); + const { onChanged, currentSelectedNodeId } = useOutlineNodeComposition; const { getData } = useDataView(props, useOutlineNodeComposition); @@ -46,6 +47,11 @@ export default defineComponent({ treeViewData = getData(); if (treeRef.value && treeRef.value.updateDataSource) { treeRef.value.updateDataSource(treeViewData); + if (currentSelectedNodeId && treeRef.value.clearSelection) { + treeRef.value.clearSelection(); + selectControlTreeNode({ id: currentSelectedNodeId.value }) + + } } } /** 触发选中控件树的指定节点 */ @@ -54,6 +60,10 @@ export default defineComponent({ const selectTreeNodeIndex = treeViewData.findIndex(data => data.originalId === schemaValue.id); if (selectTreeNodeIndex > -1) { treeRef.value.selectItem(selectTreeNodeIndex); + const selectedItem = treeViewData[selectTreeNodeIndex]; + if (currentSelectedNodeId) { + currentSelectedNodeId.value = selectedItem.originalId; + } } } } diff --git a/packages/ui-vue/components/dynamic-form/src/designer/form-group.design.component.tsx b/packages/ui-vue/components/dynamic-form/src/designer/form-group.design.component.tsx index fdf95cb8024..5e5895ffcee 100644 --- a/packages/ui-vue/components/dynamic-form/src/designer/form-group.design.component.tsx +++ b/packages/ui-vue/components/dynamic-form/src/designer/form-group.design.component.tsx @@ -23,7 +23,7 @@ export default defineComponent({ componentInstance.value.getPropConfig = (...args) => { let propertyConfigSchema = propertyConfigSchemaMap[props.editor.type]; if (propertyConfigSchema && Object.keys(propertyConfigSchema).length === 0 && elementRef.value?.editorRef && elementRef.value?.editorRef?.getPropConfig) { - propertyConfigSchema = elementRef.value.editorRef.getPropConfig(...args); + propertyConfigSchema = elementRef.value.editorRef.getPropConfig(...args, componentInstance.value); } return propertyConfigSchema; } diff --git a/packages/ui-vue/components/input-group/src/designer/use-input-group-rules.ts b/packages/ui-vue/components/input-group/src/designer/use-input-group-rules.ts index 9b6291a8c27..0e498b57da8 100644 --- a/packages/ui-vue/components/input-group/src/designer/use-input-group-rules.ts +++ b/packages/ui-vue/components/input-group/src/designer/use-input-group-rules.ts @@ -1,6 +1,6 @@ /* eslint-disable max-len */ import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; +import { ComponentSchema, DesignerItemContext, DesignerComponentInstance } from "../../../designer-canvas/src/types"; import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; import { InputGroupProperty } from "../property-config/input-group.property-config"; @@ -16,9 +16,9 @@ export function useInputGroupDesignerRules(designItemContext: DesignerItemContex const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 - function getPropsConfig(componentId: string) { - const inputGroupProps=new InputGroupProperty(componentId, designerHostService); - return inputGroupProps.getPropertyConfig(schema); + function getPropsConfig(componentId: string, componentInstance: DesignerComponentInstance) { + const inputGroupProps = new InputGroupProperty(componentId, designerHostService); + return inputGroupProps.getPropertyConfig(schema, componentInstance); } return { diff --git a/packages/ui-vue/components/lookup/src/designer/lookup.design.component.tsx b/packages/ui-vue/components/lookup/src/designer/lookup.design.component.tsx index 996684c81f7..1173cb85fe8 100644 --- a/packages/ui-vue/components/lookup/src/designer/lookup.design.component.tsx +++ b/packages/ui-vue/components/lookup/src/designer/lookup.design.component.tsx @@ -34,11 +34,11 @@ export default defineComponent({ elementRef.value.componentInstance = componentInstance; }); - const designerHostService=inject('designer-host-service'); + const designerHostService = inject('designer-host-service'); // 构造属性配置方法 componentInstance.value['getPropConfig'] = (componentId: string) => { - const lookupProp = new LookupPropertyConfig(componentId,designerHostService); - return lookupProp.getPropertyConfig(componentInstance.value.schema); + const lookupProp = new LookupPropertyConfig(componentId, designerHostService); + return lookupProp.getPropertyConfig(componentInstance.value.schema, componentInstance.value); }; context.expose(componentInstance.value); diff --git a/packages/ui-vue/components/lookup/src/property-config/lookup.property-config.ts b/packages/ui-vue/components/lookup/src/property-config/lookup.property-config.ts index 6c386b637d1..893b6093c55 100644 --- a/packages/ui-vue/components/lookup/src/property-config/lookup.property-config.ts +++ b/packages/ui-vue/components/lookup/src/property-config/lookup.property-config.ts @@ -1,19 +1,21 @@ +import { InputBaseProperty } from "../../../property-panel/src/composition/entity/input-base-property"; import { FieldSelectorRepositoryToken } from "../../../field-selector"; -import { BaseControlProperty } from "../../../property-panel/src/composition/entity/base-property"; -import { lookupDataSourceConverter, lookupDisplayTypeConverter, +import { + lookupDataSourceConverter, lookupDisplayTypeConverter, lookupIdFieldConverter, lookupDefaultConverter, lookupBindingFieldConverter, lookupVisibleConverter } from "./converters/lookup-property.converter"; +import { DesignerComponentInstance } from "../../../designer-canvas/src/types"; export const LookupSchemaRepositoryToken = Symbol('schema_repository_token'); -export class LookupPropertyConfig extends BaseControlProperty { - getPropertyConfig(propertyData: any) { - const basic = this.getBasicPropConfig(propertyData); +export class LookupPropertyConfig extends InputBaseProperty { + getPropertyConfig(propertyData: any, componentInstance: DesignerComponentInstance) { + const basic = this.getBasicProperties(propertyData, componentInstance); const appearance = this.getAppearanceConfig(); - const behavior = this.getBehaviorConfig(propertyData); - const lookup = this.getLookupConfig(propertyData.editor); + const behavior = this.getBehaviorConfig(propertyData); + const lookup = this.getLookupConfig(propertyData.editor); return { type: 'object', @@ -31,7 +33,7 @@ export class LookupPropertyConfig extends BaseControlProperty { return { description: "Basic Infomation", title: "行为", - properties:{ + properties: { bindField: { description: "绑定文本字段", title: "绑定文本字段", @@ -84,7 +86,7 @@ export class LookupPropertyConfig extends BaseControlProperty { return { description: "Basic Infomation", title: "编辑器", - properties:{ + properties: { dataSource: { description: "数据源", title: "数据源", @@ -97,15 +99,16 @@ export class LookupPropertyConfig extends BaseControlProperty { formBasicInfo: this.formSchemaUtils.getFormMetadataBasicInfo() }, viewOptions: [ - { id: 'recommend', title: '推荐', type: 'List', + { + id: 'recommend', title: '推荐', type: 'List', dataSource: 'Recommand', enableGroup: true, groupField: 'category', groupFormatter: (value, data) => { - return `${ value === 'local'? '本地元数据': '最近使用' }`; + return `${value === 'local' ? '本地元数据' : '最近使用'}`; } }, - { id: 'total', title: '全部', type: 'List', dataSource: 'Total'} + { id: 'total', title: '全部', type: 'List', dataSource: 'Total' } ], repositoryToken: LookupSchemaRepositoryToken, onSubmitModal: (dataSourceSchema: any) => { @@ -114,9 +117,9 @@ export class LookupPropertyConfig extends BaseControlProperty { // 获取数据源详细配置信息 return this.metadataService.getPickMetadata( formInfo.relativePath, dataSourceSchema[0].data).then((res: any) => { - const metadata = JSON.parse(res?.metadata.content); - return metadata; - }); + const metadata = JSON.parse(res?.metadata.content); + return metadata; + }); } } }, @@ -146,7 +149,7 @@ export class LookupPropertyConfig extends BaseControlProperty { type: "string", editor: { type: "field-selector", - bindingType: { "enable": false}, + bindingType: { "enable": false }, textField: 'bindingPath', editorParams: { propertyData, @@ -168,7 +171,7 @@ export class LookupPropertyConfig extends BaseControlProperty { $converter: lookupDefaultConverter, editor: { type: "field-selector", - bindingType: { "enable": false}, + bindingType: { "enable": false }, textField: 'bindingPath', editorParams: { propertyData, @@ -182,7 +185,7 @@ export class LookupPropertyConfig extends BaseControlProperty { repositoryToken: FieldSelectorRepositoryToken } }, - mappingFields:{ + mappingFields: { description: "字段映射", title: "字段映射", type: "string", diff --git a/packages/ui-vue/components/number-range/src/designer/use-design-rules.ts b/packages/ui-vue/components/number-range/src/designer/use-design-rules.ts index a169ae90ed1..d8b07d4eca0 100644 --- a/packages/ui-vue/components/number-range/src/designer/use-design-rules.ts +++ b/packages/ui-vue/components/number-range/src/designer/use-design-rules.ts @@ -1,6 +1,6 @@ /* eslint-disable max-len */ import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; +import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; import { NumberRangeProperty } from "../property-config/number-range.property-config"; @@ -16,9 +16,9 @@ export function useNumberRangeDesignerRules(designItemContext: DesignerItemConte const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 - function getPropsConfig(componentId: string) { - const inputGroupProps=new NumberRangeProperty(componentId, designerHostService); - return inputGroupProps.getPropertyConfig(schema); + function getPropsConfig(componentId: string, componentInstance: DesignerComponentInstance) { + const inputGroupProps = new NumberRangeProperty(componentId, designerHostService); + return inputGroupProps.getPropertyConfig(schema, componentInstance); } return { diff --git a/packages/ui-vue/components/number-spinner/src/composition/use-design-rules.ts b/packages/ui-vue/components/number-spinner/src/composition/use-design-rules.ts index 9331bff4e14..8a05f84f018 100644 --- a/packages/ui-vue/components/number-spinner/src/composition/use-design-rules.ts +++ b/packages/ui-vue/components/number-spinner/src/composition/use-design-rules.ts @@ -1,6 +1,6 @@ /* eslint-disable no-use-before-define */ /* eslint-disable max-len */ -import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; +import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { NumberSpinnerProperty } from "../property-config/number-spinner.property-config"; import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; @@ -16,9 +16,9 @@ export function useNumberSpinnerDesignerRules(designItemContext: DesignerItemCon const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 - function getPropsConfig(componentId: string) { - const inputGroupProps=new NumberSpinnerProperty(componentId, designerHostService); - return inputGroupProps.getPropertyConfig(schema); + function getPropsConfig(componentId: string, componentInstance: DesignerComponentInstance) { + const inputGroupProps = new NumberSpinnerProperty(componentId, designerHostService); + return inputGroupProps.getPropertyConfig(schema, componentInstance); } return { diff --git a/packages/ui-vue/components/page-header/src/property-config/page-header.property-config.ts b/packages/ui-vue/components/page-header/src/property-config/page-header.property-config.ts index 1cb5562d2db..2c3c75fb1c4 100644 --- a/packages/ui-vue/components/page-header/src/property-config/page-header.property-config.ts +++ b/packages/ui-vue/components/page-header/src/property-config/page-header.property-config.ts @@ -17,7 +17,7 @@ export class PageHeaderProperty extends BaseControlProperty { return this.propertyConfig; } - private getBasicPropConfig(propertyData: any) { + public getBasicPropConfig(propertyData: any) { this.propertyConfig.categories['basic'] = { description: 'Basic Information', title: '基本信息', diff --git a/packages/ui-vue/components/property-panel/src/composition/entity/base-property.ts b/packages/ui-vue/components/property-panel/src/composition/entity/base-property.ts index 7d8c0f49b00..b7f45667d17 100644 --- a/packages/ui-vue/components/property-panel/src/composition/entity/base-property.ts +++ b/packages/ui-vue/components/property-panel/src/composition/entity/base-property.ts @@ -1,4 +1,4 @@ -import { SchemaDOMMapping } from './schema-dom-mapping'; +import { DgControl } from "../../../../designer-canvas/src/composition/dg-control"; /** * 控件属性基类 @@ -53,8 +53,6 @@ export class BaseControlProperty { } getBasicPropConfig(propertyData: any): any { - var self = this; - this.setDesignViewModelField(propertyData); return { description: 'Basic Information', title: '基本信息', @@ -68,104 +66,20 @@ export class BaseControlProperty { type: { description: '组件类型', title: '控件类型', - type: 'string', - refreshPanelAfterChanged: true, - $converter: '/converter/change-editor.converter', + type: 'select', editor: { type: 'combo-list', - textField: 'value', - valueField: 'key', - editable: false, - data: SchemaDOMMapping.getEditorTypesByMDataType(self.designViewModelField.type.name) - } - }, - label: { - title: "标签", - type: "string", - $converter: '/converter/form-group-label.converter' - } - }, - setPropertyRelates(changeObject, prop) { - if (!changeObject) { - return - } - switch (changeObject && changeObject.propertyID) { - case 'type': { - self.changeControlType(propertyData, changeObject) - break + textField: 'name', + valueField: 'value', + data: [{ value: propertyData.type, name: DgControl[propertyData.type].name }] } } } }; + } - /** - * 卡片控件:切换控件类型后事件 - * @param propertyData 控件DOM属性 - * @param newControlType 新控件类型 - */ - changeControlType(propertyData, changeObject) { - const newControlType = changeObject.propertyValue; - - // 1、定位控件父容器 - const cmp = this.formSchemaUtils.getComponentById(this.componentId); - let parentContainer = this.getControlParentContainer(propertyData.id, cmp); - if (!parentContainer) { - return; - } - const index = parentContainer.contents.findIndex(c => c.id === propertyData.id); - const oldControl = parentContainer.contents[index]; - - let newControl; - // 绑定字段 - if (this.designViewModelField) { - // ①、记录viewModel 变更---全量替换editor - const dgViewModel = this.designViewModelUtils.getDgViewModel(this.viewModelId); - dgViewModel.changeField(this.designViewModelField.id, { - editor: { - $type: newControlType - }, - name: this.designViewModelField.name, - require: this.designViewModelField.require, - readonly: this.designViewModelField.readonly - }, false); - // ② 创建新控件 - newControl = this.controlCreatorUtils.setFormFieldProperty('Form', this.designViewModelField, null, newControlType); - } - //else { - // 绑定变量 - // ① 记录viewModel 变更---全量替换editor - // const vmVariable = this.domService.getViewModelFieldById(this.viewModelId, this.bindingVarible.id); - // Object.assign(vmVariable, { - // editor: { - // $type: newControlType - // } - // }); - // // ② 创建新控件 - // newControl = this.controlCreatorService.createControlByVariable(this.bindingVarible, cmp.componentType, newControlType, this.componentId); - // } - - - // 保留原id和isRTControl、样式等属性 - Object.assign(newControl, { - id: oldControl.id, - appearance: oldControl.appearance, - size: oldControl.size, - label: oldControl.label - }); - Object.assign(newControl.editor, { - isTextArea: newControl.isTextArea && oldControl.isTextArea, - type:newControlType||'', - placeHolder: oldControl.editor?.placeHolder, - holdPlace: oldControl.editor?.holdPlace, - readonly: oldControl.editor?.readonly, - require: oldControl.editor?.require, - visible: oldControl.editor?.visible - }); - - // 4、替换控件 - parentContainer.contents.splice(index, 1, newControl); - } + protected getAppearanceConfig(propertyData = null): any { return { @@ -183,58 +97,25 @@ export class BaseControlProperty { type: "string", description: "组件的样式", $converter: "/converter/appearance.converter" - }, - responseLayout: { - description: "响应式列宽", - title: "响应式列宽", - type: "boolean", - visible: false, - editor: { - type: "response-layout-editor-setting" - }, - $converter: "/converter/response-form-layout.converter" } } }; } - /** - * 获取控件:以contents为节点进行定位 - * @param controlId 控件ID - * @param domJson 容器 - */ - private getControlParentContainer(controlId: string, domJson: any) { - let container; - if (!domJson || !domJson.contents || domJson.contents.length === 0) { - return null; - } - - for (const content of domJson.contents) { - if (content.id === controlId) { - container = domJson; - return domJson; - } - container = this.getControlParentContainer(controlId, content); - if (container) { - return container; - } - } - } - getBindingFieldEditorOptions(propertyData) { const formBasicInfo = this.formSchemaUtils.getFormMetadataBasicInfo(); - return { + return { type: "field-selector", - bindingType: { "enable": false}, + bindingType: { "enable": false }, editorParams: { propertyData, formBasicInfo }, columns: [ { field: 'name', title: '字段名称' }, - { field: 'bindingField',title: '绑定字段'}, - { field: 'fieldType', title: '字段类型'} + { field: 'bindingField', title: '绑定字段' }, + { field: 'fieldType', title: '字段类型' } ], beforeOpenDialog: (params) => { const treeFields = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId); diff --git a/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts b/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts index 6709c795537..dcc06cfb531 100644 --- a/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts +++ b/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts @@ -1,58 +1,216 @@ import { BaseControlProperty } from "./base-property"; +import { SchemaDOMMapping } from './schema-dom-mapping'; +import { canvasChanged } from '../../../../designer-canvas/src/composition/designer-canvas-changed'; +import { DesignerComponentInstance } from "../../../../designer-canvas/src/types"; export class InputBaseProperty extends BaseControlProperty { constructor(componentId: string, designerHostService: any) { super(componentId, designerHostService); } - getBasicProperties(propertyData) { - let basicProperties = this.getBasicPropConfig(propertyData); - basicProperties.properties["binding"] = this.getFieldSelectorOptions(propertyData); - return basicProperties; - } - getAppearanceProperties(propertyData):any{ - return this.getAppearanceConfig(propertyData); - } - - getEditorProperties(propertyData):any { - return this.getComponentConfig(propertyData); - } - - getPropertyConfig(propertyData: any) { + public getPropertyConfig(propertyData: any, componentInstance: DesignerComponentInstance) { // 基本信息 - this.propertyConfig.categories['basic'] = this.getBasicProperties(propertyData); + this.propertyConfig.categories['basic'] = this.getBasicProperties(propertyData, componentInstance); // 外观 this.propertyConfig.categories['appearance'] = this.getAppearanceProperties(propertyData); // 编辑器 this.propertyConfig.categories['editor'] = this.getEditorProperties(propertyData); return this.propertyConfig; } - private getFieldSelectorOptions(propertyData: any) { + + public getBasicProperties(propertyData, componentInstance) { + var self = this; + this.setDesignViewModelField(propertyData); const formBasicInfo = this.formSchemaUtils.getFormMetadataBasicInfo(); const data = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId); return { - description: "绑定的表单字段", - title: "绑定", - $converter: "/converter/field-selector.converter", - editor: { - type: "field-selector", - bindingType: { "enable": false }, - editorParams: { - propertyData, - formBasicInfo + description: 'Basic Information', + title: '基本信息', + properties: { + id: { + description: '组件标识', + title: '标识', + type: 'string', + readonly: true + }, + type: { + description: '组件类型', + title: '控件类型', + type: 'string', + refreshPanelAfterChanged: true, + $converter: '/converter/change-editor.converter', + editor: { + type: 'combo-list', + textField: 'value', + valueField: 'key', + editable: false, + data: SchemaDOMMapping.getEditorTypesByMDataType(self.designViewModelField.type.name) + } + }, + label: { + title: "标签", + type: "string", + $converter: '/converter/form-group-label.converter' }, - columns: [ - { field: 'name', title: '字段名称' }, - { field: 'bindingField', title: '绑定字段' }, - { field: 'fieldType', title: '字段类型' } - ], - data + binding: { + description: "绑定的表单字段", + title: "绑定", + $converter: "/converter/field-selector.converter", + editor: { + type: "field-selector", + bindingType: { "enable": false }, + editorParams: { + propertyData, + formBasicInfo + }, + columns: [ + { field: 'name', title: '字段名称' }, + { field: 'bindingField', title: '绑定字段' }, + { field: 'fieldType', title: '字段类型' } + ], + data + } + } + }, + setPropertyRelates(changeObject, prop) { + if (!changeObject) { + return + } + switch (changeObject && changeObject.propertyID) { + case 'type': { + self.changeControlType(propertyData, changeObject, componentInstance) + break + } + } + } + }; + } + public getAppearanceProperties(propertyData): any { + return { + title: "样式", + description: "Appearance", + properties: { + class: { + title: "class样式", + type: "string", + description: "组件的CSS样式", + $converter: "/converter/appearance.converter" + }, + style: { + title: "style样式", + type: "string", + description: "组件的样式", + $converter: "/converter/appearance.converter" + }, + responseLayout: { + description: "响应式列宽", + title: "响应式列宽", + type: "boolean", + visible: false, + editor: { + type: "response-layout-editor-setting" + }, + $converter: "/converter/response-form-layout.converter" + } } }; } - getComponentConfig(propertyData, info = {}, properties = {}) { + public getEditorProperties(propertyData): any { + return this.getComponentConfig(propertyData); + } + + + /** + * 卡片控件:切换控件类型后事件 + * @param propertyData 控件DOM属性 + * @param newControlType 新控件类型 + */ + private changeControlType(propertyData, changeObject, componentInstance: DesignerComponentInstance) { + const newControlType = changeObject.propertyValue; + + // 1、定位控件父容器 + const parentContainer = componentInstance && componentInstance.parent && componentInstance.parent['schema']; + if (!parentContainer) { + return; + } + + const index = parentContainer.contents.findIndex(c => c.id === propertyData.id); + const oldControl = parentContainer.contents[index]; + + let newControl; + // 2、记录绑定字段viewModel的变更 + if (this.designViewModelField) { + const dgViewModel = this.designViewModelUtils.getDgViewModel(this.viewModelId); + dgViewModel.changeField(this.designViewModelField.id, { + editor: { + $type: newControlType + }, + name: this.designViewModelField.name, + require: this.designViewModelField.require, + readonly: this.designViewModelField.readonly + }, false); + // 3、创建新控件 + newControl = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, newControlType); + } + if (!newControl) { + return; + } + // 4、保留原id样式等属性 + Object.assign(newControl, { + id: oldControl.id, + appearance: oldControl.appearance, + size: oldControl.size, + label: oldControl.label, + binding: oldControl.binding, + visible: oldControl.visible + }); + Object.assign(newControl.editor, { + isTextArea: newControl.isTextArea && oldControl.isTextArea, + placeholder: oldControl.editor?.placeholder, + holdPlace: oldControl.editor?.holdPlace, + readonly: oldControl.editor?.readonly, + require: oldControl.editor?.require, + }); + + // 5、替换控件 + parentContainer.contents.splice(index, 1); + parentContainer.contents.splice(index, 0, newControl); + + // 6、暂时移除旧控件的选中样式(后续考虑更好的方式) + Array.from(document.getElementsByClassName('dgComponentSelected') as HTMLCollectionOf).forEach( + (element: HTMLElement) => element.classList.remove('dgComponentSelected') + ); + // 7、触发刷新 + canvasChanged.value++; + + } + + /** + * 获取控件:以contents为节点进行定位 + * @param controlId 控件ID + * @param domJson 容器 + */ + private getControlParentContainer(controlId: string, domJson: any) { + let container; + if (!domJson || !domJson.contents || domJson.contents.length === 0) { + return null; + } + + for (const content of domJson.contents) { + if (content.id === controlId) { + container = domJson; + return domJson; + } + container = this.getControlParentContainer(controlId, content); + if (container) { + return container; + } + } + } + + public getComponentConfig(propertyData, info = {}, properties = {}) { const editorBasic = Object.assign({ description: "组件信息", title: "组件信息", diff --git a/packages/ui-vue/components/property-panel/src/composition/entity/schema-dom-mapping.ts b/packages/ui-vue/components/property-panel/src/composition/entity/schema-dom-mapping.ts index f4804ad9b95..de1e38dd2b5 100644 --- a/packages/ui-vue/components/property-panel/src/composition/entity/schema-dom-mapping.ts +++ b/packages/ui-vue/components/property-panel/src/composition/entity/schema-dom-mapping.ts @@ -9,17 +9,14 @@ export class SchemaDOMMapping { String: [ { key: DgControl['input-group'].type, value: DgControl['input-group'].name }, { key: DgControl['lookup'].type, value: DgControl['lookup'].name }, - { key: DgControl.Image.type, value: DgControl.Image.name }, { key: DgControl['date-picker'].type, value: DgControl['date-picker'].name }, { key: DgControl['check-box'].type, value: DgControl['check-box'].name }, { key: DgControl['radio-group'].type, value: DgControl['radio-group'].name }, { key: DgControl['combo-list'].type, value: DgControl['combo-list'].name }, { key: DgControl['textarea'].type, value: DgControl['textarea'].name }, - // { key: DgControl.Tags.type, value: DgControl.Tags.name }, ], Text: [ { key: DgControl['textarea'].type, value: DgControl['textarea'].name }, - { key: DgControl['avatar'].type, value: DgControl['avatar'].name }, { key: DgControl['lookup'].type, value: DgControl['lookup'].name } ], Decimal: [ @@ -52,12 +49,6 @@ export class SchemaDOMMapping { { key: DgControl['lookup'].type, value: DgControl['lookup'].name }, { key: DgControl['combo-list'].type, value: DgControl['combo-list'].name }, { key: DgControl['radio-group'].type, value: DgControl['radio-group'].name }, - ], - EmployeeSelector: [ - { key: DgControl.EmployeeSelector.type, value: DgControl.EmployeeSelector.name } - ], - AdminOrganizationSelector: [ - { key: DgControl.AdminOrganizationSelector.type, value: DgControl.AdminOrganizationSelector.name } ] }; static getEditorTypesByMDataType(fieldType: string) { diff --git a/packages/ui-vue/components/radio-group/src/designer/use-design-rules.ts b/packages/ui-vue/components/radio-group/src/designer/use-design-rules.ts index 2100b9ed923..6d5e2478626 100644 --- a/packages/ui-vue/components/radio-group/src/designer/use-design-rules.ts +++ b/packages/ui-vue/components/radio-group/src/designer/use-design-rules.ts @@ -1,6 +1,6 @@ /* eslint-disable no-use-before-define */ /* eslint-disable max-len */ -import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; +import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { RadioGroupProperty } from "../property-config/radio-group.property-config"; import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; @@ -16,9 +16,9 @@ export function useRadioGroupDesignerRules(designItemContext: DesignerItemContex const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 - function getPropsConfig(componentId: string) { - const inputGroupProps=new RadioGroupProperty(componentId, designerHostService); - return inputGroupProps.getPropertyConfig(schema); + function getPropsConfig(componentId: string, componentInstance: DesignerComponentInstance) { + const inputGroupProps = new RadioGroupProperty(componentId, designerHostService); + return inputGroupProps.getPropertyConfig(schema, componentInstance); } return { diff --git a/packages/ui-vue/components/switch/src/designer/use-design-rules.ts b/packages/ui-vue/components/switch/src/designer/use-design-rules.ts index bbdd4bc9855..7ee21e9c441 100644 --- a/packages/ui-vue/components/switch/src/designer/use-design-rules.ts +++ b/packages/ui-vue/components/switch/src/designer/use-design-rules.ts @@ -1,6 +1,6 @@ /* eslint-disable no-use-before-define */ /* eslint-disable max-len */ -import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; +import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { SwitchProperty } from "../property-config/switch.property-config"; import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; @@ -16,9 +16,9 @@ export function useSwitchDesignerRules(designItemContext: DesignerItemContext, d const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 - function getPropsConfig(componentId: string) { - const inputGroupProps=new SwitchProperty(componentId, designerHostService); - return inputGroupProps.getPropertyConfig(schema); + function getPropsConfig(componentId: string, componentInstance: DesignerComponentInstance) { + const inputGroupProps = new SwitchProperty(componentId, designerHostService); + return inputGroupProps.getPropertyConfig(schema, componentInstance); } return { diff --git a/packages/ui-vue/components/textarea/src/designer/use-design-rules.ts b/packages/ui-vue/components/textarea/src/designer/use-design-rules.ts index 09c5a07ccc1..402d2231dc7 100644 --- a/packages/ui-vue/components/textarea/src/designer/use-design-rules.ts +++ b/packages/ui-vue/components/textarea/src/designer/use-design-rules.ts @@ -1,6 +1,6 @@ /* eslint-disable no-use-before-define */ /* eslint-disable max-len */ -import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; +import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { TextareaProperty } from "../property-config/textarea.property-config"; import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; @@ -16,9 +16,9 @@ export function useTextareaDesignerRules(designItemContext: DesignerItemContext, const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 - function getPropsConfig(componentId: string) { - const inputGroupProps=new TextareaProperty(componentId, designerHostService); - return inputGroupProps.getPropertyConfig(schema); + function getPropsConfig(componentId: string, componentInstance: DesignerComponentInstance) { + const inputGroupProps = new TextareaProperty(componentId, designerHostService); + return inputGroupProps.getPropertyConfig(schema, componentInstance); } return { diff --git a/packages/ui-vue/components/time-picker/src/designer/use-design-rules.ts b/packages/ui-vue/components/time-picker/src/designer/use-design-rules.ts index 0af44f48353..e9f07fe1aa0 100644 --- a/packages/ui-vue/components/time-picker/src/designer/use-design-rules.ts +++ b/packages/ui-vue/components/time-picker/src/designer/use-design-rules.ts @@ -1,6 +1,6 @@ /* eslint-disable no-use-before-define */ /* eslint-disable max-len */ -import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; +import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { TimePickerProperty } from "../property-config/time-picker.property-config"; import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; @@ -16,9 +16,9 @@ export function useTimePickerDesignerRules(designItemContext: DesignerItemContex const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 - function getPropsConfig(componentId: string) { - const inputGroupProps=new TimePickerProperty(componentId, designerHostService); - return inputGroupProps.getPropertyConfig(schema); + function getPropsConfig(componentId: string, componentInstance: DesignerComponentInstance) { + const inputGroupProps = new TimePickerProperty(componentId, designerHostService); + return inputGroupProps.getPropertyConfig(schema, componentInstance); } return { diff --git a/packages/ui-vue/components/tree-view/src/tree-view.component.tsx b/packages/ui-vue/components/tree-view/src/tree-view.component.tsx index d9321065a1c..fce3b661a7c 100644 --- a/packages/ui-vue/components/tree-view/src/tree-view.component.tsx +++ b/packages/ui-vue/components/tree-view/src/tree-view.component.tsx @@ -183,6 +183,9 @@ export default defineComponent({ } } + function clearSelection(){ + useSelectionComposition.clearSelection(); + } context.expose({ addNewDataItem, addNewChildDataItem, @@ -191,7 +194,8 @@ export default defineComponent({ acceptDataItem, cancelDataItem, selectItem, - updateDataSource + updateDataSource, + clearSelection }); watch( -- Gitee From b81289c9dbfe2c96aa519727807160b96668c15c Mon Sep 17 00:00:00 2001 From: wang-xh Date: Thu, 28 Nov 2024 11:27:49 +0800 Subject: [PATCH 003/181] =?UTF-8?q?fix:=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E4=BF=9D=E5=AD=98=E6=A8=A1=E5=9E=8B=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=B8=AD=E6=96=B9=E6=B3=95=E5=8F=82=E6=95=B0=E7=9A=84?= =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/method-list/method-list.component.tsx | 11 +++++++++-- .../components/method-list/use-method.ts | 11 ++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/packages/designer/src/components/components/view-model-designer/method-manager/components/method-list/method-list.component.tsx b/packages/designer/src/components/components/view-model-designer/method-manager/components/method-list/method-list.component.tsx index 7a533a0cc42..06766207857 100644 --- a/packages/designer/src/components/components/view-model-designer/method-manager/components/method-list/method-list.component.tsx +++ b/packages/designer/src/components/components/view-model-designer/method-manager/components/method-list/method-list.component.tsx @@ -26,7 +26,7 @@ export default defineComponent({ const rowNumberOption = computed(() => { return { enable: false }; }); const { commandsData, activeViewModel, selectedTreeNode, isCommandNodeSelected, - paramsData, updateCommandParamFromWebCmd, onChangeSelectedCommand + paramsData, updateCommandParamFromWebCmd, onChangeSelectedCommand, updateViewModel } = useViewModelMethod(props); // 初始化加载数据设置节点全部收起 @@ -94,7 +94,13 @@ export default defineComponent({ ; } } - + /** + * 方法参数变更后事件 + */ + function onParameterValueChanged(newValue: any, paramData: any) { + paramData.value = newValue; + updateViewModel(commandsData.value) + } /** * 渲染操作的来源信息 */ @@ -171,6 +177,7 @@ export default defineComponent({ '} + onChange={(newValue) => { onParameterValueChanged(newValue, paramData) }} > diff --git a/packages/designer/src/components/components/view-model-designer/method-manager/components/method-list/use-method.ts b/packages/designer/src/components/components/view-model-designer/method-manager/components/method-list/use-method.ts index c80fc49d00c..649c54c5253 100644 --- a/packages/designer/src/components/components/view-model-designer/method-manager/components/method-list/use-method.ts +++ b/packages/designer/src/components/components/view-model-designer/method-manager/components/method-list/use-method.ts @@ -52,15 +52,15 @@ export function useViewModelMethod(props: MethodListProps) { * 将变更同步到表单DOM中 * @param commands 命令列表 */ - function updateViewModel(commands: Array) { + function updateViewModel(commands: any[]) { if (!commands || !activeViewModel.value) { return; } activeViewModel.value.commands = commands.length > 0 ? commands - .filter((command: Command) => command.data instanceof Command && command.data.toJson) - .map((commandData: Command) => { - return commandData.toJson(); + .filter((command: any) => command.data instanceof Command && command.data.toJson) + .map((commandData: any) => { + return commandData.data.toJson(); }) : []; const originalViewModel = useFormSchema?.getViewModelById(activeViewModel.value.id); @@ -89,6 +89,7 @@ export function useViewModelMethod(props: MethodListProps) { isCommandNodeSelected, paramsData, onChangeSelectedCommand, - updateCommandParamFromWebCmd + updateCommandParamFromWebCmd, + updateViewModel }; } -- Gitee From 4f14dd8d27edcfc58a7f7b2a74de36a5a8c17813 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Thu, 28 Nov 2024 11:52:51 +0800 Subject: [PATCH 004/181] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../property-config/lookup.property-config.ts | 20 +++------ .../src/composition/entity/base-property.ts | 44 +++++++++---------- .../composition/entity/input-base-property.ts | 10 +++-- 3 files changed, 36 insertions(+), 38 deletions(-) diff --git a/packages/ui-vue/components/lookup/src/property-config/lookup.property-config.ts b/packages/ui-vue/components/lookup/src/property-config/lookup.property-config.ts index fe2c729bb2e..29a064bbd02 100644 --- a/packages/ui-vue/components/lookup/src/property-config/lookup.property-config.ts +++ b/packages/ui-vue/components/lookup/src/property-config/lookup.property-config.ts @@ -11,20 +11,14 @@ import { DesignerComponentInstance } from "../../../designer-canvas/src/types"; export const LookupSchemaRepositoryToken = Symbol('schema_repository_token'); -export class LookupPropertyConfig extends BaseControlProperty { - getPropertyConfig(propertyData: any) { - const basic = this.getBasicPropConfig(propertyData); +export class LookupPropertyConfig extends InputBaseProperty { + getPropertyConfig(propertyData: any, componentInstance: DesignerComponentInstance) { + const basic = this.getBasicProperties(propertyData, componentInstance); const entityInfo = this.getTableInfo(); lookupDataSourceConverter['entityCode'] = entityInfo?.code; lookupBindingFieldConverter['entityCode'] = entityInfo?.code; - basic.properties.binding = { - description: "绑定字段", - title: "绑定字段", - type: "string", - $converter: lookupBindingFieldConverter, - editor: this.getBindingFieldEditorOptions(propertyData) - }; + basic.properties.binding.$converter = lookupBindingFieldConverter; const appearance = this.getAppearanceConfig(); const behavior = this.getBehaviorConfig(propertyData); @@ -45,7 +39,7 @@ export class LookupPropertyConfig extends BaseControlProperty { return { description: "Basic Infomation", title: "行为", - properties:{ + properties: { editable: { description: "", title: "允许编辑", @@ -88,7 +82,7 @@ export class LookupPropertyConfig extends BaseControlProperty { } private getLookupConfig(propertyData: any) { - + return { description: "Basic Infomation", title: "编辑器", @@ -192,7 +186,7 @@ export class LookupPropertyConfig extends BaseControlProperty { repositoryToken: FieldSelectorRepositoryToken } }, - mapFields:{ + mapFields: { description: "字段映射", title: "字段映射", type: "string", diff --git a/packages/ui-vue/components/property-panel/src/composition/entity/base-property.ts b/packages/ui-vue/components/property-panel/src/composition/entity/base-property.ts index 06530bd1017..905d6c5a835 100644 --- a/packages/ui-vue/components/property-panel/src/composition/entity/base-property.ts +++ b/packages/ui-vue/components/property-panel/src/composition/entity/base-property.ts @@ -109,26 +109,26 @@ export class BaseControlProperty { }; } - getBindingFieldEditorOptions(propertyData) { - const formBasicInfo = this.formSchemaUtils.getFormMetadataBasicInfo(); - - return { - type: "field-selector", - bindingType: { "enable": false }, - editorParams: { - propertyData, - formBasicInfo - }, - columns: [ - { field: 'name', title: '字段名称' }, - { field: 'bindingField', title: '绑定字段' }, - { field: 'fieldType', title: '字段类型' } - ], - beforeOpenDialog: (params) => { - const treeFields = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId); - params.instance.loadData(treeFields); - }, - textField: 'bindingField' - }; - } + // getBindingFieldEditorOptions(propertyData) { + // const formBasicInfo = this.formSchemaUtils.getFormMetadataBasicInfo(); + + // return { + // type: "field-selector", + // bindingType: { "enable": false }, + // editorParams: { + // propertyData, + // formBasicInfo + // }, + // columns: [ + // { field: 'name', title: '字段名称' }, + // { field: 'bindingField', title: '绑定字段' }, + // { field: 'fieldType', title: '字段类型' } + // ], + // beforeOpenDialog: (params) => { + // const treeFields = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId); + // params.instance.loadData(treeFields); + // }, + // textField: 'bindingField' + // }; + // } } diff --git a/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts b/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts index dcc06cfb531..d23034f01e7 100644 --- a/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts +++ b/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts @@ -19,11 +19,11 @@ export class InputBaseProperty extends BaseControlProperty { return this.propertyConfig; } - public getBasicProperties(propertyData, componentInstance) { + public getBasicProperties(propertyData, componentInstance): any { var self = this; this.setDesignViewModelField(propertyData); const formBasicInfo = this.formSchemaUtils.getFormMetadataBasicInfo(); - const data = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId); + // const data = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId); return { description: 'Basic Information', title: '基本信息', @@ -69,7 +69,11 @@ export class InputBaseProperty extends BaseControlProperty { { field: 'bindingField', title: '绑定字段' }, { field: 'fieldType', title: '字段类型' } ], - data + beforeOpenDialog: (params) => { + const treeFields = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId); + params.instance.loadData(treeFields); + }, + textField: 'bindingField' } } }, -- Gitee From cabd5ad3c2caf43aaaec7cf2281fbf7a1c80ee20 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Thu, 28 Nov 2024 17:12:09 +0800 Subject: [PATCH 005/181] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E5=B1=9E=E6=80=A7=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/designer-item.component.tsx | 11 ++++++----- .../dynamic-resolver/src/property-config-resolver.ts | 8 -------- .../lookup/src/designer/use-lookup-rules.ts | 10 +++++----- .../src/composition/entity/input-base-property.ts | 3 ++- .../src/property-config/splitter.property-config.json | 6 ++++-- .../tabs/src/designer/tab-use-designer-rules.ts | 1 - .../tabs/src/property-config/tabs.property-config.ts | 11 ++++------- 7 files changed, 21 insertions(+), 29 deletions(-) diff --git a/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx b/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx index b882b815aaf..9e2db8b1b8e 100644 --- a/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx +++ b/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx @@ -33,11 +33,12 @@ const FDesignerItem = defineComponent({ const classObject = { 'farris-component': true, // 受position-relative影响,整个容器的高度不能被撑起 - 'flex-fill':schema.value.id=='root-component', + 'flex-fill': schema.value.id == 'root-component', 'position-relative': canMove.value && canDelete.value, 'farris-nested': canNested.value, 'can-move': canMove.value, 'd-none': designerItemElementRef.value && (designerItemElementRef.value as HTMLElement).classList.contains('d-none'), + 'dgComponentSelected': designerItemElementRef.value && (designerItemElementRef.value as HTMLElement).classList.contains('dgComponentSelected'), } as Record; classObject[`farris-component-${schema.value.type}`] = true; if (componentClass) { @@ -177,7 +178,7 @@ const FDesignerItem = defineComponent({ const propsConverter = componentPropsConverter[componentKey]; const viewProps = propsConverter ? propsConverter(viewSchema) : {}; viewProps.customClass = props.ignore ? viewProps.customClass : ''; - viewProps.componentId=componentId.value; + viewProps.componentId = componentId.value; const shouldShowPlaceholder = viewSchema.contents && viewSchema.contents.length === 0; const hasContent = viewSchema.contents && !!viewSchema.contents.length; return hasContent && Component ? ( @@ -279,14 +280,14 @@ const FDesignerItem = defineComponent({ Array.from(currentSelectedElements).forEach((element: HTMLElement) => element.classList.remove('dgComponentSelected')); designerItemElement.classList.add('dgComponentFocused'); - context.emit('selectionChange', schema.value.type, schema.value,componentId.value, componentInstance.value); - if(componentInstance.value.getDraggableDesignItemElement){ + context.emit('selectionChange', schema.value.type, schema.value, componentId.value, componentInstance.value); + if (componentInstance.value.getDraggableDesignItemElement) { const draggabledesignerItemElementRef = componentInstance.value.getDraggableDesignItemElement(designItemContext); if (draggabledesignerItemElementRef && draggabledesignerItemElementRef.value) { draggabledesignerItemElementRef.value.classList.add('dgComponentSelected'); } } - + } } diff --git a/packages/ui-vue/components/dynamic-resolver/src/property-config-resolver.ts b/packages/ui-vue/components/dynamic-resolver/src/property-config-resolver.ts index 6cb38ae9fa9..adbe05c2b36 100644 --- a/packages/ui-vue/components/dynamic-resolver/src/property-config-resolver.ts +++ b/packages/ui-vue/components/dynamic-resolver/src/property-config-resolver.ts @@ -211,14 +211,6 @@ function getPropertyConfigBySchema(rawSchema: ComponentSchema, schemaService: Sc const editingSchema = resolveSchemaWithDefaultValue(rawSchema) as ComponentSchema; const propertyConfigMap = {} as Record; - if (rawSchema.editor?.type === 'lookup') { - schemaType = 'lookup'; - } - - if (schemaType === 'lookup' && designerItem.elementRef.editorRef) { - designerItem = designerItem.elementRef.editorRef; - } - // 先从ConfigMap中取简单类属性,若找不到,则在控件实例中取复杂属性 let propertyConfigSchema = propertyConfig || propertyConfigSchemaMap[schemaType]; if (Object.keys(propertyConfigSchema).length === 0 && designerItem && designerItem.getPropConfig) { diff --git a/packages/ui-vue/components/lookup/src/designer/use-lookup-rules.ts b/packages/ui-vue/components/lookup/src/designer/use-lookup-rules.ts index dbebd4ed388..35890832e06 100644 --- a/packages/ui-vue/components/lookup/src/designer/use-lookup-rules.ts +++ b/packages/ui-vue/components/lookup/src/designer/use-lookup-rules.ts @@ -1,6 +1,6 @@ /* eslint-disable max-len */ import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; +import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; import { LookupPropertyConfig } from "../property-config/lookup.property-config"; @@ -13,12 +13,12 @@ export function useLookupDesignerRules(designItemContext: DesignerItemContext, d resolveComponentContext, triggerBelongedComponentToMoveWhenMoved, triggerBelongedComponentToDeleteWhenDeleted } = useInputDesignerRules(designItemContext, designerHostService); - const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 - function getPropsConfig(componentId: string) { - const inputGroupProps=new LookupPropertyConfig(componentId, designerHostService); - return inputGroupProps.getPropertyConfig(schema); + function getPropsConfig(componentId: string, componentInstance: DesignerComponentInstance) { + const schema = designItemContext.schema as ComponentSchema; + const inputGroupProps = new LookupPropertyConfig(componentId, designerHostService); + return inputGroupProps.getPropertyConfig(schema, componentInstance); } return { diff --git a/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts b/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts index d23034f01e7..23c43cec753 100644 --- a/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts +++ b/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts @@ -45,7 +45,7 @@ export class InputBaseProperty extends BaseControlProperty { textField: 'value', valueField: 'key', editable: false, - data: SchemaDOMMapping.getEditorTypesByMDataType(self.designViewModelField.type.name) + data: SchemaDOMMapping.getEditorTypesByMDataType(self.designViewModelField?.type?.name) } }, label: { @@ -181,6 +181,7 @@ export class InputBaseProperty extends BaseControlProperty { // 5、替换控件 parentContainer.contents.splice(index, 1); parentContainer.contents.splice(index, 0, newControl); + componentInstance.schema = Object.assign(oldControl, newControl); // 6、暂时移除旧控件的选中样式(后续考虑更好的方式) Array.from(document.getElementsByClassName('dgComponentSelected') as HTMLCollectionOf).forEach( diff --git a/packages/ui-vue/components/splitter/src/property-config/splitter.property-config.json b/packages/ui-vue/components/splitter/src/property-config/splitter.property-config.json index 946daf0ac56..384d2718af5 100644 --- a/packages/ui-vue/components/splitter/src/property-config/splitter.property-config.json +++ b/packages/ui-vue/components/splitter/src/property-config/splitter.property-config.json @@ -18,8 +18,10 @@ "title": "控件类型", "type": "select", "editor": { - "type": "Splitter", - "enum": [] + "type": "combo-list", + "textField": "value", + "valueField": "key", + "data": [{ "key":"splitter", "value": "分栏面板" }] } } } diff --git a/packages/ui-vue/components/tabs/src/designer/tab-use-designer-rules.ts b/packages/ui-vue/components/tabs/src/designer/tab-use-designer-rules.ts index b148c9c2851..e8564bd1bc8 100644 --- a/packages/ui-vue/components/tabs/src/designer/tab-use-designer-rules.ts +++ b/packages/ui-vue/components/tabs/src/designer/tab-use-designer-rules.ts @@ -95,7 +95,6 @@ export function useDesignerRules(schema: ComponentSchema, designerItemContext?: } // 构造属性配置方法 function getPropsConfig(componentId: string) { - // const dataGridProp = new DataGridProperty(componentId, designerHostService); return tabsPropertyConfigs; } return { diff --git a/packages/ui-vue/components/tabs/src/property-config/tabs.property-config.ts b/packages/ui-vue/components/tabs/src/property-config/tabs.property-config.ts index d6b3951be90..1a1404ac7fa 100644 --- a/packages/ui-vue/components/tabs/src/property-config/tabs.property-config.ts +++ b/packages/ui-vue/components/tabs/src/property-config/tabs.property-config.ts @@ -18,14 +18,11 @@ export const tabsPropertyConfigs={ "title": "控件类型", "type": "select", "editor": { - "type": "Splitter", - "enum": [] + "type": "combo-list", + "textField": "value", + "valueField": "key", + "data": [{ "key":"tabs", "value": "标签页" }] } - }, - "title": { - "title": "标题", - "type": "string", - "description": "标题" } } }, -- Gitee From 6f192b5d8507975e2e8dab58acb3ab7b0389d029 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Fri, 29 Nov 2024 11:35:16 +0800 Subject: [PATCH 006/181] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E7=94=BB=E5=B8=83=E6=8E=A7=E4=BB=B6=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E9=9D=A2=E6=9D=BF=E7=9A=84=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=97=A0=E6=B3=95=E5=88=B7=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/designer/use-designer-rules.ts | 10 ++- .../src/property-panel.component.tsx | 24 ++++--- .../designer/splitter-use-designer-rules.ts | 70 +++++++++++++++++-- 3 files changed, 88 insertions(+), 16 deletions(-) diff --git a/packages/ui-vue/components/page-header/src/designer/use-designer-rules.ts b/packages/ui-vue/components/page-header/src/designer/use-designer-rules.ts index 750ac360b92..bd432617e61 100644 --- a/packages/ui-vue/components/page-header/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/page-header/src/designer/use-designer-rules.ts @@ -9,7 +9,13 @@ export function useDesignerRules(schema: ComponentSchema, designerHostService): function canAccepts(draggingContext: DraggingResolveContext): boolean { return false; } + function checkCanDeleteComponent() { + return false; + } + function checkCanMoveComponent() { + return false; + } function hideNestedPaddingInDesginerView() { return true; } @@ -23,6 +29,8 @@ export function useDesignerRules(schema: ComponentSchema, designerHostService): return { canAccepts, hideNestedPaddingInDesginerView, - getPropsConfig + getPropsConfig, + checkCanDeleteComponent, + checkCanMoveComponent }; } diff --git a/packages/ui-vue/components/property-panel/src/property-panel.component.tsx b/packages/ui-vue/components/property-panel/src/property-panel.component.tsx index 5a8eb1028b4..cdd7ac7de9d 100644 --- a/packages/ui-vue/components/property-panel/src/property-panel.component.tsx +++ b/packages/ui-vue/components/property-panel/src/property-panel.component.tsx @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { defineComponent, SetupContext, ref, watch, onMounted, onBeforeMount, inject, getCurrentInstance,ComponentInternalInstance } from 'vue'; +import { defineComponent, SetupContext, ref, watch, onMounted, onBeforeMount, inject } from 'vue'; import { PropertyPanelProps, propertyPanelProps } from './composition/props/property-panel.props'; import { getPropertyConfigBySchema } from '../../dynamic-resolver/src/property-config-resolver'; import { SchemaService } from '../../dynamic-resolver'; @@ -69,8 +69,9 @@ export default defineComponent({ /** 当前选中的标签页 */ const selectedTab = ref(); - const {proxy} = getCurrentInstance() as ComponentInternalInstance; - // jumphere + /** 给分类组件配置唯一id,用于切换控件时强制刷新分类 */ + const categoryReload = ref(0); + function collectProperties() { properties = []; if (selectedTab.value && selectedTab.value.categoryList && Array.isArray(selectedTab.value.categoryList) && selectedTab.value.categoryList.length > 0) { @@ -275,11 +276,11 @@ export default defineComponent({ // 触发属性面板更新的时机 watch(() => [props.schema, props.isShowPanel], () => { propertyData.value = props.schema; - propertyConfig.value = getPropertyConfigBySchema(propertyData.value, schemaService as SchemaService, designerItem,componentId ); + propertyConfig.value = getPropertyConfigBySchema(propertyData.value, schemaService as SchemaService, designerItem, componentId); checkShowTabCategory(); onClearEvent(keyword.value); - // 解决属性面板只更新值但是控件不更新的问题 - proxy!.$forceUpdate(); + + categoryReload.value++; }); onMounted(() => { @@ -291,7 +292,7 @@ export default defineComponent({ if (!propertyData.value || newSchema) { propertyData.value = newSchema || props.schema; } - propertyConfig.value = getPropertyConfigBySchema(propertyData.value, schemaService as SchemaService, designerItem,componentId, newPropertyConfig); + propertyConfig.value = getPropertyConfigBySchema(propertyData.value, schemaService as SchemaService, designerItem, componentId, newPropertyConfig); checkShowTabCategory(); onClearEvent(keyword.value); } @@ -299,7 +300,7 @@ export default defineComponent({ * 用于在设计器里 * @param designerItem */ - function updateDesignerItem(item: any,compId:string) { + function updateDesignerItem(item: any, compId: string) { designerItem = item; componentId = compId; } @@ -335,7 +336,7 @@ export default defineComponent({ } } function onRefreshPanel() { - propertyConfig.value = getPropertyConfigBySchema(propertyData.value, schemaService as SchemaService, designerItem,componentId); + propertyConfig.value = getPropertyConfigBySchema(propertyData.value, schemaService as SchemaService, designerItem, componentId); checkShowTabCategory(); } /** 搜索框 */ @@ -375,6 +376,7 @@ export default defineComponent({ function onValueChanged($event: any) { context.emit('propertyChanged', $event); } + /** 属性面板值 */ function handlePanelBody() { if (selectedTab.value) { @@ -382,7 +384,6 @@ export default defineComponent({
    {selectedTab.value?.categoryList?.map((category: ElementPropertyConfig) => { - // [attr.categoryId]="category?.categoryId" return (
  • {!category.hide && !category.hideTitle && ( @@ -395,8 +396,9 @@ export default defineComponent({ {category.categoryName} )} -
  • onChangeModelTab('method')}> 方法
  • -
  • +
  • onChangeModelTab('variable')}> 变量
diff --git a/packages/designer/src/components/designer.component.tsx b/packages/designer/src/components/designer.component.tsx index efff69298e4..bbf74c6176a 100644 --- a/packages/designer/src/components/designer.component.tsx +++ b/packages/designer/src/components/designer.component.tsx @@ -43,15 +43,15 @@ export default defineComponent({ const eventsEditorUtils = useEventsEditorUtils(formCommandService, useFormSchemaComposition, useEventsEditorService); provide('eventsEditorUtils', eventsEditorUtils); // 操作表单DOM Schema的工具类 - const schemaService=useSchemaService(useFormSchemaComposition); + const schemaService = useSchemaService(useFormSchemaComposition); provide('schemaService', schemaService); // 操作表单设计时ViewModel的工具类 - const designViewModelService=useDesignViewModel(useFormSchemaComposition,schemaService); + const designViewModelService = useDesignViewModel(useFormSchemaComposition, schemaService); provide('designViewModelUtils', designViewModelService); // 控件创建服务 - const controlCreatorService=useControlCreator(); + const controlCreatorService = useControlCreator(); provide('controlCreatorUtils', controlCreatorService); - provide('formMetadataConverter',new FormMetadataConverter()) + provide('formMetadataConverter', new FormMetadataConverter()) const useFormMetadataComposition = useFormMetadata(props, useFormSchemaComposition); onBeforeMount(() => { @@ -86,7 +86,7 @@ export default defineComponent({ * 保存表单 */ function saveFormMetadata() { - const loadingInstance = loadingService?.show({message:'保存中,请稍候...'}); + const loadingInstance = loadingService?.show({ message: '保存中,请稍候...' }); useFormMetadataComposition.saveFormMetadata().then(() => { notifyService.success({ message: '表单保存成功' }); loadingInstance.value.close(); @@ -99,7 +99,7 @@ export default defineComponent({ * 运行表单 */ function runForm() { - const loadingInstance = loadingService?.show({message:'保存中,请稍候...'}); + const loadingInstance = loadingService?.show({ message: '保存中,请稍候...' }); useFormMetadataComposition.saveFormMetadata().then(() => { const metadataId = useFormSchemaComposition.getFormMetadataBasicInfo()?.id; loadingInstance.value.close(); @@ -116,15 +116,22 @@ export default defineComponent({ { id: 'save', text: '保存', onClick: saveFormMetadata }, { id: 'run', text: '运行', onClick: runForm, class: 'btn-primary' } ]; - + /** + * 切换设计器视图与代码视图 + */ + function onChangeDesignerView(viewType: string) { + if (viewType === 'Code') { + notifyService.warning('暂不支持'); + } + } return () => { return ( metadataLoaded.value ?
-
设计器
-
代码
+
设计器
+
onChangeDesignerView('Code')}>
代码
-- Gitee From 4650acaa13503689263594b8c9df7b3b96032c72 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Thu, 5 Dec 2024 19:47:45 +0800 Subject: [PATCH 013/181] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E4=BB=8E?= =?UTF-8?q?=E6=9C=80=E8=BF=91=E5=88=97=E8=A1=A8=E4=B8=AD=E6=89=93=E4=B8=8D?= =?UTF-8?q?=E5=BC=80vue=E8=A1=A8=E5=8D=95=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/composition/metadata.service.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/designer/src/components/composition/metadata.service.ts b/packages/designer/src/components/composition/metadata.service.ts index 4f031c3fe80..e31216d8a42 100644 --- a/packages/designer/src/components/composition/metadata.service.ts +++ b/packages/designer/src/components/composition/metadata.service.ts @@ -13,11 +13,13 @@ export class MetadataService { public getMetadataPath() { const { getUrlParam } = useLocation(); - const metadataPath = getUrlParam('id') || ''; - if (metadataPath) { - metadataPath.slice(1, metadataPath.length - 1); + let metadataPath = getUrlParam('id') || ''; + if (metadataPath && metadataPath.startsWith('/')) { + metadataPath = metadataPath.slice(1, metadataPath.length); + } + if (metadataPath && metadataPath.endsWith('/')) { + metadataPath = metadataPath.slice(0, metadataPath.length - 1); } - return metadataPath; } -- Gitee From 6a04cae05404c309911028532534cd595ad3615f Mon Sep 17 00:00:00 2001 From: wang-xh Date: Fri, 6 Dec 2024 16:29:12 +0800 Subject: [PATCH 014/181] =?UTF-8?q?feature:=20=E5=B1=9E=E6=80=A7=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E4=B8=AD=E4=BF=AE=E6=94=B9=E6=8E=A7=E4=BB=B6=E7=9A=84?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E7=B1=BB=E5=B1=9E=E6=80=A7=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8E=A7=E4=BB=B6=E6=A0=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form-designer/form-designer.component.tsx | 8 ++ .../designer-outline/src/designer-outline.css | 4 + .../page-header.property-config.ts | 11 ++ .../composition/entity/input-base-property.ts | 4 + .../src/designer/use-designer-rules.ts | 8 ++ .../section.property-config.json | 99 ----------------- .../section.property-config.ts | 105 ++++++++++++++++++ .../components/section/src/section.props.ts | 3 +- .../tabs/src/components/tab-page.props.ts | 2 +- .../components/tabs/src/composition/types.ts | 4 +- .../tab-header-item.design.component.tsx | 8 +- .../designer/tab-header.design.component.tsx | 2 +- .../src/designer/tab-use-designer-rules.ts | 11 +- .../tabs/src/designer/tabs-use-design.ts | 20 ++-- .../tab-page.property-config.json | 65 ----------- .../tab-page.property-config.ts | 76 +++++++++++++ .../property-config/tabs.property-config.json | 72 ------------ 17 files changed, 245 insertions(+), 257 deletions(-) delete mode 100644 packages/ui-vue/components/section/src/property-config/section.property-config.json create mode 100644 packages/ui-vue/components/section/src/property-config/section.property-config.ts delete mode 100644 packages/ui-vue/components/tabs/src/property-config/tab-page.property-config.json create mode 100644 packages/ui-vue/components/tabs/src/property-config/tab-page.property-config.ts delete mode 100644 packages/ui-vue/components/tabs/src/property-config/tabs.property-config.json diff --git a/packages/designer/src/components/components/form-designer/form-designer.component.tsx b/packages/designer/src/components/components/form-designer/form-designer.component.tsx index cbaf93c1e12..f1b421d2c3f 100644 --- a/packages/designer/src/components/components/form-designer/form-designer.component.tsx +++ b/packages/designer/src/components/components/form-designer/form-designer.component.tsx @@ -53,6 +53,13 @@ export default defineComponent({ } } + function onPropertyChanged(event: any) { + const { changeObject } = event; + if (changeObject.needRefreshControlTree && controlTreeRef.value && controlTreeRef.value.refreshControlTree) { + controlTreeRef.value.refreshControlTree(); + } + } + const activeDesignerView = ref('formDesigner'); function onChangeDesignerView(viewName: string) { @@ -117,6 +124,7 @@ export default defineComponent({ propertyConfig={propertyConfig.value} propertyName={propertyName.value} schema={focusingSchema.value} + onPropertyChanged={onPropertyChanged} >
{renderDataGridSummery()} - {shouldRenderPagination.value && renderDataGridPagination()} {isDisabled.value && renderDisableMask()}
); diff --git a/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts b/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts index e5ddc09ea2a..a7fe8a0ceb3 100644 --- a/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts +++ b/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts @@ -17,6 +17,7 @@ import { Ref, SetupContext, ShallowRef, nextTick, ref } from 'vue'; import { TabsProps } from '../tabs.props'; import { TabPageContext, UseDesignTabs } from '../composition/types'; import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from '../../../designer-canvas/src/types'; +import { canvasChanged } from '../../../designer-canvas/src/composition/designer-canvas-changed'; export function useDesignTabs( props: TabsProps, @@ -173,6 +174,7 @@ export function useDesignTabs( } tabs?.splice(index, 1); setAcitveTab(tabId); + canvasChanged.value++; } function deactiveElements() { Array.from(document.getElementsByClassName('dgComponentFocused') as HTMLCollectionOf).forEach( -- Gitee From 1eb889e4eb82c55d797fa63f74c82c8a444998d7 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Tue, 10 Dec 2024 10:32:11 +0800 Subject: [PATCH 016/181] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=8D?= =?UTF-8?q?=E9=80=89=E6=A1=86=E7=BB=84=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=9B=E5=8D=A1=E7=89=87=E7=B1=BB?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=94=A8formColumns=E6=A0=87=E8=AF=86?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E5=86=85=E6=AF=8F=E8=A1=8C=E6=94=BE=E5=87=A0?= =?UTF-8?q?=E5=88=97=E6=8E=A7=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/checkbox/src/schema/check-group.schema.json | 2 +- packages/ui-vue/components/component/src/component.props.ts | 3 ++- .../content-container/src/designer/use-designer-rules.ts | 2 +- .../src/composition/response-form-component-creator.service.ts | 2 +- .../components/dynamic-form/src/schema/schema-resolver.ts | 3 ++- .../src/composition/entity/schema-dom-mapping.ts | 1 + 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/ui-vue/components/checkbox/src/schema/check-group.schema.json b/packages/ui-vue/components/checkbox/src/schema/check-group.schema.json index d7176d2e0b9..6c538b842a4 100644 --- a/packages/ui-vue/components/checkbox/src/schema/check-group.schema.json +++ b/packages/ui-vue/components/checkbox/src/schema/check-group.schema.json @@ -12,7 +12,7 @@ "type": { "description": "The type string of check box component", "type": "string", - "default": "checkbox" + "default": "check-group" }, "appearance": { "description": "", diff --git a/packages/ui-vue/components/component/src/component.props.ts b/packages/ui-vue/components/component/src/component.props.ts index ff59b157aa2..7e52ed544e0 100644 --- a/packages/ui-vue/components/component/src/component.props.ts +++ b/packages/ui-vue/components/component/src/component.props.ts @@ -9,7 +9,8 @@ import propertyConfig from './property-config/component.property-config.json'; export const componentProps = { id: { type: String }, customClass: { type: String, default: '' }, - componentType: { type: String, default: '' } + componentType: { type: String, default: '' }, + formColumns: { type: Number, default: 4 } } as Record; export type ComponentPropsType = ExtractPropTypes; diff --git a/packages/ui-vue/components/content-container/src/designer/use-designer-rules.ts b/packages/ui-vue/components/content-container/src/designer/use-designer-rules.ts index 2ba1ce754ed..6653c8ac1cc 100644 --- a/packages/ui-vue/components/content-container/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/content-container/src/designer/use-designer-rules.ts @@ -24,7 +24,7 @@ export function useDesignerRules(schema: ComponentSchema, parentSchema?: Compone let isInFixedContextRules = false; /** - * 用container表示的form组件,只接收form-group输入类控件 + * 只接收form-group输入类控件 */ function checkFormContainerAcceptable(draggingContext: DraggingResolveContext) { diff --git a/packages/ui-vue/components/dynamic-form/src/composition/response-form-component-creator.service.ts b/packages/ui-vue/components/dynamic-form/src/composition/response-form-component-creator.service.ts index b00ce648a9e..d4442b5e714 100644 --- a/packages/ui-vue/components/dynamic-form/src/composition/response-form-component-creator.service.ts +++ b/packages/ui-vue/components/dynamic-form/src/composition/response-form-component-creator.service.ts @@ -128,7 +128,7 @@ export class ResponseFormComponentCreatorService { let className = ''; switch (buildInfo.formColumns) { case 1: { - className = 'col-12 col-md-12 col-xl-12 col-el-12'; + className = 'col-12'; break; } case 2: { diff --git a/packages/ui-vue/components/dynamic-form/src/schema/schema-resolver.ts b/packages/ui-vue/components/dynamic-form/src/schema/schema-resolver.ts index 67fc115ac62..60e7e553f1e 100644 --- a/packages/ui-vue/components/dynamic-form/src/schema/schema-resolver.ts +++ b/packages/ui-vue/components/dynamic-form/src/schema/schema-resolver.ts @@ -9,12 +9,13 @@ import { ResponseFormComponentCreatorService } from "../composition/response-for export function schemaResolver(resolver: DynamicResolver, schema: Record, context: Record, designerHostService: DesignerHostService): Record { const parentComponentInstance = context.parentComponentInstance as DesignerComponentInstance; if (parentComponentInstance) { + const parentComponentType = parentComponentInstance.schema?.type; const radomNumber = Math.random().toString(36).slice(2, 6); const componentBuildInfo: ComponentBuildInfo = { componentId: `form-${radomNumber}`, componentName: `标题`, componentType: 'form', - formColumns: 4, + formColumns: parentComponentType === 'splitter-pane' ? 1 : 4, parentContainerId: parentComponentInstance.schema.id, bindTo: '/', } diff --git a/packages/ui-vue/components/property-panel/src/composition/entity/schema-dom-mapping.ts b/packages/ui-vue/components/property-panel/src/composition/entity/schema-dom-mapping.ts index 44ba087859e..cc573876f66 100644 --- a/packages/ui-vue/components/property-panel/src/composition/entity/schema-dom-mapping.ts +++ b/packages/ui-vue/components/property-panel/src/composition/entity/schema-dom-mapping.ts @@ -11,6 +11,7 @@ export class SchemaDOMMapping { { key: DgControl['lookup'].type, value: DgControl['lookup'].name }, { key: DgControl['date-picker'].type, value: DgControl['date-picker'].name }, { key: DgControl['check-box'].type, value: DgControl['check-box'].name }, + { key: DgControl['check-group'].type, value: DgControl['check-group'].name }, { key: DgControl['radio-group'].type, value: DgControl['radio-group'].name }, { key: DgControl['combo-list'].type, value: DgControl['combo-list'].name }, { key: DgControl['textarea'].type, value: DgControl['textarea'].name }, -- Gitee From b1866b28b7b55112ab0a51f5d1b9e7c4dc03f4ca Mon Sep 17 00:00:00 2001 From: wang-xh Date: Wed, 11 Dec 2024 18:06:46 +0800 Subject: [PATCH 017/181] =?UTF-8?q?feature:=20=E7=9B=91=E5=90=AC=E7=94=BB?= =?UTF-8?q?=E5=B8=83=E5=B0=BA=E5=AF=B8=E5=8F=98=E5=8C=96=EF=BC=8C=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E6=8E=A7=E4=BB=B6=E6=93=8D=E4=BD=9C=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/designer-item.component.tsx | 20 +++++++++++-------- .../src/designer-canvas.component.tsx | 20 ++++++++++++++++++- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx b/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx index c28b155e3c5..09078d3c818 100644 --- a/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx +++ b/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx @@ -21,7 +21,7 @@ const FDesignerItem = defineComponent({ const componentId = ref(props.componentId || ''); const designComponentStyle = ref(''); const designComponentClass = ref(''); - const designCustomClass= ref(props.customClass); + const designCustomClass = ref(props.customClass); const designerItemElementRef = ref(); const useDragulaComposition = inject('canvas-dragula'); const componentInstance = ref() as Ref; @@ -44,9 +44,9 @@ const FDesignerItem = defineComponent({ 'dgComponentFocused': designerItemElementRef.value && (designerItemElementRef.value as HTMLElement).classList.contains('dgComponentFocused'), } as Record; classObject[`farris-component-${schema.value.type}`] = true; - classObject=getCustomClass(classObject,componentClass); - classObject=getCustomClass(classObject,designComponentClass.value); - classObject=getCustomClass(classObject,designCustomClass.value); + classObject = getCustomClass(classObject, componentClass); + classObject = getCustomClass(classObject, designComponentClass.value); + classObject = getCustomClass(classObject, designCustomClass.value); return classObject; }); @@ -221,8 +221,8 @@ const FDesignerItem = defineComponent({ } ); - function updatePositionOfButtonGroup(event: Event) { - const targetEl = event.target as any; + function updatePositionOfButtonGroup(event: Event | any) { + const targetEl = event?.target as any; setPositionOfButtonGroup(targetEl); } @@ -249,6 +249,8 @@ const FDesignerItem = defineComponent({ designerItemElementRef.value.componentInstance = componentInstance; designerItemElementRef.value.designItemContext = designItemContext; } + componentInstance.value.belongedComponentId = componentId.value; + } bindingScrollEvent(); @@ -269,6 +271,7 @@ const FDesignerItem = defineComponent({ payload.preventDefault(); payload.stopPropagation(); } + let draggabledesignerItemElementRef: any = designItemContext.designerItemElementRef; const designerItemElement = designerItemElementRef.value as HTMLElement; if (designerItemElement) { const currentSelectedElements = document.getElementsByClassName('dgComponentSelected') as HTMLCollectionOf; @@ -283,9 +286,10 @@ const FDesignerItem = defineComponent({ designerItemElement.classList.add('dgComponentFocused'); context.emit('selectionChange', schema.value.type, schema.value, componentId.value, componentInstance.value); if (componentInstance.value.getDraggableDesignItemElement) { - const draggabledesignerItemElementRef = componentInstance.value.getDraggableDesignItemElement(designItemContext); + draggabledesignerItemElementRef = componentInstance.value.getDraggableDesignItemElement(designItemContext); if (draggabledesignerItemElementRef && draggabledesignerItemElementRef.value) { draggabledesignerItemElementRef.value.classList.add('dgComponentSelected'); + } } @@ -293,7 +297,7 @@ const FDesignerItem = defineComponent({ } } - updatePositionOfButtonGroup(payload); + updatePositionOfButtonGroup({ target: draggabledesignerItemElementRef?.value }); } return () => { diff --git a/packages/ui-vue/components/designer-canvas/src/designer-canvas.component.tsx b/packages/ui-vue/components/designer-canvas/src/designer-canvas.component.tsx index 40266444f9c..087688108cd 100644 --- a/packages/ui-vue/components/designer-canvas/src/designer-canvas.component.tsx +++ b/packages/ui-vue/components/designer-canvas/src/designer-canvas.component.tsx @@ -21,7 +21,9 @@ export default defineComponent({ const designerItemElementRef = ref(); const componentInstance = ref(); const componentId = ref(props.componentId); - + let resizeObserver: ResizeObserver; + let resizeObserverTimer; + const designerHostService = { eventsEditorUtils: inject('eventsEditorUtils'), formSchemaUtils: inject('useFormSchema'), @@ -59,6 +61,7 @@ export default defineComponent({ } schema.value = props.modelValue; context.emit('init', useDragulaComposition); + registerResizeListenner(); }); watch(canvasChanged, () => { @@ -67,6 +70,21 @@ export default defineComponent({ context.emit('canvasChanged'); }, { flush: 'post' }); + /** + * 监听画布尺寸变化,重新计算操作图标位置 + */ + function registerResizeListenner() { + resizeObserver = new ResizeObserver(() => { + if (resizeObserverTimer) { + clearTimeout(resizeObserverTimer); + } + + resizeObserverTimer = setTimeout(() => { + setPositionOfButtonGroup(designerCanvasElementRef.value); + }); + }); + resizeObserver.observe(designerCanvasElementRef.value); + } function onSelectionChange(schemaType: string, schemaValue: ComponentSchema, cmpId: string, componentInst: DesignerComponentInstance) { context.emit('selectionChange', schemaType, schemaValue, cmpId, componentInst); } -- Gitee From eecec29beb344597ebb26f39177090be8dd1f000 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Thu, 12 Dec 2024 08:49:06 +0800 Subject: [PATCH 018/181] =?UTF-8?q?feature:=20=E8=B0=83=E6=95=B4=E7=94=BB?= =?UTF-8?q?=E5=B8=83=E6=8B=96=E6=8B=BD=E6=8E=A7=E5=88=B6=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/template-rules/card-template.json | 45 ++ .../public/assets/template-rules/common.json | 397 ++++++++++++++++++ .../template-rules/list-card-template.json | 41 ++ .../assets/template-rules/list-template.json | 32 ++ .../template-rules/tree-card-template.json | 92 ++++ .../composition/form-metadata.service.ts | 34 +- .../components/composition/use-form-schema.ts | 28 +- .../src/components/designer.component.tsx | 13 +- .../designer/src/components/types/metadata.ts | 9 +- .../src/schema/combo-tree.schema.json | 4 +- .../designer/component.design.component.tsx | 4 +- .../src/designer/use-designer-rules.ts | 91 +--- .../content-container.design.component.tsx | 10 +- .../src/designer/use-designer-rules.ts | 151 +------ .../designer/data-grid.design.component.tsx | 13 +- .../src/designer/use-designer-rules.ts | 4 +- .../src/composition/class/designer-canvas.css | 2 +- .../function/use-designer-component.ts | 25 +- .../function/use-designer-inner-component.ts | 21 - .../src/composition/function/use-dragula.ts | 1 - .../{ => rule}/use-dragula-common-rule.ts | 29 +- .../src/composition/rule/use-template-rule.ts | 143 +++++++ .../designer-canvas/src/composition/types.ts | 5 +- .../components/designer-canvas/src/types.ts | 5 +- .../designer-toolbox/src/toolbox.json | 6 + .../response-form.design.component.tsx | 3 +- .../src/designer/use-designer-rules.ts | 114 +---- .../dynamic-resolver/src/schema-resolver.ts | 4 +- .../external-container.design.component.tsx | 5 +- .../src/designer/use-designer-rules.ts | 95 +---- .../layout-pane-use-designer-rules.ts | 19 +- .../designer/layout-pane.design.component.tsx | 4 +- .../src/composition/use-designer-rules.ts | 181 -------- .../designer/list-nav.design.component.tsx | 8 +- .../src/designer/use-designer-rules.ts | 48 +++ .../response-toolbar.design.component.tsx | 11 +- .../src/designer/use-designer-item-rules.ts | 150 +------ .../src/designer/use-designer-rules.ts | 147 +------ .../schema/response-toolbar-item.schema.json | 4 +- .../src/designer/section.design.component.tsx | 7 +- .../src/designer/use-designer-rules.ts | 98 +---- .../section/src/schema/schema-resolver.ts | 2 +- .../splitter-pane-use-designer-rules.ts | 76 +--- .../splitter-pane.design.component.tsx | 8 +- .../designer/splitter-use-designer-rules.ts | 70 +-- .../designer/splitter.design.component.tsx | 8 +- .../switch/src/schema/switch.schema.json | 2 +- .../designer/tab-page-use-designer-rules.ts | 26 +- .../designer/tab-page.design.component.tsx | 4 +- .../src/designer/tab-use-designer-rules.ts | 89 +--- .../src/designer/tabs.design.component.tsx | 4 +- .../tabs/src/schema/schema-resolver.ts | 2 +- 52 files changed, 1111 insertions(+), 1283 deletions(-) create mode 100644 packages/designer/public/assets/template-rules/card-template.json create mode 100644 packages/designer/public/assets/template-rules/common.json create mode 100644 packages/designer/public/assets/template-rules/list-card-template.json create mode 100644 packages/designer/public/assets/template-rules/list-template.json create mode 100644 packages/designer/public/assets/template-rules/tree-card-template.json rename packages/ui-vue/components/designer-canvas/src/composition/{ => rule}/use-dragula-common-rule.ts (40%) create mode 100644 packages/ui-vue/components/designer-canvas/src/composition/rule/use-template-rule.ts delete mode 100644 packages/ui-vue/components/list-nav/src/composition/use-designer-rules.ts create mode 100644 packages/ui-vue/components/list-nav/src/designer/use-designer-rules.ts diff --git a/packages/designer/public/assets/template-rules/card-template.json b/packages/designer/public/assets/template-rules/card-template.json new file mode 100644 index 00000000000..e4893b36cf0 --- /dev/null +++ b/packages/designer/public/assets/template-rules/card-template.json @@ -0,0 +1,45 @@ +{ + + "f-struct-like-card": { + "description": "页面主区域like-card,若只有一个,那么不可移动、删除,但可以接收控件", + "canAccept": true, + "canMove": { + "invalidContext": [ + { + "parent": { + "class": "f-page-main", + "isUnique": true + } + }, + { + "parent": { + "class": "f-scrollspy-content", + "isUnique": true + } + } + ] + }, + "canDelete": { + "invalidContext": [ + { + "parent": { + "class": "f-page-main", + "isUnique": true + } + }, + { + "parent": { + "class": "f-scrollspy-content", + "isUnique": true + } + } + ] + } + }, + "f-scrollspy-content": { + "description": "滚动监听容器", + "canMove": false, + "canDelete": false, + "canAccept": false + } +} \ No newline at end of file diff --git a/packages/designer/public/assets/template-rules/common.json b/packages/designer/public/assets/template-rules/common.json new file mode 100644 index 00000000000..4cc21cf7c3a --- /dev/null +++ b/packages/designer/public/assets/template-rules/common.json @@ -0,0 +1,397 @@ +{ + "f-page": { + "description": "页面根容器", + "canAccept": false, + "canMove": false, + "canDelete": false + }, + "f-page-header": { + "description": "页面头部", + "canAccept": false, + "canMove": false, + "canDelete": false + }, + "f-page-main": { + "description": "页面主区域", + "canMove": { + "invalidContext": [ + { + "parent": [ + { + "class": "f-page" + } + ] + } + ] + }, + "canDelete": { + "invalidContext": [ + { + "parent": [ + { + "class": "f-page" + } + ] + } + ] + }, + "canAccept": false + }, + "f-grid-is-sub": { + "description": "表格组件的父级容器", + "canAccept": { + "invalidContext": [ + { + "parent": { + "class": "f-struct-is-subgrid" + }, + "firstLevelChild": { + "class": "f-component-grid" + } + }, + { + "parent": { + "class": "f-struct-is-subgrid" + }, + "firstLevelChild": { + "class": "f-component-treetable" + } + } + ] + }, + "canMove": { + "invalidContext": [ + { + "parent": { + "class": "f-struct-is-subgrid" + }, + "firstLevelChild": { + "class": "f-component-grid" + } + }, + { + "parent": { + "class": "f-struct-is-subgrid" + }, + "firstLevelChild": { + "class": "f-component-treetable" + } + } + ] + }, + "canDelete": { + "invalidContext": [ + { + "parent": { + "class": "f-struct-is-subgrid" + }, + "firstLevelChild": { + "class": "f-component-grid" + } + }, + { + "parent": { + "class": "f-struct-is-subgrid" + }, + "firstLevelChild": { + "class": "f-component-treetable" + } + } + ] + } + }, + "f-section-grid": { + "description": "表格组件内的父级分组面板", + "canMove": { + "invalidContext": [ + { + "parent": [ + { + "class": "f-struct-wrapper" + } + ], + "contents": [ + { + "class": "f-component-grid" + } + ] + } + ] + }, + "canDelete": { + "invalidContext": [ + { + "parent": [ + { + "class": "f-struct-wrapper" + } + ], + "contents": [ + { + "class": "f-component-grid" + } + ] + } + ] + }, + "canAccept": { + "invalidContext": [ + { + "parent": [ + { + "class": "f-struct-wrapper" + } + ], + "contents": [ + { + "class": "f-component-grid" + } + ] + } + ] + } + }, + "f-struct-wrapper": { + "description": "子表分组面板的父容器(container>section>component-ref)、子表tab的父容器(container>section>tab)", + "canMove": true, + "canDelete": true, + "canAccept": { + "invalidContext": [ + { + "firstLevelChild": { + "type": "section", + "class": "f-section-tabs" + }, + "secondLevelChild": { + "type": "tabs" + } + }, + { + "firstLevelChild": { + "type": "section", + "class": "f-section-in-main" + }, + "secondLevelChild": { + "type": "component-ref" + } + }, + { + "firstLevelChild": { + "type": "section", + "class": "f-section-in-mainsubcard" + }, + "secondLevelChild": { + "type": "component-ref" + } + } + ] + } + }, + "f-section-form": { + "description": "卡片面板的父级分组面板、附件的父级分组面板", + "canMove": { + "invalidContext": [ + { + "parent": { + "type": "component" + }, + "firstLevelChild": { + "class": "f-form-layout" + } + }, + { + "parent": { + "type": "component" + }, + "firstLevelChild": { + "type": "uploader" + } + } + ] + }, + "canDelete": { + "invalidContext": [ + { + "parent": { + "type": "component" + }, + "firstLevelChild": { + "class": "f-form-layout" + } + }, + { + "parent": { + "type": "component" + }, + "firstLevelChild": { + "type": "uploader" + } + } + ] + }, + "canAccept": { + "invalidContext": [ + { + "parent": { + "type": "component" + }, + "firstLevelChild": { + "class": "f-form-layout" + } + }, + { + "parent": { + "type": "component" + }, + "firstLevelChild": { + "type": "uploader" + } + } + ] + } + }, + "f-form-layout": { + "description": "卡片面板", + "canDelete": false, + "canAccept": true, + "canMove": false + }, + "f-component-tabs": { + "description": "子表区域固定层级:container>section>tabs", + "canDelete": false, + "canAccept": false, + "canMove": false + }, + "f-component-grid": { + "description": "表格组件", + "canDelete": false, + "canAccept": false, + "canMove": false + }, + "f-section-in-mainsubcard": { + "description": "子表区域的父级section,container>section>tabs或者container>section>component-ref", + "canMove": { + "invalidContext": [ + { + "parent": { + "class": "f-struct-wrapper" + }, + "firstLevelChild": { + "class": "f-component-tabs" + } + }, + { + "parent": { + "class": "f-struct-wrapper" + }, + "firstLevelChild": { + "type": "component-ref" + } + } + ] + }, + "canDelete": { + "invalidContext": [ + { + "parent": { + "class": "f-struct-wrapper" + }, + "firstLevelChild": { + "class": "f-component-tabs" + } + }, + { + "parent": { + "class": "f-struct-wrapper" + }, + "firstLevelChild": { + "type": "component-ref" + } + } + ] + }, + "canAccept": { + "invalidContext": [ + { + "parent": { + "class": "f-struct-wrapper" + }, + "firstLevelChild": { + "class": "f-component-tabs" + } + }, + { + "parent": { + "class": "f-struct-wrapper" + }, + "firstLevelChild": { + "type": "component-ref" + } + } + ] + } + }, + "f-section-in-main": { + "description": "子表区域的父级section,container>section>tabs或者container>section>component-ref", + "canMove": { + "invalidContext": [ + { + "parent": { + "class": "f-struct-wrapper" + }, + "firstLevelChild": { + "class": "f-component-tabs" + } + }, + { + "parent": { + "class": "f-struct-wrapper" + }, + "firstLevelChild": { + "type": "component-ref" + } + } + ] + }, + "canDelete": { + "invalidContext": [ + { + "parent": { + "class": "f-struct-wrapper" + }, + "firstLevelChild": { + "class": "f-component-tabs" + } + }, + { + "parent": { + "class": "f-struct-wrapper" + }, + "firstLevelChild": { + "type": "component-ref" + } + } + ] + }, + "canAccept": { + "invalidContext": [ + { + "parent": { + "class": "f-struct-wrapper" + }, + "firstLevelChild": { + "class": "f-component-tabs" + } + }, + { + "parent": { + "class": "f-struct-wrapper" + }, + "firstLevelChild": { + "type": "component-ref" + } + } + ] + } + } +} \ No newline at end of file diff --git a/packages/designer/public/assets/template-rules/list-card-template.json b/packages/designer/public/assets/template-rules/list-card-template.json new file mode 100644 index 00000000000..dcf87b78261 --- /dev/null +++ b/packages/designer/public/assets/template-rules/list-card-template.json @@ -0,0 +1,41 @@ +{ + "f-page-content": { + "description": "分栏面板", + "canMove": false, + "canDelete": false, + "canAccept": false + }, + "f-page-content-nav": { + "description": "分栏面板导航区域(左侧)", + "canMove": false, + "canDelete": false, + "canAccept": false + }, + "f-page-content-main": { + "description": "分栏面板主区域(右侧)", + "canMove": false, + "canDelete": false, + "canAccept": true + }, + "f-struct-wrapper": { + "description": "表格组件", + "canMove": { + "invalidContext": [ + { + "parent": { + "class": "f-page-content-nav" + } + } + ] + }, + "canDelete": { + "invalidContext": [ + { + "parent": { + "class": "f-page-content-nav" + } + } + ] + } + } +} \ No newline at end of file diff --git a/packages/designer/public/assets/template-rules/list-template.json b/packages/designer/public/assets/template-rules/list-template.json new file mode 100644 index 00000000000..830be9b3f14 --- /dev/null +++ b/packages/designer/public/assets/template-rules/list-template.json @@ -0,0 +1,32 @@ +{ + "f-struct-wrapper": { + "description": "管理列表的表格", + "canMove": { + "invalidContext": [ + { + "parent": { + "class": "f-page-main" + } + } + ] + }, + "canDelete": { + "invalidContext": [ + { + "parent": { + "class": "f-page-main" + } + } + ] + }, + "canAccept": { + "invalidContext": [ + { + "parent": { + "class": "f-page-main" + } + } + ] + } + } +} \ No newline at end of file diff --git a/packages/designer/public/assets/template-rules/tree-card-template.json b/packages/designer/public/assets/template-rules/tree-card-template.json new file mode 100644 index 00000000000..8e6cd8bf1d1 --- /dev/null +++ b/packages/designer/public/assets/template-rules/tree-card-template.json @@ -0,0 +1,92 @@ +{ + "f-page-content": { + "description": "分栏面板", + "canMove": false, + "canDelete": false, + "canAccept": false + }, + "f-page-content-nav": { + "description": "分栏面板导航区域(左侧)", + "canMove": false, + "canDelete": false, + "canAccept": false + }, + "f-page-content-main": { + "description": "分栏面板主区域(右侧)", + "canMove": false, + "canDelete": false, + "canAccept": true + }, + "f-struct-wrapper": { + "description": "表格组件", + "canMove": { + "invalidContext": [ + { + "parent": { + "class": "f-page-content-nav" + } + } + ] + }, + "canDelete": { + "invalidContext": [ + { + "parent": { + "class": "f-page-content-nav" + } + } + ] + } + }, + "f-section-treegrid": { + "description": "树表格组件的父级分组面板", + "canMove": { + "invalidContext": [ + { + "parent": [ + { + "class": "f-struct-wrapper" + } + ], + "contents": [ + { + "class": "f-component-treetable" + } + ] + } + ] + }, + "canDelete": { + "invalidContext": [ + { + "parent": [ + { + "class": "f-struct-wrapper" + } + ], + "contents": [ + { + "class": "f-component-grid" + } + ] + } + ] + }, + "canAccept": { + "invalidContext": [ + { + "parent": [ + { + "class": "f-struct-wrapper" + } + ], + "contents": [ + { + "class": "f-component-grid" + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/packages/designer/src/components/composition/form-metadata.service.ts b/packages/designer/src/components/composition/form-metadata.service.ts index 729dbc991f9..9f4dec4705a 100644 --- a/packages/designer/src/components/composition/form-metadata.service.ts +++ b/packages/designer/src/components/composition/form-metadata.service.ts @@ -1,8 +1,8 @@ import axios from 'axios'; -import { omit } from 'lodash-es'; +import { mergeWith, omit } from 'lodash-es'; import { DesignerProps } from '../designer.props'; import { FormMetadataConverter } from './form-metadata-converter'; -import { FormMetadaDataDom, MetadataDto, MetadataPathToken, UseFormSchema,UseFormMetadata } from '../types'; +import { FormMetadaDataDom, MetadataDto, MetadataPathToken, UseFormSchema, UseFormMetadata } from '../types'; import { inject } from 'vue'; import { MetadataService } from './metadata.service'; @@ -79,5 +79,33 @@ export function useFormMetadata(props: DesignerProps, useFormSchemaComposition: return new MetadataService().saveMetadata(newDto); } - return { queryMetadata, saveFormMetadata }; + /** + * 获取拖拽控制规则:合并公共规则和模板的特定规则 + */ + function queryFormTemplateRule(templateId: string): Promise { + return new Promise((resolve, reject) => { + const rulesRequests = [axios.get(`assets/template-rules/common.json`)]; + if (templateId) { + rulesRequests.push(axios.get(`assets/template-rules/${templateId}.json`)); + } + axios.all(rulesRequests).then(axios.spread((commonRuleResult, templateRuleResult) => { + + if (templateRuleResult) { + function customizer(objValue, srcValue) { + if (Array.isArray(objValue) && Array.isArray(srcValue)) { + return objValue.concat(srcValue);; + } + } + mergeWith(commonRuleResult.data, templateRuleResult.data, customizer) + } + useFormSchemaComposition.setFormTemplateRule(commonRuleResult.data); + resolve(); + }), () => { + resolve(); + }); + }); + + + } + return { queryMetadata, saveFormMetadata, queryFormTemplateRule }; } diff --git a/packages/designer/src/components/composition/use-form-schema.ts b/packages/designer/src/components/composition/use-form-schema.ts index 9621c2e77d5..8faf8920103 100644 --- a/packages/designer/src/components/composition/use-form-schema.ts +++ b/packages/designer/src/components/composition/use-form-schema.ts @@ -21,6 +21,8 @@ export function useFormSchema(): UseFormSchema { let nodeTypeCollect: Map = new Map(); /** 控件id与控件展示名称、控件路径的映射 <控件id, {showName:控件展示名称,parentPathName:控件路径} */ let controlBasicInfoMap = new Map(); + /** 当前表单模板的拖拽控制规则 */ + let formTemplateRules: any; function getControlBasicInfoMap(): Map { return controlBasicInfoMap; @@ -90,13 +92,13 @@ export function useFormSchema(): UseFormSchema { * @param targetComponentId * @returns */ - function getViewModelIdByComponentId(targetComponentId:string):string{ + function getViewModelIdByComponentId(targetComponentId: string): string { if (!formSchema.module || !formSchema.module.components || formSchema.module.components.length === 0) { return ''; } - const targetComponent=formSchema.module.components.find(component => component.id === targetComponentId); - return targetComponent?.viewModel||''; + const targetComponent = formSchema.module.components.find(component => component.id === targetComponentId); + return targetComponent?.viewModel || ''; } /** * 根据viewModelId获取模型节点 @@ -173,8 +175,8 @@ export function useFormSchema(): UseFormSchema { function setViewmodels(value) { formSchema.module.viewmodels = value; } - function getComponents(): FormComponent[]{ - return formSchema?.module?.components||[]; + function getComponents(): FormComponent[] { + return formSchema?.module?.components || []; } function setComponents(value) { formSchema.module.components = value; @@ -186,7 +188,7 @@ export function useFormSchema(): UseFormSchema { function setModule(value) { formSchema.module = value; } - function getModule():FormMetaDataModule{ + function getModule(): FormMetaDataModule { return formSchema.module; } @@ -196,8 +198,8 @@ export function useFormSchema(): UseFormSchema { function getCommands(): FormWebCmd[] { return formSchema?.module?.webcmds || []; } - function setCommands(value:Array) { - formSchema.module.webcmds=value || []; + function setCommands(value: Array) { + formSchema.module.webcmds = value || []; } function getServiceRefs(): any[] { return formSchema.module.serviceRefs || []; @@ -1268,6 +1270,12 @@ export function useFormSchema(): UseFormSchema { } } + function setFormTemplateRule(rules: any) { + formTemplateRules = rules; + } + function getFormTemplateRule(): any { + return formTemplateRules; + } return { getModule, setViewmodels, @@ -1291,6 +1299,8 @@ export function useFormSchema(): UseFormSchema { addViewModelField, getSchemas, clearViewModelFieldSchema, - modifyViewModelFieldById + modifyViewModelFieldById, + setFormTemplateRule, + getFormTemplateRule }; } diff --git a/packages/designer/src/components/designer.component.tsx b/packages/designer/src/components/designer.component.tsx index bbf74c6176a..fecd5d4ddc6 100644 --- a/packages/designer/src/components/designer.component.tsx +++ b/packages/designer/src/components/designer.component.tsx @@ -57,11 +57,14 @@ export default defineComponent({ onBeforeMount(() => { useFormMetadataComposition.queryMetadata().then((formSchema: FormMetadaDataDom) => { schema.value = formSchema; - metadataLoaded.value = true; - // 加载命令=》虽然是异步,但是此处不需要异步串联 - formCommandService.checkCommands(); - // 赋值处理 - designViewModelService.assembleDesignViewModel(); + useFormMetadataComposition.queryFormTemplateRule(formSchema?.module?.templateId).then(() => { + metadataLoaded.value = true; + // 加载命令=》虽然是异步,但是此处不需要异步串联 + formCommandService.checkCommands(); + // 赋值处理 + designViewModelService.assembleDesignViewModel(); + + }) }); }); diff --git a/packages/designer/src/components/types/metadata.ts b/packages/designer/src/components/types/metadata.ts index b2f993cc5c5..d88628e8f65 100644 --- a/packages/designer/src/components/types/metadata.ts +++ b/packages/designer/src/components/types/metadata.ts @@ -141,7 +141,12 @@ export interface MetadataDto { nameLanguage: any; } export interface UseFormMetadata { + /** 查询表单元数据 */ queryMetadata: () => Promise; + /** 保存表单元数据 */ + saveFormMetadata: () => void; + /** 查询表单模板的拖拽控制规则 */ + queryFormTemplateRule: (templateId: string) => Promise; } export interface UseFormSchema { @@ -198,6 +203,8 @@ export interface UseFormSchema { deleteViewModelFieldById: (viewModelId: string, fieldId: string) => void; clearViewModelFieldSchema: (viewModelId, fieldId) => void; modifyViewModelFieldById: (viewModelId, fieldId, changeObject, isMerge: boolean) => void; + setFormTemplateRule: (rules: any) => void; + getFormTemplateRule: () => any; } export interface UseSchemaService { @@ -214,6 +221,6 @@ export interface UseDesignViewModel { } export interface UseControlCreator { setFormFieldProperty: (field: FormSchemaEntityField, editorType: string, controlClass: string) => any; - setGridFieldProperty: (field: FormSchemaEntityField, metadata: any, needInlineEditor: false) => any; + setGridFieldProperty: (gridType: string, field: FormSchemaEntityField, metadata: any, needInlineEditor: false) => any; createFormGroupWithoutField: (editorType: string, controlClass: string) => any; } \ No newline at end of file diff --git a/packages/ui-vue/components/combo-tree/src/schema/combo-tree.schema.json b/packages/ui-vue/components/combo-tree/src/schema/combo-tree.schema.json index b2b476cec28..93f013d1a08 100644 --- a/packages/ui-vue/components/combo-tree/src/schema/combo-tree.schema.json +++ b/packages/ui-vue/components/combo-tree/src/schema/combo-tree.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://farris-design.gitee.io/combo-list.schema.json", - "title": "combo-list", + "title": "combo-tree", "description": "A Farris Input Component", "type": "object", "properties": { @@ -12,7 +12,7 @@ "type": { "description": "The type string of number combo list component", "type": "string", - "default": "combo-list" + "default": "combo-tree" }, "appearance": { "description": "", diff --git a/packages/ui-vue/components/component/src/designer/component.design.component.tsx b/packages/ui-vue/components/component/src/designer/component.design.component.tsx index e526e28844e..7ea6d9c8cab 100644 --- a/packages/ui-vue/components/component/src/designer/component.design.component.tsx +++ b/packages/ui-vue/components/component/src/designer/component.design.component.tsx @@ -1,3 +1,4 @@ +import { DesignerHostService } from '../../../designer-canvas/src/composition/types'; import { SetupContext, defineComponent, inject, ref, onMounted } from 'vue'; import { useDesignerComponent } from '../../../designer-canvas/src/composition/function/use-designer-component'; import { DesignerItemContext } from '../../../designer-canvas/src/types'; @@ -10,8 +11,9 @@ export default defineComponent({ emits: [], setup(props: ComponentPropsType, context) { const elementRef = ref(); + const designerHostService = inject('designer-host-service'); const designItemContext = inject('design-item-context') as DesignerItemContext; - const designerRulesComposition = useDesignerRules(designItemContext); + const designerRulesComposition = useDesignerRules(designItemContext, designerHostService); const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); onMounted(() => { diff --git a/packages/ui-vue/components/component/src/designer/use-designer-rules.ts b/packages/ui-vue/components/component/src/designer/use-designer-rules.ts index cad7b101d14..410b705624d 100644 --- a/packages/ui-vue/components/component/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/component/src/designer/use-designer-rules.ts @@ -1,22 +1,12 @@ /* eslint-disable max-len */ /* eslint-disable complexity */ -import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; -import { useDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-drag-drop-rules"; +import { DesignerHostService, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; +import { DesignerItemContext } from "../../../designer-canvas/src/types"; +import { UseTemplateDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-template-rule"; -export function useDesignerRules(designItemContext: DesignerItemContext): UseDesignerRules { - - const dragAndDropRules = useDragAndDropRules(); - - let canAcceptChildContent = true; - - let hideNestedPadding = false; - - let schemaContext: any; - - let isInFixedContextRules = false; - - const canRemove = false; +export function useDesignerRules(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { + const dragAndDropRules = new UseTemplateDragAndDropRules(); + const { canMove, canDelete } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); /** * 判断是否可以接收拖拽新增的子级控件 @@ -26,75 +16,20 @@ export function useDesignerRules(designItemContext: DesignerItemContext): UseDes } function checkCanDeleteComponent() { - return canRemove || !isInFixedContextRules; + return canDelete; } function checkCanMoveComponent() { - return !isInFixedContextRules; + return canMove; } - /** - * 判断当前容器的上下文 - */ - function resolveComponentContext() { - isInFixedContextRules = false; - const component = designItemContext.schema; - - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' '); - - // 子级节点 - const childContents = component.contents || []; - const firstChildContent = childContents.length ? childContents[0] : null; - const firstChildClass = firstChildContent && firstChildContent.appearance ? firstChildContent.appearance.class : ''; - const firstChildClassList = firstChildClass ? firstChildClass.split(' ') : []; - const childrenClassList = childContents.length ? childContents.reduce((classList: string[], childComponentSchema: ComponentSchema) => { - const childCompoentClass = childComponentSchema && childComponentSchema.appearance ? childComponentSchema.appearance.class : ''; - const childCompoentClassList = childCompoentClass ? childCompoentClass.split(' ') : []; - classList.push(...childCompoentClassList); - return classList; - }, []) : []; - - // 组件引用ComponentRef节点 - if (designItemContext.parent?.schema?.type !== 'component-ref') { - canAcceptChildContent = false; - hideNestedPadding = true; - isInFixedContextRules = true; - return; - } - // 组件引用节点的父级 - const componentRefParent = designItemContext.parent.parent; - const componentRefParentSchema = componentRefParent && componentRefParent.schema; - const componentRefParentClass = componentRefParentSchema && componentRefParentSchema.appearance ? componentRefParentSchema.appearance.class : ''; - const componentRefParentClassList = componentRefParentClass ? componentRefParentClass.split(' ') : []; - - - schemaContext = { - componentClass, - componentClassList, - childContents, - firstChildContent, - firstChildClass, - firstChildClassList, - parent:componentRefParentSchema, - parentClass: componentRefParentClass, - parentClassList: componentRefParentClassList, - children: childContents, - childrenClassList - }; - - const { canAccept, fixed, hidePadding } = dragAndDropRules.getRuleValue(componentClassList[0], schemaContext); - canAcceptChildContent = canAccept; - hideNestedPadding = hidePadding; - isInFixedContextRules = fixed; - return; - - } function hideNestedPaddingInDesginerView() { - return hideNestedPadding; + return false; + } + function getStyles(): string { + return ' display: inherit;flex-direction: inherit;margin-bottom:10px'; } - return { canAccepts, checkCanDeleteComponent, checkCanMoveComponent, resolveComponentContext, hideNestedPaddingInDesginerView }; + return { canAccepts, checkCanDeleteComponent, checkCanMoveComponent, hideNestedPaddingInDesginerView, getStyles }; } diff --git a/packages/ui-vue/components/content-container/src/designer/content-container.design.component.tsx b/packages/ui-vue/components/content-container/src/designer/content-container.design.component.tsx index 72418b3a87f..57608c8c45b 100644 --- a/packages/ui-vue/components/content-container/src/designer/content-container.design.component.tsx +++ b/packages/ui-vue/components/content-container/src/designer/content-container.design.component.tsx @@ -1,24 +1,26 @@ import { SetupContext, computed, defineComponent, inject, onMounted, ref } from 'vue'; import { ContentContainerPropsType, contentContainerProps } from '../content-container.props'; -import { useDesignerRules } from './use-designer-rules'; +import { useDesignerRulesForContentContainer } from './use-designer-rules'; import { DesignerItemContext } from '../../../designer-canvas/src/types'; import { useDesignerComponent } from '../../../designer-canvas/src/composition/function/use-designer-component'; import { getCustomClass } from '../../../common'; +import { DesignerHostService } from '../../../designer-canvas/src/composition/types'; export default defineComponent({ name: 'FContentContainerDesign', props: contentContainerProps, emits: [], setup(props: ContentContainerPropsType, context) { const elementRef = ref(); + const designerHostService = inject('designer-host-service'); const designItemContext = inject('design-item-context') as DesignerItemContext; - const designerRulesComposition = useDesignerRules(designItemContext.schema, designItemContext.parent?.schema); + const designerRulesComposition = useDesignerRulesForContentContainer(designItemContext, designerHostService); const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); const containerClass = computed(() => { const classObject = { 'drag-container': true } as Record; - return getCustomClass(classObject,props?.customClass); + return getCustomClass(classObject, props?.customClass); }); onMounted(() => { elementRef.value.componentInstance = componentInstance; @@ -28,7 +30,7 @@ export default defineComponent({ return () => { return ( -
+
{context.slots.default && context.slots.default()}
); diff --git a/packages/ui-vue/components/content-container/src/designer/use-designer-rules.ts b/packages/ui-vue/components/content-container/src/designer/use-designer-rules.ts index 6653c8ac1cc..a86820dbad9 100644 --- a/packages/ui-vue/components/content-container/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/content-container/src/designer/use-designer-rules.ts @@ -1,115 +1,27 @@ /* eslint-disable max-len */ /* eslint-disable complexity */ -import { nextTick, ref } from "vue"; -import { DesignerHTMLElement, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/use-dragula-common-rule"; -import { ComponentSchema, ResolveComponentContext } from "../../../designer-canvas/src/types"; -import { getSchemaByType } from "../../../dynamic-resolver/src/schema-resolver"; -import { useDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-drag-drop-rules"; +import { nextTick } from "vue"; +import { DesignerHostService, DesignerHTMLElement, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; +import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/rule/use-dragula-common-rule"; +import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; +import { UseTemplateDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-template-rule"; -export function useDesignerRules(schema: ComponentSchema, parentSchema?: ComponentSchema): UseDesignerRules { - const dragAndDropRules = useDragAndDropRules(); - /** 组件在拖拽时是否需要将所属的Component一起拖拽 */ - const triggerBelongedComponentToMoveWhenMoved = ref(false); - - /** 组件在删除时需要将所属的Component一起拖拽 */ - const triggerBelongedComponentToDeleteWhenDeleted = ref(false); - - let canAcceptChildContent = true; - - let hideNestedPadding = false; - - let schemaContext: any; - - let isInFixedContextRules = false; - - /** - * 只接收form-group输入类控件 - */ - function checkFormContainerAcceptable(draggingContext: DraggingResolveContext) { - - if (schemaContext && schemaContext.componentClassList && schemaContext.componentClassList.includes('f-form-layout') && schemaContext.componentClassList.includes('farris-form')) { - // 从工具箱拖入的输入类控件 - if (draggingContext.sourceType === 'control' && draggingContext.controlCategory === 'input') { - return true; - } - - // 画布中移动位置的输入类控件 - if (draggingContext.sourceType === 'move' && draggingContext.controlType === 'form-group') { - return true; - } - return false; - } - return true; - } +export function useDesignerRulesForContentContainer(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { + const schema = designItemContext.schema as ComponentSchema; + const dragAndDropRules = new UseTemplateDragAndDropRules(); + const { canMove, canAccept, canDelete } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); /** * 判断是否可以接收拖拽新增的子级控件 */ function canAccepts(draggingContext: DraggingResolveContext): boolean { - const basalRule = useDragulaCommonRule().basalDragulaRuleForContainer(draggingContext); + const basalRule = useDragulaCommonRule().basalDragulaRuleForContainer(draggingContext, designerHostService); if (!basalRule) { return false; } - if (!canAcceptChildContent) { - return false; - } - if (!checkFormContainerAcceptable(draggingContext)) { - return false; - } - return true; - } - - /** - * 判断当前容器的上下文 - */ - function resolveComponentContext() { - triggerBelongedComponentToMoveWhenMoved.value = false; - triggerBelongedComponentToDeleteWhenDeleted.value = false; - const component = schema; - - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' '); - - // 子级节点 - const childContents = component.contents || []; - const firstChildContent = childContents.length ? childContents[0] : null; - const firstChildClass = firstChildContent && firstChildContent.appearance ? firstChildContent.appearance.class : ''; - const firstChildClassList = firstChildClass ? firstChildClass.split(' ') : []; - const childrenClassList = childContents.length ? childContents.reduce((classList: string[], childComponentSchema: ComponentSchema) => { - const childCompoentClass = childComponentSchema && childComponentSchema.appearance ? childComponentSchema.appearance.class : ''; - const childCompoentClassList = childCompoentClass ? childCompoentClass.split(' ') : []; - classList.push(...childCompoentClassList); - return classList; - }, []) : []; - - // 父级节点 - const parent = parentSchema; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - schemaContext = { - componentClass, - componentClassList, - childContents, - firstChildContent, - firstChildClass, - firstChildClassList, - parent, - parentClass, - parentClassList, - children: childContents, - childrenClassList - }; - - const { canAccept, fixed, hidePadding } = dragAndDropRules.getRuleValue(componentClassList[0], schemaContext); - canAcceptChildContent = canAccept; - hideNestedPadding = hidePadding; - isInFixedContextRules = fixed; - return true; + return canAccept; } function onAcceptMovedChildElement(sourceElement: DesignerHTMLElement) { @@ -124,56 +36,21 @@ export function useDesignerRules(schema: ComponentSchema, parentSchema?: Compone return ''; } - function onResolveNewComponentSchema(resolveContext: ResolveComponentContext, compnentSchema: ComponentSchema): ComponentSchema { - const component = schema; - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' ') as string[]; - if (componentClassList.includes('f-form-layout')) { - const { label } = resolveContext; - const formGroupElementSchema = getSchemaByType('form-group') as ComponentSchema; - formGroupElementSchema.editor = compnentSchema; - formGroupElementSchema.label = label; - return formGroupElementSchema; - } - return compnentSchema; - } - - function onAcceptNewChildElement(element: DesignerHTMLElement, targetPosition: number, compnentSchema: ComponentSchema): ComponentSchema { - const component = schema; - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' ') as string[]; - if (componentClassList.includes('f-form-layout')) { - const label = String(element.innerText); - const formGroupElementSchema = getSchemaByType('form-group') as ComponentSchema; - formGroupElementSchema.editor = compnentSchema; - formGroupElementSchema.label = label; - return formGroupElementSchema; - } - return compnentSchema; - } - function checkCanMoveComponent() { - return !isInFixedContextRules; + return canMove; } function checkCanDeleteComponent() { - return !isInFixedContextRules; + return canDelete; } function hideNestedPaddingInDesginerView() { - return hideNestedPadding; + return !canMove && !canDelete; } return { canAccepts, - resolveComponentContext, getStyles, - onAcceptNewChildElement, onAcceptMovedChildElement, - onResolveNewComponentSchema, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, checkCanMoveComponent, checkCanDeleteComponent, hideNestedPaddingInDesginerView diff --git a/packages/ui-vue/components/data-grid/src/designer/data-grid.design.component.tsx b/packages/ui-vue/components/data-grid/src/designer/data-grid.design.component.tsx index 44176b11782..25c8352a479 100644 --- a/packages/ui-vue/components/data-grid/src/designer/data-grid.design.component.tsx +++ b/packages/ui-vue/components/data-grid/src/designer/data-grid.design.component.tsx @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { DataGridDesignProps, dataGridDesignProps} from '../data-grid.props'; +import { DataGridDesignProps, dataGridDesignProps } from '../data-grid.props'; import { computed, defineComponent, onUnmounted, onMounted, ref, nextTick, watch, SetupContext, inject } from 'vue'; import { useResizeObserver } from '@vueuse/core'; @@ -24,14 +24,15 @@ import { DataViewOptions, VisualData, getDisableMask, getFilterPanel, getGroupPanel, getHorizontalScrollbar, getPagination, getSidebar, getSummary, getVerticalScrollbar, useCellPosition, useColumn, useColumnFilter, useCommandColumn, useDataView, useDataViewContainerStyle, useDragColumn, useEdit, useFilter, useFilterHistory, useFitColumn, useGroupData, useHierarchy, useIdentify, useNavigation, useRow, useSelection, useSidebar, useSort, useVirtualScroll, - useVisualData, useVisualDataBound, useVisualDataCell, useVisualDataRow, useVisualGroupRow, useVisualSummaryRow,useCellContentStyle, + useVisualData, useVisualDataBound, useVisualDataCell, useVisualDataRow, useVisualGroupRow, useVisualSummaryRow, useCellContentStyle, usePagination } from '../../../data-view'; import getColumnHeader from './column-header.design.component'; -import {useGroupColumn} from './use-group-column'; +import { useGroupColumn } from './use-group-column'; import { DesignerItemContext } from '../../../designer-canvas/src/types'; import { useDesignerComponent } from '../../../designer-canvas/src/composition/function/use-designer-component'; import { useDesignerRulesForDataGrid } from './use-designer-rules'; +import { DesignerHostService } from '../../../designer-canvas/src/composition/types'; export default defineComponent({ name: 'FDataGridDesign', @@ -39,8 +40,8 @@ export default defineComponent({ emits: ['ClickRow', 'DoubleClickRow', 'selectionChange', 'enterUpInLastCell', 'pageIndexChanged', 'pageSizeChanged'], setup(props: DataGridDesignProps, context) { const dataGridRef = ref(); - const designerHostService=inject('designer-host-service'); - const designItemContext = inject('design-item-context') as DesignerItemContext; + const designerHostService = inject('designer-host-service'); + const designItemContext = inject('design-item-context') as DesignerItemContext; const designerRulesComposition = useDesignerRulesForDataGrid(designItemContext, designerHostService); const componentInstance = useDesignerComponent(dataGridRef, designItemContext, designerRulesComposition); componentInstance.value.styles = 'display:flex;flex:1;'; @@ -267,7 +268,7 @@ export default defineComponent({ calculateColumnsSize(); } }); - watch(()=>props.columns,(newDatas)=>{ + watch(() => props.columns, (newDatas) => { updateColumns(newDatas); }) function addNewDataItem() { diff --git a/packages/ui-vue/components/data-grid/src/designer/use-designer-rules.ts b/packages/ui-vue/components/data-grid/src/designer/use-designer-rules.ts index 5b849022302..a231b1a2cf8 100644 --- a/packages/ui-vue/components/data-grid/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/data-grid/src/designer/use-designer-rules.ts @@ -2,11 +2,11 @@ /* eslint-disable complexity */ import { ref } from "vue"; // import { useDesignerRules } from "../../../component/src/designer/use-designer-rules"; -import { DraggingResolveContext, DesignerHTMLElement, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; +import { DraggingResolveContext, DesignerHTMLElement, UseDesignerRules, DesignerHostService } from "../../../designer-canvas/src/composition/types"; import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; import { DataGridProperty } from "../property-config/data-grid.property-config"; -export function useDesignerRulesForDataGrid(designItemContext: DesignerItemContext, designerHostService): UseDesignerRules { +export function useDesignerRulesForDataGrid(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { const schema = designItemContext.schema as ComponentSchema; /** 组件在拖拽时需要将所属的Component一起拖拽 */ const triggerBelongedComponentToMoveWhenMoved = ref(true); diff --git a/packages/ui-vue/components/designer-canvas/src/composition/class/designer-canvas.css b/packages/ui-vue/components/designer-canvas/src/composition/class/designer-canvas.css index 7594cc0bdea..d92b16e7338 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/class/designer-canvas.css +++ b/packages/ui-vue/components/designer-canvas/src/composition/class/designer-canvas.css @@ -16,7 +16,7 @@ } .farris-component { - border: dotted 2px transparent; + /* border: dotted 2px transparent; */ } .farris-component.farris-nested { diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts index 5d4d24aa6f4..a091ec63723 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts @@ -126,7 +126,9 @@ export function useDesignerComponent( designerRules.onAcceptMovedChildElement(soureeElement); } } - + /** + * 当前容器接收新创建的子控件,返回子控件schema结构 + */ function addNewChildComponentSchema(resolveContext: ResolveComponentContext, designerHostService: DesignerHostService) { const { componentType } = resolveContext; let componentSchema = getSchemaByType(componentType, resolveContext, designerHostService) as ComponentSchema; @@ -141,26 +143,6 @@ export function useDesignerComponent( return componentSchema; } - /** - * 当前容器接收新创建的子控件 - */ - function onAcceptNewChildElement(element: DesignerHTMLElement, targetPosition: number): ComponentSchema { - const componentType = String(element.getAttribute('data-controltype')); - const featureString = element.getAttribute('data-feature'); - const resolveContext = featureString ? JSON.parse(featureString) : {}; - resolveContext.parentComponentInstance = componentInstance.value; - let componentSchema = getSchemaByType(componentType, resolveContext) as ComponentSchema; - if (designerRules && designerRules.onAcceptNewChildElement) { - componentSchema = designerRules.onAcceptNewChildElement(element, targetPosition, componentSchema); - } - - const typePrefix = componentType.toLowerCase().replace('-', '_'); - if (componentSchema && !componentSchema.id && componentSchema.type === componentType) { - componentSchema.id = `${typePrefix}_${Math.random().toString().slice(2, 6)}`; - } - return componentSchema; - } - /** * 移动内部控件后事件:在可视化设计器中,将现有的控件移动到容器中 * @param element 移动的源DOM结构 @@ -195,7 +177,6 @@ export function useDesignerComponent( getPropConfig, getDragScopeElement, onAcceptMovedChildElement, - onAcceptNewChildElement, onChildElementMovedOut, addNewChildComponentSchema, updateDragAndDropRules, diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component.ts index 634039dc694..85199ce4cf8 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component.ts @@ -134,26 +134,6 @@ export function useDesignerInnerComponent( return componentSchema; } - /** - * 当前容器接收新创建的子控件 - */ - function onAcceptNewChildElement(element: DesignerHTMLElement, targetPosition: number): ComponentSchema { - const componentType = String(element.getAttribute('data-controltype')); - const featureString = element.getAttribute('data-feature'); - const resolveContext = featureString ? JSON.parse(featureString) : {}; - resolveContext.parentComponentInstance = componentInstance.value; - let componentSchema = getSchemaByType(componentType, resolveContext) as ComponentSchema; - if (designerRules && designerRules.onAcceptNewChildElement) { - componentSchema = designerRules.onAcceptNewChildElement(element, targetPosition, componentSchema); - } - - const typePrefix = componentType.toLowerCase().replace('-', '_'); - if (componentSchema && !componentSchema.id && componentSchema.type === componentType) { - componentSchema.id = `${typePrefix}_${Math.random().toString().slice(2, 6)}`; - } - return componentSchema; - } - /** * 移动内部控件后事件:在可视化设计器中,将现有的控件移动到容器中 * @param element 移动的源DOM结构 @@ -188,7 +168,6 @@ export function useDesignerInnerComponent( getPropConfig, getDragScopeElement, onAcceptMovedChildElement, - onAcceptNewChildElement, onChildElementMovedOut, addNewChildComponentSchema, updateDragAndDropRules, diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts index 80eda3d2445..b97b6d74cc5 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts @@ -216,7 +216,6 @@ export function useDragula(designerHostService: DesignerHostService): UseDragula const baseContext = { componentType, label, parentComponentInstance, targetPosition } as ResolveComponentContext; const extendContext = featureString ? JSON.parse(featureString) : {}; const resolveContext = Object.assign(baseContext, extendContext) as ResolveComponentContext; - // const newComponentSchema = target.componentInstance.value.onAcceptNewChildElement(element, targetPosition); const newComponentSchema = target.componentInstance.value.addNewChildComponentSchema(resolveContext, designerHostService); addNewControlToTarget(target, newComponentSchema, sibling); } diff --git a/packages/ui-vue/components/designer-canvas/src/composition/use-dragula-common-rule.ts b/packages/ui-vue/components/designer-canvas/src/composition/rule/use-dragula-common-rule.ts similarity index 40% rename from packages/ui-vue/components/designer-canvas/src/composition/use-dragula-common-rule.ts rename to packages/ui-vue/components/designer-canvas/src/composition/rule/use-dragula-common-rule.ts index 5f0d9347ac2..c58b57e7650 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/use-dragula-common-rule.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/rule/use-dragula-common-rule.ts @@ -1,11 +1,12 @@ -import { DraggingResolveContext } from "./types"; +import { DgControl } from "../dg-control"; +import { DesignerHostService, DraggingResolveContext } from "../types"; export function useDragulaCommonRule() { /** * 容器类控件的基础控制规则 */ - function basalDragulaRuleForContainer(draggingContext: DraggingResolveContext): boolean { + function basalDragulaRuleForContainer(draggingContext: DraggingResolveContext, designerHostService?: DesignerHostService): boolean { if (!draggingContext) { return false; } @@ -13,25 +14,29 @@ export function useDragulaCommonRule() { /** 目标容器的组件实例 */ const targetCmpInstance = draggingContext.targetContainer?.componentInstance && draggingContext.targetContainer.componentInstance.value; + if (!targetCmpInstance) { return false; } + const targetContainerType = targetCmpInstance.schema.type; + const belongedComponent = designerHostService?.formSchemaUtils.getComponentById(targetCmpInstance.belongedComponentId); - const targetCmpInstanceClass = targetCmpInstance.schema.appearance?.class; - - // 能够接收输入类控件的只有Form控件和布局容器 + // 限制输入类控件的可接收容器 if (draggingContext.controlCategory === 'input' || draggingContext.controlType === 'form-group') { - const targetContainerType = targetCmpInstance.schema.type; - const isFormContainer = (targetContainerType === 'response-form' || targetContainerType === 'content-container') - && targetCmpInstanceClass && targetCmpInstanceClass.includes('farris-form'); - if (targetCmpInstance.schema.type !== 'response-layout-item' && !isFormContainer) { + if (![DgControl['response-layout-item'].type, DgControl['response-form'].type].includes(targetContainerType)) { return false; } } - // 不接收卡片内小分组 - if (draggingContext.controlType === 'field-set') { - return false; + // 限制标签页区域、分组面板的可接收容器 + if (draggingContext.controlType === DgControl.tabs.type || draggingContext.controlType === DgControl.section.type) { + const belongedComponentType = belongedComponent?.componentType; + if (belongedComponentType !== 'frame') { + return false; + } + if (![DgControl['content-container'].type, DgControl['splitter-pane'].type, DgControl['response-layout-item'].type].includes(targetContainerType)) { + return false; + } } return true; diff --git a/packages/ui-vue/components/designer-canvas/src/composition/rule/use-template-rule.ts b/packages/ui-vue/components/designer-canvas/src/composition/rule/use-template-rule.ts new file mode 100644 index 00000000000..5bf0a7d4605 --- /dev/null +++ b/packages/ui-vue/components/designer-canvas/src/composition/rule/use-template-rule.ts @@ -0,0 +1,143 @@ +import { DesignerItemContext } from "../../types"; +import { DesignerHostService } from "../types"; + +export interface DragDropRule { + canAccept: boolean; + canMove: boolean; + canDelete: boolean; + [index: string]: boolean; +} + +export class UseTemplateDragAndDropRules { + public getTemplateRule(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): DragDropRule { + + const formSchemaUtils = designerHostService?.formSchemaUtils; + const dragTemplateRules = formSchemaUtils?.getFormTemplateRule(); + const dragDropRule = { canAccept: true, canDelete: true, canMove: true }; + if (!dragTemplateRules) { + return dragDropRule; + } + const componentContext = this.getComponentContext(designItemContext); + const componentClassList = componentContext.componentClassList; + + componentClassList.forEach(componentClass => { + if (!componentClass || !dragTemplateRules[componentClass]) { + return; + } + + const { canMove: moveRule, canDelete: deleteRule, canAccept: acceptRule } = dragTemplateRules[componentClass]; + dragDropRule.canMove = dragDropRule.canMove && this.resolveRuleValue(moveRule, componentContext); + dragDropRule.canDelete = dragDropRule.canDelete && this.resolveRuleValue(deleteRule, componentContext); + dragDropRule.canAccept = dragDropRule.canAccept && this.resolveRuleValue(acceptRule, componentContext); + }) + + return dragDropRule; + } + + private resolveRuleValue(ruleSchema: any, componentContext: any): boolean { + + if (typeof ruleSchema === 'boolean') { + return ruleSchema; + } + const invalidContext = ruleSchema.invalidContext || []; + let isMatched = true; + for (const ruleContext of invalidContext) { + + // 判断子级节点是否匹配 + if (ruleContext.firstLevelChild) { + if (ruleContext.firstLevelChild.class) { + const firstLevelChildClassList = componentContext.firstLevelChildClassList; + if (firstLevelChildClassList && !firstLevelChildClassList.includes(ruleContext.firstLevelChild.class)) { + isMatched = false; + continue; + } + } + if (ruleContext.firstLevelChild.type) { + const firstLevelChildSchema = componentContext.firstLevelChildSchema; + if (firstLevelChildSchema && firstLevelChildSchema.type !== ruleContext.firstLevelChild.type) { + isMatched = false; + continue; + } + } + + } + // 判断孙子节点是否匹配 + if (ruleContext.secondLevelChild) { + if (ruleContext.secondLevelChild.class) { + const secondLevelChildClassList = componentContext.secondLevelChildClassList; + if (secondLevelChildClassList && !secondLevelChildClassList.includes(ruleContext.secondLevelChild.class)) { + isMatched = false; + continue; + } + } + if (ruleContext.secondLevelChild.type) { + const secondLevelChildSchema = componentContext.secondLevelChildSchema; + if (secondLevelChildSchema && secondLevelChildSchema.type !== ruleContext.secondLevelChild.type) { + isMatched = false; + continue; + } + } + + } + // 判断父级节点是否匹配 + if (ruleContext.parent) { + if (ruleContext.parent.class) { + const parentClassList = componentContext.parentClassList; + if (parentClassList && !parentClassList.includes(ruleContext.parent.class)) { + isMatched = false; + continue; + } + } + if (ruleContext.parent.type) { + const parentSchema = componentContext.parentSchema; + if (parentSchema && parentSchema.type !== ruleContext.parent.type) { + isMatched = false; + continue; + } + } + } + isMatched = true; + break; + } + return !isMatched; + + } + public getComponentContext(designItemContext: DesignerItemContext) { + const component = designItemContext.schema; + + // 控件本身 + const componentClass = component.appearance && component.appearance.class || ''; + const componentClassList = componentClass.split(' ') || []; + + // 控件子级节点 + const childContents = component.contents || []; + const firstLevelChildSchema = childContents.length ? childContents[0] : null; + const firstLevelChildClass = firstLevelChildSchema && firstLevelChildSchema.appearance ? firstLevelChildSchema.appearance.class : ''; + const firstLevelChildClassList = firstLevelChildClass ? firstLevelChildClass.split(' ') : []; + + // 控件孙子级节点 + const secondLevelChildSchema = firstLevelChildSchema?.contents?.length ? firstLevelChildSchema?.contents[0] : null; + const secondLevelChildClass = secondLevelChildSchema && secondLevelChildSchema.appearance ? secondLevelChildSchema.appearance.class : ''; + const secondLevelChildClassList = secondLevelChildClass ? secondLevelChildClass.split(' ') : []; + + // 控件父级节点 + const parentSchema = component.type === 'component' ? designItemContext.parent?.parent?.schema : designItemContext.parent?.schema; + const parentClass = parentSchema && parentSchema.appearance && parentSchema.appearance.class || ''; + const parentClassList = parentClass ? parentClass.split(' ') : []; + + return { + componentClass, + componentClassList, + childContents, + firstLevelChildSchema, + firstLevelChildClass, + firstLevelChildClassList, + secondLevelChildSchema, + secondLevelChildClass, + secondLevelChildClassList, + parentSchema, + parentClass, + parentClassList + }; + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/designer-canvas/src/composition/types.ts b/packages/ui-vue/components/designer-canvas/src/composition/types.ts index e0a2c288594..e80c9b08f5c 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/types.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/types.ts @@ -96,13 +96,10 @@ export interface UseDesignerRules { getStyles?(): string; getDesignerClass?(): string; - - onResolveNewComponentSchema?: (resolveContext: ResolveComponentContext, compnentSchema: ComponentSchema) => ComponentSchema; - /** * 容器接收新创建的子控件 */ - onAcceptNewChildElement?: (element: DesignerHTMLElement, targetPosition: number, compnentSchema: ComponentSchema) => ComponentSchema; + onResolveNewComponentSchema?: (resolveContext: ResolveComponentContext, compnentSchema: ComponentSchema) => ComponentSchema; /** * 移动控件后事件:在可视化设计器中,容器接收控件后调用此事件 diff --git a/packages/ui-vue/components/designer-canvas/src/types.ts b/packages/ui-vue/components/designer-canvas/src/types.ts index f85c5b47b32..6238894923b 100644 --- a/packages/ui-vue/components/designer-canvas/src/types.ts +++ b/packages/ui-vue/components/designer-canvas/src/types.ts @@ -57,8 +57,6 @@ export interface DesignerComponentInstance { */ onAcceptMovedChildElement: (element: DesignerHTMLElement, soureElement?: DesignerHTMLElement) => void; - onAcceptNewChildElement: (element: DesignerHTMLElement, targetPosition: number) => ComponentSchema; - onChildElementMovedOut: (element: HTMLElement) => void; addNewChildComponentSchema: (resolveContext: ResolveComponentContext, designerHostService?: DesignerHostService) => ComponentSchema; @@ -78,6 +76,9 @@ export interface DesignerComponentInstance { /** 获取属性配置 */ getPropConfig: (...args) => any; + /** 控件所属Component的标识*/ + belongedComponentId?: string; + } export interface ResolveComponentContext { diff --git a/packages/ui-vue/components/designer-toolbox/src/toolbox.json b/packages/ui-vue/components/designer-toolbox/src/toolbox.json index 051b9a15b82..90c6dc645ee 100644 --- a/packages/ui-vue/components/designer-toolbox/src/toolbox.json +++ b/packages/ui-vue/components/designer-toolbox/src/toolbox.json @@ -92,6 +92,12 @@ "type": "tabs", "name": "标签页区域", "category": "container" + }, + { + "id": "ContentContainer", + "type": "content-container", + "name": "容器", + "category": "container" } ] } diff --git a/packages/ui-vue/components/dynamic-form/src/designer/response-form.design.component.tsx b/packages/ui-vue/components/dynamic-form/src/designer/response-form.design.component.tsx index bb02ae264e0..2e2481b0786 100644 --- a/packages/ui-vue/components/dynamic-form/src/designer/response-form.design.component.tsx +++ b/packages/ui-vue/components/dynamic-form/src/designer/response-form.design.component.tsx @@ -3,6 +3,7 @@ import { DynamicFormGroupPropsType, dynamicFormGroupProps } from '../component/d import { DesignerItemContext } from '../../../designer-canvas/src/types'; import { useDesignerComponent } from '../../../designer-canvas/src/composition/function/use-designer-component'; import { useDesignerRules } from './use-designer-rules'; +import { DesignerHostService } from '../../../designer-canvas/src/composition/types'; export default defineComponent({ name: 'FResponseFormDesign', @@ -11,7 +12,7 @@ export default defineComponent({ setup(props: DynamicFormGroupPropsType, context) { const elementRef = ref(); const designItemContext = inject('design-item-context') as DesignerItemContext; - const designerHostService = inject('designer-host-service'); + const designerHostService = inject('designer-host-service'); const designerRulesComposition = useDesignerRules(designItemContext, designerHostService); const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); diff --git a/packages/ui-vue/components/dynamic-form/src/designer/use-designer-rules.ts b/packages/ui-vue/components/dynamic-form/src/designer/use-designer-rules.ts index 5cdfc409ffc..c336a672e31 100644 --- a/packages/ui-vue/components/dynamic-form/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/dynamic-form/src/designer/use-designer-rules.ts @@ -1,33 +1,21 @@ -/* eslint-disable max-len */ -/* eslint-disable complexity */ -import { nextTick, ref } from "vue"; +import { nextTick } from "vue"; import { DesignerHostService, DesignerHTMLElement, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/use-dragula-common-rule"; +import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/rule/use-dragula-common-rule"; import { ComponentSchema, DesignerItemContext, ResolveComponentContext } from "../../../designer-canvas/src/types"; import { getSchemaByType } from "../../../dynamic-resolver/src/schema-resolver"; -import { useDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-drag-drop-rules"; +import { UseTemplateDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-template-rule"; -export function useDesignerRules(designItemContext: DesignerItemContext, designerHostService: DesignerHostService): UseDesignerRules { - const schema = designItemContext.schema; - const parentSchema = designItemContext.parent?.schema; - const dragAndDropRules = useDragAndDropRules(); - /** 组件在拖拽时是否需要将所属的Component一起拖拽 */ - const triggerBelongedComponentToMoveWhenMoved = ref(false); +export function useDesignerRules(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { + const schema = designItemContext.schema as ComponentSchema; - /** 组件在删除时需要将所属的Component一起拖拽 */ - const triggerBelongedComponentToDeleteWhenDeleted = ref(false); - - let canAcceptChildContent = true; - let hideNestedPadding = false; - - let schemaContext: any; - - let isInFixedContextRules = false; + const dragAndDropRules = new UseTemplateDragAndDropRules(); + const { canMove, canAccept, canDelete } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); /** - * 用container表示的form组件,只接收form-group输入类控件 - */ + * 只接收form-group输入类控件 + */ function checkFormContainerAcceptable(draggingContext: DraggingResolveContext) { + const schemaContext = dragAndDropRules.getComponentContext(designItemContext); if (schemaContext && schemaContext.componentClassList && schemaContext.componentClassList.includes('f-form-layout') && schemaContext.componentClassList.includes('farris-form')) { // 从工具箱拖入的输入类控件 if (draggingContext.sourceType === 'control' && draggingContext.controlCategory === 'input') { @@ -46,11 +34,11 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe * 判断是否可以接收拖拽新增的子级控件 */ function canAccepts(draggingContext: DraggingResolveContext): boolean { - const basalRule = useDragulaCommonRule().basalDragulaRuleForContainer(draggingContext); + const basalRule = useDragulaCommonRule().basalDragulaRuleForContainer(draggingContext, designerHostService); if (!basalRule) { return false; } - if (!canAcceptChildContent) { + if (!canAccept) { return false; } @@ -60,55 +48,6 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe return true; } - /** - * 判断当前容器的上下文 - */ - function resolveComponentContext() { - triggerBelongedComponentToMoveWhenMoved.value = false; - triggerBelongedComponentToDeleteWhenDeleted.value = false; - const component = schema; - - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' '); - - // 子级节点 - const childContents = component.contents || []; - const firstChildContent = childContents.length ? childContents[0] : null; - const firstChildClass = firstChildContent && firstChildContent.appearance ? firstChildContent.appearance.class : ''; - const firstChildClassList = firstChildClass ? firstChildClass.split(' ') : []; - const childrenClassList = childContents.length ? childContents.reduce((classList: string[], childComponentSchema: ComponentSchema) => { - const childCompoentClass = childComponentSchema && childComponentSchema.appearance ? childComponentSchema.appearance.class : ''; - const childCompoentClassList = childCompoentClass ? childCompoentClass.split(' ') : []; - classList.push(...childCompoentClassList); - return classList; - }, []) : []; - - // 父级节点 - const parent = parentSchema; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - schemaContext = { - componentClass, - componentClassList, - childContents, - firstChildContent, - firstChildClass, - firstChildClassList, - parent, - parentClass, - parentClassList, - children: childContents, - childrenClassList - }; - - const { canAccept, fixed, hidePadding } = dragAndDropRules.getRuleValue(componentClassList[0], schemaContext); - canAcceptChildContent = canAccept; - hideNestedPadding = hidePadding; - isInFixedContextRules = fixed; - return true; - } function onAcceptMovedChildElement(sourceElement: DesignerHTMLElement) { nextTick(); @@ -167,7 +106,7 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe let className = ''; switch (formColumns) { case 1: { - className = 'col-12 col-md-12 col-xl-12 col-el-12'; + className = 'col-12'; break; } case 2: { @@ -187,30 +126,15 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe return className; } - function onAcceptNewChildElement(element: DesignerHTMLElement, targetPosition: number, componentSchema: ComponentSchema): ComponentSchema { - const component = schema; - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' ') as string[]; - if (componentClassList.includes('f-form-layout')) { - const label = String(element.innerText); - const formGroupElementSchema = getSchemaByType('form-group') as ComponentSchema; - formGroupElementSchema.editor = componentSchema; - formGroupElementSchema.label = label; - return formGroupElementSchema; - } - return componentSchema; - } - function checkCanMoveComponent() { - return !isInFixedContextRules; + return canMove; } function checkCanDeleteComponent() { - return !isInFixedContextRules; + return canDelete; } function hideNestedPaddingInDesginerView() { - return hideNestedPadding; + return false; } return { @@ -219,11 +143,7 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe checkCanMoveComponent, getStyles, hideNestedPaddingInDesginerView, - onAcceptNewChildElement, onAcceptMovedChildElement, - resolveComponentContext, - onResolveNewComponentSchema, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted + onResolveNewComponentSchema }; } diff --git a/packages/ui-vue/components/dynamic-resolver/src/schema-resolver.ts b/packages/ui-vue/components/dynamic-resolver/src/schema-resolver.ts index 238a7ec707b..07c2207dd7b 100644 --- a/packages/ui-vue/components/dynamic-resolver/src/schema-resolver.ts +++ b/packages/ui-vue/components/dynamic-resolver/src/schema-resolver.ts @@ -15,9 +15,9 @@ function getSchemaValueByDefault(defaultSchema: Record): Record item == 'id')){ + if (title && (!canIgnoreProperty || !ignoreList.find(item => item == 'id'))) { resolvedSchema.id = `${title}-${Date.now()}`; - } + } return resolvedSchema; } diff --git a/packages/ui-vue/components/external-container/src/designer/external-container.design.component.tsx b/packages/ui-vue/components/external-container/src/designer/external-container.design.component.tsx index 77f78a4bd67..db18242076b 100644 --- a/packages/ui-vue/components/external-container/src/designer/external-container.design.component.tsx +++ b/packages/ui-vue/components/external-container/src/designer/external-container.design.component.tsx @@ -2,13 +2,13 @@ import { defineComponent, inject, ref, onMounted, computed } from 'vue'; import { DesignerItemContext } from '../../../designer-canvas/src/types'; import FDesignerItem from '../../../designer-canvas/src/components/designer-item.component'; import { useDesignerComponent } from '../../../designer-canvas/src/composition/function/use-designer-component'; -// import { DesignerItemContext } from '../../../designer-canvas/src/types'; import { externalContainerProps, ExteranlContainerPropsType } from '../external-container.props'; import { useDesignerRules } from './use-designer-rules'; import navListSchema from './nav_list.json'; import FImportExternalSchema from './import-external-schema.component'; +import { DesignerHostService } from '../../../designer-canvas/src/composition/types'; export default defineComponent({ name: 'FExternalContainerDesign', @@ -16,8 +16,9 @@ export default defineComponent({ emits: [], setup(props: ExteranlContainerPropsType, context) { const elementRef = ref(); + const designerHostService = inject('designer-host-service'); const designItemContext = inject('design-item-context') as DesignerItemContext; - const designerRulesComposition = useDesignerRules(designItemContext.schema, designItemContext.parent?.schema); + const designerRulesComposition = useDesignerRules(designItemContext, designerHostService); const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); onMounted(() => { diff --git a/packages/ui-vue/components/external-container/src/designer/use-designer-rules.ts b/packages/ui-vue/components/external-container/src/designer/use-designer-rules.ts index e58b0d92890..57ed963ddb5 100644 --- a/packages/ui-vue/components/external-container/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/external-container/src/designer/use-designer-rules.ts @@ -1,22 +1,9 @@ /* eslint-disable max-len */ /* eslint-disable complexity */ -import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { ComponentSchema } from "../../../designer-canvas/src/types"; -import { useDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-drag-drop-rules"; - -export function useDesignerRules(schema: ComponentSchema, parentSchema?: ComponentSchema): UseDesignerRules { - const dragAndDropRules = useDragAndDropRules(); - - let canAcceptChildContent = true; - - let hideNestedPadding = false; - - let schemaContext: any; - - let isInFixedContextRules = false; - - const canRemove = false; +import { DesignerHostService, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; +import { DesignerItemContext } from "../../../designer-canvas/src/types"; +export function useDesignerRules(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { /** * 判断是否可以接收拖拽新增的子级控件 */ @@ -25,83 +12,19 @@ export function useDesignerRules(schema: ComponentSchema, parentSchema?: Compone } function checkCanDeleteComponent() { - return canRemove || !isInFixedContextRules; + return true } function checkCanMoveComponent() { - return !isInFixedContextRules; + return true; } - /** - * 判断当前容器的上下文 - */ - function resolveComponentContext() { - isInFixedContextRules = false; - const component = schema; - - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' '); - - // 子级节点 - const childContents = component.contents || []; - const firstChildContent = childContents.length ? childContents[0] : null; - const firstChildClass = firstChildContent && firstChildContent.appearance ? firstChildContent.appearance.class : ''; - const firstChildClassList = firstChildClass ? firstChildClass.split(' ') : []; - const childrenClassList = childContents.length ? childContents.reduce((classList: string[], childComponentSchema: ComponentSchema) => { - const childCompoentClass = childComponentSchema && childComponentSchema.appearance ? childComponentSchema.appearance.class : ''; - const childCompoentClassList = childCompoentClass ? childCompoentClass.split(' ') : []; - classList.push(...childCompoentClassList); - return classList; - }, []) : []; - - // 父级节点 - const parent = parentSchema; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - schemaContext = { - componentClass, - componentClassList, - childContents, - firstChildContent, - firstChildClass, - firstChildClassList, - parent, - parentClass, - parentClassList, - children: childContents, - childrenClassList - }; - - const { canAccept, fixed, hidePadding } = dragAndDropRules.getRuleValue(componentClassList[0], schemaContext); - canAcceptChildContent = canAccept; - hideNestedPadding = hidePadding; - isInFixedContextRules = fixed; + function hideNestedPaddingInDesginerView() { return true; - - // // 卡片类组件 - // if (componentClassList.includes('f-struct-wrapper') && component.componentType.includes('form') && firstChildContent && firstChildContent.type === 'section') { - // isInFixedContextRules = false; - // return; - // } - // // 列表类组件 - // if (component.componentType === 'data-grid' && parent) { - // if (parent.type === 'content-container' && parentClassList.includes('f-page-main')) { - // isInFixedContextRules = true; - // return; - // } - // // 在分栏面板中的组件不支持移动 - // if (parent.type === 'splitter-pane' && parentClassList.includes('f-page-content-nav')) { - // isInFixedContextRules = true; - // canRemove = true; - // } - // } } - - function hideNestedPaddingInDesginerView() { - return hideNestedPadding; + function getStyles(): string { + return ' position:relative; padding:0 !important;border:0;'; } - - return { canAccepts, checkCanDeleteComponent, checkCanMoveComponent, resolveComponentContext, hideNestedPaddingInDesginerView }; + return { canAccepts, checkCanDeleteComponent, checkCanMoveComponent, hideNestedPaddingInDesginerView, getStyles }; } diff --git a/packages/ui-vue/components/layout/src/designer/layout-pane-use-designer-rules.ts b/packages/ui-vue/components/layout/src/designer/layout-pane-use-designer-rules.ts index 7c8feb9ad21..368d56c9018 100644 --- a/packages/ui-vue/components/layout/src/designer/layout-pane-use-designer-rules.ts +++ b/packages/ui-vue/components/layout/src/designer/layout-pane-use-designer-rules.ts @@ -1,11 +1,10 @@ /* eslint-disable max-len */ -import { DesignerHTMLElement, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/use-dragula-common-rule"; -import { ComponentSchema } from "../../../designer-canvas/src/types"; -import { getSchemaByType } from "../../../dynamic-resolver/src/schema-resolver"; - -export function useDesignerRules(schema: ComponentSchema, parentSchema?: ComponentSchema): UseDesignerRules { +import { DesignerHostService, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; +import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/rule/use-dragula-common-rule"; +import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; +export function useDesignerRules(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { + const schema = designItemContext.schema as ComponentSchema; /** * 判断是否可以接收拖拽新增的子级控件 */ @@ -19,11 +18,7 @@ export function useDesignerRules(schema: ComponentSchema, parentSchema?: Compone return true; } - function onAcceptNewChildElement(element: DesignerHTMLElement, targetPosition: number, componentSchema: ComponentSchema): ComponentSchema { - const component = schema; - return componentSchema; - } - + function getDesignerClass() { const classArray = ['f-layout-pane']; if (schema.position === 'left' || schema.position === 'right') { @@ -36,6 +31,6 @@ export function useDesignerRules(schema: ComponentSchema, parentSchema?: Compone return classArray.join(' '); }; - return { canAccepts, getDesignerClass, onAcceptNewChildElement }; + return { canAccepts, getDesignerClass }; } diff --git a/packages/ui-vue/components/layout/src/designer/layout-pane.design.component.tsx b/packages/ui-vue/components/layout/src/designer/layout-pane.design.component.tsx index 2a622f1d12e..3323c0ebe08 100644 --- a/packages/ui-vue/components/layout/src/designer/layout-pane.design.component.tsx +++ b/packages/ui-vue/components/layout/src/designer/layout-pane.design.component.tsx @@ -6,6 +6,7 @@ import { useResizePane } from '../composition/use-resize-pane'; import { DesignerItemContext } from '../../../designer-canvas/src/types'; import { useDesignerComponent } from '../../../designer-canvas/src/composition/function/use-designer-component'; import { useDesignerRules } from './layout-pane-use-designer-rules'; +import { DesignerHostService } from '../../../designer-canvas/src/composition/types'; export default defineComponent({ name: 'FLayoutPaneDesign', @@ -14,8 +15,9 @@ export default defineComponent({ setup(props: LayoutPaneProps, context) { const layoutPaneElementRef = ref(); const elementRef = ref(); + const designerHostService = inject('designer-host-service'); const designItemContext = inject('design-item-context') as DesignerItemContext; - const designerRulesComposition = useDesignerRules(designItemContext.schema, designItemContext.parent?.schema); + const designerRulesComposition = useDesignerRules(designItemContext, designerHostService); const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); // componentInstance.value.styles = 'padding:0;box-shadow:none;'; componentInstance.value.canNested = false; diff --git a/packages/ui-vue/components/list-nav/src/composition/use-designer-rules.ts b/packages/ui-vue/components/list-nav/src/composition/use-designer-rules.ts deleted file mode 100644 index 2ba1ce754ed..00000000000 --- a/packages/ui-vue/components/list-nav/src/composition/use-designer-rules.ts +++ /dev/null @@ -1,181 +0,0 @@ -/* eslint-disable max-len */ -/* eslint-disable complexity */ -import { nextTick, ref } from "vue"; -import { DesignerHTMLElement, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/use-dragula-common-rule"; -import { ComponentSchema, ResolveComponentContext } from "../../../designer-canvas/src/types"; -import { getSchemaByType } from "../../../dynamic-resolver/src/schema-resolver"; -import { useDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-drag-drop-rules"; - -export function useDesignerRules(schema: ComponentSchema, parentSchema?: ComponentSchema): UseDesignerRules { - const dragAndDropRules = useDragAndDropRules(); - /** 组件在拖拽时是否需要将所属的Component一起拖拽 */ - const triggerBelongedComponentToMoveWhenMoved = ref(false); - - /** 组件在删除时需要将所属的Component一起拖拽 */ - const triggerBelongedComponentToDeleteWhenDeleted = ref(false); - - let canAcceptChildContent = true; - - let hideNestedPadding = false; - - let schemaContext: any; - - let isInFixedContextRules = false; - - /** - * 用container表示的form组件,只接收form-group输入类控件 - */ - function checkFormContainerAcceptable(draggingContext: DraggingResolveContext) { - - if (schemaContext && schemaContext.componentClassList && schemaContext.componentClassList.includes('f-form-layout') && schemaContext.componentClassList.includes('farris-form')) { - // 从工具箱拖入的输入类控件 - if (draggingContext.sourceType === 'control' && draggingContext.controlCategory === 'input') { - return true; - } - - // 画布中移动位置的输入类控件 - if (draggingContext.sourceType === 'move' && draggingContext.controlType === 'form-group') { - return true; - } - return false; - } - return true; - } - - /** - * 判断是否可以接收拖拽新增的子级控件 - */ - function canAccepts(draggingContext: DraggingResolveContext): boolean { - - const basalRule = useDragulaCommonRule().basalDragulaRuleForContainer(draggingContext); - if (!basalRule) { - return false; - } - if (!canAcceptChildContent) { - return false; - } - - if (!checkFormContainerAcceptable(draggingContext)) { - return false; - } - return true; - } - - /** - * 判断当前容器的上下文 - */ - function resolveComponentContext() { - triggerBelongedComponentToMoveWhenMoved.value = false; - triggerBelongedComponentToDeleteWhenDeleted.value = false; - const component = schema; - - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' '); - - // 子级节点 - const childContents = component.contents || []; - const firstChildContent = childContents.length ? childContents[0] : null; - const firstChildClass = firstChildContent && firstChildContent.appearance ? firstChildContent.appearance.class : ''; - const firstChildClassList = firstChildClass ? firstChildClass.split(' ') : []; - const childrenClassList = childContents.length ? childContents.reduce((classList: string[], childComponentSchema: ComponentSchema) => { - const childCompoentClass = childComponentSchema && childComponentSchema.appearance ? childComponentSchema.appearance.class : ''; - const childCompoentClassList = childCompoentClass ? childCompoentClass.split(' ') : []; - classList.push(...childCompoentClassList); - return classList; - }, []) : []; - - // 父级节点 - const parent = parentSchema; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - schemaContext = { - componentClass, - componentClassList, - childContents, - firstChildContent, - firstChildClass, - firstChildClassList, - parent, - parentClass, - parentClassList, - children: childContents, - childrenClassList - }; - - const { canAccept, fixed, hidePadding } = dragAndDropRules.getRuleValue(componentClassList[0], schemaContext); - canAcceptChildContent = canAccept; - hideNestedPadding = hidePadding; - isInFixedContextRules = fixed; - return true; - } - - function onAcceptMovedChildElement(sourceElement: DesignerHTMLElement) { - nextTick(); - } - - function getStyles() { - const component = schema; - if (component.componentType) { - return 'display:inherit;flex-direction:inherit;margin-bottom:10px'; - } - return ''; - } - - function onResolveNewComponentSchema(resolveContext: ResolveComponentContext, compnentSchema: ComponentSchema): ComponentSchema { - const component = schema; - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' ') as string[]; - if (componentClassList.includes('f-form-layout')) { - const { label } = resolveContext; - const formGroupElementSchema = getSchemaByType('form-group') as ComponentSchema; - formGroupElementSchema.editor = compnentSchema; - formGroupElementSchema.label = label; - return formGroupElementSchema; - } - return compnentSchema; - } - - function onAcceptNewChildElement(element: DesignerHTMLElement, targetPosition: number, compnentSchema: ComponentSchema): ComponentSchema { - const component = schema; - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' ') as string[]; - if (componentClassList.includes('f-form-layout')) { - const label = String(element.innerText); - const formGroupElementSchema = getSchemaByType('form-group') as ComponentSchema; - formGroupElementSchema.editor = compnentSchema; - formGroupElementSchema.label = label; - return formGroupElementSchema; - } - return compnentSchema; - } - - function checkCanMoveComponent() { - return !isInFixedContextRules; - } - function checkCanDeleteComponent() { - return !isInFixedContextRules; - } - - function hideNestedPaddingInDesginerView() { - return hideNestedPadding; - } - - return { - canAccepts, - resolveComponentContext, - getStyles, - onAcceptNewChildElement, - onAcceptMovedChildElement, - onResolveNewComponentSchema, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, - checkCanMoveComponent, - checkCanDeleteComponent, - hideNestedPaddingInDesginerView - }; -} diff --git a/packages/ui-vue/components/list-nav/src/designer/list-nav.design.component.tsx b/packages/ui-vue/components/list-nav/src/designer/list-nav.design.component.tsx index 54e059184e5..8b02c2a6ea5 100644 --- a/packages/ui-vue/components/list-nav/src/designer/list-nav.design.component.tsx +++ b/packages/ui-vue/components/list-nav/src/designer/list-nav.design.component.tsx @@ -18,7 +18,8 @@ import { computed, defineComponent, inject, onMounted, ref, SetupContext } from import { listNavProps, ListNavProps } from '../list-nav.props'; import { useDesignerComponent } from '../../../designer-canvas/src/composition/function/use-designer-component'; import { DesignerItemContext } from '../../../designer-canvas/src/types'; -import { useDesignerRules } from '../composition/use-designer-rules'; +import { useDesignerRules } from './use-designer-rules'; +import { DesignerHostService } from '../../../designer-canvas/src/composition/types'; export default defineComponent({ name: 'FListNavDesign', @@ -26,8 +27,9 @@ export default defineComponent({ emits: [] as (string[] & ThisType) | undefined, setup(props: ListNavProps, context: SetupContext) { const elementRef = ref(); + const designerHostService = inject('designer-host-service'); const designItemContext = inject('design-item-context') as DesignerItemContext; - const designerRulesComposition = useDesignerRules(designItemContext.schema, designItemContext.parent?.schema); + const designerRulesComposition = useDesignerRules(designItemContext, designerHostService); const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); componentInstance.value.canMove = false; componentInstance.value.canNested = false; @@ -42,7 +44,7 @@ export default defineComponent({ */ const navStyleSize = computed(() => { const result = {}; - let propName = ['top', 'bottom'].indexOf(navPosition.value) > -1?'height':'width'; + let propName = ['top', 'bottom'].indexOf(navPosition.value) > -1 ? 'height' : 'width'; result[propName] = !hideNav.value ? props.size + 'px' : '0px' return result; }); diff --git a/packages/ui-vue/components/list-nav/src/designer/use-designer-rules.ts b/packages/ui-vue/components/list-nav/src/designer/use-designer-rules.ts new file mode 100644 index 00000000000..291a5a0c2e8 --- /dev/null +++ b/packages/ui-vue/components/list-nav/src/designer/use-designer-rules.ts @@ -0,0 +1,48 @@ +/* eslint-disable max-len */ +/* eslint-disable complexity */ +import { DesignerHostService, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; +import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/rule/use-dragula-common-rule"; +import { DesignerItemContext } from "../../../designer-canvas/src/types"; +import { UseTemplateDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-template-rule"; + +export function useDesignerRules(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { + const dragAndDropRules = new UseTemplateDragAndDropRules(); + const { canMove, canAccept, canDelete } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); + + /** + * 判断是否可以接收拖拽新增的子级控件 + */ + function canAccepts(draggingContext: DraggingResolveContext): boolean { + + const basalRule = useDragulaCommonRule().basalDragulaRuleForContainer(draggingContext, designerHostService); + if (!basalRule) { + return false; + } + return canAccept; + } + + + function getStyles() { + return 'display: flex;flex-direction:column;height:100%';; + } + + + function checkCanMoveComponent() { + return canMove; + } + function checkCanDeleteComponent() { + return canDelete; + } + + function hideNestedPaddingInDesginerView() { + return !canMove && !canDelete; + } + + return { + canAccepts, + getStyles, + checkCanMoveComponent, + checkCanDeleteComponent, + hideNestedPaddingInDesginerView + }; +} diff --git a/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar.design.component.tsx b/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar.design.component.tsx index f29fb87ec2a..52d869c3a5e 100644 --- a/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar.design.component.tsx +++ b/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar.design.component.tsx @@ -12,6 +12,7 @@ import { useDesignerRules } from './use-designer-rules'; import FDesignerInnerItem from '../../../designer-canvas/src/components/designer-inner-item.component'; import FResponseToolbarDesignItemComponent from './response-toolbar-item.design.component'; import { getCustomClass } from '@farris/ui-vue/components/common'; +import { DesignerHostService } from '../../../designer-canvas/src/composition/types'; export default defineComponent({ name: 'FResponseToolbarDesign', @@ -28,9 +29,9 @@ export default defineComponent({ const useIconComposition = useIcon(); const shouldShowDefaultDropdown = computed(() => defaultDropdown.value.children.length > 0); const elementRef = ref(); - const designerHostService = inject('designer-host-service'); + const designerHostService = inject('designer-host-service'); const designItemContext = inject('design-item-context') as DesignerItemContext; - const designerRulesComposition = useDesignerRules(designItemContext.schema, designerHostService, designItemContext); + const designerRulesComposition = useDesignerRules(designItemContext, designerHostService); const componentInstance = useDesignerInnerComponent(elementRef, designItemContext, designerRulesComposition); const updateToolbarItemsHandler = inject('toolbar-item-handler', () => { }) as () => void; @@ -50,7 +51,7 @@ export default defineComponent({ 'f-response-toolbar': true, 'position-relative': true } as Record; - return getCustomClass(classObject,props.customClass); + return getCustomClass(classObject, props.customClass); }); const resizedContainerClass = computed(() => { @@ -379,8 +380,8 @@ export default defineComponent({ disable={item.disable} text={item.text} icon={item.icon} - class={item.appearance?.class||'btn-secondary'} - alignment={props.alignment||'right'} + class={item.appearance?.class || 'btn-secondary'} + alignment={props.alignment || 'right'} componentId={props.componentId} > diff --git a/packages/ui-vue/components/response-toolbar/src/designer/use-designer-item-rules.ts b/packages/ui-vue/components/response-toolbar/src/designer/use-designer-item-rules.ts index 3f0e46bb9fd..9c5d0933e99 100644 --- a/packages/ui-vue/components/response-toolbar/src/designer/use-designer-item-rules.ts +++ b/packages/ui-vue/components/response-toolbar/src/designer/use-designer-item-rules.ts @@ -1,46 +1,11 @@ /* eslint-disable max-len */ /* eslint-disable complexity */ -import { ref } from "vue"; -import { DesignerHTMLElement, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { ComponentSchema, DesignerItemContext, ResolveComponentContext } from "../../../designer-canvas/src/types"; -import { getSchemaByType } from "../../../dynamic-resolver/src/schema-resolver"; -import { useDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-drag-drop-rules"; -import {TabToolbarItemProperty} from "../../../tabs/src/property-config/tab-toolbar-item.property-config"; +import { DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; +import { DesignerItemContext } from "../../../designer-canvas/src/types"; +import { TabToolbarItemProperty } from "../../../tabs/src/property-config/tab-toolbar-item.property-config"; import { ResponseToolbarItemProperty } from "../property-config/response-toolbar-item.property-config"; export function useDesignerItemRules(designerItemContext: DesignerItemContext, designerHostService): UseDesignerRules { - const dragAndDropRules = useDragAndDropRules(); - /** 组件在拖拽时是否需要将所属的Component一起拖拽 */ - const triggerBelongedComponentToMoveWhenMoved = ref(false); - - /** 组件在删除时需要将所属的Component一起拖拽 */ - const triggerBelongedComponentToDeleteWhenDeleted = ref(false); - - let canAcceptChildContent = true; - let hideNestedPadding = false; - - let schemaContext: any; - - let isInFixedContextRules = false; - - /** - * 用container表示的form组件,只接收form-group输入类控件 - */ - function checkFormContainerAcceptable(draggingContext: DraggingResolveContext) { - if (schemaContext && schemaContext.componentClassList && schemaContext.componentClassList.includes('f-form-layout') && schemaContext.componentClassList.includes('farris-form')) { - // 从工具箱拖入的输入类控件 - if (draggingContext.sourceType === 'control' && draggingContext.controlCategory === 'input') { - return true; - } - // 画布中移动位置的输入类控件 - if (draggingContext.sourceType === 'move' && draggingContext.controlType === 'form-group') { - return true; - } - return false; - } - return true; - } - /** * 判断是否可以接收拖拽新增的子级控件 */ @@ -48,125 +13,34 @@ export function useDesignerItemRules(designerItemContext: DesignerItemContext, d return false; } - /** - * 判断当前容器的上下文 - */ - // function resolveComponentContext() { - // triggerBelongedComponentToMoveWhenMoved.value = false; - // triggerBelongedComponentToDeleteWhenDeleted.value = false; - // const component = schema; - - // // 控件本身样式 - // const componentClass = component.appearance && component.appearance.class || ''; - // const componentClassList = componentClass.split(' '); - - // // 子级节点 - // const childContents = component.contents || []; - // const firstChildContent = childContents.length ? childContents[0] : null; - // const firstChildClass = firstChildContent && firstChildContent.appearance ? firstChildContent.appearance.class : ''; - // const firstChildClassList = firstChildClass ? firstChildClass.split(' ') : []; - // const childrenClassList = childContents.length ? childContents.reduce((classList: string[], childComponentSchema: ComponentSchema) => { - // const childCompoentClass = childComponentSchema && childComponentSchema.appearance ? childComponentSchema.appearance.class : ''; - // const childCompoentClassList = childCompoentClass ? childCompoentClass.split(' ') : []; - // classList.push(...childCompoentClassList); - // return classList; - // }, []) : []; - - // // 父级节点 - // const parent = designerItemContext?.schema; - // const parentClass = parent && parent.appearance && parent.appearance.class || ''; - // const parentClassList = parentClass ? parentClass.split(' ') : []; - - // schemaContext = { - // componentClass, - // componentClassList, - // childContents, - // firstChildContent, - // firstChildClass, - // firstChildClassList, - // parent, - // parentClass, - // parentClassList, - // children: childContents, - // childrenClassList - // }; - - // const { canAccept, fixed, hidePadding } = dragAndDropRules.getRuleValue(componentClassList[0], schemaContext); - // canAcceptChildContent = canAccept; - // hideNestedPadding = hidePadding; - // isInFixedContextRules = fixed; - // return true; - // } - - function onAcceptMovedChildElement(sourceElement: DesignerHTMLElement) { - } - - function getStyles() { - // const component = schema; - // if (component.componentType) { - // return 'display:inherit;flex-direction:inherit;margin-bottom:10px'; - // } - return ''; - } - - function onResolveNewComponentSchema(resolveContext: ResolveComponentContext, compnentSchema: ComponentSchema): ComponentSchema { - compnentSchema.text = resolveContext.label; - return compnentSchema; - } - - function onAcceptNewChildElement(element: DesignerHTMLElement, targetPosition: number, compnentSchema: ComponentSchema): ComponentSchema { - const component = designerItemContext.schema; - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' ') as string[]; - if (componentClassList.includes('f-form-layout')) { - const label = String(element.innerText); - const formGroupElementSchema = getSchemaByType('form-group') as ComponentSchema; - formGroupElementSchema.editor = compnentSchema; - formGroupElementSchema.label = label; - return formGroupElementSchema; - } - return compnentSchema; - } - function checkCanMoveComponent() { return false; } function checkCanDeleteComponent() { - return !isInFixedContextRules; + return true; } function checkCanAddComponent() { return false; } - - function hideNestedPaddingInDesginerView() { - return hideNestedPadding; - } - - // 构造属性配置方法 + /** + * 构造属性配置方法 + */ function getPropsConfig(componentId: string) { let responseToolbarItemProp; - switch(designerItemContext.schema.type){ + switch (designerItemContext.schema.type) { case 'tab-toolbar-item': responseToolbarItemProp = new TabToolbarItemProperty(componentId, designerHostService); break; default: responseToolbarItemProp = new ResponseToolbarItemProperty(componentId, designerHostService); - } + } return responseToolbarItemProp.getPropertyConfig(designerItemContext.schema); } return { canAccepts, - checkCanAddComponent, - checkCanDeleteComponent, checkCanMoveComponent, - getStyles, - hideNestedPaddingInDesginerView, - onAcceptNewChildElement, - onAcceptMovedChildElement, - onResolveNewComponentSchema, - getPropsConfig, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted + checkCanDeleteComponent, + checkCanAddComponent, + getPropsConfig }; } diff --git a/packages/ui-vue/components/response-toolbar/src/designer/use-designer-rules.ts b/packages/ui-vue/components/response-toolbar/src/designer/use-designer-rules.ts index 4c68768140a..88251674694 100644 --- a/packages/ui-vue/components/response-toolbar/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/response-toolbar/src/designer/use-designer-rules.ts @@ -1,143 +1,22 @@ /* eslint-disable max-len */ /* eslint-disable complexity */ -import { ref } from "vue"; -import { DesignerHTMLElement, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/use-dragula-common-rule"; +import { DesignerHostService, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { ComponentSchema, DesignerItemContext, ResolveComponentContext } from "../../../designer-canvas/src/types"; -import { getSchemaByType } from "../../../dynamic-resolver/src/schema-resolver"; -import { useDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-drag-drop-rules"; import { ResponseToolbarProperty } from "../property-config/response-toolbar.property-config"; -export function useDesignerRules(schema: ComponentSchema, designerHostService,designerItemContext?: DesignerItemContext, itemsRef?: any): UseDesignerRules { - const dragAndDropRules = useDragAndDropRules(); - /** 组件在拖拽时是否需要将所属的Component一起拖拽 */ - const triggerBelongedComponentToMoveWhenMoved = ref(false); - - /** 组件在删除时需要将所属的Component一起拖拽 */ - const triggerBelongedComponentToDeleteWhenDeleted = ref(false); - - let canAcceptChildContent = true; - let hideNestedPadding = false; - - let schemaContext: any; - - let isInFixedContextRules = false; +export function useDesignerRules(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { + const schema = designItemContext.schema as ComponentSchema; /** - * 用container表示的form组件,只接收form-group输入类控件 - */ - function checkFormContainerAcceptable(draggingContext: DraggingResolveContext) { - if (schemaContext && schemaContext.componentClassList && schemaContext.componentClassList.includes('f-form-layout') && schemaContext.componentClassList.includes('farris-form')) { - // 从工具箱拖入的输入类控件 - if (draggingContext.sourceType === 'control' && draggingContext.controlCategory === 'input') { - return true; - } - // 画布中移动位置的输入类控件 - if (draggingContext.sourceType === 'move' && draggingContext.controlType === 'form-group') { - return true; - } - return false; - } - return true; - } - - /** - * 判断是否可以接收拖拽新增的子级控件 - */ + * 判断是否可以接收拖拽新增的子级控件 + */ function canAccepts(draggingContext: DraggingResolveContext): boolean { - const basalRule = useDragulaCommonRule().basalDragulaRuleForContainer(draggingContext); - if (!basalRule) { - return false; - } - if (!canAcceptChildContent) { - return false; - } - - if (!checkFormContainerAcceptable(draggingContext)) { - return false; - } return false; } - /** - * 判断当前容器的上下文 - */ - function resolveComponentContext() { - triggerBelongedComponentToMoveWhenMoved.value = false; - triggerBelongedComponentToDeleteWhenDeleted.value = false; - const component = schema; - - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' '); - - // 子级节点 - const childContents = component.buttons || []; - const firstChildContent = childContents.length ? childContents[0] : null; - const firstChildClass = firstChildContent && firstChildContent.appearance ? firstChildContent.appearance.class : ''; - const firstChildClassList = firstChildClass ? firstChildClass.split(' ') : []; - const childrenClassList = childContents.length ? childContents.reduce((classList: string[], childComponentSchema: ComponentSchema) => { - const childCompoentClass = childComponentSchema && childComponentSchema.appearance ? childComponentSchema.appearance.class : ''; - const childCompoentClassList = childCompoentClass ? childCompoentClass.split(' ') : []; - classList.push(...childCompoentClassList); - return classList; - }, []) : []; - - // 父级节点 - const parent = designerItemContext?.schema; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - schemaContext = { - componentClass, - componentClassList, - childContents, - firstChildContent, - firstChildClass, - firstChildClassList, - parent, - parentClass, - parentClassList, - children: childContents, - childrenClassList - }; - - const { canAccept, fixed, hidePadding } = dragAndDropRules.getRuleValue(componentClassList[0], schemaContext); - canAcceptChildContent = canAccept; - hideNestedPadding = hidePadding; - isInFixedContextRules = fixed; - return true; - } - - function onAcceptMovedChildElement(sourceElement: DesignerHTMLElement) { - } - - function getStyles() { - const component = schema; - if (component.componentType) { - return 'display:inherit;flex-direction:inherit;margin-bottom:10px'; - } - return ''; - } - - function onResolveNewComponentSchema(resolveContext: ResolveComponentContext, compnentSchema: ComponentSchema): ComponentSchema { - compnentSchema.text = resolveContext.label; - return compnentSchema; - } - - function onAcceptNewChildElement(element: DesignerHTMLElement, targetPosition: number, compnentSchema: ComponentSchema): ComponentSchema { - const component = schema; - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' ') as string[]; - if (componentClassList.includes('f-form-layout')) { - const label = String(element.innerText); - const formGroupElementSchema = getSchemaByType('form-group') as ComponentSchema; - formGroupElementSchema.editor = compnentSchema; - formGroupElementSchema.label = label; - return formGroupElementSchema; - } - return compnentSchema; + function onResolveNewComponentSchema(resolveContext: ResolveComponentContext, componentSchema: ComponentSchema): ComponentSchema { + componentSchema.text = resolveContext.label; + return componentSchema; } function checkCanMoveComponent() { @@ -152,7 +31,7 @@ export function useDesignerRules(schema: ComponentSchema, designerHostService,de } function hideNestedPaddingInDesginerView() { - return hideNestedPadding; + return true; } // 构造属性配置方法 @@ -166,14 +45,8 @@ export function useDesignerRules(schema: ComponentSchema, designerHostService,de checkCanAddComponent, checkCanDeleteComponent, checkCanMoveComponent, - getStyles, hideNestedPaddingInDesginerView, - onAcceptNewChildElement, - onAcceptMovedChildElement, onResolveNewComponentSchema, - resolveComponentContext, - getPropsConfig, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted + getPropsConfig }; } diff --git a/packages/ui-vue/components/response-toolbar/src/schema/response-toolbar-item.schema.json b/packages/ui-vue/components/response-toolbar/src/schema/response-toolbar-item.schema.json index bf4733a4ade..5e3193f9416 100644 --- a/packages/ui-vue/components/response-toolbar/src/schema/response-toolbar-item.schema.json +++ b/packages/ui-vue/components/response-toolbar/src/schema/response-toolbar-item.schema.json @@ -20,7 +20,7 @@ "properties": { "class": { "type": "string", - "default":"btn-primary" + "default":"btn-secondary" }, "style": { "type": "string" @@ -36,7 +36,7 @@ "text": { "description": "The items of Response Toolbar.", "type": "string", - "default": "新增" + "default": "按钮" }, "icon": { "description": "The icon of response toolbar item.", diff --git a/packages/ui-vue/components/section/src/designer/section.design.component.tsx b/packages/ui-vue/components/section/src/designer/section.design.component.tsx index ac5f36796f7..edb329dfdd7 100644 --- a/packages/ui-vue/components/section/src/designer/section.design.component.tsx +++ b/packages/ui-vue/components/section/src/designer/section.design.component.tsx @@ -21,7 +21,8 @@ import { DesignerItemContext } from '../../../designer-canvas/src/types'; import { useDesignerComponent } from '../../../designer-canvas/src/composition/function/use-designer-component'; import getSectionHeaderRender from '../components/header.component'; import getSectionToolbar from '../components/toolbar.component'; -import { getCustomClass, getCustomStyle } from '../../../common'; +import { getCustomClass } from '../../../common'; +import { DesignerHostService } from '../../../designer-canvas/src/composition/types'; export default defineComponent({ name: 'FSectionDesign', @@ -31,9 +32,9 @@ export default defineComponent({ const elementRef = ref(); const sectionRef = ref(); let sectionParentElementRef = ref(); - + const designerHostService = inject('designer-host-service'); const designItemContext = inject('design-item-context') as DesignerItemContext; - const designerRulesComposition = useDesignerRules(designItemContext.schema, designItemContext.parent?.schema); + const designerRulesComposition = useDesignerRules(designItemContext, designerHostService); const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); componentInstance.value.styles = 'display: inherit;'; diff --git a/packages/ui-vue/components/section/src/designer/use-designer-rules.ts b/packages/ui-vue/components/section/src/designer/use-designer-rules.ts index 3525c2a49a2..4b392df42fc 100644 --- a/packages/ui-vue/components/section/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/section/src/designer/use-designer-rules.ts @@ -1,29 +1,15 @@ /* eslint-disable max-len */ /* eslint-disable complexity */ -import { ref } from "vue"; -import { DesignerHTMLElement, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/use-dragula-common-rule"; -import { ComponentSchema } from "../../../designer-canvas/src/types"; -import { useDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-drag-drop-rules"; +import { DesignerHostService, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; +import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/rule/use-dragula-common-rule"; +import { DesignerItemContext } from "../../../designer-canvas/src/types"; import { sectionPropertyConfigs } from "../property-config/section.property-config"; +import { UseTemplateDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-template-rule"; -export function useDesignerRules(schema: ComponentSchema, parentSchema?: ComponentSchema): UseDesignerRules { +export function useDesignerRules(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { - /** 组件在拖拽时是否需要将所属的Component一起拖拽 */ - const triggerBelongedComponentToMoveWhenMoved = ref(false); - - /** 组件在删除时需要将所属的Component一起拖拽 */ - const triggerBelongedComponentToDeleteWhenDeleted = ref(false); - - const dragAndDropRules = useDragAndDropRules(); - - let canAcceptChildContent = true; - - let hideNestedPadding = false; - - let schemaContext: any; - - let isInFixedContextRules = false; + const dragAndDropRules = new UseTemplateDragAndDropRules(); + const { canMove, canAccept, canDelete } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); /** * 构造属性配置方法 */ @@ -34,93 +20,33 @@ export function useDesignerRules(schema: ComponentSchema, parentSchema?: Compone * 判断是否可以接收拖拽新增的子级控件 */ function canAccepts(draggingContext: DraggingResolveContext): boolean { - const basalRule = useDragulaCommonRule().basalDragulaRuleForContainer(draggingContext); + const basalRule = useDragulaCommonRule().basalDragulaRuleForContainer(draggingContext, designerHostService); if (!basalRule) { return false; } - if (!canAcceptChildContent) { - return false; - } - return true; + return canAccept; } function checkCanDeleteComponent(): boolean { - return !isInFixedContextRules; + return canDelete; } function checkCanMoveComponent(): boolean { - return !isInFixedContextRules; + return canMove; } function hideNestedPaddingInDesginerView() { - return hideNestedPadding; + return !canMove && !canDelete; } - function onAcceptMovedChildElement(sourceElement: DesignerHTMLElement) { - } - /** - * 判断当前容器的上下文 - */ - function resolveComponentContext() { - triggerBelongedComponentToMoveWhenMoved.value = false; - triggerBelongedComponentToDeleteWhenDeleted.value = false; - isInFixedContextRules = false; - canAcceptChildContent = true; - - const component = schema; - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass ? componentClass.split(' ') : []; - - // 子级节点 - const childContents = component.contents || []; - const firstChildContent = childContents.length ? childContents[0] : null; - const firstChildClass = (firstChildContent && firstChildContent.appearance && firstChildContent.appearance.class) || ''; - const firstChildClassList = firstChildClass ? firstChildClass.split(' ') : []; - const childrenClassList = childContents.length ? childContents.reduce((classList: string[], childComponentSchema: ComponentSchema) => { - const childCompoentClass = childComponentSchema && childComponentSchema.appearance ? childComponentSchema.appearance.class : ''; - const childCompoentClassList = childCompoentClass ? childCompoentClass.split(' ') : []; - classList.push(...childCompoentClassList); - return classList; - }, []) : []; - - // 父级节点 - const parent = parentSchema; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - schemaContext = { - componentClass, - componentClassList, - childContents, - firstChildContent, - firstChildClass, - firstChildClassList, - parent, - parentClass, - parentClassList, - children: childContents, - childrenClassList - }; - - const { canAccept, fixed, hidePadding } = dragAndDropRules.getRuleValue(componentClassList[0], schemaContext); - canAcceptChildContent = canAccept; - hideNestedPadding = hidePadding; - isInFixedContextRules = fixed; - return true; - } return { canAccepts, checkCanDeleteComponent, checkCanMoveComponent, hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, getPropsConfig } as UseDesignerRules; } diff --git a/packages/ui-vue/components/section/src/schema/schema-resolver.ts b/packages/ui-vue/components/section/src/schema/schema-resolver.ts index acc3b28caa5..abee9cb2e69 100644 --- a/packages/ui-vue/components/section/src/schema/schema-resolver.ts +++ b/packages/ui-vue/components/section/src/schema/schema-resolver.ts @@ -37,7 +37,7 @@ function wrapContainerForSection(resolver: DynamicResolver, sectionSchema: Recor // 判断拖拽的目标容器 const targetComponentSchema = parentComponentInstance.schema; switch (targetComponentSchema && targetComponentSchema.type) { - case DgControl['splitter'].type: { + case DgControl['splitter-pane'].type: { // 左列右卡的模板:修改容器样式 sectionSchema.appearance.class = 'f-section-in-main'; break; diff --git a/packages/ui-vue/components/splitter/src/designer/splitter-pane-use-designer-rules.ts b/packages/ui-vue/components/splitter/src/designer/splitter-pane-use-designer-rules.ts index 7ea67770648..a90cfc1c53a 100644 --- a/packages/ui-vue/components/splitter/src/designer/splitter-pane-use-designer-rules.ts +++ b/packages/ui-vue/components/splitter/src/designer/splitter-pane-use-designer-rules.ts @@ -1,73 +1,35 @@ /* eslint-disable max-len */ -import { DesignerHTMLElement, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/use-dragula-common-rule"; -import { ComponentSchema } from "../../../designer-canvas/src/types"; -import { getSchemaByType } from "../../../dynamic-resolver/src/schema-resolver"; +import { UseTemplateDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-template-rule"; +import { DesignerHostService, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; +import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/rule/use-dragula-common-rule"; +import { DesignerItemContext } from "../../../designer-canvas/src/types"; -export function useDesignerRules(schema: ComponentSchema, parentSchema?: ComponentSchema): UseDesignerRules { +export function useDesignerRules(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { + const dragAndDropRules = new UseTemplateDragAndDropRules(); + const { canAccept } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); /** * 判断是否可以接收拖拽新增的子级控件 */ function canAccepts(draggingContext: DraggingResolveContext): boolean { - const basalRule = useDragulaCommonRule().basalDragulaRuleForContainer(draggingContext); + const basalRule = useDragulaCommonRule().basalDragulaRuleForContainer(draggingContext, designerHostService); if (!basalRule) { return false; } - - const paneCls = schema.appearance?.class || ''; - const paneClsList = paneCls.split(' ') || []; - - // 若SplitterPane是左侧区域(f-page-content-nav, 表单中一般放置单个列表或树列表),且已有子级节点,则不接收控件 - if (paneClsList.includes('f-page-content-nav')) { - const firstChild = schema.contents && schema.contents[0]; - return !(firstChild && firstChild.type === 'component'); - } - - return true; + return canAccept; } - - function onAcceptNewChildElement(element: DesignerHTMLElement, targetPosition: number, componentSchema: ComponentSchema): ComponentSchema { - const component = schema; - // 控件本身样式 f-section-in-main - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' ') as string[]; - if (component.position === 'main' && componentClassList.includes('f-page-content-main')) { - if (componentSchema.type === 'tabs') { - const tabsClassListInPageContentMain = (componentSchema.appearance && componentSchema.appearance.class) ? - String(componentSchema.appearance.class).split(' ') : []; - tabsClassListInPageContentMain.unshift('f-tabs-in-card'); - componentSchema.appearance = { class: tabsClassListInPageContentMain.join(' ') }; - - const sectionWrapperElementSchema = getSchemaByType('section') as ComponentSchema; - sectionWrapperElementSchema.id = `${componentSchema.id}-section`; - sectionWrapperElementSchema.appearance = { class: "f-section-tabs f-section-in-mainsubcard" }; - sectionWrapperElementSchema.contents = [componentSchema]; - - const wrapperElementSchema = getSchemaByType('content-container') as ComponentSchema; - wrapperElementSchema.id = `${componentSchema.id}-struct-wrapper`; - wrapperElementSchema.appearance = { class: "f-struct-wrapper" }; - wrapperElementSchema.contents = [sectionWrapperElementSchema]; - return wrapperElementSchema; - } - if (componentSchema.type === 'section') { - const tabsClassListInPageContentMain = (componentSchema.appearance && componentSchema.appearance.class) ? - String(componentSchema.appearance.class).split(' ') : []; - tabsClassListInPageContentMain.unshift('f-section-in-main'); - componentSchema.appearance = { class: tabsClassListInPageContentMain.join(' ') }; - componentSchema.title = String(element.innerText); - - const wrapperElementSchema = getSchemaByType('content-container') as ComponentSchema; - wrapperElementSchema.id = `${componentSchema.id}-struct-wrapper`; - wrapperElementSchema.appearance = { class: "f-struct-wrapper" }; - wrapperElementSchema.contents = [componentSchema]; - return wrapperElementSchema; - } - } - return componentSchema; + function checkCanMoveComponent() { + return false; + } + function checkCanDeleteComponent() { + return false; } - return { canAccepts, onAcceptNewChildElement }; + return { + canAccepts, + checkCanMoveComponent, + checkCanDeleteComponent + }; } diff --git a/packages/ui-vue/components/splitter/src/designer/splitter-pane.design.component.tsx b/packages/ui-vue/components/splitter/src/designer/splitter-pane.design.component.tsx index 20352663297..3f0e627763b 100644 --- a/packages/ui-vue/components/splitter/src/designer/splitter-pane.design.component.tsx +++ b/packages/ui-vue/components/splitter/src/designer/splitter-pane.design.component.tsx @@ -7,6 +7,7 @@ import { DesignerItemContext } from '../../../designer-canvas/src/types'; import { useDesignerComponent } from '../../../designer-canvas/src/composition/function/use-designer-component'; import { useDesignerRules } from './splitter-pane-use-designer-rules'; import { getCustomClass, getCustomStyle } from '../../../common'; +import { DesignerHostService } from '../../../designer-canvas/src/composition/types'; export default defineComponent({ name: 'FSplitterPaneDesign', @@ -14,8 +15,9 @@ export default defineComponent({ emits: [], setup(props: SplitterPanePropsType, context) { const elementRef = ref(); + const designerHostService = inject('designer-host-service'); const designItemContext = inject('design-item-context') as DesignerItemContext; - const designerRulesComposition = useDesignerRules(designItemContext.schema, designItemContext.parent?.schema); + const designerRulesComposition = useDesignerRules(designItemContext, designerHostService); const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); componentInstance.value.styles = 'padding:0;box-shadow:none;'; componentInstance.value.canNested = false; @@ -42,7 +44,7 @@ export default defineComponent({ 'f-component-splitter-pane': true, 'drag-container': true } as Record; - return getCustomClass(classObject,props?.customClass); + return getCustomClass(classObject, props?.customClass); }); const splitterPaneStyle = computed(() => { const styleObject = {} as Record; @@ -52,7 +54,7 @@ export default defineComponent({ if ((actualHeight.value && position.value === 'bottom') || position.value === 'top') { styleObject.height = `${actualHeight.value}px`; } - return getCustomStyle(styleObject,props?.customStyle); + return getCustomStyle(styleObject, props?.customStyle); }); return () => { diff --git a/packages/ui-vue/components/splitter/src/designer/splitter-use-designer-rules.ts b/packages/ui-vue/components/splitter/src/designer/splitter-use-designer-rules.ts index 9a28f6bd119..fe77113b364 100644 --- a/packages/ui-vue/components/splitter/src/designer/splitter-use-designer-rules.ts +++ b/packages/ui-vue/components/splitter/src/designer/splitter-use-designer-rules.ts @@ -1,78 +1,26 @@ -import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { ComponentSchema } from "../../../designer-canvas/src/types"; -import { useDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-drag-drop-rules"; +import { DesignerHostService, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; +import { DesignerItemContext } from "../../../designer-canvas/src/types"; +import { UseTemplateDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-template-rule"; -export function useDesignerRules(schema: ComponentSchema, parentSchema?: ComponentSchema): UseDesignerRules { - - const dragAndDropRules = useDragAndDropRules(); - - let schemaContext: any; - - let isInFixedContextRules = false; +export function useDesignerRules(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { + const dragAndDropRules = new UseTemplateDragAndDropRules(); + const { canMove, canDelete } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); function canAccepts(): boolean { - return false; } function checkCanDeleteComponent() { - return !isInFixedContextRules; + return canDelete; } function checkCanMoveComponent() { - return !isInFixedContextRules; - } - - /** - * 判断当前容器的上下文 - */ - function resolveComponentContext() { - isInFixedContextRules = false; - const component = schema; - - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' '); - - // 子级节点 - const childContents = component.contents || []; - const firstChildContent = childContents.length ? childContents[0] : null; - const firstChildClass = firstChildContent && firstChildContent.appearance ? firstChildContent.appearance.class : ''; - const firstChildClassList = firstChildClass ? firstChildClass.split(' ') : []; - const childrenClassList = childContents.length ? childContents.reduce((classList: string[], childComponentSchema: ComponentSchema) => { - const childCompoentClass = childComponentSchema && childComponentSchema.appearance ? childComponentSchema.appearance.class : ''; - const childCompoentClassList = childCompoentClass ? childCompoentClass.split(' ') : []; - classList.push(...childCompoentClassList); - return classList; - }, []) : []; - - // 父级节点 - const parent = parentSchema; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - schemaContext = { - componentClass, - componentClassList, - childContents, - firstChildContent, - firstChildClass, - firstChildClassList, - parent, - parentClass, - parentClassList, - children: childContents, - childrenClassList - }; - - const { fixed } = dragAndDropRules.getRuleValue(componentClassList[0], schemaContext); - isInFixedContextRules = fixed; - return true; + return canMove; } function hideNestedPaddingInDesginerView() { return true; } - return { canAccepts, checkCanDeleteComponent, checkCanMoveComponent, resolveComponentContext, hideNestedPaddingInDesginerView }; + return { canAccepts, checkCanDeleteComponent, checkCanMoveComponent, hideNestedPaddingInDesginerView }; } diff --git a/packages/ui-vue/components/splitter/src/designer/splitter.design.component.tsx b/packages/ui-vue/components/splitter/src/designer/splitter.design.component.tsx index 5d734d330e9..4787ab3e695 100644 --- a/packages/ui-vue/components/splitter/src/designer/splitter.design.component.tsx +++ b/packages/ui-vue/components/splitter/src/designer/splitter.design.component.tsx @@ -7,6 +7,7 @@ import { DesignerItemContext } from '../../../designer-canvas/src/types'; import { useDesignerComponent } from '../../../designer-canvas/src/composition/function/use-designer-component'; import { useDesignerRules } from './splitter-use-designer-rules'; import { getCustomClass, getCustomStyle } from '../../../common'; +import { DesignerHostService } from '../../../designer-canvas/src/composition/types'; export default defineComponent({ name: 'FSplitterDesign', @@ -14,8 +15,9 @@ export default defineComponent({ emits: [], setup(props: SplitterPropsType, context) { const elementRef = ref(); + const designerHostService = inject('designer-host-service'); const designItemContext = inject('design-item-context') as DesignerItemContext; - const designerRulesComposition = useDesignerRules(designItemContext.schema, designItemContext.parent?.schema); + const designerRulesComposition = useDesignerRules(designItemContext, designerHostService); const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); componentInstance.value.canNested = false; const useResizeHandleComposition = useResizeHandle(elementRef); @@ -26,13 +28,13 @@ export default defineComponent({ const classObject = { 'f-splitter': true, } as Record; - return getCustomClass(classObject,props?.customClass); + return getCustomClass(classObject, props?.customClass); }); const splitterStyle = computed(() => { const styleObject = { 'flex-direction': props.direction === 'row' ? 'column' : 'row' } as Record; - return getCustomStyle(styleObject,props?.customStyle); + return getCustomStyle(styleObject, props?.customStyle); }); onMounted(() => { diff --git a/packages/ui-vue/components/switch/src/schema/switch.schema.json b/packages/ui-vue/components/switch/src/schema/switch.schema.json index 67a6c980101..dd0476b3f26 100644 --- a/packages/ui-vue/components/switch/src/schema/switch.schema.json +++ b/packages/ui-vue/components/switch/src/schema/switch.schema.json @@ -74,7 +74,7 @@ "size": { "description": "", "type": "enum", - "default": "middle" + "default": "medium" } }, "required": [ diff --git a/packages/ui-vue/components/tabs/src/designer/tab-page-use-designer-rules.ts b/packages/ui-vue/components/tabs/src/designer/tab-page-use-designer-rules.ts index 3bffcfa6b82..25742ba8f5d 100644 --- a/packages/ui-vue/components/tabs/src/designer/tab-page-use-designer-rules.ts +++ b/packages/ui-vue/components/tabs/src/designer/tab-page-use-designer-rules.ts @@ -1,25 +1,29 @@ /* eslint-disable max-len */ /* eslint-disable complexity */ -import { DesignerHTMLElement, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/use-dragula-common-rule"; -import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; - -export function useDesignerRules(schema: ComponentSchema, designerItemContext?: DesignerItemContext): UseDesignerRules { +import { UseTemplateDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-template-rule"; +import { DesignerHostService, DesignerHTMLElement, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; +import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/rule/use-dragula-common-rule"; +import { DesignerItemContext } from "../../../designer-canvas/src/types"; +export function useDesignerRules(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { + const dragAndDropRules = new UseTemplateDragAndDropRules(); + const { canAccept } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); /** * 判断是否可以接收拖拽新增的子级控件 */ function canAccepts(draggingContext: DraggingResolveContext): boolean { - const basalRule = useDragulaCommonRule().basalDragulaRuleForContainer(draggingContext); + const basalRule = useDragulaCommonRule().basalDragulaRuleForContainer(draggingContext, designerHostService); if (!basalRule) { return false; } - return true; - } - - function onAcceptMovedChildElement(sourceElement: DesignerHTMLElement) { + // 限定tab-page只有一个子级控件 + const schema = designItemContext.schema; + if (schema.contents && schema.contents.length > 0) { + return false; + } + return canAccept; } - return { canAccepts, onAcceptMovedChildElement }; + return { canAccepts }; } diff --git a/packages/ui-vue/components/tabs/src/designer/tab-page.design.component.tsx b/packages/ui-vue/components/tabs/src/designer/tab-page.design.component.tsx index ea877d5df1a..ea99451cdf1 100644 --- a/packages/ui-vue/components/tabs/src/designer/tab-page.design.component.tsx +++ b/packages/ui-vue/components/tabs/src/designer/tab-page.design.component.tsx @@ -21,6 +21,7 @@ import { DesignerItemContext } from '../../../designer-canvas/src/types'; import { useDesignerComponent } from '../../../designer-canvas/src/composition/function/use-designer-component'; import { useDesignerRules } from './tab-page-use-designer-rules'; import { JSX } from 'vue/jsx-runtime'; +import { DesignerHostService } from '../../../designer-canvas/src/composition/types'; export default defineComponent({ name: 'FTabPageDesign', @@ -29,7 +30,8 @@ export default defineComponent({ setup(props: TabPageProps, context: SetupContext) { const elementRef = ref(); const designItemContext = inject('design-item-context') as DesignerItemContext; - const designerRulesComposition = useDesignerRules(designItemContext.schema, designItemContext.parent); + const designerHostService = inject('designer-host-service'); + const designerRulesComposition = useDesignerRules(designItemContext, designerHostService); const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); componentInstance.value.canNested = false; componentInstance.value.canDelete = false; diff --git a/packages/ui-vue/components/tabs/src/designer/tab-use-designer-rules.ts b/packages/ui-vue/components/tabs/src/designer/tab-use-designer-rules.ts index 9e207dde757..99f965af02b 100644 --- a/packages/ui-vue/components/tabs/src/designer/tab-use-designer-rules.ts +++ b/packages/ui-vue/components/tabs/src/designer/tab-use-designer-rules.ts @@ -1,106 +1,44 @@ /* eslint-disable max-len */ /* eslint-disable complexity */ -import { useDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-drag-drop-rules"; -import { DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; +import { UseTemplateDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-template-rule"; +import { DesignerHostService, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; import { tabPagePropertyConfig } from "../property-config/tab-page.property-config"; import { tabsPropertyConfigs } from "../property-config/tabs.property-config"; -export function useDesignerRules(schema: ComponentSchema, designerItemContext?: DesignerItemContext): UseDesignerRules { +export function useDesignerRules(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { + const schema = designItemContext.schema as ComponentSchema; - const dragAndDropRules = useDragAndDropRules(); + const dragAndDropRules = new UseTemplateDragAndDropRules(); + const { canMove, canAccept, canDelete } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); - let canAcceptChildContent = true; - - let hideNestedPadding = false; - - let schemaContext: any; - - let isInFixedContextRules = false; /** - * 判断是否可以接收拖拽新增的子级控件 - */ + * 判断是否可以接收拖拽新增的子级控件 + */ function canAccepts(draggingContext: DraggingResolveContext): boolean { - return false; + return canAccept; } function checkCanDeleteComponent(): boolean { - return !isInFixedContextRules; + return canDelete; } function checkCanMoveComponent(): boolean { - return !isInFixedContextRules; + return canMove; } function hideNestedPaddingInDesginerView() { - return hideNestedPadding; + return !canMove && !canDelete; } - /** - * 判断当前容器的上下文 - */ - function resolveComponentContext() { - - const component = schema; - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass ? componentClass.split(' ') : []; - - // 父级节点 - const parentSchema = designerItemContext?.schema; - const parentClass = parentSchema && parentSchema.appearance && parentSchema.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - // 子级节点 - const childContents = component.contents || []; - const firstChildContent = childContents.length ? childContents[0] : null; - const firstChildClass = (firstChildContent && firstChildContent.appearance && firstChildContent.appearance.class) || ''; - const firstChildClassList = firstChildClass ? firstChildClass.split(' ') : []; - const childrenClassList = childContents.length ? childContents.reduce((classList: string[], childComponentSchema: ComponentSchema) => { - const childCompoentClass = childComponentSchema && childComponentSchema.appearance ? childComponentSchema.appearance.class : ''; - const childCompoentClassList = childCompoentClass ? childCompoentClass.split(' ') : []; - classList.push(...childCompoentClassList); - return classList; - }, []) : []; - - const grandParent = designerItemContext?.parent && designerItemContext.parent.schema; - const grandParentClass = grandParent && grandParent.appearance && grandParent.appearance.class || ''; - const grandParentClassList = grandParentClass ? grandParentClass.split(' ') : []; - - schemaContext = { - componentClass, - componentClassList, - childContents, - firstChildContent, - firstChildClass, - firstChildClassList, - parent, - parentClass, - parentClassList, - children: childContents, - childrenClassList - }; - - const { canAccept, fixed, hidePadding } = dragAndDropRules.getRuleValue(componentClassList[0], schemaContext); - canAcceptChildContent = canAccept; - hideNestedPadding = hidePadding; - isInFixedContextRules = fixed; - return true; - - // // 1、子表区域固定层级:container(f-struct-wrapper)--->section(f-section-tabs)--->tab(f-component-tabs) - // if (cmpClassList.includes('f-component-tabs') && parentClassList.includes('f-section-tabs') && grandParentClassList.includes('f-struct-wrapper')) { - // hidePadding = true; - // return true; - // } - } // 构造属性配置方法 function getPropsConfig(componentId: string) { // 在画布中点击tabPage 和tabs 都会走此方法,这里根据画布中选中的控件来返回各自的属性配置 const focusedElementId = document.querySelector('.dgComponentFocused')?.id; if (focusedElementId === `${schema.id}-design-item`) { return tabsPropertyConfigs; - }else{ + } else { return tabPagePropertyConfig } } @@ -110,7 +48,6 @@ export function useDesignerRules(schema: ComponentSchema, designerItemContext?: checkCanMoveComponent, getPropsConfig, hideNestedPaddingInDesginerView, - resolveComponentContext, } as UseDesignerRules; } diff --git a/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx b/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx index d5a40e329b0..1a8e309429b 100644 --- a/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx +++ b/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx @@ -29,6 +29,7 @@ import { useDesignerRules } from './tab-use-designer-rules'; import { useDesignTabs } from './tabs-use-design'; import tabToolbarDesignRender from './tab-toolbar.design.component'; import { JSX } from 'vue/jsx-runtime'; +import { DesignerHostService } from '../../../designer-canvas/src/composition/types'; export default defineComponent({ name: 'FTabsDesign', @@ -36,8 +37,9 @@ export default defineComponent({ emits: ['tabChange', 'tabRemove'] as (string[] & ThisType) | undefined, setup(props: TabsDesignProps, context: SetupContext) { const elementRef = ref(); + const designerHostService = inject('designer-host-service'); const designItemContext = inject('design-item-context') as DesignerItemContext; - const designerRulesComposition = useDesignerRules(designItemContext.schema, designItemContext.parent); + const designerRulesComposition = useDesignerRules(designItemContext, designerHostService); const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); const tabType = ref(props.tabType); // const tabsElement = shallowRef(); diff --git a/packages/ui-vue/components/tabs/src/schema/schema-resolver.ts b/packages/ui-vue/components/tabs/src/schema/schema-resolver.ts index 37268639c4b..2ad75e7b124 100644 --- a/packages/ui-vue/components/tabs/src/schema/schema-resolver.ts +++ b/packages/ui-vue/components/tabs/src/schema/schema-resolver.ts @@ -47,7 +47,7 @@ function wrapContainerSectionForTabs(resolver: DynamicResolver, context: Record< // 判断拖拽的目标容器 const targetComponentSchema = parentComponentInstance.schema; switch (targetComponentSchema && targetComponentSchema.type) { - case DgControl['splitter'].type: { + case DgControl['splitter-pane'].type: { // 左列右卡的模板:修改容器样式 sectionSchema.appearance.class = 'f-section-tabs f-section-in-main'; tabsSchema.appearance.class = 'f-component-tabs'; -- Gitee From b5f6f583e43fe401a8c1b70de30d94841156cbce Mon Sep 17 00:00:00 2001 From: wang-xh Date: Thu, 12 Dec 2024 11:01:26 +0800 Subject: [PATCH 019/181] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dcombo-tree=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E4=B8=AD=E4=B8=8D=E5=B8=A6data?= =?UTF-8?q?=E7=9A=84=E5=9C=BA=E6=99=AF=E4=B8=8B=EF=BC=8C=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=B7=B2=E9=80=89=E6=95=B0=E6=8D=AE=E7=9A=84=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../composition/control-creator.service.ts | 7 ++----- .../src/composition/use-data-source.ts | 4 ++-- .../src/designer/use-designer-rules.ts | 7 ++++--- .../composition/entity/input-base-property.ts | 20 ++++++++----------- 4 files changed, 16 insertions(+), 22 deletions(-) diff --git a/packages/designer/src/components/composition/control-creator.service.ts b/packages/designer/src/components/composition/control-creator.service.ts index 45e0d0e748a..ec94560b234 100644 --- a/packages/designer/src/components/composition/control-creator.service.ts +++ b/packages/designer/src/components/composition/control-creator.service.ts @@ -121,7 +121,7 @@ export function useControlCreator(): UseControlCreator { // 列编辑器 if (needInlineEditor) { const realEditor = metadataConverter.getRealEditorType(field?.editor?.$type || ''); - const fieldEditor = setFormFieldProperty(field, realEditor,''); + const fieldEditor = setFormFieldProperty(field, realEditor, ''); metadata.editor = fieldEditor.editor; } @@ -156,14 +156,11 @@ export function useControlCreator(): UseControlCreator { */ function createFormGroupWithoutField(editorType = 'input-group', controlClass = 'col-12 col-md-6 col-xl-3 col-el-2') { const formGroupMetadata = getSchemaByType('form-group') || {}; - formGroupMetadata.id = Math.random().toString(36).substr(2, 4) + formGroupMetadata.id = `${editorType}_${Math.random().toString(36).substr(2, 4)}`; formGroupMetadata.appearance = { class: controlClass || '' }; formGroupMetadata.binding = null; const formEditor = getSchemaByType(editorType) || {}; - delete formEditor.id; - delete formEditor.binding; - delete formEditor.appearance; formGroupMetadata.editor = formEditor; return formGroupMetadata; diff --git a/packages/ui-vue/components/combo-tree/src/composition/use-data-source.ts b/packages/ui-vue/components/combo-tree/src/composition/use-data-source.ts index 43eefc26f56..f37895731d0 100644 --- a/packages/ui-vue/components/combo-tree/src/composition/use-data-source.ts +++ b/packages/ui-vue/components/combo-tree/src/composition/use-data-source.ts @@ -17,8 +17,8 @@ export function useDataSource(props: ComboTreeProps): UseDataSource { if (item.data) { return valueMap.has(String(item.data[props.valueField])); } - return true; - }).map((item: Option) => item.data); + return valueMap.has(String(item[props.valueField])); + }).map((item: Option) => item.data ? item.data : item); } function updateDisplayTextByValue(value: string) { diff --git a/packages/ui-vue/components/dynamic-form/src/designer/use-designer-rules.ts b/packages/ui-vue/components/dynamic-form/src/designer/use-designer-rules.ts index 86c5031b7b3..46606d3161c 100644 --- a/packages/ui-vue/components/dynamic-form/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/dynamic-form/src/designer/use-designer-rules.ts @@ -4,6 +4,7 @@ import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/r import { ComponentSchema, DesignerItemContext, ResolveComponentContext } from "../../../designer-canvas/src/types"; import { getSchemaByType } from "../../../dynamic-resolver/src/schema-resolver"; import { UseTemplateDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-template-rule"; +import { ResponseFormProperty } from "../property-config/form.property-config"; export function useDesignerRules(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { const schema = designItemContext.schema as ComponentSchema; @@ -90,7 +91,7 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe if (belongedComponentInstance && belongedComponentInstance.schema && belongedComponentInstance.schema.componentType) { const formColumns = belongedComponentInstance.schema.formColumns; let appearanceClass = resolveControlClassByComponentType(formColumns); - appearanceClass=designerHostService.formSchemaUtils.getControlClassByFormUnifiedLayout(appearanceClass,"",designItemContext.schema); + appearanceClass = designerHostService?.formSchemaUtils.getControlClassByFormUnifiedLayout(appearanceClass, "", designItemContext.schema); if (!formGroupElementSchema.appearance) { formGroupElementSchema.appearance = {}; @@ -137,8 +138,8 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe function hideNestedPaddingInDesginerView() { return false; } - // 构造属性配置方法 - function getPropsConfig(componentId: string) { + // 构造属性配置方法 + function getPropsConfig(componentId: string) { const responseFormPops = new ResponseFormProperty(componentId, designerHostService); return responseFormPops.getPropertyConfig(schema, designItemContext.componentInstance.value); } diff --git a/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts b/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts index d88cd3bdfc2..48ffb899d3a 100644 --- a/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts +++ b/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts @@ -20,7 +20,7 @@ export class InputBaseProperty extends BaseControlProperty { // 基本信息 this.propertyConfig.categories['basic'] = this.getBasicProperties(propertyData, componentInstance); // 外观 - this.propertyConfig.categories['appearance'] = this.getAppearanceProperties(propertyData,componentInstance); + this.propertyConfig.categories['appearance'] = this.getAppearanceProperties(propertyData, componentInstance); // 编辑器 this.propertyConfig.categories['editor'] = this.getEditorProperties(propertyData); return this.propertyConfig; @@ -98,7 +98,7 @@ export class InputBaseProperty extends BaseControlProperty { } }; } - public getAppearanceProperties(propertyData,componentInstance): any { + public getAppearanceProperties(propertyData, componentInstance): any { var self = this; return { @@ -138,12 +138,12 @@ export class InputBaseProperty extends BaseControlProperty { case 'responseLayout': self.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(changeObject.propertyValue, self.componentId || propertyData.id); self.updateUnifiedLayoutAfterResponseLayoutChanged(self.componentId); - self.updateElementByParentContainer(propertyData.id,componentInstance); + self.updateElementByParentContainer(propertyData.id, componentInstance); delete propertyData.responseLayout; break; case 'class': self.updateUnifiedLayoutAfterControlChanged(changeObject.propertyValue, propertyData.id, this.componentId); - self.updateElementByParentContainer(propertyData.id,componentInstance); + self.updateElementByParentContainer(propertyData.id, componentInstance); break; } @@ -189,11 +189,7 @@ export class InputBaseProperty extends BaseControlProperty { newControl = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, newControlType); } if (!newControl) { - newControl = getSchemaByType('form-group') || {}; - newControl.editor = getSchemaByType(newControlType) || {}; - delete newControl.editor.id; - delete newControl.editor.binding; - delete newControl.editor.appearance; + newControl = this.controlCreatorUtils.createFormGroupWithoutField(newControlType); } // 4、保留原id样式等属性 Object.assign(newControl, { @@ -298,10 +294,10 @@ export class InputBaseProperty extends BaseControlProperty { * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型 */ private updateUnifiedLayoutAfterResponseLayoutChanged(componentId: string, controlLayoutConfig?: any): FormUnifiedColumnLayout | undefined { - const {formNode } = this.responseLayoutEditorFunction.checkCanFindFormNode(componentId); + const { formNode } = this.responseLayoutEditorFunction.checkCanFindFormNode(componentId); // 更改form上的统一配置 - if (!formNode || !formNode.unifiedLayout) { - return; + if (!formNode || !formNode.unifiedLayout) { + return; } const responseLayoutConfig: ResponseFormLayoutContext[] = []; this.responseLayoutEditorFunction.getResonseFormLayoutConfig(formNode, responseLayoutConfig, 1); -- Gitee From 1463655e0666e39c1444501b94162fdbb1bf8904 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Thu, 12 Dec 2024 14:06:06 +0800 Subject: [PATCH 020/181] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E9=9D=A2=E6=9D=BF=E5=8F=AA=E8=AF=BB=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=A4=B1=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/composition/rule/use-template-rule.ts | 10 +++++++++- .../src/property-config-resolver.ts | 13 +++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/packages/ui-vue/components/designer-canvas/src/composition/rule/use-template-rule.ts b/packages/ui-vue/components/designer-canvas/src/composition/rule/use-template-rule.ts index 5bf0a7d4605..5a3fb47d55a 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/rule/use-template-rule.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/rule/use-template-rule.ts @@ -8,6 +8,9 @@ export interface DragDropRule { [index: string]: boolean; } +/** + * 解析模板拖拽控制规则 + */ export class UseTemplateDragAndDropRules { public getTemplateRule(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): DragDropRule { @@ -38,11 +41,16 @@ export class UseTemplateDragAndDropRules { if (typeof ruleSchema === 'boolean') { return ruleSchema; + } else { + return this.parseRuleValueSchema(ruleSchema, componentContext); } + } + + private parseRuleValueSchema(ruleSchema: any, componentContext: any) { const invalidContext = ruleSchema.invalidContext || []; let isMatched = true; for (const ruleContext of invalidContext) { - + // 判断子级节点是否匹配 if (ruleContext.firstLevelChild) { if (ruleContext.firstLevelChild.class) { diff --git a/packages/ui-vue/components/dynamic-resolver/src/property-config-resolver.ts b/packages/ui-vue/components/dynamic-resolver/src/property-config-resolver.ts index 295f30aca3f..99298a36059 100644 --- a/packages/ui-vue/components/dynamic-resolver/src/property-config-resolver.ts +++ b/packages/ui-vue/components/dynamic-resolver/src/property-config-resolver.ts @@ -24,10 +24,10 @@ const propertyConverterMap = new Map([ ['/converter/property-editor.converter', propertyEditorConverter], ['/converter/items-count.converter', itemsCountConverter], ['/converter/type.converter', typeConverter], - ['/converter/change-editor.converter',changeEditorConverter], + ['/converter/change-editor.converter', changeEditorConverter], ['/converter/form-group-label.converter', formGroupLabelConverter], - ['/converter/field-selector.converter',fieldSelectorConverter], - ['/converter/pagination.converter',paginationConverter] + ['/converter/field-selector.converter', fieldSelectorConverter], + ['/converter/pagination.converter', paginationConverter] ]); const propertyEffectMap = {} as Record; const propertyEditorMap = new Map([ @@ -121,9 +121,10 @@ function getPropertyEntities( const propertyName = propertySchema.title; const propertyType = propertySchema.type; const defaultEditor = propertyEditorMap.get(propertyType) || { type: 'input-group', enableClear: false }; - const editor = propertySchema.editor ? Object.assign({}, defaultEditor, propertySchema.editor) as EditorConfig : defaultEditor; + const editor = propertySchema.editor ? Object.assign({}, defaultEditor, propertySchema.editor) as EditorConfig : Object.assign({},defaultEditor); const visible = isVisible(propertySchemaKeys, propertySchema, propertyConfigMap); const readonly = isReadonly(propertySchemaKeys, propertySchema, propertyConfigMap); + editor.readonly = readonly(); const cascadeConfig = propertySchema.type === 'cascade' ? getPropertyEntities(propertySchema.properties, propertyConfigMap, editingSchema, rawSchema, schemaService, componentId, categoryConverter) : []; const hideCascadeTitle = true; let converter = tryGetPropertyConverter(propertySchema, categoryConverter); @@ -178,7 +179,7 @@ function getPropertyConfigByType(schemaType: string, schemaService: SchemaServic return []; } -function tryToResolveReference(categoryId: string, propertyCategory: Record, rawSchema: ComponentSchema, schemaService: SchemaService,componentId='') { +function tryToResolveReference(categoryId: string, propertyCategory: Record, rawSchema: ComponentSchema, schemaService: SchemaService, componentId = '') { const refSchemaPath = propertyCategory.$ref.schema; const $converter = propertyCategory.$ref.converter; const refSchema = rawSchema[refSchemaPath]; @@ -219,7 +220,7 @@ function getPropertyConfigBySchema(rawSchema: ComponentSchema, schemaService: Sc Object.keys(propertyConfigSchema.categories).map((categoryId: string) => { const propertyCategory = propertyConfigSchema.categories[categoryId]; if (propertyCategory.$ref) { - propertyConfigs.push(tryToResolveReference(categoryId, propertyCategory, rawSchema, schemaService,componentId) as ElementPropertyConfig); + propertyConfigs.push(tryToResolveReference(categoryId, propertyCategory, rawSchema, schemaService, componentId) as ElementPropertyConfig); return; } const categoryName = propertyCategory?.title; -- Gitee From 8def7439d982d3a3f69bcf426d5a6ceb88b133d3 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Thu, 12 Dec 2024 14:09:57 +0800 Subject: [PATCH 021/181] =?UTF-8?q?fix:=20=E5=B1=8F=E8=94=BD=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=AE=B1=E4=B8=AD=E7=9A=84=E6=99=AE=E9=80=9A=E5=AE=B9?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui-vue/components/designer-toolbox/src/toolbox.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/ui-vue/components/designer-toolbox/src/toolbox.json b/packages/ui-vue/components/designer-toolbox/src/toolbox.json index 90c6dc645ee..051b9a15b82 100644 --- a/packages/ui-vue/components/designer-toolbox/src/toolbox.json +++ b/packages/ui-vue/components/designer-toolbox/src/toolbox.json @@ -92,12 +92,6 @@ "type": "tabs", "name": "标签页区域", "category": "container" - }, - { - "id": "ContentContainer", - "type": "content-container", - "name": "容器", - "category": "container" } ] } -- Gitee From 54920d66dee608566d1267153d8f0f0644a56d98 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Thu, 12 Dec 2024 14:35:36 +0800 Subject: [PATCH 022/181] =?UTF-8?q?fix:=20=E6=8B=96=E6=8B=BD=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E5=8F=AF=E7=BC=96=E8=BE=91=E8=A1=A8=E6=A0=BC=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E9=BB=98=E8=AE=A4=E4=B8=8D=E5=90=AF=E7=94=A8=E5=88=86?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/composition/data-grid-component-creator.service.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts b/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts index aae3072037a..6b7ed0e56c2 100644 --- a/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts +++ b/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts @@ -140,7 +140,7 @@ export class DataGridComponentCreatorService { container = contentContainer; } - // 2、创建DataGrid + // 2、创建DataGrid(暂时不开启子表分页) const dataGrid = this.resolver.getSchemaByType('data-grid') as ComponentSchema; const fields: any[] = []; @@ -151,7 +151,10 @@ export class DataGridComponentCreatorService { }, fields, fieldEditable: buildInfo.editable, - dataSource: buildInfo.dataSource || '' + dataSource: buildInfo.dataSource || '', + pagination: { + enable: buildInfo.editable ? false : true + } }); container.contents = [dataGrid]; const { selectedFields } = buildInfo; -- Gitee From 0f29a3df431055cb21a6d0514412b124e3cfa407 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Fri, 13 Dec 2024 10:47:19 +0800 Subject: [PATCH 023/181] =?UTF-8?q?feature:=20=E6=8B=96=E6=8B=BD=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E6=97=B6=E6=B7=BB=E5=8A=A0=E6=96=B0=E5=A2=9E=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=8C=89=E9=92=AE=EF=BC=9BtabPage=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=B7=A5=E5=85=B7=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-grid-component-creator.service.ts | 88 ++++++++++++++++++- .../components/designer-item.component.tsx | 1 + .../section/src/schema/section.schema.json | 2 +- .../section/src/schema/toolbar-resolver.ts | 12 +-- .../tab-header-item.design.component.tsx | 18 +++- .../tabs/src/designer/tabs-use-design.ts | 33 ++++++- .../src/designer/tabs.design.component.tsx | 16 +++- 7 files changed, 151 insertions(+), 19 deletions(-) diff --git a/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts b/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts index 6b7ed0e56c2..63165bb8d01 100644 --- a/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts +++ b/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts @@ -35,9 +35,14 @@ export class DataGridComponentCreatorService { formSchema.module.viewmodels.push(viewModelNode); formSchema.module.components.push(componentNode); - return this.wrapContainerSectionForComponent(componentRefNode, buildInfo);; + return this.wrapContainerSectionForComponent(componentRefNode, buildInfo); } - + /** + * 追加父容器 + * @param componentRefNode + * @param buildInfo + * @returns + */ private wrapContainerSectionForComponent(componentRefNode: any, buildInfo: ComponentBuildInfo) { const allowedParentContainer = [DgControl['content-container'].type, DgControl['response-layout-item'].type, DgControl['splitter-pane'].type]; @@ -48,11 +53,90 @@ export class DataGridComponentCreatorService { const section = containerSection.contents[0]; section.contents = [componentRefNode]; + this.appendAddDeleteBtnToParentContainer(section, buildInfo); + return containerSection; } } + if (parentContainerType === DgControl['tab-page'].type) { + this.appendAddDeleteBtnToParentContainer(buildInfo?.parentComponentInstance?.schema, buildInfo); + + } return componentRefNode; } + + /** + * 为父容器追加新增、删除按钮 + */ + private appendAddDeleteBtnToParentContainer(resolvedContainerSchema: any, buildInfo: ComponentBuildInfo) { + const resolvedContainerType = resolvedContainerSchema.type; + // 限制子表 + if (buildInfo.bindTo === '/') { + return; + } + // 限制列表或卡片 + if (buildInfo.componentType !== 'data-grid' && buildInfo.componentType !== 'form') { + return; + } + + const btnType = DgControl['tab-page'].type === resolvedContainerType ? 'tab-toolbar-item' : 'section-toolbar-item'; + const btns = [{ + id: `button-add-${buildInfo.componentId}`, + type: btnType, + text: '新增', + disable: `!viewModel.stateMachine['canAddDetail']`, + appearance: { + class: 'btn btn-secondary f-btn-ml' + }, + visible: true, + onClick: null + }, + { + id: `button-remove-${buildInfo.componentId}`, + type: btnType, + text: '删除', + disable: `!viewModel.stateMachine['canRemoveDetail']`, + appearance: { + class: 'btn btn-secondary f-btn-ml' + }, + visible: true, + onClick: null + }]; + if (!resolvedContainerSchema.toolbar) { + resolvedContainerSchema.toolbar = { buttons: [] }; + } + if (!resolvedContainerSchema.toolbar.buttons) { + resolvedContainerSchema.toolbar.buttons = []; + } + resolvedContainerSchema.toolbar.buttons = resolvedContainerSchema.toolbar.buttons.concat(btns); + const newToolbar = cloneDeep(resolvedContainerSchema.toolbar); + // delete resolvedContainerSchema.toolbar; + resolvedContainerSchema.toolbar = newToolbar; + // if (buildInfo?.parentComponentInstance?.parent && buildInfo?.parentComponentInstance?.parent['changeToolbarItems']) { + // buildInfo?.parentComponentInstance?.parent['changeToolbarItems']() + + // } + + // if (buildInfo.parentComponentInstance?.parent && buildInfo.parentComponentInstance?.parent['rebuild']) { + // buildInfo.parentComponentInstance.parent['rebuild'](); + // } + // const newToolbar = Object.assign({}, resolvedContainerSchema.toolbar); + + // if (DgControl['tab-page'].type === resolvedContainerType && buildInfo?.parentComponentInstance?.parent) { + // const tabSchema = buildInfo?.parentComponentInstance?.parent['schema']; + // if (tabSchema && tabSchema.contents) { + // const index = tabSchema.contents.findIndex(content => content.id === resolvedContainerSchema.id); + // if (index > -1) { + // tabSchema.contents.splice(index, 1); + // tabSchema.contents.splice(index, 0, resolvedContainerSchema); + + // } + // } + // } + // resolvedContainerSchema.toolbar = newToolbar; + // resolvedContainerSchema = cloneDeep(resolvedContainerSchema); + } + createComponentRefNode(buildInfo: ComponentBuildInfo): any { const componentRefNode = this.resolver.getSchemaByType('component-ref') as ComponentSchema; Object.assign(componentRefNode, { diff --git a/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx b/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx index 09078d3c818..d6c1929a810 100644 --- a/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx +++ b/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx @@ -180,6 +180,7 @@ const FDesignerItem = defineComponent({ const viewProps = propsConverter ? propsConverter(viewSchema) : {}; viewProps.customClass = props.ignore ? viewProps.customClass : ''; viewProps.componentId = componentId.value; + viewProps.id = viewSchema.id; const shouldShowPlaceholder = viewSchema.contents && viewSchema.contents.length === 0; const hasContent = viewSchema.contents && !!viewSchema.contents.length; return hasContent && Component ? ( diff --git a/packages/ui-vue/components/section/src/schema/section.schema.json b/packages/ui-vue/components/section/src/schema/section.schema.json index b0b07304411..8856ef6ee50 100644 --- a/packages/ui-vue/components/section/src/schema/section.schema.json +++ b/packages/ui-vue/components/section/src/schema/section.schema.json @@ -122,7 +122,7 @@ "type": "string", "default": "inHead" }, - "contents": { + "buttons": { "type": "array", "default": [] } diff --git a/packages/ui-vue/components/section/src/schema/toolbar-resolver.ts b/packages/ui-vue/components/section/src/schema/toolbar-resolver.ts index da71f391413..3dfcafd85ec 100644 --- a/packages/ui-vue/components/section/src/schema/toolbar-resolver.ts +++ b/packages/ui-vue/components/section/src/schema/toolbar-resolver.ts @@ -1,15 +1,7 @@ -export function resolveSectionToolbar(key: string, toolbarObject: { contents: any[]; position: string }) { - - if (toolbarObject && toolbarObject.contents && toolbarObject.contents.length) { - toolbarObject.contents.forEach((toolbarItem: any) => { - if (toolbarItem.title) { - toolbarItem.text = toolbarItem.title - } - }); - } +export function resolveSectionToolbar(key: string, toolbarObject: { buttons: any[]; position: string }) { return { - buttons: toolbarObject.contents, + buttons: toolbarObject.buttons, buttonPosition: toolbarObject.position }; } diff --git a/packages/ui-vue/components/tabs/src/designer/tab-header-item.design.component.tsx b/packages/ui-vue/components/tabs/src/designer/tab-header-item.design.component.tsx index ca00bf79ab6..f7e81cf83e0 100644 --- a/packages/ui-vue/components/tabs/src/designer/tab-header-item.design.component.tsx +++ b/packages/ui-vue/components/tabs/src/designer/tab-header-item.design.component.tsx @@ -14,7 +14,7 @@ export default function ( useTabsComposition: UseDesignTabs, componentInstance: Ref ) { - const { activeId, removeTab, selectTab, removeDesignTab, selectDesignTab } = useTabsComposition; + const { activeId, removeTab, selectTab, removeDesignTab, selectDesignTab, addTabPageToolbar } = useTabsComposition; const tabTextClass = computed(() => { const classObject = { 'st-tab-text': true, @@ -86,6 +86,9 @@ export default function ( () => removeDesignTab(payload, props.id), () => { }); } + function onAddButtonClick(payload: MouseEvent) { + addTabPageToolbar(payload, props.id); + } function renderDeleteButton() { return (
); } + function renderAddButton() { + return ( +
onAddButtonClick(payload)}> + +
+ ); + } function renderIconPanel() { return (
{renderDeleteButton()} + {!props.toolbar || !props.toolbar.buttons || !props.toolbar.buttons.length ? renderAddButton() : ''}
); diff --git a/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts b/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts index a7fe8a0ceb3..afae411c700 100644 --- a/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts +++ b/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts @@ -174,6 +174,8 @@ export function useDesignTabs( } tabs?.splice(index, 1); setAcitveTab(tabId); + changeToolbarItems(); + designerItemContext?.setupContext?.emit('selectionChange'); canvasChanged.value++; } function deactiveElements() { @@ -216,6 +218,33 @@ export function useDesignTabs( // } // designerItemContext?.setupContext?.emit('selectionChange', 'response-toolbar', toolbar); } + + function addTabPageToolbar(payload: MouseEvent, tabId: string) { + preventEvent(payload); + const tabs = designerItemContext.schema.contents; + const tabPage = tabs?.find((schema: ComponentSchema) => schema.id === tabId); + if (!tabPage) { + + return; + } + if (!tabPage.toolbar) { + tabPage.toolbar = {}; + } + if (!tabPage.toolbar.buttons) { + tabPage.toolbar.buttons = []; + } + tabPage.toolbar.buttons.push({ + "id": "fybxdmx2AddButton3333", + "type": "tab-toolbar-item", + "text": "新增", + "disabled": false, + "appearance": { + "class": "btn btn-secondary f-btn-ml" + } + + + }) + } return { activeId, addTab, @@ -229,6 +258,8 @@ export function useDesignTabs( removeDesignTab, selectDesignTab, selectDesignTabToolbar, - toolbarSchema + toolbarSchema, + changeToolbarItems, + addTabPageToolbar }; } diff --git a/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx b/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx index 1a8e309429b..f6b40e3ea3c 100644 --- a/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx +++ b/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx @@ -47,7 +47,7 @@ export default defineComponent({ const tabNavigationElementRef = shallowRef(); const tabContentElementRef = shallowRef(); const useTabsComposition = useDesignTabs(props, context, tabNavigationElementRef, designItemContext); - const { activeId, changeTitleStyle, tabPages, addTab, updateTab, selectTabByTabId, toolbarItems } = useTabsComposition; + const { activeId, changeTitleStyle, tabPages, addTab, updateTab, selectTabByTabId, toolbarItems, changeToolbarItems } = useTabsComposition; const useOnePageComposition = useOnePage(props, tabContentElementRef, useTabsComposition); @@ -109,7 +109,7 @@ export default defineComponent({ }; function updateToolbarItems() { const currentTabSchema = getCurrentTabSchema(); - toolbarItems.value = [...currentTabSchema?.toolbar?.contents]; + toolbarItems.value = [...currentTabSchema?.toolbar?.buttons]; }; provide('toolbar-item-handler', updateToolbarItems); // 填充模式 @@ -193,7 +193,7 @@ export default defineComponent({ const { renderMorePagesButtton } = getMoreButtonRender(props, useDropDownComposition, useNavComposition, useTabsComposition); function renderToolbar() { - return !!toolbarItems.value.length && tabToolbarDesignRender(useTabsComposition, componentInstance, designerRulesComposition, designItemContext,props.componentId); + return !!toolbarItems.value.length && tabToolbarDesignRender(useTabsComposition, componentInstance, designerRulesComposition, designItemContext, props.componentId); } const renderTabHeader = tabHeaderRenderMap.get(props.tabType) || tabHeaderRenderMap.get('default'); @@ -225,9 +225,17 @@ export default defineComponent({ } context.expose(componentInstance.value); + // function rebuild() { + // // selectTabByTabId(activeId.value); + // // reload.value++; + // } + // componentInstance.value['rebuild'] = rebuild; + + // const reload = ref(0); + componentInstance.value['changeToolbarItems'] = changeToolbarItems; return () => { return ( -
+
{renderHeader()} {renderContent()}
-- Gitee From c0727845dbaabe9d67d9c463bc922d258166927e Mon Sep 17 00:00:00 2001 From: wang-xh Date: Sat, 14 Dec 2024 17:37:02 +0800 Subject: [PATCH 024/181] =?UTF-8?q?fix:=20=E6=96=B0=E5=A2=9E=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E7=BC=96=E8=BE=91=E5=99=A8=EF=BC=8C=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=A7=86=E5=9B=BE=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../composition/design-viewmodel.service.ts | 32 +-- .../components/composition/use-form-schema.ts | 17 +- .../src/components/types/design-viewmodel.ts | 8 +- .../designer/src/components/types/metadata.ts | 4 +- .../avatar.property-config.json | 80 ------ .../checkbox.property-config.json | 80 ------ .../combo-list.property-config.json | 90 ------- .../common/editor/binding-selector/index.ts | 35 +++ .../src/binding-selector.component.tsx | 118 +++++++++ .../src/binding-selector.props.ts | 81 ++++++ .../binding-selector-container.component.tsx | 124 +++++++++ .../src/composition/use-field-selection.ts | 235 ++++++++++++++++++ .../src/schema/binding-selector.schema.json | 10 + .../common/editor/binding-selector/style.ts | 6 + .../src/composition/use-type-resolver.ts | 2 +- .../components/dynamic-form/src/types.ts | 2 +- .../dynamic-view/src/components/maps.ts | 2 + .../field-selector-container.component.tsx | 64 ++--- .../src/field-selector.component.tsx | 45 ++-- .../src/field-selector.props.ts | 46 ++-- .../src/schema/schema-mapper.ts | 5 - .../src/schema/schema-resolver.ts | 5 - packages/ui-vue/components/index.ts | 5 +- .../lookup.property-config.json | 109 -------- .../property-config/lookup.property-config.ts | 4 +- .../src/schema/mapping-editor.schema.json | 2 +- .../composition/entity/input-base-property.ts | 20 +- .../radio-group.property-config.json | 85 ------- .../switch.property-config.json | 105 -------- .../tabs/src/designer/tabs-use-design.ts | 2 + .../textarea.property-config.json | 80 ------ .../time-picker.property-config.json | 106 -------- .../tree-grid/src/tree-grid.component.tsx | 5 +- 33 files changed, 720 insertions(+), 894 deletions(-) delete mode 100644 packages/ui-vue/components/avatar/src/property-config/avatar.property-config.json delete mode 100644 packages/ui-vue/components/checkbox/src/property-config/checkbox.property-config.json delete mode 100644 packages/ui-vue/components/combo-list/src/property-config/combo-list.property-config.json create mode 100644 packages/ui-vue/components/common/editor/binding-selector/index.ts create mode 100644 packages/ui-vue/components/common/editor/binding-selector/src/binding-selector.component.tsx create mode 100644 packages/ui-vue/components/common/editor/binding-selector/src/binding-selector.props.ts create mode 100644 packages/ui-vue/components/common/editor/binding-selector/src/components/binding-selector-container.component.tsx create mode 100644 packages/ui-vue/components/common/editor/binding-selector/src/composition/use-field-selection.ts create mode 100644 packages/ui-vue/components/common/editor/binding-selector/src/schema/binding-selector.schema.json create mode 100644 packages/ui-vue/components/common/editor/binding-selector/style.ts delete mode 100644 packages/ui-vue/components/field-selector/src/schema/schema-mapper.ts delete mode 100644 packages/ui-vue/components/field-selector/src/schema/schema-resolver.ts delete mode 100644 packages/ui-vue/components/lookup/src/property-config/lookup.property-config.json delete mode 100644 packages/ui-vue/components/radio-group/src/property-config/radio-group.property-config.json delete mode 100644 packages/ui-vue/components/switch/src/property-config/switch.property-config.json delete mode 100644 packages/ui-vue/components/textarea/src/property-config/textarea.property-config.json delete mode 100644 packages/ui-vue/components/time-picker/src/property-config/time-picker.property-config.json diff --git a/packages/designer/src/components/composition/design-viewmodel.service.ts b/packages/designer/src/components/composition/design-viewmodel.service.ts index 4d69420c11b..4322fbf5386 100644 --- a/packages/designer/src/components/composition/design-viewmodel.service.ts +++ b/packages/designer/src/components/composition/design-viewmodel.service.ts @@ -1,10 +1,12 @@ import { merge } from "lodash-es"; -import { EntityFieldTypeDisplayNamei18n, FormBindingType, FormSchemaEntityField, UseDesignViewModel, UseFormSchema, UseSchemaService } from "../types"; +import { FormBindingType, FormSchemaEntityField, UseDesignViewModel, UseFormSchema, UseSchemaService } from "../types"; import { DesignViewModel, DesignViewModelField } from "../types/design-viewmodel"; +import { cloneDeep } from 'lodash-es'; + /** * 操作表单设计时ViewModel的工具类 */ -export function useDesignViewModel(useFormSchema: UseFormSchema, schemaService:UseSchemaService):UseDesignViewModel { +export function useDesignViewModel(useFormSchema: UseFormSchema, schemaService: UseSchemaService): UseDesignViewModel { let dgViewModels = [] as any; const ROOT_VIEW_MODEL_ID = 'root-viewmodel'; @@ -115,7 +117,7 @@ export function useDesignViewModel(useFormSchema: UseFormSchema, schemaService:U * @param bindingPath * @returns */ - function mergeFields2Tree(schemaFields: FormSchemaEntityField[], dgVMFields: DesignViewModelField[], bindingPath = ''){ + function mergeFields2Tree(schemaFields: FormSchemaEntityField[], dgVMFields: DesignViewModelField[], bindingPath = '') { const treeData = [] as any; schemaFields.forEach(element => { // 补充bindingPath属性 @@ -130,26 +132,10 @@ export function useDesignViewModel(useFormSchema: UseFormSchema, schemaService:U } let dgField = dgVMFields.find(d => d.id === element.id); - // if (!dgField) { - // const displayTypeNamei18n = element.type.displayName; - // dgField = merge({ displayTypeNamei18n }, element); - // } - - const displayTypeNamei18n = (element.multiLanguage ? EntityFieldTypeDisplayNamei18n.MultiLanguage : - EntityFieldTypeDisplayNamei18n[element.type.name]) || element.type.displayName; - - if (!dgField) { - dgField = merge({ fieldType: element.$type==='SimpleField'&& element.type ? displayTypeNamei18n :'' }, element); - } else { - dgField = merge({ fieldType: element.$type==='SimpleField'&& element.type ? displayTypeNamei18n :'' }, dgField); - } - - + const clonedField = dgField ? cloneDeep(dgField) : cloneDeep(element); treeData.push({ - data: dgField, - children, - expanded: true, - selectable: children.length > 0 ? false : true + data: Object.assign({ rawData: clonedField, fieldType: clonedField.type.displayName }, clonedField), + children }); }); return treeData; @@ -219,5 +205,5 @@ export function useDesignViewModel(useFormSchema: UseFormSchema, schemaService:U } } } - return {assembleDesignViewModel,getAllFields2TreeByVMId,getDgViewModel} + return { assembleDesignViewModel, getAllFields2TreeByVMId, getDgViewModel } } diff --git a/packages/designer/src/components/composition/use-form-schema.ts b/packages/designer/src/components/composition/use-form-schema.ts index e3c1be08a19..9b49e4dc01e 100644 --- a/packages/designer/src/components/composition/use-form-schema.ts +++ b/packages/designer/src/components/composition/use-form-schema.ts @@ -37,7 +37,7 @@ export function useFormSchema(): UseFormSchema { } /** 获取表单元数据 */ - function getFormSchema() { + function getFormSchema(): FormMetadaDataDom { return formSchema; } /** @@ -318,10 +318,7 @@ export function useFormSchema(): UseFormSchema { return targetComponets; } - function getViewModelFieldById(viewModelId: string, fieldId: string) { - const vm = getViewModelById(viewModelId); - return vm?.fields.find(f => f.id === fieldId); - } + function getViewModelByFieldId(fieldId: string): FormViewModel { let viewModel; for (const vm of formSchema.module.viewmodels) { @@ -602,7 +599,7 @@ export function useFormSchema(): UseFormSchema { displayTypeName = vt.text; } - children.push({ data: { ...variable, displayTypeName }, children: [], selectable: true, viewModelId }); + children.push({ data: { ...variable, displayTypeName, viewModelId }, children: [] }); } }); @@ -1090,8 +1087,8 @@ export function useFormSchema(): UseFormSchema { * 根据控件所在组件的统一布局配置获取控件样式 * @param componentId 组件Id */ - function getControlClassByFormUnifiedLayout(controlClass: string, componentId: string,formNode:any):string { - if(!formNode){ + function getControlClassByFormUnifiedLayout(controlClass: string, componentId: string, formNode: any): string { + if (!formNode) { const componentNode = getComponentById(componentId); if (!componentNode || !componentNode.componentType.startsWith('form')) { return controlClass; @@ -1303,6 +1300,8 @@ export function useFormSchema(): UseFormSchema { modifyViewModelFieldById, getControlClassByFormUnifiedLayout, setFormTemplateRule, - getFormTemplateRule + getFormTemplateRule, + getRemoteVariables, + getLocaleVariablesByViewModelId }; } diff --git a/packages/designer/src/components/types/design-viewmodel.ts b/packages/designer/src/components/types/design-viewmodel.ts index 1cb442e4ba4..d024b3d5216 100644 --- a/packages/designer/src/components/types/design-viewmodel.ts +++ b/packages/designer/src/components/types/design-viewmodel.ts @@ -130,11 +130,11 @@ export class DesignViewModel { } } export interface DesignViewModelField extends FormSchemaEntityField { - valueChanging: string; - valueChanged: string; + valueChanging?: string; + valueChanged?: string; - groupId: string; - groupName: string; + groupId?: string; + groupName?: string; /** 标识字段在schema中是否已移除 */ isSchemaRemoved?: boolean; diff --git a/packages/designer/src/components/types/metadata.ts b/packages/designer/src/components/types/metadata.ts index fe1826f2061..849c7ef530d 100644 --- a/packages/designer/src/components/types/metadata.ts +++ b/packages/designer/src/components/types/metadata.ts @@ -203,9 +203,11 @@ export interface UseFormSchema { deleteViewModelFieldById: (viewModelId: string, fieldId: string) => void; clearViewModelFieldSchema: (viewModelId, fieldId) => void; modifyViewModelFieldById: (viewModelId, fieldId, changeObject, isMerge: boolean) => void; - getControlClassByFormUnifiedLayout:(controlClass: string, componentId: string,formNode:any) =>string; + getControlClassByFormUnifiedLayout: (controlClass: string, componentId: string, formNode: any) => string; setFormTemplateRule: (rules: any) => void; getFormTemplateRule: () => any; + getLocaleVariablesByViewModelId: (viewModelId: string) => any; + getRemoteVariables: () => any; } export interface UseSchemaService { diff --git a/packages/ui-vue/components/avatar/src/property-config/avatar.property-config.json b/packages/ui-vue/components/avatar/src/property-config/avatar.property-config.json deleted file mode 100644 index 6a95c822d69..00000000000 --- a/packages/ui-vue/components/avatar/src/property-config/avatar.property-config.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "title": "avatar", - "description": "A Farris Component", - "type": "object", - "categories": { - "basic": { - "description": "Basic Infomation", - "title": "基本信息001", - "properties": { - "id": { - "description": "组件标识", - "title": "标识", - "type": "string", - "readonly": true - }, - "type": { - "description": "类型", - "title": "类型", - "type": "string", - "readonly": true, - "$converter": "/converter/type.converter" - }, - "label":{ - "description": "标签", - "title": "标签", - "type": "string" - }, - "binding":{ - "description":"绑定的表单字段", - "title": "绑定", - "editor":{ - "type":"field-selector" - } - } - } - }, - "appearance": { - "description": "", - "title": "外观", - "properties": { - "class": { - "description": "组件的CSS样式", - "title": "class样式" - }, - "style": { - "description": "组件的内容样式", - "title": "style样式" - } - } - }, - "editor": { - "description": "组件信息", - "title": "组件信息", - "type":"avatar", - "$converter":"/converter/property-editor.converter", - "properties": { - "readonly": { - "description": "", - "title": "只读", - "type": "boolean" - }, - "avatarWidth": { - "description": "", - "title": "头像宽度", - "type": "number" - }, - "avatarHeight": { - "description": "", - "title": "头像高度", - "type": "number" - }, - "cover": { - "description": "", - "title": "封面", - "type": "string" - } - } - } - } -} diff --git a/packages/ui-vue/components/checkbox/src/property-config/checkbox.property-config.json b/packages/ui-vue/components/checkbox/src/property-config/checkbox.property-config.json deleted file mode 100644 index 7e64365ac13..00000000000 --- a/packages/ui-vue/components/checkbox/src/property-config/checkbox.property-config.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "title": "check-box", - "description": "A Farris Component", - "type": "object", - "categories": { - "basic": { - "description": "Basic Infomation", - "title": "基本信息", - "properties": { - "id": { - "description": "组件标识", - "title": "标识", - "type": "string", - "readonly": true - }, - "type": { - "description": "类型", - "title": "类型", - "type": "string", - "readonly": true, - "$converter": "/converter/type.converter" - }, - "label":{ - "description": "标签", - "title": "标签", - "type": "string" - }, - "binding":{ - "description":"绑定的表单字段", - "title": "绑定", - "editor":{ - "type":"field-selector" - } - } - } - }, - "appearance": { - "description": "", - "title": "外观", - "properties": { - "class": { - "description": "组件的CSS样式", - "title": "class样式" - }, - "style": { - "description": "组件的内容样式", - "title": "style样式" - } - } - }, - "editor": { - "description": "组件信息", - "title": "组件信息", - "type":"check-box", - "$converter":"/converter/property-editor.converter", - "properties": { - "readonly": { - "description": "", - "title": "只读", - "type": "boolean" - }, - "disabled": { - "description": "", - "title": "禁用", - "type": "boolean" - }, - "text": { - "description": "", - "title": "显示文本", - "type": "string" - }, - "value": { - "description": "", - "title": "选中值", - "type": "string" - } - } - } - } -} diff --git a/packages/ui-vue/components/combo-list/src/property-config/combo-list.property-config.json b/packages/ui-vue/components/combo-list/src/property-config/combo-list.property-config.json deleted file mode 100644 index 53839c0395a..00000000000 --- a/packages/ui-vue/components/combo-list/src/property-config/combo-list.property-config.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "title": "combo-list", - "description": "A Farris Component", - "type": "object", - "categories": { - "basic": { - "description": "Basic Infomation", - "title": "基本信息", - "properties": { - "id": { - "description": "组件标识", - "title": "标识", - "type": "string", - "readonly": true - }, - "type": { - "description": "类型", - "title": "类型", - "type": "string", - "readonly": true, - "$converter": "/converter/type.converter" - }, - "label":{ - "description": "标签", - "title": "标签", - "type": "string" - }, - "binding":{ - "description":"绑定的表单字段", - "title": "绑定", - "editor":{ - "type":"field-selector" - } - } - } - }, - "appearance": { - "description": "", - "title": "外观", - "properties": { - "class": { - "description": "组件的CSS样式", - "title": "class样式" - }, - "style": { - "description": "组件的内容样式", - "title": "style样式" - } - } - }, - "behavior": { - "description": "Basic Infomation", - "title": "组件信息", - "type":"combo-list", - "$converter":"/converter/property-editor.converter", - "properties":{ - "editable": { - "description": "", - "title": "允许编辑", - "type": "boolean" - }, - "readonly": { - "description": "", - "title": "只读", - "type": "boolean" - }, - "disabled": { - "description": "", - "title": "禁用", - "type": "boolean" - }, - "textField": { - "description": "", - "title": "数据源显示字段", - "type": "string" - }, - "idField": { - "description": "", - "title": "数据源值字段", - "type": "string" - }, - "placeholder": { - "description": "", - "title": "提示文本", - "type": "string" - } - } - } - } -} diff --git a/packages/ui-vue/components/common/editor/binding-selector/index.ts b/packages/ui-vue/components/common/editor/binding-selector/index.ts new file mode 100644 index 00000000000..826f5b1f342 --- /dev/null +++ b/packages/ui-vue/components/common/editor/binding-selector/index.ts @@ -0,0 +1,35 @@ +/* eslint-disable max-len */ +/** + * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import type { App } from 'vue'; +import BindingSelector from './src/binding-selector.component'; +import FBindingSelectorContainer from './src/components/binding-selector-container.component'; +import { propsResolver } from './src/binding-selector.props'; + +export * from './src/binding-selector.props'; + +export { BindingSelector }; + +export default { + install(app: App): void { + app.component(BindingSelector.name as string, BindingSelector); + app.component(FBindingSelectorContainer.name as string, FBindingSelectorContainer); + }, + register(componentMap: Record, propsResolverMap: Record, configResolverMap: Record, resolverMap: Record): void { + componentMap['binding-selector'] = BindingSelector; + propsResolverMap['binding-selector'] = propsResolver; + }, +}; diff --git a/packages/ui-vue/components/common/editor/binding-selector/src/binding-selector.component.tsx b/packages/ui-vue/components/common/editor/binding-selector/src/binding-selector.component.tsx new file mode 100644 index 00000000000..2bd2f7bf97a --- /dev/null +++ b/packages/ui-vue/components/common/editor/binding-selector/src/binding-selector.component.tsx @@ -0,0 +1,118 @@ +import { ref, defineComponent } from "vue"; +import FButtonEdit from '../../../../button-edit/src/button-edit.component'; +import BindingSelectorComponent from './components/binding-selector-container.component'; +import { BindingSelectorProps, bindingSelectorProps } from "./binding-selector.props"; +import { FNotifyService } from "../../../../notify"; +import { useFieldSelection } from "./composition/use-field-selection"; + + +export default defineComponent({ + name: 'FBindingSelector', + props: bindingSelectorProps, + emits: ['selected', 'bindingTypeChanged'], + setup(props: BindingSelectorProps, context) { + const buttonIcon = ''; + /** 绑定类型数据源 */ + const bindingData = ref(props.bindingData); + /** 树表绑定数据源 */ + const dataSource = ref(props.data); + const bindingSelectorRef = ref(); + /** 绑定类型 */ + const bindingType = ref(props.modelValue?.type || 'Form'); + /** 文本框展示内容 */ + const displayText = ref(props.modelValue?.path); + + const { updateViewModel, updateComponentSchema } = useFieldSelection(props); + + function onFieldSelected(selectedFields: Array>) { + bindingData.value = selectedFields; + } + + function onBindingTypeChanged(newBindingType: string) { + bindingType.value = newBindingType; + } + + function setDisplayText(setDisplayText: any) { + displayText.value = setDisplayText.path; + } + + function renderBindingSelector() { + return ; + } + + function checkBindingData(): boolean { + if (!bindingData.value || !bindingData.value.length) { + const notifyService: any = new FNotifyService(); + notifyService.globalConfig = { position: 'top-center' }; + notifyService.warning({ message: '请先选择数据' }); + return false; + } + return true; + } + + const modalOptions = { + title: props.title, + fitContent: false, + height: props.modalHeight, + width: props.modalWidth, + buttons: [ + { + name: 'cancel', + text: '取消', + class: 'btn btn-secondary', + handle: ($event: MouseEvent) => { + bindingData.value = []; + return true; + } + }, + { + name: 'accept', + text: '确定', + class: 'btn btn-primary', + handle: ($event: MouseEvent) => { + if (!checkBindingData()) { + return false; + } + updateViewModel(bindingData.value[0], bindingType.value); + const newBindingValue = updateComponentSchema(bindingData.value[0], bindingType.value) + setDisplayText(newBindingValue); + + // 触发变更 + if (props.onFieldSelected && typeof props.onFieldSelected == 'function') { + props.onFieldSelected(newBindingValue); + } + return true; + } + } + ], + reiszeable: true, + draggable: true + }; + + return () => { + return ( +
+ {renderBindingSelector()} +
+
); + }; + } +}); diff --git a/packages/ui-vue/components/common/editor/binding-selector/src/binding-selector.props.ts b/packages/ui-vue/components/common/editor/binding-selector/src/binding-selector.props.ts new file mode 100644 index 00000000000..d321c8c3a72 --- /dev/null +++ b/packages/ui-vue/components/common/editor/binding-selector/src/binding-selector.props.ts @@ -0,0 +1,81 @@ +import { DesignerHostService } from "../../../../designer-canvas/src/composition/types"; +import { ExtractPropTypes, PropType } from "vue"; +import { DataColumn } from '../../../../../components/data-view'; +import { createPropsResolver } from "../../../../dynamic-resolver"; +import bindingSelectorSchema from './schema/binding-selector.schema.json'; + +export const fieldColumns = [ + { field: 'name', title: '名称' }, + { field: 'bindingField', title: '绑定字段' }, + { field: 'fieldType', title: '字段类型' } +]; +export const variableColumns = [ + { field: 'name', title: '名称' }, + { field: 'code', title: '编号' }, + { field: 'displayTypeName', title: '变量类型' } +] +export const bindingTypes = [ + { value: 'Form', text: '绑定字段' }, + { value: 'LocaleVariable', text: '绑定组件变量' }, + { value: 'RemoteVariable', text: '绑定表单变量' } +] +export interface BindingSelectorService { + getData(params: any): Promise; +} + +export interface BindingTypeOption { + enable: boolean; + data: Array<{ [key: string]: string }>; + value: string; + textField: string; + valueField: string; +} +export interface BindingSelectorEditorParams { + /** 已选控件schema */ + componentSchema: any; + /** 已选字段是否需要同步至表单viemodel.fields节点 */ + needSyncToViewModel: { type: Boolean, default: false }, + /** 当前控件所属的视图模型id */ + viewModelId: { type: String, default: '' }, + /** 设计器服务类 */ + designerHostService: { type: DesignerHostService }, + /** 表单中已使用的字段是否需要设置为禁用 */ + disableOccupiedFields: { type: Boolean, default: false }, +} +export const bindingSelectorProps = { + disabled: { type: Boolean, default: false }, + readonly: { type: Boolean, default: false }, + modelValue: { type: Object, default: null }, + bindingType: { + type: Object as PropType, default: { + enable: true, + value: 'Form', + textField: 'text', + valueField: 'value' + } + }, + + data: { type: Array>, default: [] }, + idField: { type: String, default: 'id' }, + title: { type: String, default: '字段选择器' }, + modalWidth: { type: Number, default: 800 }, + modalHeight: { type: Number, default: 600 }, + multiSelect: { type: Boolean, default: false }, + /** + * 可选,分隔符 + * 默认`,` + */ + separator: { type: String, default: ',' }, + bindingData: { type: Array>, default: [] }, + textField: { type: String, default: 'code' }, + beforeOpenDialog: { type: Function, default: null }, + editorParams: { type: Object as PropType, default: null }, + onFieldSelected: { type: Function, default: null }, + repositoryToken: { type: Symbol, default: null }, + + +} as Record; + +export type BindingSelectorProps = ExtractPropTypes; + +export const propsResolver = createPropsResolver(bindingSelectorProps, bindingSelectorSchema); diff --git a/packages/ui-vue/components/common/editor/binding-selector/src/components/binding-selector-container.component.tsx b/packages/ui-vue/components/common/editor/binding-selector/src/components/binding-selector-container.component.tsx new file mode 100644 index 00000000000..299120740c0 --- /dev/null +++ b/packages/ui-vue/components/common/editor/binding-selector/src/components/binding-selector-container.component.tsx @@ -0,0 +1,124 @@ +/* eslint-disable @typescript-eslint/indent */ +import { computed, defineComponent, ref, onMounted, onBeforeMount } from "vue"; +import { BindingSelectorProps, bindingSelectorProps, bindingTypes, fieldColumns, variableColumns } from "../binding-selector.props"; +import { FTreeGrid } from '../../../../../tree-grid'; +import FRadioGroup from '../../../../../radio-group/src/radio-group.component'; +import { RowOptions, VisualData } from "../../../../../data-view"; +import { FormSchemaEntityField$Type } from "../../../../../common/entity/entity-schema"; +import { useFieldSelection } from "../composition/use-field-selection"; + +export default defineComponent({ + name: 'FBindingSelectorContainer', + props: bindingSelectorProps, + emits: ['selected', 'bindingTypeChange'], + setup(props: BindingSelectorProps, context) { + + const dataSource = ref(props.data); + const bindingType = ref(props.modelValue?.type || 'Form'); + const bindingData = ref(props.bindingData); + const treegridRef = ref(); + const occupiedFieldset = ref(); + const availableFieldTypes = ref(); + const { getTreeDataSource, initTreeData, resolveOccupiedFields, resolveFieldTypesByEditorType } = useFieldSelection(props); + const columns = ref([]); + onBeforeMount(() => { + initTreeData(); + dataSource.value = getTreeDataSource(bindingType.value); + + if (props.editorParams?.disableOccupiedFields) { + occupiedFieldset.value = resolveOccupiedFields(props.editorParams?.componentSchema?.binding) + } + availableFieldTypes.value = resolveFieldTypesByEditorType(props.editorParams?.componentSchema?.editor?.type); + columns.value = bindingType.value === 'Form' ? fieldColumns : variableColumns; + }); + + onMounted(() => { + const bindingFieldId = props.editorParams?.componentSchema?.binding?.field; + if (bindingFieldId) { + treegridRef.value.selectItemById(bindingFieldId); + } + }); + + const treegridContainerStyle = { + 'f-utils-fill': true, + 'm-2': props.bindingType?.enable, + 'mx-2': !props.bindingType?.enable, + 'border': true + }; + + function onBindingTypeChanged(newBindingType: string) { + columns.value = newBindingType === 'Form' ? fieldColumns : variableColumns; + treegridRef.value.updateColumns(columns.value); + + dataSource.value = getTreeDataSource(newBindingType); + treegridRef.value.updateDataSource(dataSource.value); + + treegridRef.value.clearSelection(); + bindingData.value = []; + context.emit('selected', []); + context.emit('bindingTypeChange', newBindingType); + } + + function onSelectionChange(selectedItems: Array>) { + bindingData.value = selectedItems; + context.emit('selected', selectedItems); + } + + function renderBindingType() { + return
+ +
; + } + + // 配置行禁用 + const rowOption: Partial = { + customRowStatus: (visualData: VisualData) => { + // 复杂类型字段,不可选 + if (visualData.raw.$type && visualData.raw.$type !== FormSchemaEntityField$Type.SimpleField) { + visualData.disabled = true; + return visualData; + } + // 表单中已占用的字段,不可选 + if (occupiedFieldset.value && occupiedFieldset.value.has(visualData.raw.id)) { + visualData.disabled = true; + return visualData; + } + // 与当前控件类型匹配的字段,不可选 + const fieldTypeNode = bindingType.value === 'Form' ? visualData.raw.type?.name : visualData.raw.type; + if (fieldTypeNode && availableFieldTypes.value && !availableFieldTypes.value.includes(fieldTypeNode)) { + visualData.disabled = true; + return visualData; + } + visualData.disabled = false; + return visualData; + } + }; + + + function renderTreeGrids() { + return ; + } + + return () => { + return (
+ {props.bindingType.enable && renderBindingType()} +
{renderTreeGrids()}
+
); + }; + } +}); diff --git a/packages/ui-vue/components/common/editor/binding-selector/src/composition/use-field-selection.ts b/packages/ui-vue/components/common/editor/binding-selector/src/composition/use-field-selection.ts new file mode 100644 index 00000000000..f9e6c5f8251 --- /dev/null +++ b/packages/ui-vue/components/common/editor/binding-selector/src/composition/use-field-selection.ts @@ -0,0 +1,235 @@ +import { SchemaDOMMapping } from "../../../../../property-panel/src/composition/entity/schema-dom-mapping"; +import { merge } from "lodash-es"; +import { BindingSelectorProps } from "../binding-selector.props"; + +export function useFieldSelection(props: BindingSelectorProps) { + + const designViewModelUtils = props.editorParams.designerHostService.designViewModelUtils; + const formSchemaUtils = props.editorParams.designerHostService.formSchemaUtils; + const viewModelId = props.editorParams.viewModelId; + let fieldTreeData = []; + let localeVariableTreeData = []; + let formVariableTreeData = []; + + /** + * 获取树表格数据 + */ + function initTreeData() { + loadFieldTreeData(); + loadLocaleVariableTreeData(); + loadFormVariableTreeData(); + } + + function getTreeDataSource(bindingType: string) { + switch (bindingType) { + case 'LocaleVariable': { + return localeVariableTreeData; + } + case 'RemoteVariable': { + return formVariableTreeData; + } + default: { + return fieldTreeData; + } + } + + } + function loadFieldTreeData() { + fieldTreeData = designViewModelUtils.getAllFields2TreeByVMId(viewModelId); + } + function loadLocaleVariableTreeData() { + + const viewModel = formSchemaUtils.getViewModelById(viewModelId); + if (viewModel.parent) { + const rootLocalVars = formSchemaUtils.getLocaleVariablesByViewModelId(viewModel.parent); + if (rootLocalVars && rootLocalVars.length) { + rootLocalVars[0].data.name = '根组件'; + localeVariableTreeData = localeVariableTreeData.concat(rootLocalVars); + } + } + const localVars = formSchemaUtils.getLocaleVariablesByViewModelId(viewModelId); + localeVariableTreeData = localeVariableTreeData.concat(localVars); + + } + function loadFormVariableTreeData() { + formVariableTreeData = formSchemaUtils.getRemoteVariables(); + } + /** + * 同步视图模型字段 + */ + function updataViewModelField(bindingData: Record) { + const currentSelectedField = merge({}, bindingData.rawData, { groupId: null, groupName: null }); + const originalBinding = props.editorParams.componentSchema?.binding; + const dgViewModel = designViewModelUtils.getDgViewModel(viewModelId); + + // 删除原始绑定信息 + if (originalBinding?.field) { + const originalBindingField = dgViewModel.fields.find(f => f.id === originalBinding.field); + dgViewModel.removeField([originalBinding.field]); + if (originalBindingField) { + const { groupId, groupName, editor } = originalBindingField; + merge(currentSelectedField, { editor, groupId, groupName }); + } + } + // 向视图模型中添加新字段 + dgViewModel.addField(currentSelectedField); + if (props.editorParams.componentSchema?.editor?.type) { + dgViewModel.changeField(currentSelectedField.id, { editor: props.editorParams.componentSchema.editor.type }); + } + } + function updataViewModelVariable(bindingData: Record) { + const originalBinding = props.editorParams.componentSchema?.binding; + const dgViewModel = designViewModelUtils.getDgViewModel(viewModelId); + + const currentSelectedVar = { + type: 'Variable', + id: bindingData.id, + fieldName: bindingData.code, + groupId: '', + groupName: '' + }; + // 删除原始绑定信息 + if (originalBinding?.field) { + const viewModel = formSchemaUtils.getViewModelById(viewModelId); + const originalBindingField = viewModel?.fields.find(f => f.id === originalBinding?.field); + if (originalBindingField) { + currentSelectedVar.groupName = originalBindingField.groupName; + currentSelectedVar.groupId = originalBindingField.groupId; + } + dgViewModel.removeField([originalBinding?.field]); + } + // 向视图模型中添加新字段 + formSchemaUtils.addViewModelField(viewModelId, currentSelectedVar); + } + /** + * 同步视图模型 + */ + function updateViewModel(bindingData: Record, bindingType: string) { + if (!props.editorParams.needSyncToViewModel || !props.editorParams.viewModelId || !props.editorParams.designerHostService) { + return; + } + + const originalBinding = props.editorParams.componentSchema.binding; + if (originalBinding && originalBinding.field === bindingData.id) { + return; + } + if (bindingType === 'Form') { + updataViewModelField(bindingData); + } else { + updataViewModelVariable(bindingData); + } + } + + /** + * 更新控件schema数据 + */ + function updateComponentSchema(bindingData: Record, bindingType: string) { + if (!props.editorParams.componentSchema) { + return; + } + + if (!props.editorParams.componentSchema.binding) { + props.editorParams.componentSchema.binding = {}; + } + switch (bindingType) { + case 'Form': { + props.editorParams.componentSchema.binding.path = bindingData.bindingField; + props.editorParams.componentSchema.binding.field = bindingData.id; + props.editorParams.componentSchema.binding.fullPath = bindingData.path; + break; + } + case 'LocaleVariable': { + props.editorParams.componentSchema.binding.path = bindingData.viewModelId === viewModelId ? bindingData.code : 'root-component.' + bindingData.code; + props.editorParams.componentSchema.binding.field = bindingData.id; + props.editorParams.componentSchema.binding.fullPath = bindingData.code; + break; + } + case 'RemoteVariable': { + props.editorParams.componentSchema.binding.path = 'root-component.' + bindingData.code; + props.editorParams.componentSchema.binding.field = bindingData.id; + props.editorParams.componentSchema.binding.fullPath = bindingData.code; + break; + } + } + + props.editorParams.componentSchema.binding.type = bindingType; + props.editorParams.componentSchema.path = bindingData.bindingPath; + return props.editorParams.componentSchema.binding; + } + /** + * 收集绑定同一个实体的同类型组件中已使用的字段(form类、dataGrid类...) + * @param currentBinding + */ + function resolveOccupiedFields(currentBinding: any) { + const currentBindingId = currentBinding?.field; + const occupiedFieldSet = new Set(); + const formSchema = formSchemaUtils.getFormSchema().module; + const viewModelNode = formSchemaUtils.getViewModelById(viewModelId); + const componentNode = formSchema.components.find(component => component.viewModel === viewModelId); + + + // 当前组件的类型 + let targetComponentType = componentNode.componentType; + + // 根组件和table组件内的输入控件与form内不能重复 + if (targetComponentType === 'frame' || targetComponentType === 'table') { + targetComponentType = 'form'; + } + formSchema.viewmodels.forEach(viewModel => { + if (!viewModel.fields || viewModel.fields.length === 0) { + return; + } + const componentNode = formSchema.components.find(component => component.viewModel === viewModel.id);; + let componentType = componentNode.componentType; + if (componentType === 'frame' || componentType === 'table') { + componentType = 'form'; + } + // 同类型的组件并且绑定同一个实体(form类、dataGrid类...) + if (componentType !== targetComponentType || viewModel.bindTo !== viewModelNode.bindTo) { + return; + } + + viewModel.fields.forEach(field => { + if (field.id !== currentBindingId) { + occupiedFieldSet.add(field.id); + } + }); + }); + return occupiedFieldSet; + } + /*** + * 获取当前控件类型下可选的字段类型 + */ + function resolveFieldTypesByEditorType(editorType: string): string[] { + if (!editorType) { + return []; + } + + const controlFieldMapping = {}; + const fieldControlTypeMapping = SchemaDOMMapping.fieldControlTypeMapping; + + for (const fieldType in fieldControlTypeMapping) { + const controlTypes = fieldControlTypeMapping[fieldType]; + if (!controlTypes || !controlTypes.length) { + continue; + } + controlTypes.forEach(item => { + controlFieldMapping[item.key] = controlFieldMapping[item.key] || []; + controlFieldMapping[item.key].push(fieldType); + }); + } + + // 追加多语控件 + // controlFieldMapping.LanguageTextBox = ['multiLanguage']; + + return controlFieldMapping[editorType]; + } + return { + initTreeData, + getTreeDataSource, + updateViewModel, + updateComponentSchema, + resolveOccupiedFields, + resolveFieldTypesByEditorType + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/common/editor/binding-selector/src/schema/binding-selector.schema.json b/packages/ui-vue/components/common/editor/binding-selector/src/schema/binding-selector.schema.json new file mode 100644 index 00000000000..17c17ba75b6 --- /dev/null +++ b/packages/ui-vue/components/common/editor/binding-selector/src/schema/binding-selector.schema.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://farris-design.gitee.io/binding-selector.schema.json", + "title": "binding-selector", + "description": "字段绑定选择器", + "type": "object", + "properties": { + + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/common/editor/binding-selector/style.ts b/packages/ui-vue/components/common/editor/binding-selector/style.ts new file mode 100644 index 00000000000..8cfc46cd6eb --- /dev/null +++ b/packages/ui-vue/components/common/editor/binding-selector/style.ts @@ -0,0 +1,6 @@ +import "@farris/ui-vue/components/dependent-base/style"; +import "@farris/ui-vue/components/dependent-icon/style"; +import "@farris/ui-vue/components/tree-grid/style"; +import "@farris/ui-vue/components/button-edit/style"; +import "@farris/ui-vue/components/radio/style"; +import "@farris/ui-vue/components/modal/style"; \ No newline at end of file diff --git a/packages/ui-vue/components/dynamic-form/src/composition/use-type-resolver.ts b/packages/ui-vue/components/dynamic-form/src/composition/use-type-resolver.ts index eacb60efe22..6883a3d0022 100644 --- a/packages/ui-vue/components/dynamic-form/src/composition/use-type-resolver.ts +++ b/packages/ui-vue/components/dynamic-form/src/composition/use-type-resolver.ts @@ -71,7 +71,7 @@ export function useTypeResolver(): UseTypeResolver { return 'onChange'; case 'response-form-layout-setting': return 'onChange'; - case 'field-selector': + case 'field-selector': case 'binding-selector': return 'onFieldSelected'; case 'schema-selector': return 'onSchemaSelected'; diff --git a/packages/ui-vue/components/dynamic-form/src/types.ts b/packages/ui-vue/components/dynamic-form/src/types.ts index 44e08f49f9d..dda988eed45 100644 --- a/packages/ui-vue/components/dynamic-form/src/types.ts +++ b/packages/ui-vue/components/dynamic-form/src/types.ts @@ -3,7 +3,7 @@ export type EditorType = 'button-edit' | 'check-box' | 'check-group' | 'combo-list' | 'combo-lookup' | 'combo-tree' | 'date-picker' | 'date-range' | 'datetime-picker' | 'datetime-range' | 'events-editor' | 'month-picker' | 'month-range' | 'year-picker' | 'year-range' | 'input-group' | 'lookup' | 'number-range' | 'number-spinner' | 'radio-group' | 'text' | - 'response-layout-editor-setting' | 'switch' | 'grid-field-editor' | 'field-selector' | 'schema-selector' | 'mapping-editor' | 'textarea' | 'response-form-layout-setting'; + 'response-layout-editor-setting' | 'switch' | 'grid-field-editor' | 'field-selector' | 'schema-selector' | 'mapping-editor' | 'textarea' | 'response-form-layout-setting'|'binding-selector'; export interface EditorConfig { /** 编辑器类型 */ diff --git a/packages/ui-vue/components/dynamic-view/src/components/maps.ts b/packages/ui-vue/components/dynamic-view/src/components/maps.ts index 81017039c9b..0abfbe93158 100644 --- a/packages/ui-vue/components/dynamic-view/src/components/maps.ts +++ b/packages/ui-vue/components/dynamic-view/src/components/maps.ts @@ -18,6 +18,7 @@ import FEventsEditor from '@farris/ui-vue/components/events-editor'; // import FExternalContainer from '@farris/ui-vue/components/external-container'; import FFilterBar from '@farris/ui-vue/components/filter-bar'; import FFieldSelector from '@farris/ui-vue/components/field-selector'; +import FBindingSelector from '@farris/ui-vue/components/common/editor/binding-selector'; import FImageCropper from '@farris/ui-vue/components/image-cropper'; import FInputGroup from '@farris/ui-vue/components/input-group'; import FLayout from '@farris/ui-vue/components/layout'; @@ -131,6 +132,7 @@ function loadRegister() { FVideo.register(componentMap, componentPropsConverter, componentPropertyConfigConverter, resolverMap); FTextArea.register(componentMap, componentPropsConverter, componentPropertyConfigConverter, resolverMap); FTreeGrid.register(componentMap, componentPropsConverter, componentPropertyConfigConverter, resolverMap); + FBindingSelector.register(componentMap, componentPropsConverter, componentPropertyConfigConverter, resolverMap); } } diff --git a/packages/ui-vue/components/field-selector/src/components/field-selector-container.component.tsx b/packages/ui-vue/components/field-selector/src/components/field-selector-container.component.tsx index 18de23d3d34..eb6974cfdfb 100644 --- a/packages/ui-vue/components/field-selector/src/components/field-selector-container.component.tsx +++ b/packages/ui-vue/components/field-selector/src/components/field-selector-container.component.tsx @@ -1,10 +1,12 @@ /* eslint-disable @typescript-eslint/indent */ -import { SetupContext, computed, defineComponent, onUnmounted, ref, watch } from "vue"; +import { SetupContext, computed, defineComponent, onUnmounted, ref, watch, onMounted } from "vue"; import { FieldSelectorProps, fieldSelectorProps } from "../field-selector.props"; -import {FTreeGrid} from '../../../tree-grid'; +import { FTreeGrid } from '../../../tree-grid'; import FRadioGroup from '../../../radio-group/src/radio-group.component'; +import { RowOptions, VisualData } from "../../../data-view"; +import { FormSchemaEntityField$Type } from "../../../common/entity/entity-schema"; export default defineComponent({ name: 'FFieldSelectorContainer', @@ -13,68 +15,56 @@ export default defineComponent({ setup(props: FieldSelectorProps, context) { const dataSource = ref(props.data); - const bindingType = ref(props.bindingType); const bindingData = ref(props.bindingData); const treegridRef = ref(); - const bindingTypes = computed(() => { - return bindingType.value.data; - }); - - const selectedTreeNodeId = computed(() => { - return bindingData.value?.map((treeNode: Record) => treeNode[props.idField]); - }); - watch(() => props.data, (newData) => { dataSource.value = newData; treegridRef.value.updateDataSource(newData); + + if (props.modelValue) { + treegridRef.value.selectItemById(props.modelValue); + } }); const treegridContainerStyle = { 'f-utils-fill': true, - 'p-2': props.bindingType?.enable, - 'px-2': !props.bindingType?.enable + 'm-2': props.bindingType?.enable, + 'mx-2': !props.bindingType?.enable, + 'border': true }; - function onBindingTypeChanged(newBindingType: string) { - context.emit('bindingTypeChange', newBindingType); - } - function onSelectionChange(selectedItems: Array>) { bindingData.value = selectedItems; context.emit('selected', selectedItems); } - function renderBindingType() { - return
- -
; - } + + const rowOption: Partial = { + customRowStatus: (visualData: VisualData) => { + if (visualData.raw.$type !== FormSchemaEntityField$Type.SimpleField) { + visualData.disabled = true; + } + return visualData; + } + }; function renderTreeGrids() { - return ; + columns={props.columns} + rowNumber={{ enable: false }} + columnOption={{ fitColumns: true }} + onSelectionChange={onSelectionChange} + row-option={rowOption}>; } return () => { return (
- {bindingType.value.enable && renderBindingType()} -
{renderTreeGrids()}
+
{renderTreeGrids()}
); }; } diff --git a/packages/ui-vue/components/field-selector/src/field-selector.component.tsx b/packages/ui-vue/components/field-selector/src/field-selector.component.tsx index 313d70fd70d..ff8e1441149 100644 --- a/packages/ui-vue/components/field-selector/src/field-selector.component.tsx +++ b/packages/ui-vue/components/field-selector/src/field-selector.component.tsx @@ -1,27 +1,21 @@ import { SetupContext, ref, defineComponent, computed, watch, onMounted, inject } from "vue"; - import FButtonEdit from '../../button-edit/src/button-edit.component'; - import FieldSelectorComponent from './components/field-selector-container.component'; import { FieldSelectorProps, fieldSelectorProps, FieldSelectorService } from "./field-selector.props"; +import { FNotifyService } from "../../notify"; export default defineComponent({ name: 'FFieldSelector', props: fieldSelectorProps, - emits: ['selected', 'bindingTypeChanged'], - setup(props: FieldSelectorProps, context){ + emits: ['selected'], + setup(props: FieldSelectorProps, context) { const buttonIcon = ''; - const bindingData = ref(props.bindingData); - const treeColumns = ref(props.columns); - const dataSource = ref(props.data); - const fieldSelectorRef = ref(); const repository = inject(props.repositoryToken); - watch(() => props.data, (newData) => { dataSource.value = newData; }); @@ -32,21 +26,11 @@ export default defineComponent({ bindingData.value = selectedFields; } - function onBindingTypeChanged(newBindingType: string) { - context.emit('bindingTypeChanged', newBindingType); - } - function setDisplayText() { let displayValue = ''; if (bindingData.value && bindingData.value.length) { displayValue = bindingData.value.map((item) => item[props.textField]).join(props.separator); } - - if (props.bindingType?.enable) { - const bindingTypeName = props.bindingType.value; - displayValue = `${bindingTypeName}:${displayValue}`; - } - displayText.value = displayValue; } @@ -65,11 +49,21 @@ export default defineComponent({ function renderFieldSelector() { return ; + modelValue={props.modelValue} + idField={props.idField} + bindingData={bindingData.value}>; + } + + function checkBindingData(): boolean { + if (!bindingData.value || !bindingData.value.length) { + const notifyService: any = new FNotifyService(); + notifyService.globalConfig = { position: 'top-center' }; + notifyService.warning({ message: '请先选择数据' }); + return false; + } + return true; } const modalOptions = { @@ -91,8 +85,11 @@ export default defineComponent({ text: '确定', class: 'btn btn-primary', handle: ($event: MouseEvent) => { + if (!checkBindingData()) { + return false; + } setDisplayText(); - if (props.onFieldSelected && typeof props.onFieldSelected == 'function') { + if (props.onFieldSelected && typeof props.onFieldSelected == 'function') { props.onFieldSelected(bindingData.value); } return true; diff --git a/packages/ui-vue/components/field-selector/src/field-selector.props.ts b/packages/ui-vue/components/field-selector/src/field-selector.props.ts index 5ed9633a498..00c344035c4 100644 --- a/packages/ui-vue/components/field-selector/src/field-selector.props.ts +++ b/packages/ui-vue/components/field-selector/src/field-selector.props.ts @@ -1,10 +1,10 @@ -import { ExtractPropTypes, PropType } from "vue"; +import { ExtractPropTypes } from "vue"; import { DataColumn } from '../../../components/data-view'; import { createPropsResolver } from "../../dynamic-resolver"; import fieldSelectorSchema from './schema/field-selector.schema.json'; const defaultColumns = [ - { field: 'code', title: '绑定字段' }, { field: 'name', title: '名称' },{ field: 'fieldType', title: '字段类型' } + { field: 'code', title: '绑定字段' }, { field: 'name', title: '名称' }, { field: 'fieldType', title: '字段类型' } ]; export interface FieldSelectorService { @@ -13,48 +13,30 @@ export interface FieldSelectorService { export const FieldSelectorRepositoryToken = Symbol('Field_Selector Component Repository Service Token'); -export interface BindingTypeOption { - enable: boolean; - data: Array<{ [key: string]: string }>; - value: string; - textField: string; - valueField: string; -} - export const fieldSelectorProps = { - disabled: { type: Boolean, default: false}, - readonly: { type: Boolean, default: false}, + disabled: { type: Boolean, default: false }, + readonly: { type: Boolean, default: false }, modelValue: { type: [String, Array], default: null }, - bindingType: { type: Object as PropType , default: { - enable: true, - data: [ - { value: 'Form', text: '绑定字段'}, - { value: 'LocaleVariable', text: '绑定组件变量' }, - { value: 'RemoteVariable', text: '绑定表单变量' } - ], - value: 'Form', - textField: 'text', - valueField: 'value' - } }, - data: { type: Array>, default: [] }, idField: { type: String, default: 'id' }, - columns: { type: Array, default: defaultColumns}, + columns: { type: Array, default: defaultColumns }, title: { type: String, default: '字段选择器' }, - modalWidth: { type: Number, default: 600}, - modalHeight: { type: Number, default: 500}, - multiSelect: { type: Boolean, default: false}, + modalWidth: { type: Number, default: 800 }, + modalHeight: { type: Number, default: 600 }, + multiSelect: { type: Boolean, default: false }, /** * 可选,分隔符 * 默认`,` */ separator: { type: String, default: ',' }, - bindingData: { type: Array>, default:[] }, - textField: {type: String, default: 'code'}, + bindingData: { type: Array>, default: [] }, + textField: { type: String, default: 'code' }, beforeOpenDialog: { type: Function, default: null }, - editorParams: { type: Object, default: null }, + editorParams: { type: Object , default: null }, onFieldSelected: { type: Function, default: null }, - repositoryToken: { type: Symbol, default: null } + repositoryToken: { type: Symbol, default: null }, + + } as Record; export type FieldSelectorProps = ExtractPropTypes; diff --git a/packages/ui-vue/components/field-selector/src/schema/schema-mapper.ts b/packages/ui-vue/components/field-selector/src/schema/schema-mapper.ts deleted file mode 100644 index 97964aee23b..00000000000 --- a/packages/ui-vue/components/field-selector/src/schema/schema-mapper.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { MapperFunction, resolveAppearance } from '../../../dynamic-resolver'; - -export const schemaMapper = new Map([ - ['appearance', resolveAppearance] -]); diff --git a/packages/ui-vue/components/field-selector/src/schema/schema-resolver.ts b/packages/ui-vue/components/field-selector/src/schema/schema-resolver.ts deleted file mode 100644 index b02bdf93eec..00000000000 --- a/packages/ui-vue/components/field-selector/src/schema/schema-resolver.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { DynamicResolver } from "../../../dynamic-resolver"; - -export function schemaResolver(resolver: DynamicResolver, schema: Record, context: Record): Record { - return schema; -} diff --git a/packages/ui-vue/components/index.ts b/packages/ui-vue/components/index.ts index 90de61cbe65..736160c9849 100644 --- a/packages/ui-vue/components/index.ts +++ b/packages/ui-vue/components/index.ts @@ -93,6 +93,7 @@ import Textarea from './textarea'; import Drawer from './drawer'; // BorderEditor组件引入了ComboList组件 需要等待ComboList组件导入后才可以导入,因此放到最后导入 +import BindingSelector from './common/editor/binding-selector'; import '../public/assets/farris-all.css'; // 导出所有组件,可以按需加载 export * from './components'; @@ -179,6 +180,8 @@ export default { .use(BorderEditor) .use(ExpressionEditor) .use(Textarea) - .use(Drawer); + .use(Drawer) + .use(BindingSelector); + } }; diff --git a/packages/ui-vue/components/lookup/src/property-config/lookup.property-config.json b/packages/ui-vue/components/lookup/src/property-config/lookup.property-config.json deleted file mode 100644 index ec5469ab65d..00000000000 --- a/packages/ui-vue/components/lookup/src/property-config/lookup.property-config.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "title": "lookup", - "description": "A Farris Component", - "type": "object", - "categories": { - "basic": { - "description": "Basic Infomation", - "title": "基本信息", - "properties": { - "id": { - "description": "组件标识", - "title": "标识", - "type": "string", - "readonly": true - }, - "type": { - "description": "组件类型", - "title": "控件类型", - "type": "lookup", - "editor": { - "type": "waiting for modification", - "enum": [] - } - }, - "label": { - "title": "标签", - "type": "string" - } - } - }, - "behavior": { - "description": "Basic Infomation", - "title": "行为", - "properties":{ - "editable": { - "description": "", - "title": "允许编辑", - "type": "boolean" - }, - "readonly": { - "description": "", - "title": "只读", - "type": "string" - }, - "required": { - "description": "", - "title": "必填", - "type": "boolean" - }, - "visible": { - "description": "", - "title": "可见", - "type": "boolean" - }, - "placeholder": { - "description": "", - "title": "提示文本", - "type": "string" - }, - "tabindex": { - "description": "", - "title": "tab索引", - "type": "number" - }, - "bindField": { - "description": "帮助绑定字段", - "title": "绑定字段", - "type": "string", - "editor": { - "type": "field-selector" - } - }, - "textField": { - "description": "帮助显示文本字段", - "title": "文本字段", - "type": "string", - "editor": { - "type": "field-selector", - "bindingType": { "enable": false} - } - }, - "mappingFields":{ - "description": "帮助字段映射", - "title": "字段映射", - "type": "string", - "editor": { - "type": "mapping-editor", - "modalWidth": 800, - "modalHeight": 600 - } - } - } - }, - "lookup": { - "description": "Basic Infomation", - "title": "帮助", - "properties":{ - "textField": { - "description": "帮助显示文本字段", - "title": "文本字段", - "type": "string", - "editor": { - "type": "field-selector" - } - } - } - } - } -} diff --git a/packages/ui-vue/components/lookup/src/property-config/lookup.property-config.ts b/packages/ui-vue/components/lookup/src/property-config/lookup.property-config.ts index 39b7d3f956a..9b869968460 100644 --- a/packages/ui-vue/components/lookup/src/property-config/lookup.property-config.ts +++ b/packages/ui-vue/components/lookup/src/property-config/lookup.property-config.ts @@ -144,8 +144,8 @@ export class LookupPropertyConfig extends InputBaseProperty { type: "string", editor: { type: "field-selector", - bindingType: { "enable": false }, textField: 'bindingPath', + idField: 'bindingPath', editorParams: { propertyData, formBasicInfo: this.formSchemaUtils.getFormMetadataBasicInfo() @@ -166,8 +166,8 @@ export class LookupPropertyConfig extends InputBaseProperty { $converter: lookupTextFieldConverter, editor: { type: "field-selector", - bindingType: { "enable": false }, textField: 'bindingPath', + idField: 'bindingPath', editorParams: { propertyData, formBasicInfo: this.formSchemaUtils.getFormMetadataBasicInfo() diff --git a/packages/ui-vue/components/mapping-editor/src/schema/mapping-editor.schema.json b/packages/ui-vue/components/mapping-editor/src/schema/mapping-editor.schema.json index 2d47f4e716a..79804e13f2a 100644 --- a/packages/ui-vue/components/mapping-editor/src/schema/mapping-editor.schema.json +++ b/packages/ui-vue/components/mapping-editor/src/schema/mapping-editor.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://farris-design.gitee.io/mapping-editor.schema.json", - "title": "field-selector", + "title": "mapping-editor", "description": "A Farris Input Component", "type": "object", "properties": { diff --git a/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts b/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts index 48ffb899d3a..44b192af0fc 100644 --- a/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts +++ b/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts @@ -30,7 +30,7 @@ export class InputBaseProperty extends BaseControlProperty { var self = this; this.setDesignViewModelField(propertyData); const formBasicInfo = this.formSchemaUtils.getFormMetadataBasicInfo(); - const data = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId); + // const data = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId); return { description: 'Basic Information', title: '基本信息', @@ -63,21 +63,17 @@ export class InputBaseProperty extends BaseControlProperty { binding: { description: "绑定的表单字段", title: "绑定", - $converter: "/converter/field-selector.converter", editor: { - type: "field-selector", + type: "binding-selector", bindingType: { "enable": false }, editorParams: { - propertyData, - formBasicInfo + componentSchema: propertyData, + needSyncToViewModel: true, + viewModelId: this.viewModelId, + designerHostService: this.designerHostService, + disableOccupiedFields: true }, - columns: [ - { field: 'name', title: '字段名称' }, - { field: 'bindingField', title: '绑定字段' }, - { field: 'fieldType', title: '字段类型' } - ], - textField: 'bindingField', - data + textField: 'bindingField' } } }, diff --git a/packages/ui-vue/components/radio-group/src/property-config/radio-group.property-config.json b/packages/ui-vue/components/radio-group/src/property-config/radio-group.property-config.json deleted file mode 100644 index 737e956976f..00000000000 --- a/packages/ui-vue/components/radio-group/src/property-config/radio-group.property-config.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "title": "radio-group", - "description": "A Farris Component", - "type": "object", - "categories": { - "basic": { - "description": "Basic Infomation", - "title": "基本信息001", - "properties": { - "id": { - "description": "组件标识", - "title": "标识", - "type": "string", - "readonly": true - }, - "type": { - "description": "类型", - "title": "类型", - "type": "string", - "readonly": true, - "$converter": "/converter/type.converter" - }, - "label":{ - "description": "标签", - "title": "标签", - "type": "string" - }, - "binding":{ - "description":"绑定的表单字段", - "title": "绑定", - "editor":{ - "type":"field-selector" - } - } - } - }, - "appearance": { - "description": "", - "title": "外观", - "properties": { - "class": { - "description": "组件的CSS样式", - "title": "class样式" - }, - "style": { - "description": "组件的内容样式", - "title": "style样式" - } - } - }, - "editor": { - "description": "组件信息", - "title": "组件信息", - "type":"radio-group", - "$converter":"/converter/property-editor.converter", - "properties": { - "disabled": { - "description": "", - "title": "禁用", - "type": "boolean" - }, - "horizontal": { - "description": "", - "title": "是否横向", - "type": "boolean" - }, - "textField": { - "description": "", - "title": "显示文本字段", - "type": "string" - }, - "valueField": { - "description": "", - "title": "值字段", - "type": "string" - }, - "enumData":{ - "description": "", - "title": "数据", - "type": "array" - } - } - } - } -} diff --git a/packages/ui-vue/components/switch/src/property-config/switch.property-config.json b/packages/ui-vue/components/switch/src/property-config/switch.property-config.json deleted file mode 100644 index bea884e2a18..00000000000 --- a/packages/ui-vue/components/switch/src/property-config/switch.property-config.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "title": "switch", - "description": "A Farris Component", - "type": "object", - "categories": { - "basic": { - "description": "Basic Infomation", - "title": "基本信息001", - "properties": { - "id": { - "description": "组件标识", - "title": "标识", - "type": "string", - "readonly": true - }, - "type": { - "description": "类型", - "title": "类型", - "type": "string", - "readonly": true, - "$converter": "/converter/type.converter" - }, - "label":{ - "description": "标签", - "title": "标签", - "type": "string" - }, - "binding":{ - "description":"绑定的表单字段", - "title": "绑定", - "editor":{ - "type":"field-selector" - } - } - } - }, - "appearance": { - "description": "", - "title": "外观", - "properties": { - "class": { - "description": "组件的CSS样式", - "title": "class样式" - }, - "style": { - "description": "组件的内容样式", - "title": "style样式" - } - } - }, - "editor": { - "description": "组件信息", - "title": "组件信息", - "type":"switch", - "$converter":"/converter/property-editor.converter", - "properties": { - "disabled": { - "description": "", - "title": "禁用", - "type": "boolean" - }, - "onLabel": { - "description": "", - "title": "打开时标签", - "type": "string" - }, - "offLabel": { - "description": "", - "title": "关闭时标签", - "type": "string" - }, - "onBackground": { - "description": "", - "title": "打开时背景色", - "type": "string" - }, - "offBackground": { - "description": "", - "title": "关闭时背景色", - "type": "string" - }, - "size":{ - "description": "", - "title": "尺寸", - "editor":{ - "data": [ - { - "value": "small", - "name": "小号" - }, - { - "value": "middle", - "name": "中号" - }, - { - "value": "large", - "name": "大号" - } - ] - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts b/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts index a7fe8a0ceb3..4a02c1289b1 100644 --- a/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts +++ b/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts @@ -174,6 +174,8 @@ export function useDesignTabs( } tabs?.splice(index, 1); setAcitveTab(tabId); + changeToolbarItems(); + designerItemContext?.setupContext?.emit('selectionChange'); canvasChanged.value++; } function deactiveElements() { diff --git a/packages/ui-vue/components/textarea/src/property-config/textarea.property-config.json b/packages/ui-vue/components/textarea/src/property-config/textarea.property-config.json deleted file mode 100644 index 7d2d5767418..00000000000 --- a/packages/ui-vue/components/textarea/src/property-config/textarea.property-config.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "title": "textarea", - "description": "A Farris Component", - "type": "object", - "categories": { - "basic": { - "description": "Basic Infomation", - "title": "基本信息", - "properties": { - "id": { - "description": "组件标识", - "title": "标识", - "type": "string", - "readonly": true - }, - "type": { - "description": "类型", - "title": "类型", - "type": "string", - "readonly": true, - "$converter": "/converter/type.converter" - }, - "label":{ - "description": "标签", - "title": "标签", - "type": "string" - }, - "binding":{ - "description":"绑定的表单字段", - "title": "绑定", - "editor":{ - "type":"field-selector" - } - } - } - }, - "appearance": { - "description": "", - "title": "外观", - "properties": { - "class": { - "description": "组件的CSS样式", - "title": "class样式" - }, - "style": { - "description": "组件的内容样式", - "title": "style样式" - } - } - }, - "editor": { - "description": "组件信息", - "title": "组件信息", - "type":"textarea", - "$converter":"/converter/property-editor.converter", - "properties": { - "readonly": { - "description": "", - "title": "只读", - "type": "boolean" - }, - "required": { - "description": "", - "title": "必填", - "type": "boolean" - }, - "disabled": { - "description": "", - "title": "禁用", - "type": "boolean" - }, - "placeholder": { - "description": "空值时,输入控件内的占位文本", - "title": "提示文本", - "type": "string" - } - } - } - } -} diff --git a/packages/ui-vue/components/time-picker/src/property-config/time-picker.property-config.json b/packages/ui-vue/components/time-picker/src/property-config/time-picker.property-config.json deleted file mode 100644 index ef88ec993ef..00000000000 --- a/packages/ui-vue/components/time-picker/src/property-config/time-picker.property-config.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "title": "time-picker", - "description": "A Farris Component", - "type": "object", - "categories": { - "basic": { - "description": "Basic Infomation", - "title": "基本信息001", - "properties": { - "id": { - "description": "组件标识", - "title": "标识", - "type": "string", - "readonly": true - }, - "type": { - "description": "类型", - "title": "类型", - "type": "string", - "readonly": true, - "$converter": "/converter/type.converter" - }, - "label":{ - "description": "标签", - "title": "标签", - "type": "string" - }, - "binding":{ - "description":"绑定的表单字段", - "title": "绑定", - "editor":{ - "type":"field-selector" - } - } - } - }, - "appearance": { - "description": "", - "title": "外观", - "properties": { - "class": { - "description": "组件的CSS样式", - "title": "class样式" - }, - "style": { - "description": "组件的内容样式", - "title": "style样式" - } - } - }, - "editor": { - "description": "组件信息", - "title": "组件信息", - "type":"time-picker", - "$converter":"/converter/property-editor.converter", - "properties":{ - "editable": { - "description": "", - "title": "允许编辑", - "type": "boolean" - }, - "readonly": { - "description": "", - "title": "只读", - "type": "string" - }, - "disabled": { - "description": "", - "title": "禁用", - "type": "boolean" - }, - "placeholder": { - "description": "", - "title": "提示文本", - "type": "string" - }, - "format": { - "description": "", - "title": "格式", - "type": "enum", - "editor": { - "type": "combo-list", - "textField": "name", - "valueField": "value", - "data": [ - { - "value": "HH:mm:ss", - "name": "HH:mm:ss" - } - ] - } - }, - "showHeader": { - "description": "", - "title": "是否显示头部区域", - "type": "boolean" - }, - "use12Hours": { - "description": "", - "title": "是否使用12小时制", - "type": "boolean" - } - } - } - } -} diff --git a/packages/ui-vue/components/tree-grid/src/tree-grid.component.tsx b/packages/ui-vue/components/tree-grid/src/tree-grid.component.tsx index e6eff71952d..6c5deac808a 100644 --- a/packages/ui-vue/components/tree-grid/src/tree-grid.component.tsx +++ b/packages/ui-vue/components/tree-grid/src/tree-grid.component.tsx @@ -318,11 +318,14 @@ export default defineComponent({ function getSelectedItems() { return useSelectionComposition.getSelectedItems(); } + function clearSelection(){ + useSelectionComposition.clearSelection(); + } const shouldRenderEmptyContent = computed(() => !visibleDatas.value || !visibleDatas.value.length); // 渲染空数据提示 const { renderEmpty } = getEmpty(context as SetupContext); - context.expose({ addNewDataItem, addNewChildDataItem, removeDataItem, editDataItem, acceptDataItem, cancelDataItem, updateColumns, updateDataSource, selectItemById, getSelectedItems }); + context.expose({ addNewDataItem, addNewChildDataItem, removeDataItem, editDataItem, acceptDataItem, cancelDataItem, updateColumns, updateDataSource, selectItemById, getSelectedItems, clearSelection }); return () => { return ( -- Gitee From a47ed48e748e1c50ff423301712d132d3ea3efda Mon Sep 17 00:00:00 2001 From: wang-xh Date: Mon, 16 Dec 2024 09:47:10 +0800 Subject: [PATCH 025/181] =?UTF-8?q?fix:=20=E4=BB=A3=E7=A0=81=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E6=94=AF=E6=8C=81=E7=9B=91=E5=90=AC=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=9A=84=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/monaco-editor/monaco-editor.component.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/designer/src/components/components/monaco-editor/monaco-editor.component.tsx b/packages/designer/src/components/components/monaco-editor/monaco-editor.component.tsx index a78669607c2..2f0f1928ef4 100644 --- a/packages/designer/src/components/components/monaco-editor/monaco-editor.component.tsx +++ b/packages/designer/src/components/components/monaco-editor/monaco-editor.component.tsx @@ -1,4 +1,4 @@ -import { defineComponent, inject, onBeforeUnmount, onMounted, ref } from "vue"; +import { defineComponent, watch, onBeforeUnmount, onMounted, ref } from "vue"; import loader from "@monaco-editor/loader"; import { MonacoEditorProps, monacoEditorProps } from "./monaco-editor.props"; @@ -8,6 +8,7 @@ export default defineComponent({ setup(props: MonacoEditorProps, context) { const editorContainer = ref(); let editorInstance: any = null; + let codeValues = ref(props.modelValue); async function getMonacoEditorConfig() { return fetch('assets/monaco-editor.config.json').then((config: Record) => { @@ -24,7 +25,7 @@ export default defineComponent({ loader.init().then((monaco) => { editorInstance = monaco.editor.create(editorContainer.value, { - value: props.modelValue, + value: codeValues.value, language: props.language, theme: props.theme, folding: true, @@ -33,6 +34,10 @@ export default defineComponent({ } } + watch(() => props.modelValue, (newValue) => { + codeValues.value = newValue; + editorInstance?.setValue(newValue) + }) const resizeObserver = new ResizeObserver(entries => { editorInstance?.layout(); }); -- Gitee From cc856c4fede10d73132eb7ad21ff1428fe164acf Mon Sep 17 00:00:00 2001 From: wang-xh Date: Tue, 17 Dec 2024 15:32:43 +0800 Subject: [PATCH 026/181] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E5=88=A0=E9=99=A4=E5=90=8E=E4=BA=8B=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=88=A0=E9=99=A4=E6=8E=A7=E4=BB=B6=E5=90=8E?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E8=A7=86=E5=9B=BE=E6=A8=A1=E5=9E=8B=E5=B9=B6?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=86=97=E4=BD=99DOM=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../composition/design-viewmodel.service.ts | 4 +- .../components/composition/use-form-schema.ts | 21 +++--- .../designer/src/components/types/metadata.ts | 9 ++- .../avatar/src/designer/use-rules.ts | 18 +---- .../checkbox/src/designer/use-rules.ts | 43 ++---------- .../combo-list/src/designer/use-rules.ts | 22 +----- .../src/designer/use-designer-rules.ts | 24 ++++++- .../src/designer/use-designer-rules.ts | 55 +-------------- .../data-grid.property-config.ts | 4 +- .../date-picker/src/designer/use-rules.ts | 22 +----- .../components/designer-item.component.tsx | 1 + .../function/use-designer-component.ts | 30 +++++++- .../designer-canvas/src/composition/types.ts | 4 +- .../components/designer-canvas/src/types.ts | 17 ++--- .../ui-vue/components/dynamic-form/index.ts | 2 +- .../designer/form-group-use-designer-rules.ts | 70 +++++++++++++++++++ .../designer/form-group.design.component.tsx | 9 +-- ...ts => response-form-use-designer-rules.ts} | 0 .../response-form.design.component.tsx | 2 +- .../src/property-config-resolver.ts | 4 +- .../src/designer/use-input-group-rules.ts | 22 +----- .../lookup/src/designer/use-lookup-rules.ts | 22 +----- .../nav/src/designer/nav.design.component.tsx | 6 +- .../src/designer/use-design-rules.ts | 22 +----- .../src/composition/use-design-rules.ts | 22 +----- .../src/designer/order.design.component.tsx | 4 +- .../designer/pagination.design.components.tsx | 4 +- .../src/composition/entity/use-input-rules.ts | 62 ---------------- .../composition/use-querysolution-rules.ts | 17 ----- .../src/designer/use-design-rules.ts | 21 +----- .../switch/src/designer/use-design-rules.ts | 21 +----- .../designer/tab-page-use-designer-rules.ts | 5 +- .../tabs/src/designer/tabs-use-design.ts | 16 +++++ .../textarea/src/designer/use-design-rules.ts | 21 +----- .../src/designer/use-design-rules.ts | 21 +----- 35 files changed, 209 insertions(+), 438 deletions(-) create mode 100644 packages/ui-vue/components/dynamic-form/src/designer/form-group-use-designer-rules.ts rename packages/ui-vue/components/dynamic-form/src/designer/{use-designer-rules.ts => response-form-use-designer-rules.ts} (100%) delete mode 100644 packages/ui-vue/components/property-panel/src/composition/entity/use-input-rules.ts diff --git a/packages/designer/src/components/composition/design-viewmodel.service.ts b/packages/designer/src/components/composition/design-viewmodel.service.ts index 4322fbf5386..66e070f982a 100644 --- a/packages/designer/src/components/composition/design-viewmodel.service.ts +++ b/packages/designer/src/components/composition/design-viewmodel.service.ts @@ -28,7 +28,7 @@ export function useDesignViewModel(useFormSchema: UseFormSchema, schemaService: * 根据ID删除整个ViewModel:用于组件的删除 * @param viewModelId viewModelId */ - function deleteViewModelById(viewModelId) { + function deleteViewModelById(viewModelId: string) { const index = dgViewModels.findIndex(vm => vm.id === viewModelId); if (index > -1) { dgViewModels.splice(index, 1); @@ -205,5 +205,5 @@ export function useDesignViewModel(useFormSchema: UseFormSchema, schemaService: } } } - return { assembleDesignViewModel, getAllFields2TreeByVMId, getDgViewModel } + return { assembleDesignViewModel, getAllFields2TreeByVMId, getDgViewModel, deleteViewModelById } } diff --git a/packages/designer/src/components/composition/use-form-schema.ts b/packages/designer/src/components/composition/use-form-schema.ts index 9b49e4dc01e..403a0ca9ca5 100644 --- a/packages/designer/src/components/composition/use-form-schema.ts +++ b/packages/designer/src/components/composition/use-form-schema.ts @@ -1,6 +1,6 @@ /* eslint-disable no-restricted-syntax */ import { cloneDeep, merge, mergeWith } from "lodash-es"; -import { EntityFieldTypeDisplayNamei18n, FormBindingType, FormComponent, FormMetaDataModule, FormMetadaDataDom, FormSchema, FormSchemaEntity, FormSchemaEntityField, FormVariable, FormVariableCategory, FormVariableTypes, FormViewModel, FormViewModelField, FormWebCmd, MetadataDto, UseFormSchema } from "../types"; +import { FormBindingType, FormComponent, FormMetaDataModule, FormMetadaDataDom, FormSchema, FormSchemaEntity, FormSchemaEntityField, FormVariable, FormVariableCategory, FormVariableTypes, FormViewModel, FormViewModelField, FormWebCmd, MetadataDto, UseFormSchema, FormExpression } from "../types"; import { NodeType, Node } from "../types/events-editor"; import { inject } from "vue"; import { LookupSchemaRepositoryToken } from "@farris/ui-vue/components/lookup"; @@ -201,16 +201,12 @@ export function useFormSchema(): UseFormSchema { function setCommands(value: Array) { formSchema.module.webcmds = value || []; } - function getServiceRefs(): any[] { - return formSchema.module.serviceRefs || []; - } - - // function getExpressions(): FormExpression[] { - // return formSchema ? formSchema.module.expressions : null; - // } + function getExpressions(): FormExpression[] { + return formSchema?.module.expressions || []; + } - function setExpressions(value) { + function setExpressions(value: FormExpression[]) { formSchema.module.expressions = value; } @@ -318,7 +314,7 @@ export function useFormSchema(): UseFormSchema { return targetComponets; } - + function getViewModelByFieldId(fieldId: string): FormViewModel { let viewModel; for (const vm of formSchema.module.viewmodels) { @@ -1302,6 +1298,9 @@ export function useFormSchema(): UseFormSchema { setFormTemplateRule, getFormTemplateRule, getRemoteVariables, - getLocaleVariablesByViewModelId + getLocaleVariablesByViewModelId, + getExpressions, + setExpressions, + deleteComponent }; } diff --git a/packages/designer/src/components/types/metadata.ts b/packages/designer/src/components/types/metadata.ts index fc2af3f9c9a..9d297a524e6 100644 --- a/packages/designer/src/components/types/metadata.ts +++ b/packages/designer/src/components/types/metadata.ts @@ -147,7 +147,7 @@ export interface UseFormMetadata { saveFormMetadata: () => void; /** 查询表单模板的拖拽控制规则 */ queryFormTemplateRule: (templateId: string) => Promise; - publishFormMetadata: () => Promise<{result:boolean, error?:string}> + publishFormMetadata: () => Promise<{ result: boolean, error?: string }> } export interface UseFormSchema { @@ -209,6 +209,10 @@ export interface UseFormSchema { getFormTemplateRule: () => any; getLocaleVariablesByViewModelId: (viewModelId: string) => any; getRemoteVariables: () => any; + getExpressions: () => FormExpression[]; + setExpressions: (value: FormExpression[]) => void; + deleteComponent: (componentId: string) => void; + } export interface UseSchemaService { @@ -221,7 +225,8 @@ export interface UseSchemaService { export interface UseDesignViewModel { assembleDesignViewModel: () => void; getAllFields2TreeByVMId: (viewModelId: string) => any[]; - getDgViewModel: (viewModelId: string) => DesignViewModel | null + getDgViewModel: (viewModelId: string) => DesignViewModel | null; + deleteViewModelById: (viewModelId: string) => void; } export interface UseControlCreator { setFormFieldProperty: (field: FormSchemaEntityField, editorType: string, controlClass: string) => any; diff --git a/packages/ui-vue/components/avatar/src/designer/use-rules.ts b/packages/ui-vue/components/avatar/src/designer/use-rules.ts index fc315b056bf..3f65c0f7c00 100644 --- a/packages/ui-vue/components/avatar/src/designer/use-rules.ts +++ b/packages/ui-vue/components/avatar/src/designer/use-rules.ts @@ -1,18 +1,10 @@ /* eslint-disable max-len */ import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; -import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; import { AvatarProperty } from "../property-config/avatar.property-config"; export function useAvatarDesignerRules(designItemContext: DesignerItemContext, designerHostService): UseDesignerRules { - const { canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted } = useInputDesignerRules(designItemContext, designerHostService); + const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 @@ -22,14 +14,6 @@ export function useAvatarDesignerRules(designItemContext: DesignerItemContext, d } return { - canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, getPropsConfig } as UseDesignerRules; diff --git a/packages/ui-vue/components/checkbox/src/designer/use-rules.ts b/packages/ui-vue/components/checkbox/src/designer/use-rules.ts index 75990da76b8..a3e79665da3 100644 --- a/packages/ui-vue/components/checkbox/src/designer/use-rules.ts +++ b/packages/ui-vue/components/checkbox/src/designer/use-rules.ts @@ -1,20 +1,12 @@ /* eslint-disable max-len */ import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; -import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; import { CheckGroupProperty } from "../property-config/check-group.property-config"; import { CheckBoxProperty } from "../property-config/checkbox.property-config"; export function useCheckGroupDesignerRules(designItemContext: DesignerItemContext, designerHostService): UseDesignerRules { - const { canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted } = useInputDesignerRules(designItemContext, designerHostService); + const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 @@ -23,28 +15,11 @@ export function useCheckGroupDesignerRules(designItemContext: DesignerItemContex return inputGroupProps.getPropertyConfig(schema, componentInstance); } - return { - canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, - getPropsConfig - } as UseDesignerRules; + return { getPropsConfig } as UseDesignerRules; } export function useCheckBoxDesignerRules(designItemContext: DesignerItemContext, designerHostService): UseDesignerRules { - const { canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted } = useInputDesignerRules(designItemContext, designerHostService); + const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 @@ -53,16 +28,6 @@ export function useCheckBoxDesignerRules(designItemContext: DesignerItemContext, return inputGroupProps.getPropertyConfig(schema, componentInstance); } - return { - canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, - getPropsConfig - } as UseDesignerRules; + return { getPropsConfig } as UseDesignerRules; } diff --git a/packages/ui-vue/components/combo-list/src/designer/use-rules.ts b/packages/ui-vue/components/combo-list/src/designer/use-rules.ts index 16d6205c3a4..18fc0c2284b 100644 --- a/packages/ui-vue/components/combo-list/src/designer/use-rules.ts +++ b/packages/ui-vue/components/combo-list/src/designer/use-rules.ts @@ -1,35 +1,19 @@ /* eslint-disable max-len */ import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; -import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; import { ComboListProperty } from "../property-config/combo-list.property-config"; export function useComboListDesignerRules(designItemContext: DesignerItemContext, designerHostService): UseDesignerRules { - const { canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted } = useInputDesignerRules(designItemContext, designerHostService); + const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 function getPropsConfig(componentId: string, componentInstance: DesignerComponentInstance) { - const inputGroupProps=new ComboListProperty(componentId, designerHostService); - return inputGroupProps.getPropertyConfig(schema,componentInstance); + const inputGroupProps = new ComboListProperty(componentId, designerHostService); + return inputGroupProps.getPropertyConfig(schema, componentInstance); } return { - canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, getPropsConfig } as UseDesignerRules; diff --git a/packages/ui-vue/components/component/src/designer/use-designer-rules.ts b/packages/ui-vue/components/component/src/designer/use-designer-rules.ts index fb806883707..49d1d65779b 100644 --- a/packages/ui-vue/components/component/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/component/src/designer/use-designer-rules.ts @@ -31,11 +31,31 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe function getStyles(): string { return ' display: inherit;flex-direction: inherit;margin-bottom:10px'; } - // 构造属性配置方法 + /** + * 获取属性配置 + */ function getPropsConfig(componentId: string) { const componentProp = new ComponentProperty(componentId, designerHostService); const schema = designItemContext.schema; return componentProp.getPropertyConfig(schema); } - return { canAccepts, checkCanDeleteComponent, checkCanMoveComponent, hideNestedPaddingInDesginerView, getStyles, getPropsConfig }; + /** + * 组件删除后事件 + */ + function onRemoveComponent() { + const designViewModelUtils = designerHostService?.designViewModelUtils; + const formSchemaUtils = designerHostService?.formSchemaUtils; + const schema = designItemContext?.schema; + + + // 删除viewmodel和component + if (designViewModelUtils && formSchemaUtils) { + const viewModelId = formSchemaUtils.getViewModelIdByComponentId(schema.id); + designViewModelUtils.deleteViewModelById(viewModelId); + + formSchemaUtils.deleteComponent(schema.id); + } + + } + return { canAccepts, checkCanDeleteComponent, checkCanMoveComponent, hideNestedPaddingInDesginerView, getStyles, getPropsConfig, onRemoveComponent }; } diff --git a/packages/ui-vue/components/data-grid/src/designer/use-designer-rules.ts b/packages/ui-vue/components/data-grid/src/designer/use-designer-rules.ts index a231b1a2cf8..4c6b5755e6e 100644 --- a/packages/ui-vue/components/data-grid/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/data-grid/src/designer/use-designer-rules.ts @@ -1,7 +1,6 @@ /* eslint-disable max-len */ /* eslint-disable complexity */ import { ref } from "vue"; -// import { useDesignerRules } from "../../../component/src/designer/use-designer-rules"; import { DraggingResolveContext, DesignerHTMLElement, UseDesignerRules, DesignerHostService } from "../../../designer-canvas/src/composition/types"; import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; import { DataGridProperty } from "../property-config/data-grid.property-config"; @@ -12,8 +11,6 @@ export function useDesignerRulesForDataGrid(designItemContext: DesignerItemConte const triggerBelongedComponentToMoveWhenMoved = ref(true); /** 组件在删除时需要将所属的Component一起拖拽 */ const triggerBelongedComponentToDeleteWhenDeleted = ref(true); - /** data-grid所属的上级组件控制规则 */ - // let belongedComponentRules: UseDesignerRules; /** * 判断是否可以接收拖拽新增的子级控件 @@ -27,24 +24,16 @@ export function useDesignerRulesForDataGrid(designItemContext: DesignerItemConte } /** - * data-grid是否支持删除,取决于所属组件是否支持删除 + * data-grid不支持删除,需要选中所属组件Component节点删除。 */ function checkCanDeleteComponent() { return false; - // if (belongedComponentRules && belongedComponentRules.checkCanDeleteComponent) { - // return belongedComponentRules.checkCanDeleteComponent(); - // } - // return true; } /** - * data-grid是否支持移动,取决于所属组件是否支持移动 + * data-grid不支持移动,需要选中所属组件Component节点移动。 */ function checkCanMoveComponent() { return false; - // if (belongedComponentRules && belongedComponentRules.checkCanMoveComponent) { - // return belongedComponentRules.checkCanMoveComponent(); - // } - // return true; } function hideNestedPaddingInDesginerView() { @@ -55,45 +44,8 @@ export function useDesignerRulesForDataGrid(designItemContext: DesignerItemConte } /** - * data-grid上级中type='component'的控件,即为data-grid所属的组件 + * 构造属性配置方法 */ - function getBelongedComponentSchema(cmpSchema?: ComponentSchema, cmpContext?: DesignerItemContext): { cmpSchema: ComponentSchema | null; cmpParentSchema: ComponentSchema | null } | null { - if (!cmpSchema || !cmpContext) { - return null; - } - if (cmpSchema.type === 'component') { - return { - cmpSchema, - cmpParentSchema: cmpContext?.parent?.schema || null - }; - } - const grandParent = getBelongedComponentSchema(cmpContext?.parent?.schema, cmpContext?.parent); - if (grandParent) { - return grandParent; - } - return null; - } - - /** - * 获取data-grid所属的组件控制规则 - */ - // function getBelongedComponentContext() { - // const belongedCmp = getBelongedComponentSchema(schema, designItemContext); - // if (belongedCmp && belongedCmp.cmpSchema && belongedCmp.cmpParentSchema) { - // belongedComponentRules = useDesignerRules(belongedCmp.cmpSchema, belongedCmp.cmpParentSchema); - // if (belongedComponentRules && belongedComponentRules.resolveComponentContext) { - // belongedComponentRules.resolveComponentContext(); - // } - // } - // } - - /** - * 判断data-grid上下文 - */ - function resolveComponentContext() { - // getBelongedComponentContext(); - } - // 构造属性配置方法 function getPropsConfig(componentId: string) { const dataGridProp = new DataGridProperty(componentId, designerHostService); @@ -106,7 +58,6 @@ export function useDesignerRulesForDataGrid(designItemContext: DesignerItemConte checkCanMoveComponent, hideNestedPaddingInDesginerView, onAcceptMovedChildElement, - resolveComponentContext, triggerBelongedComponentToMoveWhenMoved, triggerBelongedComponentToDeleteWhenDeleted, getPropsConfig diff --git a/packages/ui-vue/components/data-grid/src/property-config/data-grid.property-config.ts b/packages/ui-vue/components/data-grid/src/property-config/data-grid.property-config.ts index f3272f24ae7..33d736ac275 100644 --- a/packages/ui-vue/components/data-grid/src/property-config/data-grid.property-config.ts +++ b/packages/ui-vue/components/data-grid/src/property-config/data-grid.property-config.ts @@ -55,9 +55,9 @@ export class DataGridProperty extends BaseControlProperty { textField: 'name', valueField: 'label', data: entityTreeData, - readonly: propertyData.columns && propertyData.columns.length>0, editable: false - } + }, + readonly: propertyData.columns && propertyData.columns.length > 0 } }, setPropertyRelates(changeObject: PropertyChangeObject, data: any) { diff --git a/packages/ui-vue/components/date-picker/src/designer/use-rules.ts b/packages/ui-vue/components/date-picker/src/designer/use-rules.ts index 7d109905a6d..bb9a0e928f1 100644 --- a/packages/ui-vue/components/date-picker/src/designer/use-rules.ts +++ b/packages/ui-vue/components/date-picker/src/designer/use-rules.ts @@ -1,18 +1,10 @@ /* eslint-disable max-len */ import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; -import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; import { DatePickerProperty } from "../property-config/date-picker.property-config"; export function useDatePickerDesignerRules(designItemContext: DesignerItemContext, designerHostService): UseDesignerRules { - const { canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted } = useInputDesignerRules(designItemContext, designerHostService); + const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 @@ -21,16 +13,6 @@ export function useDatePickerDesignerRules(designItemContext: DesignerItemContex return inputGroupProps.getPropertyConfig(schema, componentInstance); } - return { - canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, - getPropsConfig - } as UseDesignerRules; + return { getPropsConfig } as UseDesignerRules; } diff --git a/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx b/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx index 09078d3c818..3f1accceb42 100644 --- a/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx +++ b/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx @@ -93,6 +93,7 @@ const FDesignerItem = defineComponent({ } return; } + componentInstance.value.onRemoveComponent(); let parentContext = parent; let locatePredicate: any = (contentItem: ComponentSchema) => contentItem.id === schemaToRemove.id; if (schemaToRemove.type === 'component') { diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts index a091ec63723..ea79ac524cb 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts @@ -151,12 +151,35 @@ export function useDesignerComponent( } - /** 属性面板属性 */ + /** + * 获取控件属性配置 + */ function getPropConfig(...args) { if (designerRules && designerRules.getPropsConfig) { return designerRules.getPropsConfig(...args); } - // return []; + } + /** + * 控件删除后事件 + */ + function onRemoveComponent() { + // 调用当前控件的删除后事件 + if (designerRules && designerRules.onRemoveComponent) { + designerRules.onRemoveComponent(); + } + // 递归触发子级控件的删除后事件 + if (designItemContext?.schema.contents) { + designItemContext.schema.contents.map(content => { + let contentSchemaId = content.id; + if (content.type === 'component-ref') { + contentSchemaId = content.component; + } + const contentElement: any = elementRef.value.querySelector(`#${contentSchemaId}-design-item`); + if (contentElement?.componentInstance?.value.onRemoveComponent) { + contentElement.componentInstance.value.onRemoveComponent(); + } + }) + } } componentInstance.value = { @@ -181,7 +204,8 @@ export function useDesignerComponent( addNewChildComponentSchema, updateDragAndDropRules, triggerBelongedComponentToMoveWhenMoved: !!designerRules && designerRules.triggerBelongedComponentToMoveWhenMoved || ref(false), - triggerBelongedComponentToDeleteWhenDeleted: !!designerRules && designerRules.triggerBelongedComponentToDeleteWhenDeleted || ref(false) + triggerBelongedComponentToDeleteWhenDeleted: !!designerRules && designerRules.triggerBelongedComponentToDeleteWhenDeleted || ref(false), + onRemoveComponent } as DesignerComponentInstance; return componentInstance as any; diff --git a/packages/ui-vue/components/designer-canvas/src/composition/types.ts b/packages/ui-vue/components/designer-canvas/src/composition/types.ts index d8acbb23629..c7869fb7fa3 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/types.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/types.ts @@ -128,7 +128,7 @@ export interface UseDesignerRules { /** 接收控件属性信息 */ - getPropsConfig?(schema?: any,componentInstance?:any): any; + getPropsConfig?(schema?: any, componentInstance?: any): any; /** * 组件在拖拽时是否需要将所属的Component一起拖拽,用于form、data-grid等控件的拖拽 @@ -138,4 +138,6 @@ export interface UseDesignerRules { * 组件在被移除时是否需要将所属的Component一起移除,用于form、data-grid等控件的拖拽 */ triggerBelongedComponentToDeleteWhenDeleted?: Ref; + + onRemoveComponent?(): void; } diff --git a/packages/ui-vue/components/designer-canvas/src/types.ts b/packages/ui-vue/components/designer-canvas/src/types.ts index 6238894923b..5a1811096b9 100644 --- a/packages/ui-vue/components/designer-canvas/src/types.ts +++ b/packages/ui-vue/components/designer-canvas/src/types.ts @@ -45,16 +45,14 @@ export interface DesignerComponentInstance { getBelongedComponentInstance: (componentInstance: Ref) => DesignerComponentInstance | null; + /** 获取可拖拽的上层容器 */ getDraggableDesignItemElement: (context: DesignerItemContext) => Ref | null; getDraggingDisplayText: () => string; getDragScopeElement: () => HTMLElement | undefined; - /** - * 移动内部控件后事件:在可视化设计器中,容器接收控件后事件 - * @param element 移动的源DOM结构 - */ + /** 移动内部控件后事件:在可视化设计器中,容器接收控件后事件 */ onAcceptMovedChildElement: (element: DesignerHTMLElement, soureElement?: DesignerHTMLElement) => void; onChildElementMovedOut: (element: HTMLElement) => void; @@ -63,14 +61,10 @@ export interface DesignerComponentInstance { updateDragAndDropRules: () => void; - /** - * 组件在拖拽时是否需要将所属的Component一起拖拽,用于form、data-grid等控件的拖拽 - */ + /** 组件在拖拽时是否需要将所属的Component一起拖拽,用于form、data-grid等控件的拖拽 */ triggerBelongedComponentToMoveWhenMoved?: Ref; - /** - * 组件在被移除时是否需要将所属的Component一起移除,用于form、data-grid等控件的拖拽 - */ + /** 组件在被移除时是否需要将所属的Component一起移除,用于form、data-grid等控件的拖拽 */ triggerBelongedComponentToDeleteWhenDeleted?: Ref; /** 获取属性配置 */ @@ -79,6 +73,9 @@ export interface DesignerComponentInstance { /** 控件所属Component的标识*/ belongedComponentId?: string; + /** 控件删除后事件 */ + onRemoveComponent: () => void + } export interface ResolveComponentContext { diff --git a/packages/ui-vue/components/dynamic-form/index.ts b/packages/ui-vue/components/dynamic-form/index.ts index 47b153368da..bb204c721d9 100644 --- a/packages/ui-vue/components/dynamic-form/index.ts +++ b/packages/ui-vue/components/dynamic-form/index.ts @@ -15,7 +15,7 @@ export * from './src/types'; export * from './src/composition/types'; export * from './src/response-form.props'; export * from './src/component/dynamic-form-group/dynamic-form-group.props'; -export * from './src/designer/use-designer-rules'; +export * from './src/designer/response-form-use-designer-rules'; export { FResponseForm, FDynamicFormGroup, FDynamicFormInput }; diff --git a/packages/ui-vue/components/dynamic-form/src/designer/form-group-use-designer-rules.ts b/packages/ui-vue/components/dynamic-form/src/designer/form-group-use-designer-rules.ts new file mode 100644 index 00000000000..659f1903b9f --- /dev/null +++ b/packages/ui-vue/components/dynamic-form/src/designer/form-group-use-designer-rules.ts @@ -0,0 +1,70 @@ +import { ComponentSchema, DesignerItemContext } from "@/components/designer-canvas"; +import { DesignerHostService, UseDesignerRules } from "@/components/designer-canvas/src/composition/types"; + +export function useDesignerRulesForFormGroup(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { + + function checkCanMoveComponent() { + return true; + } + function checkCanDeleteComponent() { + return true; + } + + function canAccepts() { + return false; + } + + function hideNestedPaddingInDesginerView() { + return true; + } + /** + * 控件删除后事件 + */ + function onRemoveComponent() { + const schema = designItemContext.schema; + const bindingFieldId = schema.binding && schema.binding.field; + if (bindingFieldId) { + removeBindingFromViewModel(bindingFieldId) + removeExpression(bindingFieldId); + } + } + + /** + * 若控件有绑定信息,删除控件时需要同步移除viewmodel中的记录 + */ + function removeBindingFromViewModel(bindingFieldId: string) { + const designViewModelUtils = designerHostService?.designViewModelUtils; + const formSchemaUtils = designerHostService?.formSchemaUtils; + const belongedComponentId = designItemContext?.componentInstance.value?.belongedComponentId; + if (!belongedComponentId || !designViewModelUtils || !formSchemaUtils) { + return; + } + const belongedviewModelId = formSchemaUtils.getViewModelIdByComponentId(belongedComponentId); + const dgViewModel = designViewModelUtils.getDgViewModel(belongedviewModelId); + + if (dgViewModel) { + dgViewModel.removeField([bindingFieldId]); + } + } + /** + * 若控件配置了表达式,删除控件时需要同步移除表达式 + */ + function removeExpression(bindingFieldId: string) { + const formSchemaUtils = designerHostService?.formSchemaUtils; + + if (formSchemaUtils.getExpressions().length) { + const expFieldIndex = formSchemaUtils.getExpressions().findIndex(e => e.fieldId === bindingFieldId); + if (expFieldIndex > -1) { + formSchemaUtils.getExpressions().splice(expFieldIndex, 1); + } + + } + } + return { + canAccepts, + checkCanDeleteComponent, + checkCanMoveComponent, + hideNestedPaddingInDesginerView, + onRemoveComponent + }; +} \ No newline at end of file diff --git a/packages/ui-vue/components/dynamic-form/src/designer/form-group.design.component.tsx b/packages/ui-vue/components/dynamic-form/src/designer/form-group.design.component.tsx index 5e5895ffcee..0793b230cf9 100644 --- a/packages/ui-vue/components/dynamic-form/src/designer/form-group.design.component.tsx +++ b/packages/ui-vue/components/dynamic-form/src/designer/form-group.design.component.tsx @@ -4,6 +4,8 @@ import { DesignerItemContext } from '../../../designer-canvas/src/types'; import { useDesignerComponent } from '../../../designer-canvas/src/composition/function/use-designer-component'; import FDynamicFormGroupDesign from '../component/dynamic-form-group/dynamic-form-group.design.component'; import { propertyConfigSchemaMap } from '../../../../components/dynamic-resolver/src/property-config-resolver'; +import { DesignerHostService } from '../../../../components/designer-canvas/src/composition/types'; +import { useDesignerRulesForFormGroup } from './form-group-use-designer-rules'; export default defineComponent({ name: 'FFormGroupDesign', @@ -12,10 +14,9 @@ export default defineComponent({ setup(props: DynamicFormGroupPropsType, context) { const elementRef = ref(); const designItemContext = inject('design-item-context') as DesignerItemContext; - const componentInstance = useDesignerComponent(elementRef, designItemContext); - componentInstance.value.canNested = false; - componentInstance.value.canMove = true; - componentInstance.value.canDelete = true; + const designerHostService = inject('designer-host-service'); + const designerRulesComposition = useDesignerRulesForFormGroup(designItemContext, designerHostService); + const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); onMounted(() => { elementRef.value.componentInstance = componentInstance; diff --git a/packages/ui-vue/components/dynamic-form/src/designer/use-designer-rules.ts b/packages/ui-vue/components/dynamic-form/src/designer/response-form-use-designer-rules.ts similarity index 100% rename from packages/ui-vue/components/dynamic-form/src/designer/use-designer-rules.ts rename to packages/ui-vue/components/dynamic-form/src/designer/response-form-use-designer-rules.ts diff --git a/packages/ui-vue/components/dynamic-form/src/designer/response-form.design.component.tsx b/packages/ui-vue/components/dynamic-form/src/designer/response-form.design.component.tsx index 3f6efdd97fc..a5b428587ac 100644 --- a/packages/ui-vue/components/dynamic-form/src/designer/response-form.design.component.tsx +++ b/packages/ui-vue/components/dynamic-form/src/designer/response-form.design.component.tsx @@ -2,7 +2,7 @@ import { SetupContext, computed, defineComponent, inject, onMounted, ref } from import { DynamicFormGroupPropsType, dynamicFormGroupProps } from '../component/dynamic-form-group/dynamic-form-group.props'; import { DesignerItemContext } from '../../../designer-canvas/src/types'; import { useDesignerComponent } from '../../../designer-canvas/src/composition/function/use-designer-component'; -import { useDesignerRules } from './use-designer-rules'; +import { useDesignerRules } from './response-form-use-designer-rules'; import areaResponseDirective from '../../../common/directive/area-response'; import { DesignerHostService } from '../../../designer-canvas/src/composition/types'; diff --git a/packages/ui-vue/components/dynamic-resolver/src/property-config-resolver.ts b/packages/ui-vue/components/dynamic-resolver/src/property-config-resolver.ts index 72a83caa77f..b0dedd940f4 100644 --- a/packages/ui-vue/components/dynamic-resolver/src/property-config-resolver.ts +++ b/packages/ui-vue/components/dynamic-resolver/src/property-config-resolver.ts @@ -72,8 +72,8 @@ function isVisible(propertySchemaKeys: string[], propertySchema: Record, propertyConfigMap: Record) { if (propertySchemaKeys.includes('readonly') && propertySchema.readonly !== undefined) { - return typeof propertySchema.visible === 'boolean' ? - () => Boolean(propertySchema.visible) : + return typeof propertySchema.readonly === 'boolean' ? + () => Boolean(propertySchema.readonly) : generateBooleanValue(propertySchema.readonly, propertyConfigMap); } return () => false; diff --git a/packages/ui-vue/components/input-group/src/designer/use-input-group-rules.ts b/packages/ui-vue/components/input-group/src/designer/use-input-group-rules.ts index 0e498b57da8..b9c82bd6fab 100644 --- a/packages/ui-vue/components/input-group/src/designer/use-input-group-rules.ts +++ b/packages/ui-vue/components/input-group/src/designer/use-input-group-rules.ts @@ -1,18 +1,10 @@ /* eslint-disable max-len */ import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { ComponentSchema, DesignerItemContext, DesignerComponentInstance } from "../../../designer-canvas/src/types"; -import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; import { InputGroupProperty } from "../property-config/input-group.property-config"; export function useInputGroupDesignerRules(designItemContext: DesignerItemContext, designerHostService): UseDesignerRules { - const { canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted } = useInputDesignerRules(designItemContext, designerHostService); + const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 @@ -21,16 +13,6 @@ export function useInputGroupDesignerRules(designItemContext: DesignerItemContex return inputGroupProps.getPropertyConfig(schema, componentInstance); } - return { - canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, - getPropsConfig - } as UseDesignerRules; + return { getPropsConfig } as UseDesignerRules; } diff --git a/packages/ui-vue/components/lookup/src/designer/use-lookup-rules.ts b/packages/ui-vue/components/lookup/src/designer/use-lookup-rules.ts index 35890832e06..744b855e56a 100644 --- a/packages/ui-vue/components/lookup/src/designer/use-lookup-rules.ts +++ b/packages/ui-vue/components/lookup/src/designer/use-lookup-rules.ts @@ -1,19 +1,9 @@ /* eslint-disable max-len */ import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; -import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; import { LookupPropertyConfig } from "../property-config/lookup.property-config"; export function useLookupDesignerRules(designItemContext: DesignerItemContext, designerHostService): UseDesignerRules { - const { canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted } = useInputDesignerRules(designItemContext, designerHostService); - // 构造属性配置方法 function getPropsConfig(componentId: string, componentInstance: DesignerComponentInstance) { const schema = designItemContext.schema as ComponentSchema; @@ -21,16 +11,6 @@ export function useLookupDesignerRules(designItemContext: DesignerItemContext, d return inputGroupProps.getPropertyConfig(schema, componentInstance); } - return { - canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, - getPropsConfig - } as UseDesignerRules; + return { getPropsConfig } as UseDesignerRules; } diff --git a/packages/ui-vue/components/nav/src/designer/nav.design.component.tsx b/packages/ui-vue/components/nav/src/designer/nav.design.component.tsx index 4ab48146a3c..b94cb97eff8 100644 --- a/packages/ui-vue/components/nav/src/designer/nav.design.component.tsx +++ b/packages/ui-vue/components/nav/src/designer/nav.design.component.tsx @@ -19,7 +19,7 @@ import { navProps, NavProps } from '../nav.props'; import { DesignerItemContext } from '../../../designer-canvas/src/types'; import { useDesignerComponent } from '../../../designer-canvas/src/composition/function/use-designer-component'; -import { useDesignerRules } from '../../../dynamic-form/src/designer/use-designer-rules'; +// import { useDesignerRules } from '../../../dynamic-form/src/designer/use-designer-rules'; export default defineComponent({ name: 'FNavDesign', @@ -36,8 +36,8 @@ export default defineComponent({ const navPicking = ref(props.navPicking); const elementRef = ref(); const designItemContext = inject('design-item-context') as DesignerItemContext; - const designerRulesComposition = useDesignerRules(designItemContext.schema, designItemContext.parent?.schema); - const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); + // const designerRulesComposition = useDesignerRules(designItemContext.schema, designItemContext.parent?.schema); + const componentInstance = useDesignerComponent(elementRef, designItemContext); onMounted(() => { elementRef.value.componentInstance = componentInstance; }); diff --git a/packages/ui-vue/components/number-range/src/designer/use-design-rules.ts b/packages/ui-vue/components/number-range/src/designer/use-design-rules.ts index d8b07d4eca0..a9b9ea87b50 100644 --- a/packages/ui-vue/components/number-range/src/designer/use-design-rules.ts +++ b/packages/ui-vue/components/number-range/src/designer/use-design-rules.ts @@ -1,18 +1,10 @@ /* eslint-disable max-len */ import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; -import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; import { NumberRangeProperty } from "../property-config/number-range.property-config"; export function useNumberRangeDesignerRules(designItemContext: DesignerItemContext, designerHostService): UseDesignerRules { - const { canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted } = useInputDesignerRules(designItemContext, designerHostService); + const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 @@ -21,16 +13,6 @@ export function useNumberRangeDesignerRules(designItemContext: DesignerItemConte return inputGroupProps.getPropertyConfig(schema, componentInstance); } - return { - canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, - getPropsConfig - } as UseDesignerRules; + return { getPropsConfig } as UseDesignerRules; } diff --git a/packages/ui-vue/components/number-spinner/src/composition/use-design-rules.ts b/packages/ui-vue/components/number-spinner/src/composition/use-design-rules.ts index 8a05f84f018..69fd6ea3bd6 100644 --- a/packages/ui-vue/components/number-spinner/src/composition/use-design-rules.ts +++ b/packages/ui-vue/components/number-spinner/src/composition/use-design-rules.ts @@ -3,16 +3,8 @@ import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { NumberSpinnerProperty } from "../property-config/number-spinner.property-config"; -import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; export function useNumberSpinnerDesignerRules(designItemContext: DesignerItemContext, designerHostService): UseDesignerRules { - const { canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted } = useInputDesignerRules(designItemContext, designerHostService); + const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 @@ -21,16 +13,6 @@ export function useNumberSpinnerDesignerRules(designItemContext: DesignerItemCon return inputGroupProps.getPropertyConfig(schema, componentInstance); } - return { - canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, - getPropsConfig - } as UseDesignerRules; + return { getPropsConfig } as UseDesignerRules; } diff --git a/packages/ui-vue/components/order/src/designer/order.design.component.tsx b/packages/ui-vue/components/order/src/designer/order.design.component.tsx index 55fd86175aa..b33b9de468c 100644 --- a/packages/ui-vue/components/order/src/designer/order.design.component.tsx +++ b/packages/ui-vue/components/order/src/designer/order.design.component.tsx @@ -5,7 +5,6 @@ import FButton from '../../../../components/button/src/button.component'; import FComboList from '../../../combo-list'; import { useDesignerComponent } from "../../../designer-canvas/src/composition/function/use-designer-component"; import { DesignerItemContext } from "../../../designer-canvas/src/types"; -import { useDesignerRules } from "../../../dynamic-form/src/designer/use-designer-rules"; export default defineComponent({ name: 'FOrderDesign', @@ -20,8 +19,7 @@ export default defineComponent({ const orderedFieldMap = ref>(new Map()); const elementRef = ref(); const designItemContext = inject('design-item-context') as DesignerItemContext; - const designerRulesComposition = useDesignerRules(designItemContext.schema, designItemContext.parent?.schema); - const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); + const componentInstance = useDesignerComponent(elementRef, designItemContext); onMounted(() => { elementRef.value.componentInstance = componentInstance; }); diff --git a/packages/ui-vue/components/pagination/src/designer/pagination.design.components.tsx b/packages/ui-vue/components/pagination/src/designer/pagination.design.components.tsx index 1d231b7325d..01332736e8a 100644 --- a/packages/ui-vue/components/pagination/src/designer/pagination.design.components.tsx +++ b/packages/ui-vue/components/pagination/src/designer/pagination.design.components.tsx @@ -25,7 +25,6 @@ import { usePages } from '../composition/use-pages'; import { useDesignerComponent } from '../../../designer-canvas/src/composition/function/use-designer-component'; import { DesignerItemContext } from '../../../designer-canvas/src/types'; -import { useDesignerRules } from '../../../dynamic-form/src/designer/use-designer-rules'; export default defineComponent({ name: 'FPagination', @@ -41,8 +40,7 @@ export default defineComponent({ const totalItems = ref(props.totalItems); const elementRef = ref(); const designItemContext = inject('design-item-context') as DesignerItemContext; - const designerRulesComposition = useDesignerRules(designItemContext.schema, designItemContext.parent?.schema); - const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); + const componentInstance = useDesignerComponent(elementRef, designItemContext); onMounted(() => { elementRef.value.componentInstance = componentInstance; }); diff --git a/packages/ui-vue/components/property-panel/src/composition/entity/use-input-rules.ts b/packages/ui-vue/components/property-panel/src/composition/entity/use-input-rules.ts deleted file mode 100644 index e64f81e22ba..00000000000 --- a/packages/ui-vue/components/property-panel/src/composition/entity/use-input-rules.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* eslint-disable max-len */ -import { ref } from "vue"; -import { DraggingResolveContext, DesignerHTMLElement, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; - -export function useInputDesignerRules(designItemContext: DesignerItemContext, designerHostService): UseDesignerRules { - const schema = designItemContext.schema as ComponentSchema; - /** 组件在拖拽时需要将所属的Component一起拖拽 */ - const triggerBelongedComponentToMoveWhenMoved = ref(true); - /** 组件在删除时需要将所属的Component一起拖拽 */ - const triggerBelongedComponentToDeleteWhenDeleted = ref(true); - /** data-grid所属的上级组件控制规则 */ - /** - * 判断是否可以接收拖拽新增的子级控件 - */ - function canAccepts(draggingContext: DraggingResolveContext): boolean { - return false; - } - - /** - * data-grid是否支持删除,取决于所属组件是否支持删除 - */ - function checkCanDeleteComponent() { - return false; - } - /** - * data-grid是否支持移动,取决于所属组件是否支持移动 - */ - function checkCanMoveComponent() { - return false; - } - - function hideNestedPaddingInDesginerView() { - return true; - } - - function onAcceptMovedChildElement(sourceElement: DesignerHTMLElement) { - } - /** - * 判断data-grid上下文 - */ - function resolveComponentContext() { - - } - // 构造属性配置方法 - function getPropsConfig(componentId: string) { - return null; - } - - return { - canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, - getPropsConfig - } as UseDesignerRules; - -} diff --git a/packages/ui-vue/components/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.ts b/packages/ui-vue/components/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.ts index df4f2eee32e..fe0b112838e 100644 --- a/packages/ui-vue/components/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.ts +++ b/packages/ui-vue/components/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.ts @@ -1,18 +1,9 @@ /* eslint-disable max-len */ import { UseDesignerRules } from "../../../../../designer-canvas/src/composition/types"; import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../../../designer-canvas/src/types"; -import { useInputDesignerRules } from "../../../../../property-panel/src/composition/entity/use-input-rules"; import { QuerySolutionPropertyConfig } from "../../../property-config/query-solution.property-config";; export function useQuerysolutionDesignerRules(designItemContext: DesignerItemContext, designerHostService): UseDesignerRules { - const { canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted } = useInputDesignerRules(designItemContext, designerHostService); // 构造属性配置方法 function getPropsConfig(componentId: string, componentInstance: DesignerComponentInstance) { @@ -22,14 +13,6 @@ export function useQuerysolutionDesignerRules(designItemContext: DesignerItemCon } return { - canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, getPropsConfig } as UseDesignerRules; diff --git a/packages/ui-vue/components/radio-group/src/designer/use-design-rules.ts b/packages/ui-vue/components/radio-group/src/designer/use-design-rules.ts index 6d5e2478626..05c511aec98 100644 --- a/packages/ui-vue/components/radio-group/src/designer/use-design-rules.ts +++ b/packages/ui-vue/components/radio-group/src/designer/use-design-rules.ts @@ -3,16 +3,7 @@ import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { RadioGroupProperty } from "../property-config/radio-group.property-config"; -import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; export function useRadioGroupDesignerRules(designItemContext: DesignerItemContext, designerHostService): UseDesignerRules { - const { canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted } = useInputDesignerRules(designItemContext, designerHostService); const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 @@ -21,16 +12,6 @@ export function useRadioGroupDesignerRules(designItemContext: DesignerItemContex return inputGroupProps.getPropertyConfig(schema, componentInstance); } - return { - canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, - getPropsConfig - } as UseDesignerRules; + return { getPropsConfig } as UseDesignerRules; } diff --git a/packages/ui-vue/components/switch/src/designer/use-design-rules.ts b/packages/ui-vue/components/switch/src/designer/use-design-rules.ts index 7ee21e9c441..86c4aee447a 100644 --- a/packages/ui-vue/components/switch/src/designer/use-design-rules.ts +++ b/packages/ui-vue/components/switch/src/designer/use-design-rules.ts @@ -3,16 +3,7 @@ import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { SwitchProperty } from "../property-config/switch.property-config"; -import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; export function useSwitchDesignerRules(designItemContext: DesignerItemContext, designerHostService): UseDesignerRules { - const { canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted } = useInputDesignerRules(designItemContext, designerHostService); const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 @@ -21,16 +12,6 @@ export function useSwitchDesignerRules(designItemContext: DesignerItemContext, d return inputGroupProps.getPropertyConfig(schema, componentInstance); } - return { - canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, - getPropsConfig - } as UseDesignerRules; + return { getPropsConfig } as UseDesignerRules; } diff --git a/packages/ui-vue/components/tabs/src/designer/tab-page-use-designer-rules.ts b/packages/ui-vue/components/tabs/src/designer/tab-page-use-designer-rules.ts index 25742ba8f5d..8103a9199a5 100644 --- a/packages/ui-vue/components/tabs/src/designer/tab-page-use-designer-rules.ts +++ b/packages/ui-vue/components/tabs/src/designer/tab-page-use-designer-rules.ts @@ -25,5 +25,8 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe return canAccept; } - return { canAccepts }; + function onRemoveComponent() { + console.log(designItemContext.schema) + } + return { canAccepts, onRemoveComponent }; } diff --git a/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts b/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts index 4a02c1289b1..c7e7b23b46c 100644 --- a/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts +++ b/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts @@ -167,6 +167,8 @@ export function useDesignTabs( } function removeDesignTab(payload: MouseEvent, tabId: string) { preventEvent(payload); + + removeComponentInTabPage(tabId); const tabs = designerItemContext.schema.contents; const index = tabs?.findIndex((schema: ComponentSchema) => schema.id === tabId); if (index === -1 || index === undefined) { @@ -175,9 +177,23 @@ export function useDesignTabs( tabs?.splice(index, 1); setAcitveTab(tabId); changeToolbarItems(); + + // 触发刷新属性面板 designerItemContext?.setupContext?.emit('selectionChange'); + // 触发更新控件树 canvasChanged.value++; } + /** + * 触发tabPage内部控件的删除后事件 + * @param tabId + */ + function removeComponentInTabPage(tabId: string) { + const tabContentElement = designerItemContext.designerItemElementRef.value.querySelector(`.farris-tabs-content`); + const tabPageElement: any = tabContentElement?.querySelector(`#${tabId}-design-item`); + if (tabPageElement?.componentInstance?.value.onRemoveComponent) { + tabPageElement.componentInstance.value.onRemoveComponent(); + } + } function deactiveElements() { Array.from(document.getElementsByClassName('dgComponentFocused') as HTMLCollectionOf).forEach( (element: HTMLElement) => element.classList.remove('dgComponentFocused') diff --git a/packages/ui-vue/components/textarea/src/designer/use-design-rules.ts b/packages/ui-vue/components/textarea/src/designer/use-design-rules.ts index 402d2231dc7..5d8bb9bf002 100644 --- a/packages/ui-vue/components/textarea/src/designer/use-design-rules.ts +++ b/packages/ui-vue/components/textarea/src/designer/use-design-rules.ts @@ -3,16 +3,7 @@ import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { TextareaProperty } from "../property-config/textarea.property-config"; -import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; export function useTextareaDesignerRules(designItemContext: DesignerItemContext, designerHostService): UseDesignerRules { - const { canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted } = useInputDesignerRules(designItemContext, designerHostService); const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 @@ -21,16 +12,6 @@ export function useTextareaDesignerRules(designItemContext: DesignerItemContext, return inputGroupProps.getPropertyConfig(schema, componentInstance); } - return { - canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, - getPropsConfig - } as UseDesignerRules; + return { getPropsConfig } as UseDesignerRules; } diff --git a/packages/ui-vue/components/time-picker/src/designer/use-design-rules.ts b/packages/ui-vue/components/time-picker/src/designer/use-design-rules.ts index e9f07fe1aa0..87f6d8b6cc8 100644 --- a/packages/ui-vue/components/time-picker/src/designer/use-design-rules.ts +++ b/packages/ui-vue/components/time-picker/src/designer/use-design-rules.ts @@ -3,16 +3,7 @@ import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../designer-canvas/src/types"; import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { TimePickerProperty } from "../property-config/time-picker.property-config"; -import { useInputDesignerRules } from "../../../property-panel/src/composition/entity/use-input-rules"; export function useTimePickerDesignerRules(designItemContext: DesignerItemContext, designerHostService): UseDesignerRules { - const { canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted } = useInputDesignerRules(designItemContext, designerHostService); const schema = designItemContext.schema as ComponentSchema; // 构造属性配置方法 @@ -21,16 +12,6 @@ export function useTimePickerDesignerRules(designItemContext: DesignerItemContex return inputGroupProps.getPropertyConfig(schema, componentInstance); } - return { - canAccepts, - checkCanDeleteComponent, - checkCanMoveComponent, - hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, - getPropsConfig - } as UseDesignerRules; + return { getPropsConfig } as UseDesignerRules; } -- Gitee From 1d4cac9697579850b721692c012962a752bfe0bb Mon Sep 17 00:00:00 2001 From: wang-xh Date: Tue, 17 Dec 2024 18:59:09 +0800 Subject: [PATCH 027/181] =?UTF-8?q?fix:=20=E6=96=B0=E5=A2=9E=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E6=96=B9=E6=A1=88=E4=B8=AD=E6=96=87=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E5=92=8C=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer-canvas/src/composition/dg-control.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/ui-vue/components/designer-canvas/src/composition/dg-control.ts b/packages/ui-vue/components/designer-canvas/src/composition/dg-control.ts index 087ce24c0c8..3e00a135b84 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/dg-control.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/dg-control.ts @@ -72,6 +72,8 @@ export const DgControl = { 'page-footer': { type: 'page-footer', name: '页脚', icon: 'ModalFooter' }, 'tab-toolbar': { type: 'tab-toolbar', name: '标签页工具栏', icon: 'TabToolbar' }, - - 'fieldset': { type: 'fieldset', name: '分组', icon: 'fieldset' } + + 'fieldset': { type: 'fieldset', name: '分组', icon: 'fieldset' }, + + 'query-solution': { type: 'query-solution', name: '筛选方案', icon: 'QueryScheme'} }; -- Gitee From d3e47717e77e7189e5e445b535b6a88e92b26d26 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Wed, 18 Dec 2024 09:31:30 +0800 Subject: [PATCH 028/181] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=A3=80=E6=9F=A5=E5=8F=91=E7=8E=B0=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../monaco-editor/monaco-editor.component.tsx | 6 +- .../composition/design-viewmodel.service.ts | 2 +- .../components/composition/use-form-schema.ts | 381 ++++++++---------- .../common/editor/binding-selector/style.ts | 6 - .../function/use-designer-component.ts | 2 +- .../components/designer-canvas/src/types.ts | 4 +- .../designer/form-group-use-designer-rules.ts | 27 +- .../designer/tab-page-use-designer-rules.ts | 5 +- .../tabs/src/designer/tabs-use-design.ts | 26 +- 9 files changed, 215 insertions(+), 244 deletions(-) delete mode 100644 packages/ui-vue/components/common/editor/binding-selector/style.ts diff --git a/packages/designer/src/components/components/monaco-editor/monaco-editor.component.tsx b/packages/designer/src/components/components/monaco-editor/monaco-editor.component.tsx index 2f0f1928ef4..825d64c0130 100644 --- a/packages/designer/src/components/components/monaco-editor/monaco-editor.component.tsx +++ b/packages/designer/src/components/components/monaco-editor/monaco-editor.component.tsx @@ -8,7 +8,7 @@ export default defineComponent({ setup(props: MonacoEditorProps, context) { const editorContainer = ref(); let editorInstance: any = null; - let codeValues = ref(props.modelValue); + const codeValues = ref(props.modelValue); async function getMonacoEditorConfig() { return fetch('assets/monaco-editor.config.json').then((config: Record) => { @@ -36,8 +36,8 @@ export default defineComponent({ watch(() => props.modelValue, (newValue) => { codeValues.value = newValue; - editorInstance?.setValue(newValue) - }) + editorInstance?.setValue(newValue); + }); const resizeObserver = new ResizeObserver(entries => { editorInstance?.layout(); }); diff --git a/packages/designer/src/components/composition/design-viewmodel.service.ts b/packages/designer/src/components/composition/design-viewmodel.service.ts index dd7ce5a0928..6c2e32d42b2 100644 --- a/packages/designer/src/components/composition/design-viewmodel.service.ts +++ b/packages/designer/src/components/composition/design-viewmodel.service.ts @@ -206,5 +206,5 @@ export function useDesignViewModel(useFormSchema: UseFormSchema, schemaService: } } } - return { assembleDesignViewModel, getAllFields2TreeByVMId, getDgViewModel, deleteViewModelById } + return { assembleDesignViewModel, getAllFields2TreeByVMId, getDgViewModel, deleteViewModelById }; } diff --git a/packages/designer/src/components/composition/use-form-schema.ts b/packages/designer/src/components/composition/use-form-schema.ts index 948ed9e0cff..c12ccb4c60a 100644 --- a/packages/designer/src/components/composition/use-form-schema.ts +++ b/packages/designer/src/components/composition/use-form-schema.ts @@ -1,5 +1,4 @@ -/* eslint-disable no-restricted-syntax */ -import { cloneDeep, merge, mergeWith } from "lodash-es"; +import { cloneDeep, mergeWith } from "lodash-es"; import { FormBindingType, FormComponent, FormMetaDataModule, FormMetadaDataDom, FormSchema, FormSchemaEntity, FormSchemaEntityField, FormVariable, FormVariableCategory, FormVariableTypes, FormViewModel, FormViewModelField, FormWebCmd, MetadataDto, UseFormSchema, FormExpression } from "../types"; import { NodeType, Node } from "../types/events-editor"; import { inject } from "vue"; @@ -41,10 +40,10 @@ export function useFormSchema(): UseFormSchema { return formSchema; } /** - * 设置DOM JSON 数据 - * @param newFormSchema DOM JSON结构 - * @param schemaChangedCallback DOM结构变化后的回调事件 - */ + * 设置DOM JSON 数据 + * @param newFormSchema DOM JSON结构 + * @param schemaChangedCallback DOM结构变化后的回调事件 + */ function setFormSchema(newFormSchema: FormMetadaDataDom, schemaChangedCallback?: (path: string, newValue: any, previousValue: any) => void) { if (!newFormSchema || !newFormSchema.module) { return; @@ -61,6 +60,27 @@ export function useFormSchema(): UseFormSchema { // } formSchema = newFormSchema; } + /** + * 深层查找控件 + */ + function getComponetsByPredicate(predicate: (component) => boolean) { + const targetComponets = [] as any; + const predicateFun = predicate; + const findTarget = (contentComponents) => { + contentComponents.forEach(function (component) { + if (predicateFun(component)) { + targetComponets.push(component); + } + if (component.contents && component.contents.length) { + findTarget(component.contents); + } + }); + }; + + findTarget(formSchema.module.components); + return targetComponets; + } + /** * 根据组件ID获取components下相应的组件节点 * @param targetComponentId 组件标识 @@ -77,9 +97,9 @@ export function useFormSchema(): UseFormSchema { } } /** - * 根据VM ID获取相应组件 - * @param viewModelId VMID - */ + * 根据VM ID获取相应组件 + * @param viewModelId VMID + */ function getComponentByViewModelId(targetViewModelId: string): FormComponent | undefined { if (!formSchema.module || !formSchema.module.components || formSchema.module.components.length === 0) { return; @@ -162,13 +182,6 @@ export function useFormSchema(): UseFormSchema { } } } - function getEApiId() { - return formSchema.module.entity[0].eapiId; - } - - function getVoId() { - return formSchema.module.entity[0].id; - } function getViewModels() { return formSchema?.module?.viewmodels || []; } @@ -178,16 +191,7 @@ export function useFormSchema(): UseFormSchema { function getComponents(): FormComponent[] { return formSchema?.module?.components || []; } - function setComponents(value) { - formSchema.module.components = value; - } - function setOptions(value) { - formSchema.options = value; - } - function setModule(value) { - formSchema.module = value; - } function getModule(): FormMetaDataModule { return formSchema.module; } @@ -206,11 +210,6 @@ export function useFormSchema(): UseFormSchema { return formSchema?.module.expressions || []; } - - // function getExpressions(): FormExpression[] { - // return formSchema ? formSchema.module.expressions : null; - // } - function setExpressions(value) { formSchema.module.expressions = value; } @@ -298,28 +297,6 @@ export function useFormSchema(): UseFormSchema { formSchema.module.extraImports = value; } - /** - * 深层查找控件 - */ - function getComponetsByPredicate(predicate: (component) => boolean) { - const targetComponets = [] as any; - const predicateFun = predicate; - const findTarget = (contentComponents) => { - contentComponents.forEach(function (component) { - if (predicateFun(component)) { - targetComponets.push(component); - } - if (component.contents && component.contents.length) { - findTarget(component.contents); - } - }); - }; - - findTarget(formSchema.module.components); - return targetComponets; - } - - function getViewModelByFieldId(fieldId: string): FormViewModel { let viewModel; for (const vm of formSchema.module.viewmodels) { @@ -349,6 +326,22 @@ export function useFormSchema(): UseFormSchema { } return false; } + + /** + * 控件新增绑定添加ViewModel Field + */ + function addViewModelField(viewModelId, filedObject: FormViewModelField) { + if (!viewModelId || !filedObject) { + return; + } + const viewModel = getViewModelById(viewModelId); + + if (!viewModel?.fields.find(fieldItem => fieldItem.id === filedObject.id)) { + viewModel?.fields.push(filedObject); + } + + } + /** * 修改ViewModel Field * @param viewModelId VM ID @@ -381,21 +374,6 @@ export function useFormSchema(): UseFormSchema { } } - /** - * 控件新增绑定添加ViewModel Field - */ - function addViewModelField(viewModelId, filedObject: FormViewModelField) { - if (!viewModelId || !filedObject) { - return; - } - const viewModel = getViewModelById(viewModelId); - - if (!viewModel?.fields.find(fieldItem => fieldItem.id === filedObject.id)) { - viewModel?.fields.push(filedObject); - } - - } - /** * 根据VMID修改ViewModel节点 * @param vmId 视图模型标识 @@ -620,6 +598,19 @@ export function useFormSchema(): UseFormSchema { return [rootVm]; } + + function getRootViewModelId(): string { + if (formSchema.module.viewmodels == null || formSchema.module.viewmodels.length === 0) { + return ROOT_VIEW_MODEL_ID; + } + + if (formSchema.module.viewmodels.find(viewmodel => viewmodel.id === ROOT_VIEW_MODEL_ID)) { + return ROOT_VIEW_MODEL_ID; + + } + + return formSchema.module.viewmodels[0].id; + } /** * 获取ViewModel中远程(VO)上下文变量,构建treetable数据,用于变量绑定的选择窗口 */ @@ -647,7 +638,33 @@ export function useFormSchema(): UseFormSchema { }); return children; } + /** + * ----------------内部方法-------------------------- + * schema中的变量转换为VM上的变量 + * @param schemaVarList 变量列表 + */ + function changeSchemaVariable2VMVariable(schemaVarList: FormSchemaEntityField[]) { + if (!schemaVarList || schemaVarList.length === 0) { + return []; + } + const viewModelVarList: FormVariable[] = []; + schemaVarList.forEach(schemaVarItem => { + const formVariable: FormVariable = { + id: schemaVarItem.id, + code: schemaVarItem.label, + name: schemaVarItem.name, + type: schemaVarItem.type.name, + category: FormVariableCategory.remote + }; + if (schemaVarItem.$type !== 'SimpleField' && schemaVarItem.type.fields) { + formVariable.type = 'Object'; + formVariable.fields = changeSchemaVariable2VMVariable(schemaVarItem.type.fields); + } + viewModelVarList.push(formVariable); + }); + return viewModelVarList; + } /** * 更新远程变量 * @param varList 变量列表 @@ -679,33 +696,7 @@ export function useFormSchema(): UseFormSchema { } } - /** - * ----------------内部方法-------------------------- - * schema中的变量转换为VM上的变量 - * @param schemaVarList 变量列表 - */ - function changeSchemaVariable2VMVariable(schemaVarList: FormSchemaEntityField[]) { - if (!schemaVarList || schemaVarList.length === 0) { - return []; - } - const viewModelVarList: FormVariable[] = []; - schemaVarList.forEach(schemaVarItem => { - const formVariable: FormVariable = { - id: schemaVarItem.id, - code: schemaVarItem.label, - name: schemaVarItem.name, - type: schemaVarItem.type.name, - category: FormVariableCategory.remote - }; - if (schemaVarItem.$type !== 'SimpleField' && schemaVarItem.type.fields) { - formVariable.type = 'Object'; - formVariable.fields = changeSchemaVariable2VMVariable(schemaVarItem.type.fields); - } - viewModelVarList.push(formVariable); - }); - return viewModelVarList; - } /** * 保存变量(全量) * @param states 变量列表 @@ -798,15 +789,31 @@ export function useFormSchema(): UseFormSchema { }); return varArray; } - /** - * 获取指定VM关联的组件中绑定指定字段的控件(目前只有一个控件) - * @param viewModelId VM标识 - * @param fieldId 字段标识 - */ - function getControlsInCmpWidthBinding(viewModelId: string, fieldId: string) { - const foundComponent = formSchema.module.components.find(componentItem => componentItem.viewModel === viewModelId); + function getControlEditorsInTable(tableRows: any[], fieldId: string, devMode: string) { + let controls = [] as any; + if (tableRows && tableRows.length) { + tableRows.forEach(row => { + row.columns.forEach(column => { + if (column.tdType === 'editor' && column.editor && column.editor.binding) { + if (column.editor.binding.type && column.editor.binding.type === FormBindingType.Form && column.editor.binding.field === fieldId) { + controls.push(column.editor); + // 查找与当前单元格同组的文本类单元格TableTd,这种单元格不包含编辑器,但是需要与编辑器同步展示标题,所以放在关联控件里面。 + if (devMode === 'simple' && column.groupId) { + const sameGroupStaticColumns = row.columns.filter(col => col.groupId === column.groupId && col.id !== column.id && !col.invisible && col.tdType === 'staticText'); + if (sameGroupStaticColumns.length) { + controls = controls.concat(sameGroupStaticColumns); + } + } + } - return foundComponent ? getControlsByBinding(foundComponent.contents, fieldId) : []; + } + + + }); + }); + } + + return controls; } /** @@ -833,34 +840,18 @@ export function useFormSchema(): UseFormSchema { return controls; } + /** + * 获取指定VM关联的组件中绑定指定字段的控件(目前只有一个控件) + * @param viewModelId VM标识 + * @param fieldId 字段标识 + */ + function getControlsInCmpWidthBinding(viewModelId: string, fieldId: string) { + const foundComponent = formSchema.module.components.find(componentItem => componentItem.viewModel === viewModelId); - function getControlEditorsInTable(tableRows: any[], fieldId: string, devMode: string) { - let controls = [] as any; - if (tableRows && tableRows.length) { - tableRows.forEach(row => { - row.columns.forEach(column => { - if (column.tdType === 'editor' && column.editor && column.editor.binding) { - if (column.editor.binding.type && column.editor.binding.type === FormBindingType.Form && column.editor.binding.field === fieldId) { - controls.push(column.editor); - // 查找与当前单元格同组的文本类单元格TableTd,这种单元格不包含编辑器,但是需要与编辑器同步展示标题,所以放在关联控件里面。 - if (devMode === 'simple' && column.groupId) { - const sameGroupStaticColumns = row.columns.filter(col => col.groupId === column.groupId && col.id !== column.id && !col.invisible && col.tdType === 'staticText'); - if (sameGroupStaticColumns.length) { - controls = controls.concat(sameGroupStaticColumns); - } - } - } - - } - - - }); - }); - } - - return controls; + return foundComponent ? getControlsByBinding(foundComponent.contents, fieldId) : []; } + /** * 获取节点下所有 components ID 列表 * @param eleContents [] @@ -922,7 +913,39 @@ export function useFormSchema(): UseFormSchema { }); } + /** + * ------------------------------内部方法------------------- + * 根据id遍历查找节点(id支持带有*号的通配符) + * @param rootNode 容器节点 + * @param predict 条件 + */ + function selectNodeByWildcardID(rootNode: any, id: string) { + if (!rootNode || !id) { + return null; + } + let flag = false; + if (id.includes('*')) { + const newId = id.replace('*', ''); + if (rootNode.id.includes(newId)) { + flag = true; + } + } else if (rootNode.id === id) { + flag = true; + } + if (flag) { + return rootNode; + } + if (rootNode.contents) { + for (const item of rootNode.contents) { + const found = selectNodeByWildcardID(item, id); + if (found) { + return found; + } + } + } + return null; + } /** * 根据id路径定位节点 * @param rootNode 根节点 @@ -970,40 +993,6 @@ export function useFormSchema(): UseFormSchema { return null; } - /** - * ------------------------------内部方法------------------- - * 根据id遍历查找节点(id支持带有*号的通配符) - * @param rootNode 容器节点 - * @param predict 条件 - */ - function selectNodeByWildcardID(rootNode: any, id: string) { - if (!rootNode || !id) { - return null; - } - let flag = false; - if (id.includes('*')) { - const newId = id.replace('*', ''); - if (rootNode.id.includes(newId)) { - flag = true; - } - } else if (rootNode.id === id) { - flag = true; - } - - if (flag) { - return rootNode; - } - if (rootNode.contents) { - for (const item of rootNode.contents) { - const found = selectNodeByWildcardID(item, id); - if (found) { - return found; - } - } - } - return null; - } - /** * 获取指定控件id的父节点 * @param rootNode 根组件节点 @@ -1082,7 +1071,6 @@ export function useFormSchema(): UseFormSchema { return null; } - /** * 根据控件所在组件的统一布局配置获取控件样式 * @param componentId 组件Id @@ -1115,6 +1103,35 @@ export function useFormSchema(): UseFormSchema { return colClass + ' ' + colMDClass + ' ' + colXLClass + ' ' + colELClass; } + /** + * ----------------内部方法-------------------------- + * 遍历节点下所有节点 + * @param root 根节点或contents + * @param parentId 父节点id + * @returns + */ + function collectMetadata(root: Node | Node[], parentId?: string | undefined) { + if (Array.isArray(root)) { + root.forEach((node: Node) => { + collectMetadata(node, parentId); + }); + } else { + const { id = null, type = null, contents = null } = root; + if (!id || !type) { + return; + } + root.__parentId__ = parentId; + const typeValue = nodeTypeCollect.get(type) || []; + typeValue.push(root); + nodeTypeCollect.set(type, typeValue); + // const idValue = nodeIdCollect.get(id) || []; + // idValue.push(root); + // nodeIdCollect.set(id, idValue); + if (contents && contents.length > 0) { + collectMetadata(root.contents as Node[], id); + } + } + } /** * 获取所有隐藏帮助 @@ -1159,48 +1176,6 @@ export function useFormSchema(): UseFormSchema { } return result; } - /** - * ----------------内部方法-------------------------- - * 遍历节点下所有节点 - * @param root 根节点或contents - * @param parentId 父节点id - * @returns - */ - function collectMetadata(root: Node | Node[], parentId?: string | undefined) { - if (Array.isArray(root)) { - root.forEach((node: Node) => { - collectMetadata(node, parentId); - }); - } else { - const { id = null, type = null, contents = null } = root; - if (!id || !type) { - return; - } - root.__parentId__ = parentId; - const typeValue = nodeTypeCollect.get(type) || []; - typeValue.push(root); - nodeTypeCollect.set(type, typeValue); - // const idValue = nodeIdCollect.get(id) || []; - // idValue.push(root); - // nodeIdCollect.set(id, idValue); - if (contents && contents.length > 0) { - collectMetadata(root.contents as Node[], id); - } - } - } - - function getRootViewModelId(): string { - if (formSchema.module.viewmodels == null || formSchema.module.viewmodels.length === 0) { - return ROOT_VIEW_MODEL_ID; - } - - if (formSchema.module.viewmodels.find(viewmodel => viewmodel.id === ROOT_VIEW_MODEL_ID)) { - return ROOT_VIEW_MODEL_ID; - - } - - return formSchema.module.viewmodels[0].id; - } /** * 根据指定的类型数组获取组件 diff --git a/packages/ui-vue/components/common/editor/binding-selector/style.ts b/packages/ui-vue/components/common/editor/binding-selector/style.ts deleted file mode 100644 index 8cfc46cd6eb..00000000000 --- a/packages/ui-vue/components/common/editor/binding-selector/style.ts +++ /dev/null @@ -1,6 +0,0 @@ -import "@farris/ui-vue/components/dependent-base/style"; -import "@farris/ui-vue/components/dependent-icon/style"; -import "@farris/ui-vue/components/tree-grid/style"; -import "@farris/ui-vue/components/button-edit/style"; -import "@farris/ui-vue/components/radio/style"; -import "@farris/ui-vue/components/modal/style"; \ No newline at end of file diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts index 28a71ad4834..5ddf8da630f 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts @@ -178,7 +178,7 @@ export function useDesignerComponent( if (contentElement?.componentInstance?.value.onRemoveComponent) { contentElement.componentInstance.value.onRemoveComponent(); } - }) + }); } } diff --git a/packages/ui-vue/components/designer-canvas/src/types.ts b/packages/ui-vue/components/designer-canvas/src/types.ts index 5a1811096b9..703f2a6830e 100644 --- a/packages/ui-vue/components/designer-canvas/src/types.ts +++ b/packages/ui-vue/components/designer-canvas/src/types.ts @@ -59,7 +59,7 @@ export interface DesignerComponentInstance { addNewChildComponentSchema: (resolveContext: ResolveComponentContext, designerHostService?: DesignerHostService) => ComponentSchema; - updateDragAndDropRules: () => void; + updateDragAndDropRules?: () => void; /** 组件在拖拽时是否需要将所属的Component一起拖拽,用于form、data-grid等控件的拖拽 */ triggerBelongedComponentToMoveWhenMoved?: Ref; @@ -74,7 +74,7 @@ export interface DesignerComponentInstance { belongedComponentId?: string; /** 控件删除后事件 */ - onRemoveComponent: () => void + onRemoveComponent?: () => void } diff --git a/packages/ui-vue/components/dynamic-form/src/designer/form-group-use-designer-rules.ts b/packages/ui-vue/components/dynamic-form/src/designer/form-group-use-designer-rules.ts index 659f1903b9f..3055218fe37 100644 --- a/packages/ui-vue/components/dynamic-form/src/designer/form-group-use-designer-rules.ts +++ b/packages/ui-vue/components/dynamic-form/src/designer/form-group-use-designer-rules.ts @@ -17,18 +17,6 @@ export function useDesignerRulesForFormGroup(designItemContext: DesignerItemCont function hideNestedPaddingInDesginerView() { return true; } - /** - * 控件删除后事件 - */ - function onRemoveComponent() { - const schema = designItemContext.schema; - const bindingFieldId = schema.binding && schema.binding.field; - if (bindingFieldId) { - removeBindingFromViewModel(bindingFieldId) - removeExpression(bindingFieldId); - } - } - /** * 若控件有绑定信息,删除控件时需要同步移除viewmodel中的记录 */ @@ -60,6 +48,19 @@ export function useDesignerRulesForFormGroup(designItemContext: DesignerItemCont } } + /** + * 控件删除后事件 + */ + function onRemoveComponent() { + const { schema } = designItemContext; + const bindingFieldId = schema.binding && schema.binding.field; + if (bindingFieldId) { + removeBindingFromViewModel(bindingFieldId); + removeExpression(bindingFieldId); + } + } + + return { canAccepts, checkCanDeleteComponent, @@ -67,4 +68,4 @@ export function useDesignerRulesForFormGroup(designItemContext: DesignerItemCont hideNestedPaddingInDesginerView, onRemoveComponent }; -} \ No newline at end of file +} diff --git a/packages/ui-vue/components/tabs/src/designer/tab-page-use-designer-rules.ts b/packages/ui-vue/components/tabs/src/designer/tab-page-use-designer-rules.ts index f6e75149ed7..0310dc139e0 100644 --- a/packages/ui-vue/components/tabs/src/designer/tab-page-use-designer-rules.ts +++ b/packages/ui-vue/components/tabs/src/designer/tab-page-use-designer-rules.ts @@ -23,8 +23,5 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe return canAccept; } - function onRemoveComponent() { - console.log(designItemContext.schema) - } - return { canAccepts, onRemoveComponent }; + return { canAccepts }; } diff --git a/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts b/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts index b0720c0c8fc..87a7ea1d9ce 100644 --- a/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts +++ b/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts @@ -165,6 +165,20 @@ export function useDesignTabs( payload.stopPropagation(); payload.preventDefault(); } + /** + * 触发tabPage内部控件的删除后事件 + * @param tabId + */ + function removeComponentInTabPage(tabId: string) { + const tabContentElement = designerItemContext.designerItemElementRef.value.querySelector(`.farris-tabs-content`); + const tabPageElement: any = tabContentElement?.querySelector(`#${tabId}-design-item`); + if (tabPageElement?.componentInstance?.value.onRemoveComponent) { + tabPageElement.componentInstance.value.onRemoveComponent(); + } + } + /** + * 设计时,删除标签页事件 + */ function removeDesignTab(payload: MouseEvent, tabId: string) { preventEvent(payload); @@ -183,17 +197,7 @@ export function useDesignTabs( // 触发更新控件树 canvasChanged.value++; } - /** - * 触发tabPage内部控件的删除后事件 - * @param tabId - */ - function removeComponentInTabPage(tabId: string) { - const tabContentElement = designerItemContext.designerItemElementRef.value.querySelector(`.farris-tabs-content`); - const tabPageElement: any = tabContentElement?.querySelector(`#${tabId}-design-item`); - if (tabPageElement?.componentInstance?.value.onRemoveComponent) { - tabPageElement.componentInstance.value.onRemoveComponent(); - } - } + function deactiveElements() { Array.from(document.getElementsByClassName('dgComponentFocused') as HTMLCollectionOf).forEach( (element: HTMLElement) => element.classList.remove('dgComponentFocused') -- Gitee From 0ded78ba007ef4ad8921874c122aa30421359f16 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Wed, 18 Dec 2024 09:53:52 +0800 Subject: [PATCH 029/181] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=A3=80=E6=9F=A5=E5=8F=91=E7=8E=B0=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/designer/use-column-rules.ts | 6 - .../designer-inner-item.component.tsx | 5 +- .../components/designer-item.component.tsx | 2 - .../function/use-designer-component.ts | 8 +- .../function/use-designer-inner-component.ts | 11 +- .../src/composition/function/use-dragula.ts | 1 - .../designer-canvas/src/composition/types.ts | 6 +- .../components/designer-canvas/src/types.ts | 4 +- .../src/composition/use-designer-rules.ts | 178 ------------------ .../src/designer/use-designer-rules.ts | 65 +------ 10 files changed, 15 insertions(+), 271 deletions(-) delete mode 100644 packages/ui-vue/components/list-nav/src/composition/use-designer-rules.ts diff --git a/packages/ui-vue/components/data-grid/src/designer/use-column-rules.ts b/packages/ui-vue/components/data-grid/src/designer/use-column-rules.ts index e739d06309b..9ec484ce806 100644 --- a/packages/ui-vue/components/data-grid/src/designer/use-column-rules.ts +++ b/packages/ui-vue/components/data-grid/src/designer/use-column-rules.ts @@ -41,12 +41,7 @@ export function useDesignerRulesForDataGridColumn(designItemContext: DesignerIte function onAcceptMovedChildElement(sourceElement: DesignerHTMLElement) { } - /** - * 判断data-grid上下文 - */ - function resolveComponentContext() { - } // 构造属性配置方法 function getPropsConfig(componentId: string) { const gridColumnProp = new DataGriColumnProperty(componentId, designerHostService); @@ -60,7 +55,6 @@ export function useDesignerRulesForDataGridColumn(designItemContext: DesignerIte checkCanMoveComponent, hideNestedPaddingInDesginerView, onAcceptMovedChildElement, - resolveComponentContext, triggerBelongedComponentToMoveWhenMoved, triggerBelongedComponentToDeleteWhenDeleted, getPropsConfig diff --git a/packages/ui-vue/components/designer-canvas/src/components/designer-inner-item.component.tsx b/packages/ui-vue/components/designer-canvas/src/components/designer-inner-item.component.tsx index 73ca2237b26..90627402578 100644 --- a/packages/ui-vue/components/designer-canvas/src/components/designer-inner-item.component.tsx +++ b/packages/ui-vue/components/designer-canvas/src/components/designer-inner-item.component.tsx @@ -1,4 +1,4 @@ - + import { Ref, SetupContext, computed, defineComponent, inject, onMounted, provide, ref, watch, onBeforeUnmount, withModifiers } from 'vue'; import { DesignerInnerItemPropsType, designerInnerItemProps } from '../composition/props/designer-inner-item.props'; import { UseDragula } from '../composition/types'; @@ -67,8 +67,7 @@ const FDesignerInnerItem = defineComponent({ `#${nextSchema.id}-design-item` ); parent.schema[contentKey.value].splice(indexToRemove, 1); - parent.componentInstance.value.updateDragAndDropRules(); - // (designerItem as HTMLElement)?.click(); + // 此处删除子组件schame后,会自动选中第一个元素但属性面板不更新,暂时绕过此问题,使用emit removeComponent方式来解决 canvasChanged.value++; context.emit('removeComponent'); diff --git a/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx b/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx index 71a04ecef47..496eb274477 100644 --- a/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx +++ b/packages/ui-vue/components/designer-canvas/src/components/designer-item.component.tsx @@ -87,7 +87,6 @@ const FDesignerItem = defineComponent({ (contentItem: ComponentSchema) => contentItem.id === belongedComponentInstance.schema.id ); belongedComponentInstanceParent.value?.contents?.splice(indexToRemove, 1); - belongedComponentInstanceParent.value?.updateDragAndDropRules(); canvasChanged.value++; } @@ -104,7 +103,6 @@ const FDesignerItem = defineComponent({ if (parentContext && parentContext.schema.contents) { const indexToRemove = parentContext.schema.contents.findIndex(locatePredicate); parentContext.schema.contents.splice(indexToRemove, 1); - parentContext.componentInstance.value.updateDragAndDropRules(); canvasChanged.value++; context.emit('selectionChange'); diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts index 5ddf8da630f..e5e92741db1 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts @@ -1,5 +1,5 @@ -import { inject, Ref, ref } from "vue"; +import { Ref, ref } from "vue"; import { DesignerHostService, DesignerHTMLElement, DraggingResolveContext, UseDesignerRules } from "../types"; import { ComponentSchema, DesignerComponentInstance, DesignerItemContext, ResolveComponentContext } from "../../types"; import { getSchemaByType } from '../../../../dynamic-resolver/src/schema-resolver'; @@ -10,11 +10,6 @@ export function useDesignerComponent( designerRules?: UseDesignerRules ): Ref { - function updateDragAndDropRules() { - designerRules?.resolveComponentContext && designerRules.resolveComponentContext(); - } - updateDragAndDropRules(); - const styles = (designerRules && designerRules.getStyles && designerRules.getStyles()) || ''; const designerClass = (designerRules && designerRules.getDesignerClass && designerRules.getDesignerClass()) || ''; const componentInstance = ref(); @@ -202,7 +197,6 @@ export function useDesignerComponent( onAcceptMovedChildElement, onChildElementMovedOut, addNewChildComponentSchema, - updateDragAndDropRules, triggerBelongedComponentToMoveWhenMoved: !!designerRules && designerRules.triggerBelongedComponentToMoveWhenMoved || ref(false), triggerBelongedComponentToDeleteWhenDeleted: !!designerRules && designerRules.triggerBelongedComponentToDeleteWhenDeleted || ref(false), onRemoveComponent diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component.ts index 8e01dad1219..bcba0569ef2 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component.ts @@ -1,4 +1,4 @@ - + import { inject, Ref, ref } from "vue"; import { DesignerHostService, DesignerHTMLElement, DraggingResolveContext, UseDesignerRules } from "../types"; import { ComponentSchema, DesignerComponentInstance, DesignerItemContext, ResolveComponentContext } from "../../types"; @@ -9,11 +9,6 @@ export function useDesignerInnerComponent( designItemContext: DesignerItemContext, designerRules?: UseDesignerRules ): Ref { - function updateDragAndDropRules() { - designerRules?.resolveComponentContext && designerRules.resolveComponentContext(); - } - updateDragAndDropRules(); - const styles = (designerRules && designerRules.getStyles && designerRules.getStyles()) || ''; const componentInstance = ref(); /** @@ -150,7 +145,9 @@ export function useDesignerInnerComponent( } return []; } + function onRemoveComponent() { + } componentInstance.value = { canMove: checkCanMoveComponent(), canSelectParent: checkCanSelectParentComponent(), @@ -171,7 +168,7 @@ export function useDesignerInnerComponent( onAcceptMovedChildElement, onChildElementMovedOut, addNewChildComponentSchema, - updateDragAndDropRules, + onRemoveComponent, triggerBelongedComponentToMoveWhenMoved: !!designerRules && designerRules.triggerBelongedComponentToMoveWhenMoved || ref(false), triggerBelongedComponentToDeleteWhenDeleted: !!designerRules && designerRules.triggerBelongedComponentToDeleteWhenDeleted || ref(false) } as DesignerComponentInstance; diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts index 53eed276714..6591fae1eda 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts @@ -151,7 +151,6 @@ export function useDragula(designerHostService: DesignerHostService): UseDragula } else { target.componentInstance.value.contents.push(sourceControlSchema); } - target.componentInstance.value.updateDragAndDropRules(); } return index; } diff --git a/packages/ui-vue/components/designer-canvas/src/composition/types.ts b/packages/ui-vue/components/designer-canvas/src/composition/types.ts index c7869fb7fa3..640cd6a5b11 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/types.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/types.ts @@ -88,11 +88,6 @@ export interface UseDesignerRules { */ checkIsInFixedContextRules?(): boolean; - /** - * 判断控件上下文环境,用于后续判断控件是否可移动、可删除、是否有默认间距、线条 - */ - resolveComponentContext?(): void; - getStyles?(): string; getDesignerClass?(): string; @@ -139,5 +134,6 @@ export interface UseDesignerRules { */ triggerBelongedComponentToDeleteWhenDeleted?: Ref; + /** 组件删除后事件 */ onRemoveComponent?(): void; } diff --git a/packages/ui-vue/components/designer-canvas/src/types.ts b/packages/ui-vue/components/designer-canvas/src/types.ts index 703f2a6830e..f089ee2d8ac 100644 --- a/packages/ui-vue/components/designer-canvas/src/types.ts +++ b/packages/ui-vue/components/designer-canvas/src/types.ts @@ -59,8 +59,6 @@ export interface DesignerComponentInstance { addNewChildComponentSchema: (resolveContext: ResolveComponentContext, designerHostService?: DesignerHostService) => ComponentSchema; - updateDragAndDropRules?: () => void; - /** 组件在拖拽时是否需要将所属的Component一起拖拽,用于form、data-grid等控件的拖拽 */ triggerBelongedComponentToMoveWhenMoved?: Ref; @@ -74,7 +72,7 @@ export interface DesignerComponentInstance { belongedComponentId?: string; /** 控件删除后事件 */ - onRemoveComponent?: () => void + onRemoveComponent: () => void } diff --git a/packages/ui-vue/components/list-nav/src/composition/use-designer-rules.ts b/packages/ui-vue/components/list-nav/src/composition/use-designer-rules.ts deleted file mode 100644 index 47542e2d895..00000000000 --- a/packages/ui-vue/components/list-nav/src/composition/use-designer-rules.ts +++ /dev/null @@ -1,178 +0,0 @@ - import { nextTick, ref } from "vue"; -import { DesignerHTMLElement, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { ComponentSchema, ResolveComponentContext } from "../../../designer-canvas/src/types"; -import { getSchemaByType } from "../../../dynamic-resolver/src/schema-resolver"; -import { useDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-drag-drop-rules"; -import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/rule/use-dragula-common-rule"; - -export function useDesignerRules(schema: ComponentSchema, parentSchema?: ComponentSchema): UseDesignerRules { - const dragAndDropRules = useDragAndDropRules(); - /** 组件在拖拽时是否需要将所属的Component一起拖拽 */ - const triggerBelongedComponentToMoveWhenMoved = ref(false); - - /** 组件在删除时需要将所属的Component一起拖拽 */ - const triggerBelongedComponentToDeleteWhenDeleted = ref(false); - - let canAcceptChildContent = true; - - let hideNestedPadding = false; - - let schemaContext: any; - - let isInFixedContextRules = false; - - /** - * 用container表示的form组件,只接收form-group输入类控件 - */ - function checkFormContainerAcceptable(draggingContext: DraggingResolveContext) { - - if (schemaContext && schemaContext.componentClassList && schemaContext.componentClassList.includes('f-form-layout') && schemaContext.componentClassList.includes('farris-form')) { - // 从工具箱拖入的输入类控件 - if (draggingContext.sourceType === 'control' && draggingContext.controlCategory === 'input') { - return true; - } - - // 画布中移动位置的输入类控件 - if (draggingContext.sourceType === 'move' && draggingContext.controlType === 'form-group') { - return true; - } - return false; - } - return true; - } - - /** - * 判断是否可以接收拖拽新增的子级控件 - */ - function canAccepts(draggingContext: DraggingResolveContext): boolean { - - const basalRule = useDragulaCommonRule().basalDragulaRuleForContainer(draggingContext); - if (!basalRule) { - return false; - } - if (!canAcceptChildContent) { - return false; - } - - if (!checkFormContainerAcceptable(draggingContext)) { - return false; - } - return true; - } - - /** - * 判断当前容器的上下文 - */ - function resolveComponentContext() { - triggerBelongedComponentToMoveWhenMoved.value = false; - triggerBelongedComponentToDeleteWhenDeleted.value = false; - const component = schema; - - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' '); - - // 子级节点 - const childContents = component.contents || []; - const firstChildContent = childContents.length ? childContents[0] : null; - const firstChildClass = firstChildContent && firstChildContent.appearance ? firstChildContent.appearance.class : ''; - const firstChildClassList = firstChildClass ? firstChildClass.split(' ') : []; - const childrenClassList = childContents.length ? childContents.reduce((classList: string[], childComponentSchema: ComponentSchema) => { - const childCompoentClass = childComponentSchema && childComponentSchema.appearance ? childComponentSchema.appearance.class : ''; - const childCompoentClassList = childCompoentClass ? childCompoentClass.split(' ') : []; - classList.push(...childCompoentClassList); - return classList; - }, []) : []; - - // 父级节点 - const parent = parentSchema; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - schemaContext = { - componentClass, - componentClassList, - childContents, - firstChildContent, - firstChildClass, - firstChildClassList, - parent, - parentClass, - parentClassList, - children: childContents, - childrenClassList - }; - - const { canAccept, fixed, hidePadding } = dragAndDropRules.getRuleValue(componentClassList[0], schemaContext); - canAcceptChildContent = canAccept; - hideNestedPadding = hidePadding; - isInFixedContextRules = fixed; - return true; - } - - function onAcceptMovedChildElement(sourceElement: DesignerHTMLElement) { - nextTick(); - } - - function getStyles() { - const component = schema; - if (component.componentType) { - return 'display:inherit;flex-direction:inherit;margin-bottom:10px'; - } - return ''; - } - - function onResolveNewComponentSchema(resolveContext: ResolveComponentContext, compnentSchema: ComponentSchema): ComponentSchema { - const component = schema; - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' ') as string[]; - if (componentClassList.includes('f-form-layout')) { - const { label } = resolveContext; - const formGroupElementSchema = getSchemaByType('form-group') as ComponentSchema; - formGroupElementSchema.editor = compnentSchema; - formGroupElementSchema.label = label; - return formGroupElementSchema; - } - return compnentSchema; - } - - function onAcceptNewChildElement(element: DesignerHTMLElement, targetPosition: number, compnentSchema: ComponentSchema): ComponentSchema { - const component = schema; - // 控件本身样式 - const componentClass = component.appearance && component.appearance.class || ''; - const componentClassList = componentClass.split(' ') as string[]; - if (componentClassList.includes('f-form-layout')) { - const label = String(element.innerText); - const formGroupElementSchema = getSchemaByType('form-group') as ComponentSchema; - formGroupElementSchema.editor = compnentSchema; - formGroupElementSchema.label = label; - return formGroupElementSchema; - } - return compnentSchema; - } - - function checkCanMoveComponent() { - return !isInFixedContextRules; - } - function checkCanDeleteComponent() { - return !isInFixedContextRules; - } - - function hideNestedPaddingInDesginerView() { - return hideNestedPadding; - } - - return { - canAccepts, - resolveComponentContext, - getStyles, - onAcceptMovedChildElement, - onResolveNewComponentSchema, - triggerBelongedComponentToMoveWhenMoved, - triggerBelongedComponentToDeleteWhenDeleted, - checkCanMoveComponent, - checkCanDeleteComponent, - hideNestedPaddingInDesginerView - }; -} diff --git a/packages/ui-vue/components/tree-grid/src/designer/use-designer-rules.ts b/packages/ui-vue/components/tree-grid/src/designer/use-designer-rules.ts index 1a5a3d87f4a..9eaabac0152 100644 --- a/packages/ui-vue/components/tree-grid/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/tree-grid/src/designer/use-designer-rules.ts @@ -1,8 +1,7 @@ - - + + import { ref } from "vue"; -// import { useDesignerRules } from "../../../component/src/designer/use-designer-rules"; -import { DraggingResolveContext, DesignerHTMLElement, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; +import { DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; import { TreeGridProperty } from "../property-config/tree-grid.property-config"; @@ -12,8 +11,6 @@ export function useDesignerRulesForTreeGrid(designItemContext: DesignerItemConte const triggerBelongedComponentToMoveWhenMoved = ref(true); /** 组件在删除时需要将所属的Component一起拖拽 */ const triggerBelongedComponentToDeleteWhenDeleted = ref(true); - /** data-grid所属的上级组件控制规则 */ - // let belongedComponentRules: UseDesignerRules; /** * 判断是否可以接收拖拽新增的子级控件 @@ -27,73 +24,25 @@ export function useDesignerRulesForTreeGrid(designItemContext: DesignerItemConte } /** - * data-grid是否支持删除,取决于所属组件是否支持删除 + * tree-grid不支持删除,需要选中所属组件Component节点删除。 */ function checkCanDeleteComponent() { return false; - // if (belongedComponentRules && belongedComponentRules.checkCanDeleteComponent) { - // return belongedComponentRules.checkCanDeleteComponent(); - // } - // return true; } /** - * data-grid是否支持移动,取决于所属组件是否支持移动 + * tree-grid不支持移动,需要选中所属组件Component节点移动。 */ function checkCanMoveComponent() { return false; - // if (belongedComponentRules && belongedComponentRules.checkCanMoveComponent) { - // return belongedComponentRules.checkCanMoveComponent(); - // } - // return true; } function hideNestedPaddingInDesginerView() { return true; } - function onAcceptMovedChildElement(sourceElement: DesignerHTMLElement) { - } - /** - * data-grid上级中type='component'的控件,即为data-grid所属的组件 + * 构造属性配置方法 */ - function getBelongedComponentSchema(cmpSchema?: ComponentSchema, cmpContext?: DesignerItemContext): { cmpSchema: ComponentSchema | null; cmpParentSchema: ComponentSchema | null } | null { - if (!cmpSchema || !cmpContext) { - return null; - } - if (cmpSchema.type === 'component') { - return { - cmpSchema, - cmpParentSchema: cmpContext?.parent?.schema || null - }; - } - const grandParent = getBelongedComponentSchema(cmpContext?.parent?.schema, cmpContext?.parent); - if (grandParent) { - return grandParent; - } - return null; - } - - /** - * 获取data-grid所属的组件控制规则 - */ - // function getBelongedComponentContext() { - // const belongedCmp = getBelongedComponentSchema(schema, designItemContext); - // if (belongedCmp && belongedCmp.cmpSchema && belongedCmp.cmpParentSchema) { - // belongedComponentRules = useDesignerRules(belongedCmp.cmpSchema, belongedCmp.cmpParentSchema); - // if (belongedComponentRules && belongedComponentRules.resolveComponentContext) { - // belongedComponentRules.resolveComponentContext(); - // } - // } - // } - - /** - * 判断data-grid上下文 - */ - function resolveComponentContext() { - // getBelongedComponentContext(); - } - // 构造属性配置方法 function getPropsConfig(componentId: string) { const dataGridProp = new TreeGridProperty(componentId, designerHostService); @@ -105,8 +54,6 @@ export function useDesignerRulesForTreeGrid(designItemContext: DesignerItemConte checkCanDeleteComponent, checkCanMoveComponent, hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, - resolveComponentContext, triggerBelongedComponentToMoveWhenMoved, triggerBelongedComponentToDeleteWhenDeleted, getPropsConfig -- Gitee From c6181f62ae05fec9c1ab42fcec801740d793f403 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Thu, 19 Dec 2024 11:40:19 +0800 Subject: [PATCH 030/181] =?UTF-8?q?feature:=20=E6=A0=87=E7=AD=BE=E9=A1=B5?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=96=B0=E5=A2=9E=E5=B7=A5=E5=85=B7=E6=A0=8F?= =?UTF-8?q?=EF=BC=9B=E6=A0=87=E7=AD=BE=E9=A1=B5=E5=B7=A5=E5=85=B7=E6=A0=8F?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=96=B0=E5=A2=9E=E3=80=81=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer-inner-item.component.tsx | 9 +- .../function/use-designer-component.ts | 2 +- .../function/use-designer-inner-component.ts | 2 +- .../src/property-config-resolver.ts | 6 +- .../dynamic-resolver/src/schema-resolver.ts | 10 +- .../response-toolbar.design.component.tsx | 10 +- .../components/tabs/src/composition/types.ts | 9 +- .../designer/tab-header.design.component.tsx | 29 +--- .../designer/tab-toolbar.design.component.tsx | 32 ++-- .../tabs/src/designer/tabs-use-design.ts | 139 +++++++++++++----- .../src/designer/tabs.design.component.tsx | 14 +- .../src/schema/tab-toolbar-item.schema.json | 4 +- 12 files changed, 169 insertions(+), 97 deletions(-) diff --git a/packages/ui-vue/components/designer-canvas/src/components/designer-inner-item.component.tsx b/packages/ui-vue/components/designer-canvas/src/components/designer-inner-item.component.tsx index 90627402578..3bf52e84d14 100644 --- a/packages/ui-vue/components/designer-canvas/src/components/designer-inner-item.component.tsx +++ b/packages/ui-vue/components/designer-canvas/src/components/designer-inner-item.component.tsx @@ -153,7 +153,7 @@ const FDesignerInnerItem = defineComponent({ } ); - function updatePositionOfButtonGroup(e: Event) { + function updatePositionOfButtonGroup(e: Event | any) { const targetEl = e.target as any; setPositionOfButtonGroup(targetEl); } @@ -211,6 +211,7 @@ const FDesignerInnerItem = defineComponent({ payload.preventDefault(); payload.stopPropagation(); } + let draggabledesignerItemElementRef: any = designItemContext.designerItemElementRef; const designerItemElement = designerItemElementRef.value as HTMLElement; if (designerItemElement) { const currentSelectedElements = document.getElementsByClassName('dgComponentSelected') as HTMLCollectionOf; @@ -224,14 +225,16 @@ const FDesignerInnerItem = defineComponent({ designerItemElement.classList.add('dgComponentFocused'); context.emit('selectionChange', schema.value.type, schema.value, props.componentId, componentInstance.value); - const draggabledesignerItemElementRef = componentInstance.value.getDraggableDesignItemElement(designItemContext); + draggabledesignerItemElementRef = componentInstance.value.getDraggableDesignItemElement(designItemContext); if (draggabledesignerItemElementRef && draggabledesignerItemElementRef.value) { draggabledesignerItemElementRef.value.classList.add('dgComponentSelected'); } } } - canvasChanged.value++; + // canvasChanged.value++; + updatePositionOfButtonGroup({ target: draggabledesignerItemElementRef?.value }); + } return () => { diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts index e5e92741db1..66aadd32df2 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts @@ -131,7 +131,7 @@ export function useDesignerComponent( componentSchema = designerRules.onResolveNewComponentSchema(resolveContext, componentSchema); } - const typePrefix = componentType.toLowerCase().replace('-', '_'); + const typePrefix = componentType.toLowerCase().replace(/-/g, '_'); if (componentSchema && !componentSchema.id && componentSchema.type === componentType) { componentSchema.id = `${typePrefix}_${Math.random().toString().slice(2, 6)}`; } diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component.ts index bcba0569ef2..c3d7c1f4eeb 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component.ts @@ -123,7 +123,7 @@ export function useDesignerInnerComponent( componentSchema = designerRules.onResolveNewComponentSchema(resolveContext, componentSchema); } - const typePrefix = componentType.toLowerCase().replace('-', '_'); + const typePrefix = componentType.toLowerCase().replace(/-/g, '_'); if (componentSchema && !componentSchema.id && componentSchema.type === componentType) { componentSchema.id = `${typePrefix}_${Math.random().toString().slice(2, 6)}`; } diff --git a/packages/ui-vue/components/dynamic-resolver/src/property-config-resolver.ts b/packages/ui-vue/components/dynamic-resolver/src/property-config-resolver.ts index a0eedb811a2..9d0e559e2b3 100644 --- a/packages/ui-vue/components/dynamic-resolver/src/property-config-resolver.ts +++ b/packages/ui-vue/components/dynamic-resolver/src/property-config-resolver.ts @@ -1,4 +1,4 @@ - + import { computed, ref } from "vue"; import { EffectFunction, PropertyConverter, SchemaService } from './types'; import { EditorConfig } from "../../dynamic-form"; @@ -122,7 +122,7 @@ function getPropertyEntities( const propertyName = propertySchema.title; const propertyType = propertySchema.type; const defaultEditor = propertyEditorMap.get(propertyType) || { type: 'input-group', enableClear: false }; - const editor = propertySchema.editor ? Object.assign({}, defaultEditor, propertySchema.editor) as EditorConfig : Object.assign({},defaultEditor); + const editor = propertySchema.editor ? Object.assign({}, defaultEditor, propertySchema.editor) as EditorConfig : Object.assign({}, defaultEditor); const visible = isVisible(propertySchemaKeys, propertySchema, propertyConfigMap); const readonly = isReadonly(propertySchemaKeys, propertySchema, propertyConfigMap); editor.readonly = readonly(); @@ -213,7 +213,7 @@ function getPropertyConfigBySchema(rawSchema: ComponentSchema, schemaService: Sc // 先从ConfigMap中取简单类属性,若找不到,则在控件实例中取复杂属性 let propertyConfigSchema = propertyConfig || propertyConfigSchemaMap[schemaType]; - if (Object.keys(propertyConfigSchema).length === 0 && designerItem && designerItem.getPropConfig) { + if (propertyConfigSchema && Object.keys(propertyConfigSchema).length === 0 && designerItem && designerItem.getPropConfig) { propertyConfigSchema = designerItem.getPropConfig(componentId); } if (propertyConfigSchema && propertyConfigSchema.categories) { diff --git a/packages/ui-vue/components/dynamic-resolver/src/schema-resolver.ts b/packages/ui-vue/components/dynamic-resolver/src/schema-resolver.ts index be005ce48bd..c180f907ed9 100644 --- a/packages/ui-vue/components/dynamic-resolver/src/schema-resolver.ts +++ b/packages/ui-vue/components/dynamic-resolver/src/schema-resolver.ts @@ -16,7 +16,8 @@ function getSchemaValueByDefault(defaultSchema: Record): Record item === 'id'))) { - resolvedSchema.id = `${title}-${Date.now()}`; + const typePrefix = title.toLowerCase().replace(/-/g, '_'); + resolvedSchema.id = `${typePrefix}_${Math.random().toString().slice(2, 6)}`; } return resolvedSchema; } @@ -84,8 +85,11 @@ function resolveSchemaToProps( function resolveSchemaWithDefaultValue(schemaValue: Record): Record { const componentType = schemaValue.type; if (componentType) { - const defaulSchema = schemaMap[componentType]; - const resolvedSchema = resolveSchema(schemaValue, defaulSchema); + const defaultSchema = schemaMap[componentType]; + if (!defaultSchema) { + return schemaValue; + } + const resolvedSchema = resolveSchema(schemaValue, defaultSchema); const editorType = schemaValue.editor?.type || ''; /* 解决schemeValue结构如下图场景,在editor下,获取不到date-picker类型的默认值的问题 * {type:'input-group',...,editor:{type:'date-picker',...}} diff --git a/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar.design.component.tsx b/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar.design.component.tsx index fec0b0464a4..b4a01494136 100644 --- a/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar.design.component.tsx +++ b/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar.design.component.tsx @@ -1,4 +1,4 @@ - + import { computed, defineComponent, ref, onMounted, onUnmounted, watch, inject } from 'vue'; import { useDesignerInnerComponent } from '@farris/ui-vue/components/designer-canvas'; import { ResponseToolbarDesignProps, responseToolbarDesignProps } from '../response-toolbar.props'; @@ -256,7 +256,7 @@ export default defineComponent({ availableSpace -= moreElementWidth; } const toolbarItemElements = allElements.filter((element: Element) => element.id !== '__more_buttons__'); - + for (const toolbarItem of toolbarItemElements) { const marginLeft = (toolbarItem as any).computedStyleMap().get('margin-left') as any; const marginRight = (toolbarItem as any).computedStyleMap().get('margin-right') as any; @@ -345,6 +345,8 @@ export default defineComponent({ const item = resizedContent.value.querySelector('.dgComponentFocused.dgComponentSelected'); item?.classList.remove('dgComponentSelected'); item?.classList.remove('dgComponentFocused'); + + updateToolbarItems(); } return () => { @@ -372,9 +374,6 @@ export default defineComponent({ onSelectionChange={onSelectionChange} onRemoveComponent={onRemoveComponent} > - {/* {item.children && item.children.length > 0 - ? renderToolbarDropdown(item as ResponseToolbarDropDownItem) - : renderToolbarButton(item as ResponseToolbarItem)} */} ; })} - {/* {shouldShowDefaultDropdown.value && renderToolbarDropdown(defaultDropdown.value)} */}
diff --git a/packages/ui-vue/components/tabs/src/composition/types.ts b/packages/ui-vue/components/tabs/src/composition/types.ts index 9d498eb943f..820d4ef276e 100644 --- a/packages/ui-vue/components/tabs/src/composition/types.ts +++ b/packages/ui-vue/components/tabs/src/composition/types.ts @@ -81,9 +81,16 @@ export interface UseDesignTabs { toolbarItems: Ref; removeDesignTab: (payload: MouseEvent, tabId: string) => void; selectDesignTab: (payload: MouseEvent, tabId: string, componentInstance: DesignerComponentInstance) => void; - selectDesignTabToolbar: (payload: MouseEvent, tabId: string) => void; toolbarSchema: Ref; + changeToolbarItems: () => void; + + addTabPageToolbar: (payload: MouseEvent, tabId: string) => void; + + listenTabNavElementScroll: () => void; + + setHorizontalScrollbarPosition: () => void; + } export interface UseNav { diff --git a/packages/ui-vue/components/tabs/src/designer/tab-header.design.component.tsx b/packages/ui-vue/components/tabs/src/designer/tab-header.design.component.tsx index 6da559d01bc..a8ac00cba55 100644 --- a/packages/ui-vue/components/tabs/src/designer/tab-header.design.component.tsx +++ b/packages/ui-vue/components/tabs/src/designer/tab-header.design.component.tsx @@ -1,4 +1,4 @@ - + import { Ref, ShallowRef, computed } from "vue"; import { TabsProps } from "../tabs.props"; import { TabPageContext, UseDesignTabs, UseNav, UseOnePage, UseTabs } from "../composition/types"; @@ -56,31 +56,16 @@ export default function ( } as Record; return styleObject; }); - function addNewChildComponentSchema(resolveContext: ResolveComponentContext) { - const { componentType } = resolveContext; - let componentSchema = getSchemaByType(componentType, resolveContext) as ComponentSchema; - if (designerRulesComposition && designerRulesComposition.onResolveNewComponentSchema) { - componentSchema = designerRulesComposition.onResolveNewComponentSchema(resolveContext, componentSchema); - } - const typePrefix = componentType.toLowerCase().replace('-', '_'); - if (componentSchema && !componentSchema.id && componentSchema.type === componentType) { - componentSchema.id = `${typePrefix}_${Math.random().toString().slice(2, 6)}`; - } - return componentSchema; - } const onAddItemClick = function (event: any) { - const resolveContext = { - componentType: 'tab-page', - label: 'Tab1', - parentComponentInstance: componentInstance.value, - targetPosition: -1 - } as ResolveComponentContext; - const childComponentSchema = addNewChildComponentSchema(resolveContext); - componentInstance.value.schema.contents?.push(childComponentSchema); + const tabPageSchema = getSchemaByType('tab-page') as ComponentSchema; + tabPageSchema.id = `tab_page_${Math.random().toString().slice(2, 6)}`; + componentInstance.value.schema.contents?.push(tabPageSchema); + const { selectTabByTabId } = useTabsComposition; - selectTabByTabId(childComponentSchema.id); + selectTabByTabId(tabPageSchema.id); }; + return () => { return (
diff --git a/packages/ui-vue/components/tabs/src/designer/tab-toolbar.design.component.tsx b/packages/ui-vue/components/tabs/src/designer/tab-toolbar.design.component.tsx index 1e85531a453..1f497a2692e 100644 --- a/packages/ui-vue/components/tabs/src/designer/tab-toolbar.design.component.tsx +++ b/packages/ui-vue/components/tabs/src/designer/tab-toolbar.design.component.tsx @@ -1,5 +1,5 @@ - -import { Ref } from 'vue'; + +import { Ref, watch } from 'vue'; import { DesignerComponentInstance, DesignerItemContext } from '../../../designer-canvas/src/types'; import FResponseToolbarDesign from '../../../response-toolbar/src/designer/response-toolbar.design.component'; import { UseDesignTabs } from '../composition/types'; @@ -11,20 +11,34 @@ export default function ( componentInstance: Ref, designerRulesComposition: UseDesignerRules, designerItemContext: DesignerItemContext, - tabComponentId:string + tabComponentId: string ) { - const { toolbarItems, toolbarSchema } = useTabsComposition; + const { toolbarItems, toolbarSchema, changeToolbarItems } = useTabsComposition; + /** + * 选中单个按钮事件 + */ function onSelectionChange(schemaType: string, schemaValue: any, componentId: string, componentInstance: any) { - designerItemContext.setupContext?.emit('selectionChange', schemaType, schemaValue,componentId,componentInstance); + designerItemContext.setupContext?.emit('selectionChange', schemaType, schemaValue, componentId, componentInstance); + } + /** + * 工具栏新增按钮后事件 + */ + function onAddComponent() { + changeToolbarItems(); } return (
-
+
+ onSelectionChange={onSelectionChange} + componentId={tabComponentId} + onAddComponent={onAddComponent}>
diff --git a/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts b/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts index 790b4726bfe..512a362270c 100644 --- a/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts +++ b/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts @@ -18,6 +18,7 @@ import { TabsProps } from '../tabs.props'; import { TabPageContext, UseDesignTabs } from '../composition/types'; import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from '../../../designer-canvas/src/types'; import { canvasChanged } from '../../../designer-canvas/src/composition/designer-canvas-changed'; +import { getSchemaByType } from '../../../dynamic-resolver/src/schema-resolver'; export function useDesignTabs( props: TabsProps, @@ -99,6 +100,9 @@ export function useDesignTabs( }); }); } + /** + * 切换标签页按钮时,更新页面的渲染内容 + */ function changeToolbarItems() { const activePage = tabPages.value.find((tabPageContext: TabPageContext) => tabPageContext.props.id === activeId.value); toolbarItems.value = []; @@ -215,55 +219,119 @@ export function useDesignTabs( const tabPage = contents[index]; designerItemContext?.setupContext?.emit('selectionChange', tabPage.type, tabPage, props.componentId, componentInstance); } + + /** + * 判断页签是否在可视化区域内 + * @param navEle 单个标签页nav div + * @param navTabsEle 整个标签页nav div的父级 + */ + function isNavElementInViewport(navEle: HTMLElement, navTabsEle: HTMLElement) { + + const container = navTabsEle.getBoundingClientRect(); + const box = navEle.getBoundingClientRect(); + + const isRightInView = (box.left + box.width) <= (container.left + container.width) + + const isLeftInView = (box.left + box.width) >= container.left; + + return isRightInView && isLeftInView; + } + /** + * 计算工具栏位置 + * @param tabNavEle 工具栏父级 + */ + function setPositionOfBtnGroupInHeader(tabNavEle: HTMLElement) { + const toolbar = tabNavEle.querySelector('.component-btn-group') as HTMLElement; + if (toolbar) { + toolbar.style.display = ''; + const p = toolbar.getBoundingClientRect(); + const divElement = toolbar.querySelector('div'); + if (divElement) { + divElement.style.left = (p.left - 26) + 'px'; + } + } + } + /** + * 横向滚动滚动条时计算工具栏位置 + * @param element 监听滚动的元素 + */ + function listenTabNavElementScroll() { + if (tabNavigationElementRef && tabNavigationElementRef.value) { + tabNavigationElementRef.value.addEventListener('scroll', (e) => { + const selectElement = (e.target as any).querySelector('.dgComponentSelected'); + if (selectElement) { + const toolbar = selectElement.querySelector('.component-btn-group'); + if (isNavElementInViewport(selectElement, e.target)) { + setPositionOfBtnGroupInHeader(selectElement); + } else { + if (toolbar) { + toolbar.style.display = 'none'; + } + } + } + }); + } + + } + /** + * 选中单个页签事件 + */ function selectDesignTab(payload: MouseEvent, tabId: string, componentInstance: DesignerComponentInstance) { deactiveElements(); preventEvent(payload); activeEventElement(payload); emitSelectionChange(tabId, componentInstance); - } - function selectDesignTabToolbar(payload: MouseEvent, tabId: string) { - deactiveElements(); - preventEvent(payload); - activeEventElement(payload); - // const { contents = [] } = designerItemContext.schema; - // const index = contents?.findIndex((schema: ComponentSchema) => schema.id === tabId); - // if (index === -1) { - // return; - // } - // const tabPage = contents[index]; - // const { toolbar = {} } = tabPage; - // const { id: toolbarId, type = null } = toolbar; - // if (!toolbarId) { - // return; - // } - // designerItemContext?.setupContext?.emit('selectionChange', 'response-toolbar', toolbar); + + // 计算操作按钮位置 + const currentTarget = payload.currentTarget as HTMLElement; + setPositionOfBtnGroupInHeader(currentTarget) } + /** + * 标签页新增工具栏 + */ function addTabPageToolbar(payload: MouseEvent, tabId: string) { preventEvent(payload); const tabs = designerItemContext.schema.contents; const tabPage = tabs?.find((schema: ComponentSchema) => schema.id === tabId); if (!tabPage) { - return; } - if (!tabPage.toolbar) { - tabPage.toolbar = {}; + if (!tabPage.toolbar || !tabPage.toolbar.buttons) { + tabPage.toolbar = { buttons: [] }; } - if (!tabPage.toolbar.buttons) { - tabPage.toolbar.buttons = []; - } - tabPage.toolbar.buttons.push({ - "id": "fybxdmx2AddButton3333", - "type": "tab-toolbar-item", - "text": "新增", - "disabled": false, - "appearance": { - "class": "btn btn-secondary f-btn-ml" - } - - + + const tabToolbarItemSchema = getSchemaByType('tab-toolbar-item') as ComponentSchema; + tabToolbarItemSchema.id = `tab_toolbar_item_${Math.random().toString().slice(2, 6)}`; + tabToolbarItemSchema.appearance = { class: 'btn btn-secondary f-btn-ml' }; + + tabPage.toolbar.buttons.push(tabToolbarItemSchema); + + toolbarItems.value = [...tabPage.toolbar.buttons]; + toolbarSchema.value = tabPage.toolbar; + + nextTick(() => { + setHorizontalScrollbarPosition(); }) + + } + /** + * 设置横向滚动条位置 + */ + function setHorizontalScrollbarPosition() { + if (tabNavigationElementRef && tabNavigationElementRef.value) { + const targetNavEle = tabNavigationElementRef.value.querySelector('.f-state-active'); + if (targetNavEle) { + // 设置横向滚动条位置 + const targetNavEleRect = targetNavEle.getBoundingClientRect(); + const containerEleRect = targetNavEle.parentElement.getBoundingClientRect(); + tabNavigationElementRef.value.scrollLeft = targetNavEleRect.left - containerEleRect.left; + + // 计算工具栏位置 + setPositionOfBtnGroupInHeader(targetNavEle); + } + } + } return { activeId, @@ -277,9 +345,10 @@ export function useDesignTabs( toolbarItems, removeDesignTab, selectDesignTab, - selectDesignTabToolbar, toolbarSchema, changeToolbarItems, - addTabPageToolbar + addTabPageToolbar, + listenTabNavElementScroll, + setHorizontalScrollbarPosition }; } diff --git a/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx b/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx index 19bfee4b230..40020fa41e8 100644 --- a/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx +++ b/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx @@ -1,5 +1,5 @@ /* eslint-disable no-unsafe-optional-chaining */ - + /** * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd. * @@ -43,12 +43,11 @@ export default defineComponent({ const designerRulesComposition = useDesignerRules(designItemContext, designerHostService); const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); const tabType = ref(props.tabType); - // const tabsElement = shallowRef(); // 标题Ul元素 const tabNavigationElementRef = shallowRef(); const tabContentElementRef = shallowRef(); const useTabsComposition = useDesignTabs(props, context, tabNavigationElementRef, designItemContext); - const { activeId, changeTitleStyle, tabPages, addTab, updateTab, selectTabByTabId, toolbarItems, changeToolbarItems } = useTabsComposition; + const { activeId, changeTitleStyle, tabPages, addTab, updateTab, selectTabByTabId, toolbarItems, listenTabNavElementScroll } = useTabsComposition; const useOnePageComposition = useOnePage(props, tabContentElementRef, useTabsComposition); @@ -164,6 +163,7 @@ export default defineComponent({ window.addEventListener('resize', () => { updateNavigationLayout(); }); + listenTabNavElementScroll(); elementRef.value.componentInstance = componentInstance; }); @@ -226,14 +226,6 @@ export default defineComponent({ } context.expose(componentInstance.value); - // function rebuild() { - // // selectTabByTabId(activeId.value); - // // reload.value++; - // } - // componentInstance.value['rebuild'] = rebuild; - - // const reload = ref(0); - componentInstance.value['changeToolbarItems'] = changeToolbarItems; return () => { return (
diff --git a/packages/ui-vue/components/tabs/src/schema/tab-toolbar-item.schema.json b/packages/ui-vue/components/tabs/src/schema/tab-toolbar-item.schema.json index 56f9a38a324..35f61c2cd38 100644 --- a/packages/ui-vue/components/tabs/src/schema/tab-toolbar-item.schema.json +++ b/packages/ui-vue/components/tabs/src/schema/tab-toolbar-item.schema.json @@ -28,9 +28,9 @@ "default": {} }, "text": { - "description": "文本", + "description": "按钮", "type": "string", - "default": "" + "default": "按钮" }, "icon": { "description": "图标", -- Gitee From 4b63c56de05bd71eacbf56aed96b3d8ea3fd024d Mon Sep 17 00:00:00 2001 From: wang-xh Date: Thu, 19 Dec 2024 11:47:30 +0800 Subject: [PATCH 031/181] =?UTF-8?q?feature:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=A3=80=E6=9F=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tabs/src/designer/tabs-use-design.ts | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts b/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts index 512a362270c..858b76ab4d6 100644 --- a/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts +++ b/packages/ui-vue/components/tabs/src/designer/tabs-use-design.ts @@ -230,7 +230,7 @@ export function useDesignTabs( const container = navTabsEle.getBoundingClientRect(); const box = navEle.getBoundingClientRect(); - const isRightInView = (box.left + box.width) <= (container.left + container.width) + const isRightInView = (box.left + box.width) <= (container.left + container.width); const isLeftInView = (box.left + box.width) >= container.left; @@ -284,9 +284,26 @@ export function useDesignTabs( // 计算操作按钮位置 const currentTarget = payload.currentTarget as HTMLElement; - setPositionOfBtnGroupInHeader(currentTarget) + setPositionOfBtnGroupInHeader(currentTarget); } + /** + * 设置横向滚动条位置 + */ + function setHorizontalScrollbarPosition() { + if (tabNavigationElementRef && tabNavigationElementRef.value) { + const targetNavEle = tabNavigationElementRef.value.querySelector('.f-state-active'); + if (targetNavEle) { + // 设置横向滚动条位置 + const targetNavEleRect = targetNavEle.getBoundingClientRect(); + const containerEleRect = targetNavEle.parentElement.getBoundingClientRect(); + tabNavigationElementRef.value.scrollLeft = targetNavEleRect.left - containerEleRect.left; + // 计算工具栏位置 + setPositionOfBtnGroupInHeader(targetNavEle); + } + } + + } /** * 标签页新增工具栏 */ @@ -312,27 +329,10 @@ export function useDesignTabs( nextTick(() => { setHorizontalScrollbarPosition(); - }) + }); } - /** - * 设置横向滚动条位置 - */ - function setHorizontalScrollbarPosition() { - if (tabNavigationElementRef && tabNavigationElementRef.value) { - const targetNavEle = tabNavigationElementRef.value.querySelector('.f-state-active'); - if (targetNavEle) { - // 设置横向滚动条位置 - const targetNavEleRect = targetNavEle.getBoundingClientRect(); - const containerEleRect = targetNavEle.parentElement.getBoundingClientRect(); - tabNavigationElementRef.value.scrollLeft = targetNavEleRect.left - containerEleRect.left; - - // 计算工具栏位置 - setPositionOfBtnGroupInHeader(targetNavEle); - } - } - } return { activeId, addTab, -- Gitee From b162131ed4cd9a29fb5e3953f45558f187ba7fa7 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Thu, 19 Dec 2024 15:17:16 +0800 Subject: [PATCH 032/181] =?UTF-8?q?feature:=20=E6=8B=96=E6=8B=BD=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E6=97=B6=EF=BC=8C=E8=87=AA=E5=8A=A8=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?tab=E6=96=B0=E5=A2=9E=E5=88=A0=E9=99=A4=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-grid-component-creator.service.ts | 44 +++++-------------- .../designer-inner-item.component.tsx | 2 - .../src/designer/tabs.design.component.tsx | 10 ++++- 3 files changed, 19 insertions(+), 37 deletions(-) diff --git a/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts b/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts index 5b450976db8..8d9eee24b75 100644 --- a/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts +++ b/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts @@ -44,11 +44,11 @@ export class DataGridComponentCreatorService { * @returns */ private wrapContainerSectionForComponent(componentRefNode: any, buildInfo: ComponentBuildInfo) { - const allowedParentContainer = [DgControl['content-container'].type, DgControl['response-layout-item'].type, DgControl['splitter-pane'].type]; - const parentContainerType = buildInfo?.parentComponentInstance?.schema?.type; - if (parentContainerType && allowedParentContainer.includes(parentContainerType)) { - // jumphere by sagi + + // 1、将表格拖入无标题的目标区域,需要给表格追加Section容器。并给Section添加新增删除按钮 + const parentContainerWithoutTitle = [DgControl['content-container'].type, DgControl['response-layout-item'].type, DgControl['splitter-pane'].type]; + if (parentContainerType && parentContainerWithoutTitle.includes(parentContainerType)) { const containerSection = this.resolver.getSchemaByType('section', { parentComponentInstance: buildInfo.parentComponentInstance }, this.designerHostService) as ComponentSchema; if (containerSection && containerSection.contents && containerSection.contents.length) { const section = containerSection.contents[0]; @@ -59,8 +59,12 @@ export class DataGridComponentCreatorService { return containerSection; } } + // 2、将表格拖入有标题的目标区域,不需要追加父容器。只需要给父容器添加新增删除按钮 if (parentContainerType === DgControl['tab-page'].type) { this.appendAddDeleteBtnToParentContainer(buildInfo?.parentComponentInstance?.schema, buildInfo); + if (buildInfo.parentComponentInstance?.parent && buildInfo.parentComponentInstance?.parent['updateToolbarItems']) { + buildInfo.parentComponentInstance?.parent['updateToolbarItems'](); + } } return componentRefNode; @@ -89,7 +93,6 @@ export class DataGridComponentCreatorService { appearance: { class: 'btn btn-secondary f-btn-ml' }, - visible: true, onClick: null }, { @@ -100,7 +103,6 @@ export class DataGridComponentCreatorService { appearance: { class: 'btn btn-secondary f-btn-ml' }, - visible: true, onClick: null }]; if (!resolvedContainerSchema.toolbar) { @@ -110,32 +112,6 @@ export class DataGridComponentCreatorService { resolvedContainerSchema.toolbar.buttons = []; } resolvedContainerSchema.toolbar.buttons = resolvedContainerSchema.toolbar.buttons.concat(btns); - const newToolbar = cloneDeep(resolvedContainerSchema.toolbar); - // delete resolvedContainerSchema.toolbar; - resolvedContainerSchema.toolbar = newToolbar; - // if (buildInfo?.parentComponentInstance?.parent && buildInfo?.parentComponentInstance?.parent['changeToolbarItems']) { - // buildInfo?.parentComponentInstance?.parent['changeToolbarItems']() - - // } - - // if (buildInfo.parentComponentInstance?.parent && buildInfo.parentComponentInstance?.parent['rebuild']) { - // buildInfo.parentComponentInstance.parent['rebuild'](); - // } - // const newToolbar = Object.assign({}, resolvedContainerSchema.toolbar); - - // if (DgControl['tab-page'].type === resolvedContainerType && buildInfo?.parentComponentInstance?.parent) { - // const tabSchema = buildInfo?.parentComponentInstance?.parent['schema']; - // if (tabSchema && tabSchema.contents) { - // const index = tabSchema.contents.findIndex(content => content.id === resolvedContainerSchema.id); - // if (index > -1) { - // tabSchema.contents.splice(index, 1); - // tabSchema.contents.splice(index, 0, resolvedContainerSchema); - - // } - // } - // } - // resolvedContainerSchema.toolbar = newToolbar; - // resolvedContainerSchema = cloneDeep(resolvedContainerSchema); } createComponentRefNode(buildInfo: ComponentBuildInfo): any { @@ -185,7 +161,7 @@ export class DataGridComponentCreatorService { * 获取表格组件层级的class样式 */ private getDataGridComponentClass(): string { - const {templateId} = this.formSchemaUtils.getFormSchema().module; + const { templateId } = this.formSchemaUtils.getFormSchema().module; // 双列表标签页模板,要求列表填充表单高度 if (templateId === 'double-list-in-tab-template') { @@ -198,7 +174,7 @@ export class DataGridComponentCreatorService { * 创建表格组件内层级结构 */ private createDateGridComponentContents(buildInfo: ComponentBuildInfo) { - const {templateId} = this.formSchemaUtils.getFormSchema().module; + const { templateId } = this.formSchemaUtils.getFormSchema().module; let container; // 根据模板不同,创建不同的容器类型和样式 if (templateId === 'double-list-in-tab-template') { diff --git a/packages/ui-vue/components/designer-canvas/src/components/designer-inner-item.component.tsx b/packages/ui-vue/components/designer-canvas/src/components/designer-inner-item.component.tsx index 3bf52e84d14..adadc5cab8b 100644 --- a/packages/ui-vue/components/designer-canvas/src/components/designer-inner-item.component.tsx +++ b/packages/ui-vue/components/designer-canvas/src/components/designer-inner-item.component.tsx @@ -232,9 +232,7 @@ const FDesignerInnerItem = defineComponent({ } } - // canvasChanged.value++; updatePositionOfButtonGroup({ target: draggabledesignerItemElementRef?.value }); - } return () => { diff --git a/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx b/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx index 40020fa41e8..307de2607f8 100644 --- a/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx +++ b/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx @@ -47,7 +47,7 @@ export default defineComponent({ const tabNavigationElementRef = shallowRef(); const tabContentElementRef = shallowRef(); const useTabsComposition = useDesignTabs(props, context, tabNavigationElementRef, designItemContext); - const { activeId, changeTitleStyle, tabPages, addTab, updateTab, selectTabByTabId, toolbarItems, listenTabNavElementScroll } = useTabsComposition; + const { activeId, changeTitleStyle, tabPages, addTab, updateTab, selectTabByTabId, toolbarItems, listenTabNavElementScroll, toolbarSchema, setHorizontalScrollbarPosition } = useTabsComposition; const useOnePageComposition = useOnePage(props, tabContentElementRef, useTabsComposition); @@ -110,6 +110,12 @@ export default defineComponent({ function updateToolbarItems() { const currentTabSchema = getCurrentTabSchema(); toolbarItems.value = [...currentTabSchema?.toolbar?.buttons]; + + toolbarSchema.value = currentTabSchema?.toolbar; + + nextTick(() => { + setHorizontalScrollbarPosition(); + }); }; provide('toolbar-item-handler', updateToolbarItems); // 填充模式 @@ -226,6 +232,8 @@ export default defineComponent({ } context.expose(componentInstance.value); + componentInstance.value['updateToolbarItems'] = updateToolbarItems; + return () => { return (
-- Gitee From 08070d78265e1e05538d76b778a161774f62dcfc Mon Sep 17 00:00:00 2001 From: wang-xh Date: Thu, 19 Dec 2024 15:20:50 +0800 Subject: [PATCH 033/181] =?UTF-8?q?feature:=20=E6=8B=96=E6=8B=BD=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E6=97=B6=EF=BC=8C=E8=87=AA=E5=8A=A8=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?tab=E6=96=B0=E5=A2=9E=E5=88=A0=E9=99=A4=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/property-config/combo-list.property-config.ts | 2 +- .../src/property-config/section.property-config.ts | 2 +- .../src/property-config/tab-page.property-config.ts | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/ui-vue/components/combo-list/src/property-config/combo-list.property-config.ts b/packages/ui-vue/components/combo-list/src/property-config/combo-list.property-config.ts index 9be46a034f9..10e4b71b98d 100644 --- a/packages/ui-vue/components/combo-list/src/property-config/combo-list.property-config.ts +++ b/packages/ui-vue/components/combo-list/src/property-config/combo-list.property-config.ts @@ -27,6 +27,6 @@ export class ComboListProperty extends InputBaseProperty { "title": "数据源标识字段", "type": "string" } - }) + }); } } diff --git a/packages/ui-vue/components/section/src/property-config/section.property-config.ts b/packages/ui-vue/components/section/src/property-config/section.property-config.ts index 915206ae754..99b25dc4633 100644 --- a/packages/ui-vue/components/section/src/property-config/section.property-config.ts +++ b/packages/ui-vue/components/section/src/property-config/section.property-config.ts @@ -80,7 +80,7 @@ export const sectionPropertyConfigs = { }, setPropertyRelates(changeObject, prop) { if (!changeObject) { - return + return; } switch (changeObject && changeObject.propertyID) { case 'mainTitle': { diff --git a/packages/ui-vue/components/tabs/src/property-config/tab-page.property-config.ts b/packages/ui-vue/components/tabs/src/property-config/tab-page.property-config.ts index f02f1a7c0c5..1013e18e901 100644 --- a/packages/ui-vue/components/tabs/src/property-config/tab-page.property-config.ts +++ b/packages/ui-vue/components/tabs/src/property-config/tab-page.property-config.ts @@ -7,10 +7,10 @@ export class TabPageProperty extends BaseControlProperty { // 基本信息 this.getBasicPropConfig(propertyData); this.getBehaviorProperties(propertyData); - return this.propertyConfig; + return this.propertyConfig; } - getBehaviorProperties(propertyData: any){ - this.propertyConfig.categories['behavior'] ={ + getBehaviorProperties(propertyData: any) { + this.propertyConfig.categories['behavior'] = { description: '', title: '行为', properties: { @@ -30,10 +30,10 @@ export class TabPageProperty extends BaseControlProperty { title: '是否可见' } } - } + }; } getBasicPropConfig(propertyData: any) { - this.propertyConfig.categories['basic'] = { + this.propertyConfig.categories['basic'] = { description: 'Basic Infomation', title: '基本信息', properties: { -- Gitee From 15e651663f8b026abf1dbfc1b530731b457798a5 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Sat, 21 Dec 2024 14:20:19 +0800 Subject: [PATCH 034/181] =?UTF-8?q?feature:=20=E4=BB=8E=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E7=AE=B1=E6=8B=96=E6=8B=BD=E9=9B=86=E5=90=88=E7=B1=BB=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E6=94=AF=E6=8C=81=E5=BC=B9=E7=AA=97=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=AE=9E=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/common/entity/entity-schema.ts | 26 ++++ .../designer/component.design.component.tsx | 6 +- .../src/designer/use-designer-rules.ts | 74 ++++++++++- .../src/designer/use-designer-rules.ts | 5 +- .../data-grid-component-creator.service.ts | 123 ++++++++++++++++-- .../designer/grid-field-editor.component.tsx | 10 +- .../src/designer/use-designer-rules.ts | 9 +- .../data-grid/src/schema/schema-resolver.ts | 12 +- .../designer-inner-item.component.tsx | 6 +- .../function/drag-resolver/drag-resolve.tsx | 122 +++++++++++++++++ .../entity-binding-selector/index.ts | 32 +++++ .../src/composition/use-entity-tree.ts | 50 +++++++ .../src/entity-binding-selector.component.tsx | 71 ++++++++++ .../src/entity-binding-selector.props.ts | 7 + .../function/use-designer-component.ts | 16 +-- .../function/use-designer-inner-component.ts | 4 +- .../src/composition/function/use-dragula.ts | 105 ++++++++------- .../rule/use-dragula-common-rule.ts | 4 +- .../src/composition/rule/use-template-rule.ts | 18 +-- .../designer-canvas/src/composition/types.ts | 92 +++++++------ .../src/designer-canvas.component.tsx | 5 +- .../components/designer-canvas/src/types.ts | 17 +-- ...response-form-component-creator.service.ts | 5 +- .../response-form-use-designer-rules.ts | 8 +- .../src/schema/schema-resolver.ts | 4 +- .../dynamic-resolver/src/schema-resolver.ts | 2 +- .../property-panel/src/composition/type.ts | 14 +- ...response-toolbar-item.design.component.tsx | 7 +- .../response-toolbar.design.component.tsx | 8 +- ...toolbar-dropdown-menu.design.component.tsx | 7 +- .../toolbar-dropdown.design.component.tsx | 7 +- .../src/designer/use-designer-rules.ts | 4 +- .../src/designer/use-designer-rules.ts | 5 +- .../section/src/schema/schema-resolver.ts | 2 +- .../designer/tab-header.design.component.tsx | 4 +- .../src/designer/use-designer-rules.ts | 2 +- 36 files changed, 687 insertions(+), 206 deletions(-) create mode 100644 packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/drag-resolve.tsx create mode 100644 packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/index.ts create mode 100644 packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/composition/use-entity-tree.ts create mode 100644 packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/entity-binding-selector.component.tsx create mode 100644 packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/entity-binding-selector.props.ts diff --git a/packages/ui-vue/components/common/entity/entity-schema.ts b/packages/ui-vue/components/common/entity/entity-schema.ts index e85ef415bbe..fb5eef41a49 100644 --- a/packages/ui-vue/components/common/entity/entity-schema.ts +++ b/packages/ui-vue/components/common/entity/entity-schema.ts @@ -246,3 +246,29 @@ export enum GSPElementDataType { */ Binary = "Binary" } +/** + * dom Json ViewModel 节点中states实体 + */ +export interface FormVariable { + id: string; + code: string; + name: string; + value?: any; + type: string; + category: string; + fields?: any[]; + defaultValue?: any; +} +/** + * 表单变量 + */ +export interface DesignFormVariable extends FormVariable { + /** + * 分组ID + */ + groupId: string; + /** + * 分组名称 + */ + groupName: string; +} \ No newline at end of file diff --git a/packages/ui-vue/components/component/src/designer/component.design.component.tsx b/packages/ui-vue/components/component/src/designer/component.design.component.tsx index 49850efea88..7e0142f851a 100644 --- a/packages/ui-vue/components/component/src/designer/component.design.component.tsx +++ b/packages/ui-vue/components/component/src/designer/component.design.component.tsx @@ -16,7 +16,7 @@ export default defineComponent({ const designItemContext = inject('design-item-context') as DesignerItemContext; const designerRulesComposition = useDesignerRules(designItemContext, designerHostService); const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); - + const componentClass = computed(() => { const classObject = { 'drag-container': true @@ -25,6 +25,10 @@ export default defineComponent({ }); onMounted(() => { elementRef.value.componentInstance = componentInstance; + + if (designItemContext.parent?.schema?.type === 'component-ref') { + componentInstance.value.parent = designItemContext.parent?.parent?.componentInstance; + } }); context.expose(componentInstance.value); diff --git a/packages/ui-vue/components/component/src/designer/use-designer-rules.ts b/packages/ui-vue/components/component/src/designer/use-designer-rules.ts index 7a45884dbb2..07c3b51631f 100644 --- a/packages/ui-vue/components/component/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/component/src/designer/use-designer-rules.ts @@ -37,23 +37,89 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe const { schema } = designItemContext; return componentProp.getPropertyConfig(schema); } + /** - * 组件删除后事件 + * 删除DataGrid/Form类组件时,将父级Section或者TabPage上的相关按钮一起删除 */ - function onRemoveComponent() { + function removeAddDeleteBtnOnParentContainer() { + const schema = designItemContext?.schema; + const formSchemaUtils = designerHostService?.formSchemaUtils; + const viewModelId = formSchemaUtils.getViewModelIdByComponentId(schema.id); + + if (schema.componentType !== 'data-grid' && schema.componentType !== 'form') { + return; + } + if (!designItemContext.componentInstance?.value.parent) { + return; + } + const parentComponentSchema = designItemContext.componentInstance?.value.parent['schema']; + if (parentComponentSchema?.toolbar?.buttons && parentComponentSchema.toolbar.buttons.length) { + parentComponentSchema.toolbar.buttons.forEach(button => { + const clickEvent = button.onClick; + // 判断三段式结构 + const clickEventPath = clickEvent && clickEvent.split('.'); + if (!clickEventPath || clickEventPath.length < 3) { + return; + } + const targetViewModelId = clickEventPath[clickEventPath.length - 2]; + + // 按钮绑定的命令若是在当前viewModel下,则将按钮标记为待删除 + if (targetViewModelId === viewModelId) { + button.needRemove = true; + } + }); + parentComponentSchema.toolbar.buttons = parentComponentSchema.toolbar.buttons.filter(button => !button.needRemove); + + // 为解决标签页画布无法更新的问题,手动触发update方法 + const parentComponentInstance = designItemContext.componentInstance?.value.parent; + if (parentComponentInstance['parent'] && parentComponentInstance['parent']['updateToolbarItems']) { + parentComponentInstance['parent']['updateToolbarItems'](); + } + } + + } + /** + * 组件删除后事件:移除viewmodel和component + */ + function removeViewModelComponent() { const designViewModelUtils = designerHostService?.designViewModelUtils; const formSchemaUtils = designerHostService?.formSchemaUtils; const schema = designItemContext?.schema; - - // 删除viewmodel和component if (designViewModelUtils && formSchemaUtils) { const viewModelId = formSchemaUtils.getViewModelIdByComponentId(schema.id); designViewModelUtils.deleteViewModelById(viewModelId); formSchemaUtils.deleteComponent(schema.id); } + } + /** + * 组件删除后事件:移除表达式、界面规则、受控规则等全局配置 + */ + function removeGlobalConfigs() { + const designViewModelUtils = designerHostService?.designViewModelUtils; + const formSchemaUtils = designerHostService?.formSchemaUtils; + const schema = designItemContext?.schema; + const viewModelId = formSchemaUtils.getViewModelIdByComponentId(schema.id); + + designViewModelUtils.getDgViewModel(viewModelId).fields.forEach(field => { + // 若绑定字段配置了表达式,需要删除表达式 + if (formSchemaUtils.getExpressions() && formSchemaUtils.getExpressions().length) { + const expFieldIndex = formSchemaUtils.getExpressions().findIndex(e => e.fieldId === field.id); + if (expFieldIndex > -1) { + formSchemaUtils.getExpressions().splice(expFieldIndex, 1); + } + } + }); + } + /** + * 组件删除后事件 + */ + function onRemoveComponent() { + removeAddDeleteBtnOnParentContainer(); + removeGlobalConfigs(); + removeViewModelComponent() } return { canAccepts, checkCanDeleteComponent, checkCanMoveComponent, hideNestedPaddingInDesginerView, getStyles, getPropsConfig, onRemoveComponent }; } diff --git a/packages/ui-vue/components/content-container/src/designer/use-designer-rules.ts b/packages/ui-vue/components/content-container/src/designer/use-designer-rules.ts index c50fee3dc72..ba0c94532f9 100644 --- a/packages/ui-vue/components/content-container/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/content-container/src/designer/use-designer-rules.ts @@ -8,7 +8,6 @@ export function useDesignerRulesForContentContainer(designItemContext: DesignerI const schema = designItemContext.schema as ComponentSchema; const dragAndDropRules = new UseTemplateDragAndDropRules(); - const { canMove, canAccept, canDelete } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); /** * 判断是否可以接收拖拽新增的子级控件 */ @@ -18,6 +17,7 @@ export function useDesignerRulesForContentContainer(designItemContext: DesignerI if (!basalRule) { return false; } + const { canAccept } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); return canAccept; } @@ -35,13 +35,16 @@ export function useDesignerRulesForContentContainer(designItemContext: DesignerI } function checkCanMoveComponent() { + const { canMove } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); return canMove; } function checkCanDeleteComponent() { + const { canDelete } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); return canDelete; } function hideNestedPaddingInDesginerView() { + const { canMove, canDelete } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); return !canMove && !canDelete; } diff --git a/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts b/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts index 8d9eee24b75..cc9ed035f49 100644 --- a/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts +++ b/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts @@ -5,6 +5,7 @@ import { ComponentSchema } from '../../../../components/designer-canvas'; import { FormSchemaEntityField$Type, FormSchemaEntityFieldTypeName } from '../../../common/entity/entity-schema'; import { cloneDeep } from 'lodash-es'; import { DgControl } from '../../../designer-canvas/src/composition/dg-control'; +import { useGuid } from '../../../common'; const ROOT_VIEW_MODEL_ID = 'root-viewmodel'; @@ -15,6 +16,8 @@ export class DataGridComponentCreatorService { private formSchemaUtils: any; private controlCreatorUtils: any; + private designViewModelUtils: any; + private useFormCommand: any; constructor( private resolver: DynamicResolver, @@ -22,6 +25,8 @@ export class DataGridComponentCreatorService { ) { this.formSchemaUtils = this.designerHostService.formSchemaUtils; this.controlCreatorUtils = this.designerHostService.controlCreatorUtils; + this.designViewModelUtils = this.designerHostService.designViewModelUtils; + this.useFormCommand = this.designerHostService.useFormCommand; } public createComponent(buildInfo: ComponentBuildInfo) { @@ -35,7 +40,9 @@ export class DataGridComponentCreatorService { formSchema.module.viewmodels.push(viewModelNode); formSchema.module.components.push(componentNode); - return this.wrapContainerSectionForComponent(componentRefNode, buildInfo); + this.designViewModelUtils.assembleDesignViewModel(); + + return this.wrapContainerSectionForComponent(componentRefNode, buildInfo, viewModelNode, componentNode.id); } /** * 追加父容器 @@ -43,25 +50,33 @@ export class DataGridComponentCreatorService { * @param buildInfo * @returns */ - private wrapContainerSectionForComponent(componentRefNode: any, buildInfo: ComponentBuildInfo) { + private wrapContainerSectionForComponent(componentRefNode: any, buildInfo: ComponentBuildInfo, viewModelNode: any, componentId) { const parentContainerType = buildInfo?.parentComponentInstance?.schema?.type; // 1、将表格拖入无标题的目标区域,需要给表格追加Section容器。并给Section添加新增删除按钮 const parentContainerWithoutTitle = [DgControl['content-container'].type, DgControl['response-layout-item'].type, DgControl['splitter-pane'].type]; if (parentContainerType && parentContainerWithoutTitle.includes(parentContainerType)) { - const containerSection = this.resolver.getSchemaByType('section', { parentComponentInstance: buildInfo.parentComponentInstance }, this.designerHostService) as ComponentSchema; + const containerSection = this.resolver.getSchemaByType( + 'section', + { + parentComponentInstance: buildInfo.parentComponentInstance, + mainTitle: buildInfo.componentName + }, + this.designerHostService) as ComponentSchema; if (containerSection && containerSection.contents && containerSection.contents.length) { const section = containerSection.contents[0]; section.contents = [componentRefNode]; - this.appendAddDeleteBtnToParentContainer(section, buildInfo); + this.appendAddDeleteBtnToParentContainer(section, buildInfo, viewModelNode); return containerSection; } } // 2、将表格拖入有标题的目标区域,不需要追加父容器。只需要给父容器添加新增删除按钮 + this.appendAddDeleteBtnToParentContainer(buildInfo?.parentComponentInstance?.schema, buildInfo, viewModelNode); + if (parentContainerType === DgControl['tab-page'].type) { - this.appendAddDeleteBtnToParentContainer(buildInfo?.parentComponentInstance?.schema, buildInfo); + // 为解决标签页画布无法更新的问题,手动触发update方法 if (buildInfo.parentComponentInstance?.parent && buildInfo.parentComponentInstance?.parent['updateToolbarItems']) { buildInfo.parentComponentInstance?.parent['updateToolbarItems'](); } @@ -73,8 +88,10 @@ export class DataGridComponentCreatorService { /** * 为父容器追加新增、删除按钮 */ - private appendAddDeleteBtnToParentContainer(resolvedContainerSchema: any, buildInfo: ComponentBuildInfo) { + private appendAddDeleteBtnToParentContainer(resolvedContainerSchema: any, buildInfo: ComponentBuildInfo, viewModelNode: any) { const resolvedContainerType = resolvedContainerSchema.type; + const commandPrefix = viewModelNode.id.replace(/-/g, '').replace(/_/g, '').replace('component', '').replace('viewmodel', ''); + // 限制子表 if (buildInfo.bindTo === '/') { return; @@ -93,7 +110,7 @@ export class DataGridComponentCreatorService { appearance: { class: 'btn btn-secondary f-btn-ml' }, - onClick: null + onClick: `root-viewModel.${viewModelNode.id}.${commandPrefix}AddItem1` }, { id: `button-remove-${buildInfo.componentId}`, @@ -103,7 +120,7 @@ export class DataGridComponentCreatorService { appearance: { class: 'btn btn-secondary f-btn-ml' }, - onClick: null + onClick: `root-viewModel.${viewModelNode.id}.${commandPrefix}RemoveItem1` }]; if (!resolvedContainerSchema.toolbar) { resolvedContainerSchema.toolbar = { buttons: [] }; @@ -112,8 +129,93 @@ export class DataGridComponentCreatorService { resolvedContainerSchema.toolbar.buttons = []; } resolvedContainerSchema.toolbar.buttons = resolvedContainerSchema.toolbar.buttons.concat(btns); + + this.appendAddAndDeleteCommands(viewModelNode); } + /** + * 向视图模型添加新增删除命令 + */ + private appendAddAndDeleteCommands(viewModelNode: any) { + const commandPrefix = viewModelNode.id.replace(/-/g, '').replace(/_/g, '').replace('component', '').replace('viewmodel', ''); + const addCommandId = useGuid().guid; + const deleteCommandId = useGuid().guid; + const cardControllerId = this.resolveCommandController(); + viewModelNode.commands.push( + { + id: addCommandId, + code: `${commandPrefix}AddItem1`, + name: '增加一条子表数据', + params: [], + handlerName: 'AddItem', + cmpId: cardControllerId, + shortcut: {}, + extensions: [] + }, + { + id: deleteCommandId, + code: `${commandPrefix}RemoveItem1`, + name: '删除一条子表数据', + params: [ + { + name: 'id', + shownName: '待删除子表数据的标识', + value: `{DATA~${viewModelNode.bindTo}/id}` + } + ], + handlerName: 'RemoveItem', + cmpId: cardControllerId, + shortcut: {}, + extensions: [] + } + ); + + + // 3、记录构件命令 + const webCmds = this.formSchemaUtils.getFormSchema().module.webcmds; + const cardCmd = webCmds.find(webCmd => webCmd.id === cardControllerId); + cardCmd.refedHandlers.push( + { + host: addCommandId, + handler: 'AddItem' + }, + { + host: deleteCommandId, + handler: 'RemoveItem' + } + ); + } + /** + * 获取新增删除子表命令可用的控制器id。 + */ + private resolveCommandController(): string { + const webCmds = this.formSchemaUtils.getFormSchema().module.webcmds; + // 卡片控制器 / 树卡控制器 / 高级列卡控制器 + const optionalControllerId = [ + '8172a979-2c80-4637-ace7-b13074d3f393', + '8fe977a1-2b32-4f0f-a6b3-2657c4d03574', + '45be24f9-c1f7-44f7-b447-fe2ada458a61' + ]; + const availableController = webCmds.find(cmd => optionalControllerId.includes(cmd.id)); + if (availableController) { + return availableController.id; + } + + // 若当前表单没有可用的控制器,默认新增一个高级列卡控制器。这里需要触发load控制器,不然加载不到控制器内的命令 + const listDicControllerId = '45be24f9-c1f7-44f7-b447-fe2ada458a61'; + webCmds.push({ + id: listDicControllerId, + path: '/projects/packages/Inspur.GS.Gsp.Web.WebCmp/webcmd', + name: 'AdvancedListCardController.webcmd', + refedHandlers: [] + }); + if (this.useFormCommand) { + this.useFormCommand.checkCommands(); + } + return listDicControllerId; + + + } createComponentRefNode(buildInfo: ComponentBuildInfo): any { const componentRefNode = this.resolver.getSchemaByType('component-ref') as ComponentSchema; Object.assign(componentRefNode, { @@ -150,10 +252,7 @@ export class DataGridComponentCreatorService { fields: this.assembleViewModelFields(buildInfo), commands: [], states: [], - enableValidation: true, - pagination: { - enable: false - } + enableValidation: true }; return viewModelNode; } diff --git a/packages/ui-vue/components/data-grid/src/designer/grid-field-editor.component.tsx b/packages/ui-vue/components/data-grid/src/designer/grid-field-editor.component.tsx index 806b62e68a5..4eb734d8987 100644 --- a/packages/ui-vue/components/data-grid/src/designer/grid-field-editor.component.tsx +++ b/packages/ui-vue/components/data-grid/src/designer/grid-field-editor.component.tsx @@ -117,13 +117,11 @@ export default defineComponent({ const deletedFieldIds = deletedFields.map(f => f.id); dgViewModel.removeField(deletedFieldIds); // 若字段配置了表达式,需要删除表达式 - if (formSchemaUtils.expressions && formSchemaUtils.expressions.length && deletedFieldIds.length) { - formSchemaUtils.expressions = formSchemaUtils.expressions.filter(e => !deletedFieldIds.includes(e.fieldId)); + if (formSchemaUtils.getExpressions() && formSchemaUtils.getExpressions().length && deletedFieldIds.length) { + const newExpressions = formSchemaUtils.getExpressions().filter(e => !deletedFieldIds.includes(e.fieldId)); + formSchemaUtils.setExpressions(newExpressions); } - /* 若绑定字段配置了界面规则,需删除界面规则中有关的字段记录 */ - // deletedFieldIds.forEach(fieldId => { - // formSchemaUtils.deleteFormRule(fieldId); - // }); + } textValue.value = `共 ${newFields.length} 项`; context.emit('change', newFields); // 属性编辑器自动将newFields赋值给对应控件value diff --git a/packages/ui-vue/components/data-grid/src/designer/use-designer-rules.ts b/packages/ui-vue/components/data-grid/src/designer/use-designer-rules.ts index f3902d83c53..522893ffd81 100644 --- a/packages/ui-vue/components/data-grid/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/data-grid/src/designer/use-designer-rules.ts @@ -1,5 +1,5 @@ - - + + import { ref } from "vue"; import { DraggingResolveContext, DesignerHTMLElement, UseDesignerRules, DesignerHostService } from "../../../designer-canvas/src/composition/types"; import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; @@ -18,7 +18,7 @@ export function useDesignerRulesForDataGrid(designItemContext: DesignerItemConte function canAccepts(draggingContext: DraggingResolveContext): boolean { // 接收工具箱中拖拽来的输入类控件 if (draggingContext && draggingContext.sourceType === 'control') { - return draggingContext.controlCategory === 'input'; + return draggingContext.componentCategory === 'input'; } return false; } @@ -40,8 +40,6 @@ export function useDesignerRulesForDataGrid(designItemContext: DesignerItemConte return true; } - function onAcceptMovedChildElement(sourceElement: DesignerHTMLElement) { - } /** * 构造属性配置方法 @@ -57,7 +55,6 @@ export function useDesignerRulesForDataGrid(designItemContext: DesignerItemConte checkCanDeleteComponent, checkCanMoveComponent, hideNestedPaddingInDesginerView, - onAcceptMovedChildElement, triggerBelongedComponentToMoveWhenMoved, triggerBelongedComponentToDeleteWhenDeleted, getPropsConfig diff --git a/packages/ui-vue/components/data-grid/src/schema/schema-resolver.ts b/packages/ui-vue/components/data-grid/src/schema/schema-resolver.ts index 366c2723d6f..749dace5b95 100644 --- a/packages/ui-vue/components/data-grid/src/schema/schema-resolver.ts +++ b/packages/ui-vue/components/data-grid/src/schema/schema-resolver.ts @@ -1,23 +1,23 @@ - + import { ComponentBuildInfo } from "../../../component/src/composition/inner-component-build-info"; -import { DesignerHostService } from "../../../designer-canvas/src/composition/types"; +import { DesignerHostService, DraggingResolveContext } from "../../../designer-canvas/src/composition/types"; import { DesignerComponentInstance } from "../../../designer-canvas/src/types"; import { DynamicResolver } from "../../../dynamic-resolver"; import { DataGridComponentCreatorService } from "../composition/data-grid-component-creator.service"; -export function schemaResolver(resolver: DynamicResolver, schema: Record, context: Record, designerHostService?: DesignerHostService): Record { +export function schemaResolver(resolver: DynamicResolver, schema: Record, context: DraggingResolveContext, designerHostService?: DesignerHostService): Record { const parentComponentInstance = context.parentComponentInstance as DesignerComponentInstance; if (parentComponentInstance && designerHostService) { const radomNumber = Math.random().toString(36).slice(2, 6); const componentBuildInfo: ComponentBuildInfo = { componentId: `data-grid-${radomNumber}`, - componentName: `表格-${radomNumber}`, + componentName: context.bindingSourceContext?.bindingEntity?.name || `表格-${radomNumber}`, componentType: 'data-grid', parentContainerId: parentComponentInstance.schema.id, parentComponentInstance: parentComponentInstance, editable: true, - bindTo: '', - dataSource: '' + bindTo: context.bindingSourceContext?.bindTo || '', + dataSource: context.bindingSourceContext?.bindingEntity?.label }; const componentCreator = new DataGridComponentCreatorService(resolver, designerHostService); const componentRefNode = componentCreator.createComponent(componentBuildInfo); diff --git a/packages/ui-vue/components/designer-canvas/src/components/designer-inner-item.component.tsx b/packages/ui-vue/components/designer-canvas/src/components/designer-inner-item.component.tsx index adadc5cab8b..8fdf068b970 100644 --- a/packages/ui-vue/components/designer-canvas/src/components/designer-inner-item.component.tsx +++ b/packages/ui-vue/components/designer-canvas/src/components/designer-inner-item.component.tsx @@ -1,8 +1,8 @@ import { Ref, SetupContext, computed, defineComponent, inject, onMounted, provide, ref, watch, onBeforeUnmount, withModifiers } from 'vue'; import { DesignerInnerItemPropsType, designerInnerItemProps } from '../composition/props/designer-inner-item.props'; -import { UseDragula } from '../composition/types'; -import { ComponentSchema, DesignerComponentInstance, DesignerItemContext, ResolveComponentContext } from '../types'; +import { DraggingResolveContext, UseDragula } from '../composition/types'; +import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from '../types'; import { canvasChanged, setPositionOfButtonGroup } from '../composition/designer-canvas-changed'; import { useDesignerInnerComponent } from '../composition/function/use-designer-inner-component'; @@ -83,7 +83,7 @@ const FDesignerInnerItem = defineComponent({ label: childLabel.value, parentComponentInstance: componentInstance.value, targetPosition: -1 - } as ResolveComponentContext; + } as DraggingResolveContext; const childComponentSchema = componentInstance.value.addNewChildComponentSchema(resolveContext); schema.value[contentKey.value].push(childComponentSchema); context.emit('addComponent'); diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/drag-resolve.tsx b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/drag-resolve.tsx new file mode 100644 index 00000000000..bd19cd6a46d --- /dev/null +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/drag-resolve.tsx @@ -0,0 +1,122 @@ +import { ModalFunctions } from "../../../../../modal/src/composition/type"; +import { ComponentBindingSourceContext, DesignerHostService, DesignerHTMLElement, DraggingResolveContext } from "../../types"; +import EntityBindingSelectorComponent from './entity-binding-selector/src/entity-binding-selector.component'; + +export function dragResolveService(designerHostService: DesignerHostService) { + /** 弹窗实例 */ + let modalEditorRef: ModalFunctions; + /** 拖拽上下文 */ + let componentResolveContext: DraggingResolveContext; + + /** + * 获取拖拽上下文信息 + */ + function getComponentResolveContext(sourceElement: DesignerHTMLElement, sourceContainer: DesignerHTMLElement, targetContainer: DesignerHTMLElement) + : DraggingResolveContext { + + const resolveContext: DraggingResolveContext = { + componentType: String(sourceElement.getAttribute('data-controltype')), + componentFeature: String(sourceElement.getAttribute('data-feature')), + componentCategory: String(sourceElement.getAttribute('data-category')), + label: String(sourceElement.getAttribute('data-controlTypeName')), + sourceType: String(sourceElement.getAttribute('data-sourceType') || 'move'), + parentComponentInstance: targetContainer.componentInstance.value, + sourceElement, + sourceContainer, + targetContainer, + bindingSourceContext: undefined + }; + + // 现有控件移动位置:从控件实例上获取控件类型 + if (sourceElement.componentInstance) { + resolveContext.componentType = sourceElement.componentInstance.value.schema?.type; + // resolveContext.componentCategory = sourceElement.componentInstance.value.category; + } + + return resolveContext; + } + + function onSubmitEntitySelctor(bindingSourceContext: ComponentBindingSourceContext) { + componentResolveContext.bindingSourceContext = bindingSourceContext; + + if (modalEditorRef?.modalRef?.value.close) { + modalEditorRef?.modalRef?.value.close(); + } + } + function onCancelEntitySelector() { + if (modalEditorRef?.modalRef?.value.close) { + modalEditorRef?.modalRef?.value.close(); + } + } + + function renderComponent() { + return () => (<> ); + } + + function triggerBindingEntity() { + return new Promise((resolve, reject) => { + modalEditorRef = designerHostService.modalService.open({ + title: '选择绑定', + width: 600, + height: 500, + fitContent: false, + showButtons: false, + render: renderComponent(), + closedCallback: () => { + resolve(componentResolveContext); + }, + draggable: true + }); + }); + } + + /** + * 生成控件schema结构 + */ + function resolveComponentSchema() { + const { parentComponentInstance } = componentResolveContext; + const componentSchema = parentComponentInstance.addNewChildComponentSchema(componentResolveContext, designerHostService); + componentResolveContext.componentSchema = componentSchema; + } + /** + * 解析拖拽元素,并根据场景展示不同的绑定窗口 + */ + async function resolveBindingSource() { + const { componentCategory } = componentResolveContext; + + switch (componentCategory) { + case 'input': { + // 输入类,触发展示字段绑定窗口 + break; + } + case 'dataCollection': { + // 实体类,触发展示实体绑定窗口 + await triggerBindingEntity(); + return; + } + + } + } + /** + * 根据拖拽元素解析并创建控件 + */ + async function resolveComponentCreationContextByDrop(sourceElement: DesignerHTMLElement, sourceContainer: DesignerHTMLElement, targetContainer: DesignerHTMLElement): Promise { + componentResolveContext = getComponentResolveContext(sourceElement, sourceContainer, targetContainer); + + await resolveBindingSource(); + + // 若返回 undefined 代表终止后续生成 + if (componentResolveContext.bindingSourceContext === undefined) { + return null; + } else { + resolveComponentSchema(); + return componentResolveContext; + } + + } + + return { + getComponentResolveContext, + resolveComponentCreationContextByDrop + }; +} diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/index.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/index.ts new file mode 100644 index 00000000000..47b80a210ae --- /dev/null +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/index.ts @@ -0,0 +1,32 @@ + +/** + * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import type { App, Plugin } from 'vue'; +import EntityBindingSelector from './src/entity-binding-selector.component'; +import { entityBindingSelectorProps } from './src/entity-binding-selector.props'; + +export * from './src/entity-binding-selector.props'; + +EntityBindingSelector.install = (app: App) => { + app.component(EntityBindingSelector.name as string, EntityBindingSelector); +}; +EntityBindingSelector.register = (componentMap: Record, propsResolverMap: Record, configResolverMap: Record, resolverMap: Record) => { + componentMap['entity-binding-selector'] = EntityBindingSelector; + propsResolverMap['entity-binding-selector'] = entityBindingSelectorProps; +}; +export { EntityBindingSelector }; + +export default EntityBindingSelector as typeof EntityBindingSelector & Plugin; diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/composition/use-entity-tree.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/composition/use-entity-tree.ts new file mode 100644 index 00000000000..946d82c778a --- /dev/null +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/composition/use-entity-tree.ts @@ -0,0 +1,50 @@ +import { FormSchemaEntity } from "../../../../../../../../common/entity/entity-schema"; +import { ComponentBindingSourceContext } from "../../../../../../../../designer-canvas/src/composition/types"; +import { cloneDeep } from "lodash"; +import { EntityBindingSelectorProps } from "../entity-binding-selector.props"; + +export function useEntityTree(props: EntityBindingSelectorProps) { + + const { designerHostService } = props; + const entityBindToMap: Map = new Map(); + function resolveEntity(schemaEntity: FormSchemaEntity, parentLabelPath: string = ''): any { + if (!schemaEntity) { + return; + } + const clonedSchemaEntity: FormSchemaEntity = cloneDeep(schemaEntity); + const result: any = { + data: clonedSchemaEntity, + children: [] + }; + const viewModelBindTo = parentLabelPath ? `${parentLabelPath}/${clonedSchemaEntity.label}` : `/`; + entityBindToMap.set(clonedSchemaEntity.label, viewModelBindTo.replace('//', '/')); + + if (clonedSchemaEntity.type.entities && clonedSchemaEntity.type.entities.length) { + const childTable = clonedSchemaEntity.type.entities.map(childEntity => resolveEntity(childEntity, viewModelBindTo)); + result.children = result.children.concat(childTable); + } + return result; + } + /** + * 组装实体树 + */ + function resolveEntityDataSource(): any[] { + const { formSchemaUtils } = designerHostService; + const rootSchemaEntity = formSchemaUtils.getFormSchema().module.entity[0]?.entities[0]; + entityBindToMap.clear(); + + const rootSchemaTreeNode = resolveEntity(rootSchemaEntity); + return [rootSchemaTreeNode]; + } + + function resolveBindingSourceContext(): ComponentBindingSourceContext { + const bindingContext: ComponentBindingSourceContext = { bindingType: 'entity' }; + + return bindingContext; + } + return { + resolveEntityDataSource, + resolveBindingSourceContext, + entityBindToMap + }; +} diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/entity-binding-selector.component.tsx b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/entity-binding-selector.component.tsx new file mode 100644 index 00000000000..151c1e4b399 --- /dev/null +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/entity-binding-selector.component.tsx @@ -0,0 +1,71 @@ +import { ref, defineComponent, onBeforeMount, onMounted } from "vue"; +import { FNotifyService } from "../../../../../../../notify"; +import { entityBindingSelectorProps, EntityBindingSelectorProps } from "./entity-binding-selector.props"; +import { FTreeGrid } from '../../../../../../../tree-grid'; +import { RowOptions, VisualData } from "../../../../../../../data-view"; +import { useEntityTree } from "./composition/use-entity-tree"; +import { ComponentBindingSourceContext } from "../../../../types"; + + +export default defineComponent({ + name: 'FEntityBindingSelector', + props: entityBindingSelectorProps, + emits: ['submit', 'cancel'], + setup(props: EntityBindingSelectorProps, context) { + const treegridRef = ref(); + const entityColumns = ref([{ field: 'name', title: '实体名称' }]); + const entityDataSource = ref(); + const useEntityTreeUtil = useEntityTree(props); + + const notifyService: any = new FNotifyService(); + notifyService.globalConfig = { position: 'top-center' }; + + onBeforeMount(() => { + entityDataSource.value = useEntityTreeUtil.resolveEntityDataSource(); + }); + onMounted(() => { + const rootEntityId = entityDataSource.value && entityDataSource.value.length ? entityDataSource.value[0].data.id : ''; + if (rootEntityId) { + treegridRef.value.selectItemById(rootEntityId); + } + }); + function renderTreeGrids() { + return ; + } + + function onCancel() { + context.emit('cancel'); + } + + function onSubmit() { + const bindingContext: ComponentBindingSourceContext = { bindingType: 'entity' }; + const selectedItems = treegridRef.value.getSelectedItems(); + if (!selectedItems.length) { + notifyService.warning({ message: '请先选择实体' }); + return; + } + bindingContext.bindingEntity = selectedItems[0].data; + bindingContext.bindTo = useEntityTreeUtil.entityBindToMap.get(bindingContext.bindingEntity?.label || ''); + + context.emit('submit', bindingContext); + } + + return () => { + return (
+
{renderTreeGrids()}
+ + +
); + }; + } +}); diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/entity-binding-selector.props.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/entity-binding-selector.props.ts new file mode 100644 index 00000000000..e43656fde5a --- /dev/null +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/entity-binding-selector.props.ts @@ -0,0 +1,7 @@ +import { ExtractPropTypes } from "vue"; + +export const entityBindingSelectorProps = { + designerHostService: { type: Object, default: {} } +} as Record; + +export type EntityBindingSelectorProps = ExtractPropTypes; diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts index 66aadd32df2..8132d2e187a 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts @@ -1,7 +1,7 @@ - + import { Ref, ref } from "vue"; import { DesignerHostService, DesignerHTMLElement, DraggingResolveContext, UseDesignerRules } from "../types"; -import { ComponentSchema, DesignerComponentInstance, DesignerItemContext, ResolveComponentContext } from "../../types"; +import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../types"; import { getSchemaByType } from '../../../../dynamic-resolver/src/schema-resolver'; export function useDesignerComponent( @@ -63,14 +63,14 @@ export function useDesignerComponent( * 获取组件在表单DOM中所属的Component的实例 * @param componentInstance 组件实例 */ - function getBelongedComponentInstance(componentInstance?: Ref): DesignerComponentInstance | null { - if (!componentInstance || !componentInstance.value) { + function getBelongedComponentInstance(cmpInstance?: Ref): DesignerComponentInstance | null { + if (!cmpInstance || !cmpInstance.value) { return null; } - if (componentInstance.value.schema && componentInstance.value.schema.type === 'component') { - return componentInstance.value; + if (cmpInstance.value.schema && cmpInstance.value.schema.type === 'component') { + return cmpInstance.value; } - const parent = ref(componentInstance?.value.parent) as Ref; + const parent = ref(cmpInstance?.value.parent) as Ref; const grandParent = getBelongedComponentInstance(parent); if (grandParent) { return grandParent; @@ -124,7 +124,7 @@ export function useDesignerComponent( /** * 当前容器接收新创建的子控件,返回子控件schema结构 */ - function addNewChildComponentSchema(resolveContext: ResolveComponentContext, designerHostService: DesignerHostService) { + function addNewChildComponentSchema(resolveContext: DraggingResolveContext, designerHostService: DesignerHostService) { const { componentType } = resolveContext; let componentSchema = getSchemaByType(componentType, resolveContext, designerHostService) as ComponentSchema; if (designerRules && designerRules.onResolveNewComponentSchema) { diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component.ts index c3d7c1f4eeb..3b2ba75e82a 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component.ts @@ -1,7 +1,7 @@ import { inject, Ref, ref } from "vue"; import { DesignerHostService, DesignerHTMLElement, DraggingResolveContext, UseDesignerRules } from "../types"; -import { ComponentSchema, DesignerComponentInstance, DesignerItemContext, ResolveComponentContext } from "../../types"; +import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../types"; import { getSchemaByType } from '../../../../dynamic-resolver/src/schema-resolver'; export function useDesignerInnerComponent( @@ -115,7 +115,7 @@ export function useDesignerInnerComponent( } } - function addNewChildComponentSchema(resolveContext: ResolveComponentContext) { + function addNewChildComponentSchema(resolveContext: DraggingResolveContext) { const { componentType } = resolveContext; const designerHostServer = inject('designer-host-service') as DesignerHostService; let componentSchema = getSchemaByType(componentType, resolveContext, designerHostServer) as ComponentSchema; diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts index 6591fae1eda..e339aa35c19 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts @@ -3,50 +3,13 @@ import { DesignerHostService, DesignerHTMLElement, DraggingResolveContext, UseDr import { findIndex } from 'lodash-es'; import { ref } from 'vue'; import { canvasChanged } from '../designer-canvas-changed'; -import { ComponentSchema, ResolveComponentContext } from '../../types'; +import { ComponentSchema } from '../../types'; +import { dragResolveService } from './drag-resolver/drag-resolve'; export function useDragula(designerHostService: DesignerHostService): UseDragula { let dragulaInstance: any; - /** - * 获取拖拽上下文信息 - * @param sourceEl 拖拽源HTML节点 - * @param targetComponentInstance 目标组件实例 - */ - function getComponentResolveContext( - sourceElement: DesignerHTMLElement, - targetContainer: DesignerHTMLElement, - sourceContainer: DesignerHTMLElement - ): DraggingResolveContext { - - const resolveContext: DraggingResolveContext = {}; - - resolveContext.sourceElement = sourceElement; - resolveContext.sourceContainer = sourceContainer; - resolveContext.targetContainer = targetContainer; - - resolveContext.sourceType = sourceElement.getAttribute('data-sourceType') || 'move' as any; - resolveContext.controlType = sourceElement.getAttribute('data-controlType'); - resolveContext.controlTypeName = sourceElement.getAttribute('data-controlTypeName'); - resolveContext.controlCategory = sourceElement.getAttribute('data-category'); - resolveContext.controlFeature = sourceElement.getAttribute('data-feature'); - resolveContext.parentComponentInstance = targetContainer.componentInstance; - - if (resolveContext.controlCategory === 'input') { - resolveContext.bindingType = 'field'; - } else if (resolveContext.controlCategory === 'dataCollection') { - resolveContext.bindingType = 'entity'; - } - - // 现有控件移动位置:从控件实例上获取控件类型 - if (sourceElement.componentInstance) { - resolveContext.controlType = sourceElement.componentInstance.value.schema.type; - resolveContext.controlCategory = sourceElement.componentInstance.value.schema.category; - } - return resolveContext; - } - /** * 判断是否可以接收拖拽的新控件 * @param el 拖拽的新控件元素 @@ -71,7 +34,8 @@ export function useDragula(designerHostService: DesignerHostService): UseDragula } } if (target.componentInstance && target.componentInstance.value.canAccepts) { - const draggingContext = getComponentResolveContext(element, target, sourceContainer); + const dragResolveUtil = dragResolveService(designerHostService); + const draggingContext = dragResolveUtil.getComponentResolveContext(element, sourceContainer, target); return target.componentInstance.value.canAccepts(draggingContext); } @@ -200,7 +164,7 @@ export function useDragula(designerHostService: DesignerHostService): UseDragula * @param source 原容器元素 * @param sibling 目标位置的下一个同级元素 */ - function createControlFromOutside( + function createControlFromOutside1( element: DesignerHTMLElement, target: DesignerHTMLElement, source: HTMLElement, @@ -212,9 +176,9 @@ export function useDragula(designerHostService: DesignerHostService): UseDragula const featureString = element.getAttribute('data-feature'); const label = String(element.innerText); const parentComponentInstance = target.componentInstance.value; - const baseContext = { componentType, label, parentComponentInstance, targetPosition } as ResolveComponentContext; + const baseContext = { componentType, label, parentComponentInstance, targetPosition } as DraggingResolveContext; const extendContext = featureString ? JSON.parse(featureString) : {}; - const resolveContext = Object.assign(baseContext, extendContext) as ResolveComponentContext; + const resolveContext = Object.assign(baseContext, extendContext) as DraggingResolveContext; const newComponentSchema = target.componentInstance.value.addNewChildComponentSchema(resolveContext, designerHostService); addNewControlToTarget(target, newComponentSchema, sibling); } @@ -223,7 +187,60 @@ export function useDragula(designerHostService: DesignerHostService): UseDragula target.removeChild(element); } } + /** + * 从控件工具箱中拖拽新建控件 + * @param element 拖拽的元素 + * @param target 目标容器元素 + * @param source 原容器元素 + * @param sibling 目标位置的下一个同级元素 + */ + function createControlFromOutside( + element: DesignerHTMLElement, + target: DesignerHTMLElement, + source: DesignerHTMLElement, + sibling: DesignerHTMLElement + ) { + const dragResolveUtil = dragResolveService(designerHostService); + dragResolveUtil.resolveComponentCreationContextByDrop(element, source, target).then(componentResolveContext => { + if (!componentResolveContext) { + return; + } + + const sourceControlSchema = componentResolveContext.componentSchema; + if (sourceControlSchema) { + addNewControlToTarget(target, sourceControlSchema, sibling); + } + }); + + + // if (target.componentInstance.value.addNewChildComponentSchema) { + // target.componentInstance.value.addNewChildComponentSchema(element, target, designerHostService).then(componentResolveContext => { + // if (!componentResolveContext) { + // return; + // } + + // const sourceControlSchema = componentResolveContext.componentSchema; + // if (sourceControlSchema) { + // addNewControlToTarget(target, sourceControlSchema, sibling); + // } + // }) + // // const targetPosition = getNewControlTargetPosition(target, sibling); + // // const componentType = String(element.getAttribute('data-controltype')); + // // const featureString = element.getAttribute('data-feature'); + // // const label = String(element.innerText); + // // const parentComponentInstance = target.componentInstance.value; + // // const baseContext = { componentType, label, parentComponentInstance, targetPosition } as DraggingResolveContext; + // // const extendContext = featureString ? JSON.parse(featureString) : {}; + // // const resolveContext = Object.assign(baseContext, extendContext) as DraggingResolveContext; + // // const newComponentSchema = target.componentInstance.value.addNewChildComponentSchema(resolveContext, designerHostService); + // // addNewControlToTarget(target, newComponentSchema, sibling); + // } + // 移除拷贝生成的源DOM + if (target.contains(element)) { + target.removeChild(element); + } + } /** * 在现有的表单中拖拽移动控件位置 * @param element 拖拽的元素 @@ -305,7 +322,7 @@ export function useDragula(designerHostService: DesignerHostService): UseDragula dragBetweenCurrentForm(element, target, source, sibling); } else { // 移除拷贝生成的源DOM - + if (target.contains(element)) { target.removeChild(element); } diff --git a/packages/ui-vue/components/designer-canvas/src/composition/rule/use-dragula-common-rule.ts b/packages/ui-vue/components/designer-canvas/src/composition/rule/use-dragula-common-rule.ts index c58b57e7650..0d6b69c7c66 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/rule/use-dragula-common-rule.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/rule/use-dragula-common-rule.ts @@ -22,14 +22,14 @@ export function useDragulaCommonRule() { const belongedComponent = designerHostService?.formSchemaUtils.getComponentById(targetCmpInstance.belongedComponentId); // 限制输入类控件的可接收容器 - if (draggingContext.controlCategory === 'input' || draggingContext.controlType === 'form-group') { + if (draggingContext.componentCategory === 'input' || draggingContext.componentType === 'form-group') { if (![DgControl['response-layout-item'].type, DgControl['response-form'].type].includes(targetContainerType)) { return false; } } // 限制标签页区域、分组面板的可接收容器 - if (draggingContext.controlType === DgControl.tabs.type || draggingContext.controlType === DgControl.section.type) { + if (draggingContext.componentType === DgControl.tabs.type || draggingContext.componentType === DgControl.section.type) { const belongedComponentType = belongedComponent?.componentType; if (belongedComponentType !== 'frame') { return false; diff --git a/packages/ui-vue/components/designer-canvas/src/composition/rule/use-template-rule.ts b/packages/ui-vue/components/designer-canvas/src/composition/rule/use-template-rule.ts index 4e658ffe54b..93c1c87835d 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/rule/use-template-rule.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/rule/use-template-rule.ts @@ -21,7 +21,7 @@ export class UseTemplateDragAndDropRules { return dragDropRule; } const componentContext = this.getComponentContext(designItemContext); - const {componentClassList} = componentContext; + const { componentClassList } = componentContext; componentClassList.forEach(componentClass => { if (!componentClass || !dragTemplateRules[componentClass]) { @@ -54,15 +54,15 @@ export class UseTemplateDragAndDropRules { // 判断子级节点是否匹配 if (ruleContext.firstLevelChild) { if (ruleContext.firstLevelChild.class) { - const {firstLevelChildClassList} = componentContext; + const { firstLevelChildClassList } = componentContext; if (firstLevelChildClassList && !firstLevelChildClassList.includes(ruleContext.firstLevelChild.class)) { isMatched = false; continue; } } if (ruleContext.firstLevelChild.type) { - const {firstLevelChildSchema} = componentContext; - if (firstLevelChildSchema && firstLevelChildSchema.type !== ruleContext.firstLevelChild.type) { + const { firstLevelChildSchema } = componentContext; + if (!firstLevelChildSchema || firstLevelChildSchema.type !== ruleContext.firstLevelChild.type) { isMatched = false; continue; } @@ -72,15 +72,15 @@ export class UseTemplateDragAndDropRules { // 判断孙子节点是否匹配 if (ruleContext.secondLevelChild) { if (ruleContext.secondLevelChild.class) { - const {secondLevelChildClassList} = componentContext; + const { secondLevelChildClassList } = componentContext; if (secondLevelChildClassList && !secondLevelChildClassList.includes(ruleContext.secondLevelChild.class)) { isMatched = false; continue; } } if (ruleContext.secondLevelChild.type) { - const {secondLevelChildSchema} = componentContext; - if (secondLevelChildSchema && secondLevelChildSchema.type !== ruleContext.secondLevelChild.type) { + const { secondLevelChildSchema } = componentContext; + if (!secondLevelChildSchema || secondLevelChildSchema.type !== ruleContext.secondLevelChild.type) { isMatched = false; continue; } @@ -90,14 +90,14 @@ export class UseTemplateDragAndDropRules { // 判断父级节点是否匹配 if (ruleContext.parent) { if (ruleContext.parent.class) { - const {parentClassList} = componentContext; + const { parentClassList } = componentContext; if (parentClassList && !parentClassList.includes(ruleContext.parent.class)) { isMatched = false; continue; } } if (ruleContext.parent.type) { - const {parentSchema} = componentContext; + const { parentSchema } = componentContext; if (parentSchema && parentSchema.type !== ruleContext.parent.type) { isMatched = false; continue; diff --git a/packages/ui-vue/components/designer-canvas/src/composition/types.ts b/packages/ui-vue/components/designer-canvas/src/composition/types.ts index 640cd6a5b11..f53afe54199 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/types.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/types.ts @@ -1,5 +1,6 @@ +import { DesignFormVariable, DesignViewModelField, FormSchemaEntity, FormSchemaEntityField } from "../../../common/entity/entity-schema"; import { Ref } from "vue"; -import { ComponentSchema, DesignerComponentInstance, ResolveComponentContext } from "../types"; +import { ComponentSchema, DesignerComponentInstance } from "../types"; export interface DesignerHTMLElement extends HTMLElement { /** 记录各子元素对应的控件schema json的集合,用于container类dom节点 */ @@ -27,54 +28,61 @@ export interface DesignerHostService { metadataService?: any; [key: string]: any; } +/** + * 绑定上下文 + */ + export interface ComponentBindingSourceContext { + /** 控件绑定类型:字段|实体 */ + bindingType: 'field' | 'entity'; + /** 控件绑定的实体schema字段 */ + entityFieldNode?: FormSchemaEntityField; + /** 控件绑定的实体schema字段若是关联带出字段,此属性记录关联字段所属的根字段 */ + entityRootFieldNode?: FormSchemaEntityField; + /** 实体schema字段对应的DesignViewModel结构 */ + designViewModelField?: DesignViewModelField; + /** 变量字段节点 */ + variableFieldNode?: DesignFormVariable; + /** 要绑定的实体 */ + bindingEntity?: FormSchemaEntity; + /** 要绑定的字段集合 */ + bindingEntityFields?: FormSchemaEntityField[]; + /** 实体在视图模型中的绑定信息 */ + bindTo?: string +} + /** * 拖拽上下文 */ export interface DraggingResolveContext { - sourceElement?: DesignerHTMLElement; - sourceContainer?: DesignerHTMLElement; - targetContainer?: DesignerHTMLElement; - - /** - * 拖拽来源 - * @summary - * 控件工具箱control/实体树字段field/实体树实体entity/ 现有控件移动位置move - */ - sourceType?: 'control' | 'field' | 'entity' | 'move'; - - /** - * 拖拽控件类型 - */ - controlType?: string | null; - - /** - * 拖拽控件的中文类型名称 - */ - controlTypeName?: string | null; - /** - * 拖拽控件分类 - */ - controlCategory?: string | null; - - /** - * 绑定对象类型(字段/实体/小部件) - */ - bindingType?: 'field' | 'entity' | 'widget'; - - /** - * 目标容器的组件实例 - */ - parentComponentInstance?: any; - - /** - * 要添加的控件Schema - */ + /** 拖拽的源元素 */ + sourceElement: DesignerHTMLElement; + /** 拖拽的源元素父容器 */ + sourceContainer: DesignerHTMLElement; + /** 拖拽的目标容器 */ + targetContainer: DesignerHTMLElement; + + /** 拖拽的控件类型 */ + componentType: string; + /** 拖拽的控件名称 */ + label: string; + /** 拖拽目标区域的组件实例 */ + parentComponentInstance: DesignerComponentInstance; + /** 拖拽位置在目标区域的索引值 */ + targetPosition?: number; + /** 拖拽控件的类别 */ + componentCategory?: string; + /** 拖拽来源:控件工具箱control / 实体树字段field / 实体树实体entity / 现有控件移动位置move */ + sourceType: string; + /** 工具箱中的控件,启用的特性 */ + componentFeature?: string; + /** 要添加的控件Schema */ componentSchema?: any; - /** 工具箱中的控件,启用的特性 */ - controlFeature?: any; + /** 绑定信息 */ + bindingSourceContext?: ComponentBindingSourceContext | null; + // [propName: string]: any; } export interface UseDesignerRules { @@ -94,7 +102,7 @@ export interface UseDesignerRules { /** * 容器接收新创建的子控件 */ - onResolveNewComponentSchema?: (resolveContext: ResolveComponentContext, compnentSchema: ComponentSchema) => ComponentSchema; + onResolveNewComponentSchema?: (resolveContext: DraggingResolveContext, componentSchema: ComponentSchema) => ComponentSchema; /** * 移动控件后事件:在可视化设计器中,容器接收控件后调用此事件 diff --git a/packages/ui-vue/components/designer-canvas/src/designer-canvas.component.tsx b/packages/ui-vue/components/designer-canvas/src/designer-canvas.component.tsx index 298b369be44..fbbb54cb666 100644 --- a/packages/ui-vue/components/designer-canvas/src/designer-canvas.component.tsx +++ b/packages/ui-vue/components/designer-canvas/src/designer-canvas.component.tsx @@ -9,6 +9,7 @@ import FDesignerItem from './components/designer-item.component'; import './composition/class/designer-canvas.css'; import './composition/class/control.css'; import { loadDesignerRegister } from './components/maps'; +import { F_MODAL_SERVICE_TOKEN } from '../../modal'; export default defineComponent({ name: 'FDesignerCanvas', @@ -31,7 +32,9 @@ export default defineComponent({ designViewModelUtils: inject('designViewModelUtils'), controlCreatorUtils: inject('controlCreatorUtils'), metadataService: inject('Meatdata_Http_Service_Token'), - schemaService: inject('schemaService') + schemaService: inject('schemaService'), + useFormCommand: inject('useFormCommand'), + modalService: inject(F_MODAL_SERVICE_TOKEN) }; provide('designer-host-service', designerHostService); diff --git a/packages/ui-vue/components/designer-canvas/src/types.ts b/packages/ui-vue/components/designer-canvas/src/types.ts index f089ee2d8ac..26f2b80f39a 100644 --- a/packages/ui-vue/components/designer-canvas/src/types.ts +++ b/packages/ui-vue/components/designer-canvas/src/types.ts @@ -19,7 +19,7 @@ export interface ComponentSchema { export interface DesignerComponentInstance { - canAdd: boolean; + canAdd?: boolean; canMove: boolean; @@ -57,7 +57,7 @@ export interface DesignerComponentInstance { onChildElementMovedOut: (element: HTMLElement) => void; - addNewChildComponentSchema: (resolveContext: ResolveComponentContext, designerHostService?: DesignerHostService) => ComponentSchema; + addNewChildComponentSchema: (resolveContext: DraggingResolveContext, designerHostService?: DesignerHostService) => ComponentSchema; /** 组件在拖拽时是否需要将所属的Component一起拖拽,用于form、data-grid等控件的拖拽 */ triggerBelongedComponentToMoveWhenMoved?: Ref; @@ -76,19 +76,6 @@ export interface DesignerComponentInstance { } -export interface ResolveComponentContext { - - componentType: string; - - label: string; - - parentComponentInstance: DesignerComponentInstance; - - targetPosition: number; - - [propName: string]: any; -} - export interface DesignerItemContext { designerItemElementRef: Ref; diff --git a/packages/ui-vue/components/dynamic-form/src/composition/response-form-component-creator.service.ts b/packages/ui-vue/components/dynamic-form/src/composition/response-form-component-creator.service.ts index b533406f493..296ef9ed765 100644 --- a/packages/ui-vue/components/dynamic-form/src/composition/response-form-component-creator.service.ts +++ b/packages/ui-vue/components/dynamic-form/src/composition/response-form-component-creator.service.ts @@ -161,10 +161,7 @@ export class ResponseFormComponentCreatorService { fields: this.assembleViewModelFields(buildInfo), commands: [], states: [], - enableValidation: true, - pagination: { - enable: false - } + enableValidation: true }; return viewModelNode; } diff --git a/packages/ui-vue/components/dynamic-form/src/designer/response-form-use-designer-rules.ts b/packages/ui-vue/components/dynamic-form/src/designer/response-form-use-designer-rules.ts index 43b7b01840a..339a0074fa7 100644 --- a/packages/ui-vue/components/dynamic-form/src/designer/response-form-use-designer-rules.ts +++ b/packages/ui-vue/components/dynamic-form/src/designer/response-form-use-designer-rules.ts @@ -1,7 +1,7 @@ import { nextTick } from "vue"; import { DesignerHostService, DesignerHTMLElement, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/rule/use-dragula-common-rule"; -import { ComponentSchema, DesignerItemContext, ResolveComponentContext } from "../../../designer-canvas/src/types"; +import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; import { getSchemaByType } from "../../../dynamic-resolver/src/schema-resolver"; import { UseTemplateDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-template-rule"; import { ResponseFormProperty } from "../property-config/form.property-config"; @@ -19,11 +19,11 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe const schemaContext = dragAndDropRules.getComponentContext(designItemContext); if (schemaContext && schemaContext.componentClassList && schemaContext.componentClassList.includes('f-form-layout') && schemaContext.componentClassList.includes('farris-form')) { // 从工具箱拖入的输入类控件 - if (draggingContext.sourceType === 'control' && draggingContext.controlCategory === 'input') { + if (draggingContext.sourceType === 'control' && draggingContext.componentCategory === 'input') { return true; } // 画布中移动位置的输入类控件 - if (draggingContext.sourceType === 'move' && draggingContext.controlType === 'form-group') { + if (draggingContext.sourceType === 'move' && draggingContext.componentType === 'form-group') { return true; } return false; @@ -105,7 +105,7 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe } } - function onResolveNewComponentSchema(resolveContext: ResolveComponentContext, componentSchema: ComponentSchema): ComponentSchema { + function onResolveNewComponentSchema(resolveContext: DraggingResolveContext, componentSchema: ComponentSchema): ComponentSchema { const component = schema; // 控件本身样式 const componentClass = component.appearance && component.appearance.class || ''; diff --git a/packages/ui-vue/components/dynamic-form/src/schema/schema-resolver.ts b/packages/ui-vue/components/dynamic-form/src/schema/schema-resolver.ts index 4d72581c117..bb8472a8255 100644 --- a/packages/ui-vue/components/dynamic-form/src/schema/schema-resolver.ts +++ b/packages/ui-vue/components/dynamic-form/src/schema/schema-resolver.ts @@ -12,11 +12,11 @@ export function schemaResolver(resolver: DynamicResolver, schema: Record, defaultSchema: Record, propKey: string) => { + Object.keys(schemaValue).reduce((resolvedSchema: Record, propKey: string) => { // 解决属性是对象类型,默认值被冲掉的情况 // 增加非判断,解决针对属性时对象,但是schemaValue=null或者undefined情况 if (resolvedSchema[propKey] && isPlainObject(resolvedSchema[propKey]) && (isPlainObject(schemaValue[propKey]||!schemaValue[propKey]))) { diff --git a/packages/ui-vue/components/property-panel/src/composition/type.ts b/packages/ui-vue/components/property-panel/src/composition/type.ts index 63548348861..5b376248a90 100644 --- a/packages/ui-vue/components/property-panel/src/composition/type.ts +++ b/packages/ui-vue/components/property-panel/src/composition/type.ts @@ -76,19 +76,7 @@ export interface FormUnifiedColumnLayout { uniqueColClassInLG: number; uniqueColClassInEL: number; } -/** - * dom Json ViewModel 节点中states实体 - */ -export declare class FormVariable { - id: string; - code: string; - name: string; - value?: any; - type: string; - category: string; - fields?: any[]; - defaultValue?: any; -} + export interface IPropertyConfig { getPropertyConfig(propertyData: any, eventsEditorUtils: any); } diff --git a/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar-item.design.component.tsx b/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar-item.design.component.tsx index 9ca842eed1c..e125fbcf2da 100644 --- a/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar-item.design.component.tsx +++ b/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar-item.design.component.tsx @@ -4,11 +4,12 @@ import { ResponseToolbarItemDesignProps, responseToolbarItemDesignProps } from ' import { ResponseToolbarDropDownItem } from '../types/response-toolbar-dropdwon-item'; import { useIcon } from '../composition/use-icon'; import { useToolbarItem } from '../composition/use-toolbar-item'; -import { ComponentSchema, DesignerItemContext, ResolveComponentContext } from '../../../designer-canvas/src/types'; +import { ComponentSchema, DesignerItemContext } from '../../../designer-canvas/src/types'; import { getSchemaByType } from '../../../dynamic-resolver/src/schema-resolver'; import { useDesignerItemRules } from './use-designer-item-rules'; import { useDesignerInnerComponent } from '@farris/ui-vue/components/designer-canvas'; import { getCustomClass } from '@farris/ui-vue/components/common'; +import { DraggingResolveContext } from '../../../designer-canvas/src/composition/types'; const { buildResponseToolbarItems } = useToolbarItem(); export default defineComponent({ @@ -93,7 +94,7 @@ export default defineComponent({ const toolbarItem = buttons[index]; designItemContext?.setupContext?.emit('selectionChange', 'response-toolbar-item', toolbarItem, props.componentId, componentInstance.value); } - const createComponentSchema = function (resolveContext: ResolveComponentContext) { + const createComponentSchema = function (resolveContext: DraggingResolveContext) { const { componentType } = resolveContext; const componentSchema = getSchemaByType(componentType, resolveContext) as ComponentSchema; const typePrefix = componentType.toLowerCase().replace('-', '_'); @@ -107,7 +108,7 @@ export default defineComponent({ componentType: 'response-toolbar-item', parentComponentInstance: componentInstance.value, targetPosition: -1 - } as ResolveComponentContext; + } as DraggingResolveContext; return createComponentSchema(resolveContext); }; function onResponseToolbarItemClick(payload: MouseEvent, toolbarItemId: string) { diff --git a/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar.design.component.tsx b/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar.design.component.tsx index b4a01494136..a24d393320a 100644 --- a/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar.design.component.tsx +++ b/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar.design.component.tsx @@ -6,13 +6,13 @@ import { ResponseToolbarDropDownItem } from '../types/response-toolbar-dropdwon- import { ResponseToolbarItem } from '../types/response-toolbar-item'; import { useIcon } from '../composition/use-icon'; import getDropdown from './toolbar-dropdown.design.component'; -import { ComponentSchema, DesignerItemContext, ResolveComponentContext } from '../../../designer-canvas/src/types'; +import { ComponentSchema, DesignerItemContext } from '../../../designer-canvas/src/types'; import { getSchemaByType } from '../../../dynamic-resolver/src/schema-resolver'; import { useDesignerRules } from './use-designer-rules'; import FDesignerInnerItem from '../../../designer-canvas/src/components/designer-inner-item.component'; import FResponseToolbarDesignItemComponent from './response-toolbar-item.design.component'; import { getCustomClass } from '@farris/ui-vue/components/common'; -import { DesignerHostService } from '../../../designer-canvas/src/composition/types'; +import { DesignerHostService, DraggingResolveContext } from '../../../designer-canvas/src/composition/types'; export default defineComponent({ name: 'FResponseToolbarDesign', @@ -142,7 +142,7 @@ export default defineComponent({ const toolbarItem = buttons[index]; // designItemContext?.setupContext?.emit('selectionChange', 'response-toolbar-item', toolbarItem); } - const createComponentSchema = function (resolveContext: ResolveComponentContext) { + const createComponentSchema = function (resolveContext: DraggingResolveContext) { const { componentType } = resolveContext; const componentSchema = getSchemaByType(componentType, resolveContext) as ComponentSchema; const typePrefix = componentType.toLowerCase().replace('-', '_'); @@ -156,7 +156,7 @@ export default defineComponent({ componentType: 'response-toolbar-item', parentComponentInstance: componentInstance.value, targetPosition: -1 - } as ResolveComponentContext; + } as DraggingResolveContext; return createComponentSchema(resolveContext); }; function onResponseToolbarItemClick(payload: MouseEvent, toolbarItemId: string) { diff --git a/packages/ui-vue/components/response-toolbar/src/designer/toolbar-dropdown-menu.design.component.tsx b/packages/ui-vue/components/response-toolbar/src/designer/toolbar-dropdown-menu.design.component.tsx index aff42ee3d55..875c2aa46bf 100644 --- a/packages/ui-vue/components/response-toolbar/src/designer/toolbar-dropdown-menu.design.component.tsx +++ b/packages/ui-vue/components/response-toolbar/src/designer/toolbar-dropdown-menu.design.component.tsx @@ -2,9 +2,10 @@ import { Ref, getCurrentInstance, inject } from 'vue'; import { ResponseToolbarDropDownItem } from '../types/response-toolbar-dropdwon-item'; import { UseIcon } from '../composition/types'; -import { ComponentSchema, DesignerComponentInstance, DesignerItemContext, ResolveComponentContext } from '../../../../components/designer-canvas/src/types'; +import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from '../../../../components/designer-canvas/src/types'; import { ResponseToolbarItemBase } from '../types/response-toolbar-item-base'; import { getSchemaByType } from '../../../dynamic-resolver/src/schema-resolver'; +import { DraggingResolveContext } from '../../../designer-canvas/src/composition/types'; export default function (useIconComposition: UseIcon, componentInstance: Ref) { const designItemContext = inject('design-item-context') as DesignerItemContext; @@ -125,7 +126,7 @@ export default function (useIconComposition: UseIcon, componentInstance: Ref) { const alignment = ref(props.alignment); @@ -68,7 +69,7 @@ export default function (props: ResponseToolbarProps, useIconComposition: UseIco document.body.click(); item.expanded = !currentItemStatus; } - const createComponentSchema = function (resolveContext: ResolveComponentContext) { + const createComponentSchema = function (resolveContext: DraggingResolveContext) { const { componentType } = resolveContext; const componentSchema = getSchemaByType(componentType, resolveContext) as ComponentSchema; const typePrefix = componentType.toLowerCase().replace('-', '_'); @@ -82,7 +83,7 @@ export default function (props: ResponseToolbarProps, useIconComposition: UseIco componentType: 'response-toolbar-item', parentComponentInstance: componentInstance.value, targetPosition: -1 - } as ResolveComponentContext; + } as DraggingResolveContext; return createComponentSchema(resolveContext); }; function getToolbarItemById(toolbarItemId: string): { index: number; toolbarItem: ComponentSchema } { diff --git a/packages/ui-vue/components/response-toolbar/src/designer/use-designer-rules.ts b/packages/ui-vue/components/response-toolbar/src/designer/use-designer-rules.ts index c4426adea4f..75eec55346d 100644 --- a/packages/ui-vue/components/response-toolbar/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/response-toolbar/src/designer/use-designer-rules.ts @@ -1,5 +1,5 @@ import { DesignerHostService, DraggingResolveContext, UseDesignerRules } from "../../../designer-canvas/src/composition/types"; -import { ComponentSchema, DesignerItemContext, ResolveComponentContext } from "../../../designer-canvas/src/types"; +import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; import { ResponseToolbarProperty } from "../property-config/response-toolbar.property-config"; export function useDesignerRules(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { @@ -12,7 +12,7 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe return false; } - function onResolveNewComponentSchema(resolveContext: ResolveComponentContext, componentSchema: ComponentSchema): ComponentSchema { + function onResolveNewComponentSchema(resolveContext: DraggingResolveContext, componentSchema: ComponentSchema): ComponentSchema { componentSchema.text = resolveContext.label; return componentSchema; } diff --git a/packages/ui-vue/components/section/src/designer/use-designer-rules.ts b/packages/ui-vue/components/section/src/designer/use-designer-rules.ts index 3c7797434d7..5b28bd2c822 100644 --- a/packages/ui-vue/components/section/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/section/src/designer/use-designer-rules.ts @@ -7,7 +7,6 @@ import { UseTemplateDragAndDropRules } from "../../../designer-canvas/src/compos export function useDesignerRules(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { const dragAndDropRules = new UseTemplateDragAndDropRules(); - const { canMove, canAccept, canDelete } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); /** * 构造属性配置方法 */ @@ -22,19 +21,23 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe if (!basalRule) { return false; } + const { canAccept } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); return canAccept; } function checkCanDeleteComponent(): boolean { + const { canDelete } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); return canDelete; } function checkCanMoveComponent(): boolean { + const { canMove } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); return canMove; } function hideNestedPaddingInDesginerView() { + const { canMove, canDelete } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); return !canMove && !canDelete; } diff --git a/packages/ui-vue/components/section/src/schema/schema-resolver.ts b/packages/ui-vue/components/section/src/schema/schema-resolver.ts index e0d8909de6b..92a723f9b3d 100644 --- a/packages/ui-vue/components/section/src/schema/schema-resolver.ts +++ b/packages/ui-vue/components/section/src/schema/schema-resolver.ts @@ -20,7 +20,7 @@ function wrapContainerForSection(resolver: DynamicResolver, sectionSchema: Recor class: 'f-section-in-mainsubcard' }, enableAccordion: false, - mainTitle: sectionSchema.mainTitle || '标题' + mainTitle: context.mainTitle || sectionSchema.mainTitle || '标题' }); const containerSchema = resolver.getSchemaByType('content-container') as ComponentSchema; diff --git a/packages/ui-vue/components/tabs/src/designer/tab-header.design.component.tsx b/packages/ui-vue/components/tabs/src/designer/tab-header.design.component.tsx index a8ac00cba55..a6081264118 100644 --- a/packages/ui-vue/components/tabs/src/designer/tab-header.design.component.tsx +++ b/packages/ui-vue/components/tabs/src/designer/tab-header.design.component.tsx @@ -1,10 +1,10 @@ import { Ref, ShallowRef, computed } from "vue"; import { TabsProps } from "../tabs.props"; -import { TabPageContext, UseDesignTabs, UseNav, UseOnePage, UseTabs } from "../composition/types"; +import { TabPageContext, UseDesignTabs, UseNav, UseOnePage } from "../composition/types"; import renderTabHeaderItem from './tab-header-item.design.component'; -import { ComponentSchema, DesignerComponentInstance, ResolveComponentContext } from "../../../designer-canvas/src/types"; +import { ComponentSchema, DesignerComponentInstance } from "../../../designer-canvas/src/types"; import { getSchemaByType } from "../../../dynamic-resolver/src/schema-resolver"; import { UseDesignerRules } from "../../../designer-canvas/src/composition/types"; diff --git a/packages/ui-vue/components/tree-grid/src/designer/use-designer-rules.ts b/packages/ui-vue/components/tree-grid/src/designer/use-designer-rules.ts index 9eaabac0152..eb25976f3af 100644 --- a/packages/ui-vue/components/tree-grid/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/tree-grid/src/designer/use-designer-rules.ts @@ -18,7 +18,7 @@ export function useDesignerRulesForTreeGrid(designItemContext: DesignerItemConte function canAccepts(draggingContext: DraggingResolveContext): boolean { // 接收工具箱中拖拽来的输入类控件 if (draggingContext && draggingContext.sourceType === 'control') { - return draggingContext.controlCategory === 'input'; + return draggingContext.componentCategory === 'input'; } return false; } -- Gitee From dac7eb49ab526b21d45fc324eb85185c535eafbd Mon Sep 17 00:00:00 2001 From: wang-xh Date: Sat, 21 Dec 2024 14:22:58 +0800 Subject: [PATCH 035/181] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=A0=BC=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui-vue/components/common/entity/entity-schema.ts | 2 +- .../components/component/src/designer/use-designer-rules.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui-vue/components/common/entity/entity-schema.ts b/packages/ui-vue/components/common/entity/entity-schema.ts index fb5eef41a49..30e62037ec6 100644 --- a/packages/ui-vue/components/common/entity/entity-schema.ts +++ b/packages/ui-vue/components/common/entity/entity-schema.ts @@ -271,4 +271,4 @@ export interface DesignFormVariable extends FormVariable { * 分组名称 */ groupName: string; -} \ No newline at end of file +} diff --git a/packages/ui-vue/components/component/src/designer/use-designer-rules.ts b/packages/ui-vue/components/component/src/designer/use-designer-rules.ts index 07c3b51631f..be4230535ac 100644 --- a/packages/ui-vue/components/component/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/component/src/designer/use-designer-rules.ts @@ -119,7 +119,7 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe function onRemoveComponent() { removeAddDeleteBtnOnParentContainer(); removeGlobalConfigs(); - removeViewModelComponent() + removeViewModelComponent(); } return { canAccepts, checkCanDeleteComponent, checkCanMoveComponent, hideNestedPaddingInDesginerView, getStyles, getPropsConfig, onRemoveComponent }; } -- Gitee From 8ae1dbf04a54dd1ac23a8d34cb9b31d3e444f099 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Sat, 21 Dec 2024 15:31:01 +0800 Subject: [PATCH 036/181] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../composition/use-entity-tree.ts | 6 ++-- .../entity-binding-selector.component.tsx | 8 ++--- .../entity-binding-selector.props.ts | 0 .../{drag-resolver => }/drag-resolve.tsx | 6 ++-- .../entity-binding-selector/index.ts | 32 ------------------- 5 files changed, 10 insertions(+), 42 deletions(-) rename packages/ui-vue/components/designer-canvas/src/{composition/function/drag-resolver/entity-binding-selector/src => components/entity-binding-selector}/composition/use-entity-tree.ts (88%) rename packages/ui-vue/components/designer-canvas/src/{composition/function/drag-resolver/entity-binding-selector/src => components/entity-binding-selector}/entity-binding-selector.component.tsx (91%) rename packages/ui-vue/components/designer-canvas/src/{composition/function/drag-resolver/entity-binding-selector/src => components/entity-binding-selector}/entity-binding-selector.props.ts (100%) rename packages/ui-vue/components/designer-canvas/src/composition/function/{drag-resolver => }/drag-resolve.tsx (94%) delete mode 100644 packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/index.ts diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/composition/use-entity-tree.ts b/packages/ui-vue/components/designer-canvas/src/components/entity-binding-selector/composition/use-entity-tree.ts similarity index 88% rename from packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/composition/use-entity-tree.ts rename to packages/ui-vue/components/designer-canvas/src/components/entity-binding-selector/composition/use-entity-tree.ts index 946d82c778a..29bbdf7ff5f 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/composition/use-entity-tree.ts +++ b/packages/ui-vue/components/designer-canvas/src/components/entity-binding-selector/composition/use-entity-tree.ts @@ -1,6 +1,6 @@ -import { FormSchemaEntity } from "../../../../../../../../common/entity/entity-schema"; -import { ComponentBindingSourceContext } from "../../../../../../../../designer-canvas/src/composition/types"; -import { cloneDeep } from "lodash"; +import { FormSchemaEntity } from "../../../../../common/entity/entity-schema"; +import { ComponentBindingSourceContext } from "../../../../../designer-canvas/src/composition/types"; +import { cloneDeep } from "lodash-es"; import { EntityBindingSelectorProps } from "../entity-binding-selector.props"; export function useEntityTree(props: EntityBindingSelectorProps) { diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/entity-binding-selector.component.tsx b/packages/ui-vue/components/designer-canvas/src/components/entity-binding-selector/entity-binding-selector.component.tsx similarity index 91% rename from packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/entity-binding-selector.component.tsx rename to packages/ui-vue/components/designer-canvas/src/components/entity-binding-selector/entity-binding-selector.component.tsx index 151c1e4b399..a3efb0ec92c 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/entity-binding-selector.component.tsx +++ b/packages/ui-vue/components/designer-canvas/src/components/entity-binding-selector/entity-binding-selector.component.tsx @@ -1,10 +1,10 @@ import { ref, defineComponent, onBeforeMount, onMounted } from "vue"; -import { FNotifyService } from "../../../../../../../notify"; +import { FNotifyService } from "../../../../notify"; import { entityBindingSelectorProps, EntityBindingSelectorProps } from "./entity-binding-selector.props"; -import { FTreeGrid } from '../../../../../../../tree-grid'; -import { RowOptions, VisualData } from "../../../../../../../data-view"; +import { FTreeGrid } from '../../../../tree-grid'; +import { RowOptions, VisualData } from "../../../../data-view"; import { useEntityTree } from "./composition/use-entity-tree"; -import { ComponentBindingSourceContext } from "../../../../types"; +import { ComponentBindingSourceContext } from "../../composition/types"; export default defineComponent({ diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/entity-binding-selector.props.ts b/packages/ui-vue/components/designer-canvas/src/components/entity-binding-selector/entity-binding-selector.props.ts similarity index 100% rename from packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/src/entity-binding-selector.props.ts rename to packages/ui-vue/components/designer-canvas/src/components/entity-binding-selector/entity-binding-selector.props.ts diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/drag-resolve.tsx b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolve.tsx similarity index 94% rename from packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/drag-resolve.tsx rename to packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolve.tsx index bd19cd6a46d..ab00d8cc973 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/drag-resolve.tsx +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolve.tsx @@ -1,6 +1,6 @@ -import { ModalFunctions } from "../../../../../modal/src/composition/type"; -import { ComponentBindingSourceContext, DesignerHostService, DesignerHTMLElement, DraggingResolveContext } from "../../types"; -import EntityBindingSelectorComponent from './entity-binding-selector/src/entity-binding-selector.component'; +import { ModalFunctions } from "../../../../modal/src/composition/type"; +import { ComponentBindingSourceContext, DesignerHostService, DesignerHTMLElement, DraggingResolveContext } from "../types"; +import EntityBindingSelectorComponent from '../../components/entity-binding-selector/entity-binding-selector.component'; export function dragResolveService(designerHostService: DesignerHostService) { /** 弹窗实例 */ diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/index.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/index.ts deleted file mode 100644 index 47b80a210ae..00000000000 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolver/entity-binding-selector/index.ts +++ /dev/null @@ -1,32 +0,0 @@ - -/** - * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import type { App, Plugin } from 'vue'; -import EntityBindingSelector from './src/entity-binding-selector.component'; -import { entityBindingSelectorProps } from './src/entity-binding-selector.props'; - -export * from './src/entity-binding-selector.props'; - -EntityBindingSelector.install = (app: App) => { - app.component(EntityBindingSelector.name as string, EntityBindingSelector); -}; -EntityBindingSelector.register = (componentMap: Record, propsResolverMap: Record, configResolverMap: Record, resolverMap: Record) => { - componentMap['entity-binding-selector'] = EntityBindingSelector; - propsResolverMap['entity-binding-selector'] = entityBindingSelectorProps; -}; -export { EntityBindingSelector }; - -export default EntityBindingSelector as typeof EntityBindingSelector & Plugin; -- Gitee From 06d0d6f796405aab9a832f607270a60d2146aefa Mon Sep 17 00:00:00 2001 From: wang-xh Date: Sat, 21 Dec 2024 15:39:37 +0800 Subject: [PATCH 037/181] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer-canvas/src/composition/function/use-dragula.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts index e339aa35c19..fede310f8dd 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts @@ -4,7 +4,7 @@ import { findIndex } from 'lodash-es'; import { ref } from 'vue'; import { canvasChanged } from '../designer-canvas-changed'; import { ComponentSchema } from '../../types'; -import { dragResolveService } from './drag-resolver/drag-resolve'; +import { dragResolveService } from './drag-resolve'; export function useDragula(designerHostService: DesignerHostService): UseDragula { -- Gitee From 7589c29a1dc3ab2d34dd3ac1f70d67976098240f Mon Sep 17 00:00:00 2001 From: wang-xh Date: Sat, 21 Dec 2024 16:17:28 +0800 Subject: [PATCH 038/181] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=8B=96?= =?UTF-8?q?=E6=8B=BD=E6=99=AE=E9=80=9A=E6=8E=A7=E4=BB=B6=E6=97=B6=E7=94=9F?= =?UTF-8?q?=E6=88=90schema=E7=9A=84=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/data-grid/src/schema/schema-resolver.ts | 2 +- .../src/composition/function/drag-resolve.tsx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/ui-vue/components/data-grid/src/schema/schema-resolver.ts b/packages/ui-vue/components/data-grid/src/schema/schema-resolver.ts index 749dace5b95..b023e0d1497 100644 --- a/packages/ui-vue/components/data-grid/src/schema/schema-resolver.ts +++ b/packages/ui-vue/components/data-grid/src/schema/schema-resolver.ts @@ -5,7 +5,7 @@ import { DesignerComponentInstance } from "../../../designer-canvas/src/types"; import { DynamicResolver } from "../../../dynamic-resolver"; import { DataGridComponentCreatorService } from "../composition/data-grid-component-creator.service"; -export function schemaResolver(resolver: DynamicResolver, schema: Record, context: DraggingResolveContext, designerHostService?: DesignerHostService): Record { +export function schemaResolver(resolver: DynamicResolver, schema: Record, context: Record, designerHostService?: DesignerHostService): Record { const parentComponentInstance = context.parentComponentInstance as DesignerComponentInstance; if (parentComponentInstance && designerHostService) { const radomNumber = Math.random().toString(36).slice(2, 6); diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolve.tsx b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolve.tsx index ab00d8cc973..ba45c5e8553 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolve.tsx +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolve.tsx @@ -24,7 +24,7 @@ export function dragResolveService(designerHostService: DesignerHostService) { sourceElement, sourceContainer, targetContainer, - bindingSourceContext: undefined + bindingSourceContext: null }; // 现有控件移动位置:从控件实例上获取控件类型 @@ -44,12 +44,13 @@ export function dragResolveService(designerHostService: DesignerHostService) { } } function onCancelEntitySelector() { + componentResolveContext.bindingSourceContext = undefined; if (modalEditorRef?.modalRef?.value.close) { modalEditorRef?.modalRef?.value.close(); } } - function renderComponent() { + function renderEntityComponent() { return () => (<> ); } @@ -61,7 +62,7 @@ export function dragResolveService(designerHostService: DesignerHostService) { height: 500, fitContent: false, showButtons: false, - render: renderComponent(), + render: renderEntityComponent(), closedCallback: () => { resolve(componentResolveContext); }, -- Gitee From ef2a8e2f8e8b9081cf519928723459f79c3c0432 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Mon, 23 Dec 2024 11:41:38 +0800 Subject: [PATCH 039/181] =?UTF-8?q?fix:=20=E4=BB=8E=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E7=AE=B1=E6=8B=96=E6=8B=BD=E8=BE=93=E5=85=A5=E7=B1=BB=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E6=94=AF=E6=8C=81=E5=BC=B9=E5=87=BA=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=AD=97=E6=AE=B5=E7=9A=84=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../avatar/src/schema/avatar.schema.json | 9 +- .../src/schema/check-group.schema.json | 6 + .../checkbox/src/schema/checkbox.schema.json | 7 +- .../src/schema/combo-list.schema.json | 11 +- .../src/binding-selector.component.tsx | 1 + .../src/binding-selector.props.ts | 3 +- .../binding-selector-container.component.tsx | 28 ++++- .../src/schema/date-picker.schema.json | 17 +-- .../src/composition/function/drag-resolve.tsx | 110 +++++++++++++++++- .../src/composition/function/use-dragula.ts | 57 --------- .../dynamic-form-group.props.ts | 1 - .../response-form-layout-setting.props.ts | 2 +- .../response-form-use-designer-rules.ts | 39 +++++-- .../form-group.property-config.json | 71 ----------- ...ig.ts => response-form.property-config.ts} | 0 .../dynamic-form/src/response-form.props.ts | 6 +- ...er.ts => response-form-schema-resolver.ts} | 2 +- ....schema.json => response-form.schema.json} | 0 .../src/schema/input-group.schema.json | 6 + .../lookup/src/schema/lookup.schema.json | 7 +- .../src/schema/number-spinner.schema.json | 7 +- .../src/composition/entity/base-property.ts | 2 +- .../src/schema/radio-group.schema.json | 7 +- .../textarea/src/schema/textarea.schema.json | 9 +- .../src/schema/time-picker.schema.json | 7 +- 25 files changed, 236 insertions(+), 179 deletions(-) delete mode 100644 packages/ui-vue/components/dynamic-form/src/property-config/form-group.property-config.json rename packages/ui-vue/components/dynamic-form/src/property-config/{form.property-config.ts => response-form.property-config.ts} (100%) rename packages/ui-vue/components/dynamic-form/src/schema/{schema-resolver.ts => response-form-schema-resolver.ts} (89%) rename packages/ui-vue/components/dynamic-form/src/schema/{form.schema.json => response-form.schema.json} (100%) diff --git a/packages/ui-vue/components/avatar/src/schema/avatar.schema.json b/packages/ui-vue/components/avatar/src/schema/avatar.schema.json index 11f4734ab93..849110ff829 100644 --- a/packages/ui-vue/components/avatar/src/schema/avatar.schema.json +++ b/packages/ui-vue/components/avatar/src/schema/avatar.schema.json @@ -65,13 +65,16 @@ "description": "", "type": "boolean", "default": true - } + } }, "required": [ "id", "type" ], - "ignore":[ - "id","appearance","binding" + "ignore": [ + "id", + "appearance", + "binding", + "visible" ] } \ No newline at end of file diff --git a/packages/ui-vue/components/checkbox/src/schema/check-group.schema.json b/packages/ui-vue/components/checkbox/src/schema/check-group.schema.json index 6c538b842a4..3c641b27f05 100644 --- a/packages/ui-vue/components/checkbox/src/schema/check-group.schema.json +++ b/packages/ui-vue/components/checkbox/src/schema/check-group.schema.json @@ -75,5 +75,11 @@ "required": [ "id", "type" + ], + "ignore": [ + "id", + "appearance", + "binding", + "visible" ] } \ No newline at end of file diff --git a/packages/ui-vue/components/checkbox/src/schema/checkbox.schema.json b/packages/ui-vue/components/checkbox/src/schema/checkbox.schema.json index a56cbfe290a..d59556d5140 100644 --- a/packages/ui-vue/components/checkbox/src/schema/checkbox.schema.json +++ b/packages/ui-vue/components/checkbox/src/schema/checkbox.schema.json @@ -76,7 +76,10 @@ "id", "type" ], - "ignore":[ - "id","appearance","binding","type" + "ignore": [ + "id", + "appearance", + "binding", + "visible" ] } \ No newline at end of file diff --git a/packages/ui-vue/components/combo-list/src/schema/combo-list.schema.json b/packages/ui-vue/components/combo-list/src/schema/combo-list.schema.json index 8be4d9f7909..04914c52ed4 100644 --- a/packages/ui-vue/components/combo-list/src/schema/combo-list.schema.json +++ b/packages/ui-vue/components/combo-list/src/schema/combo-list.schema.json @@ -81,10 +81,10 @@ "type": "string", "default": "name" }, - "data":{ + "data": { "description": "", "type": "array" - }, + }, "readonly": { "description": "", "type": "boolean", @@ -130,7 +130,10 @@ "id", "type" ], - "ignore":[ - "id","appearance","binding" + "ignore": [ + "id", + "appearance", + "binding", + "visible" ] } \ No newline at end of file diff --git a/packages/ui-vue/components/common/editor/binding-selector/src/binding-selector.component.tsx b/packages/ui-vue/components/common/editor/binding-selector/src/binding-selector.component.tsx index 684949e7ba6..ae20b84de78 100644 --- a/packages/ui-vue/components/common/editor/binding-selector/src/binding-selector.component.tsx +++ b/packages/ui-vue/components/common/editor/binding-selector/src/binding-selector.component.tsx @@ -46,6 +46,7 @@ export default defineComponent({ onBindingTypeChange={onBindingTypeChanged} editorParams={props.editorParams} bindingType={props.bindingType} + showCustomFooter={false} >; } diff --git a/packages/ui-vue/components/common/editor/binding-selector/src/binding-selector.props.ts b/packages/ui-vue/components/common/editor/binding-selector/src/binding-selector.props.ts index d9a36356dca..156bb860d91 100644 --- a/packages/ui-vue/components/common/editor/binding-selector/src/binding-selector.props.ts +++ b/packages/ui-vue/components/common/editor/binding-selector/src/binding-selector.props.ts @@ -72,7 +72,8 @@ export const bindingSelectorProps = { editorParams: { type: Object as PropType, default: null }, onFieldSelected: { type: Function, default: null }, repositoryToken: { type: Symbol, default: null }, - + /** 是否显示自定义的底部按钮区域 */ + showCustomFooter: { type: Boolean, default: false } } as Record; diff --git a/packages/ui-vue/components/common/editor/binding-selector/src/components/binding-selector-container.component.tsx b/packages/ui-vue/components/common/editor/binding-selector/src/components/binding-selector-container.component.tsx index 6be74632b44..3bdccb19f5f 100644 --- a/packages/ui-vue/components/common/editor/binding-selector/src/components/binding-selector-container.component.tsx +++ b/packages/ui-vue/components/common/editor/binding-selector/src/components/binding-selector-container.component.tsx @@ -5,11 +5,12 @@ import FRadioGroup from '../../../../../radio-group/src/radio-group.component'; import { RowOptions, VisualData } from "../../../../../data-view"; import { FormSchemaEntityField$Type } from "../../../../../common/entity/entity-schema"; import { useFieldSelection } from "../composition/use-field-selection"; +import { FNotifyService } from "../../../../../../components/notify"; export default defineComponent({ name: 'FBindingSelectorContainer', props: bindingSelectorProps, - emits: ['selected', 'bindingTypeChange'], + emits: ['selected', 'bindingTypeChange', 'cancel', 'submit'], setup(props: BindingSelectorProps, context) { const dataSource = ref(props.data); @@ -112,11 +113,36 @@ export default defineComponent({ onSelectionChange={onSelectionChange} row-option={rowOption}>; } + function onCancel() { + context.emit('cancel'); + } + function checkBindingData(): boolean { + if (!bindingData.value || !bindingData.value.length) { + const notifyService: any = new FNotifyService(); + notifyService.globalConfig = { position: 'top-center' }; + notifyService.warning({ message: '请先选择数据' }); + return false; + } + return true; + } + function onSubmit() { + if (!checkBindingData()) { + return; + } + + context.emit('submit', { selectedData: bindingData.value[0], bindingType: bindingType.value }); + } return () => { return (
{props.bindingType.enable && renderBindingType()}
{renderTreeGrids()}
+ {props.showCustomFooter ? + : ''} +
); }; } diff --git a/packages/ui-vue/components/date-picker/src/schema/date-picker.schema.json b/packages/ui-vue/components/date-picker/src/schema/date-picker.schema.json index bb6279914ca..05ba2e4a399 100644 --- a/packages/ui-vue/components/date-picker/src/schema/date-picker.schema.json +++ b/packages/ui-vue/components/date-picker/src/schema/date-picker.schema.json @@ -66,21 +66,21 @@ "type": "boolean", "default": true }, - "displayFormat":{ + "displayFormat": { "description": "", "type": "enum", "default": "yyyy-MM-dd" }, - "valueFormat":{ + "valueFormat": { "description": "", "type": "enum", "default": "yyyy-MM-dd" - }, - "maxYear":{ + }, + "maxYear": { "description": "", "type": "number" }, - "minYear":{ + "minYear": { "description": "", "type": "number" } @@ -89,7 +89,10 @@ "id", "type" ], - "ignore":[ - "id","appearance","binding" + "ignore": [ + "id", + "appearance", + "binding", + "visible" ] } \ No newline at end of file diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolve.tsx b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolve.tsx index ba45c5e8553..5c7a75f612e 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolve.tsx +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolve.tsx @@ -1,6 +1,11 @@ import { ModalFunctions } from "../../../../modal/src/composition/type"; import { ComponentBindingSourceContext, DesignerHostService, DesignerHTMLElement, DraggingResolveContext } from "../types"; import EntityBindingSelectorComponent from '../../components/entity-binding-selector/entity-binding-selector.component'; +import BindingSelectorComponent from "../../../../common/editor/binding-selector/src/components/binding-selector-container.component"; +import { DesignViewModelField, FormVariable } from "@/components/common/entity/entity-schema"; +import { merge } from "lodash-es"; +import { DesignerComponentInstance } from "../../types"; +import { DgControl } from "../dg-control"; export function dragResolveService(designerHostService: DesignerHostService) { /** 弹窗实例 */ @@ -35,7 +40,9 @@ export function dragResolveService(designerHostService: DesignerHostService) { return resolveContext; } - + /** + * 选择绑定实体后事件 + */ function onSubmitEntitySelctor(bindingSourceContext: ComponentBindingSourceContext) { componentResolveContext.bindingSourceContext = bindingSourceContext; @@ -43,17 +50,24 @@ export function dragResolveService(designerHostService: DesignerHostService) { modalEditorRef?.modalRef?.value.close(); } } + /** + * 取消绑定实体 + */ function onCancelEntitySelector() { componentResolveContext.bindingSourceContext = undefined; if (modalEditorRef?.modalRef?.value.close) { modalEditorRef?.modalRef?.value.close(); } } - + /** + * 选择绑定实体窗口 + */ function renderEntityComponent() { return () => (<> ); } - + /** + * 弹出实体绑定窗口 + */ function triggerBindingEntity() { return new Promise((resolve, reject) => { modalEditorRef = designerHostService.modalService.open({ @@ -70,7 +84,92 @@ export function dragResolveService(designerHostService: DesignerHostService) { }); }); } + /** + * 取消绑定字段后事件 + */ + function onCancelFieldSelector() { + componentResolveContext.bindingSourceContext = undefined; + if (modalEditorRef?.modalRef?.value.close) { + modalEditorRef?.modalRef?.value.close(); + } + } + /** + * 获取控件拖拽后的分组信息,以便于后续记录到视图模型 + */ + function getFieldGroupInfo(parentComponentInstance: DesignerComponentInstance) { + let groupId = ''; + let groupName = ''; + if (DgControl['field-set'] && parentComponentInstance.schema.type === DgControl['field-set'].type) { + groupId = parentComponentInstance.schema.id; + groupName = parentComponentInstance.schema.title; + } + return { groupId, groupName }; + } + /** + * 选择绑定字段后事件 + */ + function onSubmitFieldSelctor(data: { selectedData: any, bindingType: any }) { + if (!data || !data.selectedData || !data.bindingType) { + return; + } + const { selectedData, bindingType } = data; + // 若添加到小分组内,需要向vm保存groupId和groupName + const { groupId, groupName } = getFieldGroupInfo(componentResolveContext.parentComponentInstance); + const bindingSourceContext: ComponentBindingSourceContext = { bindingType: 'field' }; + + if (bindingType === 'Form') { + // 绑定字段 + const entityField = selectedData as DesignViewModelField; + bindingSourceContext.entityFieldNode = entityField; + + bindingSourceContext.designViewModelField = merge({}, entityField, { groupId, groupName }); + componentResolveContext.bindingSourceContext = bindingSourceContext; + } else { + // 绑定变量 + const varibleField = selectedData as FormVariable; + bindingSourceContext.variableFieldNode = merge({}, varibleField, { groupId, groupName }); + componentResolveContext.bindingSourceContext = bindingSourceContext; + } + + if (modalEditorRef?.modalRef?.value.close) { + modalEditorRef?.modalRef?.value.close(); + } + } + /** + * 绑定字段弹窗 + */ + function renderFieldComponent() { + const { parentComponentInstance } = componentResolveContext; + const viewModelId = designerHostService.formSchemaUtils.getViewModelIdByComponentId(parentComponentInstance?.belongedComponentId); + const editorParams = { + viewModelId, + designerHostService, + disableOccupiedFields: true, + componentSchema: { editor: { type: componentResolveContext.componentType } } + }; + const bindingSettings = { enable: false }; + return () => (<> ); + } + /** + * 弹出绑定字段的窗口 + */ + function triggerBindingField() { + return new Promise((resolve, reject) => { + modalEditorRef = designerHostService.modalService.open({ + title: '选择绑定', + width: 800, + height: 600, + fitContent: false, + showButtons: false, + render: renderFieldComponent(), + closedCallback: () => { + resolve(componentResolveContext); + }, + draggable: true + }); + }); + } /** * 生成控件schema结构 */ @@ -87,13 +186,12 @@ export function dragResolveService(designerHostService: DesignerHostService) { switch (componentCategory) { case 'input': { - // 输入类,触发展示字段绑定窗口 + await triggerBindingField(); break; } case 'dataCollection': { - // 实体类,触发展示实体绑定窗口 await triggerBindingEntity(); - return; + break; } } diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts index fede310f8dd..1e883e0c5ef 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts @@ -156,37 +156,6 @@ export function useDragula(designerHostService: DesignerHostService): UseDragula return position; } - - /** - * 从控件工具箱中拖拽新建控件 - * @param element 拖拽的元素 - * @param target 目标容器元素 - * @param source 原容器元素 - * @param sibling 目标位置的下一个同级元素 - */ - function createControlFromOutside1( - element: DesignerHTMLElement, - target: DesignerHTMLElement, - source: HTMLElement, - sibling: DesignerHTMLElement - ) { - if (target.componentInstance.value.addNewChildComponentSchema) { - const targetPosition = getNewControlTargetPosition(target, sibling); - const componentType = String(element.getAttribute('data-controltype')); - const featureString = element.getAttribute('data-feature'); - const label = String(element.innerText); - const parentComponentInstance = target.componentInstance.value; - const baseContext = { componentType, label, parentComponentInstance, targetPosition } as DraggingResolveContext; - const extendContext = featureString ? JSON.parse(featureString) : {}; - const resolveContext = Object.assign(baseContext, extendContext) as DraggingResolveContext; - const newComponentSchema = target.componentInstance.value.addNewChildComponentSchema(resolveContext, designerHostService); - addNewControlToTarget(target, newComponentSchema, sibling); - } - // 移除拷贝生成的源DOM - if (target.contains(element)) { - target.removeChild(element); - } - } /** * 从控件工具箱中拖拽新建控件 * @param element 拖拽的元素 @@ -200,42 +169,16 @@ export function useDragula(designerHostService: DesignerHostService): UseDragula source: DesignerHTMLElement, sibling: DesignerHTMLElement ) { - const dragResolveUtil = dragResolveService(designerHostService); dragResolveUtil.resolveComponentCreationContextByDrop(element, source, target).then(componentResolveContext => { if (!componentResolveContext) { return; } - const sourceControlSchema = componentResolveContext.componentSchema; if (sourceControlSchema) { addNewControlToTarget(target, sourceControlSchema, sibling); } }); - - - // if (target.componentInstance.value.addNewChildComponentSchema) { - // target.componentInstance.value.addNewChildComponentSchema(element, target, designerHostService).then(componentResolveContext => { - // if (!componentResolveContext) { - // return; - // } - - // const sourceControlSchema = componentResolveContext.componentSchema; - // if (sourceControlSchema) { - // addNewControlToTarget(target, sourceControlSchema, sibling); - // } - // }) - // // const targetPosition = getNewControlTargetPosition(target, sibling); - // // const componentType = String(element.getAttribute('data-controltype')); - // // const featureString = element.getAttribute('data-feature'); - // // const label = String(element.innerText); - // // const parentComponentInstance = target.componentInstance.value; - // // const baseContext = { componentType, label, parentComponentInstance, targetPosition } as DraggingResolveContext; - // // const extendContext = featureString ? JSON.parse(featureString) : {}; - // // const resolveContext = Object.assign(baseContext, extendContext) as DraggingResolveContext; - // // const newComponentSchema = target.componentInstance.value.addNewChildComponentSchema(resolveContext, designerHostService); - // // addNewControlToTarget(target, newComponentSchema, sibling); - // } // 移除拷贝生成的源DOM if (target.contains(element)) { target.removeChild(element); diff --git a/packages/ui-vue/components/dynamic-form/src/component/dynamic-form-group/dynamic-form-group.props.ts b/packages/ui-vue/components/dynamic-form/src/component/dynamic-form-group/dynamic-form-group.props.ts index b07d2cc827b..7e093e52533 100644 --- a/packages/ui-vue/components/dynamic-form/src/component/dynamic-form-group/dynamic-form-group.props.ts +++ b/packages/ui-vue/components/dynamic-form/src/component/dynamic-form-group/dynamic-form-group.props.ts @@ -3,7 +3,6 @@ import { EditorType, EditorConfig } from '../../types'; import { createPropsResolver } from '../../../../dynamic-resolver'; import { schemaMapper } from '../../schema/schema-mapper'; import formGroupSchema from '../../schema/form-group.schema.json'; -import formGroupPropertyConfig from '../../property-config/form-group.property-config.json'; import { createFormGroupEditorResolver } from '../../../../dynamic-resolver/src/editor-resolver'; export const dynamicFormGroupProps = { diff --git a/packages/ui-vue/components/dynamic-form/src/designer/response-form-layout-setting.props.ts b/packages/ui-vue/components/dynamic-form/src/designer/response-form-layout-setting.props.ts index 139e05c7caf..44a596615af 100644 --- a/packages/ui-vue/components/dynamic-form/src/designer/response-form-layout-setting.props.ts +++ b/packages/ui-vue/components/dynamic-form/src/designer/response-form-layout-setting.props.ts @@ -2,7 +2,7 @@ import { ExtractPropTypes, PropType } from 'vue'; import { layoutSettingSchemaMapper } from '../schema/schema-mapper'; -import { layoutSettingSchemaResolver } from '../schema/schema-resolver'; +import { layoutSettingSchemaResolver } from '../schema/response-form-schema-resolver'; import formSchema from '../schema/response-form-layout-setting.schema.json'; import { createPropsResolver } from '@farris/ui-vue/components/dynamic-resolver'; import { FormUnifiedColumnLayout } from '../types'; diff --git a/packages/ui-vue/components/dynamic-form/src/designer/response-form-use-designer-rules.ts b/packages/ui-vue/components/dynamic-form/src/designer/response-form-use-designer-rules.ts index 339a0074fa7..f89da5b0822 100644 --- a/packages/ui-vue/components/dynamic-form/src/designer/response-form-use-designer-rules.ts +++ b/packages/ui-vue/components/dynamic-form/src/designer/response-form-use-designer-rules.ts @@ -4,7 +4,7 @@ import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/r import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; import { getSchemaByType } from "../../../dynamic-resolver/src/schema-resolver"; import { UseTemplateDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-template-rule"; -import { ResponseFormProperty } from "../property-config/form.property-config"; +import { ResponseFormProperty } from "../property-config/response-form.property-config"; export function useDesignerRules(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { const schema = designItemContext.schema as ComponentSchema; @@ -104,7 +104,25 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe formGroupElementSchema.appearance.class = appearanceClass; } } + /** + * 添加输入类控件后,将绑定信息同步到视图模型 + */ + function syncFieldToViewModel(resolveContext: DraggingResolveContext, editorType: string) { + const { bindingSourceContext, parentComponentInstance } = resolveContext; + if (bindingSourceContext?.entityFieldNode && parentComponentInstance) { + const designViewModelUtils = designerHostService?.designViewModelUtils; + const formSchemaUtils = designerHostService?.formSchemaUtils; + const viewModelId = formSchemaUtils.getViewModelIdByComponentId(parentComponentInstance.belongedComponentId); + + const dgViewModel = designViewModelUtils.getDgViewModel(viewModelId); + dgViewModel.removeField([bindingSourceContext.entityFieldNode.id]); + dgViewModel.addField(bindingSourceContext.designViewModelField); + if (editorType) { + dgViewModel.changeField(bindingSourceContext.entityFieldNode.id, { editor: { $type: editorType } }); + } + } + } function onResolveNewComponentSchema(resolveContext: DraggingResolveContext, componentSchema: ComponentSchema): ComponentSchema { const component = schema; // 控件本身样式 @@ -112,17 +130,20 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe const componentClassList = componentClass.split(' ') as string[]; if (componentClassList.includes('f-form-layout')) { const { label } = resolveContext; - const formGroupElementSchema = getSchemaByType('form-group') as ComponentSchema; - formGroupElementSchema.editor = componentSchema; - formGroupElementSchema.label = label; + let formGroupElementSchema; + // 控件若有绑定信息,则根据绑定信息创建控件 + if (resolveContext.bindingSourceContext?.entityFieldNode) { + const controlCreatorUtils = designerHostService?.controlCreatorUtils; + formGroupElementSchema = controlCreatorUtils.setFormFieldProperty(resolveContext.bindingSourceContext?.entityFieldNode, componentSchema.type); + } else { + formGroupElementSchema = getSchemaByType('form-group') as ComponentSchema; + formGroupElementSchema.editor = componentSchema; + formGroupElementSchema.label = label; + } resolveFormGroupAppearance(formGroupElementSchema); - // 以下属性放在form-group - delete formGroupElementSchema.editor.id; - delete formGroupElementSchema.editor.binding; - delete formGroupElementSchema.editor.appearance; - delete formGroupElementSchema.editor.visible; + syncFieldToViewModel(resolveContext, componentSchema.type); return formGroupElementSchema; } diff --git a/packages/ui-vue/components/dynamic-form/src/property-config/form-group.property-config.json b/packages/ui-vue/components/dynamic-form/src/property-config/form-group.property-config.json deleted file mode 100644 index b7611ade6a4..00000000000 --- a/packages/ui-vue/components/dynamic-form/src/property-config/form-group.property-config.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "title": "form-group", - "description": "A Farris Component", - "type": "object", - "categories": { - "basic": { - "description": "Basic Infomation", - "title": "基本信息", - "properties": { - "id": { - "description": "组件标识", - "title": "标识", - "type": "string", - "readonly": true - }, - "type": { - "description": "组件类型", - "title": "类型", - "type": "enum", - "editor": { - "type": "combo-list", - "data": [] - }, - "$converter": "/converter/property-editor.converter" - }, - "label": { - "title": "标签", - "type": "string", - "description": "" - }, - "enableLinkLabel": { - "title": "超链接标签", - "type": "boolean", - "description": "" - } - } - }, - "appearance": { - "title": "样式", - "description": "Appearance", - "properties": { - "class": { - "title": "class样式", - "type": "string", - "description": "", - "$converter": "/converter/appearance.converter" - }, - "style": { - "title": "style", - "type": "string", - "description": "", - "$converter": "/converter/appearance.converter" - }, - "responseLayout": { - "description": "响应式列宽", - "title": "响应式列宽", - "type": "boolean", - "editor": { - "type": "response-layout-editor-setting" - }, - "$converter": "/converter/response-form-layout.converter" - } - } - }, - "behavior": { - "$ref": { - "schema": "editor" - } - } - } -} \ No newline at end of file diff --git a/packages/ui-vue/components/dynamic-form/src/property-config/form.property-config.ts b/packages/ui-vue/components/dynamic-form/src/property-config/response-form.property-config.ts similarity index 100% rename from packages/ui-vue/components/dynamic-form/src/property-config/form.property-config.ts rename to packages/ui-vue/components/dynamic-form/src/property-config/response-form.property-config.ts diff --git a/packages/ui-vue/components/dynamic-form/src/response-form.props.ts b/packages/ui-vue/components/dynamic-form/src/response-form.props.ts index 32c7a2e743a..ae238e3c83e 100644 --- a/packages/ui-vue/components/dynamic-form/src/response-form.props.ts +++ b/packages/ui-vue/components/dynamic-form/src/response-form.props.ts @@ -1,8 +1,8 @@ import { ExtractPropTypes } from 'vue'; import { createPropsResolver } from '../../dynamic-resolver'; import { schemaMapper } from './schema/schema-mapper'; -import { schemaResolver } from './schema/schema-resolver'; -import formSchema from './schema/form.schema.json'; +import { reponseFormSchemaResolver } from './schema/response-form-schema-resolver'; +import formSchema from './schema/response-form.schema.json'; export const responseFormProps = { customClass: { type: String, default: '' }, @@ -11,4 +11,4 @@ export const responseFormProps = { export type ResponseFormPropsType = ExtractPropTypes; -export const formPropsResolver = createPropsResolver(responseFormProps, formSchema, schemaMapper, schemaResolver); +export const formPropsResolver = createPropsResolver(responseFormProps, formSchema, schemaMapper, reponseFormSchemaResolver); diff --git a/packages/ui-vue/components/dynamic-form/src/schema/schema-resolver.ts b/packages/ui-vue/components/dynamic-form/src/schema/response-form-schema-resolver.ts similarity index 89% rename from packages/ui-vue/components/dynamic-form/src/schema/schema-resolver.ts rename to packages/ui-vue/components/dynamic-form/src/schema/response-form-schema-resolver.ts index bb8472a8255..a8b3023973d 100644 --- a/packages/ui-vue/components/dynamic-form/src/schema/schema-resolver.ts +++ b/packages/ui-vue/components/dynamic-form/src/schema/response-form-schema-resolver.ts @@ -5,7 +5,7 @@ import { DesignerComponentInstance } from "../../../designer-canvas/src/types"; import { DynamicResolver } from "../../../dynamic-resolver"; import { ResponseFormComponentCreatorService } from "../composition/response-form-component-creator.service"; -export function schemaResolver(resolver: DynamicResolver, schema: Record, context: Record, designerHostService?: DesignerHostService): Record { +export function reponseFormSchemaResolver(resolver: DynamicResolver, schema: Record, context: Record, designerHostService?: DesignerHostService): Record { const parentComponentInstance = context.parentComponentInstance as DesignerComponentInstance; if (parentComponentInstance && designerHostService) { const parentComponentType = parentComponentInstance.schema?.type; diff --git a/packages/ui-vue/components/dynamic-form/src/schema/form.schema.json b/packages/ui-vue/components/dynamic-form/src/schema/response-form.schema.json similarity index 100% rename from packages/ui-vue/components/dynamic-form/src/schema/form.schema.json rename to packages/ui-vue/components/dynamic-form/src/schema/response-form.schema.json diff --git a/packages/ui-vue/components/input-group/src/schema/input-group.schema.json b/packages/ui-vue/components/input-group/src/schema/input-group.schema.json index cdb56aec264..15c47b46b79 100644 --- a/packages/ui-vue/components/input-group/src/schema/input-group.schema.json +++ b/packages/ui-vue/components/input-group/src/schema/input-group.schema.json @@ -205,5 +205,11 @@ "required": [ "id", "type" + ], + "ignore": [ + "id", + "appearance", + "binding", + "visible" ] } \ No newline at end of file diff --git a/packages/ui-vue/components/lookup/src/schema/lookup.schema.json b/packages/ui-vue/components/lookup/src/schema/lookup.schema.json index 99e3581db22..14d3eb7bce1 100644 --- a/packages/ui-vue/components/lookup/src/schema/lookup.schema.json +++ b/packages/ui-vue/components/lookup/src/schema/lookup.schema.json @@ -105,7 +105,10 @@ "id", "type" ], - "ignore":[ - "id","appearance","binding" + "ignore": [ + "id", + "appearance", + "binding", + "visible" ] } \ No newline at end of file diff --git a/packages/ui-vue/components/number-spinner/src/schema/number-spinner.schema.json b/packages/ui-vue/components/number-spinner/src/schema/number-spinner.schema.json index 03bf1fdcb7d..62f211e762d 100644 --- a/packages/ui-vue/components/number-spinner/src/schema/number-spinner.schema.json +++ b/packages/ui-vue/components/number-spinner/src/schema/number-spinner.schema.json @@ -110,7 +110,10 @@ "id", "type" ], - "ignore":[ - "id","appearance","binding" + "ignore": [ + "id", + "appearance", + "binding", + "visible" ] } \ No newline at end of file diff --git a/packages/ui-vue/components/property-panel/src/composition/entity/base-property.ts b/packages/ui-vue/components/property-panel/src/composition/entity/base-property.ts index caa62b9068b..9c40a435476 100644 --- a/packages/ui-vue/components/property-panel/src/composition/entity/base-property.ts +++ b/packages/ui-vue/components/property-panel/src/composition/entity/base-property.ts @@ -53,7 +53,7 @@ export class BaseControlProperty { const dgViewModel = this.designViewModelUtils.getDgViewModel(this.viewModelId); this.designViewModelField = dgViewModel.fields.find(f => f.id === bindingFieldId); } - propertyData.updateOn = this.designViewModelField.updateOn; + propertyData.updateOn = this.designViewModelField?.updateOn; } } diff --git a/packages/ui-vue/components/radio-group/src/schema/radio-group.schema.json b/packages/ui-vue/components/radio-group/src/schema/radio-group.schema.json index fae6e7e4052..fb38f715529 100644 --- a/packages/ui-vue/components/radio-group/src/schema/radio-group.schema.json +++ b/packages/ui-vue/components/radio-group/src/schema/radio-group.schema.json @@ -80,7 +80,10 @@ "id", "type" ], - "ignore":[ - "id","appearance","binding" + "ignore": [ + "id", + "appearance", + "binding", + "visible" ] } \ No newline at end of file diff --git a/packages/ui-vue/components/textarea/src/schema/textarea.schema.json b/packages/ui-vue/components/textarea/src/schema/textarea.schema.json index 8d4a254398a..c244233cb84 100644 --- a/packages/ui-vue/components/textarea/src/schema/textarea.schema.json +++ b/packages/ui-vue/components/textarea/src/schema/textarea.schema.json @@ -79,8 +79,11 @@ "required": [ "id", "type" - ], - "ignore":[ - "id","appearance","binding" + ], + "ignore": [ + "id", + "appearance", + "binding", + "visible" ] } \ No newline at end of file diff --git a/packages/ui-vue/components/time-picker/src/schema/time-picker.schema.json b/packages/ui-vue/components/time-picker/src/schema/time-picker.schema.json index 89b0bda5f15..872bdaab1ee 100644 --- a/packages/ui-vue/components/time-picker/src/schema/time-picker.schema.json +++ b/packages/ui-vue/components/time-picker/src/schema/time-picker.schema.json @@ -87,7 +87,10 @@ "id", "type" ], - "ignore":[ - "id","appearance","binding" + "ignore": [ + "id", + "appearance", + "binding", + "visible" ] } \ No newline at end of file -- Gitee From 591964de18792f7b6321d314382930339c157b71 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Mon, 23 Dec 2024 11:55:02 +0800 Subject: [PATCH 040/181] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E5=AE=9E?= =?UTF-8?q?=E4=BD=93=E7=BB=91=E5=AE=9A=E7=BC=96=E8=BE=91=E5=99=A8=E7=9A=84?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/composition/function/drag-resolve.tsx | 4 ++-- .../composition/use-entity-tree.ts | 4 ++-- .../entity-binding-selector.component.tsx | 8 ++++---- .../entity-binding-selector.props.ts | 0 4 files changed, 8 insertions(+), 8 deletions(-) rename packages/ui-vue/components/{designer-canvas/src/components => }/entity-binding-selector/composition/use-entity-tree.ts (91%) rename packages/ui-vue/components/{designer-canvas/src/components => }/entity-binding-selector/entity-binding-selector.component.tsx (91%) rename packages/ui-vue/components/{designer-canvas/src/components => }/entity-binding-selector/entity-binding-selector.props.ts (100%) diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolve.tsx b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolve.tsx index 5c7a75f612e..b7330527351 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolve.tsx +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/drag-resolve.tsx @@ -1,8 +1,8 @@ import { ModalFunctions } from "../../../../modal/src/composition/type"; import { ComponentBindingSourceContext, DesignerHostService, DesignerHTMLElement, DraggingResolveContext } from "../types"; -import EntityBindingSelectorComponent from '../../components/entity-binding-selector/entity-binding-selector.component'; +import EntityBindingSelectorComponent from '../../../../entity-binding-selector/entity-binding-selector.component'; import BindingSelectorComponent from "../../../../common/editor/binding-selector/src/components/binding-selector-container.component"; -import { DesignViewModelField, FormVariable } from "@/components/common/entity/entity-schema"; +import { DesignViewModelField, FormVariable } from "../../../../common/entity/entity-schema"; import { merge } from "lodash-es"; import { DesignerComponentInstance } from "../../types"; import { DgControl } from "../dg-control"; diff --git a/packages/ui-vue/components/designer-canvas/src/components/entity-binding-selector/composition/use-entity-tree.ts b/packages/ui-vue/components/entity-binding-selector/composition/use-entity-tree.ts similarity index 91% rename from packages/ui-vue/components/designer-canvas/src/components/entity-binding-selector/composition/use-entity-tree.ts rename to packages/ui-vue/components/entity-binding-selector/composition/use-entity-tree.ts index 29bbdf7ff5f..f9cf95f51db 100644 --- a/packages/ui-vue/components/designer-canvas/src/components/entity-binding-selector/composition/use-entity-tree.ts +++ b/packages/ui-vue/components/entity-binding-selector/composition/use-entity-tree.ts @@ -1,5 +1,5 @@ -import { FormSchemaEntity } from "../../../../../common/entity/entity-schema"; -import { ComponentBindingSourceContext } from "../../../../../designer-canvas/src/composition/types"; +import { FormSchemaEntity } from "../../common/entity/entity-schema"; +import { ComponentBindingSourceContext } from "../../designer-canvas/src/composition/types"; import { cloneDeep } from "lodash-es"; import { EntityBindingSelectorProps } from "../entity-binding-selector.props"; diff --git a/packages/ui-vue/components/designer-canvas/src/components/entity-binding-selector/entity-binding-selector.component.tsx b/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.component.tsx similarity index 91% rename from packages/ui-vue/components/designer-canvas/src/components/entity-binding-selector/entity-binding-selector.component.tsx rename to packages/ui-vue/components/entity-binding-selector/entity-binding-selector.component.tsx index a3efb0ec92c..d7fa73470e4 100644 --- a/packages/ui-vue/components/designer-canvas/src/components/entity-binding-selector/entity-binding-selector.component.tsx +++ b/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.component.tsx @@ -1,10 +1,10 @@ import { ref, defineComponent, onBeforeMount, onMounted } from "vue"; -import { FNotifyService } from "../../../../notify"; +import { FNotifyService } from "../notify"; import { entityBindingSelectorProps, EntityBindingSelectorProps } from "./entity-binding-selector.props"; -import { FTreeGrid } from '../../../../tree-grid'; -import { RowOptions, VisualData } from "../../../../data-view"; +import { FTreeGrid } from '../tree-grid'; +import { RowOptions, VisualData } from "../data-view"; import { useEntityTree } from "./composition/use-entity-tree"; -import { ComponentBindingSourceContext } from "../../composition/types"; +import { ComponentBindingSourceContext } from "../designer-canvas/src/composition/types"; export default defineComponent({ diff --git a/packages/ui-vue/components/designer-canvas/src/components/entity-binding-selector/entity-binding-selector.props.ts b/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.props.ts similarity index 100% rename from packages/ui-vue/components/designer-canvas/src/components/entity-binding-selector/entity-binding-selector.props.ts rename to packages/ui-vue/components/entity-binding-selector/entity-binding-selector.props.ts -- Gitee From 50809c6d5b8eaef40a743703629cbc270ae3aa25 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Mon, 23 Dec 2024 19:21:48 +0800 Subject: [PATCH 041/181] =?UTF-8?q?fix:=20=E8=AE=BE=E8=AE=A1=E6=97=B6?= =?UTF-8?q?=E5=88=86=E7=BB=84=E9=9D=A2=E6=9D=BFSection=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/composition/function/use-dragula.ts | 42 +---- packages/ui-vue/components/section/index.ts | 3 +- .../section-header.design.component.tsx | 150 ++++++++++++++++++ .../designer/section-toolbar-item.props.ts | 28 ++++ .../section-toolbar.design.component.tsx | 50 ++++++ .../src/designer/section.design.component.tsx | 39 +++-- .../schema/section-toolbar-item.schema.json | 51 ++++++ .../section/src/schema/section.schema.json | 2 +- 8 files changed, 302 insertions(+), 63 deletions(-) create mode 100644 packages/ui-vue/components/section/src/designer/section-header.design.component.tsx create mode 100644 packages/ui-vue/components/section/src/designer/section-toolbar-item.props.ts create mode 100644 packages/ui-vue/components/section/src/designer/section-toolbar.design.component.tsx create mode 100644 packages/ui-vue/components/section/src/schema/section-toolbar-item.schema.json diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts index 1e883e0c5ef..a7be4974f63 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts @@ -89,7 +89,6 @@ export function useDragula(designerHostService: DesignerHostService): UseDragula sourceControlSchema: ComponentSchema | null, sibling: DesignerHTMLElement ): number { - const parent = target.componentInstance; let index = -1; if (!sourceControlSchema) { return -1; @@ -100,7 +99,7 @@ export function useDragula(designerHostService: DesignerHostService): UseDragula // 定位目标位置 const siblingComponentSchema = sibling.componentInstance.value.schema; let locatePredicate: any = { id: siblingComponentSchema.id }; - if (siblingComponentSchema.type === 'Component') { + if (siblingComponentSchema.type === 'component') { locatePredicate = { component: siblingComponentSchema.id }; } @@ -119,43 +118,6 @@ export function useDragula(designerHostService: DesignerHostService): UseDragula return index; } - /** - * 获取新控件的目标位置 - */ - function getNewControlTargetPosition(target: DesignerHTMLElement, sibling: DesignerHTMLElement): number { - - // 不允许放置 - if (!target.componentInstance.value.contents) { - return -1; - } - - // 空容器:放置第1个位置 - if (target.componentInstance.value.contents.length === 0) { - return 0; - } - - // 后面没有兄弟控件:放置到最后 - if (!sibling || !sibling.componentInstance) { - return target.componentInstance.value.contents.length; - } - - // noattach??? - if (sibling.getAttribute('data-noattach')) { - return Number(sibling.getAttribute('data-position')); - } - - const siblingComponentSchema = sibling.componentInstance.value.schema; - let locatePredicate; - if (siblingComponentSchema.type === 'Component') { - locatePredicate = { component: siblingComponentSchema.id }; - } else { - locatePredicate = { id: siblingComponentSchema.id }; - } - let position = findIndex(target.componentInstance.value.contents, locatePredicate); - position = (position === -1) ? 0 : position; - - return position; - } /** * 从控件工具箱中拖拽新建控件 * @param element 拖拽的元素 @@ -249,7 +211,6 @@ export function useDragula(designerHostService: DesignerHostService): UseDragula if (!target) { return; } - // If you try to drop within itself. if (element.contains(target)) { return; } @@ -265,7 +226,6 @@ export function useDragula(designerHostService: DesignerHostService): UseDragula dragBetweenCurrentForm(element, target, source, sibling); } else { // 移除拷贝生成的源DOM - if (target.contains(element)) { target.removeChild(element); } diff --git a/packages/ui-vue/components/section/index.ts b/packages/ui-vue/components/section/index.ts index 6671e9011e5..7724a976e1f 100644 --- a/packages/ui-vue/components/section/index.ts +++ b/packages/ui-vue/components/section/index.ts @@ -14,11 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import type { App } from 'vue'; import Section from './src/section.component'; import SestionDesign from './src/designer/section.design.component'; import { propsResolver } from './src/section.props'; import { withInstall } from '@farris/ui-vue/components/common'; +import { sectionToolbarItemResolver } from './src/designer/section-toolbar-item.props'; export * from './src/section.props'; @@ -29,6 +29,7 @@ Section.register = (componentMap: Record, propsResolverMap: Record< Section.registerDesigner = (componentMap: Record, propsResolverMap: Record, configResolverMap: Record) => { componentMap.section = SestionDesign; propsResolverMap.section = propsResolver; + propsResolverMap['section-toolbar-item'] = sectionToolbarItemResolver; }; export { Section }; export default withInstall(Section); diff --git a/packages/ui-vue/components/section/src/designer/section-header.design.component.tsx b/packages/ui-vue/components/section/src/designer/section-header.design.component.tsx new file mode 100644 index 00000000000..204f64c0fdf --- /dev/null +++ b/packages/ui-vue/components/section/src/designer/section-header.design.component.tsx @@ -0,0 +1,150 @@ +import { DesignerItemContext } from '../../../designer-canvas/src/types'; +import { SetupContext, computed, ref, Ref } from 'vue'; +import { useSectionMaxMin } from '../composition/use-max-min'; +import { SectionProps } from '../section.props'; +import renderDesignSectionToolbar from './section-toolbar.design.component'; + +export default function ( + props: SectionProps, + context: SetupContext, + expandStatus: Ref, + sectionRef: Ref, + sectionParentElementRef: Ref, + maxStatus: Ref, + designItemContext: DesignerItemContext,) { + + const toolbarPosition = computed(() => props.buttonPosition); + const { onClickMaxMinIcon } = useSectionMaxMin(sectionRef, sectionParentElementRef, maxStatus); + + const shouldShowSubHeaderTitle = computed(() => { + return !!props.subTitle; + }); + + const shouldShowMaximize = computed(() => { + return props.enableMaximize; + }); + const shouldShowAccordion = computed(() => { + return props.enableAccordion !== ''; + }); + const headerClass = computed(() => { + const headClassObject = { + 'f-section-header': true + } as Record; + + if (context.slots.header) { + const customClassArray = props.headerClass.split(' ') as string[]; + customClassArray.reduce>((classObject, classString) => { + classObject[classString] = true; + return classObject; + }, headClassObject); + } + + return headClassObject; + }); + + function onClickCollapseExpandIcon(event: PointerEvent) { + event.stopPropagation(); + if (props.enableAccordion !== '') { + expandStatus.value = !expandStatus.value; + } + } + + + function renderMaxAccordionPaneal() { + const collapseExpandIconClass = computed(() => { + return { + 'btn': true, + 'f-btn-collapse-expand': true, + 'f-btn-mx': true, + 'f-state-expand': expandStatus.value + } as Record; + }); + + const maxMinIconClass = computed(() => { + return { + 'f-icon': true, + 'f-icon-maximize': !maxStatus.value, + 'f-icon-minimize': maxStatus.value + } as Record; + }); + + return ( +
+ {shouldShowMaximize.value ? + : '' + } + {shouldShowAccordion.value ? + : '' + } + +
+ + ); + } + function renderHeaderTemplate() { + return ( + context.slots.header ? +
+ {context.slots.header()} +
+ : '' + ); + } + function renderDefaultTitle() { + return ( +
+

{props.mainTitle}

+ {shouldShowSubHeaderTitle.value && {props.subTitle}} +
+ ); + } + + + function renderHeaderContent() { + const headerContentClass = computed(() => { + const classObject = { + 'f-content': true + } as Record; + + if (props.headerContentClass) { + const customClassArray = props.headerContentClass.split(' ') as string[]; + customClassArray.reduce>((classObject, classString) => { + classObject[classString] = true; + return classObject; + }, classObject); + } + return classObject; + }); + + return ( + context.slots.headerContent ? +
+ {context.slots.headerContent()} +
+ : '' + ); + } + + function renderDefaultHeader() { + return ( +
+ {context.slots.headerTitle ? context.slots.headerTitle() : renderDefaultTitle()} + {renderHeaderContent()} + {toolbarPosition.value === 'inHead' && renderDesignSectionToolbar(props, designItemContext)} + {(shouldShowMaximize.value || shouldShowAccordion.value) && renderMaxAccordionPaneal()} +
+ ); + } + return () => { + return ( + props.showHeader && ( + context.slots.header ? + renderHeaderTemplate() : + renderDefaultHeader() + + ) + ); + }; +} diff --git a/packages/ui-vue/components/section/src/designer/section-toolbar-item.props.ts b/packages/ui-vue/components/section/src/designer/section-toolbar-item.props.ts new file mode 100644 index 00000000000..72473fec961 --- /dev/null +++ b/packages/ui-vue/components/section/src/designer/section-toolbar-item.props.ts @@ -0,0 +1,28 @@ + +/** + * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { ExtractPropTypes } from 'vue'; +import { createPropsResolver } from '../../../dynamic-resolver'; +import sectionToolbarItemSchema from '../schema/section-toolbar-item.schema.json'; + +export const sectionToolbarItemProps = { + text: { type: String , default: '' }, + icon: { type: String, default: '' }, +} as Record; + +export type SectionToolbarItemProps = ExtractPropTypes; +export const sectionToolbarItemResolver = createPropsResolver(sectionToolbarItemProps, sectionToolbarItemSchema); diff --git a/packages/ui-vue/components/section/src/designer/section-toolbar.design.component.tsx b/packages/ui-vue/components/section/src/designer/section-toolbar.design.component.tsx new file mode 100644 index 00000000000..beb8b5b92b6 --- /dev/null +++ b/packages/ui-vue/components/section/src/designer/section-toolbar.design.component.tsx @@ -0,0 +1,50 @@ + +import { computed, ref } from 'vue'; +import { DesignerItemContext } from '../../../designer-canvas/src/types'; +import FResponseToolbarDesign from '../../../response-toolbar/src/designer/response-toolbar.design.component'; +import FDesignerInnerItem from '../../../designer-canvas/src/components/designer-inner-item.component'; +import { SectionProps } from '../section.props'; + +export default function ( + props: SectionProps, + designerItemContext: DesignerItemContext +) { + const toolbarClass = computed(() => { + return 'f-section-toolbar' + (props.buttonPosition === 'inHead' ? ' f-section-header--toolbar' : ' f-section-content--toolbar'); + }); + const items = ref(props.buttons); + const toolbarSchema = ref(designerItemContext.schema.toolbar); + const sectionComponentId = designerItemContext.schema.id; + const sectionToolbarId = `${sectionComponentId}-toolbar`; + const toolbarAlignment = computed(() => { return props.buttonPosition === 'inHead' ? 'right' : 'left'; }); + + /** + * 选中单个按钮事件 + */ + function onSelectionChange(schemaType: string, schemaValue: any, componentId: string, componentInstance: any) { + designerItemContext.setupContext?.emit('selectionChange', schemaType, schemaValue, componentId, componentInstance); + } + + return ( + <>{ + toolbarSchema.value ? +
+
+ + + +
+
: '' + } + + + ); +} diff --git a/packages/ui-vue/components/section/src/designer/section.design.component.tsx b/packages/ui-vue/components/section/src/designer/section.design.component.tsx index 7d8d4d3ccca..8d26b86d025 100644 --- a/packages/ui-vue/components/section/src/designer/section.design.component.tsx +++ b/packages/ui-vue/components/section/src/designer/section.design.component.tsx @@ -1,26 +1,26 @@ - /** - * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/** +* Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ import { computed, defineComponent, inject, onMounted, ref, SetupContext } from 'vue'; import { SectionProps, sectionProps } from '../section.props'; import { useDesignerRules } from './use-designer-rules'; import { DesignerItemContext } from '../../../designer-canvas/src/types'; import { useDesignerComponent } from '../../../designer-canvas/src/composition/function/use-designer-component'; -import getSectionHeaderRender from '../components/header.component'; -import getSectionToolbar from '../components/toolbar.component'; +import getSectionHeaderRenderDesign from './section-header.design.component'; +import renderSectionToolbarDesign from './section-toolbar.design.component'; import { getCustomClass } from '../../../common'; import { DesignerHostService } from '../../../designer-canvas/src/composition/types'; @@ -50,8 +50,7 @@ export default defineComponent({ const toolbarPosition = computed(() => props.buttonPosition); const sectionMaxStatus = ref(false); - const renderSectionHeader = getSectionHeaderRender(props, context, expandStatus, sectionRef, sectionParentElementRef, sectionMaxStatus); - const renderSectionToolbar = getSectionToolbar(props, context); + const renderSectionHeader = getSectionHeaderRenderDesign(props, context, expandStatus, sectionRef, sectionParentElementRef, sectionMaxStatus, designItemContext); const sectionClass = computed(() => { const classObject = { @@ -88,7 +87,7 @@ export default defineComponent({ function renderSectionContent() { return
- {toolbarPosition.value === 'inContent' && renderSectionToolbar()} + {toolbarPosition.value === 'inContent' && renderSectionToolbarDesign(props, designItemContext)} {context.slots.default && context.slots.default()}
; } diff --git a/packages/ui-vue/components/section/src/schema/section-toolbar-item.schema.json b/packages/ui-vue/components/section/src/schema/section-toolbar-item.schema.json new file mode 100644 index 00000000000..f2112eded53 --- /dev/null +++ b/packages/ui-vue/components/section/src/schema/section-toolbar-item.schema.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://farris-design.gitee.io/section-toolbar-item.schema.json", + "title": "section-toolbar-item", + "description": "A Farris Toolbar Item Component", + "type": "object", + "properties": { + "id": { + "description": "The unique identifier for a Response Toolbar", + "type": "string" + }, + "type": { + "description": "The type string of Response Toolbar", + "type": "string", + "default": "section-toolbar-item" + }, + "appearance": { + "description": "", + "type": "object", + "properties": { + "class": { + "type": "string" + }, + "style": { + "type": "string" + } + }, + "default": {} + }, + "text": { + "description": "按钮", + "type": "string", + "default": "按钮" + }, + "icon": { + "description": "图标", + "type": "string", + "default": "" + }, + "onClick": { + "description": "点击事件", + "type": "string", + "default": "" + } + }, + "required": [ + "id", + "type", + "text" + ] +} \ No newline at end of file diff --git a/packages/ui-vue/components/section/src/schema/section.schema.json b/packages/ui-vue/components/section/src/schema/section.schema.json index 8856ef6ee50..27e41f08104 100644 --- a/packages/ui-vue/components/section/src/schema/section.schema.json +++ b/packages/ui-vue/components/section/src/schema/section.schema.json @@ -116,7 +116,7 @@ "properties": { "type": { "type": "string", - "default": "SectionToolbar" + "default": "section-toolbar" }, "position": { "type": "string", -- Gitee From 894307532fee5a1c10264cb74430066c8db65287 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Tue, 24 Dec 2024 09:34:50 +0800 Subject: [PATCH 042/181] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/composition/function/use-designer-component.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts index 8132d2e187a..05983b34e32 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-designer-component.ts @@ -63,14 +63,14 @@ export function useDesignerComponent( * 获取组件在表单DOM中所属的Component的实例 * @param componentInstance 组件实例 */ - function getBelongedComponentInstance(cmpInstance?: Ref): DesignerComponentInstance | null { - if (!cmpInstance || !cmpInstance.value) { + function getBelongedComponentInstance(currentComponentInstance?: Ref): DesignerComponentInstance | null { + if (!currentComponentInstance || !currentComponentInstance.value) { return null; } - if (cmpInstance.value.schema && cmpInstance.value.schema.type === 'component') { - return cmpInstance.value; + if (currentComponentInstance.value.schema && currentComponentInstance.value.schema.type === 'component') { + return currentComponentInstance.value; } - const parent = ref(cmpInstance?.value.parent) as Ref; + const parent = ref(currentComponentInstance?.value.parent) as Ref; const grandParent = getBelongedComponentInstance(parent); if (grandParent) { return grandParent; -- Gitee From 854992be942675fffc4a2bb897693bccef268934 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Tue, 24 Dec 2024 09:37:06 +0800 Subject: [PATCH 043/181] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E6=A3=80=E6=9F=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../condition/src/condition-fields.design.component.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/ui-vue/components/condition/src/condition-fields.design.component.tsx b/packages/ui-vue/components/condition/src/condition-fields.design.component.tsx index 3acd2a1c833..6f5704bfe0a 100644 --- a/packages/ui-vue/components/condition/src/condition-fields.design.component.tsx +++ b/packages/ui-vue/components/condition/src/condition-fields.design.component.tsx @@ -79,4 +79,3 @@ ); } }); - \ No newline at end of file -- Gitee From 179255b13507776d5bcaf56493f7974c9fd98fb0 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Tue, 24 Dec 2024 16:50:46 +0800 Subject: [PATCH 044/181] =?UTF-8?q?feature:=20=E5=88=9B=E5=BB=BA=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E6=97=B6=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form-designer/form-designer.component.tsx | 2 +- .../method-manager.component.tsx | 4 +- .../composition/control-creator.service.ts | 70 ++++++-- .../designer/src/components/types/enums.ts | 2 +- .../data-grid-component-creator.service.ts | 6 +- .../data-grid/src/schema/schema-resolver.ts | 3 +- .../src/composition/function/drag-resolve.tsx | 7 +- .../response-form-use-designer-rules.ts | 22 ++- .../schema/response-form-schema-resolver.ts | 1 + .../composition/use-entity-tree.ts | 31 +++- .../composition/use-field-tree.ts | 158 ++++++++++++++++++ .../entity-binding-selector.component.tsx | 95 ++++++++--- .../entity-binding-selector.props.ts | 3 +- .../src/composition/class/property-panel.css | 2 +- 14 files changed, 348 insertions(+), 58 deletions(-) create mode 100644 packages/ui-vue/components/entity-binding-selector/composition/use-field-tree.ts diff --git a/packages/designer/src/components/components/form-designer/form-designer.component.tsx b/packages/designer/src/components/components/form-designer/form-designer.component.tsx index a7dae25c312..4b01fcc5413 100644 --- a/packages/designer/src/components/components/form-designer/form-designer.component.tsx +++ b/packages/designer/src/components/components/form-designer/form-designer.component.tsx @@ -94,7 +94,7 @@ export default defineComponent({ return () => { return ( - +
diff --git a/packages/designer/src/components/components/view-model-designer/method-manager/method-manager.component.tsx b/packages/designer/src/components/components/view-model-designer/method-manager/method-manager.component.tsx index a466806242e..e8377618e8c 100644 --- a/packages/designer/src/components/components/view-model-designer/method-manager/method-manager.component.tsx +++ b/packages/designer/src/components/components/view-model-designer/method-manager/method-manager.component.tsx @@ -1,4 +1,4 @@ - + import { SetupContext, defineComponent, ref, computed, inject } from "vue"; import { FNotifyService } from "@farris/ui-vue/components/notify"; import { FModal } from "@farris/ui-vue/components/modal"; @@ -154,7 +154,7 @@ export default defineComponent({ return (
- +
{renderViewModelNavgation()}
diff --git a/packages/designer/src/components/composition/control-creator.service.ts b/packages/designer/src/components/composition/control-creator.service.ts index 6138bfd6d0b..6f57444e741 100644 --- a/packages/designer/src/components/composition/control-creator.service.ts +++ b/packages/designer/src/components/composition/control-creator.service.ts @@ -24,8 +24,8 @@ export function useControlCreator(): UseControlCreator { fullPath: field.path }; formGroupMetadata.path = field.bindingPath; - - const resolvedEditorType = editorType || field.editor?.$type || 'input-group'; + const metadataConverter = new FormMetadataConverter(); + const resolvedEditorType = editorType || metadataConverter.getRealEditorType(field?.editor?.$type || ''); const formEditor = getSchemaByType(resolvedEditorType) || {}; formGroupMetadata.editor = formEditor; @@ -87,7 +87,54 @@ export function useControlCreator(): UseControlCreator { return ''; } - + /** + * 设置列格式 + * @param gridFieldType 列类型 + * @param metadata 元数据 + * @param schemaField schemaField + */ + function setGridFieldFormatter(gridFieldType: string, metadata: any, schemaField: any) { + switch (gridFieldType) { + case 'number': { + metadata.formatter = { + type: 'number', + precision: schemaField.type.precision, + thousand: ',', + decimal: '.' + }; + break; + } + case 'date': { + metadata.formatter = { + type: 'date', + dateFormat: 'yyyy-MM-dd' + }; + break; + } + case 'datetime': { + metadata.formatter = { + type: 'date', + dateFormat: 'yyyy-MM-dd HH:mm:ss' + }; + break; + } + case 'boolean': { + metadata.formatter = { + type: 'boolean', + trueText: '是', + falseText: '否' + }; + break; + } + case 'enum': { + metadata.formatter = { + type: 'enum', + data: schemaField.type.enumValues + }; + break; + } + } + } /** * 配置列属性 * @param field schema字段 @@ -121,12 +168,12 @@ export function useControlCreator(): UseControlCreator { metadata.dataType = mapControlType2GridFieldType(field); // 枚举类型 设置enumData - if (metadata.dataType === 'enum' && field.type) { - metadata.enumData = field.type.enumValues; - metadata.idField = 'value'; - metadata.valueField = 'value'; - metadata.textField = 'name'; - } + // if (metadata.dataType === 'enum' && field.type) { + // metadata.enumData = field.type.enumValues; + // metadata.idField = 'value'; + // metadata.valueField = 'value'; + // metadata.textField = 'name'; + // } metadata.multiLanguage = field.multiLanguage; // 日期类型字段:增加数据国际化配置 @@ -136,9 +183,8 @@ export function useControlCreator(): UseControlCreator { metadata.localizationType = field.type.name; } - // 列格式---暂不支持 - // this.setFarrisGridFieldFormatter(metadata.dataType, metadata, field); - + // 列格式 + setGridFieldFormatter(metadata.dataType, metadata, field); // 列编辑器 if (needInlineEditor) { diff --git a/packages/designer/src/components/types/enums.ts b/packages/designer/src/components/types/enums.ts index 7aa4bce6121..0cb59767d0e 100644 --- a/packages/designer/src/components/types/enums.ts +++ b/packages/designer/src/components/types/enums.ts @@ -176,7 +176,7 @@ export enum ComponentType { /** * 附件 */ - attachmentPanel = 'attachment-panel', + uploader = 'uploader', /** * 子表弹出编辑后创建的模态框组件---运行态是动态创建的 diff --git a/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts b/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts index cc9ed035f49..92c1bc4dd0c 100644 --- a/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts +++ b/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts @@ -302,14 +302,14 @@ export class DataGridComponentCreatorService { // 2、创建DataGrid(暂时不开启子表分页) const dataGrid = this.resolver.getSchemaByType('data-grid') as ComponentSchema; - const fields: any[] = []; + const columns: any[] = []; Object.assign(dataGrid, { id: buildInfo.componentId + '-dataGrid', appearance: { class: 'f-component-grid f-utils-fill' }, - fields, + columns, fieldEditable: buildInfo.editable, dataSource: buildInfo.dataSource || '', pagination: { @@ -326,7 +326,7 @@ export class DataGridComponentCreatorService { const dgVMField = cloneDeep(field); const grieFieldMetadata = this.controlCreatorUtils.setGridFieldProperty('data-grid-column', dgVMField, '', buildInfo.editable); if (grieFieldMetadata) { - fields.push(grieFieldMetadata); + columns.push(grieFieldMetadata); } }); return [container]; diff --git a/packages/ui-vue/components/data-grid/src/schema/schema-resolver.ts b/packages/ui-vue/components/data-grid/src/schema/schema-resolver.ts index b023e0d1497..e1dfe0e36e9 100644 --- a/packages/ui-vue/components/data-grid/src/schema/schema-resolver.ts +++ b/packages/ui-vue/components/data-grid/src/schema/schema-resolver.ts @@ -17,7 +17,8 @@ export function schemaResolver(resolver: DynamicResolver, schema: Record (<> ); + const { componentType } = componentResolveContext; + return () => (<> ); } /** * 弹出实体绑定窗口 @@ -72,8 +73,8 @@ export function dragResolveService(designerHostService: DesignerHostService) { return new Promise((resolve, reject) => { modalEditorRef = designerHostService.modalService.open({ title: '选择绑定', - width: 600, - height: 500, + width: 800, + height: 600, fitContent: false, showButtons: false, render: renderEntityComponent(), diff --git a/packages/ui-vue/components/dynamic-form/src/designer/response-form-use-designer-rules.ts b/packages/ui-vue/components/dynamic-form/src/designer/response-form-use-designer-rules.ts index f89da5b0822..3614574ce34 100644 --- a/packages/ui-vue/components/dynamic-form/src/designer/response-form-use-designer-rules.ts +++ b/packages/ui-vue/components/dynamic-form/src/designer/response-form-use-designer-rules.ts @@ -12,6 +12,26 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe const dragAndDropRules = new UseTemplateDragAndDropRules(); const { canMove, canAccept, canDelete } = dragAndDropRules.getTemplateRule(designItemContext, designerHostService); + /** + * 跨Component移动输入类控件时,需要判断源卡片和目标卡片是否绑定同一实体。 + */ + function checkBindingSameEntity(draggingContext: DraggingResolveContext) { + const { sourceElement } = draggingContext; + const { componentInstance: sourceComponentInstance } = sourceElement; + const formSchemaUtils = designerHostService?.formSchemaUtils; + if (!formSchemaUtils) { + return true; + } + const sourceComponent = formSchemaUtils.getComponentById(sourceComponentInstance.value.belongedComponentId); + const sourceViewmodel = formSchemaUtils.getViewModelById(sourceComponent.viewModel); + const currentComponent = formSchemaUtils.getComponentById(designItemContext.componentInstance.value.belongedComponentId); + const currentViewmodel = formSchemaUtils.getViewModelById(currentComponent.viewModel); + + if (sourceViewmodel?.id && currentViewmodel?.id && sourceViewmodel.id !== currentViewmodel.id) { + return sourceViewmodel.bindTo === currentViewmodel.bindTo; + } + return true; + } /** * 只接收form-group输入类控件 */ @@ -24,7 +44,7 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe } // 画布中移动位置的输入类控件 if (draggingContext.sourceType === 'move' && draggingContext.componentType === 'form-group') { - return true; + return checkBindingSameEntity(draggingContext); } return false; } diff --git a/packages/ui-vue/components/dynamic-form/src/schema/response-form-schema-resolver.ts b/packages/ui-vue/components/dynamic-form/src/schema/response-form-schema-resolver.ts index a8b3023973d..145601e3262 100644 --- a/packages/ui-vue/components/dynamic-form/src/schema/response-form-schema-resolver.ts +++ b/packages/ui-vue/components/dynamic-form/src/schema/response-form-schema-resolver.ts @@ -17,6 +17,7 @@ export function reponseFormSchemaResolver(resolver: DynamicResolver, schema: Rec formColumns: parentComponentType === 'splitter-pane' ? 1 : 4, parentContainerId: parentComponentInstance.schema.id, bindTo: context.bindingSourceContext?.bindTo || '/', + selectedFields: context.bindingSourceContext?.bindingEntityFields }; const componentCreator = new ResponseFormComponentCreatorService(resolver, designerHostService); const componentRefNode = componentCreator.createComponent(componentBuildInfo); diff --git a/packages/ui-vue/components/entity-binding-selector/composition/use-entity-tree.ts b/packages/ui-vue/components/entity-binding-selector/composition/use-entity-tree.ts index f9cf95f51db..15db6dc2190 100644 --- a/packages/ui-vue/components/entity-binding-selector/composition/use-entity-tree.ts +++ b/packages/ui-vue/components/entity-binding-selector/composition/use-entity-tree.ts @@ -1,12 +1,17 @@ import { FormSchemaEntity } from "../../common/entity/entity-schema"; -import { ComponentBindingSourceContext } from "../../designer-canvas/src/composition/types"; import { cloneDeep } from "lodash-es"; import { EntityBindingSelectorProps } from "../entity-binding-selector.props"; +import { ref } from "vue"; +import { FNotifyService } from "../../notify"; export function useEntityTree(props: EntityBindingSelectorProps) { const { designerHostService } = props; const entityBindToMap: Map = new Map(); + const entityTreeGridRef = ref(); + const entityDataSource = ref(); + const entityColumns = ref([{ field: 'name', title: '实体名称' }]); + function resolveEntity(schemaEntity: FormSchemaEntity, parentLabelPath: string = ''): any { if (!schemaEntity) { return; @@ -28,23 +33,31 @@ export function useEntityTree(props: EntityBindingSelectorProps) { /** * 组装实体树 */ - function resolveEntityDataSource(): any[] { + function resolveEntityDataSource() { const { formSchemaUtils } = designerHostService; const rootSchemaEntity = formSchemaUtils.getFormSchema().module.entity[0]?.entities[0]; entityBindToMap.clear(); const rootSchemaTreeNode = resolveEntity(rootSchemaEntity); - return [rootSchemaTreeNode]; + entityDataSource.value = [rootSchemaTreeNode]; } - function resolveBindingSourceContext(): ComponentBindingSourceContext { - const bindingContext: ComponentBindingSourceContext = { bindingType: 'entity' }; - - return bindingContext; + function checkAndGetSelectedEntity() { + const selectedItems = entityTreeGridRef.value.getSelectedItems(); + if (!selectedItems.length) { + const notifyService: any = new FNotifyService(); + notifyService.globalConfig = { position: 'top-center' }; + notifyService.warning({ message: '请先选择实体' }); + return; + } + return selectedItems[0].data; } return { + entityTreeGridRef, + entityDataSource, resolveEntityDataSource, - resolveBindingSourceContext, - entityBindToMap + entityBindToMap, + checkAndGetSelectedEntity, + entityColumns }; } diff --git a/packages/ui-vue/components/entity-binding-selector/composition/use-field-tree.ts b/packages/ui-vue/components/entity-binding-selector/composition/use-field-tree.ts new file mode 100644 index 00000000000..b9aaefa11df --- /dev/null +++ b/packages/ui-vue/components/entity-binding-selector/composition/use-field-tree.ts @@ -0,0 +1,158 @@ +import { FormSchemaEntity, FormSchemaEntityField, FormSchemaEntityField$Type } from "../../common/entity/entity-schema"; +import { cloneDeep } from "lodash-es"; +import { EntityBindingSelectorProps } from "../entity-binding-selector.props"; +import { ref } from "vue"; +import { RowOptions, VisualData } from "../../data-view"; +import { FNotifyService } from "../../notify"; + +export function useFieldTree(props: EntityBindingSelectorProps) { + + const { designerHostService } = props; + /** 表单中已使用的字段 */ + const occupiedFieldMap: Map = new Map(); + const fieldDataSource = ref(); + const fieldTreeGridRef = ref(); + /** 树表列配置 */ + const fieldColumns = ref([ + { field: 'name', title: '字段名称' }, + { field: 'bindingField', title: '绑定字段' }, + { field: 'displayedTypeName', title: '字段类型' } + ]); + /** 树表选择模式 */ + const fieldSelectionOption = { + enableSelectRow: true, + multiSelect: true, + multiSelectMode: 'OnCheckAndClick', + showCheckbox: true, + showSelectAll: true + }; + /** + * schema字段集合组装成树 + * @param fields schema字段集合 + */ + function resolveFields(fields: FormSchemaEntityField[]) { + const treeData: any = []; + fields.forEach(element => { + let children = []; + + if (element.type && element.type.fields && element.type.fields.length > 0) { + children = resolveFields(element.type.fields); + } + const clonedField = cloneDeep(element); + const displayedTypeName = element.multiLanguage ? '多语言' : element.type.displayName; + + treeData.push({ + data: Object.assign({ displayedTypeName }, clonedField), + children + }); + }); + return treeData; + } + function getComponentTypeByControlType(controlType: string) { + switch (props.componentType) { + case 'data-grid': case 'tree-grid': { + return 'data-grid'; + } + case 'response-form': { + return 'form'; + } + default: { + return props.componentType; + } + } + } + /** + * 获取指定实体中已在当前表单中被占用的字段,场景:创建卡片组件时将已在其他组件中添加的字段排除掉 + */ + function getOccupiedFieldMapBySelectedEntity(bindingEntity: FormSchemaEntity) { + occupiedFieldMap.clear(); + if (!bindingEntity) { + return; + } + // 根组件和table组件内的输入控件与form内不能重复 + let targetComponentType = getComponentTypeByControlType(props.componentType); + if (['frame', 'table', 'form'].includes(targetComponentType)) { + targetComponentType = 'form'; + } + const { formSchemaUtils, schemaService } = designerHostService; + + formSchemaUtils.getFormSchema().module.viewmodels.forEach(viewModel => { + if (!viewModel.fields || viewModel.fields.length === 0) { + return; + } + const componentNode = formSchemaUtils.getComponentByViewModelId(viewModel.id); + // 绑定同一个实体,并且是同类型的组件(form类、dataGrid类...) + let sourceComponentType = componentNode.componentType; + if (['frame', 'table', 'form'].includes(sourceComponentType)) { + sourceComponentType = 'form'; + } + const entityInfo = schemaService.getTableInfoByViewModelId(viewModel.id); + + if (sourceComponentType !== targetComponentType || !entityInfo || entityInfo.id !== bindingEntity.id) { + return; + } + + viewModel.fields.forEach(field => { + occupiedFieldMap.set(field.id, true); + }); + }); + + } + + /** + * 组装字段树 + */ + function resolveFieldDataSource(bindingEntity: FormSchemaEntity) { + getOccupiedFieldMapBySelectedEntity(bindingEntity); + const fields = bindingEntity.type.fields; + + fieldDataSource.value = resolveFields(fields); + fieldTreeGridRef.value.updateDataSource(fieldDataSource.value); + + } + + + + /** + * 配置字段列表的行禁用效果 + */ + const fieldTreeRowOption: Partial = { + customRowStatus: (visualData: VisualData) => { + // 复杂类型字段,不可选 + if (visualData.raw.$type && visualData.raw.$type !== FormSchemaEntityField$Type.SimpleField) { + visualData.disabled = true; + return visualData; + } + // 表单中已占用的字段,不可选 + if (occupiedFieldMap && occupiedFieldMap.has(visualData.raw.id)) { + visualData.disabled = true; + return visualData; + } + visualData.disabled = false; + return visualData; + } + }; + /** + * 获取已选字段 + */ + function checkAndGetSelectedFields() { + const selectedItems = fieldTreeGridRef.value.getSelectedItems(); + if (!selectedItems.length) { + const notifyService: any = new FNotifyService(); + notifyService.globalConfig = { position: 'top-center' }; + notifyService.warning({ message: '请先选择显示字段' }); + return; + } + return selectedItems.map(item => item.data); + } + return { + fieldTreeGridRef, + resolveFieldDataSource, + occupiedFieldMap, + fieldDataSource, + fieldTreeRowOption, + fieldColumns, + fieldSelectionOption, + checkAndGetSelectedFields + }; +} diff --git a/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.component.tsx b/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.component.tsx index d7fa73470e4..b90c35fa357 100644 --- a/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.component.tsx +++ b/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.component.tsx @@ -1,37 +1,53 @@ -import { ref, defineComponent, onBeforeMount, onMounted } from "vue"; +import { ref, defineComponent, onBeforeMount, onMounted, computed } from "vue"; import { FNotifyService } from "../notify"; import { entityBindingSelectorProps, EntityBindingSelectorProps } from "./entity-binding-selector.props"; import { FTreeGrid } from '../tree-grid'; -import { RowOptions, VisualData } from "../data-view"; import { useEntityTree } from "./composition/use-entity-tree"; import { ComponentBindingSourceContext } from "../designer-canvas/src/composition/types"; - +import { Step } from '../step'; +import { useFieldTree } from "./composition/use-field-tree"; export default defineComponent({ name: 'FEntityBindingSelector', props: entityBindingSelectorProps, emits: ['submit', 'cancel'], setup(props: EntityBindingSelectorProps, context) { - const treegridRef = ref(); - const entityColumns = ref([{ field: 'name', title: '实体名称' }]); - const entityDataSource = ref(); const useEntityTreeUtil = useEntityTree(props); + const { entityColumns, entityTreeGridRef, entityDataSource, checkAndGetSelectedEntity, resolveEntityDataSource } = useEntityTreeUtil; + + const useFieldTreeUtil = useFieldTree(props); + const { fieldColumns, resolveFieldDataSource, fieldDataSource, fieldTreeGridRef, fieldTreeRowOption, fieldSelectionOption, checkAndGetSelectedFields } = useFieldTreeUtil; const notifyService: any = new FNotifyService(); notifyService.globalConfig = { position: 'top-center' }; + const steps = ref([ + { id: 'selectEntity', title: '选择实体' }, + { id: 'selectFields', title: '选择显示字段' } + ]); + const activeStepIndex = ref(0); + const stepPanelClass = computed(() => (stepId: string) => { + return { + 'f-utils-fill': true, + 'border': true, + 'm-2': true, + 'position-relative': true, + 'd-none': steps.value[activeStepIndex.value].id !== stepId + } + }); onBeforeMount(() => { - entityDataSource.value = useEntityTreeUtil.resolveEntityDataSource(); + resolveEntityDataSource(); }); onMounted(() => { const rootEntityId = entityDataSource.value && entityDataSource.value.length ? entityDataSource.value[0].data.id : ''; - if (rootEntityId) { - treegridRef.value.selectItemById(rootEntityId); + if (rootEntityId && entityTreeGridRef) { + entityTreeGridRef.value.selectItemById(rootEntityId); } }); - function renderTreeGrids() { + function renderEntityTreeGrid() { return ; } + function renderFieldTreeGrid() { + return ; + } + function clickPreviousStep() { + activeStepIndex.value--; + } + function clickNextStep() { + if (activeStepIndex.value === 0) { + const selectedData = checkAndGetSelectedEntity(); + if (!selectedData) { + return; + } + resolveFieldDataSource(selectedData); + fieldTreeGridRef.value.updateDataSource(fieldDataSource.value); + } + activeStepIndex.value++; + } function onCancel() { context.emit('cancel'); } function onSubmit() { - const bindingContext: ComponentBindingSourceContext = { bindingType: 'entity' }; - const selectedItems = treegridRef.value.getSelectedItems(); - if (!selectedItems.length) { - notifyService.warning({ message: '请先选择实体' }); - return; + const selectedData = checkAndGetSelectedEntity(); + const selectedFields = checkAndGetSelectedFields(); + if (selectedData && selectedFields) { + const bindingContext: ComponentBindingSourceContext = { bindingType: 'entity' }; + bindingContext.bindingEntity = selectedData; + bindingContext.bindTo = useEntityTreeUtil.entityBindToMap.get(bindingContext.bindingEntity?.label || ''); + bindingContext.bindingEntityFields = selectedFields; + context.emit('submit', bindingContext); } - bindingContext.bindingEntity = selectedItems[0].data; - bindingContext.bindTo = useEntityTreeUtil.entityBindToMap.get(bindingContext.bindingEntity?.label || ''); - - context.emit('submit', bindingContext); } return () => { return (
-
{renderTreeGrids()}
+ +
{renderEntityTreeGrid()}
+ +
{renderFieldTreeGrid()}
+ + {activeStepIndex.value > 0 ? : ''} + {activeStepIndex.value < 1 ? : ''} + {activeStepIndex.value > 0 ? : ''} +
); }; } diff --git a/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.props.ts b/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.props.ts index e43656fde5a..027cc00f302 100644 --- a/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.props.ts +++ b/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.props.ts @@ -1,7 +1,8 @@ import { ExtractPropTypes } from "vue"; export const entityBindingSelectorProps = { - designerHostService: { type: Object, default: {} } + designerHostService: { type: Object, default: {} }, + componentType: { type: String, default: '' } } as Record; export type EntityBindingSelectorProps = ExtractPropTypes; diff --git a/packages/ui-vue/components/property-panel/src/composition/class/property-panel.css b/packages/ui-vue/components/property-panel/src/composition/class/property-panel.css index 3947f3a15a2..f5777f64ecc 100644 --- a/packages/ui-vue/components/property-panel/src/composition/class/property-panel.css +++ b/packages/ui-vue/components/property-panel/src/composition/class/property-panel.css @@ -5,7 +5,7 @@ .property-panel { position: relative; - z-index: 801; + z-index: 850; } .property-panel .switcher { -- Gitee From e3a070b5ac58da0a5cbbf65480e2607e4a994bea Mon Sep 17 00:00:00 2001 From: wang-xh Date: Tue, 24 Dec 2024 16:55:50 +0800 Subject: [PATCH 045/181] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E8=B7=AF=E5=BE=84=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/component/dynamic-form-input/dynamic-form-input.props.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/ui-vue/components/dynamic-form/src/component/dynamic-form-input/dynamic-form-input.props.ts b/packages/ui-vue/components/dynamic-form/src/component/dynamic-form-input/dynamic-form-input.props.ts index 35f2b1b03db..7f2190c78cc 100644 --- a/packages/ui-vue/components/dynamic-form/src/component/dynamic-form-input/dynamic-form-input.props.ts +++ b/packages/ui-vue/components/dynamic-form/src/component/dynamic-form-input/dynamic-form-input.props.ts @@ -3,7 +3,6 @@ import { EditorConfig } from '../../types'; import { createPropsResolver } from '../../../../dynamic-resolver'; import { schemaMapper } from '../../schema/schema-mapper'; import formGroupSchema from '../../schema/form-group.schema.json'; -import formGroupPropertyConfig from '../../property-config/form-group.property-config.json'; export const dynamicFormInputProps = { id: { type: String, default: '' }, -- Gitee From b849489b706feea7113c8be1a85cbed3b38df7ed Mon Sep 17 00:00:00 2001 From: wang-xh Date: Tue, 24 Dec 2024 19:08:27 +0800 Subject: [PATCH 046/181] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=A3=80=E6=9F=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity-binding-selector/composition/use-field-tree.ts | 4 +--- .../entity-binding-selector.component.tsx | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/ui-vue/components/entity-binding-selector/composition/use-field-tree.ts b/packages/ui-vue/components/entity-binding-selector/composition/use-field-tree.ts index b9aaefa11df..3741e23d400 100644 --- a/packages/ui-vue/components/entity-binding-selector/composition/use-field-tree.ts +++ b/packages/ui-vue/components/entity-binding-selector/composition/use-field-tree.ts @@ -104,15 +104,13 @@ export function useFieldTree(props: EntityBindingSelectorProps) { */ function resolveFieldDataSource(bindingEntity: FormSchemaEntity) { getOccupiedFieldMapBySelectedEntity(bindingEntity); - const fields = bindingEntity.type.fields; + const { fields } = bindingEntity.type; fieldDataSource.value = resolveFields(fields); fieldTreeGridRef.value.updateDataSource(fieldDataSource.value); } - - /** * 配置字段列表的行禁用效果 */ diff --git a/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.component.tsx b/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.component.tsx index b90c35fa357..19fc6fc9fe9 100644 --- a/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.component.tsx +++ b/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.component.tsx @@ -33,7 +33,7 @@ export default defineComponent({ 'm-2': true, 'position-relative': true, 'd-none': steps.value[activeStepIndex.value].id !== stepId - } + }; }); onBeforeMount(() => { resolveEntityDataSource(); -- Gitee From 6e05d7eaaed0330e9f2ba2ed3d2cabdb6e8c4b07 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Wed, 25 Dec 2024 15:49:51 +0800 Subject: [PATCH 047/181] =?UTF-8?q?fix:=20=E9=80=82=E9=85=8D=E6=97=A0?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9C=BA=E7=9A=84=E8=A1=A8=E5=8D=95=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../composition/use-form-statemachine.ts | 35 +++++++++++++ .../src/components/designer.component.tsx | 5 +- .../src/schema/events-editor.schema.json | 51 +------------------ 3 files changed, 41 insertions(+), 50 deletions(-) create mode 100644 packages/designer/src/components/composition/use-form-statemachine.ts diff --git a/packages/designer/src/components/composition/use-form-statemachine.ts b/packages/designer/src/components/composition/use-form-statemachine.ts new file mode 100644 index 00000000000..6f957b206a6 --- /dev/null +++ b/packages/designer/src/components/composition/use-form-statemachine.ts @@ -0,0 +1,35 @@ +import { FormMetadaDataDom, MetadataDto, UseFormStateMachine } from "../types"; +import { MetadataService } from "./metadata.service"; + +export default function (): UseFormStateMachine { + let stateMachineMetadata: any; + + const metadataService = new MetadataService(); + /** + * 获取状态机元数据 + * @returns + */ + function getStateMachineMetadataAsync( + formMetadata: FormMetadaDataDom, + metadataDto: MetadataDto): Promise { + const { stateMachines } = formMetadata.module; + if (stateMachines && stateMachines.length) { + const stateMachineID = stateMachines[0].uri; + const { relativePath } = metadataDto; + return metadataService.queryMetadataById(relativePath, stateMachineID); + } + return Promise.resolve(); + } + + + function setStateMachineMetadata(value: any) { + stateMachineMetadata = value || {}; + } + + + function getStateMachineMetadata() { + return stateMachineMetadata; + } + + return { getStateMachineMetadata, setStateMachineMetadata, getStateMachineMetadataAsync }; +} diff --git a/packages/designer/src/components/designer.component.tsx b/packages/designer/src/components/designer.component.tsx index a2b110586bb..51827f3f5eb 100644 --- a/packages/designer/src/components/designer.component.tsx +++ b/packages/designer/src/components/designer.component.tsx @@ -65,8 +65,11 @@ export default defineComponent({ formCommandService.checkCommands(); // 赋值处理 designViewModelService.assembleDesignViewModel(); - }); + const metadataInfo = useFormSchemaComposition.getFormMetadataBasicInfo(); + return useFormStateMachineComposition.getStateMachineMetadataAsync(formSchema, metadataInfo); + }).then((result) => { + useFormStateMachineComposition.setStateMachineMetadata(result?.data); }); }); diff --git a/packages/ui-vue/components/events-editor/src/schema/events-editor.schema.json b/packages/ui-vue/components/events-editor/src/schema/events-editor.schema.json index 83c1d8fb238..ae6254393b7 100644 --- a/packages/ui-vue/components/events-editor/src/schema/events-editor.schema.json +++ b/packages/ui-vue/components/events-editor/src/schema/events-editor.schema.json @@ -14,58 +14,11 @@ "type": "events", "default": "events-editor" }, - "appearance": { + "initialData": { "description": "", "type": "object", - "properties": { - "class": { - "type": "string" - }, - "style": { - "type": "string" - } - }, "default": {} - }, - "binding": { - "description": "", - "type": "object", - "default": {} - }, - "disable": { - "type": "string", - "default": false - }, - "editable": { - "description": "", - "type": "boolean", - "default": true - }, - "placeholder": { - "description": "", - "type": "string", - "default": "" - }, - "readonly": { - "description": "", - "type": "boolean", - "default": false - }, - "require": { - "description": "", - "type": "boolean", - "default": false - }, - "tabindex": { - "description": "", - "type": "number", - "default": -1 - }, - "visible": { - "description": "", - "type": "boolean", - "default": true - } + } }, "required": [ "id", -- Gitee From 41ff0e6b0b0ed967d0ce149fc02c378bfbc5812a Mon Sep 17 00:00:00 2001 From: wang-xh Date: Wed, 25 Dec 2024 17:11:40 +0800 Subject: [PATCH 048/181] =?UTF-8?q?feature:=20=E6=96=B0=E5=A2=9E=E5=8F=8C?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=A8=A1=E6=9D=BF=E3=80=81=E5=B7=A6=E6=A0=91?= =?UTF-8?q?=E5=8F=B3=E5=88=97=E8=A1=A8=E6=A8=A1=E6=9D=BF=E7=9A=84=E6=8B=96?= =?UTF-8?q?=E6=8B=BD=E6=8E=A7=E5=88=B6json=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../public/assets/template-rules/common.json | 18 ++++ .../template-rules/double-list-template.json | 32 +++++++ .../template-rules/list-card-template.json | 18 ---- .../template-rules/tree-card-template.json | 22 +---- .../template-rules/tree-list-template.json | 83 +++++++++++++++++++ .../section/src/schema/schema-resolver.ts | 6 ++ .../tabs/src/schema/schema-resolver.ts | 7 ++ 7 files changed, 148 insertions(+), 38 deletions(-) create mode 100644 packages/designer/public/assets/template-rules/double-list-template.json create mode 100644 packages/designer/public/assets/template-rules/tree-list-template.json diff --git a/packages/designer/public/assets/template-rules/common.json b/packages/designer/public/assets/template-rules/common.json index 4cc21cf7c3a..ef7244699f2 100644 --- a/packages/designer/public/assets/template-rules/common.json +++ b/packages/designer/public/assets/template-rules/common.json @@ -393,5 +393,23 @@ } ] } + }, + "f-page-content": { + "description": "分栏面板", + "canMove": false, + "canDelete": false, + "canAccept": false + }, + "f-page-content-nav": { + "description": "分栏面板导航区域(左侧)", + "canMove": false, + "canDelete": false, + "canAccept": false + }, + "f-page-content-main": { + "description": "分栏面板主区域(右侧)", + "canMove": false, + "canDelete": false, + "canAccept": true } } \ No newline at end of file diff --git a/packages/designer/public/assets/template-rules/double-list-template.json b/packages/designer/public/assets/template-rules/double-list-template.json new file mode 100644 index 00000000000..6e2129c22e9 --- /dev/null +++ b/packages/designer/public/assets/template-rules/double-list-template.json @@ -0,0 +1,32 @@ +{ + "f-struct-wrapper": { + "description": "双列表模板主表表格", + "canMove": { + "invalidContext": [ + { + "parent": { + "class": "f-page-content-nav" + } + } + ] + }, + "canDelete": { + "invalidContext": [ + { + "parent": { + "class": "f-page-content-nav" + } + } + ] + }, + "canAccept": { + "invalidContext": [ + { + "parent": { + "class": "f-page-content-nav" + } + } + ] + } + } +} \ No newline at end of file diff --git a/packages/designer/public/assets/template-rules/list-card-template.json b/packages/designer/public/assets/template-rules/list-card-template.json index dcf87b78261..ad09c122e5a 100644 --- a/packages/designer/public/assets/template-rules/list-card-template.json +++ b/packages/designer/public/assets/template-rules/list-card-template.json @@ -1,22 +1,4 @@ { - "f-page-content": { - "description": "分栏面板", - "canMove": false, - "canDelete": false, - "canAccept": false - }, - "f-page-content-nav": { - "description": "分栏面板导航区域(左侧)", - "canMove": false, - "canDelete": false, - "canAccept": false - }, - "f-page-content-main": { - "description": "分栏面板主区域(右侧)", - "canMove": false, - "canDelete": false, - "canAccept": true - }, "f-struct-wrapper": { "description": "表格组件", "canMove": { diff --git a/packages/designer/public/assets/template-rules/tree-card-template.json b/packages/designer/public/assets/template-rules/tree-card-template.json index 8e6cd8bf1d1..da3232b152c 100644 --- a/packages/designer/public/assets/template-rules/tree-card-template.json +++ b/packages/designer/public/assets/template-rules/tree-card-template.json @@ -1,22 +1,4 @@ { - "f-page-content": { - "description": "分栏面板", - "canMove": false, - "canDelete": false, - "canAccept": false - }, - "f-page-content-nav": { - "description": "分栏面板导航区域(左侧)", - "canMove": false, - "canDelete": false, - "canAccept": false - }, - "f-page-content-main": { - "description": "分栏面板主区域(右侧)", - "canMove": false, - "canDelete": false, - "canAccept": true - }, "f-struct-wrapper": { "description": "表格组件", "canMove": { @@ -66,7 +48,7 @@ ], "contents": [ { - "class": "f-component-grid" + "class": "f-component-treetable" } ] } @@ -82,7 +64,7 @@ ], "contents": [ { - "class": "f-component-grid" + "class": "f-component-treetable" } ] } diff --git a/packages/designer/public/assets/template-rules/tree-list-template.json b/packages/designer/public/assets/template-rules/tree-list-template.json new file mode 100644 index 00000000000..6dc69c872df --- /dev/null +++ b/packages/designer/public/assets/template-rules/tree-list-template.json @@ -0,0 +1,83 @@ +{ + "f-struct-wrapper": { + "description": "左树右列表模板的树组件", + "canMove": { + "invalidContext": [ + { + "parent": { + "class": "f-page-content-nav" + } + } + ] + }, + "canDelete": { + "invalidContext": [ + { + "parent": { + "class": "f-page-content-nav" + } + } + ] + }, + "canAccept": { + "invalidContext": [ + { + "parent": { + "class": "f-page-content-nav" + } + } + ] + } + }, + "f-section-treegrid": { + "description": "树表格组件的父级分组面板", + "canMove": { + "invalidContext": [ + { + "parent": [ + { + "class": "f-struct-wrapper" + } + ], + "contents": [ + { + "class": "f-component-treetable" + } + ] + } + ] + }, + "canDelete": { + "invalidContext": [ + { + "parent": [ + { + "class": "f-struct-wrapper" + } + ], + "contents": [ + { + "class": "f-component-treetable" + } + ] + } + ] + }, + "canAccept": { + "invalidContext": [ + { + "parent": [ + { + "class": "f-struct-wrapper" + } + ], + "contents": [ + { + "class": "f-component-treetable" + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/packages/ui-vue/components/section/src/schema/schema-resolver.ts b/packages/ui-vue/components/section/src/schema/schema-resolver.ts index 92a723f9b3d..48fc50d32fb 100644 --- a/packages/ui-vue/components/section/src/schema/schema-resolver.ts +++ b/packages/ui-vue/components/section/src/schema/schema-resolver.ts @@ -42,6 +42,12 @@ function wrapContainerForSection(resolver: DynamicResolver, sectionSchema: Recor break; } } + // 父容器是flex布局的场景,需要将容器设置为display:block,否则容器宽度有问题 + const parentElementRef: any = parentComponentInstance.elementRef; + const computedStyle = window.getComputedStyle(parentElementRef); + if (computedStyle && computedStyle.display === 'flex') { + containerSchema.appearance.class += ' d-block'; + } return containerSchema; } diff --git a/packages/ui-vue/components/tabs/src/schema/schema-resolver.ts b/packages/ui-vue/components/tabs/src/schema/schema-resolver.ts index 54e016db30c..91f0335e307 100644 --- a/packages/ui-vue/components/tabs/src/schema/schema-resolver.ts +++ b/packages/ui-vue/components/tabs/src/schema/schema-resolver.ts @@ -55,6 +55,13 @@ function wrapContainerSectionForTabs(resolver: DynamicResolver, context: Record< } } + // 父容器是flex布局的场景,需要将容器设置为display:block,否则容器宽度有问题 + const parentElementRef: any = parentComponentInstance.elementRef; + const computedStyle = window.getComputedStyle(parentElementRef); + if (computedStyle && computedStyle.display === 'flex') { + containerSchema.appearance.class += ' d-block'; + } + return containerSchema; } export function schemaResolver(resolver: DynamicResolver, schema: Record, context: Record): Record { -- Gitee From 4a46460104670ea60b02b0029943afc39493433e Mon Sep 17 00:00:00 2001 From: wang-xh Date: Wed, 25 Dec 2024 17:57:04 +0800 Subject: [PATCH 049/181] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E4=BB=A3=E7=A0=81=E7=9A=84=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../binding-selector-container.component.tsx | 13 ++----------- .../data-grid/src/schema/schema-resolver.ts | 4 ++-- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/packages/ui-vue/components/binding-selector/src/components/binding-selector-container.component.tsx b/packages/ui-vue/components/binding-selector/src/components/binding-selector-container.component.tsx index fafd62459ca..0f7eb2cdf05 100644 --- a/packages/ui-vue/components/binding-selector/src/components/binding-selector-container.component.tsx +++ b/packages/ui-vue/components/binding-selector/src/components/binding-selector-container.component.tsx @@ -136,7 +136,7 @@ export default defineComponent({ return () => { return (
{props.bindingType.enable && renderBindingType()} - < div class={treegridContainerStyle} style="position:relative;border-radius:10px;" > {renderTreeGrids()}
+
{renderTreeGrids()}
{ props.showCustomFooter ? : '' } - - { - props.showCustomFooter ? - : '' - } - -
); +
); }; } }); diff --git a/packages/ui-vue/components/data-grid/src/schema/schema-resolver.ts b/packages/ui-vue/components/data-grid/src/schema/schema-resolver.ts index 063889d153b..72a75d9d953 100644 --- a/packages/ui-vue/components/data-grid/src/schema/schema-resolver.ts +++ b/packages/ui-vue/components/data-grid/src/schema/schema-resolver.ts @@ -1,6 +1,6 @@ import { ComponentBuildInfo } from "../../../component/src/composition/inner-component-build-info"; -import { DesignerHostService, DraggingResolveContext, DraggingResolveContext } from "../../../designer-canvas/src/composition/types"; +import { DesignerHostService } from "../../../designer-canvas/src/composition/types"; import { DesignerComponentInstance } from "../../../designer-canvas/src/types"; import { DynamicResolver } from "../../../dynamic-resolver"; import { DataGridComponentCreatorService } from "../composition/data-grid-component-creator.service"; @@ -11,7 +11,7 @@ export function schemaResolver(resolver: DynamicResolver, schema: Record Date: Thu, 26 Dec 2024 08:47:56 +0800 Subject: [PATCH 050/181] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=90=88=E5=B9=B6=E7=9A=84=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer-canvas/src/composition/function/use-dragula.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts b/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts index d8f91a181e3..a7be4974f63 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/function/use-dragula.ts @@ -119,7 +119,6 @@ export function useDragula(designerHostService: DesignerHostService): UseDragula } /** ->>>>>>> main * 从控件工具箱中拖拽新建控件 * @param element 拖拽的元素 * @param target 目标容器元素 -- Gitee From c5913dbacff2bf67be18c0c5c8fba59b6940361d Mon Sep 17 00:00:00 2001 From: wang-xh Date: Thu, 26 Dec 2024 08:52:22 +0800 Subject: [PATCH 051/181] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=90=88=E5=B9=B6=E7=9A=84=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/composition/form-metadata.service.ts | 2 +- .../src/components/composition/use-event-parameter-data.ts | 6 +++--- .../src/components/composition/use-parameter-editor-data.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/designer/src/components/composition/form-metadata.service.ts b/packages/designer/src/components/composition/form-metadata.service.ts index c57127d3461..e9eafe0ac06 100644 --- a/packages/designer/src/components/composition/form-metadata.service.ts +++ b/packages/designer/src/components/composition/form-metadata.service.ts @@ -167,7 +167,7 @@ export function useFormMetadata(props: DesignerProps, useFormSchemaComposition: metadataId, path }; - return axios.post(api, sendData, {headers: requestHeader}) + return axios.post(api, sendData, {headers: requestHeader}); } return { queryMetadata, saveFormMetadata, queryFormTemplateRule, publishFormMetadata, deployFrontFile }; diff --git a/packages/designer/src/components/composition/use-event-parameter-data.ts b/packages/designer/src/components/composition/use-event-parameter-data.ts index 0122f43b6ac..e857ae2aa56 100644 --- a/packages/designer/src/components/composition/use-event-parameter-data.ts +++ b/packages/designer/src/components/composition/use-event-parameter-data.ts @@ -71,7 +71,7 @@ export function useEventParameterData( case ComponentType.dataGrid: { return getDataGridComponentName(component); } - case ComponentType.attachmentPanel: { + case ComponentType.uploader: { return '附件组件'; } case ComponentType.listView: { @@ -122,10 +122,10 @@ export function useEventParameterData( }); }); const commonComponents = componentsWithName && componentsWithName.map((item: { id: string, name: string }) => { - return { id: item.id, label: `${item.id} [${item.name}]` } + return { id: item.id, label: `${item.id} [${item.name}]` }; }) || []; const relativeComponents = componentsWithName && componentsWithName.map((item: { id: string, name: string }) => { - return { id: '#{' + item.id + '}', label: '#{' + `${item.id}` + `} [${item.name}]` } + return { id: '#{' + item.id + '}', label: '#{' + `${item.id}` + `} [${item.name}]` }; }) || []; const result: any = relativeComponents.concat(commonComponents); return result; diff --git a/packages/designer/src/components/composition/use-parameter-editor-data.ts b/packages/designer/src/components/composition/use-parameter-editor-data.ts index 72627fa48bf..68382689d22 100644 --- a/packages/designer/src/components/composition/use-parameter-editor-data.ts +++ b/packages/designer/src/components/composition/use-parameter-editor-data.ts @@ -38,7 +38,7 @@ export function useParameterEditorData(useFormSchemaComposition: UseFormSchema) }; // 列卡表单等场景中字段会在不同的组件中重复展示,id会重复,故将树节点id重置。 treeItem.data.id = treeItem.data.id + '_' + path; - treeItem.id = treeItem.id + '_' + path + treeItem.id = treeItem.id + '_' + path; if (isComplexField) { treeItem.hasChildren = true; schemaFieldsToTree(treeData, field.type.fields, -- Gitee From 681d6d5bac71769713ba655dc7f818ab118cec81 Mon Sep 17 00:00:00 2001 From: zengzhen Date: Thu, 26 Dec 2024 17:23:02 +0800 Subject: [PATCH 052/181] =?UTF-8?q?fix:=20amdim=E6=A1=86=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .ls-lint.yml | 5 + lerna.json | 3 +- package.json | 3 +- packages/farris-admin/.gitignore | 25 + packages/farris-admin/.vscode/extensions.json | 3 + packages/farris-admin/CHANGELOG.md | 8 + packages/farris-admin/README.md | 5 + packages/farris-admin/farris.config.mjs | 50 + packages/farris-admin/index.html | 15 + packages/farris-admin/package.json | 59 + packages/farris-admin/src/app-providers.ts | 9 + packages/farris-admin/src/app.vue | 28 + packages/farris-admin/src/assets/vue.svg | 1 + .../farris-admin/src/components/data.json | 4160 +++++++++++++++++ .../src/components/header.component.tsx | 64 + .../src/components/header.props.ts | 8 + packages/farris-admin/src/main.ts | 15 + packages/farris-admin/src/style.css | 0 packages/farris-admin/src/vite-env.d.ts | 1 + packages/farris-admin/tsconfig.json | 26 + packages/farris-admin/tsconfig.node.json | 11 + packages/farris-admin/vite.config.build.ts | 6 + packages/farris-admin/vite.config.dev.ts | 24 + pnpm-lock.yaml | 145 +- pnpm-workspace.yaml | 1 + 25 files changed, 4669 insertions(+), 6 deletions(-) create mode 100644 packages/farris-admin/.gitignore create mode 100644 packages/farris-admin/.vscode/extensions.json create mode 100644 packages/farris-admin/CHANGELOG.md create mode 100644 packages/farris-admin/README.md create mode 100644 packages/farris-admin/farris.config.mjs create mode 100644 packages/farris-admin/index.html create mode 100644 packages/farris-admin/package.json create mode 100644 packages/farris-admin/src/app-providers.ts create mode 100644 packages/farris-admin/src/app.vue create mode 100644 packages/farris-admin/src/assets/vue.svg create mode 100644 packages/farris-admin/src/components/data.json create mode 100644 packages/farris-admin/src/components/header.component.tsx create mode 100644 packages/farris-admin/src/components/header.props.ts create mode 100644 packages/farris-admin/src/main.ts create mode 100644 packages/farris-admin/src/style.css create mode 100644 packages/farris-admin/src/vite-env.d.ts create mode 100644 packages/farris-admin/tsconfig.json create mode 100644 packages/farris-admin/tsconfig.node.json create mode 100644 packages/farris-admin/vite.config.build.ts create mode 100644 packages/farris-admin/vite.config.dev.ts diff --git a/.ls-lint.yml b/.ls-lint.yml index 0ce759c980d..c7f74c5c605 100644 --- a/.ls-lint.yml +++ b/.ls-lint.yml @@ -121,3 +121,8 @@ ignore: - packages/ui-binding/dist - packages/ui-binding/node_modules - packages/ui-binding/package + # farris-admin + - packages/farris-admin/.vscode + - packages/farris-admin/node_modules + - packages/farris-admin/dist + \ No newline at end of file diff --git a/lerna.json b/lerna.json index b425e227e27..4454dea8ec9 100644 --- a/lerna.json +++ b/lerna.json @@ -8,7 +8,8 @@ "packages/ui-vue", "packages/mobile-ui-vue", "packages/devkit", - "packages/designer" + "packages/designer", + "packages/farris-admin" ], "version": "0.0.0", "useWorkspaces": true, diff --git a/package.json b/package.json index 42db7dac645..ae49ca577be 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "farrisTheme": "node ./packages/f-theme-editor-project/farris-themebuilder-service/farris.js", "docs:dev": "pnpm --filter ui-vue run docs:dev", "designer": "pnpm --filter designer run dev", - "demo": "pnpm --filter ui-vue dev" + "demo": "pnpm --filter ui-vue dev", + "admin":"pnpm --filter farris-admin run dev" }, "engines": { "node": ">=18", diff --git a/packages/farris-admin/.gitignore b/packages/farris-admin/.gitignore new file mode 100644 index 00000000000..e30c41771dc --- /dev/null +++ b/packages/farris-admin/.gitignore @@ -0,0 +1,25 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +node_modules_0 +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? \ No newline at end of file diff --git a/packages/farris-admin/.vscode/extensions.json b/packages/farris-admin/.vscode/extensions.json new file mode 100644 index 00000000000..a7cea0b0678 --- /dev/null +++ b/packages/farris-admin/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["Vue.volar"] +} diff --git a/packages/farris-admin/CHANGELOG.md b/packages/farris-admin/CHANGELOG.md new file mode 100644 index 00000000000..9e675c7e843 --- /dev/null +++ b/packages/farris-admin/CHANGELOG.md @@ -0,0 +1,8 @@ +# @farris/designer + +## 0.0.1 + +### Patch Changes + +- Updated dependencies + - @farris/ui-vue@1.1.1 diff --git a/packages/farris-admin/README.md b/packages/farris-admin/README.md new file mode 100644 index 00000000000..33895ab2002 --- /dev/null +++ b/packages/farris-admin/README.md @@ -0,0 +1,5 @@ +# Vue 3 + TypeScript + Vite + +This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 ` + + diff --git a/packages/farris-admin/package.json b/packages/farris-admin/package.json new file mode 100644 index 00000000000..9e08aea3777 --- /dev/null +++ b/packages/farris-admin/package.json @@ -0,0 +1,59 @@ +{ + "name": "@farris/designer", + "version": "0.0.1", + "type": "module", + "scripts": { + "dev": "vite --config ./vite.config.dev.ts", + "build": "vue-tsc --noEmit && vite build --config ./vite.config.dev.ts", + "preview": "vite preview --config ./vite.config.dev.ts", + "build:system": "farris-cli build -c ./vite.config.build.ts" + }, + "dependencies": { + "@farris/ui-vue": "workspace:^", + "@monaco-editor/loader": "^1.4.0", + "monaco-editor": "^0.52.2", + "vue": "^3.2.37" + }, + "devDependencies": { + "@babel/parser": "^7.19.0", + "@babel/preset-env": "^7.19.0", + "@babel/preset-typescript": "^7.18.0", + "@babel/traverse": "^7.19.0", + "@commitlint/cli": "^19.3.0", + "@commitlint/config-conventional": "^19.2.0", + "@farris/cli": "workspace:^", + "@farris/designer-dragula": "0.0.5", + "@testing-library/vue": "^7.0.0", + "@types/jest": "^26.0.24", + "@types/jsonp": "^0.2.3", + "@types/lodash.debounce": "^4.0.7", + "@typescript-eslint/eslint-plugin": "^7.15.0", + "@typescript-eslint/parser": "^7.15.0", + "@vitejs/plugin-vue": "^4.2.3", + "@vitejs/plugin-vue-jsx": "^3.0.1", + "@vue/babel-plugin-jsx": "^1.1.1", + "@vue/compiler-sfc": "^3.2.0", + "@vue/test-utils": "^2.0.0", + "@vuedx/typecheck": "^0.7.5", + "@vuedx/typescript-plugin-vue": "^0.7.5", + "babel-jest": "^29.0.3", + "chalk": "^5.0.0", + "commander": "^9.4.0", + "conventional-changelog-cli": "^2.2.2", + "happy-dom": "^8.9.0", + "inquirer": "^9.1.1", + "jest": "^29.0.0", + "ora": "^6.1.2", + "patch-vue-directive-ssr": "^0.0.1", + "sass": "^1.32.2", + "shelljs": "^0.8.4", + "typescript": "^4.6.4", + "vite": "^4.4.1", + "vite-plugin-dts": "^2.1.0", + "vite-plugin-md": "^0.20.0", + "vite-svg-loader": "^4.0.0", + "vitepress": "1.0.0-alpha.8", + "vitepress-theme-demoblock": "1.4.2", + "vue-tsc": "^1.2.0" + } +} \ No newline at end of file diff --git a/packages/farris-admin/src/app-providers.ts b/packages/farris-admin/src/app-providers.ts new file mode 100644 index 00000000000..3f7e84eae2b --- /dev/null +++ b/packages/farris-admin/src/app-providers.ts @@ -0,0 +1,9 @@ + +import { App } from "vue"; + + +export default { + install(app: App): void { + + } +}; diff --git a/packages/farris-admin/src/app.vue b/packages/farris-admin/src/app.vue new file mode 100644 index 00000000000..a97bf49e056 --- /dev/null +++ b/packages/farris-admin/src/app.vue @@ -0,0 +1,28 @@ +import { defineComponent } from "vue"; + + + + diff --git a/packages/farris-admin/src/assets/vue.svg b/packages/farris-admin/src/assets/vue.svg new file mode 100644 index 00000000000..770e9d333ee --- /dev/null +++ b/packages/farris-admin/src/assets/vue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/farris-admin/src/components/data.json b/packages/farris-admin/src/components/data.json new file mode 100644 index 00000000000..7559aeb9535 --- /dev/null +++ b/packages/farris-admin/src/components/data.json @@ -0,0 +1,4160 @@ +[ + { + "id": "SYSPUB", + "code": "SysPub", + "name": "系统公共", + "parentId": "0", + "layer": "1", + "menuType": "", + "funcType": "1", + "menuPath": "", + "icon": "/platform/runtime/sys/web/assets/custom/icon/SystemFoundation.svg", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "BPMS", + "code": "Bpms", + "name": "流程平台", + "parentId": "0", + "layer": "1", + "menuType": "", + "funcType": "1", + "menuPath": "", + "icon": "/platform/runtime/sys/web/assets/custom/icon/wf.svg", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "HIP", + "code": "HIP", + "name": "集成平台", + "parentId": "0", + "layer": "1", + "menuType": "", + "funcType": "1", + "menuPath": "", + "icon": "/platform/runtime/sys/web/assets/custom/icon/hip.svg", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "7b66058e-6d3f-1715-829d-9c60a2303f76", + "code": "Epp", + "name": "企业门户", + "parentId": "0", + "layer": "1", + "menuType": "", + "funcType": "1", + "menuPath": "", + "icon": "/platform/runtime/sys/web/assets/custom/icon/portal.svg", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "8074d6d3-82d8-f07b-62ab-62a8ae2e480e", + "code": "Cms", + "name": "内容管理", + "parentId": "0", + "layer": "1", + "menuType": "", + "funcType": "1", + "menuPath": "", + "icon": "/platform/runtime/sys/web/assets/custom/icon/cms.svg", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "BP", + "code": "BP09", + "name": "业务公共", + "parentId": "0", + "layer": "1", + "menuType": "", + "funcType": "1", + "menuPath": "", + "icon": "/platform/runtime/sys/web/assets/custom/icon/businessplatform.svg", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "d58be53e-516a-18ec-701e-2de3740b55d0", + "code": "zzGJYY", + "name": "zz关键应用", + "parentId": "0", + "layer": "1", + "menuType": "", + "funcType": "1", + "menuPath": "", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "SYS", + "code": "SYS", + "name": "系统管理", + "parentId": "SYSPUB", + "layer": "2", + "menuType": "", + "funcType": "2", + "menuPath": "/系统公共", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "5aa45ea7-b54c-8b16-5b77-b6dd81d6e687", + "code": "Msg", + "name": "消息中心", + "parentId": "SYSPUB", + "layer": "2", + "menuType": "", + "funcType": "2", + "menuPath": "/系统公共", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", + "code": "CommonService", + "name": "系统配置", + "parentId": "SYSPUB", + "layer": "2", + "menuType": "", + "funcType": "2", + "menuPath": "/系统公共", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "f409de99-be80-2526-7ad1-61627fa27441", + "code": "OperationMonitoring", + "name": "运行监控", + "parentId": "SYSPUB", + "layer": "2", + "menuType": "", + "funcType": "2", + "menuPath": "/系统公共", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "WF", + "code": "WF", + "name": "工作流平台", + "parentId": "BPMS", + "layer": "2", + "menuType": "", + "funcType": "2", + "menuPath": "/流程平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "BifPlatform", + "code": "aif", + "name": "业务流平台", + "parentId": "BPMS", + "layer": "2", + "menuType": "", + "funcType": "2", + "menuPath": "/流程平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "Task", + "code": "Task", + "name": "任务中心", + "parentId": "BPMS", + "layer": "2", + "menuType": "", + "funcType": "2", + "menuPath": "/流程平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", + "code": "EBS", + "name": "事件总线", + "parentId": "HIP", + "layer": "2", + "menuType": "", + "funcType": "2", + "menuPath": "/集成平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "DIP", + "code": "DIP", + "name": "数据集成", + "parentId": "HIP", + "layer": "2", + "menuType": "", + "funcType": "2", + "menuPath": "/集成平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "224e713a-87d4-8c14-1493-5263f0fc2acb", + "code": "CSB", + "name": "应用集成", + "parentId": "HIP", + "layer": "2", + "menuType": "", + "funcType": "2", + "menuPath": "/集成平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "ServiceGateway", + "code": "ServiceGateway", + "name": "服务网关", + "parentId": "HIP", + "layer": "2", + "menuType": "", + "funcType": "2", + "menuPath": "/集成平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "74ef3760-8805-f3ad-7036-6d85653d0b34", + "code": "Portal", + "name": "门户平台", + "parentId": "7b66058e-6d3f-1715-829d-9c60a2303f76", + "layer": "2", + "menuType": "", + "funcType": "2", + "menuPath": "/企业门户", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", + "code": "Cmsp", + "name": "内容管理平台", + "parentId": "8074d6d3-82d8-f07b-62ab-62a8ae2e480e", + "layer": "2", + "menuType": "", + "funcType": "2", + "menuPath": "/内容管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "9308d1c8-c442-ed7e-b772-19067d127a05", + "code": "KB", + "name": "知识库", + "parentId": "8074d6d3-82d8-f07b-62ab-62a8ae2e480e", + "layer": "2", + "menuType": "", + "funcType": "2", + "menuPath": "/内容管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "PROPlatform", + "code": "Bcc", + "name": "业务配置", + "parentId": "BP", + "layer": "2", + "menuType": "", + "funcType": "2", + "menuPath": "/业务公共", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "a2e65dd5-dfba-1c3a-9440-6d0bbcea938b", + "code": "NoCode", + "name": "零代码", + "parentId": "BP", + "layer": "2", + "menuType": "", + "funcType": "2", + "menuPath": "/业务公共", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "4ad1063c-e46e-daec-ed7b-3ffd35c44dc1", + "code": "zzModule", + "name": "zz模块", + "parentId": "d58be53e-516a-18ec-701e-2de3740b55d0", + "layer": "2", + "menuType": "", + "funcType": "2", + "menuPath": "/zz关键应用", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "sys01", + "code": "sys01", + "name": "用户管理", + "parentId": "SYS", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/系统公共/系统管理", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "sys02", + "code": "sys02", + "name": "权限管理", + "parentId": "SYS", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/系统公共/系统管理", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "580e0327-5667-96c2-6e23-de0a37b50d3e", + "code": "commoninfo", + "name": "公共信息", + "parentId": "SYS", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/系统公共/系统管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "e4b31d29-6a11-530d-e7e2-12cc8dc4740a", + "code": "permissionquery", + "name": "权限查询", + "parentId": "SYS", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/系统公共/系统管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", + "code": "MessageManager", + "name": "消息管理", + "parentId": "5aa45ea7-b54c-8b16-5b77-b6dd81d6e687", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/系统公共/消息中心", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "9a84a695-ba31-2de0-cfc9-b932f9ef15eb", + "code": "MessagePlatform", + "name": "消息平台", + "parentId": "5aa45ea7-b54c-8b16-5b77-b6dd81d6e687", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/系统公共/消息中心", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "f52fb3be-01f7-443e-b2df-e1b5c5fab3ab", + "code": "document-configuration", + "name": "文档配置", + "parentId": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/系统公共/系统配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "b9e2b42b-15ad-538a-0ba5-64ac82f0d044", + "code": "Print Setting", + "name": "打印配置", + "parentId": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/系统公共/系统配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "37d2b123-ba68-e144-6b33-0226cad5047e", + "code": "Early Warning Platform", + "name": "预警平台", + "parentId": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/系统公共/系统配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "a7562755-da33-836e-1375-2ac3d820e351", + "code": "Job Scheduler", + "name": "调度任务", + "parentId": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/系统公共/系统配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "66a4d7ce-008f-d7f9-40db-c2080ce4d14c", + "code": "RuleBase", + "name": "规则库", + "parentId": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/系统公共/系统配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "05dff722-aa93-4fb6-92dd-6afad7ea8d1c", + "code": "DistributedTransaction", + "name": "分布式事务", + "parentId": "f409de99-be80-2526-7ad1-61627fa27441", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/系统公共/运行监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "d250437f-f452-43d2-aca6-ee828877dec0", + "code": "TraceDebug", + "name": "跟踪调试", + "parentId": "f409de99-be80-2526-7ad1-61627fa27441", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/系统公共/运行监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "Security Monitor", + "code": "Security Monitor", + "name": "安全监控", + "parentId": "f409de99-be80-2526-7ad1-61627fa27441", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/系统公共/运行监控", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "102c8de7-875f-ba4b-fd29-75b02a1d1f87", + "code": "ChgdrMonitor", + "name": "业务变更日志", + "parentId": "f409de99-be80-2526-7ad1-61627fa27441", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/系统公共/运行监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "3a45c311-8f12-58a3-fbf5-c19032798bce", + "code": "BusinessLock", + "name": "业务锁", + "parentId": "f409de99-be80-2526-7ad1-61627fa27441", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/系统公共/运行监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "2b84c32c-302a-ef4d-7525-27e22b6de2fd", + "code": "SysLog", + "name": "系统日志", + "parentId": "f409de99-be80-2526-7ad1-61627fa27441", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/系统公共/运行监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "WF02", + "code": "WF02", + "name": "流程建模", + "parentId": "WF", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/流程平台/工作流平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "971ab3c6-2d7d-c19d-67d6-52011e851731", + "code": "WF03", + "name": "流程监控", + "parentId": "WF", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/流程平台/工作流平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "WF09", + "code": "WF09", + "name": "流程基础数据", + "parentId": "WF", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/流程平台/工作流平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "bc7701d5-eb92-4b2b-46e3-ff671d08826b", + "code": "settingManager", + "name": "配置管理", + "parentId": "WF", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/流程平台/工作流平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "WF04", + "code": "WF04", + "name": "流程统计分析", + "parentId": "WF", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/流程平台/工作流平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "BifModel", + "code": "BifModel", + "name": "单据流建模", + "parentId": "BifPlatform", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/流程平台/业务流平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", + "code": "BifSettings", + "name": "单据流设置", + "parentId": "BifPlatform", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/流程平台/业务流平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "BifMonitor", + "code": "BifMonitor", + "name": "单据流监控", + "parentId": "BifPlatform", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/流程平台/业务流平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "69b65583-6b2f-0a84-fb5e-76f851f41e91", + "code": "BpmModeling", + "name": "业务流建模", + "parentId": "BifPlatform", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/流程平台/业务流平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "6c0290dd-0660-17fc-d63b-7cce4db447f3", + "code": "BpmMonitor", + "name": "业务流监控", + "parentId": "BifPlatform", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/流程平台/业务流平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "6d015a0f-3454-3ec4-6858-a523d437b572", + "code": "BpmBasicData", + "name": "业务流基础数据", + "parentId": "BifPlatform", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/流程平台/业务流平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "WF01", + "code": "WF01", + "name": "任务管理", + "parentId": "Task", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/流程平台/任务中心", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "TASK02", + "code": "TASK02", + "name": "任务配置", + "parentId": "Task", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/流程平台/任务中心", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "ebsEventCenter", + "code": "ebsEventCenter", + "name": "事件中心", + "parentId": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/事件总线", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "0BDFF9DA-7D81-4589-8428-C79C30E58825", + "code": "ebConfigCenter", + "name": "配置中心", + "parentId": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/事件总线", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "AA771CAB-5C40-4DF0-81FF-ABC8B4093071", + "code": "exceptionHandler", + "name": "事件异常处理", + "parentId": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/事件总线", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "CBAB3CA5-0915-4E3B-88EE-430F270B807D", + "code": "eventMonitor", + "name": "事件监控", + "parentId": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/事件总线", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "bbe35771-dc07-f7d4-bae1-7284ce4bbad7", + "code": "mqService", + "name": "消息服务", + "parentId": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/事件总线", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "dip-vm", + "code": "dip-transformation", + "name": "数据转换", + "parentId": "DIP", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/数据集成", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "dip-rri", + "code": "dip-rri", + "name": "实时同步管理", + "parentId": "DIP", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/数据集成", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "rri-data-processing", + "code": "rri-data-processing", + "name": "数据异常处理", + "parentId": "DIP", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/数据集成", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "rri-sync-config", + "code": "rri-sync-config", + "name": "实时同步配置", + "parentId": "DIP", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/数据集成", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "rri-data-monitor", + "code": "rri-data-monitor", + "name": "实时同步监控", + "parentId": "DIP", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/数据集成", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "217401ed-28a4-6f48-b942-3fe38fed324b", + "code": "connectionmgr", + "name": "外部系统管理", + "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/应用集成", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "e9fbf898-8e66-45de-2ddb-9639f3462721", + "code": "ExternalService", + "name": "外部服务接入", + "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/应用集成", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "a9523b42-9d38-0b0a-fca6-3a4c178ab78a", + "code": "ServiceMonitor", + "name": "外部服务监控", + "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/应用集成", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "18d3b84b-eded-6f11-9b91-891b47711443", + "code": "interface-service", + "name": "集成服务注册", + "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/应用集成", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "1d514b9f-a219-af94-5cba-2a92e451e0c5", + "code": "open-integrated-services", + "name": "集成服务开放", + "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/应用集成", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "3ec2997c-392b-7027-99b7-745a5eca92ad", + "code": "service-orchestrate", + "name": "集成服务编排", + "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/应用集成", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "fee2ac33-b201-1ed1-2314-bd1a9befa071", + "code": "basic-configuration", + "name": "基础配置", + "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/应用集成", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "2ddaf385-2387-5375-9655-1fe92c1099d0", + "code": "integration-configuration", + "name": "应用集成管理", + "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/应用集成", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "2ee77eca-2efb-1e2d-a2bb-beed6b7654d7", + "code": "OpenApiManager", + "name": "开放API管理", + "parentId": "ServiceGateway", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/服务网关", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "52173d8c-9c3e-65f5-e493-98e20593719b", + "code": "Service-Authorization", + "name": "API授权管理", + "parentId": "ServiceGateway", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/服务网关", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "596c066a-cd99-3bb1-4a17-fea7ca9d794b", + "code": "MicroServiceManagement", + "name": "微服务API管理", + "parentId": "ServiceGateway", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/集成平台/服务网关", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", + "code": "portal-configuration", + "name": "门户配置", + "parentId": "74ef3760-8805-f3ad-7036-6d85653d0b34", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/企业门户/门户平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "b1138ab9-7cd0-7632-e2e3-68c181d0a873", + "code": "cms-application", + "name": "应用", + "parentId": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/内容管理/内容管理平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "8472044f-2a80-089f-0221-33c4d52de518", + "code": "cms-schema", + "name": "模型", + "parentId": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/内容管理/内容管理平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "23f4461c-ad39-97a3-d6ff-41dff858fa50", + "code": "cms-content", + "name": "内容", + "parentId": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/内容管理/内容管理平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "70871143-8fff-3b39-c3d1-52353866bda1", + "code": "cms-setting", + "name": "配置", + "parentId": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/内容管理/内容管理平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "74802909-385a-10b8-fc84-9c0bce98610f", + "code": "cms-statistics", + "name": "统计", + "parentId": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/内容管理/内容管理平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "5424ab74-1be1-9318-9740-cda0a5cdbb98", + "code": "cms-kb-manager", + "name": "知识管理", + "parentId": "9308d1c8-c442-ed7e-b772-19067d127a05", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/内容管理/知识库", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "fc687ac8-6ae0-d113-6632-104df807227a", + "code": "cms-kb-setting", + "name": "配置", + "parentId": "9308d1c8-c442-ed7e-b772-19067d127a05", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/内容管理/知识库", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "e8b71ba6-3820-298d-e11d-fb62ef669e13", + "code": "cmd-kb-board", + "name": "看板", + "parentId": "9308d1c8-c442-ed7e-b772-19067d127a05", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/内容管理/知识库", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "aedda4f4-fed6-bea7-12a1-1257541d7d37", + "code": "data transfer", + "name": "预置数据导出", + "parentId": "PROPlatform", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/业务公共/业务配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "UBCC0001", + "code": "BCP_BIZCONF", + "name": "业务配置", + "parentId": "PROPlatform", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/业务公共/业务配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "Epp-pagelayout", + "code": "Dashboard", + "name": "工作中心", + "parentId": "PROPlatform", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/业务公共/业务配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "22821215-9dbe-7673-a4ec-b2f93f096b35", + "code": "BCP_QRYCONF", + "name": "查询定制", + "parentId": "PROPlatform", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/业务公共/业务配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "Function Design", + "code": "Function Design", + "name": "菜单定义", + "parentId": "PROPlatform", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/业务公共/业务配置", + "icon": "0", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "Authorization Design", + "code": "Authorization Design", + "name": "权限定义", + "parentId": "PROPlatform", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/业务公共/业务配置", + "icon": "0", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "03851cc7-9c34-a213-d7fa-3c831d596406", + "code": "Chgdr", + "name": "业务变更日志", + "parentId": "PROPlatform", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/业务公共/业务配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "dip-dataie", + "code": "dip-dataie", + "name": "导入导出", + "parentId": "PROPlatform", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/业务公共/业务配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "cf81a0c7-8019-74e2-0a81-cca95a26f72a", + "code": "Syssetting", + "name": "系统设置", + "parentId": "PROPlatform", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/业务公共/业务配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "a274453d-2465-5377-27da-c4c47883cc6b", + "code": "epp schedule", + "name": "我的日程", + "parentId": "PROPlatform", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/业务公共/业务配置", + "icon": null, + "pinyin": "wodericheng", + "simpinyin": "wdrc", + "child": null + }, + { + "id": "3680fe22-2b9c-ee80-4826-044ca843497b", + "code": "quick-sight", + "name": "轻分析", + "parentId": "a2e65dd5-dfba-1c3a-9440-6d0bbcea938b", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/业务公共/零代码", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "code": "zzMenuGroup", + "name": "zz菜单分组", + "parentId": "4ad1063c-e46e-daec-ed7b-3ffd35c44dc1", + "layer": "3", + "menuType": "", + "funcType": "3", + "menuPath": "/zz关键应用/zz模块", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "sys-organization", + "code": "sys-organization", + "name": "系统组织", + "parentId": "sys01", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统管理/用户管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "user-group", + "code": "user-group", + "name": "用户分组", + "parentId": "sys01", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统管理/用户管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "user-manager", + "code": "user-manager", + "name": "用户", + "parentId": "sys01", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统管理/用户管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "role-group", + "code": "role-group", + "name": "功能组分组", + "parentId": "sys02", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统管理/权限管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "role-manager", + "code": "role-manager", + "name": "功能组", + "parentId": "sys02", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统管理/权限管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "position-group", + "code": "position-group", + "name": "岗位分组", + "parentId": "sys02", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统管理/权限管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "position-manager", + "code": "position-manager", + "name": "岗位", + "parentId": "sys02", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统管理/权限管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "124829f1-ca20-2b49-d154-dfaa171e1d30", + "code": "ReverseAssignOp", + "name": "功能权限反向授权", + "parentId": "sys02", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统管理/权限管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "17abdaf6-9205-c4ea-800c-b6fec92eae50", + "code": "languagemanager", + "name": "语种管理", + "parentId": "580e0327-5667-96c2-6e23-de0a37b50d3e", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统管理/公共信息", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "1580173b-5823-5f19-42d0-6e5bd1c0a294", + "code": "timezonemanager", + "name": "时区管理", + "parentId": "580e0327-5667-96c2-6e23-de0a37b50d3e", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统管理/公共信息", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "324178e7-e223-4d77-063c-49af964576ae", + "code": "dataformatmanager", + "name": "数据格式管理", + "parentId": "580e0327-5667-96c2-6e23-de0a37b50d3e", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统管理/公共信息", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "abf2e600-4c11-c716-5d44-0a9387749971", + "code": "BizOrgAuthorityQuery", + "name": "业务组织权限查询", + "parentId": "e4b31d29-6a11-530d-e7e2-12cc8dc4740a", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统管理/权限查询", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "b51c2198-4ff4-13b5-66d2-2b3f283edccb", + "code": "MyMessage", + "name": "我的消息", + "parentId": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/消息中心/消息管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "0ea02fe8-6294-7fd3-7cbf-1e5f5c287ad7", + "code": "MessageClassification", + "name": "消息分组", + "parentId": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/消息中心/消息管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "ddc58440-4389-d879-3267-44f1ed1fbf52", + "code": "MessageAccountRegister", + "name": "服务号注册", + "parentId": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/消息中心/消息管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "270e1ad6-2f4e-9f9d-5442-b52c16eb30b4", + "code": "MessageDataSource", + "name": "数据源注册", + "parentId": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/消息中心/消息管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "91ad94ec-f195-cdcf-f31e-0ea3efba141f", + "code": "MessageAnnounce", + "name": "公告维护", + "parentId": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/消息中心/消息管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "da5c64b7-d03f-fbb8-476f-58dc4c21cd1d", + "code": "MessageChannel", + "name": "消息渠道注册", + "parentId": "9a84a695-ba31-2de0-cfc9-b932f9ef15eb", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/消息中心/消息平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "7daad5b8-4415-1222-ab69-1fa60f5aeb0d", + "code": "MessageChannelConfiguration", + "name": "消息渠道配置", + "parentId": "9a84a695-ba31-2de0-cfc9-b932f9ef15eb", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/消息中心/消息平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "30758034-f2c0-e21d-9866-dec3659ef7e2", + "code": "MessageTemplate", + "name": "消息模板定义", + "parentId": "9a84a695-ba31-2de0-cfc9-b932f9ef15eb", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/消息中心/消息平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "3578b4c0-cde4-7f5a-d062-61973ee7a481", + "code": "MessageConfiguration", + "name": "业务消息配置", + "parentId": "9a84a695-ba31-2de0-cfc9-b932f9ef15eb", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/消息中心/消息平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "80a8b9f5-c3a6-51a6-6700-f6022c57ecbf", + "code": "document-rootsetting-configuration", + "name": "文档统一存储配置", + "parentId": "f52fb3be-01f7-443e-b2df-e1b5c5fab3ab", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统配置/文档配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "ade090ea-5ffe-f650-384c-b6f60461e189", + "code": "document-policy-configuration", + "name": "文档管理策略配置", + "parentId": "f52fb3be-01f7-443e-b2df-e1b5c5fab3ab", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统配置/文档配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "6ef1faaf-4e8e-18cc-7a6a-be35b288f9b1", + "code": "Print Device Manager", + "name": "打印设备管理", + "parentId": "b9e2b42b-15ad-538a-0ba5-64ac82f0d044", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统配置/打印配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "23f1a72d-b0f1-b85c-735d-325d1a42db86", + "code": "Print Moniter", + "name": "打印监控", + "parentId": "b9e2b42b-15ad-538a-0ba5-64ac82f0d044", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统配置/打印配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "850d25d0-fd00-8f47-7e50-8c95952422e8", + "code": "Early Warning Definition", + "name": "预警定义", + "parentId": "37d2b123-ba68-e144-6b33-0226cad5047e", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统配置/预警平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "074831e3-eba0-8cdc-7256-480d22117ac6", + "code": "Early Warning Subscribetion", + "name": "预警订阅", + "parentId": "37d2b123-ba68-e144-6b33-0226cad5047e", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统配置/预警平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "79caf8ee-b052-909a-0440-16f70b12a9a2", + "code": "Early Warning Moniter", + "name": "预警日志", + "parentId": "37d2b123-ba68-e144-6b33-0226cad5047e", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统配置/预警平台", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "c2e79004-311b-f34f-d4c5-f6b6bb4522bb", + "code": "Single Scheduler", + "name": "任务管理", + "parentId": "a7562755-da33-836e-1375-2ac3d820e351", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统配置/调度任务", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "29aabec4-f181-08d2-a7f6-06f46cebd171", + "code": "Scheduler Trigger", + "name": "定时器管理", + "parentId": "a7562755-da33-836e-1375-2ac3d820e351", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统配置/调度任务", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "df84c295-ae68-6241-4317-2bc8b286251c", + "code": "SchedularCalendar", + "name": "工作日历", + "parentId": "a7562755-da33-836e-1375-2ac3d820e351", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统配置/调度任务", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "6f3d0d22-45a5-2469-485f-797e44b75537", + "code": "scheduler-monitor", + "name": "服务监控", + "parentId": "a7562755-da33-836e-1375-2ac3d820e351", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统配置/调度任务", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "c8f99ac7-a633-3e0f-99a8-255d1ac41780", + "code": "RuleBaseMangaer", + "name": "规则库管理", + "parentId": "66a4d7ce-008f-d7f9-40db-c2080ce4d14c", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/系统配置/规则库", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "609b97f3-bc87-8356-9914-9f0a15f77239", + "code": "dtx-manager", + "name": "分布式事务管理", + "parentId": "05dff722-aa93-4fb6-92dd-6afad7ea8d1c", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/运行监控/分布式事务", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "483fdee7-818c-4b5d-93b4-cdb06db009b3", + "code": "TD_TraceViewer", + "name": "程序跟踪查看器", + "parentId": "d250437f-f452-43d2-aca6-ee828877dec0", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/运行监控/跟踪调试", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "online-user", + "code": "online-user", + "name": "在线用户", + "parentId": "Security Monitor", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/运行监控/安全监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "security-audit", + "code": "security-audit", + "name": "安全审计", + "parentId": "Security Monitor", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/运行监控/安全监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "security-audit-category", + "code": "audit-category", + "name": "审计类别", + "parentId": "Security Monitor", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/运行监控/安全监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "security-audit-event", + "code": "audit-event", + "name": "审计事件", + "parentId": "Security Monitor", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/运行监控/安全监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "b66db23a-2155-bdf7-d006-9a383ab71c06", + "code": "ChgdrQuery", + "name": "日志查询", + "parentId": "102c8de7-875f-ba4b-fd29-75b02a1d1f87", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/运行监控/业务变更日志", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "a7583855-8da1-b1f1-267f-301cea6068ef", + "code": "lockmanagement", + "name": "锁管理", + "parentId": "3a45c311-8f12-58a3-fbf5-c19032798bce", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/运行监控/业务锁", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "a11679bb-b8bd-ada9-21c4-b1700e0418db", + "code": "logging-level", + "name": "日志级别调整", + "parentId": "2b84c32c-302a-ef4d-7525-27e22b6de2fd", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/运行监控/系统日志", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "72ad68f0-d277-e4db-8dcf-15572aa743d2", + "code": "logging-viewer", + "name": "系统日志查看", + "parentId": "2b84c32c-302a-ef4d-7525-27e22b6de2fd", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/系统公共/运行监控/系统日志", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "WF0202", + "code": "WF0202", + "name": "流程设计", + "parentId": "WF02", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/工作流平台/流程建模", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "WF0203", + "code": "WF0203", + "name": "流程分配", + "parentId": "WF02", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/工作流平台/流程建模", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "f75a1030-36e5-46e9-8f24-1edcaa056bb7", + "code": "wf-process-administrator", + "name": "流程管理员", + "parentId": "WF02", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/工作流平台/流程建模", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "05913dd6-5448-e2be-cc4e-df804cb48331", + "code": "WF0301", + "name": "流程实例管理", + "parentId": "971ab3c6-2d7d-c19d-67d6-52011e851731", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/工作流平台/流程监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "WF0201", + "code": "WF0201", + "name": "流程分类", + "parentId": "WF09", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/工作流平台/流程基础数据", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "WF0204", + "code": "WF0204", + "name": "审批动作定义", + "parentId": "WF09", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/工作流平台/流程基础数据", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "b58f93c4-74fa-6cff-cb7d-55c75df570a7", + "code": "WF-reportingLine-def", + "name": "汇报关系定义", + "parentId": "bc7701d5-eb92-4b2b-46e3-ff671d08826b", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/工作流平台/配置管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "b0a9339d-7caf-8a5f-a926-b66e63d2d09e", + "code": "WF-reportingLine-setting", + "name": "汇报关系设置", + "parentId": "bc7701d5-eb92-4b2b-46e3-ff671d08826b", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/工作流平台/配置管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "WF0401", + "code": "WF0401", + "name": "流程数量统计", + "parentId": "WF04", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/工作流平台/流程统计分析", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "WF0402", + "code": "WF0402", + "name": "流程时效分析", + "parentId": "WF04", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/工作流平台/流程统计分析", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "WF0403", + "code": "WF0403", + "name": "节点时效分析", + "parentId": "WF04", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/工作流平台/流程统计分析", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "WF0404", + "code": "WF0404", + "name": "人员时效分析", + "parentId": "WF04", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/工作流平台/流程统计分析", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "BifDesigner", + "code": "BifDesigner", + "name": "单据流定义", + "parentId": "BifModel", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/业务流平台/单据流建模", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "c6d74485-83ab-91ba-3f8f-7cddfafce52e", + "code": "BifLogSettings", + "name": "单据流日志设置", + "parentId": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/业务流平台/单据流设置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "40ad8d6d-ba01-3c19-ef06-1ec3aa856ca7", + "code": "BillTypeManager", + "name": "单据类型管理", + "parentId": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/业务流平台/单据流设置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "cad0e5fd-3305-4ff0-b27f-4d49ad310b9c", + "code": "BillRelationManager", + "name": "单据关系管理", + "parentId": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/业务流平台/单据流设置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "5cc0ee7e-722a-5dd3-fcd9-8b7b548154c0", + "code": "RelationFieldsManager", + "name": "关联字段管理", + "parentId": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/业务流平台/单据流设置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "d23c3a58-f864-9637-eaf3-c66058b6d3d5", + "code": "BillTrackingConfig", + "name": "单据追踪配置", + "parentId": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/业务流平台/单据流设置", + "icon": null, + "pinyin": "danjuzhuizongpeizhi", + "simpinyin": "djzzpz", + "child": null + }, + { + "id": "BifManager", + "code": "BifManager", + "name": "单据流管理", + "parentId": "BifMonitor", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/业务流平台/单据流监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "BifDiagnostor", + "code": "BifDiagnostor", + "name": "单据流诊断", + "parentId": "BifMonitor", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/业务流平台/单据流监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "e2fe4705-1aa3-575f-a658-58366a21fde7", + "code": "BpmDesigner", + "name": "业务流设计", + "parentId": "69b65583-6b2f-0a84-fb5e-76f851f41e91", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/业务流平台/业务流建模", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "46dcc2f1-04d6-3f56-86e3-22210ca29023", + "code": "BpmInstanceManagement", + "name": "业务流实例管理", + "parentId": "6c0290dd-0660-17fc-d63b-7cce4db447f3", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/业务流平台/业务流监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "4c1d7d54-0e3b-0e52-e861-16d9bf21950d", + "code": "BpmProcessExceptionManagement", + "name": "业务流实例异常管理", + "parentId": "6c0290dd-0660-17fc-d63b-7cce4db447f3", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/业务流平台/业务流监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "60f194f5-bae3-e5b2-ae01-7a0227c0794c", + "code": "BpmApprovalAction", + "name": "人工操作动作定义", + "parentId": "6d015a0f-3454-3ec4-6858-a523d437b572", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/业务流平台/业务流基础数据", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "WF0101", + "code": "WF0101", + "name": "我的任务", + "parentId": "WF01", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/任务中心/任务管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "b9d8cdbb-91cc-1765-3770-67ead45ec363", + "code": "WF0103", + "name": "我的委托", + "parentId": "WF01", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/任务中心/任务管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "deaa4ee2-5c9a-cdcb-7070-d3652530f8a9", + "code": "Task_AllDelegateMgr", + "name": "委托管理", + "parentId": "WF01", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/任务中心/任务管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "WF0102", + "code": "WF0102", + "name": "任务分类", + "parentId": "TASK02", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/任务中心/任务配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "WF0205", + "code": "WF0205", + "name": "显示列设置", + "parentId": "TASK02", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/流程平台/任务中心/任务配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "A0E4C91F-4A8D-4FB3-A38C-E6C727815A46", + "code": "streamEvent", + "name": "事件管理", + "parentId": "ebsEventCenter", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/事件总线/事件中心", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "DADA0CA5-AF15-46AF-B0DE-5E74EA50C419", + "code": "streamAction", + "name": "事件处理器", + "parentId": "ebsEventCenter", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/事件总线/事件中心", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "070a49b2-1b88-b8ac-146e-4b5ceaf2f2e3", + "code": "ebsSubscribe", + "name": "事件订阅", + "parentId": "ebsEventCenter", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/事件总线/事件中心", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "7bb91bfb-035f-8f7e-de63-673c8617e29b", + "code": "eventRoutingConfig", + "name": "事件路由配置", + "parentId": "0BDFF9DA-7D81-4589-8428-C79C30E58825", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/事件总线/配置中心", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "318ffca4-261f-0495-f163-7c24efea5e31", + "code": "eventGlobalConfig", + "name": "运行参数配置", + "parentId": "0BDFF9DA-7D81-4589-8428-C79C30E58825", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/事件总线/配置中心", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "E4020EBF-8ACE-4E25-9626-CC0318BBF330", + "code": "manualIntervension", + "name": "人工干预", + "parentId": "AA771CAB-5C40-4DF0-81FF-ABC8B4093071", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/事件总线/事件异常处理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "69AEDA86-8656-4FBA-8F59-5BFC35229568", + "code": "streameventlog", + "name": "事件发布日志", + "parentId": "CBAB3CA5-0915-4E3B-88EE-430F270B807D", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/事件总线/事件监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "CDDE3461-2ACC-46EF-8207-64DC59E834D4", + "code": "streameventhandlelog", + "name": "事件处理日志", + "parentId": "CBAB3CA5-0915-4E3B-88EE-430F270B807D", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/事件总线/事件监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "46d17ce7-7528-b8e6-e154-0f8e3d0f2b08", + "code": "ebs-tracelog", + "name": "事件启动日志", + "parentId": "CBAB3CA5-0915-4E3B-88EE-430F270B807D", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/事件总线/事件监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "37d80b47-6571-fd58-9dd6-ba07f879654c", + "code": "ebs-uniquenessmonitoring", + "name": "事件重复性控制", + "parentId": "CBAB3CA5-0915-4E3B-88EE-430F270B807D", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/事件总线/事件监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "36c9064a-0d42-0780-5888-c305d15ef006", + "code": "mqQueueMonitor", + "name": "队列监控", + "parentId": "bbe35771-dc07-f7d4-bae1-7284ce4bbad7", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/事件总线/消息服务", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "f1752974-85a5-c88a-c791-ffd08ef4945d", + "code": "mqServerMonitor", + "name": "消息服务配置", + "parentId": "bbe35771-dc07-f7d4-bae1-7284ce4bbad7", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/事件总线/消息服务", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "1cb2fd49-30a5-714f-ab31-c2cb829e6806", + "code": "queueManagement", + "name": "队列管理", + "parentId": "bbe35771-dc07-f7d4-bae1-7284ce4bbad7", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/事件总线/消息服务", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "dip-vm0001", + "code": "valuemappingdefine", + "name": "值映射定义", + "parentId": "dip-vm", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/数据集成/数据转换", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "dip-vm0002", + "code": "valuemappingsetting", + "name": "值映射设置", + "parentId": "dip-vm", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/数据集成/数据转换", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "2b555d1d-60a9-2ad3-656c-d365210351aa", + "code": "Mapping", + "name": "数据转换规则", + "parentId": "dip-vm", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/数据集成/数据转换", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "cebbcde3-23c6-198c-ac5b-663414c1e2cd", + "code": "rri-manage-dev", + "name": "数据同步分组管理", + "parentId": "dip-rri", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/数据集成/实时同步管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "rri-dataservice", + "code": "rri-dataservice", + "name": "数据服务注册", + "parentId": "dip-rri", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/数据集成/实时同步管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "rri-subscribe", + "code": "rri-subscribe", + "name": "数据处理器", + "parentId": "dip-rri", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/数据集成/实时同步管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "a6b94bb6-f64c-663b-95e7-579b45ecd001", + "code": "rri-manualhandling", + "name": "人工干预", + "parentId": "rri-data-processing", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/数据集成/数据异常处理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "f1fcf1a8-5a6d-3829-9f4f-44dca7831487", + "code": "rri-manage-custom", + "name": "数据同步分组配置", + "parentId": "rri-sync-config", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/数据集成/实时同步配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "cb450e63-c1f7-4505-21fe-0fa567c22e34", + "code": "rri-strategyconfig", + "name": "参数配置", + "parentId": "rri-sync-config", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/数据集成/实时同步配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "1f096801-c7ed-e004-26c2-2628237dec8d", + "code": "rri-dataInit", + "name": "数据初始", + "parentId": "rri-sync-config", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/数据集成/实时同步配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "dee70c45-c8d0-3390-fdc1-ec3fa6cad9f2", + "code": "rri-publishlog", + "name": "数据发布日志", + "parentId": "rri-data-monitor", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/数据集成/实时同步监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "2f3af700-0e10-252d-edb4-153d7a784265", + "code": "rri-handlerlog", + "name": "数据处理日志", + "parentId": "rri-data-monitor", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/数据集成/实时同步监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "879659b9-0fe1-db11-19ae-2fb5ecf27151", + "code": "rri-manualsynclog", + "name": "数据初始日志", + "parentId": "rri-data-monitor", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/数据集成/实时同步监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "43861ad5-ba12-37df-4f86-24cea8b02396", + "code": "sif-connection-manage", + "name": "系统连接管理", + "parentId": "217401ed-28a4-6f48-b942-3fe38fed324b", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/外部系统管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "661aeb5f-de1f-c49b-e049-462e41105e95", + "code": "external-service-manage", + "name": "外部服务管理", + "parentId": "e9fbf898-8e66-45de-2ddb-9639f3462721", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/外部服务接入", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "85c88477-3825-cd3f-d217-0a302d2d3a21", + "code": "template-service-manage", + "name": "外部服务模板库", + "parentId": "e9fbf898-8e66-45de-2ddb-9639f3462721", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/外部服务接入", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "4dcf5bd6-7b47-7868-db7b-d59ff576bf18", + "code": "service-template-statistic", + "name": "外部服务模板统计", + "parentId": "e9fbf898-8e66-45de-2ddb-9639f3462721", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/外部服务接入", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "41ad6723-8db6-60cb-d8c2-105749e7d96e", + "code": "service-monitor-config", + "name": "外部服务配置", + "parentId": "a9523b42-9d38-0b0a-fca6-3a4c178ab78a", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/外部服务监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "3fb2c0df-3c24-446f-9815-bdf3f8a70fb0", + "code": "service-status-monitor", + "name": "外部服务监控", + "parentId": "a9523b42-9d38-0b0a-fca6-3a4c178ab78a", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/外部服务监控", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "d1ff58cf-d6e1-9728-df4f-c0234bdb86b2", + "code": "service-logging", + "name": "外部服务日志", + "parentId": "a9523b42-9d38-0b0a-fca6-3a4c178ab78a", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/外部服务监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "c9c9b772-661b-9d37-f5e9-9add8a72e662", + "code": "service-logging-statistic", + "name": "外部服务日志统计", + "parentId": "a9523b42-9d38-0b0a-fca6-3a4c178ab78a", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/外部服务监控", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "921bdedc-3289-6c68-0b7c-7559a4ee1c3b", + "code": "interface-service-model-manage", + "name": "集成对象管理", + "parentId": "18d3b84b-eded-6f11-9b91-891b47711443", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/集成服务注册", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "5dbcfb38-0fe7-8837-5985-73c47eeb9d7f", + "code": "internal-service-manage", + "name": "集成服务库", + "parentId": "18d3b84b-eded-6f11-9b91-891b47711443", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/集成服务注册", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "b6f5cfbf-9a69-850b-7509-93de89231f11", + "code": "open-service-manage", + "name": "集成服务管理", + "parentId": "1d514b9f-a219-af94-5cba-2a92e451e0c5", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/集成服务开放", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "20cd9ffe-dcf3-a4eb-8422-1086e6656da1", + "code": "open-service-log", + "name": "集成服务日志", + "parentId": "1d514b9f-a219-af94-5cba-2a92e451e0c5", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/集成服务开放", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "b17f7b14-405d-1e30-7285-0426873c1c0c", + "code": "service-log-statistic", + "name": "集成服务日志统计", + "parentId": "1d514b9f-a219-af94-5cba-2a92e451e0c5", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/集成服务开放", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "339d0403-4672-2d89-fd4e-6d71e71d6757", + "code": "csb-flow-manage", + "name": "集成流设计", + "parentId": "3ec2997c-392b-7027-99b7-745a5eca92ad", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/集成服务编排", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "abdf2afd-df55-096c-15fd-c58302884239", + "code": "csb-flow-log", + "name": "集成流实例", + "parentId": "3ec2997c-392b-7027-99b7-745a5eca92ad", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/集成服务编排", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "82060a3c-4779-1a66-c3e1-cc408151d36c", + "code": "icc-basic-config", + "name": "云连接器配置", + "parentId": "fee2ac33-b201-1ed1-2314-bd1a9befa071", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/基础配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "f0c11d8f-15cb-6833-1b2e-e4448fa6afb0", + "code": "csb-center-config", + "name": "集成服务配置", + "parentId": "fee2ac33-b201-1ed1-2314-bd1a9befa071", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/基础配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "82daf547-0c2b-5963-93a9-609c0e1abd32", + "code": "3rd-application-manage", + "name": "第三方应用管理", + "parentId": "2ddaf385-2387-5375-9655-1fe92c1099d0", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/应用集成管理", + "icon": null, + "pinyin": "disanfangyingyongguanli", + "simpinyin": "dsfyygl", + "child": null + }, + { + "id": "e7a1f91f-bcbf-eccc-5361-9e704256e7c9", + "code": "ip-access-manage", + "name": "IP访问管理", + "parentId": "2ddaf385-2387-5375-9655-1fe92c1099d0", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/应用集成管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "cb229eb6-a8ed-8d51-2a20-160948b605da", + "code": "limit-strategy-manage", + "name": "限流策略管理", + "parentId": "2ddaf385-2387-5375-9655-1fe92c1099d0", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/应用集成管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "45cf70fb-57a1-adae-9f6c-31f17609fddd", + "code": "fusing-strategy-manage", + "name": "熔断策略管理", + "parentId": "2ddaf385-2387-5375-9655-1fe92c1099d0", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/应用集成管理", + "icon": null, + "pinyin": "rongduancelu:eguanli", + "simpinyin": "rdclgl", + "child": null + }, + { + "id": "5c79f889-db66-b984-e75b-0c097be8f517", + "code": "encryption-strategy-manage", + "name": "加密策略管理", + "parentId": "2ddaf385-2387-5375-9655-1fe92c1099d0", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/应用集成/应用集成管理", + "icon": null, + "pinyin": "jiamicelu:eguanli", + "simpinyin": "jmclgl", + "child": null + }, + { + "id": "82e00ca9-148f-5217-0b43-5ac463f0ae18", + "code": "EapiDefine", + "name": "API注册", + "parentId": "2ee77eca-2efb-1e2d-a2bb-beed6b7654d7", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/服务网关/开放API管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "802b188e-d5cf-8f81-1541-0599de89de4c", + "code": "EapiView", + "name": "API查询", + "parentId": "2ee77eca-2efb-1e2d-a2bb-beed6b7654d7", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/服务网关/开放API管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "5d7ac84c-e657-de58-16ec-b8ed004226ad", + "code": "EapiConfigManager", + "name": "API权限配置", + "parentId": "2ee77eca-2efb-1e2d-a2bb-beed6b7654d7", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/服务网关/开放API管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "86a7808f-a21d-ce0c-8134-48e42608dacc", + "code": "EapiGroup", + "name": "API分组管理", + "parentId": "52173d8c-9c3e-65f5-e493-98e20593719b", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/服务网关/API授权管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "679bf749-2e00-b4b5-0b1f-b5f8a8ca72a4", + "code": "OperationEapiConfig", + "name": "API授权管理", + "parentId": "52173d8c-9c3e-65f5-e493-98e20593719b", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/服务网关/API授权管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "021bccc0-a6d6-8570-9b84-71b6fdb9b15f", + "code": "caf-apikey", + "name": "ApiKey管理", + "parentId": "52173d8c-9c3e-65f5-e493-98e20593719b", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/服务网关/API授权管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "IapiDoc", + "code": "SG_IApiLib", + "name": "微服务API查询", + "parentId": "596c066a-cd99-3bb1-4a17-fea7ca9d794b", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/集成平台/服务网关/微服务API管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "c0b45ed9-53b7-3a02-0862-8275e7ebddc6", + "code": "portal-navigation", + "name": "门户导航", + "parentId": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/企业门户/门户平台/门户配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "47bb19bc-fbbb-56af-aa83-f39473206c17", + "code": "site", + "name": "站点", + "parentId": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/企业门户/门户平台/门户配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "8fcae19b-fcd5-524f-1ab0-a579a6aa6642", + "code": "page", + "name": "门户页面", + "parentId": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/企业门户/门户平台/门户配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "c4af2580-f953-2436-c2bf-f4bc4cb4fc01", + "code": "theme", + "name": "门户模板", + "parentId": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/企业门户/门户平台/门户配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "6f492efe-e3d5-ac7b-1faf-d391c3489083", + "code": "site-view-statistic", + "name": "站点访问量统计", + "parentId": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/企业门户/门户平台/门户配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "054035ad-17db-4867-b75b-731eea287c42", + "code": "CmsApplicationMgr", + "name": "内容应用", + "parentId": "b1138ab9-7cd0-7632-e2e3-68c181d0a873", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/内容管理/内容管理平台/应用", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "817e9740-7795-0dab-3c08-7a730786d6e8", + "code": "cms-schema-definition", + "name": "模型定义", + "parentId": "8472044f-2a80-089f-0221-33c4d52de518", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/内容管理/内容管理平台/模型", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "591fa7e3-1f98-9981-196f-4c2f68252b07", + "code": "cms-content-manager", + "name": "内容库", + "parentId": "23f4461c-ad39-97a3-d6ff-41dff858fa50", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/内容管理/内容管理平台/内容", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "bcadaced-b250-3943-ba83-cc57891a7e44", + "code": "cms-setting-search", + "name": "搜索配置", + "parentId": "70871143-8fff-3b39-c3d1-52353866bda1", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/内容管理/内容管理平台/配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "996d4f32-ceb0-39b2-eda7-a9616767d69a", + "code": "cms-tag-setting", + "name": "标签管理", + "parentId": "70871143-8fff-3b39-c3d1-52353866bda1", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/内容管理/内容管理平台/配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "2f7be620-2411-f54a-b1da-853fe6c07038", + "code": "cms-statistical-log", + "name": "访问日志", + "parentId": "74802909-385a-10b8-fc84-9c0bce98610f", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/内容管理/内容管理平台/统计", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "6718949a-b8fe-5d7c-222e-adc3b42995dd", + "code": "cms-statistics-summary", + "name": "访问汇总", + "parentId": "74802909-385a-10b8-fc84-9c0bce98610f", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/内容管理/内容管理平台/统计", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "613feb60-53fc-9c99-6f90-26a972ca8944", + "code": "cms-kb-channel", + "name": "栏目管理", + "parentId": "5424ab74-1be1-9318-9740-cda0a5cdbb98", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/内容管理/知识库/知识管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "2ee09636-f0f9-f991-0b27-085ebaa867ae", + "code": "cms-kb-content-list", + "name": "内容列表", + "parentId": "5424ab74-1be1-9318-9740-cda0a5cdbb98", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/内容管理/知识库/知识管理", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "2867002a-eaf1-cb35-56a6-56f9d2d845d5", + "code": "cms-kb-setting-menu", + "name": "导航配置", + "parentId": "fc687ac8-6ae0-d113-6632-104df807227a", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/内容管理/知识库/配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "f30b975f-0c0a-53ae-cc12-d13ac1254fde", + "code": "cmd-kb-databoard", + "name": "知识库看板", + "parentId": "e8b71ba6-3820-298d-e11d-fb62ef669e13", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/内容管理/知识库/看板", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "06ad5ab5-c42a-cd4b-e890-aadf1e057448", + "code": "export-rule", + "name": "预置数据导出规则", + "parentId": "aedda4f4-fed6-bea7-12a1-1257541d7d37", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/预置数据导出", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "a90d9e18-d47c-0cf3-bf69-2dce40665a12", + "code": "dataexport", + "name": "预置数据导出", + "parentId": "aedda4f4-fed6-bea7-12a1-1257541d7d37", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/预置数据导出", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "1b415396-2386-38dd-50b0-771c5960fc18", + "code": "UbccParamDataConfig", + "name": "业务参数配置", + "parentId": "UBCC0001", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/业务配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "6465dca9-eb81-0743-edf3-33e9573b3ed8", + "code": "UbccParamDefinitionManager", + "name": "业务参数模板", + "parentId": "UBCC0001", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/业务配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "SYS0102", + "code": "SYS0102", + "name": "业务对象", + "parentId": "UBCC0001", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/业务配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "UBCC_BC0001", + "code": "BCP_BillCategory", + "name": "业务种类定义", + "parentId": "UBCC0001", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/业务配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "UBCC_BC0002", + "code": "BCP_ConfCenter", + "name": "业务配置中心", + "parentId": "UBCC0001", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/业务配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "12345f9a-a305-ba3e-0710-a9d93889710a", + "code": "CodeRuleDefine", + "name": "编码规则定义", + "parentId": "UBCC0001", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/业务配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "001231bf-6293-5a53-57cc-e50db58d3db0", + "code": "Print Format Definition", + "name": "打印格式定义", + "parentId": "UBCC0001", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/业务配置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "Epp-pagemanager", + "code": "Page", + "name": "页面", + "parentId": "Epp-pagelayout", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/工作中心", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "Epp-portletmanager", + "code": "Portlet", + "name": "部件", + "parentId": "Epp-pagelayout", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/工作中心", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "Epp-widgetmanager", + "code": "MetaPortlet", + "name": "元部件", + "parentId": "Epp-pagelayout", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/工作中心", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "ed2e6a45-e815-cbc1-b8fb-41645a0b6db7", + "code": "DataSource", + "name": "部件数据源", + "parentId": "Epp-pagelayout", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/工作中心", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "dd50d8a3-48bc-d4f2-8830-fc26458a60f3", + "code": "DataSet", + "name": "部件数据集", + "parentId": "Epp-pagelayout", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/工作中心", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "eb785056-f432-d18e-09bf-b6c3a3b7c2d9", + "code": "BCP_BizQryFunc", + "name": "业务查询函数", + "parentId": "22821215-9dbe-7673-a4ec-b2f93f096b35", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/查询定制", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "568bfd2e-d0a2-d055-2055-3346290fbb88", + "code": "BCP_BizQryDataSet", + "name": "数据集", + "parentId": "22821215-9dbe-7673-a4ec-b2f93f096b35", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/查询定制", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "35d72855-ec34-67fd-135f-6f48bded396c", + "code": "QDPDefinitionMenu", + "name": "查询定义", + "parentId": "22821215-9dbe-7673-a4ec-b2f93f096b35", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/查询定制", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "1619ca8d-1216-8890-da40-1738f3af359e", + "code": "writeback", + "name": "业务数据回写管理", + "parentId": "22821215-9dbe-7673-a4ec-b2f93f096b35", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/查询定制", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "SYS0101", + "code": "SYS0101", + "name": "菜单", + "parentId": "Function Design", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/菜单定义", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "gspapp01", + "code": "APP Maintenance", + "name": "应用", + "parentId": "Function Design", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/菜单定义", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "func-operation", + "code": "func-operation", + "name": "功能操作", + "parentId": "Authorization Design", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/权限定义", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "authorization-object", + "code": "authorization-object", + "name": "权限对象", + "parentId": "Authorization Design", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/权限定义", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "authfield", + "code": "authfield", + "name": "权限字段", + "parentId": "Authorization Design", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/权限定义", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "bf8b90b8-d636-c09f-a776-5e735c62c54f", + "code": "ChgdrConfig", + "name": "日志配置", + "parentId": "03851cc7-9c34-a213-d7fa-3c831d596406", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/业务变更日志", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "dataie-rule-manage", + "code": "dataie-rule-manage", + "name": "导入导出规则", + "parentId": "dip-dataie", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/导入导出", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "f31e2686-e2cc-5c1c-091a-f6cdb1c0ec78", + "code": "audit-export-runtime", + "name": "审计数据导出", + "parentId": "dip-dataie", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/导入导出", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "f56c2cf1-3070-802d-a87b-e4cc2a2c2eeb", + "code": "audit-export-manage", + "name": "审计导出规则", + "parentId": "dip-dataie", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/导入导出", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "0a7857db-e199-e031-f9a4-c26d811c9242", + "code": "FrameworkConfiguration", + "name": "框架个性化配置", + "parentId": "cf81a0c7-8019-74e2-0a81-cca95a26f72a", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/系统设置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "024b93d1-f86f-0a0a-5374-64c25d0ce105", + "code": "contact-channel-config", + "name": "客服设置", + "parentId": "cf81a0c7-8019-74e2-0a81-cca95a26f72a", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/系统设置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "1982a9b1-7281-e63e-5d4b-9f46402fb89e", + "code": "sso-tool", + "name": "单点登录生成器", + "parentId": "cf81a0c7-8019-74e2-0a81-cca95a26f72a", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/系统设置", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "ee3f58f0-440e-b870-f461-a658ab4145da", + "code": "EppSchedule", + "name": "我的日程", + "parentId": "a274453d-2465-5377-27da-c4c47883cc6b", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/我的日程", + "icon": null, + "pinyin": "wodericheng", + "simpinyin": "wdrc", + "child": null + }, + { + "id": "cdf0e50c-7a0e-2c93-cc98-a4a285cc960d", + "code": "EppScheduleSet", + "name": "日程代录设置", + "parentId": "a274453d-2465-5377-27da-c4c47883cc6b", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/我的日程", + "icon": null, + "pinyin": "richengdailushezhi", + "simpinyin": "rcdlsz", + "child": null + }, + { + "id": "986137b2-74dc-f13a-0667-553a1332218d", + "code": "日程集成", + "name": "日程集成", + "parentId": "a274453d-2465-5377-27da-c4c47883cc6b", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/业务配置/我的日程", + "icon": null, + "pinyin": "richengjicheng", + "simpinyin": "rcjc", + "child": null + }, + { + "id": "fd97c5f5-e86e-bfc7-ec1b-453ef3c17586", + "code": "quick-sight-menu", + "name": "轻分析中心", + "parentId": "3680fe22-2b9c-ee80-4826-044ca843497b", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/零代码/轻分析", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "97a8e09a-21f2-fe50-5e6e-7b16ab44e551", + "code": "quick-sight-manage-menu", + "name": "轻分析管理", + "parentId": "3680fe22-2b9c-ee80-4826-044ca843497b", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/业务公共/零代码/轻分析", + "icon": null, + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "d8b2aaec-85a6-43ce-8988-d159d1d0bbf6", + "code": "ListCardForm", + "name": "内置列表卡片界面", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": "neizhiliebiaokapianjiemian", + "simpinyin": "nzlbkpjm", + "child": null + }, + { + "id": "35b491ab-2224-44d7-a7f6-22d1a2aaf347", + "code": "ListForm", + "name": "列表", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "4cdabd44-e594-48b3-aa6f-d76825fce50b", + "code": "fybxdCard", + "name": "费用报销单卡片", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "e976a71d-68f0-4e4e-8094-b7e8cc130f3a", + "code": "ListWithSidebarForm", + "name": "带侧边栏的列表界面", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "e7a82c22-cd0e-458d-8c3c-5d648545e369", + "code": "ScrollspyCardForm", + "name": "内置滚动定位卡片界面", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "b7a92e7d-53a1-4094-8141-aa0e9061b8c2", + "code": "DoubleListForm", + "name": "双列表界面", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "2561ab76-1f4f-4182-8547-7129a8eae3bc", + "code": "doubleListWithSidebarForm", + "name": "带侧边栏的双列表界面", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "0ef70dc0-a763-4f1e-861f-77514ea4e5c5", + "code": "listManageForm", + "name": "批量编辑列表界面", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "8bef78a9-c06b-47ff-be2d-777d0a373a2e", + "code": "listDictionaryForm", + "name": "多数据源列卡界面", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "29f849e3-38ce-49ff-876e-bea5093650ce", + "code": "modalCardForm", + "name": "弹窗卡片模板", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "910bcba3-cff3-4b47-a96d-463e7eca37c0", + "code": "listComponent", + "name": "列表组件", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "40089513-55f4-4e5c-9c6d-f18fc71fe75f", + "code": "doubleListFormInTab", + "name": "标签式双列表", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "143eb743-3364-4777-a0a7-daa944e18140", + "code": "cardTableForm", + "name": "表格类卡片模板", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "e63b2788-8b96-49d9-8697-e73d565072e0", + "code": "ScrollspyCardForm1", + "name": "内置滚动定位卡片界面", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "693a8ea3-be01-4c97-a87e-3e4f45af099f", + "code": "modalCardForm1", + "name": "弹窗卡片模板", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "7c485db2-3c78-42d6-b293-6aeac65d99ed", + "code": "cardTableForm1", + "name": "表格类卡片模板", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "b6e0a7a3-21fd-476c-ae8c-ae1ddcd6050d", + "code": "doubleListForm", + "name": "双列表界面", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "a2825743-cb93-4595-8850-b6f23e0df2f4", + "code": "doubleListForm1", + "name": "双列表界面", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "e7503370-a0e1-4105-89b2-2308abee9b0b", + "code": "listComponent1", + "name": "列表组件", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "e6e7b400-1858-4f1d-97aa-c0c894081a89", + "code": "doubleListFormInTab1", + "name": "标签式双列表", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "4e8725f6-1f5f-4c25-9363-5071b63923af", + "code": "states", + "name": "状态机验证", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": null, + "simpinyin": null, + "child": null + }, + { + "id": "37e31f6a-6960-41cf-afdb-49b8410fb590", + "code": "BXDList", + "name": "新报销单列表", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": "xinbaoxiaodanliebiao", + "simpinyin": "xbxdlb", + "child": null + }, + { + "id": "ff1be9e4-092a-4799-bb56-ef4b66b722ca", + "code": "BXDcard", + "name": "报销单卡片界面", + "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", + "layer": "4", + "menuType": "SysMenu", + "funcType": "4", + "menuPath": "/zz关键应用/zz模块/zz菜单分组", + "icon": "", + "pinyin": "baoxiaodankapianjiemian", + "simpinyin": "bxdkpjm", + "child": null + } +] \ No newline at end of file diff --git a/packages/farris-admin/src/components/header.component.tsx b/packages/farris-admin/src/components/header.component.tsx new file mode 100644 index 00000000000..8d4cdf04fa4 --- /dev/null +++ b/packages/farris-admin/src/components/header.component.tsx @@ -0,0 +1,64 @@ +import { computed, defineComponent, ref } from 'vue'; +import { headerProps, HeaderProps } from './header.props'; + +import listViewData from './data.json'; +import FAccordion, { FAccordionItem } from '@farris/ui-vue/components/accordion'; + + +export default defineComponent({ + name: 'Nav Header', + props: headerProps, + emits: [], + setup(props: HeaderProps, context) { + const navContent = ref(); + const product = [] as any; + const modules = new Map(); + + function initData(dataArray: Map, item: any) { + + const element = dataArray.get(item.parentId); + if (element) { + element.push(item); + } else { + dataArray.set(item.parentId, [item]); + } + } + + function resolveData() { + listViewData.forEach((item: any) => { + switch (item.funcType) { + case '1': product.push(item); break; + case '2': initData(modules, item); break; + } + }); + return product; + } + const renderEditor = resolveData(); + + return () => { + return (
+ + { + product.map((item: any) => { + + return ( + + + + { + (modules.get(item.id) || []).map((element: any) => { + return ( +
{element.name}
+ ) + }) + } + +
+
+ ) + }) + } +
); + } + } +}) \ No newline at end of file diff --git a/packages/farris-admin/src/components/header.props.ts b/packages/farris-admin/src/components/header.props.ts new file mode 100644 index 00000000000..48de676053a --- /dev/null +++ b/packages/farris-admin/src/components/header.props.ts @@ -0,0 +1,8 @@ + +import { ExtractPropTypes } from "vue"; + + +export const headerProps = { +} as Record; + +export type HeaderProps = ExtractPropTypes; diff --git a/packages/farris-admin/src/main.ts b/packages/farris-admin/src/main.ts new file mode 100644 index 00000000000..a9e72478ec8 --- /dev/null +++ b/packages/farris-admin/src/main.ts @@ -0,0 +1,15 @@ +import { createApp } from 'vue'; +// import FarrisVue from '@farris/ui-vue'; +import App from './app.vue'; +// import { createDevkit } from '@farris/devkit-vue'; +// import router from './router'; + +// const devkit = createDevkit({ +// providers: [] +// }); + +const app = createApp(App); +// app.use(router); +// app.use(devkit); +// app.use(FarrisVue); +app.mount('#app'); diff --git a/packages/farris-admin/src/style.css b/packages/farris-admin/src/style.css new file mode 100644 index 00000000000..e69de29bb2d diff --git a/packages/farris-admin/src/vite-env.d.ts b/packages/farris-admin/src/vite-env.d.ts new file mode 100644 index 00000000000..e38e5224b9b --- /dev/null +++ b/packages/farris-admin/src/vite-env.d.ts @@ -0,0 +1 @@ +// diff --git a/packages/farris-admin/tsconfig.json b/packages/farris-admin/tsconfig.json new file mode 100644 index 00000000000..0b7f4ecc103 --- /dev/null +++ b/packages/farris-admin/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "ESNext", + "useDefineForClassFields": true, + "module": "ESNext", + "moduleResolution": "node", + "strict": true, + "jsx": "preserve", + "noImplicitAny": false, + "sourceMap": true, + "resolveJsonModule": true, + "isolatedModules": true, + "esModuleInterop": true, + "lib": ["ESNext", "DOM", "dom.iterable", "scripthost"], + "skipLibCheck": true, + "importHelpers": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "types": ["vitest/globals", "@types/jest"], + "baseUrl": "./", + "paths": {} + }, + "include": ["components/**/*", "src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "designer/**/*"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/packages/farris-admin/tsconfig.node.json b/packages/farris-admin/tsconfig.node.json new file mode 100644 index 00000000000..2e16c8174ae --- /dev/null +++ b/packages/farris-admin/tsconfig.node.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + // "strict": true, + "composite": true, + "module": "ESNext", + "moduleResolution": "Node", + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true + }, + "include": ["vite.config.dev.ts"] +} diff --git a/packages/farris-admin/vite.config.build.ts b/packages/farris-admin/vite.config.build.ts new file mode 100644 index 00000000000..87d9a18e946 --- /dev/null +++ b/packages/farris-admin/vite.config.build.ts @@ -0,0 +1,6 @@ +import { defineConfig } from 'vite'; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [] +}); diff --git a/packages/farris-admin/vite.config.dev.ts b/packages/farris-admin/vite.config.dev.ts new file mode 100644 index 00000000000..234270da9be --- /dev/null +++ b/packages/farris-admin/vite.config.dev.ts @@ -0,0 +1,24 @@ +import { defineConfig } from 'vite'; +import vue from '@vitejs/plugin-vue'; +import vueJsx from '@vitejs/plugin-vue-jsx'; +import { resolve } from 'path'; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [vue(), vueJsx()], + server: { + proxy: { + "/api": { + target: "http://localhost:5200", + changeOrigin: true, + secure: false + } + } + }, + resolve: { + alias: { + '@': resolve(__dirname, '../'), + '@farris/ui-vue': resolve(__dirname, '../ui-vue') + } + } +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 93aa0d55bb3..849d8a5952f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -961,6 +961,142 @@ importers: specifier: ^0.40.4 version: 0.40.13(typescript@4.9.5) + packages/farris-admin: + dependencies: + '@farris/ui-vue': + specifier: workspace:^ + version: link:../ui-vue + '@monaco-editor/loader': + specifier: ^1.4.0 + version: 1.4.0(monaco-editor@0.52.2) + monaco-editor: + specifier: ^0.52.2 + version: 0.52.2 + vue: + specifier: ^3.2.37 + version: 3.5.12(typescript@4.9.5) + devDependencies: + '@babel/parser': + specifier: ^7.19.0 + version: 7.25.8 + '@babel/preset-env': + specifier: ^7.19.0 + version: 7.25.8(@babel/core@7.25.8) + '@babel/preset-typescript': + specifier: ^7.18.0 + version: 7.25.7(@babel/core@7.25.8) + '@babel/traverse': + specifier: ^7.19.0 + version: 7.25.7 + '@commitlint/cli': + specifier: ^19.3.0 + version: 19.5.0(@types/node@20.5.1)(typescript@4.9.5) + '@commitlint/config-conventional': + specifier: ^19.2.0 + version: 19.5.0 + '@farris/cli': + specifier: workspace:^ + version: link:../cli + '@farris/designer-dragula': + specifier: 0.0.5 + version: 0.0.5 + '@testing-library/vue': + specifier: ^7.0.0 + version: 7.0.0(@vue/compiler-sfc@3.5.12)(vue@3.5.12(typescript@4.9.5)) + '@types/jest': + specifier: ^26.0.24 + version: 26.0.24 + '@types/jsonp': + specifier: ^0.2.3 + version: 0.2.3 + '@types/lodash.debounce': + specifier: ^4.0.7 + version: 4.0.9 + '@typescript-eslint/eslint-plugin': + specifier: ^7.15.0 + version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5) + '@typescript-eslint/parser': + specifier: ^7.15.0 + version: 7.18.0(eslint@8.57.1)(typescript@4.9.5) + '@vitejs/plugin-vue': + specifier: ^4.2.3 + version: 4.6.2(vite@4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@4.9.5)) + '@vitejs/plugin-vue-jsx': + specifier: ^3.0.1 + version: 3.1.0(vite@4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@4.9.5)) + '@vue/babel-plugin-jsx': + specifier: ^1.1.1 + version: 1.2.5(@babel/core@7.25.8) + '@vue/compiler-sfc': + specifier: ^3.2.0 + version: 3.5.12 + '@vue/test-utils': + specifier: ^2.0.0 + version: 2.4.6 + '@vuedx/typecheck': + specifier: ^0.7.5 + version: 0.7.6 + '@vuedx/typescript-plugin-vue': + specifier: ^0.7.5 + version: 0.7.6 + babel-jest: + specifier: ^29.0.3 + version: 29.7.0(@babel/core@7.25.8) + chalk: + specifier: ^5.0.0 + version: 5.3.0 + commander: + specifier: ^9.4.0 + version: 9.5.0 + conventional-changelog-cli: + specifier: ^2.2.2 + version: 2.2.2 + happy-dom: + specifier: ^8.9.0 + version: 8.9.0 + inquirer: + specifier: ^9.1.1 + version: 9.3.7 + jest: + specifier: ^29.0.0 + version: 29.7.0(@types/node@20.5.1)(ts-node@10.9.2(@types/node@20.5.1)(typescript@4.9.5)) + ora: + specifier: ^6.1.2 + version: 6.3.1 + patch-vue-directive-ssr: + specifier: ^0.0.1 + version: 0.0.1 + sass: + specifier: ^1.32.2 + version: 1.80.3 + shelljs: + specifier: ^0.8.4 + version: 0.8.5 + typescript: + specifier: ^4.6.4 + version: 4.9.5 + vite: + specifier: ^4.4.1 + version: 4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0) + vite-plugin-dts: + specifier: ^2.1.0 + version: 2.3.0(@types/node@20.5.1)(rollup@4.24.0)(vite@4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0)) + vite-plugin-md: + specifier: ^0.20.0 + version: 0.20.6(@vitejs/plugin-vue@4.6.2(vite@4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@4.9.5)))(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0)) + vite-svg-loader: + specifier: ^4.0.0 + version: 4.0.0 + vitepress: + specifier: 1.0.0-alpha.8 + version: 1.0.0-alpha.8(@algolia/client-search@4.24.0)(@types/node@20.5.1)(react-dom@16.14.0(react@16.14.0))(react@16.14.0)(sass@1.80.3)(search-insights@2.17.2)(terser@5.36.0)(typescript@4.9.5) + vitepress-theme-demoblock: + specifier: 1.4.2 + version: 1.4.2(react-dom@16.14.0(react@16.14.0))(react@16.14.0)(sass@1.80.3)(typescript@4.9.5) + vue-tsc: + specifier: ^1.2.0 + version: 1.8.27(typescript@4.9.5) + packages/farris-theme: dependencies: '@types/gulp-autoprefixer': @@ -14471,7 +14607,7 @@ snapshots: fp-ts: 2.16.9 inferred-types: 0.37.6(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) markdown-it: 13.0.2 - vite-plugin-md: 0.22.5(@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)))(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0)) + vite-plugin-md: 0.22.5(@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0)) transitivePeerDependencies: - '@edge-runtime/vm' - '@vitejs/plugin-vue' @@ -15229,7 +15365,7 @@ snapshots: dependencies: bumpp: 8.2.1 callsites: 4.2.0 - inferred-types: 0.37.6(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) + inferred-types: 0.37.6(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) vitest: 0.25.8(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) transitivePeerDependencies: - '@edge-runtime/vm' @@ -15249,7 +15385,7 @@ snapshots: dependencies: bumpp: 8.2.1 callsites: 4.2.0 - inferred-types: 0.37.6(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) + inferred-types: 0.37.6(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) vitest: 0.25.8(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) transitivePeerDependencies: - '@edge-runtime/vm' @@ -22436,7 +22572,7 @@ snapshots: - supports-color - terser - vite-plugin-md@0.22.5(@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)))(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0)): + vite-plugin-md@0.22.5(@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0)): dependencies: '@vitejs/plugin-vue': 5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)) '@yankeeinlondon/builder-api': 1.4.1(@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0)) @@ -22450,6 +22586,7 @@ snapshots: - '@vitest/browser' - '@vitest/ui' - encoding + - happy-dom - jsdom - less - lightningcss diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 2567ccae7d5..4552f92dc72 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -12,3 +12,4 @@ packages: - 'packages/ui-vue' - 'packages/command-services' - 'packages/ui-binding' + - 'packages/farris-admin' -- Gitee From 7d7174f76d8c790be187ccab4f9cb456ea5fa2db Mon Sep 17 00:00:00 2001 From: wang-xh Date: Thu, 26 Dec 2024 19:08:35 +0800 Subject: [PATCH 053/181] =?UTF-8?q?feature:=20=E9=80=89=E6=8B=A9=E5=AE=9E?= =?UTF-8?q?=E4=BD=93=E7=AA=97=E5=8F=A3=E4=B8=AD=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=E7=A6=81=E7=94=A8=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../composition/use-entity-tree.ts | 64 +++++++++++++++++-- .../composition/use-field-tree.ts | 32 +++++----- .../entity-binding-selector.component.tsx | 6 +- 3 files changed, 80 insertions(+), 22 deletions(-) diff --git a/packages/ui-vue/components/entity-binding-selector/composition/use-entity-tree.ts b/packages/ui-vue/components/entity-binding-selector/composition/use-entity-tree.ts index 15db6dc2190..7531f80af1c 100644 --- a/packages/ui-vue/components/entity-binding-selector/composition/use-entity-tree.ts +++ b/packages/ui-vue/components/entity-binding-selector/composition/use-entity-tree.ts @@ -3,6 +3,8 @@ import { cloneDeep } from "lodash-es"; import { EntityBindingSelectorProps } from "../entity-binding-selector.props"; import { ref } from "vue"; import { FNotifyService } from "../../notify"; +import { RowOptions, VisualData } from "../../data-view"; +import { useFieldTree } from "./use-field-tree"; export function useEntityTree(props: EntityBindingSelectorProps) { @@ -11,19 +13,60 @@ export function useEntityTree(props: EntityBindingSelectorProps) { const entityTreeGridRef = ref(); const entityDataSource = ref(); const entityColumns = ref([{ field: 'name', title: '实体名称' }]); + /** 初始选中的实体id */ + let initialSelectedEntityId = ''; + /** + * 判断实体中是否有可选择的字段,若没有,将实体置灰 + */ + function resolveHasSelectableFields(schemaEntity: FormSchemaEntity): boolean { + const useFieldTreeUtil = useFieldTree(props); + useFieldTreeUtil.resolveFieldDataSource(schemaEntity); + if (useFieldTreeUtil.hasSelectableField.value) { + initialSelectedEntityId = schemaEntity.id; + return true; + } + return false; + } + /** + * 根据控件类型判断实体是否可以选择 + */ + function resolveSelectableByComponentType(schemaEntity: FormSchemaEntity): boolean { + // 目前卡片面板只支持绑定主表 + const bindTo = entityBindToMap.get(schemaEntity.label); + if (props.componentType && props.componentType === 'response-form' && bindTo && bindTo !== '/') { + return false; + } + return true; + } + /** + * 判断实体是否可以选择 + */ + function resolveEntitySelectable(schemaEntity: FormSchemaEntity): boolean { + + if (!resolveSelectableByComponentType(schemaEntity)) { + return false; + } + if (!resolveHasSelectableFields(schemaEntity)) { + return false; + } + return true; + + } function resolveEntity(schemaEntity: FormSchemaEntity, parentLabelPath: string = ''): any { if (!schemaEntity) { return; } const clonedSchemaEntity: FormSchemaEntity = cloneDeep(schemaEntity); - const result: any = { - data: clonedSchemaEntity, - children: [] - }; + const viewModelBindTo = parentLabelPath ? `${parentLabelPath}/${clonedSchemaEntity.label}` : `/`; entityBindToMap.set(clonedSchemaEntity.label, viewModelBindTo.replace('//', '/')); + const selectable = resolveEntitySelectable(clonedSchemaEntity); + const result: any = { + data: Object.assign({ selectable }, clonedSchemaEntity), + children: [] + }; if (clonedSchemaEntity.type.entities && clonedSchemaEntity.type.entities.length) { const childTable = clonedSchemaEntity.type.entities.map(childEntity => resolveEntity(childEntity, viewModelBindTo)); result.children = result.children.concat(childTable); @@ -52,12 +95,23 @@ export function useEntityTree(props: EntityBindingSelectorProps) { } return selectedItems[0].data; } + /** + * 配置实体列表的行禁用效果 + */ + const entityTreeRowOption: Partial = { + customRowStatus: (visualData: VisualData) => { + visualData.disabled = !visualData.raw.selectable; + return visualData; + } + }; return { entityTreeGridRef, entityDataSource, resolveEntityDataSource, entityBindToMap, checkAndGetSelectedEntity, - entityColumns + entityColumns, + entityTreeRowOption, + initialSelectedEntityId }; } diff --git a/packages/ui-vue/components/entity-binding-selector/composition/use-field-tree.ts b/packages/ui-vue/components/entity-binding-selector/composition/use-field-tree.ts index 3741e23d400..c17146dfba3 100644 --- a/packages/ui-vue/components/entity-binding-selector/composition/use-field-tree.ts +++ b/packages/ui-vue/components/entity-binding-selector/composition/use-field-tree.ts @@ -1,4 +1,4 @@ -import { FormSchemaEntity, FormSchemaEntityField, FormSchemaEntityField$Type } from "../../common/entity/entity-schema"; +import { FormSchemaEntity, FormSchemaEntityField } from "../../common/entity/entity-schema"; import { cloneDeep } from "lodash-es"; import { EntityBindingSelectorProps } from "../entity-binding-selector.props"; import { ref } from "vue"; @@ -26,12 +26,16 @@ export function useFieldTree(props: EntityBindingSelectorProps) { showCheckbox: true, showSelectAll: true }; + /** 标识字段是否可以选择 */ + let hasSelectableField = ref(false); + /** * schema字段集合组装成树 * @param fields schema字段集合 */ function resolveFields(fields: FormSchemaEntityField[]) { const treeData: any = []; + hasSelectableField.value = false; fields.forEach(element => { let children = []; @@ -41,8 +45,13 @@ export function useFieldTree(props: EntityBindingSelectorProps) { const clonedField = cloneDeep(element); const displayedTypeName = element.multiLanguage ? '多语言' : element.type.displayName; + const isFieldSelectable = children.length ? false : !occupiedFieldMap.has(element.id); + + if (isFieldSelectable) { + hasSelectableField.value = true; + } treeData.push({ - data: Object.assign({ displayedTypeName }, clonedField), + data: Object.assign({ displayedTypeName, selectable: isFieldSelectable }, clonedField), children }); }); @@ -107,7 +116,9 @@ export function useFieldTree(props: EntityBindingSelectorProps) { const { fields } = bindingEntity.type; fieldDataSource.value = resolveFields(fields); - fieldTreeGridRef.value.updateDataSource(fieldDataSource.value); + if (fieldTreeGridRef && fieldTreeGridRef.value) { + fieldTreeGridRef.value.updateDataSource(fieldDataSource.value); + } } @@ -116,17 +127,7 @@ export function useFieldTree(props: EntityBindingSelectorProps) { */ const fieldTreeRowOption: Partial = { customRowStatus: (visualData: VisualData) => { - // 复杂类型字段,不可选 - if (visualData.raw.$type && visualData.raw.$type !== FormSchemaEntityField$Type.SimpleField) { - visualData.disabled = true; - return visualData; - } - // 表单中已占用的字段,不可选 - if (occupiedFieldMap && occupiedFieldMap.has(visualData.raw.id)) { - visualData.disabled = true; - return visualData; - } - visualData.disabled = false; + visualData.disabled = !visualData.raw.selectable; return visualData; } }; @@ -151,6 +152,7 @@ export function useFieldTree(props: EntityBindingSelectorProps) { fieldTreeRowOption, fieldColumns, fieldSelectionOption, - checkAndGetSelectedFields + checkAndGetSelectedFields, + hasSelectableField }; } diff --git a/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.component.tsx b/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.component.tsx index 19fc6fc9fe9..10b46ec7687 100644 --- a/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.component.tsx +++ b/packages/ui-vue/components/entity-binding-selector/entity-binding-selector.component.tsx @@ -13,7 +13,7 @@ export default defineComponent({ emits: ['submit', 'cancel'], setup(props: EntityBindingSelectorProps, context) { const useEntityTreeUtil = useEntityTree(props); - const { entityColumns, entityTreeGridRef, entityDataSource, checkAndGetSelectedEntity, resolveEntityDataSource } = useEntityTreeUtil; + const { entityColumns, entityTreeGridRef, entityDataSource, checkAndGetSelectedEntity, resolveEntityDataSource, entityTreeRowOption } = useEntityTreeUtil; const useFieldTreeUtil = useFieldTree(props); const { fieldColumns, resolveFieldDataSource, fieldDataSource, fieldTreeGridRef, fieldTreeRowOption, fieldSelectionOption, checkAndGetSelectedFields } = useFieldTreeUtil; @@ -30,7 +30,8 @@ export default defineComponent({ return { 'f-utils-fill': true, 'border': true, - 'm-2': true, + 'mx-3': true, + 'my-2': true, 'position-relative': true, 'd-none': steps.value[activeStepIndex.value].id !== stepId }; @@ -53,6 +54,7 @@ export default defineComponent({ idField="id" columns={entityColumns.value} rowNumber={{ enable: false }} + row-option={entityTreeRowOption} columnOption={{ fitColumns: true }} >; } -- Gitee From 46bebab14b139a8fda91b65cc0bdb0512ecc45ea Mon Sep 17 00:00:00 2001 From: wang-xh Date: Thu, 26 Dec 2024 19:14:46 +0800 Subject: [PATCH 054/181] =?UTF-8?q?feature:=20=E7=B2=BE=E7=AE=80=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E6=8E=A7=E4=BB=B6schema=EF=BC=8C=E5=8F=AA=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E5=BF=85=E5=A1=AB=E7=9A=84=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../composition/control-creator.service.ts | 4 +- .../src/schema/check-group.schema.json | 1 - .../checkbox/src/schema/checkbox.schema.json | 1 - .../src/schema/combo-list.schema.json | 1 - .../data-grid.property-config.ts | 1 - .../src/schema/data-grid-column.schema.json | 14 +- .../src/schema/data-grid.schema.json | 5 +- .../src/schema/date-picker.schema.json | 1 - .../src/schema/form-group.schema.json | 8 +- .../src/schema/response-form.schema.json | 3 +- .../dynamic-resolver/src/schema-resolver.ts | 44 ++++-- .../composition/use-field-tree.ts | 4 +- .../src/schema/external-container.schema.json | 3 +- .../src/schema/input-group.schema.json | 1 - .../layout/src/schema/layout-pane.schema.json | 7 +- .../lookup/src/schema/lookup.schema.json | 1 - .../src/schema/number-range.schema.json | 1 - .../src/schema/number-spinner.schema.json | 1 - .../src/schema/page-header.schema.json | 6 +- .../composition/entity/input-base-property.ts | 4 +- .../src/schema/radio-group.schema.json | 1 - .../section/src/schema/schema-resolver.ts | 1 - .../src/schema/splitter-pane.schema.json | 7 +- .../splitter/src/schema/splitter.schema.json | 7 +- .../switch/src/schema/switch.schema.json | 1 - .../textarea/src/schema/textarea.schema.json | 1 - .../src/schema/time-picker.schema.json | 1 - .../tree-grid.property-config.json | 28 ---- .../tree-grid.property-config.ts | 125 ++---------------- .../src/schema/tree-grid-column.schema.json | 6 +- .../src/schema/tree-grid.schema.json | 3 +- .../tree-grid/src/tree-grid.props.ts | 1 - 32 files changed, 103 insertions(+), 190 deletions(-) delete mode 100644 packages/ui-vue/components/tree-grid/src/property-config/tree-grid.property-config.json diff --git a/packages/designer/src/components/composition/control-creator.service.ts b/packages/designer/src/components/composition/control-creator.service.ts index 6f57444e741..483d672fac4 100644 --- a/packages/designer/src/components/composition/control-creator.service.ts +++ b/packages/designer/src/components/composition/control-creator.service.ts @@ -29,7 +29,9 @@ export function useControlCreator(): UseControlCreator { const formEditor = getSchemaByType(resolvedEditorType) || {}; formGroupMetadata.editor = formEditor; - formEditor.required = field.require; + if (field.require) { + formEditor.required = field.require; + } // 只读属性:若字段本身为只读,则取字段属性;若非只读,则设置为状态机 formEditor.readonly = field.readonly ? true : "!viewModel.stateMachine['editable']"; diff --git a/packages/ui-vue/components/checkbox/src/schema/check-group.schema.json b/packages/ui-vue/components/checkbox/src/schema/check-group.schema.json index 7d5b2159d29..6af5d10d829 100644 --- a/packages/ui-vue/components/checkbox/src/schema/check-group.schema.json +++ b/packages/ui-vue/components/checkbox/src/schema/check-group.schema.json @@ -78,7 +78,6 @@ } }, "required": [ - "id", "type" ], "ignore": [ diff --git a/packages/ui-vue/components/checkbox/src/schema/checkbox.schema.json b/packages/ui-vue/components/checkbox/src/schema/checkbox.schema.json index d59556d5140..62487c6c8a8 100644 --- a/packages/ui-vue/components/checkbox/src/schema/checkbox.schema.json +++ b/packages/ui-vue/components/checkbox/src/schema/checkbox.schema.json @@ -73,7 +73,6 @@ } }, "required": [ - "id", "type" ], "ignore": [ diff --git a/packages/ui-vue/components/combo-list/src/schema/combo-list.schema.json b/packages/ui-vue/components/combo-list/src/schema/combo-list.schema.json index 1e7a8053133..9086a5782ff 100644 --- a/packages/ui-vue/components/combo-list/src/schema/combo-list.schema.json +++ b/packages/ui-vue/components/combo-list/src/schema/combo-list.schema.json @@ -132,7 +132,6 @@ } }, "required": [ - "id", "type" ], "ignore": [ diff --git a/packages/ui-vue/components/data-grid/src/property-config/data-grid.property-config.ts b/packages/ui-vue/components/data-grid/src/property-config/data-grid.property-config.ts index cf658496585..8b31965980b 100644 --- a/packages/ui-vue/components/data-grid/src/property-config/data-grid.property-config.ts +++ b/packages/ui-vue/components/data-grid/src/property-config/data-grid.property-config.ts @@ -250,7 +250,6 @@ export class DataGridProperty extends BaseControlProperty { "name": "分页条数变化事件" } ]; - // const initialData=EventsEditorFuncUtils.formProperties(); // const initialDataMock = { // propertyID: 'data-grid-component-viewmodel', // propertyType: 'events', diff --git a/packages/ui-vue/components/data-grid/src/schema/data-grid-column.schema.json b/packages/ui-vue/components/data-grid/src/schema/data-grid-column.schema.json index c1f072f8ec3..d9b2efcfea7 100644 --- a/packages/ui-vue/components/data-grid/src/schema/data-grid-column.schema.json +++ b/packages/ui-vue/components/data-grid/src/schema/data-grid-column.schema.json @@ -8,12 +8,12 @@ "id": { "description": "The unique identifier for a data-grid-column", "type": "string", - "default":"col" + "default": "" }, "type": { "description": "The type string of data-grid-column component", "type": "string", - "default":"data-grid-column" + "default": "data-grid-column" }, "allowGrouping": { "description": "", @@ -30,7 +30,7 @@ "editor": { "description": "", "type": "obejct", - "default":{} + "default": {} }, "field": { "description": "", @@ -127,7 +127,11 @@ "width": { "description": "", "type": "number", - "default":120 + "default": 120 } - } + }, + "required": [ + "id", + "type" + ] } \ No newline at end of file diff --git a/packages/ui-vue/components/data-grid/src/schema/data-grid.schema.json b/packages/ui-vue/components/data-grid/src/schema/data-grid.schema.json index d4a24442440..d89e69c880e 100644 --- a/packages/ui-vue/components/data-grid/src/schema/data-grid.schema.json +++ b/packages/ui-vue/components/data-grid/src/schema/data-grid.schema.json @@ -514,7 +514,7 @@ "default": true } } - }, + }, "onClickRow": { "description": "行点击事件", "type": "string", @@ -791,6 +791,7 @@ }, "required": [ "id", - "type" + "type", + "columns" ] } \ No newline at end of file diff --git a/packages/ui-vue/components/date-picker/src/schema/date-picker.schema.json b/packages/ui-vue/components/date-picker/src/schema/date-picker.schema.json index 05ba2e4a399..b37b15d98c9 100644 --- a/packages/ui-vue/components/date-picker/src/schema/date-picker.schema.json +++ b/packages/ui-vue/components/date-picker/src/schema/date-picker.schema.json @@ -86,7 +86,6 @@ } }, "required": [ - "id", "type" ], "ignore": [ diff --git a/packages/ui-vue/components/dynamic-form/src/schema/form-group.schema.json b/packages/ui-vue/components/dynamic-form/src/schema/form-group.schema.json index 8c9585d9c3b..897df27f6cc 100644 --- a/packages/ui-vue/components/dynamic-form/src/schema/form-group.schema.json +++ b/packages/ui-vue/components/dynamic-form/src/schema/form-group.schema.json @@ -34,7 +34,8 @@ }, "editor": { "description": "", - "type": "obejct" + "type": "obejct", + "default": {} }, "label": { "description": "", @@ -45,7 +46,7 @@ "description": "", "type": "number" }, - "binding":{ + "binding": { "description": "", "type": "object", "default": {} @@ -53,6 +54,7 @@ }, "required": [ "id", - "type" + "type", + "editor" ] } \ No newline at end of file diff --git a/packages/ui-vue/components/dynamic-form/src/schema/response-form.schema.json b/packages/ui-vue/components/dynamic-form/src/schema/response-form.schema.json index 4c0caa73c9b..d8ad810ba6b 100644 --- a/packages/ui-vue/components/dynamic-form/src/schema/response-form.schema.json +++ b/packages/ui-vue/components/dynamic-form/src/schema/response-form.schema.json @@ -35,6 +35,7 @@ }, "required": [ "id", - "type" + "type", + "contents" ] } \ No newline at end of file diff --git a/packages/ui-vue/components/dynamic-resolver/src/schema-resolver.ts b/packages/ui-vue/components/dynamic-resolver/src/schema-resolver.ts index 290da07c30c..d2dada2e4dc 100644 --- a/packages/ui-vue/components/dynamic-resolver/src/schema-resolver.ts +++ b/packages/ui-vue/components/dynamic-resolver/src/schema-resolver.ts @@ -21,12 +21,35 @@ function getSchemaValueByDefault(defaultSchema: Record): Record): Record { + const { properties, title, required: requiredProperty } = defaultSchema as Record; + if (requiredProperty && Array.isArray(requiredProperty)) { + const resolvedSchema = requiredProperty.reduce((propsObject: Record, propKey: string) => { + propsObject[propKey] = (properties[propKey].type === 'object' && !!properties[propKey].properties) ? + getSchemaValueByDefault(properties[propKey]) : cloneDeep(properties[propKey].default); + + return propsObject; + }, {}); + if (title && requiredProperty.find(item => item === 'id')) { + const typePrefix = title.toLowerCase().replace(/-/g, '_'); + resolvedSchema.id = `${typePrefix}_${Math.random().toString().slice(2, 6)}`; + } + return resolvedSchema; + } + return { + type: title + }; + +} function getSchemaByType(componentType: string, resolveContext: Record = {}, designerHostService?: DesignerHostService) : Record | null { - const defaulSchema = schemaMap[componentType]; - if (defaulSchema) { - let componentSchema = getSchemaValueByDefault(defaulSchema); + const defaultSchema = schemaMap[componentType]; + if (defaultSchema) { + let componentSchema = getRequiredSchemaValueByDefault(defaultSchema); const schemaResolver = schemaResolverMap[componentType]; componentSchema = schemaResolver ? schemaResolver({ getSchemaByType }, componentSchema, resolveContext, designerHostService) : componentSchema; @@ -40,13 +63,16 @@ function resolveSchema(schemaValue: Record, defaultSchema: Record, propKey: string) => { - // 解决属性是对象类型,默认值被冲掉的情况 - // 增加非判断,解决针对属性时对象,但是schemaValue=null或者undefined情况 - if (resolvedSchema[propKey] && isPlainObject(resolvedSchema[propKey]) && (isPlainObject(schemaValue[propKey]||!schemaValue[propKey]))) { - Object.assign(resolvedSchema[propKey], schemaValue[propKey]||{}); - } else { - resolvedSchema[propKey] = schemaValue[propKey]; + if (Object.prototype.hasOwnProperty.call(schemaValue, propKey)) { + // 解决属性是对象类型,默认值被冲掉的情况 + // 增加非判断,解决针对属性时对象,但是schemaValue=null或者undefined情况 + if (resolvedSchema[propKey] && isPlainObject(resolvedSchema[propKey]) && (isPlainObject(schemaValue[propKey] || !schemaValue[propKey]))) { + Object.assign(resolvedSchema[propKey], schemaValue[propKey] || {}); + } else { + resolvedSchema[propKey] = schemaValue[propKey]; + } } + return resolvedSchema; }, resolvedSchema); diff --git a/packages/ui-vue/components/entity-binding-selector/composition/use-field-tree.ts b/packages/ui-vue/components/entity-binding-selector/composition/use-field-tree.ts index c17146dfba3..508d1b60ca7 100644 --- a/packages/ui-vue/components/entity-binding-selector/composition/use-field-tree.ts +++ b/packages/ui-vue/components/entity-binding-selector/composition/use-field-tree.ts @@ -27,7 +27,7 @@ export function useFieldTree(props: EntityBindingSelectorProps) { showSelectAll: true }; /** 标识字段是否可以选择 */ - let hasSelectableField = ref(false); + const hasSelectableField = ref(false); /** * schema字段集合组装成树 @@ -116,7 +116,7 @@ export function useFieldTree(props: EntityBindingSelectorProps) { const { fields } = bindingEntity.type; fieldDataSource.value = resolveFields(fields); - if (fieldTreeGridRef && fieldTreeGridRef.value) { + if (fieldTreeGridRef.value) { fieldTreeGridRef.value.updateDataSource(fieldDataSource.value); } diff --git a/packages/ui-vue/components/external-container/src/schema/external-container.schema.json b/packages/ui-vue/components/external-container/src/schema/external-container.schema.json index 2cd2734eb83..082fa71fa1c 100644 --- a/packages/ui-vue/components/external-container/src/schema/external-container.schema.json +++ b/packages/ui-vue/components/external-container/src/schema/external-container.schema.json @@ -47,7 +47,6 @@ }, "required": [ "id", - "type", - "contents" + "type" ] } \ No newline at end of file diff --git a/packages/ui-vue/components/input-group/src/schema/input-group.schema.json b/packages/ui-vue/components/input-group/src/schema/input-group.schema.json index 15c47b46b79..8565a7bd07a 100644 --- a/packages/ui-vue/components/input-group/src/schema/input-group.schema.json +++ b/packages/ui-vue/components/input-group/src/schema/input-group.schema.json @@ -203,7 +203,6 @@ } }, "required": [ - "id", "type" ], "ignore": [ diff --git a/packages/ui-vue/components/layout/src/schema/layout-pane.schema.json b/packages/ui-vue/components/layout/src/schema/layout-pane.schema.json index 3093a93f729..47c6a1fe678 100644 --- a/packages/ui-vue/components/layout/src/schema/layout-pane.schema.json +++ b/packages/ui-vue/components/layout/src/schema/layout-pane.schema.json @@ -67,5 +67,10 @@ "type": "number", "default": true } - } + }, + "required": [ + "id", + "type", + "contents" + ] } \ No newline at end of file diff --git a/packages/ui-vue/components/lookup/src/schema/lookup.schema.json b/packages/ui-vue/components/lookup/src/schema/lookup.schema.json index 61f37c83226..1967358b2a6 100644 --- a/packages/ui-vue/components/lookup/src/schema/lookup.schema.json +++ b/packages/ui-vue/components/lookup/src/schema/lookup.schema.json @@ -106,7 +106,6 @@ } }, "required": [ - "id", "type" ], "ignore": [ diff --git a/packages/ui-vue/components/number-range/src/schema/number-range.schema.json b/packages/ui-vue/components/number-range/src/schema/number-range.schema.json index 355d1be21d8..65b92dad143 100644 --- a/packages/ui-vue/components/number-range/src/schema/number-range.schema.json +++ b/packages/ui-vue/components/number-range/src/schema/number-range.schema.json @@ -68,7 +68,6 @@ } }, "required": [ - "id", "type" ] } \ No newline at end of file diff --git a/packages/ui-vue/components/number-spinner/src/schema/number-spinner.schema.json b/packages/ui-vue/components/number-spinner/src/schema/number-spinner.schema.json index 62f211e762d..e0203999a1a 100644 --- a/packages/ui-vue/components/number-spinner/src/schema/number-spinner.schema.json +++ b/packages/ui-vue/components/number-spinner/src/schema/number-spinner.schema.json @@ -107,7 +107,6 @@ } }, "required": [ - "id", "type" ], "ignore": [ diff --git a/packages/ui-vue/components/page-header/src/schema/page-header.schema.json b/packages/ui-vue/components/page-header/src/schema/page-header.schema.json index e4d47e8ebe2..df56c928837 100644 --- a/packages/ui-vue/components/page-header/src/schema/page-header.schema.json +++ b/packages/ui-vue/components/page-header/src/schema/page-header.schema.json @@ -122,5 +122,9 @@ "type": "boolean", "default": false } - } + }, + "required": [ + "id", + "type" + ] } \ No newline at end of file diff --git a/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts b/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts index dfe2f07d894..2cd4312be71 100644 --- a/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts +++ b/packages/ui-vue/components/property-panel/src/composition/entity/input-base-property.ts @@ -1,4 +1,4 @@ - + import { BaseControlProperty } from "./base-property"; import { SchemaDOMMapping } from './schema-dom-mapping'; import { canvasChanged } from '../../../../designer-canvas/src/composition/designer-canvas-changed'; @@ -30,8 +30,6 @@ export class InputBaseProperty extends BaseControlProperty { public getBasicProperties(propertyData, componentInstance): any { const self = this; this.setDesignViewModelField(propertyData); - const formBasicInfo = this.formSchemaUtils.getFormMetadataBasicInfo(); - // const data = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId); return { description: 'Basic Information', title: '基本信息', diff --git a/packages/ui-vue/components/radio-group/src/schema/radio-group.schema.json b/packages/ui-vue/components/radio-group/src/schema/radio-group.schema.json index 0d7735cdc70..fab86918bd8 100644 --- a/packages/ui-vue/components/radio-group/src/schema/radio-group.schema.json +++ b/packages/ui-vue/components/radio-group/src/schema/radio-group.schema.json @@ -77,7 +77,6 @@ } }, "required": [ - "id", "type" ], "ignore": [ diff --git a/packages/ui-vue/components/section/src/schema/schema-resolver.ts b/packages/ui-vue/components/section/src/schema/schema-resolver.ts index 48fc50d32fb..ab718b1661b 100644 --- a/packages/ui-vue/components/section/src/schema/schema-resolver.ts +++ b/packages/ui-vue/components/section/src/schema/schema-resolver.ts @@ -19,7 +19,6 @@ function wrapContainerForSection(resolver: DynamicResolver, sectionSchema: Recor appearance: { class: 'f-section-in-mainsubcard' }, - enableAccordion: false, mainTitle: context.mainTitle || sectionSchema.mainTitle || '标题' }); diff --git a/packages/ui-vue/components/splitter/src/schema/splitter-pane.schema.json b/packages/ui-vue/components/splitter/src/schema/splitter-pane.schema.json index dfa6ac80a33..1ac88bcb967 100644 --- a/packages/ui-vue/components/splitter/src/schema/splitter-pane.schema.json +++ b/packages/ui-vue/components/splitter/src/schema/splitter-pane.schema.json @@ -80,5 +80,10 @@ "type": "number", "default": true } - } + }, + "required": [ + "id", + "type", + "contents" + ] } \ No newline at end of file diff --git a/packages/ui-vue/components/splitter/src/schema/splitter.schema.json b/packages/ui-vue/components/splitter/src/schema/splitter.schema.json index 16ff03a8a1d..177a97a13a7 100644 --- a/packages/ui-vue/components/splitter/src/schema/splitter.schema.json +++ b/packages/ui-vue/components/splitter/src/schema/splitter.schema.json @@ -41,5 +41,10 @@ "row" ] } - } + }, + "required": [ + "id", + "type", + "contents" + ] } \ No newline at end of file diff --git a/packages/ui-vue/components/switch/src/schema/switch.schema.json b/packages/ui-vue/components/switch/src/schema/switch.schema.json index dd0476b3f26..da1eb011ebb 100644 --- a/packages/ui-vue/components/switch/src/schema/switch.schema.json +++ b/packages/ui-vue/components/switch/src/schema/switch.schema.json @@ -78,7 +78,6 @@ } }, "required": [ - "id", "type" ], "ignore":[ diff --git a/packages/ui-vue/components/textarea/src/schema/textarea.schema.json b/packages/ui-vue/components/textarea/src/schema/textarea.schema.json index c244233cb84..15590bc1e52 100644 --- a/packages/ui-vue/components/textarea/src/schema/textarea.schema.json +++ b/packages/ui-vue/components/textarea/src/schema/textarea.schema.json @@ -77,7 +77,6 @@ } }, "required": [ - "id", "type" ], "ignore": [ diff --git a/packages/ui-vue/components/time-picker/src/schema/time-picker.schema.json b/packages/ui-vue/components/time-picker/src/schema/time-picker.schema.json index 872bdaab1ee..cc4c6fc63c7 100644 --- a/packages/ui-vue/components/time-picker/src/schema/time-picker.schema.json +++ b/packages/ui-vue/components/time-picker/src/schema/time-picker.schema.json @@ -84,7 +84,6 @@ }, "required": [ - "id", "type" ], "ignore": [ diff --git a/packages/ui-vue/components/tree-grid/src/property-config/tree-grid.property-config.json b/packages/ui-vue/components/tree-grid/src/property-config/tree-grid.property-config.json deleted file mode 100644 index fff32b7a4ba..00000000000 --- a/packages/ui-vue/components/tree-grid/src/property-config/tree-grid.property-config.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "title": "tree-grid", - "description": "A Farris Component", - "type": "object", - "categories": { - "basic": { - "description": "Basic Infomation", - "title": "基本信息", - "properties": { - "id": { - "description": "组件标识", - "title": "标识", - "type": "string", - "readonly": true - }, - "type": { - "description": "组件类型", - "title": "控件类型", - "type": "select", - "editor": { - "type": "waiting for modification", - "enum": [] - } - } - } - } - } -} diff --git a/packages/ui-vue/components/tree-grid/src/property-config/tree-grid.property-config.ts b/packages/ui-vue/components/tree-grid/src/property-config/tree-grid.property-config.ts index f754841edd4..7a4a2364b0e 100644 --- a/packages/ui-vue/components/tree-grid/src/property-config/tree-grid.property-config.ts +++ b/packages/ui-vue/components/tree-grid/src/property-config/tree-grid.property-config.ts @@ -60,7 +60,7 @@ export class TreeGridProperty extends BaseControlProperty { type: "grid-field-editor", viewModelId: this.viewModelId, gridData: propertyData, - gridType:"tree-grid-column" + gridType: "tree-grid-column" }, // 这个属性,标记当属性变更得时候触发重新更新属性 refreshPanelAfterChanged: true, @@ -84,25 +84,12 @@ export class TreeGridProperty extends BaseControlProperty { title: '显示图标', type: "boolean", description: '是否显示图标' - }, - showSetting:{ + }, + showSetting: { title: '显示设置按钮', type: "boolean", description: '是否显示设置按钮' - } - // useBlankWhenDataIsEmpty: { - // title: '空数据表格显示空白行', - // description: '表格没有数据时是否显示空白行', - // type: 'boolean', - // refreshPanelAfterChanged: true - // }, - // emptyDataHeight: { - // title: '空数据高度', - // type: 'number', - // description: '空数据行高度设置', - // min: 1, - // max: 1000 - // }, + } }, setPropertyRelates(changeObject: PropertyChangeObject, data: any) { switch (changeObject && changeObject.propertyID) { @@ -116,15 +103,7 @@ export class TreeGridProperty extends BaseControlProperty { } } }; - // 兼容 NG - // if (typeof propertyData.pagination == 'boolean') { - // propertyData.pagination = { - // enable: false, - // mode: '', - // showIndex: false, - // showLimits: false - // }; - // } + this.propertyConfig.categories['pagination'] = { title: '分页', $converter: '/converter/pagination.converter', @@ -135,7 +114,7 @@ export class TreeGridProperty extends BaseControlProperty { refreshPanelAfterChanged: true }, mode: { - visible: propertyData.pagination?.enable||false, + visible: propertyData.pagination?.enable || false, title: '分页交互模式', type: "enum", editor: { @@ -146,12 +125,12 @@ export class TreeGridProperty extends BaseControlProperty { } }, showIndex: { - visible: propertyData.pagination?.enable||false, + visible: propertyData.pagination?.enable || false, title: '显示页码', type: 'boolean' }, showLimits: { - visible: propertyData.pagination?.enable||false, + visible: propertyData.pagination?.enable || false, title: '显示每页记录数', type: 'boolean' } @@ -164,92 +143,12 @@ export class TreeGridProperty extends BaseControlProperty { { "label": "onSelectionChange", "name": "行切换事件" + }, + { + "label": "onClickRow", + "name": "行点击事件" } ]; - // const initialData=EventsEditorFuncUtils.formProperties(); - // const initialDataMock = { - // propertyID: 'data-grid-component-viewmodel', - // propertyType: 'events', - // internalCommandList: [ - // { - // controllerName: { - // id: '70b4abd4-9f2c-4b7c-90e9-6ac6f4b74c72', - // label: 'ListController', - // name: '列表控制器' - // }, - // controllerList: [ - // { - // "id": "93ee1cd2-cf0b-40b3-b99f-958a3d1fad1c", - // "label": "Load", - // "name": "加载数据", - // "handlerName": "Load" - // }, - // { - // "id": "71ae8a4c-6202-4875-9246-2e2d959da37f", - // "label": "Search", - // "name": "查询", - // "handlerName": "Search" - // }, - // { - // "id": "77556491-41c0-4356-8ccf-25e39817060e", - // "label": "Add", - // "name": "添加数据", - // "handlerName": "Add" - // }, - // { - // "id": "52fdcac3-46c8-466e-aa5d-19920ece2076", - // "label": "View", - // "name": "查看数据", - // "handlerName": "View" - // }, - // { - // "id": "7ade9996-0531-4401-b1bc-fb9ec8ee3f8e", - // "label": "Edit", - // "name": "编辑数据", - // "handlerName": "Edit" - // }, - // { - // "id": "6d5a354f-871f-43e6-82bc-7837184380d3", - // "label": "RemoveRows", - // "name": "删除选中行", - // "handlerName": "RemoveRows" - // }, - // { - // "id": "1a1b7c33-38f0-469f-a017-223086ee6259", - // "label": "ChangePage", - // "name": "切换页码", - // "handlerName": "ChangePage" - // }, - // { - // "id": "debae2dd-3387-48cf-90ba-96e74ab5a8e5", - // "label": "Remove", - // "name": "删除指定数据", - // "handlerName": "Remove" - // } - // ] - // } - // ], - // /** (事件设定)可绑定事件默认列表; */ - // events, - // /** 已绑定的事件 */ - // boundEventsList: [], - // /** 视图模型已有命令 */ - // viewModel: [], - // /** 目标组件对应的所有可选的组件 */ - // componentLists: [ - // { componentId: 'root-component', viewModelId: 'root-viewmodel' }, - // { componentId: 'data-grid-component', viewModelId: 'data-grid-component-viewmodel' } - // ], - // /** 所有组件列表 */ - // allComponentList: [ - // { componentId: 'root-component', viewModelId: 'root-viewmodel' }, - // { componentId: 'data-grid-component', viewModelId: 'data-grid-component-viewmodel' } - // ], - // /** 初始为空,用于存储用户点击「导入新命令」的控制器值 */ - // newController: [], - // isAddControllerMethod: false, - // getEventList: () => { return { events, boundEventsList: [] }; } - // }; const self = this; const initialData = self.eventsEditorUtils['formProperties'](propertyData, self.viewModelId, events); const properties = {}; diff --git a/packages/ui-vue/components/tree-grid/src/schema/tree-grid-column.schema.json b/packages/ui-vue/components/tree-grid/src/schema/tree-grid-column.schema.json index 710bac1b916..eccb6e5db37 100644 --- a/packages/ui-vue/components/tree-grid/src/schema/tree-grid-column.schema.json +++ b/packages/ui-vue/components/tree-grid/src/schema/tree-grid-column.schema.json @@ -125,5 +125,9 @@ "description": "", "type": "number" } - } + }, + "required": [ + "id", + "type" + ] } \ No newline at end of file diff --git a/packages/ui-vue/components/tree-grid/src/schema/tree-grid.schema.json b/packages/ui-vue/components/tree-grid/src/schema/tree-grid.schema.json index 3fe375f4e11..240e717abc7 100644 --- a/packages/ui-vue/components/tree-grid/src/schema/tree-grid.schema.json +++ b/packages/ui-vue/components/tree-grid/src/schema/tree-grid.schema.json @@ -780,6 +780,7 @@ }, "required": [ "id", - "type" + "type", + "columns" ] } \ No newline at end of file diff --git a/packages/ui-vue/components/tree-grid/src/tree-grid.props.ts b/packages/ui-vue/components/tree-grid/src/tree-grid.props.ts index 456a9cdcee1..3cc29069bce 100644 --- a/packages/ui-vue/components/tree-grid/src/tree-grid.props.ts +++ b/packages/ui-vue/components/tree-grid/src/tree-grid.props.ts @@ -21,7 +21,6 @@ import { schemaMapper } from './schema/schema-mapper'; import { schemaResolver } from "./schema/schema-resolver"; import { CommandOptions, HierarchyOptions, RowNumberOptions, SelectionOptions, VisualData } from '../../data-view'; import treeGridSchema from './schema/tree-grid.schema.json'; -import propertyConfig from './property-config/tree-grid.property-config.json'; export type DataGridAlignment = 'left' | 'center' | 'right'; -- Gitee From 5e30addff6cd92c68e61f1f2ac5482aca9838e1d Mon Sep 17 00:00:00 2001 From: zengzhen Date: Thu, 26 Dec 2024 19:20:17 +0800 Subject: [PATCH 055/181] =?UTF-8?q?fix:=20admin=E5=AF=BC=E8=88=AA=E5=88=9D?= =?UTF-8?q?=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../public/assets/farris-all.css | 0 .../public/assets/farrisicon.ttf | Bin .../public/assets/icon/iconfont.css | 490 ++++++++++++++++++ .../public/assets/icon/iconfont.ttf | Bin 0 -> 37080 bytes packages/farris-admin/src/app.vue | 6 +- ...=> vertical-navigation.component.props.ts} | 4 +- ....tsx => vertical-navigation.component.tsx} | 66 ++- packages/farris-admin/src/main.ts | 4 +- 8 files changed, 536 insertions(+), 34 deletions(-) rename packages/{designer => farris-admin}/public/assets/farris-all.css (100%) rename packages/{designer => farris-admin}/public/assets/farrisicon.ttf (100%) create mode 100644 packages/farris-admin/public/assets/icon/iconfont.css create mode 100644 packages/farris-admin/public/assets/icon/iconfont.ttf rename packages/farris-admin/src/components/{header.props.ts => vertical-navigation.component.props.ts} (35%) rename packages/farris-admin/src/components/{header.component.tsx => vertical-navigation.component.tsx} (32%) diff --git a/packages/designer/public/assets/farris-all.css b/packages/farris-admin/public/assets/farris-all.css similarity index 100% rename from packages/designer/public/assets/farris-all.css rename to packages/farris-admin/public/assets/farris-all.css diff --git a/packages/designer/public/assets/farrisicon.ttf b/packages/farris-admin/public/assets/farrisicon.ttf similarity index 100% rename from packages/designer/public/assets/farrisicon.ttf rename to packages/farris-admin/public/assets/farrisicon.ttf diff --git a/packages/farris-admin/public/assets/icon/iconfont.css b/packages/farris-admin/public/assets/icon/iconfont.css new file mode 100644 index 00000000000..0ef374b24a1 --- /dev/null +++ b/packages/farris-admin/public/assets/icon/iconfont.css @@ -0,0 +1,490 @@ +@font-face { + font-family: 'fd-i-Family'; + src: url('iconfont.ttf?t=1640255080725') format('truetype'); +} + +.fd-i-Family { + font-family: 'fd-i-Family' !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.fd_pc-response-layout-4:before { + content: '\e601'; +} + +.fd_pc-response-layout-3:before { + content: '\e602'; +} + +.fd_pc-response-layout-2:before { + content: '\e603'; +} + +.fd_pc-response-layout-1:before { + content: '\e604'; +} +.fd_pc-city-selector:before { + content: '\e600'; +} +.fd_pc-shenpiyijian:before { + content: '\e073'; +} + +.fd_pc-eventCode:before { + content: '\e071'; +} + +.fd_pc-delete-element:before { + content: '\e070'; +} + +.fd_pc-enable-function:before { + content: '\e06f'; +} + +.fd_pc-dragHandler:before { + content: '\e06e'; +} + +.fd_pc-editEvent:before { + content: '\e06d'; +} + +.fd_pc-extend-setting:before { + content: '\e06c'; +} + +.fd_pc-variable-setting:before { + content: '\e06b'; +} + +.fd_pc-leaf-node:before { + content: '\e06a'; +} + +.fd_pc-import-from-cdm:before { + content: '\e069'; +} + +.fd_pc-root-node:before { + content: '\e068'; +} + +.fd_pc-push:before { + content: '\e6067'; +} + +.fd_pc-save-sync:before { + content: '\e066'; +} + +.fd_pc-delete-obj:before { + content: '\e065'; +} + +.fd_pc-sync-bizelements:before { + content: '\e064'; +} + +.fd_pc-basic-info:before { + content: '\e063'; +} + +.fd_pc-advanced-setting:before { + content: '\e062'; +} + +.fd_pc-add-new-element:before { + content: '\e061'; +} + +.fd_pc-corner-marks-right-bottom:before { + content: '\e060'; +} + +.fd_pc-add-virtual-element:before { + content: '\e05f'; +} + +.fd_pc-cancel:before { + content: '\e05e'; +} + +.fd_pc-add-child-obj:before { + content: '\e05d'; +} + +.fd_pc-add-same-obj:before, +.fd_pc-imageupload:before { + content: '\e05c'; +} + +.fd_pc-yilaiguanxi:before { + content: '\e05b'; +} + +.fd_pc-shanchu:before { + content: '\e05a'; +} + +.fd_pc-gengduo:before { + content: '\e059'; +} + +.fd_pc-git:before { + content: '\e058'; +} + +.fd_pc-shouji:before { + content: '\e057'; +} + +.fd_pc-diannao:before { + content: '\e056'; +} + +.fd_pc-quanxian:before { + content: '\e055'; +} + +.fd_pc-daorudaochu:before { + content: '\e054'; +} + +.fd_pc-dayinshezhi:before { + content: '\e053'; +} + +.fd_pc-yewuliu:before { + content: '\e052'; +} + +.fd_pc-shujuzhuanhuanguize:before { + content: '\e051'; +} + +.fd_pc-shenjirizhi:before { + content: '\e050'; +} + +.fd_pc-bianmaguize:before { + content: '\e04f'; +} + +.fd_pc-zhuanyebanshejiqi:before { + content: '\e04e'; +} + +.fd_pc-lingdaimashejiqi:before { + content: '\e04d'; +} + +.fd_pc-didaimashejiqi:before { + content: '\e04c'; +} + +.fd_pc-geshidingzhi:before { + content: '\e04b'; +} + +.fd_pc-kuozhankaifa:before { + content: '\e04a'; +} + +.fd_pc-dingzhi:before { + content: '\e049'; +} + +.fd_pc-ziyuanguanliqi:before { + content: '\e048'; +} + +.fd_pc-zhedieshouqi:before { + content: '\e047'; +} + +.fd_pc-zhediezhankai:before { + content: '\e046'; +} + +.fd_pc-xianshiID:before { + content: '\e045'; +} + +.fd_pc-sousuo:before { + content: '\e044'; +} + +.fd_pc-shuaxin:before { + content: '\e043'; +} + +.fd_pc-anheimoshiqidongtai:before { + content: '\e042'; +} + +.fd_pc-anheimoshi:before { + content: '\e041'; +} +.fd_pc-tag:before { + content: '\e040'; +} + +.fd_pc-html-template:before { + content: '\e03f'; +} + +.fd_pc-button-group:before { + content: '\e03e'; +} + +.fd_pc-display-field:before, +.fd_pc-static-text:before { + content: '\e03d'; +} + +.fd_pc-QdpFramework:before { + content: '\e03c'; +} + +.fd_pc-check-group:before { + content: '\e03b'; +} + +.fd_pc-list-nav:before { + content: '\e03a'; +} + +.fd_pc-nav-tab:before { + content: '\e039'; +} + +.fd_pc-file-upload:before { + content: '\e038'; +} + +.fd_pc-section:before { + content: '\e037'; +} + +.fd_pc-jingtaiwenben:before { + content: '\e036'; +} + +.fd_pc-discussion-list:before { + content: '\e035'; +} + +.fd_pc-personnel-selector:before { + content: '\e034'; +} + +.fd_pc-gags:before { + content: '\e033'; +} + +.fd_pc-module:before { + content: '\e032'; +} + +.fd_pc-multi-select:before { + content: '\e031'; +} + +.fd_pc-sidebar:before { + content: '\e030'; +} + +.fd_pc-steps:before { + content: '\e02f'; +} + +.fd_pc-splitter:before { + content: '\e02e'; +} + +.fd_pc-scrollspy:before { + content: '\e02d'; +} + +.fd_pc-multi-view-container:before { + content: '\e02c'; +} + +.fd_pc-list-view:before { + content: '\e02b'; +} + +.fd_pc-charts:before { + content: '\e02a'; +} + +.fd_pc-image:before { + content: '\e029'; +} + +.fd_pc-scroll-collapsible-area:before { + content: '\e028'; +} + +.fd_pc-modal-footer:before { + content: '\e027'; +} + +.fd_pc-wizard:before { + content: '\e026'; +} + +.fd_pc-page-header:before { + content: '\e025'; +} + +.fd_pc-component:before { + content: '\e024'; +} + +.fd_pc-data-grid:before { + content: '\e023'; +} + +.fd_pc-mingxibiao2:before { + content: '\e022'; +} + +.fd_pc-tubiao:before { + content: '\e021'; +} + +.fd_pc-query-solution:before { + content: '\e020'; +} + +.fd_pc-liushuihao:before { + content: '\e01f'; +} + +.fd_pc-switch:before { + content: '\e01e'; +} + +.fd_pc-lookup:before { + content: '\e01d'; +} + +.fd_pc-erweima:before { + content: '\e01c'; +} + +.fd_pc-radio-group:before { + content: '\e01b'; +} + +.fd_pc-organization-selector:before { + content: '\e01a'; +} + +.fd_pc-approval-logs:before { + content: '\e019'; +} + +.fd_pc-combo-list:before { + content: '\e018'; +} + +.fd_pc-input-group:before { + content: '\e017'; +} + +.fd_pc-textarea:before { + content: '\e016'; +} + +.fd_pc-tabs:before { + content: '\e015'; +} + +.fd_pc-OCR:before { + content: '\e014'; +} + +.fd_pc-number-spinner:before { + content: '\e013'; +} + +.fd_pc-field-set:before { + content: '\e012'; +} + +.fd_pc-list-filter:before { + content: '\e011'; +} + +.fd_pc-avatar:before { + content: '\e010'; +} + +.fd_pc-date-picker:before { + content: '\e00f'; +} + +.fd_pc-language-text-box:before { + content: '\e00e'; +} + +.fd_pc-discussion-editor:before { + content: '\e00d'; +} + +.fd_pc-button:before { + content: '\e00c'; +} + +.fd_pc-yuyinshuru:before { + content: '\e00b'; +} + +.fd_pc-rich-text-box:before { + content: '\e00a'; +} + +.fd_pc-dizhi:before { + content: '\e009'; +} + +.fd_pc-time-picker:before { + content: '\e008'; +} + +.fd_pc-input-group:before { + content: '\e007'; +} + +.fd_pc-view-model:before { + content: '\e006'; +} + +.fd_pc-check-box:before { + content: '\e005'; +} + +.fd_pc-file-upload:before { + content: '\e004'; +} + +.fd_pc-tree-grid:before { + content: '\e003'; +} + +.fd_pc-response-form:before { + content: '\e002'; +} + +.fd_pc-content-container:before { + content: '\e001'; +} + +.fd_pc-fenlanmianban:before { + content: '\e000'; +} diff --git a/packages/farris-admin/public/assets/icon/iconfont.ttf b/packages/farris-admin/public/assets/icon/iconfont.ttf new file mode 100644 index 0000000000000000000000000000000000000000..ae8d3ff7e1832d16ec45ed40a09b4972d1a7fb13 GIT binary patch literal 37080 zcmd?Sd7Ku1 zfan9}i|C^XC?25jh))m&QRGlSA4MIN2Ne|$P8~$t~@ZWT}6_%GI;8R~IjmBsLADtCp_p8?1#l{}TBRAiweSGdG?6 z;4`22jwH!1NRs1>?Yl4BcIZ%~EJ@yFl5~-6$JR|-I+r|LN8JWOZ3hb6`RtxeXKwxGg75B@ zr1z|nB!2bTXPvkArbq9%Uy|O}kRa@^mgq6DQYHW+(O z(`Woya@$0OpS?KqHcHSLO)pb7%a0v1>@>J@=za$+IdF#4M>X*hO zK6n0-Rg$)Q)80K&T(Y{it{a+NFvBIO+j>pD&4LZK5v2qr-8cifQEp>H$h*W$;EipK^Io*Q7(W82Z%B@>RseKL4b2LGQ>md_0T3%Sd{zMLN)5vbfMTiPw*uf!-CQFTOD_~AbjUFpt zc1w+3D`1{WjXo=2#!HQUD`4(RjR7kF3rLMYD*zuz4bTV*zzkAj$O^y_Qln}GU<;{H zvjXsj)Btxv0T@JTOtS)TiPRXj01mHxeLF0%3>?k#8d=Y>r zr3Q^V0x+i3pznbI+$lBaJ0SpzN)7sc2*9UOgT5;QQI-aMZv^02sX=gn0BkEY2tE*i zccliw4FWK*)F60504|mq1ZN1q%2I>i4*~dDY7kr^08>j1f>#9KY^gzTi~#H{H3+^D zfXAfpv@KDlE1$Pd*dI{G)I*LPjt3lnbslnUap&D%_008r#k)+Cv`e)=>3j5# z_-;4C#xwr8{+|SP1b!G?68uQ;_0aX9r^3X|v7d8}LZ#%c`<>DE|7fRDh&y{(3OZl1h zW$i!c*xd0*r`EZx^NFtht_!-J=w8<&^<35SRPWh+wZ3cn)BVp31P87fcxG^LaBrnn z`TEe{&@6AHjiTLh#SDbUBmy3FPH-a zcVLzbfI}Dzhm4@Tkjs~<#!#)IQ+2+e&|lNsHdOa<&CM6% z^r?E?4De4kPv)OC7u9NbJiq~-@pAEu1z>{(z@AHip-(0%fG15c>q$r1)RTsS;S9s0 z&SX_QtNd1VB9*B+#ZaYMc|+j8%k*?-&3d-GJIfw3>n@!!ugk_BYbB`sEw478*f?$D zFv7Hr{MGL4hp9560d(+T(cY=x%*_k`?iz1Zxei~l^+#}iP!u$g2|p> zr^AyAc00UTcOs%C2Iq8q!xx`Ew8QDn7M**NvR@wSy2l=fd+hGevhok!F_7ZLri8$AjsCB!x_ooy$QE3R1ACda51cMZ^XOmeW&&^f5(oe{p~@Q|EuhV zAW)zXXpa0?{<$EwYL zveTt$uAM01*ALxIJ>5M-)ix=z%w@FF&-I0T=HHltQzmTwEu6`OnG()4w@+4AY%=;# zHmSHlSapuHMll|3hv+K?i%-uZZy)}1(&BI+g34e?4+IGx$tz%XX)<#(b z@etiz1)Sr9{^Ree0t@8rDVh`-2b6~g@oiD0{y%(I{eSVZ-aPr89KMiaqkZzTUi229 zb<u(j&Ob}%$X0(W=0DNAV>O-G`_Ae*>n#4mu1xcn z*YsV?eMh8y;>lMZIPm}S+!juH!!!R6o>-nFxw(JlX`k&nB8jJ!{-@7M!+PA< zf@}Uq(udr7GWgA4G9FiKF8wYo7*AB% z?lOFd-sCqEy$PNF%oTJwoMFWl%@1E<9=v2YAGIkl6op))E9RZQ@jIuzW8MnZ{Ov71 zUH4JM>=QcvCMZ9ldQ}_~4vz!JRJr-XsoK6<+&-V%iY9y5?Q`+*U@{qO9-^MucVwG8 zsF_Pe=5uX>_6nX1NAr-&ce3ILgluky)2(~ragXkHI^9YzsM?b4y_uNT?e@kpy=Bhh ziA4OiIR4I4J-SB~(OxP%lcK9Z8gZB}CE{_&Dm15o+xG$d(vXKrkhvh)VYqu4Na+{@ zHBN)ODFA1K|FlO88e%yYvi>Wf0?QNf2gg#YGh%1LL`&rg zKTq{1Yw3`g4y74Ohwk|h+hE?wV&*TexrPlW%2F-JHLf~XLMwSs)tENyO1h_&I!i0e zmpuzUSNx)uNe(3W5=1y2emIm)hnimmbsVgnR^3=NUuAwds4a7c9n9-x-pyLsTXVUl zmAcwaHV-fG{ag8fhvb_h`)mj0g}}g7NZ?DLnb<~{~kpq;5j1bUt4*U)BK!PE{7Ue3CbkJV3fK$L>?k&>tjqM}0^|=9=^<ytR35(LqF zbh3hzS!G?U3T}<+)q5E=69ptage&Zx{LE=xeSKZiX6C&enXbV~XQso;hs;;UnVWa@ zb=7AUydBxj!NJaKhqo}ZUK*O1yPh-uXJZD4aqJ=HIdxyLou-{8ssyaX)WO$6#3G^di%E6M;6Ivia zzyN6`6bKbSf(uoEzRm&u#EjtrfIrPDb$|q>0we(9cER3Y`rMeQ<#~E2!xv_2Iav$% zcrl?i4<*{=Vq9g*9(ZK=Bm8ldtH!RKHdi#jm}BQoS!DsQ;zsJ2B4>qqIU!RA;UCI8 z=hC>xWqZQvr+FyZ&RK=uI=}f>Zl7=Nw=u4su~T;Nzwc+NYp2`c5#RG(`Du9_v;m`} zWeZq%7I=B6RM&W#Lr?(=s>v80VC;IWmjQdD1P4B4eTw zeMwLFd-0N=om;O1rUbK6&8MVjnsP$xLYQt&p-|O*A0wQ3xH@8C8!eO5(hvzICMt2)~ zyz{0n+rH&AU&iD0op;gLx&0?i)Q3j?&wZbnH?Sbso@nlJf59H`du@vSL#*spd`XXa zp9Y~0I+P=q@#lp#&jW2q9NL^Rv`tlL#%4o{w+tG`Qy}p{N5cxl{t{KgFewEPBx{x< zC;x9>VtY>L9PJ9`%lQC1^8|4YAQSx2|3_^loLL%gE(5jyVLF0bb-)Lp@frk(2A?Vwpt%Mj#^* zz#hNe9EuMVgKaa~_)1F5E+?9IC(7jnd*5FkyN>QcEqt~)~*1DOy>)K9FmUwc|14-ToZI=gHx2Vv( zNX1CS$W_a^s!|A5z<5{bKO)iv73sQ_*?GqI%)hKMzsx7jI0J0*Uz#rdmj})`!~Dzl zx0$!Fg{zSM@7?Ar-&?)>E4z8k{L^X6PFqfiS9UC)cw#y9dlG{Md7o__?tg_OMa0Ac z^HUj&gezer0)={|3T6oZ;ERY~QcLB03Gyzg0vm8mHHjTWnie8tX#xI)!2$`D$IBQ_{|xN>gj0Oy>V~wVoz6j{^-0^ z43|8Ca3QA#RXyeic@wNV=JPo1q14iWa6s2ptuGtt$|hW0y2~!B+#dJY?KX$Y>-Xv9 zPtT3Ir5GaoXcyRn>xt&}hQ^{o>5(uATdEhg8h)a7g2U{yMvQiMHmX zxrMBYc>}3%(8IY$mHpaab)CusiDWWa9(8e#w^PHzhuR0V4|dM8$sP{j+{QVi*>Vn2 zHls~;B;!xykW#cvM~fcfk*_|`4Xu~f_C|%ten+-<~Pl6c8oBdNko%;OKF-@o>y+(Ru1_2cGVs= zKlySXq{x~}v9s^z6%2;?pI>$QT&kw4Y?sUF@!A5O_jqHesF$%!N6MV7MUzo)x+{HG zIGyQCr`bO9Kz^D_VQjdAe=aiwZmFwH)6IiyReQO)2AUs7nyvhO+;Dj~OKDN|9f$7s zxfqjep(yDRV;Y4}lBI%L)T>3cP&%^^{o?>kTYAi!<;9rweUNY$z)E$ckZ6b|r8ZC`Qiz!0WoJ`?c|FDK|A2_e z-LJb1C`J|YuhUg#mmML8ZKKK++eSz91Cyz+9~HY^vnn!stD?N9R{An^B%ZiaYYa(mY<+=XSb>&}##OLl#P*C}q)-*=NCQkdbaO=YNhAYU z(^YW6sBc$|3X~Cc!MOpB!5u+52nEry%024ocXy_no^+?7r7M{( z_w)jLCS6HuM)SOryaCQ4m`9;t6#5JA&trbG+aLSTvbI2s|3v057|XY>@ckE;nT@}y z@P7233i|W*N9qu%?}ju?o1_}>qPHn#g%2RnKKQq6C9{&4?4XDdngc#ooc?H z-4QqYxtwcn&&m92ico9VfQPS;P0;=lq}(yGZz{Q75GV|Z7>>UOU28xC7Ep@8g|G<# zwLqG5bs0{RzK1@7Yod@mLIH4Q7#+{2RPGzQfvo9(KeJZpo5wa9jIa1l8fgMUdQt{b?q~o)6yhA1V$shas zV$Cn*dV6#7>RfNYyv_WpFAP1X*Bb~Qxhdi^SNkH@XaRmgP;0pKW(>BDVztPAenb)j zB;j58#Xt22dvk{mQZIadtgm@)*!Oci6!88M8nCs#2zvRqfF=)Vzwr8+--VKYR{(t! zs|(^ZEM$fvJJ*rRzyn+kj;{@x>-oS~E1|#M2s0wy5F(w>*@JZ<^@U(v@HQm$rC1I$ zmI2p;{(?e4I}H*$M07QR+Nj&oQeYg^0XyV``an$qp)L=UKy)JmVYb&i>17w?b z19)*}HeV=Y{+6%wg`1mLh;KZ3@xspT?#_jaKQoy)dH(tH=AHimioO*7MHqLdi0L>* z!XnZ_I`=%29!%qCW>b}PI31STL;BTM>ml=7$8{!p9dC7qJ~tojrAPEDB8-#$IJoEr zg`6Ot2|%><&8-hhD)_QYI0Xauwg8}7$l4AxJ(G)RbQD?3G*Jkn6S5bROD#+y`!fI2 z@qlB@y{UQ8+r!DIZ4=?@P0px~FtquI#{m6gi$*L|{^R2>v+3fpd0*?YQ(kvGlo`!U zZv#}Hux(KT4%-%|2GrecgngXNP=lCu+-&>1OQUKK_?<&BLA>Z8=wil!xx2tEkHP~1 zcJN~V007D$v(Ygi2*Oq*YaqskW*ga{FoZ>D+G>?z3&E3B1Y+zIvJVJ_1n?6|r5M8GbLH@Acn=0`nTLpRai@XyAQpj-Z7P3R-wHed=;5py(U2-N9Y) z?l_L-I3l3wwfvAb5b&B*_L0E9U2~>4@KgY3&7bgp5@#IdE7qCjAlcN8$PIouK1xg>UHvNfZSqMVu`3=)^7v;5jm5`wSf2 z%d+zyv;_tdZ8M9-nQe)Iptmi?yxHYl*7cs{nUPyzxt+Qm&Z zNG>Ym?1ucTyiMpE;LY%6`i4Gmg~#X{U>QBCZz$+IL`I(=P|65CI#3KS$*7>)FvLKS zG71j!qq*TW4n+gso*yo7Ed&TGrPSsfsZJSZw)x?wRzJmqoO9=Giq~){4$o~om~h$b zB5QNGZ{vDEB^|@|R!={3>#&6?Kd^cbJ=OTXFKRY;c9Ho!vjsnPYzI!OKUuv^LA%!X zwd5>?{31et%Bmp)VfJxieep8%8sJdmhvLNxzi$uPb7#7ODc31TeZrLv?kgwcuQspz zsjBApxYHrmDXMyxJDet;h9eF64;W83xb`w^Dl=h`J_Wv0=S%-0eNehp`Wj{spu(~+ zVm=%*2f%igOB!h~tT|C`nWik$mSv`TV_GmllijJ%_K>tT)w|UX*)j!d8wrn*LD$NI zJpvgd=9iR;E%nhq_c_@$yGeOWQD7?di+n2NNvj@zPc)AU@AQRzZ#>*-BS;N{sjA;D z`@#<$ZM@5)>mG`J(H9Lk!(N*+*U^W%S6Y2sK>*UrCIQ6O`k*ZUQJfZlSaoaGDd2Wy zT!w+nmey_1`J3GENw0=Fv4|tA@iwce6?;`%AZ(8yv&MQlJWlqXgfP-$UuI+AS$y!# z>45(gypljdG&wCp(ExG{Dg%sSVGWsh5rVneP?^xgKP2(;C%ewM`0SHGlukb9qH`wt z`pm=QyJybay>Hj}_^uu9OxS&;I~{hLOa2ixXCLT3+Q|g^GPjTK+Slre&3A_~?svOF z8P}z6L%#`M!Usp_EiOlzbX75MX{+IJw;gZ~O#<<(p@AR>Ms;AQ4z8szkOyI|3=G2m zA_86wT1|mv`am@xN0EvfunU<=C0Pt=Y-naH?06FsJWq_AsH6kk3fU?`P2M8M8d)}; z&6r%O|tvxeso`Us5j@_Vb$2-gdps8D9xvwUT(w!GA{A{{GjcKgxl>Cw?jPM z+$U$nBZ}zIndAk|0yL+Feq$9_6=1q5$zIqDcmA>~>_oe|VajGHyo!h%4Ivc)!m zYKfsfegMrZ(bKE`$&q6ihGT~#8%X%wPTS!>I=s;G$M79`^A1_h56Y~VI4p)-9>*9Q zJ|t+={qm#o0&pQC)B0Mh4BEaKy!SNB;kSRna8HbfH)iSX0 zK>OQjYXQ}=*=lnAB+-0N1@*FE56-S$~}(C4*Z=7>0K z=6|^ZajR#nk^Fb&g(`C+G`aF%qX zf?QS1-#BA#zKvR%q5(8t;xWWML<8#V>vRvm1o6iEY;%EsoRFGoLR$1t%xWOGGCo^`Wr230hKs#Q!*Fumkmyd5AbWBN8#***>S8{j_~<`JF~IYM2F2Bp+pw{Ab;fe1t`E>~c>u z7mea6%SnEH^Xz087S^<--#rj3|4Q3uB#`0T=ddZX>T@(S?mMR>|iBRrrCR*gcaRKOcSCK`mV3}C!m zNHeI{OI3)6cp2D52k~j~j(H3PR38D@lXBI99W{(fwNM3%5ULm$j|v-j?abjFXU>}Q zFT1x-fB(!Gt}}gmw=Zo=mx@=PSZrsPXL^9$+@aYamxpytoXI`&4UhA}3wNJ>dMY#T z%){*W3sx^)_{Zzkthl+{w`LWaS?xY)qNjh;9Rt1Wcb!>1;R=OZ2|e4{yqo)*FRx=B zSBMR*JJ@sSI`i?Fxi-?{!$DzyKL@{+7~b-zcfusPs>31%dP+=Pxh5zAkq4CK)exY6 zsLWpvXL&ASjz@B-5PQPxS7dfbR=(-fK@R4MnAyy6J7-TR{Ml5f`9LI>i|}!@GW$P; zS*gf7p#LSGKZ+WPY<`&Su=Ccl?ZLBUpsOJ6Pb!LgV+b+kQxXzk-;hums%4BTv^K|U zG6d-pM6J%o-9Dzd<{pZ*$)H1f;-ymj&^Xvw&3)0neXliduqld-?}7Qqdm*|OkW1_f+N`a?tK2N0-=-H2aQQj((ohc1l^k&SC zqC!drNIgPr50;p82_*j2;1O4;7lcz>xk?fbO2?p?!#~X>yqwU%lrfh^LEJeU67k3| z!^y&ZtX7won)jHWb9oeRtgCuo*5UN^jh|BPig|6!W8TH&6YBwJpq!3On=Hpd^RsPX zSRq+&TODL))Mn#Mw!0LU*K2n>Wd)*x0@JbE3l9TD=AYTMOZK_UHNixst9qKxW^+W! zFuYe1LG~$^uepT1zJz4OM`fEfqfk!A10HWCQBaDbu4w@;(*oaC+)&clRdhXdBaiBk z;n;{f*<=BNBqQE0--+=Gl5aSeY$BOLb4)7sYDBFnR#_oeRU=i)!UWc@6WX$3+{ko< z*_NlDW}qF}i1`Ro>%$!xBhJ?VGQT49Z`-I~$JJM_o(1vr!ANf7)mNV)+HDQA*5}E8 z#lr+3YZSzyi#s! zKE%#6Z)6`ZC%gt!&Idex=z`nY2HV=$U!RC(<$UakuB3S)`$Dqoi6_kYmbm=aVzpGN z7A<|jALVQL7vV)d=`CCZ_QAbJNpx;0+MtjmC9e#YS18&+eej$)_+XLWu+j?rFU^mK z(jN|`(m~dTICM)oD01HlrBfl^)%^I@t+%jE=Etm{r$djWI#W0v3#D0Kx+9H)-DsZ4 zHdO`(w^S-yD-}W;1mnMyZ<1p|KATQ@RiFuCNWq#KL&v7;mM5T)VZlC-C`G~&7z<1Z zj4phGloGsXK_iAhG{M4>Tm@bh8K?)~P*4S;8DZT$J?1k#=2fhxyW9L;&o;ZyzD_1M z>M74E`J5h)(>K0*ysD^-e^oK;Yh~HayGyfi$?di-!H($bHhivPJ}$5Xb^}Mqw(U8 zH~%x<))r^yay`)-ca_q5aZzWR8NChA<+%;hkU0<2WIXK9old=E3PT9%bZSng#!kzw zf}U+oTOyxNtjdPd=`bTVSUJ`fYwnD-v1l@z=t=aZSDn;lV`{8zzh$>D*W%2anxQ%G zqm)B8G{>K}d1f!jxm|tJ`<&Y|p)9$?qDw(D|5M&5m&Gh9!|!4c<5IAU>7jzqvWnLs zCa7phY+^LX@d(^yJyOTyuIA+UHKkcgW|gi1G*cP}7v2e`e) z{t3B&RTg<#0mDG23G^(X(FvE;A~7tooiH#^aiCUmq7G^}g&!>3q3Sih-stn0ryB>9dm-elfv^yLh8jW0!hUG)5)lfMlcT(6~3 z120bE1z-l!9n#Lw)ARf{QNxIux62OKB}*0{M#c4zr3)Cx9d&ECA9I^pOJ?pEMl%^#ziU=SVh1^MB8AKFr1b{^KAfaekv zS?GP4Y<_B?7rkXY@Rn-foUdb5_61liGXPu8PT|c0*BaBA?B5vNlIO=xu zs3*t!rkC5&b86QnXY>`;o<9DURL&iNgB$a>W5bVJb!+dmk?5w0%WNa2R_b#*dCXnP zan{knSjd@-nq%yS_9Ej!MVV;{J#d_^b{=x)v#j=4R&1iwRv0|HN5 zBJNim{Png(((iyV1pb~!?v)=0?C9`7@5VZ^1+XG+$GXY)U>>|dC(zOd0CoWI@)U9- z^&SwKV5@+p=^_le1XiLZWW6`^0|uX{`6NdvR=J>H3J-Ju*B_f_`!e0#nIjU#a+fCn z&o!HQ0P?=i`}7gXrmDcehYk8OEuTG#{j37u8|I;~Fd zwyVT?6AU9wSTYApx@j_a9a=*rWNxy5*8?PiheMdRtrZkyT2>Ol+=g$B@J4{AR;da@ z6iiq-Vj%%iunWK>*)~>eYSvlqJ$zGJjQ=UtW}dBM=?ITy5X-Uezf0xLOR-AC=aB7t z&Qg_V%4tq`6z85jcJA`K0`5yy=D5_E=5v}_tia@51$o~w{qjGdfAhiSx4`ej*wb=M zH*eSd_L$B#`3&QL%dNW)0y;f`faB(yJt;qVzGgf(-|Pql-1g-Xy`oB)UgtftA?$U<$xp_Ts~T*)*XvgJWQ7F!?)A~`}YA)r>|V06<&io!|5q`uhvaw~TbpY`5Dm+{>6Bi_8xHfxqn55C7Q5 zKD%K9Th#QseR4r>exag8$U&tu&7=xq?!KXOB@QMYVGVPjb2v!iI+~^pIImK{obe- z2RpBIHIPgOUQ%xJmXfktx!?kHY4a9zfRh@puqH3p(tL z#3No2wbCrvo@A{t`45aqK*~YFAB6>60xki$=U7_A?fCXHxnLr&q)n*OD;OO@*sa|0 z*N`I*2xF!1sDfDaDPKZqp~ngyt)i5R=+XbebCCe%6t=Y6UPdCHIwxCf|=mS}>@tE*g3_+%Fd)S(7_cub;NeV|aY2pV3$3a2r};wZpQ$crMKS%YDwH+P0< z%EO)an&zdU6vV7|2U98Y<)O7hIF^!y=1btz;pCw)KlAtYwvD#6jmqOj7U<{9bTy4c znBRyF7N>$uY8&L222=M8t=+M9h#PL$6W~DP_n7y4{7`!$@A1ztUn`6*9BsoqAYMs= zz1a=@17z7ER$&Ovri3YAx%LucD^_?Fg&P}&0mw98lK0+T^>|XLD^{;qw(_EII1t#o zV(H4&b8q)RL-^4`xwPPvts54U%L_JaJ>`Ut&0D>4>56mwP#RvcYWa#)mnRdNR=*v3 z$A=4|T4^DwEhv>*&vPsP9q`sHj5@e3LCD77eH^Jn^Z`;91+`u-lglwnb5wz*qb#h# zM983Vwx>Cl#&#DRsi@*8o%Qa0+sD)9bIZ<~opP~I%C*)ZyF>2!?$!Oxmxc#HpWH^kacm9u z8mq>xiGIleoiN#?E*I;0E8xRdVvmM*NLLAnBByvE!V-KG2)fAh0>)BEg;+R&0y6Ky zE(1n%6x1HdA7Q1Tg$l3_6RLrB4NXJ~$bYCTI#q$Z(FRQikEndSdg)hP5^6m0TklcnbrSaxM!WPSN$roQ_D?$K( zBP)1&@I;drNeC!IDxhNa<2_#=Qy|Pbv@_PN8LGDBZOoxL-?(^9jo$U)2t?#c5tv_XmZCj@rx)TbCHS2fIIA;JEhiz>1^zHAwXvemZvHPZvSBKWD zJ7dF&<+W+P({`PE`livDEj{LQ&|^k17l+|*KIw5~`Ab8;MN3m)ucSFJ#U+DO6WuCX z&PK3v_A+%!-SqGcKH!+|MY>2P?uzi9Ox1UT-#>7pBcV6H7cCT`yvG-J+~_<4Ux>Du zi)OU7%_wGjduR3bvM>B5o}xx(R}{_D@t0C_Qm4M;)$=j-Y_yTxG?D)2KWQ(0X?^+A`2<4^CbTtm}F)l zLf}>H@S25y28j%8D@_Z)c~~XQ5R{%{yxdCF>Y)Pk=9N&S4C{I&Qmq(r@0_64d_)Tb zG#E-?;&@l0y?F)Bw^OdUIa!{AWse)^dh<>#@L%q5(zkkv*AoX4P!(0Pd#XWiJZ|^6 z?0y}#ZI}L;+Pp*iSJt|h*7-SFAm}xhXaP2-J;7e19UZ4Pa(?x}i;&pkIZ^q;qUh`Fx1%6x@nci`oNuq)9z(RqX| zreq_b(S9TC!3t4KYG^`%CCFoQQilY~lBF;Pf~ZyGJ;Z7^+rW&2p?|QsnUp~McEn#t zh#MO+n$PfFr1|`w^m^p|URi33Ha{LK6k`08Xd8Tknhnw+@vPUs-tQUp_ziE`{H`y7 zMRW%1O;a9)B)8!C&*hH@AJih`mgTgsO+X+jXhP{(A%r6Z<{VG0SYn?A1elw^?3}z# z?W*O~4lxDhYM^_XxcL0EdXP912rNf|2nyKh5P$_;R!s1nSmrirt#xCc_qojhTC&Za zbo*W_C8BNd`6n(&@y{&iA7X#D8|3i~_&ssPm8 z8buHcQZutR2+xt@S(AcnkxFOceZff`TQ24BPO452{H=37~TtxKrKxur2+X<<q2r}&sOUlPuQrw$X|kvNW61q8m9?v`Mf{E7-#4?sG=WA0c! zJ`Jc91lZ0DH8P+QEhb$Cisi*7JUQ`bcT;>!+TYxRh1OAn-{6a}Nb}{deC0+fX;>GS z3|nn9ANh)~&_?fz*SUPReC@ z$xq7?jHv%J2uT0Rh#5Et4Nc9dfbi|5ZzvSZp!l#45w8wipap7#jV#Jq%#muHzz=1R zbA|UMztb#YLkt}3M`=1Ye-7QskHl9kLZbhWS=0ltPX0)bgpxs)8sr~L4W^H4bLM2_ z2&x@n!DJ|+n?*q;euRGUycSPB7vD2XybEb2Fy!T-DttGmpuG@)-ZE@2+i5WmR`QgF zuzUxaoLZzt8;V2*u`-qY<-2m!=TES2e?~Y z5lwML!it(Q*e{|v&EtkC)D=r*YA>0O2>di1fIMRU*+Pr(7$Wq@FUr)i=GV~qLU+Ke z>_&o(;Rfc3(fpPz=zJ`igVi@xhHBU4a{B`LsQIuScc{^jVmF2|Y!ofbd;A2E{_6y; z6p@ARpT@YYfQ=z7)gd1&!?@vV<3p2=0Qr>T^BdO7V({>)xD4zMv8*OkcvvV$j4I|V zmKvd%H8a5i62Tx!t1<2!*`7|13=UnmJ(bC%w$JF8-`P2T#e&Yx1?I(ic-7KnC!aRq z)zp-B!Y$*|3&j9`@P~RhXdnu_ON)f^L0gc0sMQ{)i-!hhu)WknN5_H{^E(fJE95)n zQ-dRRJ!eZMy>cqq)i!_eJT36<5G^STo+Y{x5#XEbfv?N&kyWw2a)4Hw1L<(m!uLX7 z5Gi4)DR}W3m^#_w(1{b*NH;Gm-jGMjY8eI4VX7DcT4D|m0sPldflIW9O>uNqpC>l0 z=F3M_EoDS=EKqdsSTiwL8LF&V_r3LNsx@0>U}EhVEA6vqtLv@^^2;vc!7J9OvuE4a zBX{YgEOZ6?osn)2=b&8gn>E@t&2Eq7vw>XHNU=3?ZRq56Pp^kSz$=xL*M4vPT4=tP z@XIgfA#^fp7P<`a%lEO+mFv{;adq95cyAT&{fayxE8yt}6LpF2Ep!Xv2<8J3v$BjY zOO9W{X9_|bOnXy>l|Vg5raocqgum%zn%3t|rpXUg&IQxZ=?BfQb!IP`1@_}pD5IFm zY@3djw(|a|e%)g%qZd01Sw;e5FFARLz zi29(K`=Aj48js+NYy|6RTfE@q!gnMi-kNL)5|EnEo&a8j&QU%}uLy)gpfgi%id8jJ z>3`IYt-q64HW3-FJ;bsjdcN)f^Fq<=sT3P~vzq+bY^3?T;QHDkS!}z24%o{SC-j)E z!{oKkIxC&nuncw?IJsA7}ZJFTLRw5Z}_QDp|s(EW55#qsAkbQ8U ztXzJem76T=W`U%*jPGOdIUD(pp>bIR{lo@nD5OAzCKh-YF1T&-&x0lbQky~w7EDzX z;f5q4Tbj;!6bb^O0dbqpVe>?rl*TK7k1n8vpO7| zl@2HWM#uDNovhDQ87Y^C2VC5IPVblpd+q$rM;x6)osMF^TrH{Q6|UNhk`24pFvI6F zh=tJb=hF4_vCuQ9>*hA=%zw<|L3?@LszrlJEE5me`HYpLGE1giy)$~9@tED#d%~&( zT{4ehgMx@-#)-o=#!_j|z-YJJyf>BfMGadliXO4661v41i`sD3Fl;RuZ365C&F2VV zu_+l%5H;bzi8XSvFnc!-k@1^PCquMZpEXOCGLhy(;cPa{XGStJnosaW&FiRN;74@6 zMAjiYh2S+eCh#MTxy7JiOs%0T6Mdj1!K4p>6Fp3qq!GiiBN-|IqME%jm)gm7Z~5Hz z_PHJT{{A`r{kgGod&h};7`xxsZ783g9gTz{vwO}P8(4ornU~tWaImA3wJ%)Hx3=0X zpVvN@8qVo|xwmu1$tx$;%zi+ZHQVQBuRVEU%~)se+_t$Jc5W?y;XwP&;h_z4p;)xu zVJ&c-ff?UNK3NP9g(rn`QyHqnnOu>{I7K$tpw3YW=pnKn0K0YC|Eem zmf1oITjsLE_L^2=F}r+^%=kTyk|wiz`At|E1apARo%6{2fE}4n%CaYm%=tHe@Ix1V z>0ajPa^8)lhxaJ)1o$0GzP*v(h20h70;es6WljoMbA-4Y5bDCQt1N+_1;YZ|W?dv} z<|H=*oc7iiKb9psc+L}ayMvyGxQ3aoH~*xELSM+D0L86K*!qb|VXZ)oX6|h+@`DUs zop6GR1l_A*`52Bbh>SZJ3An8S^RFT!imeg?OOj8U@>>2mKztUkIi2>)2pl78f&v$y zdMpJ1n?@LDLhNUS3@v+}%8;tl%G3xbIIRI8Ft%LE!31RZH-u_pFBal5zq@(Be-P3E z*!uu8zHX)b-2Zjxwtdk6_n&|@UCd#7+JSXctG){7JjJQ2vMP&$llf=;p61mgrr6-W zJK^!0cj+GUFCO^dK_TPypF}n!E4S9;uR@?d&&px>)3;Ubk2>Ys>~?wL8ksYffmIZ@ zsc=SwU_OaE4+@&z2@BhD+Wi)IV2YlT9e}}0gv{|kiG5&%CtapV%_w-@kc>$HEGb<5 zDp&}E@hi8C32&J4^2xb=&U$jqg}HvYC&!hx_R{>Wd2OZQ*r@Ds*!briUZw{lC!EkZJ37X~(Zw$@hXL1O%y4S%v!to4bJ3MEMF?fWu3!4J`}0K^=Xuq zv4cukUe{cLEiADo<(I`N-+V7Sxwe>N_nNH?pM}e(GrlA)E1Th?xP&g8jza#L=58)L z+HR!zUVedjJKKy)@^tALtbNs zpI<*+_s7iFrpFA~yp<#+{x0*unDMedcF6mGy07%Kd9LXExaKYVx8J*ZwHJHTws0iv z6=#iK1$Ndsc-lffMeEiE;i8IXdHbE?A|bU7A-C!b5uV4>*y_)wmIh8P8F4 z=)i$+=R_wC{`B;&=I_yHdKWivnjP{r|LBAL-^X>FUWoahrL~HP#t*WatTu$N;MxPg zer}3qNdSsyUlu_38@ZPN9<$gA*sXLbZ2-*VgY-Cu;rtRa{?cf$&X-*4XXi&$aY{*1i@i$)BPKMTQ{YpzZZ3Mr{OJpSISh0*#labZ%YP z*pw)prEH6UQ<$Xwb+Tp<>wp5)x{Ths7<=qISa>r-Glw$6y-QD7+S|Ld_pXiS!hW2o zj#bms`>e9QyH5Kj>)my38V%7p(?^}1vb68-OTLS~a6{Y}cN2HL>+eeF^I79^Ie#8s zlX#(VNc8Km-v{=euII$A5P`N|UXJuT`QR)#J9+Tjzhru0LesVUNO< z{o&Z^9o1BK7qF!DH880)E%>&UcZ2Xk#iSUVNcMhrUXgpttH4nrJ`8cn`v)~D@;rFmX_|qMiVS!^W z9hdtO^A~!eW+d7}drI|0*{>-zT8Ntw;R^Qac!AIY0hjz;eu==hJs5?8#xaQ^Ibq~1 ztI$+quRv_kL6+|0Hd|n;owG?bJe%EUon6)SRW>j&WbUa<3=U3IoSmfnT1^qZM4or< zznn8qZk?u8*X>+W<8pP)4xHLM7p_{^DI$6t$TcndOc1usF|uh9clURTmee=f4n@^oKJUs2x%|D+^ zoO9}mrG5SVeM?t-Wiqi&^}&VCu6VpLp9@aHn#<8XJzR!ZyGZ7Gq$3n}8eW@!6kEem z5twFQsx7W`=jHryU5k6nJ+5nU57U5WU&sw}w$rINj4s2e!l@@1F3J+%=h)5S~kLJ8B!{uO3%fv}&GoTy4>eJ={iqN+Pmk&u78AbO9rt1`F4A zVPmlNB?X-oL}Zevz~CUr3rGWj6Sys*V}yqz*?B;H-&mXzT=DV63N6P&kgM2y0akVS zV74c1Htr>c#uRMLy=EiblO--_9~EZp3YH*K%F42=Vz;uW(zLB+hbC@f`<`9BnyucL z>0aHchPtb}GaIq%vf$ZRml4~j*moV9-(^>hyFPwIBJPDrY~RF0a~~F(;Lp=|m`AL=8EcxZ?y)sT1U9)n~Cv>6q)NHU<{@zo=G#$3w}-RrAlxt+u}P zA--Suhl~oIOJGlecH*e;$x6_uPmy}ScLI)0*ezBFVN$={8(M4s$SWDIkJrUd2fX!*G&kaLl72s5q51doMk(IJla}Hf zPu<+_4d87hinD(0h)6KRCUX1sPtLW!wdAPImLz!0lp&yx;P)$(a?7v`)yFZ~VOl1L zse$b!BiK6x^URV2*+b8hLYSi5Bh8O8@T;eSp=7U_5{l)~QF} z>)Qzlra)_rNe6`#&2lWBCA|Vkfp`rNSr{uoGx4h&^0PDd-;yXR?C|w7b8-9a`{nH6 zKgzn}mi;sHvF5H1Cp-Ae{h!@GmW!#k-4buNf!n`+j6E^7Uu25O+os0vIet)l+a7qi zyx*e!Z~JvgJP5(Z3z`i$D3A%1OkZWJvL?o=LW{`p3E;RlKs8ZPEuaz<$asDL4l2MP zN_Y-$3JC)hH82*WhbtF^3eLi1aFCI2IQ%?eAi0fVzurvie!tFtuKSzsvDpn*G1#6~ z^hady;vTo#6Kf0RT+t4%;&(-Z*#9IGkAC(No7cr0q2R#$YKPa=7bJJDkWaOH9fl|7 zRBf`{uEgS{?ugfIci2MwAl%0K1=f2C_(-Gsv1=*b$YrP8xh-YzvulQrHfmGsPYZeR;W$Lj0f_~Y<(^B;8CmfCQ*^Z;$Y z7+@~0ELN1ooaiV5e&6Na;D1M}-L269jwgpS*$Ap3GFQ;J$V5RQNF5!8dLReiMd)zF z2((59)R1Tce#E50pYkO%+4Z90$m`nz;a|B~F3g)AA2iZ0yA7Xvb@Lm4bT4Ihdkh~+ zAegx!R#{hl%;%ORBbo7<&zSpN4(4+?>aJo4yK497egT^mzW6%&rMe=%9?b#aoF}FLO$osalD1k9b|IJ(`vAQK zc^^=W*+kL`?e2|Od2>ebO@t%f)PfzQ&YIWI3td4Y8(A358o{oDZg^{*#ZD(S8g=Yk zSLzubxU+w}yS#p9(EJ(s&5n}4?JGOCj*N|sY~6X`j~KZ_GLe`DUj z_OSIq{W4z^kr6qXnlI{6t>(i|MZI$HL)bUi0Y@U2f1sT9CxWg}*spt4w+}o_Y*K$b z$>VgxzP3qv-#?}jEG#5}mU;-Rz)-1Lhf0kEL>hAJ696e2gGO6!z$vL#Ph%@&;4d0o zf^bE2Am#%GU+nuxi~H$ofvQ_HhO%$NS=)JaQ<7I?s*~Gk_E7 z3XmQK4nJRmrF6BK7;dpN8u}U_K_V1|ze~u`S#x=Iq~y5Lm&@fm1j-DjjRp?>QWqPvNp3JdvYn~II z(uEatiy?QO1x*F5fi0D>cS^ZFhI;`ju$d=D0kQB=#}1zuhXH^dsd$d^8eJ@+*;Mc! zzy!p9VAVm05HAfMHhiJ|KET>Qd-3*6uJ~OvuxC4EtW&|x7@Q1XDz_{6^%3L5Rrn1P z%?*1cm$zXae7hL>)dP%a?2^QhdaRY{xmACAlJ3 zB6sQKt}HT6TmwN;pa~Ke{m_0$J{3iapeS6lNs9gf`Opt(ktR;jA}Ek=Y0)+)ngDId z^!Ij`w(MNxvHN!R&HZNP&6_uG5EYhH5e&Esm)Grf^R>_1e9+e%4z##AKa3&6&^LG+ z5%rIQ2e?ISs`B#AD^u9J34TbbefHz-u(!kluMfv+Be7v<&A%TTu6azY$?wwDxN`@l z0Kiy({%z3RNvyn0VqF#eYI`>%VqobY7e0iu)FAomccFC6c8%^6vs;p#qYH&2i3ZKd zE>_*~Xijo}cAB+kUOLme+PL<;e3U=Mbv*IR@s8COq$peSE|*vM zO@-_`i?c^=o)0*ldWtokzIi6#JSrVXIa<Ga}rdp0>((f2w1 zt-+?2mZl&MuxN~U{T{9@+Qfyr;urdQ`fo@4&GFXpBa26#TwT5)!a9CTys^CcBpkR` zR-ao-KEE=63!*Wl5q<_&-EIL;wXGdI- zfwuMoyU#oP`}-}m^}#uhbF3RDIYyG*(L+f`V_&#)_wLScug7tEFp>y$c4KD}`|0qh z6T2Pm?&)~K+srvSzt!d7+S(U=iLn4AJA>oB`;YDKogU^JL&34c;8f7(Wqi0}{OEW` zm~ZtZ;*)XWkFB!Tu%DRL%V{+i{n`CmAUjsdO`#dt_QA}940F;lA(lvZXZ6#2%iMFL zZgY{_Uh8JR_x1RGrIGE;mwa*GyI>kV`Py~y*L{Q@>G8ejWBzx2J?8SWRX5kUpP2R= z_kdO@c1&x)A!1W0hh70m=?1d{Q(CAp)CK;iDJWh$p`>P#w)xtszM(-dJqH>0+jx%$ zeGHw$Rr@GL^Dsp5bnNi1+FzpmJlDB;er+%j`_$?3MV$X? z+k0@KI~s9xgjrkLsIa>^?il`0>sV8ZEBKMq>5n)+f-Qw@9OC*H65M;_v$GzF2^=1b^_c4)u(V_EX_}B`2c3F(2--l_*}+%n^tA!>f@;1K?14~44_PZmsEWw#CUa38Q?2jEE?b^@NaVHe;f8}?!@bH;`# z#OtUh=77Z?NHSiwVTM}#r44h?as7=A^Kk!z4Lbn;-G-eFIO*1gU4UaY>}|Nfk~ZvX z7-TOjYLci+nRu!km(!}Ut}6O^Mv#Riu^{KmXQix>7quNOJHQK)R+3dEo*bXt;kqm- zl2#A0w3VIG_4W9=rWWE$2wTeM)p$`;H>9*ap40W>+{6UMN$%rmwEz;-pzbb$v6OHK zU>qBj%ecy5HB}sPxo%!{+%pgY%J?qEY@3x?g+0x#vuD_|>_$US7gKpDFUcucRI^ebofGACN!b*OvZ%O= zs;uZnu{9^9WF>pm*fd00Qvu1Yw4s$$Eo9^GeC4(6TGg2@EG+h#KEx@TsQYf{;x}l_Xv?E_e6SEJAN+vI9 z9w{U1$H`+*+SVl{Ba|dvN2;5*L`^om*$$q(B(4hzf^U)wMOD)UYHLC|Q}Af2s+(^d zMWdASl*BDbD3z78*G`9;+GwU{AthJrG?lz5u_UJj8682hnAsAQv~)M_CNYx{6zN($ z1H00yhPEygL~XMqXmU2E3n^9C)k26cw`5H>#C#pwm8QV*0eY3r$@z?c`2F-$5(^SN z_{wr#l(UAYY|HLa4(K_QoMlN@4Ohi102lepO1=W3**1HgDVG&o5JW6fcGeLjQVLo`eabmeb%Q{N(A`KU z=*DnM8d6vQ$yoVErqD%H5VvenYSE@tBp{FKqyhpN$qE_=Lez`^@cOXh)=)ZB$zFtCro?N8+pb8b zNpIe=VYWBCXk0g}=$#pARUlo{YXDigmo)y!BP(v3_FNVLc@V5sgw3L0)lJGw+0?Ad IdTeO;A4L$100000 literal 0 HcmV?d00001 diff --git a/packages/farris-admin/src/app.vue b/packages/farris-admin/src/app.vue index a97bf49e056..0a83987ab25 100644 --- a/packages/farris-admin/src/app.vue +++ b/packages/farris-admin/src/app.vue @@ -2,18 +2,18 @@ import { defineComponent } from "vue"; - - diff --git a/packages/farris-admin/package.json b/packages/farris-admin/package.json deleted file mode 100644 index 9e08aea3777..00000000000 --- a/packages/farris-admin/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "@farris/designer", - "version": "0.0.1", - "type": "module", - "scripts": { - "dev": "vite --config ./vite.config.dev.ts", - "build": "vue-tsc --noEmit && vite build --config ./vite.config.dev.ts", - "preview": "vite preview --config ./vite.config.dev.ts", - "build:system": "farris-cli build -c ./vite.config.build.ts" - }, - "dependencies": { - "@farris/ui-vue": "workspace:^", - "@monaco-editor/loader": "^1.4.0", - "monaco-editor": "^0.52.2", - "vue": "^3.2.37" - }, - "devDependencies": { - "@babel/parser": "^7.19.0", - "@babel/preset-env": "^7.19.0", - "@babel/preset-typescript": "^7.18.0", - "@babel/traverse": "^7.19.0", - "@commitlint/cli": "^19.3.0", - "@commitlint/config-conventional": "^19.2.0", - "@farris/cli": "workspace:^", - "@farris/designer-dragula": "0.0.5", - "@testing-library/vue": "^7.0.0", - "@types/jest": "^26.0.24", - "@types/jsonp": "^0.2.3", - "@types/lodash.debounce": "^4.0.7", - "@typescript-eslint/eslint-plugin": "^7.15.0", - "@typescript-eslint/parser": "^7.15.0", - "@vitejs/plugin-vue": "^4.2.3", - "@vitejs/plugin-vue-jsx": "^3.0.1", - "@vue/babel-plugin-jsx": "^1.1.1", - "@vue/compiler-sfc": "^3.2.0", - "@vue/test-utils": "^2.0.0", - "@vuedx/typecheck": "^0.7.5", - "@vuedx/typescript-plugin-vue": "^0.7.5", - "babel-jest": "^29.0.3", - "chalk": "^5.0.0", - "commander": "^9.4.0", - "conventional-changelog-cli": "^2.2.2", - "happy-dom": "^8.9.0", - "inquirer": "^9.1.1", - "jest": "^29.0.0", - "ora": "^6.1.2", - "patch-vue-directive-ssr": "^0.0.1", - "sass": "^1.32.2", - "shelljs": "^0.8.4", - "typescript": "^4.6.4", - "vite": "^4.4.1", - "vite-plugin-dts": "^2.1.0", - "vite-plugin-md": "^0.20.0", - "vite-svg-loader": "^4.0.0", - "vitepress": "1.0.0-alpha.8", - "vitepress-theme-demoblock": "1.4.2", - "vue-tsc": "^1.2.0" - } -} \ No newline at end of file diff --git a/packages/farris-admin/src/app-providers.ts b/packages/farris-admin/src/app-providers.ts deleted file mode 100644 index 3f7e84eae2b..00000000000 --- a/packages/farris-admin/src/app-providers.ts +++ /dev/null @@ -1,9 +0,0 @@ - -import { App } from "vue"; - - -export default { - install(app: App): void { - - } -}; diff --git a/packages/farris-admin/src/app.vue b/packages/farris-admin/src/app.vue deleted file mode 100644 index a97bf49e056..00000000000 --- a/packages/farris-admin/src/app.vue +++ /dev/null @@ -1,28 +0,0 @@ -import { defineComponent } from "vue"; - - - - diff --git a/packages/farris-admin/src/assets/vue.svg b/packages/farris-admin/src/assets/vue.svg deleted file mode 100644 index 770e9d333ee..00000000000 --- a/packages/farris-admin/src/assets/vue.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/farris-admin/src/components/data.json b/packages/farris-admin/src/components/data.json deleted file mode 100644 index 7559aeb9535..00000000000 --- a/packages/farris-admin/src/components/data.json +++ /dev/null @@ -1,4160 +0,0 @@ -[ - { - "id": "SYSPUB", - "code": "SysPub", - "name": "系统公共", - "parentId": "0", - "layer": "1", - "menuType": "", - "funcType": "1", - "menuPath": "", - "icon": "/platform/runtime/sys/web/assets/custom/icon/SystemFoundation.svg", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "BPMS", - "code": "Bpms", - "name": "流程平台", - "parentId": "0", - "layer": "1", - "menuType": "", - "funcType": "1", - "menuPath": "", - "icon": "/platform/runtime/sys/web/assets/custom/icon/wf.svg", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "HIP", - "code": "HIP", - "name": "集成平台", - "parentId": "0", - "layer": "1", - "menuType": "", - "funcType": "1", - "menuPath": "", - "icon": "/platform/runtime/sys/web/assets/custom/icon/hip.svg", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "7b66058e-6d3f-1715-829d-9c60a2303f76", - "code": "Epp", - "name": "企业门户", - "parentId": "0", - "layer": "1", - "menuType": "", - "funcType": "1", - "menuPath": "", - "icon": "/platform/runtime/sys/web/assets/custom/icon/portal.svg", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "8074d6d3-82d8-f07b-62ab-62a8ae2e480e", - "code": "Cms", - "name": "内容管理", - "parentId": "0", - "layer": "1", - "menuType": "", - "funcType": "1", - "menuPath": "", - "icon": "/platform/runtime/sys/web/assets/custom/icon/cms.svg", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "BP", - "code": "BP09", - "name": "业务公共", - "parentId": "0", - "layer": "1", - "menuType": "", - "funcType": "1", - "menuPath": "", - "icon": "/platform/runtime/sys/web/assets/custom/icon/businessplatform.svg", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "d58be53e-516a-18ec-701e-2de3740b55d0", - "code": "zzGJYY", - "name": "zz关键应用", - "parentId": "0", - "layer": "1", - "menuType": "", - "funcType": "1", - "menuPath": "", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "SYS", - "code": "SYS", - "name": "系统管理", - "parentId": "SYSPUB", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/系统公共", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "5aa45ea7-b54c-8b16-5b77-b6dd81d6e687", - "code": "Msg", - "name": "消息中心", - "parentId": "SYSPUB", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/系统公共", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", - "code": "CommonService", - "name": "系统配置", - "parentId": "SYSPUB", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/系统公共", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f409de99-be80-2526-7ad1-61627fa27441", - "code": "OperationMonitoring", - "name": "运行监控", - "parentId": "SYSPUB", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/系统公共", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF", - "code": "WF", - "name": "工作流平台", - "parentId": "BPMS", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/流程平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "BifPlatform", - "code": "aif", - "name": "业务流平台", - "parentId": "BPMS", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/流程平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "Task", - "code": "Task", - "name": "任务中心", - "parentId": "BPMS", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/流程平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", - "code": "EBS", - "name": "事件总线", - "parentId": "HIP", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/集成平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "DIP", - "code": "DIP", - "name": "数据集成", - "parentId": "HIP", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/集成平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "code": "CSB", - "name": "应用集成", - "parentId": "HIP", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/集成平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "ServiceGateway", - "code": "ServiceGateway", - "name": "服务网关", - "parentId": "HIP", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/集成平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "74ef3760-8805-f3ad-7036-6d85653d0b34", - "code": "Portal", - "name": "门户平台", - "parentId": "7b66058e-6d3f-1715-829d-9c60a2303f76", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/企业门户", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", - "code": "Cmsp", - "name": "内容管理平台", - "parentId": "8074d6d3-82d8-f07b-62ab-62a8ae2e480e", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/内容管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "9308d1c8-c442-ed7e-b772-19067d127a05", - "code": "KB", - "name": "知识库", - "parentId": "8074d6d3-82d8-f07b-62ab-62a8ae2e480e", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/内容管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "PROPlatform", - "code": "Bcc", - "name": "业务配置", - "parentId": "BP", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/业务公共", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a2e65dd5-dfba-1c3a-9440-6d0bbcea938b", - "code": "NoCode", - "name": "零代码", - "parentId": "BP", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/业务公共", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "4ad1063c-e46e-daec-ed7b-3ffd35c44dc1", - "code": "zzModule", - "name": "zz模块", - "parentId": "d58be53e-516a-18ec-701e-2de3740b55d0", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/zz关键应用", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "sys01", - "code": "sys01", - "name": "用户管理", - "parentId": "SYS", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统管理", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "sys02", - "code": "sys02", - "name": "权限管理", - "parentId": "SYS", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统管理", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "580e0327-5667-96c2-6e23-de0a37b50d3e", - "code": "commoninfo", - "name": "公共信息", - "parentId": "SYS", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e4b31d29-6a11-530d-e7e2-12cc8dc4740a", - "code": "permissionquery", - "name": "权限查询", - "parentId": "SYS", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", - "code": "MessageManager", - "name": "消息管理", - "parentId": "5aa45ea7-b54c-8b16-5b77-b6dd81d6e687", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/消息中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "9a84a695-ba31-2de0-cfc9-b932f9ef15eb", - "code": "MessagePlatform", - "name": "消息平台", - "parentId": "5aa45ea7-b54c-8b16-5b77-b6dd81d6e687", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/消息中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f52fb3be-01f7-443e-b2df-e1b5c5fab3ab", - "code": "document-configuration", - "name": "文档配置", - "parentId": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b9e2b42b-15ad-538a-0ba5-64ac82f0d044", - "code": "Print Setting", - "name": "打印配置", - "parentId": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "37d2b123-ba68-e144-6b33-0226cad5047e", - "code": "Early Warning Platform", - "name": "预警平台", - "parentId": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a7562755-da33-836e-1375-2ac3d820e351", - "code": "Job Scheduler", - "name": "调度任务", - "parentId": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "66a4d7ce-008f-d7f9-40db-c2080ce4d14c", - "code": "RuleBase", - "name": "规则库", - "parentId": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "05dff722-aa93-4fb6-92dd-6afad7ea8d1c", - "code": "DistributedTransaction", - "name": "分布式事务", - "parentId": "f409de99-be80-2526-7ad1-61627fa27441", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/运行监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "d250437f-f452-43d2-aca6-ee828877dec0", - "code": "TraceDebug", - "name": "跟踪调试", - "parentId": "f409de99-be80-2526-7ad1-61627fa27441", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/运行监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "Security Monitor", - "code": "Security Monitor", - "name": "安全监控", - "parentId": "f409de99-be80-2526-7ad1-61627fa27441", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/运行监控", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "102c8de7-875f-ba4b-fd29-75b02a1d1f87", - "code": "ChgdrMonitor", - "name": "业务变更日志", - "parentId": "f409de99-be80-2526-7ad1-61627fa27441", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/运行监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "3a45c311-8f12-58a3-fbf5-c19032798bce", - "code": "BusinessLock", - "name": "业务锁", - "parentId": "f409de99-be80-2526-7ad1-61627fa27441", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/运行监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2b84c32c-302a-ef4d-7525-27e22b6de2fd", - "code": "SysLog", - "name": "系统日志", - "parentId": "f409de99-be80-2526-7ad1-61627fa27441", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/运行监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF02", - "code": "WF02", - "name": "流程建模", - "parentId": "WF", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/工作流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "971ab3c6-2d7d-c19d-67d6-52011e851731", - "code": "WF03", - "name": "流程监控", - "parentId": "WF", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/工作流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF09", - "code": "WF09", - "name": "流程基础数据", - "parentId": "WF", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/工作流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "bc7701d5-eb92-4b2b-46e3-ff671d08826b", - "code": "settingManager", - "name": "配置管理", - "parentId": "WF", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/工作流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF04", - "code": "WF04", - "name": "流程统计分析", - "parentId": "WF", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/工作流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "BifModel", - "code": "BifModel", - "name": "单据流建模", - "parentId": "BifPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/业务流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", - "code": "BifSettings", - "name": "单据流设置", - "parentId": "BifPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/业务流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "BifMonitor", - "code": "BifMonitor", - "name": "单据流监控", - "parentId": "BifPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/业务流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "69b65583-6b2f-0a84-fb5e-76f851f41e91", - "code": "BpmModeling", - "name": "业务流建模", - "parentId": "BifPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/业务流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "6c0290dd-0660-17fc-d63b-7cce4db447f3", - "code": "BpmMonitor", - "name": "业务流监控", - "parentId": "BifPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/业务流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "6d015a0f-3454-3ec4-6858-a523d437b572", - "code": "BpmBasicData", - "name": "业务流基础数据", - "parentId": "BifPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/业务流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF01", - "code": "WF01", - "name": "任务管理", - "parentId": "Task", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/任务中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "TASK02", - "code": "TASK02", - "name": "任务配置", - "parentId": "Task", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/任务中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "ebsEventCenter", - "code": "ebsEventCenter", - "name": "事件中心", - "parentId": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/事件总线", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "0BDFF9DA-7D81-4589-8428-C79C30E58825", - "code": "ebConfigCenter", - "name": "配置中心", - "parentId": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/事件总线", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "AA771CAB-5C40-4DF0-81FF-ABC8B4093071", - "code": "exceptionHandler", - "name": "事件异常处理", - "parentId": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/事件总线", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "CBAB3CA5-0915-4E3B-88EE-430F270B807D", - "code": "eventMonitor", - "name": "事件监控", - "parentId": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/事件总线", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "bbe35771-dc07-f7d4-bae1-7284ce4bbad7", - "code": "mqService", - "name": "消息服务", - "parentId": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/事件总线", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "dip-vm", - "code": "dip-transformation", - "name": "数据转换", - "parentId": "DIP", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/数据集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "dip-rri", - "code": "dip-rri", - "name": "实时同步管理", - "parentId": "DIP", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/数据集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "rri-data-processing", - "code": "rri-data-processing", - "name": "数据异常处理", - "parentId": "DIP", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/数据集成", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "rri-sync-config", - "code": "rri-sync-config", - "name": "实时同步配置", - "parentId": "DIP", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/数据集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "rri-data-monitor", - "code": "rri-data-monitor", - "name": "实时同步监控", - "parentId": "DIP", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/数据集成", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "217401ed-28a4-6f48-b942-3fe38fed324b", - "code": "connectionmgr", - "name": "外部系统管理", - "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/应用集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e9fbf898-8e66-45de-2ddb-9639f3462721", - "code": "ExternalService", - "name": "外部服务接入", - "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/应用集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a9523b42-9d38-0b0a-fca6-3a4c178ab78a", - "code": "ServiceMonitor", - "name": "外部服务监控", - "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/应用集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "18d3b84b-eded-6f11-9b91-891b47711443", - "code": "interface-service", - "name": "集成服务注册", - "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/应用集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "1d514b9f-a219-af94-5cba-2a92e451e0c5", - "code": "open-integrated-services", - "name": "集成服务开放", - "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/应用集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "3ec2997c-392b-7027-99b7-745a5eca92ad", - "code": "service-orchestrate", - "name": "集成服务编排", - "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/应用集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "fee2ac33-b201-1ed1-2314-bd1a9befa071", - "code": "basic-configuration", - "name": "基础配置", - "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/应用集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2ddaf385-2387-5375-9655-1fe92c1099d0", - "code": "integration-configuration", - "name": "应用集成管理", - "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/应用集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2ee77eca-2efb-1e2d-a2bb-beed6b7654d7", - "code": "OpenApiManager", - "name": "开放API管理", - "parentId": "ServiceGateway", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/服务网关", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "52173d8c-9c3e-65f5-e493-98e20593719b", - "code": "Service-Authorization", - "name": "API授权管理", - "parentId": "ServiceGateway", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/服务网关", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "596c066a-cd99-3bb1-4a17-fea7ca9d794b", - "code": "MicroServiceManagement", - "name": "微服务API管理", - "parentId": "ServiceGateway", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/服务网关", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", - "code": "portal-configuration", - "name": "门户配置", - "parentId": "74ef3760-8805-f3ad-7036-6d85653d0b34", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/企业门户/门户平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b1138ab9-7cd0-7632-e2e3-68c181d0a873", - "code": "cms-application", - "name": "应用", - "parentId": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/内容管理/内容管理平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "8472044f-2a80-089f-0221-33c4d52de518", - "code": "cms-schema", - "name": "模型", - "parentId": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/内容管理/内容管理平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "23f4461c-ad39-97a3-d6ff-41dff858fa50", - "code": "cms-content", - "name": "内容", - "parentId": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/内容管理/内容管理平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "70871143-8fff-3b39-c3d1-52353866bda1", - "code": "cms-setting", - "name": "配置", - "parentId": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/内容管理/内容管理平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "74802909-385a-10b8-fc84-9c0bce98610f", - "code": "cms-statistics", - "name": "统计", - "parentId": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/内容管理/内容管理平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "5424ab74-1be1-9318-9740-cda0a5cdbb98", - "code": "cms-kb-manager", - "name": "知识管理", - "parentId": "9308d1c8-c442-ed7e-b772-19067d127a05", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/内容管理/知识库", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "fc687ac8-6ae0-d113-6632-104df807227a", - "code": "cms-kb-setting", - "name": "配置", - "parentId": "9308d1c8-c442-ed7e-b772-19067d127a05", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/内容管理/知识库", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e8b71ba6-3820-298d-e11d-fb62ef669e13", - "code": "cmd-kb-board", - "name": "看板", - "parentId": "9308d1c8-c442-ed7e-b772-19067d127a05", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/内容管理/知识库", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "aedda4f4-fed6-bea7-12a1-1257541d7d37", - "code": "data transfer", - "name": "预置数据导出", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "UBCC0001", - "code": "BCP_BIZCONF", - "name": "业务配置", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "Epp-pagelayout", - "code": "Dashboard", - "name": "工作中心", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "22821215-9dbe-7673-a4ec-b2f93f096b35", - "code": "BCP_QRYCONF", - "name": "查询定制", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "Function Design", - "code": "Function Design", - "name": "菜单定义", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": "0", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "Authorization Design", - "code": "Authorization Design", - "name": "权限定义", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": "0", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "03851cc7-9c34-a213-d7fa-3c831d596406", - "code": "Chgdr", - "name": "业务变更日志", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "dip-dataie", - "code": "dip-dataie", - "name": "导入导出", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "cf81a0c7-8019-74e2-0a81-cca95a26f72a", - "code": "Syssetting", - "name": "系统设置", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a274453d-2465-5377-27da-c4c47883cc6b", - "code": "epp schedule", - "name": "我的日程", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": null, - "pinyin": "wodericheng", - "simpinyin": "wdrc", - "child": null - }, - { - "id": "3680fe22-2b9c-ee80-4826-044ca843497b", - "code": "quick-sight", - "name": "轻分析", - "parentId": "a2e65dd5-dfba-1c3a-9440-6d0bbcea938b", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/零代码", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "code": "zzMenuGroup", - "name": "zz菜单分组", - "parentId": "4ad1063c-e46e-daec-ed7b-3ffd35c44dc1", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/zz关键应用/zz模块", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "sys-organization", - "code": "sys-organization", - "name": "系统组织", - "parentId": "sys01", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/用户管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "user-group", - "code": "user-group", - "name": "用户分组", - "parentId": "sys01", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/用户管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "user-manager", - "code": "user-manager", - "name": "用户", - "parentId": "sys01", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/用户管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "role-group", - "code": "role-group", - "name": "功能组分组", - "parentId": "sys02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/权限管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "role-manager", - "code": "role-manager", - "name": "功能组", - "parentId": "sys02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/权限管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "position-group", - "code": "position-group", - "name": "岗位分组", - "parentId": "sys02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/权限管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "position-manager", - "code": "position-manager", - "name": "岗位", - "parentId": "sys02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/权限管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "124829f1-ca20-2b49-d154-dfaa171e1d30", - "code": "ReverseAssignOp", - "name": "功能权限反向授权", - "parentId": "sys02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/权限管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "17abdaf6-9205-c4ea-800c-b6fec92eae50", - "code": "languagemanager", - "name": "语种管理", - "parentId": "580e0327-5667-96c2-6e23-de0a37b50d3e", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/公共信息", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "1580173b-5823-5f19-42d0-6e5bd1c0a294", - "code": "timezonemanager", - "name": "时区管理", - "parentId": "580e0327-5667-96c2-6e23-de0a37b50d3e", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/公共信息", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "324178e7-e223-4d77-063c-49af964576ae", - "code": "dataformatmanager", - "name": "数据格式管理", - "parentId": "580e0327-5667-96c2-6e23-de0a37b50d3e", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/公共信息", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "abf2e600-4c11-c716-5d44-0a9387749971", - "code": "BizOrgAuthorityQuery", - "name": "业务组织权限查询", - "parentId": "e4b31d29-6a11-530d-e7e2-12cc8dc4740a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/权限查询", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b51c2198-4ff4-13b5-66d2-2b3f283edccb", - "code": "MyMessage", - "name": "我的消息", - "parentId": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "0ea02fe8-6294-7fd3-7cbf-1e5f5c287ad7", - "code": "MessageClassification", - "name": "消息分组", - "parentId": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "ddc58440-4389-d879-3267-44f1ed1fbf52", - "code": "MessageAccountRegister", - "name": "服务号注册", - "parentId": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "270e1ad6-2f4e-9f9d-5442-b52c16eb30b4", - "code": "MessageDataSource", - "name": "数据源注册", - "parentId": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "91ad94ec-f195-cdcf-f31e-0ea3efba141f", - "code": "MessageAnnounce", - "name": "公告维护", - "parentId": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "da5c64b7-d03f-fbb8-476f-58dc4c21cd1d", - "code": "MessageChannel", - "name": "消息渠道注册", - "parentId": "9a84a695-ba31-2de0-cfc9-b932f9ef15eb", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "7daad5b8-4415-1222-ab69-1fa60f5aeb0d", - "code": "MessageChannelConfiguration", - "name": "消息渠道配置", - "parentId": "9a84a695-ba31-2de0-cfc9-b932f9ef15eb", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "30758034-f2c0-e21d-9866-dec3659ef7e2", - "code": "MessageTemplate", - "name": "消息模板定义", - "parentId": "9a84a695-ba31-2de0-cfc9-b932f9ef15eb", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "3578b4c0-cde4-7f5a-d062-61973ee7a481", - "code": "MessageConfiguration", - "name": "业务消息配置", - "parentId": "9a84a695-ba31-2de0-cfc9-b932f9ef15eb", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "80a8b9f5-c3a6-51a6-6700-f6022c57ecbf", - "code": "document-rootsetting-configuration", - "name": "文档统一存储配置", - "parentId": "f52fb3be-01f7-443e-b2df-e1b5c5fab3ab", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/文档配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "ade090ea-5ffe-f650-384c-b6f60461e189", - "code": "document-policy-configuration", - "name": "文档管理策略配置", - "parentId": "f52fb3be-01f7-443e-b2df-e1b5c5fab3ab", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/文档配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "6ef1faaf-4e8e-18cc-7a6a-be35b288f9b1", - "code": "Print Device Manager", - "name": "打印设备管理", - "parentId": "b9e2b42b-15ad-538a-0ba5-64ac82f0d044", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/打印配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "23f1a72d-b0f1-b85c-735d-325d1a42db86", - "code": "Print Moniter", - "name": "打印监控", - "parentId": "b9e2b42b-15ad-538a-0ba5-64ac82f0d044", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/打印配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "850d25d0-fd00-8f47-7e50-8c95952422e8", - "code": "Early Warning Definition", - "name": "预警定义", - "parentId": "37d2b123-ba68-e144-6b33-0226cad5047e", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/预警平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "074831e3-eba0-8cdc-7256-480d22117ac6", - "code": "Early Warning Subscribetion", - "name": "预警订阅", - "parentId": "37d2b123-ba68-e144-6b33-0226cad5047e", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/预警平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "79caf8ee-b052-909a-0440-16f70b12a9a2", - "code": "Early Warning Moniter", - "name": "预警日志", - "parentId": "37d2b123-ba68-e144-6b33-0226cad5047e", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/预警平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "c2e79004-311b-f34f-d4c5-f6b6bb4522bb", - "code": "Single Scheduler", - "name": "任务管理", - "parentId": "a7562755-da33-836e-1375-2ac3d820e351", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/调度任务", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "29aabec4-f181-08d2-a7f6-06f46cebd171", - "code": "Scheduler Trigger", - "name": "定时器管理", - "parentId": "a7562755-da33-836e-1375-2ac3d820e351", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/调度任务", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "df84c295-ae68-6241-4317-2bc8b286251c", - "code": "SchedularCalendar", - "name": "工作日历", - "parentId": "a7562755-da33-836e-1375-2ac3d820e351", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/调度任务", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "6f3d0d22-45a5-2469-485f-797e44b75537", - "code": "scheduler-monitor", - "name": "服务监控", - "parentId": "a7562755-da33-836e-1375-2ac3d820e351", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/调度任务", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "c8f99ac7-a633-3e0f-99a8-255d1ac41780", - "code": "RuleBaseMangaer", - "name": "规则库管理", - "parentId": "66a4d7ce-008f-d7f9-40db-c2080ce4d14c", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/规则库", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "609b97f3-bc87-8356-9914-9f0a15f77239", - "code": "dtx-manager", - "name": "分布式事务管理", - "parentId": "05dff722-aa93-4fb6-92dd-6afad7ea8d1c", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/分布式事务", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "483fdee7-818c-4b5d-93b4-cdb06db009b3", - "code": "TD_TraceViewer", - "name": "程序跟踪查看器", - "parentId": "d250437f-f452-43d2-aca6-ee828877dec0", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/跟踪调试", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "online-user", - "code": "online-user", - "name": "在线用户", - "parentId": "Security Monitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/安全监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "security-audit", - "code": "security-audit", - "name": "安全审计", - "parentId": "Security Monitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/安全监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "security-audit-category", - "code": "audit-category", - "name": "审计类别", - "parentId": "Security Monitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/安全监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "security-audit-event", - "code": "audit-event", - "name": "审计事件", - "parentId": "Security Monitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/安全监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b66db23a-2155-bdf7-d006-9a383ab71c06", - "code": "ChgdrQuery", - "name": "日志查询", - "parentId": "102c8de7-875f-ba4b-fd29-75b02a1d1f87", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/业务变更日志", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a7583855-8da1-b1f1-267f-301cea6068ef", - "code": "lockmanagement", - "name": "锁管理", - "parentId": "3a45c311-8f12-58a3-fbf5-c19032798bce", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/业务锁", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a11679bb-b8bd-ada9-21c4-b1700e0418db", - "code": "logging-level", - "name": "日志级别调整", - "parentId": "2b84c32c-302a-ef4d-7525-27e22b6de2fd", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/系统日志", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "72ad68f0-d277-e4db-8dcf-15572aa743d2", - "code": "logging-viewer", - "name": "系统日志查看", - "parentId": "2b84c32c-302a-ef4d-7525-27e22b6de2fd", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/系统日志", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0202", - "code": "WF0202", - "name": "流程设计", - "parentId": "WF02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程建模", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0203", - "code": "WF0203", - "name": "流程分配", - "parentId": "WF02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程建模", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f75a1030-36e5-46e9-8f24-1edcaa056bb7", - "code": "wf-process-administrator", - "name": "流程管理员", - "parentId": "WF02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程建模", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "05913dd6-5448-e2be-cc4e-df804cb48331", - "code": "WF0301", - "name": "流程实例管理", - "parentId": "971ab3c6-2d7d-c19d-67d6-52011e851731", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0201", - "code": "WF0201", - "name": "流程分类", - "parentId": "WF09", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程基础数据", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0204", - "code": "WF0204", - "name": "审批动作定义", - "parentId": "WF09", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程基础数据", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b58f93c4-74fa-6cff-cb7d-55c75df570a7", - "code": "WF-reportingLine-def", - "name": "汇报关系定义", - "parentId": "bc7701d5-eb92-4b2b-46e3-ff671d08826b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/配置管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b0a9339d-7caf-8a5f-a926-b66e63d2d09e", - "code": "WF-reportingLine-setting", - "name": "汇报关系设置", - "parentId": "bc7701d5-eb92-4b2b-46e3-ff671d08826b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/配置管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0401", - "code": "WF0401", - "name": "流程数量统计", - "parentId": "WF04", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程统计分析", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0402", - "code": "WF0402", - "name": "流程时效分析", - "parentId": "WF04", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程统计分析", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0403", - "code": "WF0403", - "name": "节点时效分析", - "parentId": "WF04", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程统计分析", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0404", - "code": "WF0404", - "name": "人员时效分析", - "parentId": "WF04", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程统计分析", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "BifDesigner", - "code": "BifDesigner", - "name": "单据流定义", - "parentId": "BifModel", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/单据流建模", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "c6d74485-83ab-91ba-3f8f-7cddfafce52e", - "code": "BifLogSettings", - "name": "单据流日志设置", - "parentId": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/单据流设置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "40ad8d6d-ba01-3c19-ef06-1ec3aa856ca7", - "code": "BillTypeManager", - "name": "单据类型管理", - "parentId": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/单据流设置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "cad0e5fd-3305-4ff0-b27f-4d49ad310b9c", - "code": "BillRelationManager", - "name": "单据关系管理", - "parentId": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/单据流设置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "5cc0ee7e-722a-5dd3-fcd9-8b7b548154c0", - "code": "RelationFieldsManager", - "name": "关联字段管理", - "parentId": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/单据流设置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "d23c3a58-f864-9637-eaf3-c66058b6d3d5", - "code": "BillTrackingConfig", - "name": "单据追踪配置", - "parentId": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/单据流设置", - "icon": null, - "pinyin": "danjuzhuizongpeizhi", - "simpinyin": "djzzpz", - "child": null - }, - { - "id": "BifManager", - "code": "BifManager", - "name": "单据流管理", - "parentId": "BifMonitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/单据流监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "BifDiagnostor", - "code": "BifDiagnostor", - "name": "单据流诊断", - "parentId": "BifMonitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/单据流监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e2fe4705-1aa3-575f-a658-58366a21fde7", - "code": "BpmDesigner", - "name": "业务流设计", - "parentId": "69b65583-6b2f-0a84-fb5e-76f851f41e91", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/业务流建模", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "46dcc2f1-04d6-3f56-86e3-22210ca29023", - "code": "BpmInstanceManagement", - "name": "业务流实例管理", - "parentId": "6c0290dd-0660-17fc-d63b-7cce4db447f3", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/业务流监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "4c1d7d54-0e3b-0e52-e861-16d9bf21950d", - "code": "BpmProcessExceptionManagement", - "name": "业务流实例异常管理", - "parentId": "6c0290dd-0660-17fc-d63b-7cce4db447f3", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/业务流监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "60f194f5-bae3-e5b2-ae01-7a0227c0794c", - "code": "BpmApprovalAction", - "name": "人工操作动作定义", - "parentId": "6d015a0f-3454-3ec4-6858-a523d437b572", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/业务流基础数据", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0101", - "code": "WF0101", - "name": "我的任务", - "parentId": "WF01", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/任务中心/任务管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b9d8cdbb-91cc-1765-3770-67ead45ec363", - "code": "WF0103", - "name": "我的委托", - "parentId": "WF01", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/任务中心/任务管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "deaa4ee2-5c9a-cdcb-7070-d3652530f8a9", - "code": "Task_AllDelegateMgr", - "name": "委托管理", - "parentId": "WF01", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/任务中心/任务管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0102", - "code": "WF0102", - "name": "任务分类", - "parentId": "TASK02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/任务中心/任务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0205", - "code": "WF0205", - "name": "显示列设置", - "parentId": "TASK02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/任务中心/任务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "A0E4C91F-4A8D-4FB3-A38C-E6C727815A46", - "code": "streamEvent", - "name": "事件管理", - "parentId": "ebsEventCenter", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/事件中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "DADA0CA5-AF15-46AF-B0DE-5E74EA50C419", - "code": "streamAction", - "name": "事件处理器", - "parentId": "ebsEventCenter", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/事件中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "070a49b2-1b88-b8ac-146e-4b5ceaf2f2e3", - "code": "ebsSubscribe", - "name": "事件订阅", - "parentId": "ebsEventCenter", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/事件中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "7bb91bfb-035f-8f7e-de63-673c8617e29b", - "code": "eventRoutingConfig", - "name": "事件路由配置", - "parentId": "0BDFF9DA-7D81-4589-8428-C79C30E58825", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/配置中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "318ffca4-261f-0495-f163-7c24efea5e31", - "code": "eventGlobalConfig", - "name": "运行参数配置", - "parentId": "0BDFF9DA-7D81-4589-8428-C79C30E58825", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/配置中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "E4020EBF-8ACE-4E25-9626-CC0318BBF330", - "code": "manualIntervension", - "name": "人工干预", - "parentId": "AA771CAB-5C40-4DF0-81FF-ABC8B4093071", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/事件异常处理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "69AEDA86-8656-4FBA-8F59-5BFC35229568", - "code": "streameventlog", - "name": "事件发布日志", - "parentId": "CBAB3CA5-0915-4E3B-88EE-430F270B807D", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/事件监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "CDDE3461-2ACC-46EF-8207-64DC59E834D4", - "code": "streameventhandlelog", - "name": "事件处理日志", - "parentId": "CBAB3CA5-0915-4E3B-88EE-430F270B807D", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/事件监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "46d17ce7-7528-b8e6-e154-0f8e3d0f2b08", - "code": "ebs-tracelog", - "name": "事件启动日志", - "parentId": "CBAB3CA5-0915-4E3B-88EE-430F270B807D", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/事件监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "37d80b47-6571-fd58-9dd6-ba07f879654c", - "code": "ebs-uniquenessmonitoring", - "name": "事件重复性控制", - "parentId": "CBAB3CA5-0915-4E3B-88EE-430F270B807D", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/事件监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "36c9064a-0d42-0780-5888-c305d15ef006", - "code": "mqQueueMonitor", - "name": "队列监控", - "parentId": "bbe35771-dc07-f7d4-bae1-7284ce4bbad7", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/消息服务", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f1752974-85a5-c88a-c791-ffd08ef4945d", - "code": "mqServerMonitor", - "name": "消息服务配置", - "parentId": "bbe35771-dc07-f7d4-bae1-7284ce4bbad7", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/消息服务", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "1cb2fd49-30a5-714f-ab31-c2cb829e6806", - "code": "queueManagement", - "name": "队列管理", - "parentId": "bbe35771-dc07-f7d4-bae1-7284ce4bbad7", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/消息服务", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "dip-vm0001", - "code": "valuemappingdefine", - "name": "值映射定义", - "parentId": "dip-vm", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/数据转换", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "dip-vm0002", - "code": "valuemappingsetting", - "name": "值映射设置", - "parentId": "dip-vm", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/数据转换", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2b555d1d-60a9-2ad3-656c-d365210351aa", - "code": "Mapping", - "name": "数据转换规则", - "parentId": "dip-vm", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/数据转换", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "cebbcde3-23c6-198c-ac5b-663414c1e2cd", - "code": "rri-manage-dev", - "name": "数据同步分组管理", - "parentId": "dip-rri", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "rri-dataservice", - "code": "rri-dataservice", - "name": "数据服务注册", - "parentId": "dip-rri", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "rri-subscribe", - "code": "rri-subscribe", - "name": "数据处理器", - "parentId": "dip-rri", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a6b94bb6-f64c-663b-95e7-579b45ecd001", - "code": "rri-manualhandling", - "name": "人工干预", - "parentId": "rri-data-processing", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/数据异常处理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f1fcf1a8-5a6d-3829-9f4f-44dca7831487", - "code": "rri-manage-custom", - "name": "数据同步分组配置", - "parentId": "rri-sync-config", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "cb450e63-c1f7-4505-21fe-0fa567c22e34", - "code": "rri-strategyconfig", - "name": "参数配置", - "parentId": "rri-sync-config", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "1f096801-c7ed-e004-26c2-2628237dec8d", - "code": "rri-dataInit", - "name": "数据初始", - "parentId": "rri-sync-config", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "dee70c45-c8d0-3390-fdc1-ec3fa6cad9f2", - "code": "rri-publishlog", - "name": "数据发布日志", - "parentId": "rri-data-monitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2f3af700-0e10-252d-edb4-153d7a784265", - "code": "rri-handlerlog", - "name": "数据处理日志", - "parentId": "rri-data-monitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "879659b9-0fe1-db11-19ae-2fb5ecf27151", - "code": "rri-manualsynclog", - "name": "数据初始日志", - "parentId": "rri-data-monitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "43861ad5-ba12-37df-4f86-24cea8b02396", - "code": "sif-connection-manage", - "name": "系统连接管理", - "parentId": "217401ed-28a4-6f48-b942-3fe38fed324b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/外部系统管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "661aeb5f-de1f-c49b-e049-462e41105e95", - "code": "external-service-manage", - "name": "外部服务管理", - "parentId": "e9fbf898-8e66-45de-2ddb-9639f3462721", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/外部服务接入", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "85c88477-3825-cd3f-d217-0a302d2d3a21", - "code": "template-service-manage", - "name": "外部服务模板库", - "parentId": "e9fbf898-8e66-45de-2ddb-9639f3462721", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/外部服务接入", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "4dcf5bd6-7b47-7868-db7b-d59ff576bf18", - "code": "service-template-statistic", - "name": "外部服务模板统计", - "parentId": "e9fbf898-8e66-45de-2ddb-9639f3462721", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/外部服务接入", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "41ad6723-8db6-60cb-d8c2-105749e7d96e", - "code": "service-monitor-config", - "name": "外部服务配置", - "parentId": "a9523b42-9d38-0b0a-fca6-3a4c178ab78a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/外部服务监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "3fb2c0df-3c24-446f-9815-bdf3f8a70fb0", - "code": "service-status-monitor", - "name": "外部服务监控", - "parentId": "a9523b42-9d38-0b0a-fca6-3a4c178ab78a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/外部服务监控", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "d1ff58cf-d6e1-9728-df4f-c0234bdb86b2", - "code": "service-logging", - "name": "外部服务日志", - "parentId": "a9523b42-9d38-0b0a-fca6-3a4c178ab78a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/外部服务监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "c9c9b772-661b-9d37-f5e9-9add8a72e662", - "code": "service-logging-statistic", - "name": "外部服务日志统计", - "parentId": "a9523b42-9d38-0b0a-fca6-3a4c178ab78a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/外部服务监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "921bdedc-3289-6c68-0b7c-7559a4ee1c3b", - "code": "interface-service-model-manage", - "name": "集成对象管理", - "parentId": "18d3b84b-eded-6f11-9b91-891b47711443", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/集成服务注册", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "5dbcfb38-0fe7-8837-5985-73c47eeb9d7f", - "code": "internal-service-manage", - "name": "集成服务库", - "parentId": "18d3b84b-eded-6f11-9b91-891b47711443", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/集成服务注册", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b6f5cfbf-9a69-850b-7509-93de89231f11", - "code": "open-service-manage", - "name": "集成服务管理", - "parentId": "1d514b9f-a219-af94-5cba-2a92e451e0c5", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/集成服务开放", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "20cd9ffe-dcf3-a4eb-8422-1086e6656da1", - "code": "open-service-log", - "name": "集成服务日志", - "parentId": "1d514b9f-a219-af94-5cba-2a92e451e0c5", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/集成服务开放", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b17f7b14-405d-1e30-7285-0426873c1c0c", - "code": "service-log-statistic", - "name": "集成服务日志统计", - "parentId": "1d514b9f-a219-af94-5cba-2a92e451e0c5", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/集成服务开放", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "339d0403-4672-2d89-fd4e-6d71e71d6757", - "code": "csb-flow-manage", - "name": "集成流设计", - "parentId": "3ec2997c-392b-7027-99b7-745a5eca92ad", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/集成服务编排", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "abdf2afd-df55-096c-15fd-c58302884239", - "code": "csb-flow-log", - "name": "集成流实例", - "parentId": "3ec2997c-392b-7027-99b7-745a5eca92ad", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/集成服务编排", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "82060a3c-4779-1a66-c3e1-cc408151d36c", - "code": "icc-basic-config", - "name": "云连接器配置", - "parentId": "fee2ac33-b201-1ed1-2314-bd1a9befa071", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/基础配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f0c11d8f-15cb-6833-1b2e-e4448fa6afb0", - "code": "csb-center-config", - "name": "集成服务配置", - "parentId": "fee2ac33-b201-1ed1-2314-bd1a9befa071", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/基础配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "82daf547-0c2b-5963-93a9-609c0e1abd32", - "code": "3rd-application-manage", - "name": "第三方应用管理", - "parentId": "2ddaf385-2387-5375-9655-1fe92c1099d0", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/应用集成管理", - "icon": null, - "pinyin": "disanfangyingyongguanli", - "simpinyin": "dsfyygl", - "child": null - }, - { - "id": "e7a1f91f-bcbf-eccc-5361-9e704256e7c9", - "code": "ip-access-manage", - "name": "IP访问管理", - "parentId": "2ddaf385-2387-5375-9655-1fe92c1099d0", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/应用集成管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "cb229eb6-a8ed-8d51-2a20-160948b605da", - "code": "limit-strategy-manage", - "name": "限流策略管理", - "parentId": "2ddaf385-2387-5375-9655-1fe92c1099d0", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/应用集成管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "45cf70fb-57a1-adae-9f6c-31f17609fddd", - "code": "fusing-strategy-manage", - "name": "熔断策略管理", - "parentId": "2ddaf385-2387-5375-9655-1fe92c1099d0", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/应用集成管理", - "icon": null, - "pinyin": "rongduancelu:eguanli", - "simpinyin": "rdclgl", - "child": null - }, - { - "id": "5c79f889-db66-b984-e75b-0c097be8f517", - "code": "encryption-strategy-manage", - "name": "加密策略管理", - "parentId": "2ddaf385-2387-5375-9655-1fe92c1099d0", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/应用集成管理", - "icon": null, - "pinyin": "jiamicelu:eguanli", - "simpinyin": "jmclgl", - "child": null - }, - { - "id": "82e00ca9-148f-5217-0b43-5ac463f0ae18", - "code": "EapiDefine", - "name": "API注册", - "parentId": "2ee77eca-2efb-1e2d-a2bb-beed6b7654d7", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/服务网关/开放API管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "802b188e-d5cf-8f81-1541-0599de89de4c", - "code": "EapiView", - "name": "API查询", - "parentId": "2ee77eca-2efb-1e2d-a2bb-beed6b7654d7", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/服务网关/开放API管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "5d7ac84c-e657-de58-16ec-b8ed004226ad", - "code": "EapiConfigManager", - "name": "API权限配置", - "parentId": "2ee77eca-2efb-1e2d-a2bb-beed6b7654d7", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/服务网关/开放API管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "86a7808f-a21d-ce0c-8134-48e42608dacc", - "code": "EapiGroup", - "name": "API分组管理", - "parentId": "52173d8c-9c3e-65f5-e493-98e20593719b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/服务网关/API授权管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "679bf749-2e00-b4b5-0b1f-b5f8a8ca72a4", - "code": "OperationEapiConfig", - "name": "API授权管理", - "parentId": "52173d8c-9c3e-65f5-e493-98e20593719b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/服务网关/API授权管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "021bccc0-a6d6-8570-9b84-71b6fdb9b15f", - "code": "caf-apikey", - "name": "ApiKey管理", - "parentId": "52173d8c-9c3e-65f5-e493-98e20593719b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/服务网关/API授权管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "IapiDoc", - "code": "SG_IApiLib", - "name": "微服务API查询", - "parentId": "596c066a-cd99-3bb1-4a17-fea7ca9d794b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/服务网关/微服务API管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "c0b45ed9-53b7-3a02-0862-8275e7ebddc6", - "code": "portal-navigation", - "name": "门户导航", - "parentId": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/企业门户/门户平台/门户配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "47bb19bc-fbbb-56af-aa83-f39473206c17", - "code": "site", - "name": "站点", - "parentId": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/企业门户/门户平台/门户配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "8fcae19b-fcd5-524f-1ab0-a579a6aa6642", - "code": "page", - "name": "门户页面", - "parentId": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/企业门户/门户平台/门户配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "c4af2580-f953-2436-c2bf-f4bc4cb4fc01", - "code": "theme", - "name": "门户模板", - "parentId": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/企业门户/门户平台/门户配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "6f492efe-e3d5-ac7b-1faf-d391c3489083", - "code": "site-view-statistic", - "name": "站点访问量统计", - "parentId": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/企业门户/门户平台/门户配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "054035ad-17db-4867-b75b-731eea287c42", - "code": "CmsApplicationMgr", - "name": "内容应用", - "parentId": "b1138ab9-7cd0-7632-e2e3-68c181d0a873", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/内容管理平台/应用", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "817e9740-7795-0dab-3c08-7a730786d6e8", - "code": "cms-schema-definition", - "name": "模型定义", - "parentId": "8472044f-2a80-089f-0221-33c4d52de518", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/内容管理平台/模型", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "591fa7e3-1f98-9981-196f-4c2f68252b07", - "code": "cms-content-manager", - "name": "内容库", - "parentId": "23f4461c-ad39-97a3-d6ff-41dff858fa50", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/内容管理平台/内容", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "bcadaced-b250-3943-ba83-cc57891a7e44", - "code": "cms-setting-search", - "name": "搜索配置", - "parentId": "70871143-8fff-3b39-c3d1-52353866bda1", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/内容管理平台/配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "996d4f32-ceb0-39b2-eda7-a9616767d69a", - "code": "cms-tag-setting", - "name": "标签管理", - "parentId": "70871143-8fff-3b39-c3d1-52353866bda1", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/内容管理平台/配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2f7be620-2411-f54a-b1da-853fe6c07038", - "code": "cms-statistical-log", - "name": "访问日志", - "parentId": "74802909-385a-10b8-fc84-9c0bce98610f", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/内容管理平台/统计", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "6718949a-b8fe-5d7c-222e-adc3b42995dd", - "code": "cms-statistics-summary", - "name": "访问汇总", - "parentId": "74802909-385a-10b8-fc84-9c0bce98610f", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/内容管理平台/统计", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "613feb60-53fc-9c99-6f90-26a972ca8944", - "code": "cms-kb-channel", - "name": "栏目管理", - "parentId": "5424ab74-1be1-9318-9740-cda0a5cdbb98", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/知识库/知识管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2ee09636-f0f9-f991-0b27-085ebaa867ae", - "code": "cms-kb-content-list", - "name": "内容列表", - "parentId": "5424ab74-1be1-9318-9740-cda0a5cdbb98", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/知识库/知识管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2867002a-eaf1-cb35-56a6-56f9d2d845d5", - "code": "cms-kb-setting-menu", - "name": "导航配置", - "parentId": "fc687ac8-6ae0-d113-6632-104df807227a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/知识库/配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f30b975f-0c0a-53ae-cc12-d13ac1254fde", - "code": "cmd-kb-databoard", - "name": "知识库看板", - "parentId": "e8b71ba6-3820-298d-e11d-fb62ef669e13", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/知识库/看板", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "06ad5ab5-c42a-cd4b-e890-aadf1e057448", - "code": "export-rule", - "name": "预置数据导出规则", - "parentId": "aedda4f4-fed6-bea7-12a1-1257541d7d37", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/预置数据导出", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a90d9e18-d47c-0cf3-bf69-2dce40665a12", - "code": "dataexport", - "name": "预置数据导出", - "parentId": "aedda4f4-fed6-bea7-12a1-1257541d7d37", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/预置数据导出", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "1b415396-2386-38dd-50b0-771c5960fc18", - "code": "UbccParamDataConfig", - "name": "业务参数配置", - "parentId": "UBCC0001", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "6465dca9-eb81-0743-edf3-33e9573b3ed8", - "code": "UbccParamDefinitionManager", - "name": "业务参数模板", - "parentId": "UBCC0001", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "SYS0102", - "code": "SYS0102", - "name": "业务对象", - "parentId": "UBCC0001", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "UBCC_BC0001", - "code": "BCP_BillCategory", - "name": "业务种类定义", - "parentId": "UBCC0001", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "UBCC_BC0002", - "code": "BCP_ConfCenter", - "name": "业务配置中心", - "parentId": "UBCC0001", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "12345f9a-a305-ba3e-0710-a9d93889710a", - "code": "CodeRuleDefine", - "name": "编码规则定义", - "parentId": "UBCC0001", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "001231bf-6293-5a53-57cc-e50db58d3db0", - "code": "Print Format Definition", - "name": "打印格式定义", - "parentId": "UBCC0001", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "Epp-pagemanager", - "code": "Page", - "name": "页面", - "parentId": "Epp-pagelayout", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/工作中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "Epp-portletmanager", - "code": "Portlet", - "name": "部件", - "parentId": "Epp-pagelayout", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/工作中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "Epp-widgetmanager", - "code": "MetaPortlet", - "name": "元部件", - "parentId": "Epp-pagelayout", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/工作中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "ed2e6a45-e815-cbc1-b8fb-41645a0b6db7", - "code": "DataSource", - "name": "部件数据源", - "parentId": "Epp-pagelayout", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/工作中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "dd50d8a3-48bc-d4f2-8830-fc26458a60f3", - "code": "DataSet", - "name": "部件数据集", - "parentId": "Epp-pagelayout", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/工作中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "eb785056-f432-d18e-09bf-b6c3a3b7c2d9", - "code": "BCP_BizQryFunc", - "name": "业务查询函数", - "parentId": "22821215-9dbe-7673-a4ec-b2f93f096b35", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/查询定制", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "568bfd2e-d0a2-d055-2055-3346290fbb88", - "code": "BCP_BizQryDataSet", - "name": "数据集", - "parentId": "22821215-9dbe-7673-a4ec-b2f93f096b35", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/查询定制", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "35d72855-ec34-67fd-135f-6f48bded396c", - "code": "QDPDefinitionMenu", - "name": "查询定义", - "parentId": "22821215-9dbe-7673-a4ec-b2f93f096b35", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/查询定制", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "1619ca8d-1216-8890-da40-1738f3af359e", - "code": "writeback", - "name": "业务数据回写管理", - "parentId": "22821215-9dbe-7673-a4ec-b2f93f096b35", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/查询定制", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "SYS0101", - "code": "SYS0101", - "name": "菜单", - "parentId": "Function Design", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/菜单定义", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "gspapp01", - "code": "APP Maintenance", - "name": "应用", - "parentId": "Function Design", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/菜单定义", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "func-operation", - "code": "func-operation", - "name": "功能操作", - "parentId": "Authorization Design", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/权限定义", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "authorization-object", - "code": "authorization-object", - "name": "权限对象", - "parentId": "Authorization Design", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/权限定义", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "authfield", - "code": "authfield", - "name": "权限字段", - "parentId": "Authorization Design", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/权限定义", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "bf8b90b8-d636-c09f-a776-5e735c62c54f", - "code": "ChgdrConfig", - "name": "日志配置", - "parentId": "03851cc7-9c34-a213-d7fa-3c831d596406", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/业务变更日志", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "dataie-rule-manage", - "code": "dataie-rule-manage", - "name": "导入导出规则", - "parentId": "dip-dataie", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/导入导出", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f31e2686-e2cc-5c1c-091a-f6cdb1c0ec78", - "code": "audit-export-runtime", - "name": "审计数据导出", - "parentId": "dip-dataie", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/导入导出", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f56c2cf1-3070-802d-a87b-e4cc2a2c2eeb", - "code": "audit-export-manage", - "name": "审计导出规则", - "parentId": "dip-dataie", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/导入导出", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "0a7857db-e199-e031-f9a4-c26d811c9242", - "code": "FrameworkConfiguration", - "name": "框架个性化配置", - "parentId": "cf81a0c7-8019-74e2-0a81-cca95a26f72a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/系统设置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "024b93d1-f86f-0a0a-5374-64c25d0ce105", - "code": "contact-channel-config", - "name": "客服设置", - "parentId": "cf81a0c7-8019-74e2-0a81-cca95a26f72a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/系统设置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "1982a9b1-7281-e63e-5d4b-9f46402fb89e", - "code": "sso-tool", - "name": "单点登录生成器", - "parentId": "cf81a0c7-8019-74e2-0a81-cca95a26f72a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/系统设置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "ee3f58f0-440e-b870-f461-a658ab4145da", - "code": "EppSchedule", - "name": "我的日程", - "parentId": "a274453d-2465-5377-27da-c4c47883cc6b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/我的日程", - "icon": null, - "pinyin": "wodericheng", - "simpinyin": "wdrc", - "child": null - }, - { - "id": "cdf0e50c-7a0e-2c93-cc98-a4a285cc960d", - "code": "EppScheduleSet", - "name": "日程代录设置", - "parentId": "a274453d-2465-5377-27da-c4c47883cc6b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/我的日程", - "icon": null, - "pinyin": "richengdailushezhi", - "simpinyin": "rcdlsz", - "child": null - }, - { - "id": "986137b2-74dc-f13a-0667-553a1332218d", - "code": "日程集成", - "name": "日程集成", - "parentId": "a274453d-2465-5377-27da-c4c47883cc6b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/我的日程", - "icon": null, - "pinyin": "richengjicheng", - "simpinyin": "rcjc", - "child": null - }, - { - "id": "fd97c5f5-e86e-bfc7-ec1b-453ef3c17586", - "code": "quick-sight-menu", - "name": "轻分析中心", - "parentId": "3680fe22-2b9c-ee80-4826-044ca843497b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/零代码/轻分析", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "97a8e09a-21f2-fe50-5e6e-7b16ab44e551", - "code": "quick-sight-manage-menu", - "name": "轻分析管理", - "parentId": "3680fe22-2b9c-ee80-4826-044ca843497b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/零代码/轻分析", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "d8b2aaec-85a6-43ce-8988-d159d1d0bbf6", - "code": "ListCardForm", - "name": "内置列表卡片界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": "neizhiliebiaokapianjiemian", - "simpinyin": "nzlbkpjm", - "child": null - }, - { - "id": "35b491ab-2224-44d7-a7f6-22d1a2aaf347", - "code": "ListForm", - "name": "列表", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "4cdabd44-e594-48b3-aa6f-d76825fce50b", - "code": "fybxdCard", - "name": "费用报销单卡片", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e976a71d-68f0-4e4e-8094-b7e8cc130f3a", - "code": "ListWithSidebarForm", - "name": "带侧边栏的列表界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e7a82c22-cd0e-458d-8c3c-5d648545e369", - "code": "ScrollspyCardForm", - "name": "内置滚动定位卡片界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b7a92e7d-53a1-4094-8141-aa0e9061b8c2", - "code": "DoubleListForm", - "name": "双列表界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2561ab76-1f4f-4182-8547-7129a8eae3bc", - "code": "doubleListWithSidebarForm", - "name": "带侧边栏的双列表界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "0ef70dc0-a763-4f1e-861f-77514ea4e5c5", - "code": "listManageForm", - "name": "批量编辑列表界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "8bef78a9-c06b-47ff-be2d-777d0a373a2e", - "code": "listDictionaryForm", - "name": "多数据源列卡界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "29f849e3-38ce-49ff-876e-bea5093650ce", - "code": "modalCardForm", - "name": "弹窗卡片模板", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "910bcba3-cff3-4b47-a96d-463e7eca37c0", - "code": "listComponent", - "name": "列表组件", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "40089513-55f4-4e5c-9c6d-f18fc71fe75f", - "code": "doubleListFormInTab", - "name": "标签式双列表", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "143eb743-3364-4777-a0a7-daa944e18140", - "code": "cardTableForm", - "name": "表格类卡片模板", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e63b2788-8b96-49d9-8697-e73d565072e0", - "code": "ScrollspyCardForm1", - "name": "内置滚动定位卡片界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "693a8ea3-be01-4c97-a87e-3e4f45af099f", - "code": "modalCardForm1", - "name": "弹窗卡片模板", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "7c485db2-3c78-42d6-b293-6aeac65d99ed", - "code": "cardTableForm1", - "name": "表格类卡片模板", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b6e0a7a3-21fd-476c-ae8c-ae1ddcd6050d", - "code": "doubleListForm", - "name": "双列表界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a2825743-cb93-4595-8850-b6f23e0df2f4", - "code": "doubleListForm1", - "name": "双列表界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e7503370-a0e1-4105-89b2-2308abee9b0b", - "code": "listComponent1", - "name": "列表组件", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e6e7b400-1858-4f1d-97aa-c0c894081a89", - "code": "doubleListFormInTab1", - "name": "标签式双列表", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "4e8725f6-1f5f-4c25-9363-5071b63923af", - "code": "states", - "name": "状态机验证", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "37e31f6a-6960-41cf-afdb-49b8410fb590", - "code": "BXDList", - "name": "新报销单列表", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": "xinbaoxiaodanliebiao", - "simpinyin": "xbxdlb", - "child": null - }, - { - "id": "ff1be9e4-092a-4799-bb56-ef4b66b722ca", - "code": "BXDcard", - "name": "报销单卡片界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": "baoxiaodankapianjiemian", - "simpinyin": "bxdkpjm", - "child": null - } -] \ No newline at end of file diff --git a/packages/farris-admin/src/components/header.component.tsx b/packages/farris-admin/src/components/header.component.tsx deleted file mode 100644 index 8d4cdf04fa4..00000000000 --- a/packages/farris-admin/src/components/header.component.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import { computed, defineComponent, ref } from 'vue'; -import { headerProps, HeaderProps } from './header.props'; - -import listViewData from './data.json'; -import FAccordion, { FAccordionItem } from '@farris/ui-vue/components/accordion'; - - -export default defineComponent({ - name: 'Nav Header', - props: headerProps, - emits: [], - setup(props: HeaderProps, context) { - const navContent = ref(); - const product = [] as any; - const modules = new Map(); - - function initData(dataArray: Map, item: any) { - - const element = dataArray.get(item.parentId); - if (element) { - element.push(item); - } else { - dataArray.set(item.parentId, [item]); - } - } - - function resolveData() { - listViewData.forEach((item: any) => { - switch (item.funcType) { - case '1': product.push(item); break; - case '2': initData(modules, item); break; - } - }); - return product; - } - const renderEditor = resolveData(); - - return () => { - return (
- - { - product.map((item: any) => { - - return ( - - - - { - (modules.get(item.id) || []).map((element: any) => { - return ( -
{element.name}
- ) - }) - } - -
-
- ) - }) - } -
); - } - } -}) \ No newline at end of file diff --git a/packages/farris-admin/src/components/header.props.ts b/packages/farris-admin/src/components/header.props.ts deleted file mode 100644 index 48de676053a..00000000000 --- a/packages/farris-admin/src/components/header.props.ts +++ /dev/null @@ -1,8 +0,0 @@ - -import { ExtractPropTypes } from "vue"; - - -export const headerProps = { -} as Record; - -export type HeaderProps = ExtractPropTypes; diff --git a/packages/farris-admin/src/main.ts b/packages/farris-admin/src/main.ts deleted file mode 100644 index a9e72478ec8..00000000000 --- a/packages/farris-admin/src/main.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { createApp } from 'vue'; -// import FarrisVue from '@farris/ui-vue'; -import App from './app.vue'; -// import { createDevkit } from '@farris/devkit-vue'; -// import router from './router'; - -// const devkit = createDevkit({ -// providers: [] -// }); - -const app = createApp(App); -// app.use(router); -// app.use(devkit); -// app.use(FarrisVue); -app.mount('#app'); diff --git a/packages/farris-admin/src/style.css b/packages/farris-admin/src/style.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/packages/farris-admin/src/vite-env.d.ts b/packages/farris-admin/src/vite-env.d.ts deleted file mode 100644 index e38e5224b9b..00000000000 --- a/packages/farris-admin/src/vite-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -// diff --git a/packages/farris-admin/tsconfig.json b/packages/farris-admin/tsconfig.json deleted file mode 100644 index 0b7f4ecc103..00000000000 --- a/packages/farris-admin/tsconfig.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "useDefineForClassFields": true, - "module": "ESNext", - "moduleResolution": "node", - "strict": true, - "jsx": "preserve", - "noImplicitAny": false, - "sourceMap": true, - "resolveJsonModule": true, - "isolatedModules": true, - "esModuleInterop": true, - "lib": ["ESNext", "DOM", "dom.iterable", "scripthost"], - "skipLibCheck": true, - "importHelpers": true, - "experimentalDecorators": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "types": ["vitest/globals", "@types/jest"], - "baseUrl": "./", - "paths": {} - }, - "include": ["components/**/*", "src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "designer/**/*"], - "references": [{ "path": "./tsconfig.node.json" }] -} diff --git a/packages/farris-admin/tsconfig.node.json b/packages/farris-admin/tsconfig.node.json deleted file mode 100644 index 2e16c8174ae..00000000000 --- a/packages/farris-admin/tsconfig.node.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - // "strict": true, - "composite": true, - "module": "ESNext", - "moduleResolution": "Node", - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true - }, - "include": ["vite.config.dev.ts"] -} diff --git a/packages/farris-admin/vite.config.build.ts b/packages/farris-admin/vite.config.build.ts deleted file mode 100644 index 87d9a18e946..00000000000 --- a/packages/farris-admin/vite.config.build.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { defineConfig } from 'vite'; - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [] -}); diff --git a/packages/farris-admin/vite.config.dev.ts b/packages/farris-admin/vite.config.dev.ts deleted file mode 100644 index 234270da9be..00000000000 --- a/packages/farris-admin/vite.config.dev.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { defineConfig } from 'vite'; -import vue from '@vitejs/plugin-vue'; -import vueJsx from '@vitejs/plugin-vue-jsx'; -import { resolve } from 'path'; - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [vue(), vueJsx()], - server: { - proxy: { - "/api": { - target: "http://localhost:5200", - changeOrigin: true, - secure: false - } - } - }, - resolve: { - alias: { - '@': resolve(__dirname, '../'), - '@farris/ui-vue': resolve(__dirname, '../ui-vue') - } - } -}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 849d8a5952f..93aa0d55bb3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -961,142 +961,6 @@ importers: specifier: ^0.40.4 version: 0.40.13(typescript@4.9.5) - packages/farris-admin: - dependencies: - '@farris/ui-vue': - specifier: workspace:^ - version: link:../ui-vue - '@monaco-editor/loader': - specifier: ^1.4.0 - version: 1.4.0(monaco-editor@0.52.2) - monaco-editor: - specifier: ^0.52.2 - version: 0.52.2 - vue: - specifier: ^3.2.37 - version: 3.5.12(typescript@4.9.5) - devDependencies: - '@babel/parser': - specifier: ^7.19.0 - version: 7.25.8 - '@babel/preset-env': - specifier: ^7.19.0 - version: 7.25.8(@babel/core@7.25.8) - '@babel/preset-typescript': - specifier: ^7.18.0 - version: 7.25.7(@babel/core@7.25.8) - '@babel/traverse': - specifier: ^7.19.0 - version: 7.25.7 - '@commitlint/cli': - specifier: ^19.3.0 - version: 19.5.0(@types/node@20.5.1)(typescript@4.9.5) - '@commitlint/config-conventional': - specifier: ^19.2.0 - version: 19.5.0 - '@farris/cli': - specifier: workspace:^ - version: link:../cli - '@farris/designer-dragula': - specifier: 0.0.5 - version: 0.0.5 - '@testing-library/vue': - specifier: ^7.0.0 - version: 7.0.0(@vue/compiler-sfc@3.5.12)(vue@3.5.12(typescript@4.9.5)) - '@types/jest': - specifier: ^26.0.24 - version: 26.0.24 - '@types/jsonp': - specifier: ^0.2.3 - version: 0.2.3 - '@types/lodash.debounce': - specifier: ^4.0.7 - version: 4.0.9 - '@typescript-eslint/eslint-plugin': - specifier: ^7.15.0 - version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5) - '@typescript-eslint/parser': - specifier: ^7.15.0 - version: 7.18.0(eslint@8.57.1)(typescript@4.9.5) - '@vitejs/plugin-vue': - specifier: ^4.2.3 - version: 4.6.2(vite@4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@4.9.5)) - '@vitejs/plugin-vue-jsx': - specifier: ^3.0.1 - version: 3.1.0(vite@4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@4.9.5)) - '@vue/babel-plugin-jsx': - specifier: ^1.1.1 - version: 1.2.5(@babel/core@7.25.8) - '@vue/compiler-sfc': - specifier: ^3.2.0 - version: 3.5.12 - '@vue/test-utils': - specifier: ^2.0.0 - version: 2.4.6 - '@vuedx/typecheck': - specifier: ^0.7.5 - version: 0.7.6 - '@vuedx/typescript-plugin-vue': - specifier: ^0.7.5 - version: 0.7.6 - babel-jest: - specifier: ^29.0.3 - version: 29.7.0(@babel/core@7.25.8) - chalk: - specifier: ^5.0.0 - version: 5.3.0 - commander: - specifier: ^9.4.0 - version: 9.5.0 - conventional-changelog-cli: - specifier: ^2.2.2 - version: 2.2.2 - happy-dom: - specifier: ^8.9.0 - version: 8.9.0 - inquirer: - specifier: ^9.1.1 - version: 9.3.7 - jest: - specifier: ^29.0.0 - version: 29.7.0(@types/node@20.5.1)(ts-node@10.9.2(@types/node@20.5.1)(typescript@4.9.5)) - ora: - specifier: ^6.1.2 - version: 6.3.1 - patch-vue-directive-ssr: - specifier: ^0.0.1 - version: 0.0.1 - sass: - specifier: ^1.32.2 - version: 1.80.3 - shelljs: - specifier: ^0.8.4 - version: 0.8.5 - typescript: - specifier: ^4.6.4 - version: 4.9.5 - vite: - specifier: ^4.4.1 - version: 4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0) - vite-plugin-dts: - specifier: ^2.1.0 - version: 2.3.0(@types/node@20.5.1)(rollup@4.24.0)(vite@4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0)) - vite-plugin-md: - specifier: ^0.20.0 - version: 0.20.6(@vitejs/plugin-vue@4.6.2(vite@4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@4.9.5)))(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0)) - vite-svg-loader: - specifier: ^4.0.0 - version: 4.0.0 - vitepress: - specifier: 1.0.0-alpha.8 - version: 1.0.0-alpha.8(@algolia/client-search@4.24.0)(@types/node@20.5.1)(react-dom@16.14.0(react@16.14.0))(react@16.14.0)(sass@1.80.3)(search-insights@2.17.2)(terser@5.36.0)(typescript@4.9.5) - vitepress-theme-demoblock: - specifier: 1.4.2 - version: 1.4.2(react-dom@16.14.0(react@16.14.0))(react@16.14.0)(sass@1.80.3)(typescript@4.9.5) - vue-tsc: - specifier: ^1.2.0 - version: 1.8.27(typescript@4.9.5) - packages/farris-theme: dependencies: '@types/gulp-autoprefixer': @@ -14607,7 +14471,7 @@ snapshots: fp-ts: 2.16.9 inferred-types: 0.37.6(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) markdown-it: 13.0.2 - vite-plugin-md: 0.22.5(@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0)) + vite-plugin-md: 0.22.5(@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)))(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0)) transitivePeerDependencies: - '@edge-runtime/vm' - '@vitejs/plugin-vue' @@ -15365,7 +15229,7 @@ snapshots: dependencies: bumpp: 8.2.1 callsites: 4.2.0 - inferred-types: 0.37.6(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) + inferred-types: 0.37.6(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) vitest: 0.25.8(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) transitivePeerDependencies: - '@edge-runtime/vm' @@ -15385,7 +15249,7 @@ snapshots: dependencies: bumpp: 8.2.1 callsites: 4.2.0 - inferred-types: 0.37.6(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) + inferred-types: 0.37.6(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) vitest: 0.25.8(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) transitivePeerDependencies: - '@edge-runtime/vm' @@ -22572,7 +22436,7 @@ snapshots: - supports-color - terser - vite-plugin-md@0.22.5(@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0)): + vite-plugin-md@0.22.5(@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)))(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0)): dependencies: '@vitejs/plugin-vue': 5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)) '@yankeeinlondon/builder-api': 1.4.1(@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0)) @@ -22586,7 +22450,6 @@ snapshots: - '@vitest/browser' - '@vitest/ui' - encoding - - happy-dom - jsdom - less - lightningcss diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 4552f92dc72..2567ccae7d5 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -12,4 +12,3 @@ packages: - 'packages/ui-vue' - 'packages/command-services' - 'packages/ui-binding' - - 'packages/farris-admin' -- Gitee From 51021d9e5f1c7924efe9f6f3e306043672f491f8 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Fri, 27 Dec 2024 01:08:22 +0000 Subject: [PATCH 058/181] =?UTF-8?q?Revert=20"fix:=20admin=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E5=88=9D=E5=BB=BA"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 5e30addff6cd92c68e61f1f2ac5482aca9838e1d. --- .../public/assets/farris-all.css | 0 .../public/assets/farrisicon.ttf | Bin .../public/assets/icon/iconfont.css | 490 ------------------ .../public/assets/icon/iconfont.ttf | Bin 37080 -> 0 bytes packages/farris-admin/src/app.vue | 6 +- ...ion.component.tsx => header.component.tsx} | 66 +-- ...ion.component.props.ts => header.props.ts} | 4 +- packages/farris-admin/src/main.ts | 4 +- 8 files changed, 34 insertions(+), 536 deletions(-) rename packages/{farris-admin => designer}/public/assets/farris-all.css (100%) rename packages/{farris-admin => designer}/public/assets/farrisicon.ttf (100%) delete mode 100644 packages/farris-admin/public/assets/icon/iconfont.css delete mode 100644 packages/farris-admin/public/assets/icon/iconfont.ttf rename packages/farris-admin/src/components/{vertical-navigation.component.tsx => header.component.tsx} (32%) rename packages/farris-admin/src/components/{vertical-navigation.component.props.ts => header.props.ts} (35%) diff --git a/packages/farris-admin/public/assets/farris-all.css b/packages/designer/public/assets/farris-all.css similarity index 100% rename from packages/farris-admin/public/assets/farris-all.css rename to packages/designer/public/assets/farris-all.css diff --git a/packages/farris-admin/public/assets/farrisicon.ttf b/packages/designer/public/assets/farrisicon.ttf similarity index 100% rename from packages/farris-admin/public/assets/farrisicon.ttf rename to packages/designer/public/assets/farrisicon.ttf diff --git a/packages/farris-admin/public/assets/icon/iconfont.css b/packages/farris-admin/public/assets/icon/iconfont.css deleted file mode 100644 index 0ef374b24a1..00000000000 --- a/packages/farris-admin/public/assets/icon/iconfont.css +++ /dev/null @@ -1,490 +0,0 @@ -@font-face { - font-family: 'fd-i-Family'; - src: url('iconfont.ttf?t=1640255080725') format('truetype'); -} - -.fd-i-Family { - font-family: 'fd-i-Family' !important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -.fd_pc-response-layout-4:before { - content: '\e601'; -} - -.fd_pc-response-layout-3:before { - content: '\e602'; -} - -.fd_pc-response-layout-2:before { - content: '\e603'; -} - -.fd_pc-response-layout-1:before { - content: '\e604'; -} -.fd_pc-city-selector:before { - content: '\e600'; -} -.fd_pc-shenpiyijian:before { - content: '\e073'; -} - -.fd_pc-eventCode:before { - content: '\e071'; -} - -.fd_pc-delete-element:before { - content: '\e070'; -} - -.fd_pc-enable-function:before { - content: '\e06f'; -} - -.fd_pc-dragHandler:before { - content: '\e06e'; -} - -.fd_pc-editEvent:before { - content: '\e06d'; -} - -.fd_pc-extend-setting:before { - content: '\e06c'; -} - -.fd_pc-variable-setting:before { - content: '\e06b'; -} - -.fd_pc-leaf-node:before { - content: '\e06a'; -} - -.fd_pc-import-from-cdm:before { - content: '\e069'; -} - -.fd_pc-root-node:before { - content: '\e068'; -} - -.fd_pc-push:before { - content: '\e6067'; -} - -.fd_pc-save-sync:before { - content: '\e066'; -} - -.fd_pc-delete-obj:before { - content: '\e065'; -} - -.fd_pc-sync-bizelements:before { - content: '\e064'; -} - -.fd_pc-basic-info:before { - content: '\e063'; -} - -.fd_pc-advanced-setting:before { - content: '\e062'; -} - -.fd_pc-add-new-element:before { - content: '\e061'; -} - -.fd_pc-corner-marks-right-bottom:before { - content: '\e060'; -} - -.fd_pc-add-virtual-element:before { - content: '\e05f'; -} - -.fd_pc-cancel:before { - content: '\e05e'; -} - -.fd_pc-add-child-obj:before { - content: '\e05d'; -} - -.fd_pc-add-same-obj:before, -.fd_pc-imageupload:before { - content: '\e05c'; -} - -.fd_pc-yilaiguanxi:before { - content: '\e05b'; -} - -.fd_pc-shanchu:before { - content: '\e05a'; -} - -.fd_pc-gengduo:before { - content: '\e059'; -} - -.fd_pc-git:before { - content: '\e058'; -} - -.fd_pc-shouji:before { - content: '\e057'; -} - -.fd_pc-diannao:before { - content: '\e056'; -} - -.fd_pc-quanxian:before { - content: '\e055'; -} - -.fd_pc-daorudaochu:before { - content: '\e054'; -} - -.fd_pc-dayinshezhi:before { - content: '\e053'; -} - -.fd_pc-yewuliu:before { - content: '\e052'; -} - -.fd_pc-shujuzhuanhuanguize:before { - content: '\e051'; -} - -.fd_pc-shenjirizhi:before { - content: '\e050'; -} - -.fd_pc-bianmaguize:before { - content: '\e04f'; -} - -.fd_pc-zhuanyebanshejiqi:before { - content: '\e04e'; -} - -.fd_pc-lingdaimashejiqi:before { - content: '\e04d'; -} - -.fd_pc-didaimashejiqi:before { - content: '\e04c'; -} - -.fd_pc-geshidingzhi:before { - content: '\e04b'; -} - -.fd_pc-kuozhankaifa:before { - content: '\e04a'; -} - -.fd_pc-dingzhi:before { - content: '\e049'; -} - -.fd_pc-ziyuanguanliqi:before { - content: '\e048'; -} - -.fd_pc-zhedieshouqi:before { - content: '\e047'; -} - -.fd_pc-zhediezhankai:before { - content: '\e046'; -} - -.fd_pc-xianshiID:before { - content: '\e045'; -} - -.fd_pc-sousuo:before { - content: '\e044'; -} - -.fd_pc-shuaxin:before { - content: '\e043'; -} - -.fd_pc-anheimoshiqidongtai:before { - content: '\e042'; -} - -.fd_pc-anheimoshi:before { - content: '\e041'; -} -.fd_pc-tag:before { - content: '\e040'; -} - -.fd_pc-html-template:before { - content: '\e03f'; -} - -.fd_pc-button-group:before { - content: '\e03e'; -} - -.fd_pc-display-field:before, -.fd_pc-static-text:before { - content: '\e03d'; -} - -.fd_pc-QdpFramework:before { - content: '\e03c'; -} - -.fd_pc-check-group:before { - content: '\e03b'; -} - -.fd_pc-list-nav:before { - content: '\e03a'; -} - -.fd_pc-nav-tab:before { - content: '\e039'; -} - -.fd_pc-file-upload:before { - content: '\e038'; -} - -.fd_pc-section:before { - content: '\e037'; -} - -.fd_pc-jingtaiwenben:before { - content: '\e036'; -} - -.fd_pc-discussion-list:before { - content: '\e035'; -} - -.fd_pc-personnel-selector:before { - content: '\e034'; -} - -.fd_pc-gags:before { - content: '\e033'; -} - -.fd_pc-module:before { - content: '\e032'; -} - -.fd_pc-multi-select:before { - content: '\e031'; -} - -.fd_pc-sidebar:before { - content: '\e030'; -} - -.fd_pc-steps:before { - content: '\e02f'; -} - -.fd_pc-splitter:before { - content: '\e02e'; -} - -.fd_pc-scrollspy:before { - content: '\e02d'; -} - -.fd_pc-multi-view-container:before { - content: '\e02c'; -} - -.fd_pc-list-view:before { - content: '\e02b'; -} - -.fd_pc-charts:before { - content: '\e02a'; -} - -.fd_pc-image:before { - content: '\e029'; -} - -.fd_pc-scroll-collapsible-area:before { - content: '\e028'; -} - -.fd_pc-modal-footer:before { - content: '\e027'; -} - -.fd_pc-wizard:before { - content: '\e026'; -} - -.fd_pc-page-header:before { - content: '\e025'; -} - -.fd_pc-component:before { - content: '\e024'; -} - -.fd_pc-data-grid:before { - content: '\e023'; -} - -.fd_pc-mingxibiao2:before { - content: '\e022'; -} - -.fd_pc-tubiao:before { - content: '\e021'; -} - -.fd_pc-query-solution:before { - content: '\e020'; -} - -.fd_pc-liushuihao:before { - content: '\e01f'; -} - -.fd_pc-switch:before { - content: '\e01e'; -} - -.fd_pc-lookup:before { - content: '\e01d'; -} - -.fd_pc-erweima:before { - content: '\e01c'; -} - -.fd_pc-radio-group:before { - content: '\e01b'; -} - -.fd_pc-organization-selector:before { - content: '\e01a'; -} - -.fd_pc-approval-logs:before { - content: '\e019'; -} - -.fd_pc-combo-list:before { - content: '\e018'; -} - -.fd_pc-input-group:before { - content: '\e017'; -} - -.fd_pc-textarea:before { - content: '\e016'; -} - -.fd_pc-tabs:before { - content: '\e015'; -} - -.fd_pc-OCR:before { - content: '\e014'; -} - -.fd_pc-number-spinner:before { - content: '\e013'; -} - -.fd_pc-field-set:before { - content: '\e012'; -} - -.fd_pc-list-filter:before { - content: '\e011'; -} - -.fd_pc-avatar:before { - content: '\e010'; -} - -.fd_pc-date-picker:before { - content: '\e00f'; -} - -.fd_pc-language-text-box:before { - content: '\e00e'; -} - -.fd_pc-discussion-editor:before { - content: '\e00d'; -} - -.fd_pc-button:before { - content: '\e00c'; -} - -.fd_pc-yuyinshuru:before { - content: '\e00b'; -} - -.fd_pc-rich-text-box:before { - content: '\e00a'; -} - -.fd_pc-dizhi:before { - content: '\e009'; -} - -.fd_pc-time-picker:before { - content: '\e008'; -} - -.fd_pc-input-group:before { - content: '\e007'; -} - -.fd_pc-view-model:before { - content: '\e006'; -} - -.fd_pc-check-box:before { - content: '\e005'; -} - -.fd_pc-file-upload:before { - content: '\e004'; -} - -.fd_pc-tree-grid:before { - content: '\e003'; -} - -.fd_pc-response-form:before { - content: '\e002'; -} - -.fd_pc-content-container:before { - content: '\e001'; -} - -.fd_pc-fenlanmianban:before { - content: '\e000'; -} diff --git a/packages/farris-admin/public/assets/icon/iconfont.ttf b/packages/farris-admin/public/assets/icon/iconfont.ttf deleted file mode 100644 index ae8d3ff7e1832d16ec45ed40a09b4972d1a7fb13..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 37080 zcmd?Sd7Ku1 zfan9}i|C^XC?25jh))m&QRGlSA4MIN2Ne|$P8~$t~@ZWT}6_%GI;8R~IjmBsLADtCp_p8?1#l{}TBRAiweSGdG?6 z;4`22jwH!1NRs1>?Yl4BcIZ%~EJ@yFl5~-6$JR|-I+r|LN8JWOZ3hb6`RtxeXKwxGg75B@ zr1z|nB!2bTXPvkArbq9%Uy|O}kRa@^mgq6DQYHW+(O z(`Woya@$0OpS?KqHcHSLO)pb7%a0v1>@>J@=za$+IdF#4M>X*hO zK6n0-Rg$)Q)80K&T(Y{it{a+NFvBIO+j>pD&4LZK5v2qr-8cifQEp>H$h*W$;EipK^Io*Q7(W82Z%B@>RseKL4b2LGQ>md_0T3%Sd{zMLN)5vbfMTiPw*uf!-CQFTOD_~AbjUFpt zc1w+3D`1{WjXo=2#!HQUD`4(RjR7kF3rLMYD*zuz4bTV*zzkAj$O^y_Qln}GU<;{H zvjXsj)Btxv0T@JTOtS)TiPRXj01mHxeLF0%3>?k#8d=Y>r zr3Q^V0x+i3pznbI+$lBaJ0SpzN)7sc2*9UOgT5;QQI-aMZv^02sX=gn0BkEY2tE*i zccliw4FWK*)F60504|mq1ZN1q%2I>i4*~dDY7kr^08>j1f>#9KY^gzTi~#H{H3+^D zfXAfpv@KDlE1$Pd*dI{G)I*LPjt3lnbslnUap&D%_008r#k)+Cv`e)=>3j5# z_-;4C#xwr8{+|SP1b!G?68uQ;_0aX9r^3X|v7d8}LZ#%c`<>DE|7fRDh&y{(3OZl1h zW$i!c*xd0*r`EZx^NFtht_!-J=w8<&^<35SRPWh+wZ3cn)BVp31P87fcxG^LaBrnn z`TEe{&@6AHjiTLh#SDbUBmy3FPH-a zcVLzbfI}Dzhm4@Tkjs~<#!#)IQ+2+e&|lNsHdOa<&CM6% z^r?E?4De4kPv)OC7u9NbJiq~-@pAEu1z>{(z@AHip-(0%fG15c>q$r1)RTsS;S9s0 z&SX_QtNd1VB9*B+#ZaYMc|+j8%k*?-&3d-GJIfw3>n@!!ugk_BYbB`sEw478*f?$D zFv7Hr{MGL4hp9560d(+T(cY=x%*_k`?iz1Zxei~l^+#}iP!u$g2|p> zr^AyAc00UTcOs%C2Iq8q!xx`Ew8QDn7M**NvR@wSy2l=fd+hGevhok!F_7ZLri8$AjsCB!x_ooy$QE3R1ACda51cMZ^XOmeW&&^f5(oe{p~@Q|EuhV zAW)zXXpa0?{<$EwYL zveTt$uAM01*ALxIJ>5M-)ix=z%w@FF&-I0T=HHltQzmTwEu6`OnG()4w@+4AY%=;# zHmSHlSapuHMll|3hv+K?i%-uZZy)}1(&BI+g34e?4+IGx$tz%XX)<#(b z@etiz1)Sr9{^Ree0t@8rDVh`-2b6~g@oiD0{y%(I{eSVZ-aPr89KMiaqkZzTUi229 zb<u(j&Ob}%$X0(W=0DNAV>O-G`_Ae*>n#4mu1xcn z*YsV?eMh8y;>lMZIPm}S+!juH!!!R6o>-nFxw(JlX`k&nB8jJ!{-@7M!+PA< zf@}Uq(udr7GWgA4G9FiKF8wYo7*AB% z?lOFd-sCqEy$PNF%oTJwoMFWl%@1E<9=v2YAGIkl6op))E9RZQ@jIuzW8MnZ{Ov71 zUH4JM>=QcvCMZ9ldQ}_~4vz!JRJr-XsoK6<+&-V%iY9y5?Q`+*U@{qO9-^MucVwG8 zsF_Pe=5uX>_6nX1NAr-&ce3ILgluky)2(~ragXkHI^9YzsM?b4y_uNT?e@kpy=Bhh ziA4OiIR4I4J-SB~(OxP%lcK9Z8gZB}CE{_&Dm15o+xG$d(vXKrkhvh)VYqu4Na+{@ zHBN)ODFA1K|FlO88e%yYvi>Wf0?QNf2gg#YGh%1LL`&rg zKTq{1Yw3`g4y74Ohwk|h+hE?wV&*TexrPlW%2F-JHLf~XLMwSs)tENyO1h_&I!i0e zmpuzUSNx)uNe(3W5=1y2emIm)hnimmbsVgnR^3=NUuAwds4a7c9n9-x-pyLsTXVUl zmAcwaHV-fG{ag8fhvb_h`)mj0g}}g7NZ?DLnb<~{~kpq;5j1bUt4*U)BK!PE{7Ue3CbkJV3fK$L>?k&>tjqM}0^|=9=^<ytR35(LqF zbh3hzS!G?U3T}<+)q5E=69ptage&Zx{LE=xeSKZiX6C&enXbV~XQso;hs;;UnVWa@ zb=7AUydBxj!NJaKhqo}ZUK*O1yPh-uXJZD4aqJ=HIdxyLou-{8ssyaX)WO$6#3G^di%E6M;6Ivia zzyN6`6bKbSf(uoEzRm&u#EjtrfIrPDb$|q>0we(9cER3Y`rMeQ<#~E2!xv_2Iav$% zcrl?i4<*{=Vq9g*9(ZK=Bm8ldtH!RKHdi#jm}BQoS!DsQ;zsJ2B4>qqIU!RA;UCI8 z=hC>xWqZQvr+FyZ&RK=uI=}f>Zl7=Nw=u4su~T;Nzwc+NYp2`c5#RG(`Du9_v;m`} zWeZq%7I=B6RM&W#Lr?(=s>v80VC;IWmjQdD1P4B4eTw zeMwLFd-0N=om;O1rUbK6&8MVjnsP$xLYQt&p-|O*A0wQ3xH@8C8!eO5(hvzICMt2)~ zyz{0n+rH&AU&iD0op;gLx&0?i)Q3j?&wZbnH?Sbso@nlJf59H`du@vSL#*spd`XXa zp9Y~0I+P=q@#lp#&jW2q9NL^Rv`tlL#%4o{w+tG`Qy}p{N5cxl{t{KgFewEPBx{x< zC;x9>VtY>L9PJ9`%lQC1^8|4YAQSx2|3_^loLL%gE(5jyVLF0bb-)Lp@frk(2A?Vwpt%Mj#^* zz#hNe9EuMVgKaa~_)1F5E+?9IC(7jnd*5FkyN>QcEqt~)~*1DOy>)K9FmUwc|14-ToZI=gHx2Vv( zNX1CS$W_a^s!|A5z<5{bKO)iv73sQ_*?GqI%)hKMzsx7jI0J0*Uz#rdmj})`!~Dzl zx0$!Fg{zSM@7?Ar-&?)>E4z8k{L^X6PFqfiS9UC)cw#y9dlG{Md7o__?tg_OMa0Ac z^HUj&gezer0)={|3T6oZ;ERY~QcLB03Gyzg0vm8mHHjTWnie8tX#xI)!2$`D$IBQ_{|xN>gj0Oy>V~wVoz6j{^-0^ z43|8Ca3QA#RXyeic@wNV=JPo1q14iWa6s2ptuGtt$|hW0y2~!B+#dJY?KX$Y>-Xv9 zPtT3Ir5GaoXcyRn>xt&}hQ^{o>5(uATdEhg8h)a7g2U{yMvQiMHmX zxrMBYc>}3%(8IY$mHpaab)CusiDWWa9(8e#w^PHzhuR0V4|dM8$sP{j+{QVi*>Vn2 zHls~;B;!xykW#cvM~fcfk*_|`4Xu~f_C|%ten+-<~Pl6c8oBdNko%;OKF-@o>y+(Ru1_2cGVs= zKlySXq{x~}v9s^z6%2;?pI>$QT&kw4Y?sUF@!A5O_jqHesF$%!N6MV7MUzo)x+{HG zIGyQCr`bO9Kz^D_VQjdAe=aiwZmFwH)6IiyReQO)2AUs7nyvhO+;Dj~OKDN|9f$7s zxfqjep(yDRV;Y4}lBI%L)T>3cP&%^^{o?>kTYAi!<;9rweUNY$z)E$ckZ6b|r8ZC`Qiz!0WoJ`?c|FDK|A2_e z-LJb1C`J|YuhUg#mmML8ZKKK++eSz91Cyz+9~HY^vnn!stD?N9R{An^B%ZiaYYa(mY<+=XSb>&}##OLl#P*C}q)-*=NCQkdbaO=YNhAYU z(^YW6sBc$|3X~Cc!MOpB!5u+52nEry%024ocXy_no^+?7r7M{( z_w)jLCS6HuM)SOryaCQ4m`9;t6#5JA&trbG+aLSTvbI2s|3v057|XY>@ckE;nT@}y z@P7233i|W*N9qu%?}ju?o1_}>qPHn#g%2RnKKQq6C9{&4?4XDdngc#ooc?H z-4QqYxtwcn&&m92ico9VfQPS;P0;=lq}(yGZz{Q75GV|Z7>>UOU28xC7Ep@8g|G<# zwLqG5bs0{RzK1@7Yod@mLIH4Q7#+{2RPGzQfvo9(KeJZpo5wa9jIa1l8fgMUdQt{b?q~o)6yhA1V$shas zV$Cn*dV6#7>RfNYyv_WpFAP1X*Bb~Qxhdi^SNkH@XaRmgP;0pKW(>BDVztPAenb)j zB;j58#Xt22dvk{mQZIadtgm@)*!Oci6!88M8nCs#2zvRqfF=)Vzwr8+--VKYR{(t! zs|(^ZEM$fvJJ*rRzyn+kj;{@x>-oS~E1|#M2s0wy5F(w>*@JZ<^@U(v@HQm$rC1I$ zmI2p;{(?e4I}H*$M07QR+Nj&oQeYg^0XyV``an$qp)L=UKy)JmVYb&i>17w?b z19)*}HeV=Y{+6%wg`1mLh;KZ3@xspT?#_jaKQoy)dH(tH=AHimioO*7MHqLdi0L>* z!XnZ_I`=%29!%qCW>b}PI31STL;BTM>ml=7$8{!p9dC7qJ~tojrAPEDB8-#$IJoEr zg`6Ot2|%><&8-hhD)_QYI0Xauwg8}7$l4AxJ(G)RbQD?3G*Jkn6S5bROD#+y`!fI2 z@qlB@y{UQ8+r!DIZ4=?@P0px~FtquI#{m6gi$*L|{^R2>v+3fpd0*?YQ(kvGlo`!U zZv#}Hux(KT4%-%|2GrecgngXNP=lCu+-&>1OQUKK_?<&BLA>Z8=wil!xx2tEkHP~1 zcJN~V007D$v(Ygi2*Oq*YaqskW*ga{FoZ>D+G>?z3&E3B1Y+zIvJVJ_1n?6|r5M8GbLH@Acn=0`nTLpRai@XyAQpj-Z7P3R-wHed=;5py(U2-N9Y) z?l_L-I3l3wwfvAb5b&B*_L0E9U2~>4@KgY3&7bgp5@#IdE7qCjAlcN8$PIouK1xg>UHvNfZSqMVu`3=)^7v;5jm5`wSf2 z%d+zyv;_tdZ8M9-nQe)Iptmi?yxHYl*7cs{nUPyzxt+Qm&Z zNG>Ym?1ucTyiMpE;LY%6`i4Gmg~#X{U>QBCZz$+IL`I(=P|65CI#3KS$*7>)FvLKS zG71j!qq*TW4n+gso*yo7Ed&TGrPSsfsZJSZw)x?wRzJmqoO9=Giq~){4$o~om~h$b zB5QNGZ{vDEB^|@|R!={3>#&6?Kd^cbJ=OTXFKRY;c9Ho!vjsnPYzI!OKUuv^LA%!X zwd5>?{31et%Bmp)VfJxieep8%8sJdmhvLNxzi$uPb7#7ODc31TeZrLv?kgwcuQspz zsjBApxYHrmDXMyxJDet;h9eF64;W83xb`w^Dl=h`J_Wv0=S%-0eNehp`Wj{spu(~+ zVm=%*2f%igOB!h~tT|C`nWik$mSv`TV_GmllijJ%_K>tT)w|UX*)j!d8wrn*LD$NI zJpvgd=9iR;E%nhq_c_@$yGeOWQD7?di+n2NNvj@zPc)AU@AQRzZ#>*-BS;N{sjA;D z`@#<$ZM@5)>mG`J(H9Lk!(N*+*U^W%S6Y2sK>*UrCIQ6O`k*ZUQJfZlSaoaGDd2Wy zT!w+nmey_1`J3GENw0=Fv4|tA@iwce6?;`%AZ(8yv&MQlJWlqXgfP-$UuI+AS$y!# z>45(gypljdG&wCp(ExG{Dg%sSVGWsh5rVneP?^xgKP2(;C%ewM`0SHGlukb9qH`wt z`pm=QyJybay>Hj}_^uu9OxS&;I~{hLOa2ixXCLT3+Q|g^GPjTK+Slre&3A_~?svOF z8P}z6L%#`M!Usp_EiOlzbX75MX{+IJw;gZ~O#<<(p@AR>Ms;AQ4z8szkOyI|3=G2m zA_86wT1|mv`am@xN0EvfunU<=C0Pt=Y-naH?06FsJWq_AsH6kk3fU?`P2M8M8d)}; z&6r%O|tvxeso`Us5j@_Vb$2-gdps8D9xvwUT(w!GA{A{{GjcKgxl>Cw?jPM z+$U$nBZ}zIndAk|0yL+Feq$9_6=1q5$zIqDcmA>~>_oe|VajGHyo!h%4Ivc)!m zYKfsfegMrZ(bKE`$&q6ihGT~#8%X%wPTS!>I=s;G$M79`^A1_h56Y~VI4p)-9>*9Q zJ|t+={qm#o0&pQC)B0Mh4BEaKy!SNB;kSRna8HbfH)iSX0 zK>OQjYXQ}=*=lnAB+-0N1@*FE56-S$~}(C4*Z=7>0K z=6|^ZajR#nk^Fb&g(`C+G`aF%qX zf?QS1-#BA#zKvR%q5(8t;xWWML<8#V>vRvm1o6iEY;%EsoRFGoLR$1t%xWOGGCo^`Wr230hKs#Q!*Fumkmyd5AbWBN8#***>S8{j_~<`JF~IYM2F2Bp+pw{Ab;fe1t`E>~c>u z7mea6%SnEH^Xz087S^<--#rj3|4Q3uB#`0T=ddZX>T@(S?mMR>|iBRrrCR*gcaRKOcSCK`mV3}C!m zNHeI{OI3)6cp2D52k~j~j(H3PR38D@lXBI99W{(fwNM3%5ULm$j|v-j?abjFXU>}Q zFT1x-fB(!Gt}}gmw=Zo=mx@=PSZrsPXL^9$+@aYamxpytoXI`&4UhA}3wNJ>dMY#T z%){*W3sx^)_{Zzkthl+{w`LWaS?xY)qNjh;9Rt1Wcb!>1;R=OZ2|e4{yqo)*FRx=B zSBMR*JJ@sSI`i?Fxi-?{!$DzyKL@{+7~b-zcfusPs>31%dP+=Pxh5zAkq4CK)exY6 zsLWpvXL&ASjz@B-5PQPxS7dfbR=(-fK@R4MnAyy6J7-TR{Ml5f`9LI>i|}!@GW$P; zS*gf7p#LSGKZ+WPY<`&Su=Ccl?ZLBUpsOJ6Pb!LgV+b+kQxXzk-;hums%4BTv^K|U zG6d-pM6J%o-9Dzd<{pZ*$)H1f;-ymj&^Xvw&3)0neXliduqld-?}7Qqdm*|OkW1_f+N`a?tK2N0-=-H2aQQj((ohc1l^k&SC zqC!drNIgPr50;p82_*j2;1O4;7lcz>xk?fbO2?p?!#~X>yqwU%lrfh^LEJeU67k3| z!^y&ZtX7won)jHWb9oeRtgCuo*5UN^jh|BPig|6!W8TH&6YBwJpq!3On=Hpd^RsPX zSRq+&TODL))Mn#Mw!0LU*K2n>Wd)*x0@JbE3l9TD=AYTMOZK_UHNixst9qKxW^+W! zFuYe1LG~$^uepT1zJz4OM`fEfqfk!A10HWCQBaDbu4w@;(*oaC+)&clRdhXdBaiBk z;n;{f*<=BNBqQE0--+=Gl5aSeY$BOLb4)7sYDBFnR#_oeRU=i)!UWc@6WX$3+{ko< z*_NlDW}qF}i1`Ro>%$!xBhJ?VGQT49Z`-I~$JJM_o(1vr!ANf7)mNV)+HDQA*5}E8 z#lr+3YZSzyi#s! zKE%#6Z)6`ZC%gt!&Idex=z`nY2HV=$U!RC(<$UakuB3S)`$Dqoi6_kYmbm=aVzpGN z7A<|jALVQL7vV)d=`CCZ_QAbJNpx;0+MtjmC9e#YS18&+eej$)_+XLWu+j?rFU^mK z(jN|`(m~dTICM)oD01HlrBfl^)%^I@t+%jE=Etm{r$djWI#W0v3#D0Kx+9H)-DsZ4 zHdO`(w^S-yD-}W;1mnMyZ<1p|KATQ@RiFuCNWq#KL&v7;mM5T)VZlC-C`G~&7z<1Z zj4phGloGsXK_iAhG{M4>Tm@bh8K?)~P*4S;8DZT$J?1k#=2fhxyW9L;&o;ZyzD_1M z>M74E`J5h)(>K0*ysD^-e^oK;Yh~HayGyfi$?di-!H($bHhivPJ}$5Xb^}Mqw(U8 zH~%x<))r^yay`)-ca_q5aZzWR8NChA<+%;hkU0<2WIXK9old=E3PT9%bZSng#!kzw zf}U+oTOyxNtjdPd=`bTVSUJ`fYwnD-v1l@z=t=aZSDn;lV`{8zzh$>D*W%2anxQ%G zqm)B8G{>K}d1f!jxm|tJ`<&Y|p)9$?qDw(D|5M&5m&Gh9!|!4c<5IAU>7jzqvWnLs zCa7phY+^LX@d(^yJyOTyuIA+UHKkcgW|gi1G*cP}7v2e`e) z{t3B&RTg<#0mDG23G^(X(FvE;A~7tooiH#^aiCUmq7G^}g&!>3q3Sih-stn0ryB>9dm-elfv^yLh8jW0!hUG)5)lfMlcT(6~3 z120bE1z-l!9n#Lw)ARf{QNxIux62OKB}*0{M#c4zr3)Cx9d&ECA9I^pOJ?pEMl%^#ziU=SVh1^MB8AKFr1b{^KAfaekv zS?GP4Y<_B?7rkXY@Rn-foUdb5_61liGXPu8PT|c0*BaBA?B5vNlIO=xu zs3*t!rkC5&b86QnXY>`;o<9DURL&iNgB$a>W5bVJb!+dmk?5w0%WNa2R_b#*dCXnP zan{knSjd@-nq%yS_9Ej!MVV;{J#d_^b{=x)v#j=4R&1iwRv0|HN5 zBJNim{Png(((iyV1pb~!?v)=0?C9`7@5VZ^1+XG+$GXY)U>>|dC(zOd0CoWI@)U9- z^&SwKV5@+p=^_le1XiLZWW6`^0|uX{`6NdvR=J>H3J-Ju*B_f_`!e0#nIjU#a+fCn z&o!HQ0P?=i`}7gXrmDcehYk8OEuTG#{j37u8|I;~Fd zwyVT?6AU9wSTYApx@j_a9a=*rWNxy5*8?PiheMdRtrZkyT2>Ol+=g$B@J4{AR;da@ z6iiq-Vj%%iunWK>*)~>eYSvlqJ$zGJjQ=UtW}dBM=?ITy5X-Uezf0xLOR-AC=aB7t z&Qg_V%4tq`6z85jcJA`K0`5yy=D5_E=5v}_tia@51$o~w{qjGdfAhiSx4`ej*wb=M zH*eSd_L$B#`3&QL%dNW)0y;f`faB(yJt;qVzGgf(-|Pql-1g-Xy`oB)UgtftA?$U<$xp_Ts~T*)*XvgJWQ7F!?)A~`}YA)r>|V06<&io!|5q`uhvaw~TbpY`5Dm+{>6Bi_8xHfxqn55C7Q5 zKD%K9Th#QseR4r>exag8$U&tu&7=xq?!KXOB@QMYVGVPjb2v!iI+~^pIImK{obe- z2RpBIHIPgOUQ%xJmXfktx!?kHY4a9zfRh@puqH3p(tL z#3No2wbCrvo@A{t`45aqK*~YFAB6>60xki$=U7_A?fCXHxnLr&q)n*OD;OO@*sa|0 z*N`I*2xF!1sDfDaDPKZqp~ngyt)i5R=+XbebCCe%6t=Y6UPdCHIwxCf|=mS}>@tE*g3_+%Fd)S(7_cub;NeV|aY2pV3$3a2r};wZpQ$crMKS%YDwH+P0< z%EO)an&zdU6vV7|2U98Y<)O7hIF^!y=1btz;pCw)KlAtYwvD#6jmqOj7U<{9bTy4c znBRyF7N>$uY8&L222=M8t=+M9h#PL$6W~DP_n7y4{7`!$@A1ztUn`6*9BsoqAYMs= zz1a=@17z7ER$&Ovri3YAx%LucD^_?Fg&P}&0mw98lK0+T^>|XLD^{;qw(_EII1t#o zV(H4&b8q)RL-^4`xwPPvts54U%L_JaJ>`Ut&0D>4>56mwP#RvcYWa#)mnRdNR=*v3 z$A=4|T4^DwEhv>*&vPsP9q`sHj5@e3LCD77eH^Jn^Z`;91+`u-lglwnb5wz*qb#h# zM983Vwx>Cl#&#DRsi@*8o%Qa0+sD)9bIZ<~opP~I%C*)ZyF>2!?$!Oxmxc#HpWH^kacm9u z8mq>xiGIleoiN#?E*I;0E8xRdVvmM*NLLAnBByvE!V-KG2)fAh0>)BEg;+R&0y6Ky zE(1n%6x1HdA7Q1Tg$l3_6RLrB4NXJ~$bYCTI#q$Z(FRQikEndSdg)hP5^6m0TklcnbrSaxM!WPSN$roQ_D?$K( zBP)1&@I;drNeC!IDxhNa<2_#=Qy|Pbv@_PN8LGDBZOoxL-?(^9jo$U)2t?#c5tv_XmZCj@rx)TbCHS2fIIA;JEhiz>1^zHAwXvemZvHPZvSBKWD zJ7dF&<+W+P({`PE`livDEj{LQ&|^k17l+|*KIw5~`Ab8;MN3m)ucSFJ#U+DO6WuCX z&PK3v_A+%!-SqGcKH!+|MY>2P?uzi9Ox1UT-#>7pBcV6H7cCT`yvG-J+~_<4Ux>Du zi)OU7%_wGjduR3bvM>B5o}xx(R}{_D@t0C_Qm4M;)$=j-Y_yTxG?D)2KWQ(0X?^+A`2<4^CbTtm}F)l zLf}>H@S25y28j%8D@_Z)c~~XQ5R{%{yxdCF>Y)Pk=9N&S4C{I&Qmq(r@0_64d_)Tb zG#E-?;&@l0y?F)Bw^OdUIa!{AWse)^dh<>#@L%q5(zkkv*AoX4P!(0Pd#XWiJZ|^6 z?0y}#ZI}L;+Pp*iSJt|h*7-SFAm}xhXaP2-J;7e19UZ4Pa(?x}i;&pkIZ^q;qUh`Fx1%6x@nci`oNuq)9z(RqX| zreq_b(S9TC!3t4KYG^`%CCFoQQilY~lBF;Pf~ZyGJ;Z7^+rW&2p?|QsnUp~McEn#t zh#MO+n$PfFr1|`w^m^p|URi33Ha{LK6k`08Xd8Tknhnw+@vPUs-tQUp_ziE`{H`y7 zMRW%1O;a9)B)8!C&*hH@AJih`mgTgsO+X+jXhP{(A%r6Z<{VG0SYn?A1elw^?3}z# z?W*O~4lxDhYM^_XxcL0EdXP912rNf|2nyKh5P$_;R!s1nSmrirt#xCc_qojhTC&Za zbo*W_C8BNd`6n(&@y{&iA7X#D8|3i~_&ssPm8 z8buHcQZutR2+xt@S(AcnkxFOceZff`TQ24BPO452{H=37~TtxKrKxur2+X<<q2r}&sOUlPuQrw$X|kvNW61q8m9?v`Mf{E7-#4?sG=WA0c! zJ`Jc91lZ0DH8P+QEhb$Cisi*7JUQ`bcT;>!+TYxRh1OAn-{6a}Nb}{deC0+fX;>GS z3|nn9ANh)~&_?fz*SUPReC@ z$xq7?jHv%J2uT0Rh#5Et4Nc9dfbi|5ZzvSZp!l#45w8wipap7#jV#Jq%#muHzz=1R zbA|UMztb#YLkt}3M`=1Ye-7QskHl9kLZbhWS=0ltPX0)bgpxs)8sr~L4W^H4bLM2_ z2&x@n!DJ|+n?*q;euRGUycSPB7vD2XybEb2Fy!T-DttGmpuG@)-ZE@2+i5WmR`QgF zuzUxaoLZzt8;V2*u`-qY<-2m!=TES2e?~Y z5lwML!it(Q*e{|v&EtkC)D=r*YA>0O2>di1fIMRU*+Pr(7$Wq@FUr)i=GV~qLU+Ke z>_&o(;Rfc3(fpPz=zJ`igVi@xhHBU4a{B`LsQIuScc{^jVmF2|Y!ofbd;A2E{_6y; z6p@ARpT@YYfQ=z7)gd1&!?@vV<3p2=0Qr>T^BdO7V({>)xD4zMv8*OkcvvV$j4I|V zmKvd%H8a5i62Tx!t1<2!*`7|13=UnmJ(bC%w$JF8-`P2T#e&Yx1?I(ic-7KnC!aRq z)zp-B!Y$*|3&j9`@P~RhXdnu_ON)f^L0gc0sMQ{)i-!hhu)WknN5_H{^E(fJE95)n zQ-dRRJ!eZMy>cqq)i!_eJT36<5G^STo+Y{x5#XEbfv?N&kyWw2a)4Hw1L<(m!uLX7 z5Gi4)DR}W3m^#_w(1{b*NH;Gm-jGMjY8eI4VX7DcT4D|m0sPldflIW9O>uNqpC>l0 z=F3M_EoDS=EKqdsSTiwL8LF&V_r3LNsx@0>U}EhVEA6vqtLv@^^2;vc!7J9OvuE4a zBX{YgEOZ6?osn)2=b&8gn>E@t&2Eq7vw>XHNU=3?ZRq56Pp^kSz$=xL*M4vPT4=tP z@XIgfA#^fp7P<`a%lEO+mFv{;adq95cyAT&{fayxE8yt}6LpF2Ep!Xv2<8J3v$BjY zOO9W{X9_|bOnXy>l|Vg5raocqgum%zn%3t|rpXUg&IQxZ=?BfQb!IP`1@_}pD5IFm zY@3djw(|a|e%)g%qZd01Sw;e5FFARLz zi29(K`=Aj48js+NYy|6RTfE@q!gnMi-kNL)5|EnEo&a8j&QU%}uLy)gpfgi%id8jJ z>3`IYt-q64HW3-FJ;bsjdcN)f^Fq<=sT3P~vzq+bY^3?T;QHDkS!}z24%o{SC-j)E z!{oKkIxC&nuncw?IJsA7}ZJFTLRw5Z}_QDp|s(EW55#qsAkbQ8U ztXzJem76T=W`U%*jPGOdIUD(pp>bIR{lo@nD5OAzCKh-YF1T&-&x0lbQky~w7EDzX z;f5q4Tbj;!6bb^O0dbqpVe>?rl*TK7k1n8vpO7| zl@2HWM#uDNovhDQ87Y^C2VC5IPVblpd+q$rM;x6)osMF^TrH{Q6|UNhk`24pFvI6F zh=tJb=hF4_vCuQ9>*hA=%zw<|L3?@LszrlJEE5me`HYpLGE1giy)$~9@tED#d%~&( zT{4ehgMx@-#)-o=#!_j|z-YJJyf>BfMGadliXO4661v41i`sD3Fl;RuZ365C&F2VV zu_+l%5H;bzi8XSvFnc!-k@1^PCquMZpEXOCGLhy(;cPa{XGStJnosaW&FiRN;74@6 zMAjiYh2S+eCh#MTxy7JiOs%0T6Mdj1!K4p>6Fp3qq!GiiBN-|IqME%jm)gm7Z~5Hz z_PHJT{{A`r{kgGod&h};7`xxsZ783g9gTz{vwO}P8(4ornU~tWaImA3wJ%)Hx3=0X zpVvN@8qVo|xwmu1$tx$;%zi+ZHQVQBuRVEU%~)se+_t$Jc5W?y;XwP&;h_z4p;)xu zVJ&c-ff?UNK3NP9g(rn`QyHqnnOu>{I7K$tpw3YW=pnKn0K0YC|Eem zmf1oITjsLE_L^2=F}r+^%=kTyk|wiz`At|E1apARo%6{2fE}4n%CaYm%=tHe@Ix1V z>0ajPa^8)lhxaJ)1o$0GzP*v(h20h70;es6WljoMbA-4Y5bDCQt1N+_1;YZ|W?dv} z<|H=*oc7iiKb9psc+L}ayMvyGxQ3aoH~*xELSM+D0L86K*!qb|VXZ)oX6|h+@`DUs zop6GR1l_A*`52Bbh>SZJ3An8S^RFT!imeg?OOj8U@>>2mKztUkIi2>)2pl78f&v$y zdMpJ1n?@LDLhNUS3@v+}%8;tl%G3xbIIRI8Ft%LE!31RZH-u_pFBal5zq@(Be-P3E z*!uu8zHX)b-2Zjxwtdk6_n&|@UCd#7+JSXctG){7JjJQ2vMP&$llf=;p61mgrr6-W zJK^!0cj+GUFCO^dK_TPypF}n!E4S9;uR@?d&&px>)3;Ubk2>Ys>~?wL8ksYffmIZ@ zsc=SwU_OaE4+@&z2@BhD+Wi)IV2YlT9e}}0gv{|kiG5&%CtapV%_w-@kc>$HEGb<5 zDp&}E@hi8C32&J4^2xb=&U$jqg}HvYC&!hx_R{>Wd2OZQ*r@Ds*!briUZw{lC!EkZJ37X~(Zw$@hXL1O%y4S%v!to4bJ3MEMF?fWu3!4J`}0K^=Xuq zv4cukUe{cLEiADo<(I`N-+V7Sxwe>N_nNH?pM}e(GrlA)E1Th?xP&g8jza#L=58)L z+HR!zUVedjJKKy)@^tALtbNs zpI<*+_s7iFrpFA~yp<#+{x0*unDMedcF6mGy07%Kd9LXExaKYVx8J*ZwHJHTws0iv z6=#iK1$Ndsc-lffMeEiE;i8IXdHbE?A|bU7A-C!b5uV4>*y_)wmIh8P8F4 z=)i$+=R_wC{`B;&=I_yHdKWivnjP{r|LBAL-^X>FUWoahrL~HP#t*WatTu$N;MxPg zer}3qNdSsyUlu_38@ZPN9<$gA*sXLbZ2-*VgY-Cu;rtRa{?cf$&X-*4XXi&$aY{*1i@i$)BPKMTQ{YpzZZ3Mr{OJpSISh0*#labZ%YP z*pw)prEH6UQ<$Xwb+Tp<>wp5)x{Ths7<=qISa>r-Glw$6y-QD7+S|Ld_pXiS!hW2o zj#bms`>e9QyH5Kj>)my38V%7p(?^}1vb68-OTLS~a6{Y}cN2HL>+eeF^I79^Ie#8s zlX#(VNc8Km-v{=euII$A5P`N|UXJuT`QR)#J9+Tjzhru0LesVUNO< z{o&Z^9o1BK7qF!DH880)E%>&UcZ2Xk#iSUVNcMhrUXgpttH4nrJ`8cn`v)~D@;rFmX_|qMiVS!^W z9hdtO^A~!eW+d7}drI|0*{>-zT8Ntw;R^Qac!AIY0hjz;eu==hJs5?8#xaQ^Ibq~1 ztI$+quRv_kL6+|0Hd|n;owG?bJe%EUon6)SRW>j&WbUa<3=U3IoSmfnT1^qZM4or< zznn8qZk?u8*X>+W<8pP)4xHLM7p_{^DI$6t$TcndOc1usF|uh9clURTmee=f4n@^oKJUs2x%|D+^ zoO9}mrG5SVeM?t-Wiqi&^}&VCu6VpLp9@aHn#<8XJzR!ZyGZ7Gq$3n}8eW@!6kEem z5twFQsx7W`=jHryU5k6nJ+5nU57U5WU&sw}w$rINj4s2e!l@@1F3J+%=h)5S~kLJ8B!{uO3%fv}&GoTy4>eJ={iqN+Pmk&u78AbO9rt1`F4A zVPmlNB?X-oL}Zevz~CUr3rGWj6Sys*V}yqz*?B;H-&mXzT=DV63N6P&kgM2y0akVS zV74c1Htr>c#uRMLy=EiblO--_9~EZp3YH*K%F42=Vz;uW(zLB+hbC@f`<`9BnyucL z>0aHchPtb}GaIq%vf$ZRml4~j*moV9-(^>hyFPwIBJPDrY~RF0a~~F(;Lp=|m`AL=8EcxZ?y)sT1U9)n~Cv>6q)NHU<{@zo=G#$3w}-RrAlxt+u}P zA--Suhl~oIOJGlecH*e;$x6_uPmy}ScLI)0*ezBFVN$={8(M4s$SWDIkJrUd2fX!*G&kaLl72s5q51doMk(IJla}Hf zPu<+_4d87hinD(0h)6KRCUX1sPtLW!wdAPImLz!0lp&yx;P)$(a?7v`)yFZ~VOl1L zse$b!BiK6x^URV2*+b8hLYSi5Bh8O8@T;eSp=7U_5{l)~QF} z>)Qzlra)_rNe6`#&2lWBCA|Vkfp`rNSr{uoGx4h&^0PDd-;yXR?C|w7b8-9a`{nH6 zKgzn}mi;sHvF5H1Cp-Ae{h!@GmW!#k-4buNf!n`+j6E^7Uu25O+os0vIet)l+a7qi zyx*e!Z~JvgJP5(Z3z`i$D3A%1OkZWJvL?o=LW{`p3E;RlKs8ZPEuaz<$asDL4l2MP zN_Y-$3JC)hH82*WhbtF^3eLi1aFCI2IQ%?eAi0fVzurvie!tFtuKSzsvDpn*G1#6~ z^hady;vTo#6Kf0RT+t4%;&(-Z*#9IGkAC(No7cr0q2R#$YKPa=7bJJDkWaOH9fl|7 zRBf`{uEgS{?ugfIci2MwAl%0K1=f2C_(-Gsv1=*b$YrP8xh-YzvulQrHfmGsPYZeR;W$Lj0f_~Y<(^B;8CmfCQ*^Z;$Y z7+@~0ELN1ooaiV5e&6Na;D1M}-L269jwgpS*$Ap3GFQ;J$V5RQNF5!8dLReiMd)zF z2((59)R1Tce#E50pYkO%+4Z90$m`nz;a|B~F3g)AA2iZ0yA7Xvb@Lm4bT4Ihdkh~+ zAegx!R#{hl%;%ORBbo7<&zSpN4(4+?>aJo4yK497egT^mzW6%&rMe=%9?b#aoF}FLO$osalD1k9b|IJ(`vAQK zc^^=W*+kL`?e2|Od2>ebO@t%f)PfzQ&YIWI3td4Y8(A358o{oDZg^{*#ZD(S8g=Yk zSLzubxU+w}yS#p9(EJ(s&5n}4?JGOCj*N|sY~6X`j~KZ_GLe`DUj z_OSIq{W4z^kr6qXnlI{6t>(i|MZI$HL)bUi0Y@U2f1sT9CxWg}*spt4w+}o_Y*K$b z$>VgxzP3qv-#?}jEG#5}mU;-Rz)-1Lhf0kEL>hAJ696e2gGO6!z$vL#Ph%@&;4d0o zf^bE2Am#%GU+nuxi~H$ofvQ_HhO%$NS=)JaQ<7I?s*~Gk_E7 z3XmQK4nJRmrF6BK7;dpN8u}U_K_V1|ze~u`S#x=Iq~y5Lm&@fm1j-DjjRp?>QWqPvNp3JdvYn~II z(uEatiy?QO1x*F5fi0D>cS^ZFhI;`ju$d=D0kQB=#}1zuhXH^dsd$d^8eJ@+*;Mc! zzy!p9VAVm05HAfMHhiJ|KET>Qd-3*6uJ~OvuxC4EtW&|x7@Q1XDz_{6^%3L5Rrn1P z%?*1cm$zXae7hL>)dP%a?2^QhdaRY{xmACAlJ3 zB6sQKt}HT6TmwN;pa~Ke{m_0$J{3iapeS6lNs9gf`Opt(ktR;jA}Ek=Y0)+)ngDId z^!Ij`w(MNxvHN!R&HZNP&6_uG5EYhH5e&Esm)Grf^R>_1e9+e%4z##AKa3&6&^LG+ z5%rIQ2e?ISs`B#AD^u9J34TbbefHz-u(!kluMfv+Be7v<&A%TTu6azY$?wwDxN`@l z0Kiy({%z3RNvyn0VqF#eYI`>%VqobY7e0iu)FAomccFC6c8%^6vs;p#qYH&2i3ZKd zE>_*~Xijo}cAB+kUOLme+PL<;e3U=Mbv*IR@s8COq$peSE|*vM zO@-_`i?c^=o)0*ldWtokzIi6#JSrVXIa<Ga}rdp0>((f2w1 zt-+?2mZl&MuxN~U{T{9@+Qfyr;urdQ`fo@4&GFXpBa26#TwT5)!a9CTys^CcBpkR` zR-ao-KEE=63!*Wl5q<_&-EIL;wXGdI- zfwuMoyU#oP`}-}m^}#uhbF3RDIYyG*(L+f`V_&#)_wLScug7tEFp>y$c4KD}`|0qh z6T2Pm?&)~K+srvSzt!d7+S(U=iLn4AJA>oB`;YDKogU^JL&34c;8f7(Wqi0}{OEW` zm~ZtZ;*)XWkFB!Tu%DRL%V{+i{n`CmAUjsdO`#dt_QA}940F;lA(lvZXZ6#2%iMFL zZgY{_Uh8JR_x1RGrIGE;mwa*GyI>kV`Py~y*L{Q@>G8ejWBzx2J?8SWRX5kUpP2R= z_kdO@c1&x)A!1W0hh70m=?1d{Q(CAp)CK;iDJWh$p`>P#w)xtszM(-dJqH>0+jx%$ zeGHw$Rr@GL^Dsp5bnNi1+FzpmJlDB;er+%j`_$?3MV$X? z+k0@KI~s9xgjrkLsIa>^?il`0>sV8ZEBKMq>5n)+f-Qw@9OC*H65M;_v$GzF2^=1b^_c4)u(V_EX_}B`2c3F(2--l_*}+%n^tA!>f@;1K?14~44_PZmsEWw#CUa38Q?2jEE?b^@NaVHe;f8}?!@bH;`# z#OtUh=77Z?NHSiwVTM}#r44h?as7=A^Kk!z4Lbn;-G-eFIO*1gU4UaY>}|Nfk~ZvX z7-TOjYLci+nRu!km(!}Ut}6O^Mv#Riu^{KmXQix>7quNOJHQK)R+3dEo*bXt;kqm- zl2#A0w3VIG_4W9=rWWE$2wTeM)p$`;H>9*ap40W>+{6UMN$%rmwEz;-pzbb$v6OHK zU>qBj%ecy5HB}sPxo%!{+%pgY%J?qEY@3x?g+0x#vuD_|>_$US7gKpDFUcucRI^ebofGACN!b*OvZ%O= zs;uZnu{9^9WF>pm*fd00Qvu1Yw4s$$Eo9^GeC4(6TGg2@EG+h#KEx@TsQYf{;x}l_Xv?E_e6SEJAN+vI9 z9w{U1$H`+*+SVl{Ba|dvN2;5*L`^om*$$q(B(4hzf^U)wMOD)UYHLC|Q}Af2s+(^d zMWdASl*BDbD3z78*G`9;+GwU{AthJrG?lz5u_UJj8682hnAsAQv~)M_CNYx{6zN($ z1H00yhPEygL~XMqXmU2E3n^9C)k26cw`5H>#C#pwm8QV*0eY3r$@z?c`2F-$5(^SN z_{wr#l(UAYY|HLa4(K_QoMlN@4Ohi102lepO1=W3**1HgDVG&o5JW6fcGeLjQVLo`eabmeb%Q{N(A`KU z=*DnM8d6vQ$yoVErqD%H5VvenYSE@tBp{FKqyhpN$qE_=Lez`^@cOXh)=)ZB$zFtCro?N8+pb8b zNpIe=VYWBCXk0g}=$#pARUlo{YXDigmo)y!BP(v3_FNVLc@V5sgw3L0)lJGw+0?Ad IdTeO;A4L$100000 diff --git a/packages/farris-admin/src/app.vue b/packages/farris-admin/src/app.vue index 0a83987ab25..a97bf49e056 100644 --- a/packages/farris-admin/src/app.vue +++ b/packages/farris-admin/src/app.vue @@ -2,18 +2,18 @@ import { defineComponent } from "vue"; - - diff --git a/packages/farris-admin/package.json b/packages/farris-admin/package.json deleted file mode 100644 index 9e08aea3777..00000000000 --- a/packages/farris-admin/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "@farris/designer", - "version": "0.0.1", - "type": "module", - "scripts": { - "dev": "vite --config ./vite.config.dev.ts", - "build": "vue-tsc --noEmit && vite build --config ./vite.config.dev.ts", - "preview": "vite preview --config ./vite.config.dev.ts", - "build:system": "farris-cli build -c ./vite.config.build.ts" - }, - "dependencies": { - "@farris/ui-vue": "workspace:^", - "@monaco-editor/loader": "^1.4.0", - "monaco-editor": "^0.52.2", - "vue": "^3.2.37" - }, - "devDependencies": { - "@babel/parser": "^7.19.0", - "@babel/preset-env": "^7.19.0", - "@babel/preset-typescript": "^7.18.0", - "@babel/traverse": "^7.19.0", - "@commitlint/cli": "^19.3.0", - "@commitlint/config-conventional": "^19.2.0", - "@farris/cli": "workspace:^", - "@farris/designer-dragula": "0.0.5", - "@testing-library/vue": "^7.0.0", - "@types/jest": "^26.0.24", - "@types/jsonp": "^0.2.3", - "@types/lodash.debounce": "^4.0.7", - "@typescript-eslint/eslint-plugin": "^7.15.0", - "@typescript-eslint/parser": "^7.15.0", - "@vitejs/plugin-vue": "^4.2.3", - "@vitejs/plugin-vue-jsx": "^3.0.1", - "@vue/babel-plugin-jsx": "^1.1.1", - "@vue/compiler-sfc": "^3.2.0", - "@vue/test-utils": "^2.0.0", - "@vuedx/typecheck": "^0.7.5", - "@vuedx/typescript-plugin-vue": "^0.7.5", - "babel-jest": "^29.0.3", - "chalk": "^5.0.0", - "commander": "^9.4.0", - "conventional-changelog-cli": "^2.2.2", - "happy-dom": "^8.9.0", - "inquirer": "^9.1.1", - "jest": "^29.0.0", - "ora": "^6.1.2", - "patch-vue-directive-ssr": "^0.0.1", - "sass": "^1.32.2", - "shelljs": "^0.8.4", - "typescript": "^4.6.4", - "vite": "^4.4.1", - "vite-plugin-dts": "^2.1.0", - "vite-plugin-md": "^0.20.0", - "vite-svg-loader": "^4.0.0", - "vitepress": "1.0.0-alpha.8", - "vitepress-theme-demoblock": "1.4.2", - "vue-tsc": "^1.2.0" - } -} \ No newline at end of file diff --git a/packages/farris-admin/src/app-providers.ts b/packages/farris-admin/src/app-providers.ts deleted file mode 100644 index 3f7e84eae2b..00000000000 --- a/packages/farris-admin/src/app-providers.ts +++ /dev/null @@ -1,9 +0,0 @@ - -import { App } from "vue"; - - -export default { - install(app: App): void { - - } -}; diff --git a/packages/farris-admin/src/app.vue b/packages/farris-admin/src/app.vue deleted file mode 100644 index a97bf49e056..00000000000 --- a/packages/farris-admin/src/app.vue +++ /dev/null @@ -1,28 +0,0 @@ -import { defineComponent } from "vue"; - - - - diff --git a/packages/farris-admin/src/assets/vue.svg b/packages/farris-admin/src/assets/vue.svg deleted file mode 100644 index 770e9d333ee..00000000000 --- a/packages/farris-admin/src/assets/vue.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/farris-admin/src/components/data.json b/packages/farris-admin/src/components/data.json deleted file mode 100644 index 7559aeb9535..00000000000 --- a/packages/farris-admin/src/components/data.json +++ /dev/null @@ -1,4160 +0,0 @@ -[ - { - "id": "SYSPUB", - "code": "SysPub", - "name": "系统公共", - "parentId": "0", - "layer": "1", - "menuType": "", - "funcType": "1", - "menuPath": "", - "icon": "/platform/runtime/sys/web/assets/custom/icon/SystemFoundation.svg", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "BPMS", - "code": "Bpms", - "name": "流程平台", - "parentId": "0", - "layer": "1", - "menuType": "", - "funcType": "1", - "menuPath": "", - "icon": "/platform/runtime/sys/web/assets/custom/icon/wf.svg", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "HIP", - "code": "HIP", - "name": "集成平台", - "parentId": "0", - "layer": "1", - "menuType": "", - "funcType": "1", - "menuPath": "", - "icon": "/platform/runtime/sys/web/assets/custom/icon/hip.svg", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "7b66058e-6d3f-1715-829d-9c60a2303f76", - "code": "Epp", - "name": "企业门户", - "parentId": "0", - "layer": "1", - "menuType": "", - "funcType": "1", - "menuPath": "", - "icon": "/platform/runtime/sys/web/assets/custom/icon/portal.svg", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "8074d6d3-82d8-f07b-62ab-62a8ae2e480e", - "code": "Cms", - "name": "内容管理", - "parentId": "0", - "layer": "1", - "menuType": "", - "funcType": "1", - "menuPath": "", - "icon": "/platform/runtime/sys/web/assets/custom/icon/cms.svg", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "BP", - "code": "BP09", - "name": "业务公共", - "parentId": "0", - "layer": "1", - "menuType": "", - "funcType": "1", - "menuPath": "", - "icon": "/platform/runtime/sys/web/assets/custom/icon/businessplatform.svg", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "d58be53e-516a-18ec-701e-2de3740b55d0", - "code": "zzGJYY", - "name": "zz关键应用", - "parentId": "0", - "layer": "1", - "menuType": "", - "funcType": "1", - "menuPath": "", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "SYS", - "code": "SYS", - "name": "系统管理", - "parentId": "SYSPUB", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/系统公共", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "5aa45ea7-b54c-8b16-5b77-b6dd81d6e687", - "code": "Msg", - "name": "消息中心", - "parentId": "SYSPUB", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/系统公共", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", - "code": "CommonService", - "name": "系统配置", - "parentId": "SYSPUB", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/系统公共", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f409de99-be80-2526-7ad1-61627fa27441", - "code": "OperationMonitoring", - "name": "运行监控", - "parentId": "SYSPUB", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/系统公共", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF", - "code": "WF", - "name": "工作流平台", - "parentId": "BPMS", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/流程平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "BifPlatform", - "code": "aif", - "name": "业务流平台", - "parentId": "BPMS", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/流程平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "Task", - "code": "Task", - "name": "任务中心", - "parentId": "BPMS", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/流程平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", - "code": "EBS", - "name": "事件总线", - "parentId": "HIP", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/集成平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "DIP", - "code": "DIP", - "name": "数据集成", - "parentId": "HIP", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/集成平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "code": "CSB", - "name": "应用集成", - "parentId": "HIP", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/集成平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "ServiceGateway", - "code": "ServiceGateway", - "name": "服务网关", - "parentId": "HIP", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/集成平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "74ef3760-8805-f3ad-7036-6d85653d0b34", - "code": "Portal", - "name": "门户平台", - "parentId": "7b66058e-6d3f-1715-829d-9c60a2303f76", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/企业门户", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", - "code": "Cmsp", - "name": "内容管理平台", - "parentId": "8074d6d3-82d8-f07b-62ab-62a8ae2e480e", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/内容管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "9308d1c8-c442-ed7e-b772-19067d127a05", - "code": "KB", - "name": "知识库", - "parentId": "8074d6d3-82d8-f07b-62ab-62a8ae2e480e", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/内容管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "PROPlatform", - "code": "Bcc", - "name": "业务配置", - "parentId": "BP", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/业务公共", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a2e65dd5-dfba-1c3a-9440-6d0bbcea938b", - "code": "NoCode", - "name": "零代码", - "parentId": "BP", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/业务公共", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "4ad1063c-e46e-daec-ed7b-3ffd35c44dc1", - "code": "zzModule", - "name": "zz模块", - "parentId": "d58be53e-516a-18ec-701e-2de3740b55d0", - "layer": "2", - "menuType": "", - "funcType": "2", - "menuPath": "/zz关键应用", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "sys01", - "code": "sys01", - "name": "用户管理", - "parentId": "SYS", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统管理", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "sys02", - "code": "sys02", - "name": "权限管理", - "parentId": "SYS", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统管理", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "580e0327-5667-96c2-6e23-de0a37b50d3e", - "code": "commoninfo", - "name": "公共信息", - "parentId": "SYS", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e4b31d29-6a11-530d-e7e2-12cc8dc4740a", - "code": "permissionquery", - "name": "权限查询", - "parentId": "SYS", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", - "code": "MessageManager", - "name": "消息管理", - "parentId": "5aa45ea7-b54c-8b16-5b77-b6dd81d6e687", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/消息中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "9a84a695-ba31-2de0-cfc9-b932f9ef15eb", - "code": "MessagePlatform", - "name": "消息平台", - "parentId": "5aa45ea7-b54c-8b16-5b77-b6dd81d6e687", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/消息中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f52fb3be-01f7-443e-b2df-e1b5c5fab3ab", - "code": "document-configuration", - "name": "文档配置", - "parentId": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b9e2b42b-15ad-538a-0ba5-64ac82f0d044", - "code": "Print Setting", - "name": "打印配置", - "parentId": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "37d2b123-ba68-e144-6b33-0226cad5047e", - "code": "Early Warning Platform", - "name": "预警平台", - "parentId": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a7562755-da33-836e-1375-2ac3d820e351", - "code": "Job Scheduler", - "name": "调度任务", - "parentId": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "66a4d7ce-008f-d7f9-40db-c2080ce4d14c", - "code": "RuleBase", - "name": "规则库", - "parentId": "db387ee2-d8ef-4c96-a38a-af8fdc5cc0b3", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/系统配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "05dff722-aa93-4fb6-92dd-6afad7ea8d1c", - "code": "DistributedTransaction", - "name": "分布式事务", - "parentId": "f409de99-be80-2526-7ad1-61627fa27441", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/运行监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "d250437f-f452-43d2-aca6-ee828877dec0", - "code": "TraceDebug", - "name": "跟踪调试", - "parentId": "f409de99-be80-2526-7ad1-61627fa27441", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/运行监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "Security Monitor", - "code": "Security Monitor", - "name": "安全监控", - "parentId": "f409de99-be80-2526-7ad1-61627fa27441", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/运行监控", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "102c8de7-875f-ba4b-fd29-75b02a1d1f87", - "code": "ChgdrMonitor", - "name": "业务变更日志", - "parentId": "f409de99-be80-2526-7ad1-61627fa27441", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/运行监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "3a45c311-8f12-58a3-fbf5-c19032798bce", - "code": "BusinessLock", - "name": "业务锁", - "parentId": "f409de99-be80-2526-7ad1-61627fa27441", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/运行监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2b84c32c-302a-ef4d-7525-27e22b6de2fd", - "code": "SysLog", - "name": "系统日志", - "parentId": "f409de99-be80-2526-7ad1-61627fa27441", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/系统公共/运行监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF02", - "code": "WF02", - "name": "流程建模", - "parentId": "WF", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/工作流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "971ab3c6-2d7d-c19d-67d6-52011e851731", - "code": "WF03", - "name": "流程监控", - "parentId": "WF", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/工作流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF09", - "code": "WF09", - "name": "流程基础数据", - "parentId": "WF", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/工作流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "bc7701d5-eb92-4b2b-46e3-ff671d08826b", - "code": "settingManager", - "name": "配置管理", - "parentId": "WF", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/工作流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF04", - "code": "WF04", - "name": "流程统计分析", - "parentId": "WF", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/工作流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "BifModel", - "code": "BifModel", - "name": "单据流建模", - "parentId": "BifPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/业务流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", - "code": "BifSettings", - "name": "单据流设置", - "parentId": "BifPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/业务流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "BifMonitor", - "code": "BifMonitor", - "name": "单据流监控", - "parentId": "BifPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/业务流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "69b65583-6b2f-0a84-fb5e-76f851f41e91", - "code": "BpmModeling", - "name": "业务流建模", - "parentId": "BifPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/业务流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "6c0290dd-0660-17fc-d63b-7cce4db447f3", - "code": "BpmMonitor", - "name": "业务流监控", - "parentId": "BifPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/业务流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "6d015a0f-3454-3ec4-6858-a523d437b572", - "code": "BpmBasicData", - "name": "业务流基础数据", - "parentId": "BifPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/业务流平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF01", - "code": "WF01", - "name": "任务管理", - "parentId": "Task", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/任务中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "TASK02", - "code": "TASK02", - "name": "任务配置", - "parentId": "Task", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/流程平台/任务中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "ebsEventCenter", - "code": "ebsEventCenter", - "name": "事件中心", - "parentId": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/事件总线", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "0BDFF9DA-7D81-4589-8428-C79C30E58825", - "code": "ebConfigCenter", - "name": "配置中心", - "parentId": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/事件总线", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "AA771CAB-5C40-4DF0-81FF-ABC8B4093071", - "code": "exceptionHandler", - "name": "事件异常处理", - "parentId": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/事件总线", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "CBAB3CA5-0915-4E3B-88EE-430F270B807D", - "code": "eventMonitor", - "name": "事件监控", - "parentId": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/事件总线", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "bbe35771-dc07-f7d4-bae1-7284ce4bbad7", - "code": "mqService", - "name": "消息服务", - "parentId": "DD8B27A2-84F0-4F81-B85C-487A8AA32102", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/事件总线", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "dip-vm", - "code": "dip-transformation", - "name": "数据转换", - "parentId": "DIP", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/数据集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "dip-rri", - "code": "dip-rri", - "name": "实时同步管理", - "parentId": "DIP", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/数据集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "rri-data-processing", - "code": "rri-data-processing", - "name": "数据异常处理", - "parentId": "DIP", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/数据集成", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "rri-sync-config", - "code": "rri-sync-config", - "name": "实时同步配置", - "parentId": "DIP", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/数据集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "rri-data-monitor", - "code": "rri-data-monitor", - "name": "实时同步监控", - "parentId": "DIP", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/数据集成", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "217401ed-28a4-6f48-b942-3fe38fed324b", - "code": "connectionmgr", - "name": "外部系统管理", - "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/应用集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e9fbf898-8e66-45de-2ddb-9639f3462721", - "code": "ExternalService", - "name": "外部服务接入", - "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/应用集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a9523b42-9d38-0b0a-fca6-3a4c178ab78a", - "code": "ServiceMonitor", - "name": "外部服务监控", - "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/应用集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "18d3b84b-eded-6f11-9b91-891b47711443", - "code": "interface-service", - "name": "集成服务注册", - "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/应用集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "1d514b9f-a219-af94-5cba-2a92e451e0c5", - "code": "open-integrated-services", - "name": "集成服务开放", - "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/应用集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "3ec2997c-392b-7027-99b7-745a5eca92ad", - "code": "service-orchestrate", - "name": "集成服务编排", - "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/应用集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "fee2ac33-b201-1ed1-2314-bd1a9befa071", - "code": "basic-configuration", - "name": "基础配置", - "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/应用集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2ddaf385-2387-5375-9655-1fe92c1099d0", - "code": "integration-configuration", - "name": "应用集成管理", - "parentId": "224e713a-87d4-8c14-1493-5263f0fc2acb", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/应用集成", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2ee77eca-2efb-1e2d-a2bb-beed6b7654d7", - "code": "OpenApiManager", - "name": "开放API管理", - "parentId": "ServiceGateway", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/服务网关", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "52173d8c-9c3e-65f5-e493-98e20593719b", - "code": "Service-Authorization", - "name": "API授权管理", - "parentId": "ServiceGateway", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/服务网关", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "596c066a-cd99-3bb1-4a17-fea7ca9d794b", - "code": "MicroServiceManagement", - "name": "微服务API管理", - "parentId": "ServiceGateway", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/集成平台/服务网关", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", - "code": "portal-configuration", - "name": "门户配置", - "parentId": "74ef3760-8805-f3ad-7036-6d85653d0b34", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/企业门户/门户平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b1138ab9-7cd0-7632-e2e3-68c181d0a873", - "code": "cms-application", - "name": "应用", - "parentId": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/内容管理/内容管理平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "8472044f-2a80-089f-0221-33c4d52de518", - "code": "cms-schema", - "name": "模型", - "parentId": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/内容管理/内容管理平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "23f4461c-ad39-97a3-d6ff-41dff858fa50", - "code": "cms-content", - "name": "内容", - "parentId": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/内容管理/内容管理平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "70871143-8fff-3b39-c3d1-52353866bda1", - "code": "cms-setting", - "name": "配置", - "parentId": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/内容管理/内容管理平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "74802909-385a-10b8-fc84-9c0bce98610f", - "code": "cms-statistics", - "name": "统计", - "parentId": "8403ae91-eb0e-7030-30d5-3f8dd2a1db60", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/内容管理/内容管理平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "5424ab74-1be1-9318-9740-cda0a5cdbb98", - "code": "cms-kb-manager", - "name": "知识管理", - "parentId": "9308d1c8-c442-ed7e-b772-19067d127a05", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/内容管理/知识库", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "fc687ac8-6ae0-d113-6632-104df807227a", - "code": "cms-kb-setting", - "name": "配置", - "parentId": "9308d1c8-c442-ed7e-b772-19067d127a05", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/内容管理/知识库", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e8b71ba6-3820-298d-e11d-fb62ef669e13", - "code": "cmd-kb-board", - "name": "看板", - "parentId": "9308d1c8-c442-ed7e-b772-19067d127a05", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/内容管理/知识库", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "aedda4f4-fed6-bea7-12a1-1257541d7d37", - "code": "data transfer", - "name": "预置数据导出", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "UBCC0001", - "code": "BCP_BIZCONF", - "name": "业务配置", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "Epp-pagelayout", - "code": "Dashboard", - "name": "工作中心", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "22821215-9dbe-7673-a4ec-b2f93f096b35", - "code": "BCP_QRYCONF", - "name": "查询定制", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "Function Design", - "code": "Function Design", - "name": "菜单定义", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": "0", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "Authorization Design", - "code": "Authorization Design", - "name": "权限定义", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": "0", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "03851cc7-9c34-a213-d7fa-3c831d596406", - "code": "Chgdr", - "name": "业务变更日志", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "dip-dataie", - "code": "dip-dataie", - "name": "导入导出", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "cf81a0c7-8019-74e2-0a81-cca95a26f72a", - "code": "Syssetting", - "name": "系统设置", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a274453d-2465-5377-27da-c4c47883cc6b", - "code": "epp schedule", - "name": "我的日程", - "parentId": "PROPlatform", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/业务配置", - "icon": null, - "pinyin": "wodericheng", - "simpinyin": "wdrc", - "child": null - }, - { - "id": "3680fe22-2b9c-ee80-4826-044ca843497b", - "code": "quick-sight", - "name": "轻分析", - "parentId": "a2e65dd5-dfba-1c3a-9440-6d0bbcea938b", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/业务公共/零代码", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "code": "zzMenuGroup", - "name": "zz菜单分组", - "parentId": "4ad1063c-e46e-daec-ed7b-3ffd35c44dc1", - "layer": "3", - "menuType": "", - "funcType": "3", - "menuPath": "/zz关键应用/zz模块", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "sys-organization", - "code": "sys-organization", - "name": "系统组织", - "parentId": "sys01", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/用户管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "user-group", - "code": "user-group", - "name": "用户分组", - "parentId": "sys01", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/用户管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "user-manager", - "code": "user-manager", - "name": "用户", - "parentId": "sys01", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/用户管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "role-group", - "code": "role-group", - "name": "功能组分组", - "parentId": "sys02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/权限管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "role-manager", - "code": "role-manager", - "name": "功能组", - "parentId": "sys02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/权限管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "position-group", - "code": "position-group", - "name": "岗位分组", - "parentId": "sys02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/权限管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "position-manager", - "code": "position-manager", - "name": "岗位", - "parentId": "sys02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/权限管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "124829f1-ca20-2b49-d154-dfaa171e1d30", - "code": "ReverseAssignOp", - "name": "功能权限反向授权", - "parentId": "sys02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/权限管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "17abdaf6-9205-c4ea-800c-b6fec92eae50", - "code": "languagemanager", - "name": "语种管理", - "parentId": "580e0327-5667-96c2-6e23-de0a37b50d3e", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/公共信息", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "1580173b-5823-5f19-42d0-6e5bd1c0a294", - "code": "timezonemanager", - "name": "时区管理", - "parentId": "580e0327-5667-96c2-6e23-de0a37b50d3e", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/公共信息", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "324178e7-e223-4d77-063c-49af964576ae", - "code": "dataformatmanager", - "name": "数据格式管理", - "parentId": "580e0327-5667-96c2-6e23-de0a37b50d3e", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/公共信息", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "abf2e600-4c11-c716-5d44-0a9387749971", - "code": "BizOrgAuthorityQuery", - "name": "业务组织权限查询", - "parentId": "e4b31d29-6a11-530d-e7e2-12cc8dc4740a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统管理/权限查询", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b51c2198-4ff4-13b5-66d2-2b3f283edccb", - "code": "MyMessage", - "name": "我的消息", - "parentId": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "0ea02fe8-6294-7fd3-7cbf-1e5f5c287ad7", - "code": "MessageClassification", - "name": "消息分组", - "parentId": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "ddc58440-4389-d879-3267-44f1ed1fbf52", - "code": "MessageAccountRegister", - "name": "服务号注册", - "parentId": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "270e1ad6-2f4e-9f9d-5442-b52c16eb30b4", - "code": "MessageDataSource", - "name": "数据源注册", - "parentId": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "91ad94ec-f195-cdcf-f31e-0ea3efba141f", - "code": "MessageAnnounce", - "name": "公告维护", - "parentId": "cc64616e-4d2a-0258-bfaa-2894a6a42dbd", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "da5c64b7-d03f-fbb8-476f-58dc4c21cd1d", - "code": "MessageChannel", - "name": "消息渠道注册", - "parentId": "9a84a695-ba31-2de0-cfc9-b932f9ef15eb", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "7daad5b8-4415-1222-ab69-1fa60f5aeb0d", - "code": "MessageChannelConfiguration", - "name": "消息渠道配置", - "parentId": "9a84a695-ba31-2de0-cfc9-b932f9ef15eb", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "30758034-f2c0-e21d-9866-dec3659ef7e2", - "code": "MessageTemplate", - "name": "消息模板定义", - "parentId": "9a84a695-ba31-2de0-cfc9-b932f9ef15eb", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "3578b4c0-cde4-7f5a-d062-61973ee7a481", - "code": "MessageConfiguration", - "name": "业务消息配置", - "parentId": "9a84a695-ba31-2de0-cfc9-b932f9ef15eb", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/消息中心/消息平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "80a8b9f5-c3a6-51a6-6700-f6022c57ecbf", - "code": "document-rootsetting-configuration", - "name": "文档统一存储配置", - "parentId": "f52fb3be-01f7-443e-b2df-e1b5c5fab3ab", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/文档配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "ade090ea-5ffe-f650-384c-b6f60461e189", - "code": "document-policy-configuration", - "name": "文档管理策略配置", - "parentId": "f52fb3be-01f7-443e-b2df-e1b5c5fab3ab", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/文档配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "6ef1faaf-4e8e-18cc-7a6a-be35b288f9b1", - "code": "Print Device Manager", - "name": "打印设备管理", - "parentId": "b9e2b42b-15ad-538a-0ba5-64ac82f0d044", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/打印配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "23f1a72d-b0f1-b85c-735d-325d1a42db86", - "code": "Print Moniter", - "name": "打印监控", - "parentId": "b9e2b42b-15ad-538a-0ba5-64ac82f0d044", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/打印配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "850d25d0-fd00-8f47-7e50-8c95952422e8", - "code": "Early Warning Definition", - "name": "预警定义", - "parentId": "37d2b123-ba68-e144-6b33-0226cad5047e", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/预警平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "074831e3-eba0-8cdc-7256-480d22117ac6", - "code": "Early Warning Subscribetion", - "name": "预警订阅", - "parentId": "37d2b123-ba68-e144-6b33-0226cad5047e", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/预警平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "79caf8ee-b052-909a-0440-16f70b12a9a2", - "code": "Early Warning Moniter", - "name": "预警日志", - "parentId": "37d2b123-ba68-e144-6b33-0226cad5047e", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/预警平台", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "c2e79004-311b-f34f-d4c5-f6b6bb4522bb", - "code": "Single Scheduler", - "name": "任务管理", - "parentId": "a7562755-da33-836e-1375-2ac3d820e351", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/调度任务", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "29aabec4-f181-08d2-a7f6-06f46cebd171", - "code": "Scheduler Trigger", - "name": "定时器管理", - "parentId": "a7562755-da33-836e-1375-2ac3d820e351", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/调度任务", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "df84c295-ae68-6241-4317-2bc8b286251c", - "code": "SchedularCalendar", - "name": "工作日历", - "parentId": "a7562755-da33-836e-1375-2ac3d820e351", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/调度任务", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "6f3d0d22-45a5-2469-485f-797e44b75537", - "code": "scheduler-monitor", - "name": "服务监控", - "parentId": "a7562755-da33-836e-1375-2ac3d820e351", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/调度任务", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "c8f99ac7-a633-3e0f-99a8-255d1ac41780", - "code": "RuleBaseMangaer", - "name": "规则库管理", - "parentId": "66a4d7ce-008f-d7f9-40db-c2080ce4d14c", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/系统配置/规则库", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "609b97f3-bc87-8356-9914-9f0a15f77239", - "code": "dtx-manager", - "name": "分布式事务管理", - "parentId": "05dff722-aa93-4fb6-92dd-6afad7ea8d1c", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/分布式事务", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "483fdee7-818c-4b5d-93b4-cdb06db009b3", - "code": "TD_TraceViewer", - "name": "程序跟踪查看器", - "parentId": "d250437f-f452-43d2-aca6-ee828877dec0", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/跟踪调试", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "online-user", - "code": "online-user", - "name": "在线用户", - "parentId": "Security Monitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/安全监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "security-audit", - "code": "security-audit", - "name": "安全审计", - "parentId": "Security Monitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/安全监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "security-audit-category", - "code": "audit-category", - "name": "审计类别", - "parentId": "Security Monitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/安全监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "security-audit-event", - "code": "audit-event", - "name": "审计事件", - "parentId": "Security Monitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/安全监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b66db23a-2155-bdf7-d006-9a383ab71c06", - "code": "ChgdrQuery", - "name": "日志查询", - "parentId": "102c8de7-875f-ba4b-fd29-75b02a1d1f87", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/业务变更日志", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a7583855-8da1-b1f1-267f-301cea6068ef", - "code": "lockmanagement", - "name": "锁管理", - "parentId": "3a45c311-8f12-58a3-fbf5-c19032798bce", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/业务锁", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a11679bb-b8bd-ada9-21c4-b1700e0418db", - "code": "logging-level", - "name": "日志级别调整", - "parentId": "2b84c32c-302a-ef4d-7525-27e22b6de2fd", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/系统日志", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "72ad68f0-d277-e4db-8dcf-15572aa743d2", - "code": "logging-viewer", - "name": "系统日志查看", - "parentId": "2b84c32c-302a-ef4d-7525-27e22b6de2fd", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/系统公共/运行监控/系统日志", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0202", - "code": "WF0202", - "name": "流程设计", - "parentId": "WF02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程建模", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0203", - "code": "WF0203", - "name": "流程分配", - "parentId": "WF02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程建模", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f75a1030-36e5-46e9-8f24-1edcaa056bb7", - "code": "wf-process-administrator", - "name": "流程管理员", - "parentId": "WF02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程建模", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "05913dd6-5448-e2be-cc4e-df804cb48331", - "code": "WF0301", - "name": "流程实例管理", - "parentId": "971ab3c6-2d7d-c19d-67d6-52011e851731", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0201", - "code": "WF0201", - "name": "流程分类", - "parentId": "WF09", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程基础数据", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0204", - "code": "WF0204", - "name": "审批动作定义", - "parentId": "WF09", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程基础数据", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b58f93c4-74fa-6cff-cb7d-55c75df570a7", - "code": "WF-reportingLine-def", - "name": "汇报关系定义", - "parentId": "bc7701d5-eb92-4b2b-46e3-ff671d08826b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/配置管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b0a9339d-7caf-8a5f-a926-b66e63d2d09e", - "code": "WF-reportingLine-setting", - "name": "汇报关系设置", - "parentId": "bc7701d5-eb92-4b2b-46e3-ff671d08826b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/配置管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0401", - "code": "WF0401", - "name": "流程数量统计", - "parentId": "WF04", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程统计分析", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0402", - "code": "WF0402", - "name": "流程时效分析", - "parentId": "WF04", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程统计分析", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0403", - "code": "WF0403", - "name": "节点时效分析", - "parentId": "WF04", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程统计分析", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0404", - "code": "WF0404", - "name": "人员时效分析", - "parentId": "WF04", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/工作流平台/流程统计分析", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "BifDesigner", - "code": "BifDesigner", - "name": "单据流定义", - "parentId": "BifModel", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/单据流建模", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "c6d74485-83ab-91ba-3f8f-7cddfafce52e", - "code": "BifLogSettings", - "name": "单据流日志设置", - "parentId": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/单据流设置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "40ad8d6d-ba01-3c19-ef06-1ec3aa856ca7", - "code": "BillTypeManager", - "name": "单据类型管理", - "parentId": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/单据流设置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "cad0e5fd-3305-4ff0-b27f-4d49ad310b9c", - "code": "BillRelationManager", - "name": "单据关系管理", - "parentId": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/单据流设置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "5cc0ee7e-722a-5dd3-fcd9-8b7b548154c0", - "code": "RelationFieldsManager", - "name": "关联字段管理", - "parentId": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/单据流设置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "d23c3a58-f864-9637-eaf3-c66058b6d3d5", - "code": "BillTrackingConfig", - "name": "单据追踪配置", - "parentId": "f17ef056-0ab8-70d6-c1cb-175bd0b67bd4", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/单据流设置", - "icon": null, - "pinyin": "danjuzhuizongpeizhi", - "simpinyin": "djzzpz", - "child": null - }, - { - "id": "BifManager", - "code": "BifManager", - "name": "单据流管理", - "parentId": "BifMonitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/单据流监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "BifDiagnostor", - "code": "BifDiagnostor", - "name": "单据流诊断", - "parentId": "BifMonitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/单据流监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e2fe4705-1aa3-575f-a658-58366a21fde7", - "code": "BpmDesigner", - "name": "业务流设计", - "parentId": "69b65583-6b2f-0a84-fb5e-76f851f41e91", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/业务流建模", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "46dcc2f1-04d6-3f56-86e3-22210ca29023", - "code": "BpmInstanceManagement", - "name": "业务流实例管理", - "parentId": "6c0290dd-0660-17fc-d63b-7cce4db447f3", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/业务流监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "4c1d7d54-0e3b-0e52-e861-16d9bf21950d", - "code": "BpmProcessExceptionManagement", - "name": "业务流实例异常管理", - "parentId": "6c0290dd-0660-17fc-d63b-7cce4db447f3", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/业务流监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "60f194f5-bae3-e5b2-ae01-7a0227c0794c", - "code": "BpmApprovalAction", - "name": "人工操作动作定义", - "parentId": "6d015a0f-3454-3ec4-6858-a523d437b572", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/业务流平台/业务流基础数据", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0101", - "code": "WF0101", - "name": "我的任务", - "parentId": "WF01", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/任务中心/任务管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b9d8cdbb-91cc-1765-3770-67ead45ec363", - "code": "WF0103", - "name": "我的委托", - "parentId": "WF01", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/任务中心/任务管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "deaa4ee2-5c9a-cdcb-7070-d3652530f8a9", - "code": "Task_AllDelegateMgr", - "name": "委托管理", - "parentId": "WF01", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/任务中心/任务管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0102", - "code": "WF0102", - "name": "任务分类", - "parentId": "TASK02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/任务中心/任务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "WF0205", - "code": "WF0205", - "name": "显示列设置", - "parentId": "TASK02", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/流程平台/任务中心/任务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "A0E4C91F-4A8D-4FB3-A38C-E6C727815A46", - "code": "streamEvent", - "name": "事件管理", - "parentId": "ebsEventCenter", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/事件中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "DADA0CA5-AF15-46AF-B0DE-5E74EA50C419", - "code": "streamAction", - "name": "事件处理器", - "parentId": "ebsEventCenter", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/事件中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "070a49b2-1b88-b8ac-146e-4b5ceaf2f2e3", - "code": "ebsSubscribe", - "name": "事件订阅", - "parentId": "ebsEventCenter", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/事件中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "7bb91bfb-035f-8f7e-de63-673c8617e29b", - "code": "eventRoutingConfig", - "name": "事件路由配置", - "parentId": "0BDFF9DA-7D81-4589-8428-C79C30E58825", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/配置中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "318ffca4-261f-0495-f163-7c24efea5e31", - "code": "eventGlobalConfig", - "name": "运行参数配置", - "parentId": "0BDFF9DA-7D81-4589-8428-C79C30E58825", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/配置中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "E4020EBF-8ACE-4E25-9626-CC0318BBF330", - "code": "manualIntervension", - "name": "人工干预", - "parentId": "AA771CAB-5C40-4DF0-81FF-ABC8B4093071", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/事件异常处理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "69AEDA86-8656-4FBA-8F59-5BFC35229568", - "code": "streameventlog", - "name": "事件发布日志", - "parentId": "CBAB3CA5-0915-4E3B-88EE-430F270B807D", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/事件监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "CDDE3461-2ACC-46EF-8207-64DC59E834D4", - "code": "streameventhandlelog", - "name": "事件处理日志", - "parentId": "CBAB3CA5-0915-4E3B-88EE-430F270B807D", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/事件监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "46d17ce7-7528-b8e6-e154-0f8e3d0f2b08", - "code": "ebs-tracelog", - "name": "事件启动日志", - "parentId": "CBAB3CA5-0915-4E3B-88EE-430F270B807D", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/事件监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "37d80b47-6571-fd58-9dd6-ba07f879654c", - "code": "ebs-uniquenessmonitoring", - "name": "事件重复性控制", - "parentId": "CBAB3CA5-0915-4E3B-88EE-430F270B807D", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/事件监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "36c9064a-0d42-0780-5888-c305d15ef006", - "code": "mqQueueMonitor", - "name": "队列监控", - "parentId": "bbe35771-dc07-f7d4-bae1-7284ce4bbad7", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/消息服务", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f1752974-85a5-c88a-c791-ffd08ef4945d", - "code": "mqServerMonitor", - "name": "消息服务配置", - "parentId": "bbe35771-dc07-f7d4-bae1-7284ce4bbad7", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/消息服务", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "1cb2fd49-30a5-714f-ab31-c2cb829e6806", - "code": "queueManagement", - "name": "队列管理", - "parentId": "bbe35771-dc07-f7d4-bae1-7284ce4bbad7", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/事件总线/消息服务", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "dip-vm0001", - "code": "valuemappingdefine", - "name": "值映射定义", - "parentId": "dip-vm", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/数据转换", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "dip-vm0002", - "code": "valuemappingsetting", - "name": "值映射设置", - "parentId": "dip-vm", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/数据转换", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2b555d1d-60a9-2ad3-656c-d365210351aa", - "code": "Mapping", - "name": "数据转换规则", - "parentId": "dip-vm", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/数据转换", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "cebbcde3-23c6-198c-ac5b-663414c1e2cd", - "code": "rri-manage-dev", - "name": "数据同步分组管理", - "parentId": "dip-rri", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "rri-dataservice", - "code": "rri-dataservice", - "name": "数据服务注册", - "parentId": "dip-rri", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "rri-subscribe", - "code": "rri-subscribe", - "name": "数据处理器", - "parentId": "dip-rri", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a6b94bb6-f64c-663b-95e7-579b45ecd001", - "code": "rri-manualhandling", - "name": "人工干预", - "parentId": "rri-data-processing", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/数据异常处理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f1fcf1a8-5a6d-3829-9f4f-44dca7831487", - "code": "rri-manage-custom", - "name": "数据同步分组配置", - "parentId": "rri-sync-config", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "cb450e63-c1f7-4505-21fe-0fa567c22e34", - "code": "rri-strategyconfig", - "name": "参数配置", - "parentId": "rri-sync-config", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "1f096801-c7ed-e004-26c2-2628237dec8d", - "code": "rri-dataInit", - "name": "数据初始", - "parentId": "rri-sync-config", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "dee70c45-c8d0-3390-fdc1-ec3fa6cad9f2", - "code": "rri-publishlog", - "name": "数据发布日志", - "parentId": "rri-data-monitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2f3af700-0e10-252d-edb4-153d7a784265", - "code": "rri-handlerlog", - "name": "数据处理日志", - "parentId": "rri-data-monitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "879659b9-0fe1-db11-19ae-2fb5ecf27151", - "code": "rri-manualsynclog", - "name": "数据初始日志", - "parentId": "rri-data-monitor", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/数据集成/实时同步监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "43861ad5-ba12-37df-4f86-24cea8b02396", - "code": "sif-connection-manage", - "name": "系统连接管理", - "parentId": "217401ed-28a4-6f48-b942-3fe38fed324b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/外部系统管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "661aeb5f-de1f-c49b-e049-462e41105e95", - "code": "external-service-manage", - "name": "外部服务管理", - "parentId": "e9fbf898-8e66-45de-2ddb-9639f3462721", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/外部服务接入", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "85c88477-3825-cd3f-d217-0a302d2d3a21", - "code": "template-service-manage", - "name": "外部服务模板库", - "parentId": "e9fbf898-8e66-45de-2ddb-9639f3462721", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/外部服务接入", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "4dcf5bd6-7b47-7868-db7b-d59ff576bf18", - "code": "service-template-statistic", - "name": "外部服务模板统计", - "parentId": "e9fbf898-8e66-45de-2ddb-9639f3462721", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/外部服务接入", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "41ad6723-8db6-60cb-d8c2-105749e7d96e", - "code": "service-monitor-config", - "name": "外部服务配置", - "parentId": "a9523b42-9d38-0b0a-fca6-3a4c178ab78a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/外部服务监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "3fb2c0df-3c24-446f-9815-bdf3f8a70fb0", - "code": "service-status-monitor", - "name": "外部服务监控", - "parentId": "a9523b42-9d38-0b0a-fca6-3a4c178ab78a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/外部服务监控", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "d1ff58cf-d6e1-9728-df4f-c0234bdb86b2", - "code": "service-logging", - "name": "外部服务日志", - "parentId": "a9523b42-9d38-0b0a-fca6-3a4c178ab78a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/外部服务监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "c9c9b772-661b-9d37-f5e9-9add8a72e662", - "code": "service-logging-statistic", - "name": "外部服务日志统计", - "parentId": "a9523b42-9d38-0b0a-fca6-3a4c178ab78a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/外部服务监控", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "921bdedc-3289-6c68-0b7c-7559a4ee1c3b", - "code": "interface-service-model-manage", - "name": "集成对象管理", - "parentId": "18d3b84b-eded-6f11-9b91-891b47711443", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/集成服务注册", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "5dbcfb38-0fe7-8837-5985-73c47eeb9d7f", - "code": "internal-service-manage", - "name": "集成服务库", - "parentId": "18d3b84b-eded-6f11-9b91-891b47711443", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/集成服务注册", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b6f5cfbf-9a69-850b-7509-93de89231f11", - "code": "open-service-manage", - "name": "集成服务管理", - "parentId": "1d514b9f-a219-af94-5cba-2a92e451e0c5", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/集成服务开放", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "20cd9ffe-dcf3-a4eb-8422-1086e6656da1", - "code": "open-service-log", - "name": "集成服务日志", - "parentId": "1d514b9f-a219-af94-5cba-2a92e451e0c5", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/集成服务开放", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b17f7b14-405d-1e30-7285-0426873c1c0c", - "code": "service-log-statistic", - "name": "集成服务日志统计", - "parentId": "1d514b9f-a219-af94-5cba-2a92e451e0c5", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/集成服务开放", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "339d0403-4672-2d89-fd4e-6d71e71d6757", - "code": "csb-flow-manage", - "name": "集成流设计", - "parentId": "3ec2997c-392b-7027-99b7-745a5eca92ad", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/集成服务编排", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "abdf2afd-df55-096c-15fd-c58302884239", - "code": "csb-flow-log", - "name": "集成流实例", - "parentId": "3ec2997c-392b-7027-99b7-745a5eca92ad", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/集成服务编排", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "82060a3c-4779-1a66-c3e1-cc408151d36c", - "code": "icc-basic-config", - "name": "云连接器配置", - "parentId": "fee2ac33-b201-1ed1-2314-bd1a9befa071", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/基础配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f0c11d8f-15cb-6833-1b2e-e4448fa6afb0", - "code": "csb-center-config", - "name": "集成服务配置", - "parentId": "fee2ac33-b201-1ed1-2314-bd1a9befa071", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/基础配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "82daf547-0c2b-5963-93a9-609c0e1abd32", - "code": "3rd-application-manage", - "name": "第三方应用管理", - "parentId": "2ddaf385-2387-5375-9655-1fe92c1099d0", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/应用集成管理", - "icon": null, - "pinyin": "disanfangyingyongguanli", - "simpinyin": "dsfyygl", - "child": null - }, - { - "id": "e7a1f91f-bcbf-eccc-5361-9e704256e7c9", - "code": "ip-access-manage", - "name": "IP访问管理", - "parentId": "2ddaf385-2387-5375-9655-1fe92c1099d0", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/应用集成管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "cb229eb6-a8ed-8d51-2a20-160948b605da", - "code": "limit-strategy-manage", - "name": "限流策略管理", - "parentId": "2ddaf385-2387-5375-9655-1fe92c1099d0", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/应用集成管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "45cf70fb-57a1-adae-9f6c-31f17609fddd", - "code": "fusing-strategy-manage", - "name": "熔断策略管理", - "parentId": "2ddaf385-2387-5375-9655-1fe92c1099d0", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/应用集成管理", - "icon": null, - "pinyin": "rongduancelu:eguanli", - "simpinyin": "rdclgl", - "child": null - }, - { - "id": "5c79f889-db66-b984-e75b-0c097be8f517", - "code": "encryption-strategy-manage", - "name": "加密策略管理", - "parentId": "2ddaf385-2387-5375-9655-1fe92c1099d0", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/应用集成/应用集成管理", - "icon": null, - "pinyin": "jiamicelu:eguanli", - "simpinyin": "jmclgl", - "child": null - }, - { - "id": "82e00ca9-148f-5217-0b43-5ac463f0ae18", - "code": "EapiDefine", - "name": "API注册", - "parentId": "2ee77eca-2efb-1e2d-a2bb-beed6b7654d7", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/服务网关/开放API管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "802b188e-d5cf-8f81-1541-0599de89de4c", - "code": "EapiView", - "name": "API查询", - "parentId": "2ee77eca-2efb-1e2d-a2bb-beed6b7654d7", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/服务网关/开放API管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "5d7ac84c-e657-de58-16ec-b8ed004226ad", - "code": "EapiConfigManager", - "name": "API权限配置", - "parentId": "2ee77eca-2efb-1e2d-a2bb-beed6b7654d7", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/服务网关/开放API管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "86a7808f-a21d-ce0c-8134-48e42608dacc", - "code": "EapiGroup", - "name": "API分组管理", - "parentId": "52173d8c-9c3e-65f5-e493-98e20593719b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/服务网关/API授权管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "679bf749-2e00-b4b5-0b1f-b5f8a8ca72a4", - "code": "OperationEapiConfig", - "name": "API授权管理", - "parentId": "52173d8c-9c3e-65f5-e493-98e20593719b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/服务网关/API授权管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "021bccc0-a6d6-8570-9b84-71b6fdb9b15f", - "code": "caf-apikey", - "name": "ApiKey管理", - "parentId": "52173d8c-9c3e-65f5-e493-98e20593719b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/服务网关/API授权管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "IapiDoc", - "code": "SG_IApiLib", - "name": "微服务API查询", - "parentId": "596c066a-cd99-3bb1-4a17-fea7ca9d794b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/集成平台/服务网关/微服务API管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "c0b45ed9-53b7-3a02-0862-8275e7ebddc6", - "code": "portal-navigation", - "name": "门户导航", - "parentId": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/企业门户/门户平台/门户配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "47bb19bc-fbbb-56af-aa83-f39473206c17", - "code": "site", - "name": "站点", - "parentId": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/企业门户/门户平台/门户配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "8fcae19b-fcd5-524f-1ab0-a579a6aa6642", - "code": "page", - "name": "门户页面", - "parentId": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/企业门户/门户平台/门户配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "c4af2580-f953-2436-c2bf-f4bc4cb4fc01", - "code": "theme", - "name": "门户模板", - "parentId": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/企业门户/门户平台/门户配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "6f492efe-e3d5-ac7b-1faf-d391c3489083", - "code": "site-view-statistic", - "name": "站点访问量统计", - "parentId": "99e03af6-53fd-acf6-7d5b-4bceac6ad3ea", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/企业门户/门户平台/门户配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "054035ad-17db-4867-b75b-731eea287c42", - "code": "CmsApplicationMgr", - "name": "内容应用", - "parentId": "b1138ab9-7cd0-7632-e2e3-68c181d0a873", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/内容管理平台/应用", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "817e9740-7795-0dab-3c08-7a730786d6e8", - "code": "cms-schema-definition", - "name": "模型定义", - "parentId": "8472044f-2a80-089f-0221-33c4d52de518", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/内容管理平台/模型", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "591fa7e3-1f98-9981-196f-4c2f68252b07", - "code": "cms-content-manager", - "name": "内容库", - "parentId": "23f4461c-ad39-97a3-d6ff-41dff858fa50", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/内容管理平台/内容", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "bcadaced-b250-3943-ba83-cc57891a7e44", - "code": "cms-setting-search", - "name": "搜索配置", - "parentId": "70871143-8fff-3b39-c3d1-52353866bda1", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/内容管理平台/配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "996d4f32-ceb0-39b2-eda7-a9616767d69a", - "code": "cms-tag-setting", - "name": "标签管理", - "parentId": "70871143-8fff-3b39-c3d1-52353866bda1", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/内容管理平台/配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2f7be620-2411-f54a-b1da-853fe6c07038", - "code": "cms-statistical-log", - "name": "访问日志", - "parentId": "74802909-385a-10b8-fc84-9c0bce98610f", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/内容管理平台/统计", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "6718949a-b8fe-5d7c-222e-adc3b42995dd", - "code": "cms-statistics-summary", - "name": "访问汇总", - "parentId": "74802909-385a-10b8-fc84-9c0bce98610f", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/内容管理平台/统计", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "613feb60-53fc-9c99-6f90-26a972ca8944", - "code": "cms-kb-channel", - "name": "栏目管理", - "parentId": "5424ab74-1be1-9318-9740-cda0a5cdbb98", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/知识库/知识管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2ee09636-f0f9-f991-0b27-085ebaa867ae", - "code": "cms-kb-content-list", - "name": "内容列表", - "parentId": "5424ab74-1be1-9318-9740-cda0a5cdbb98", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/知识库/知识管理", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2867002a-eaf1-cb35-56a6-56f9d2d845d5", - "code": "cms-kb-setting-menu", - "name": "导航配置", - "parentId": "fc687ac8-6ae0-d113-6632-104df807227a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/知识库/配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f30b975f-0c0a-53ae-cc12-d13ac1254fde", - "code": "cmd-kb-databoard", - "name": "知识库看板", - "parentId": "e8b71ba6-3820-298d-e11d-fb62ef669e13", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/内容管理/知识库/看板", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "06ad5ab5-c42a-cd4b-e890-aadf1e057448", - "code": "export-rule", - "name": "预置数据导出规则", - "parentId": "aedda4f4-fed6-bea7-12a1-1257541d7d37", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/预置数据导出", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a90d9e18-d47c-0cf3-bf69-2dce40665a12", - "code": "dataexport", - "name": "预置数据导出", - "parentId": "aedda4f4-fed6-bea7-12a1-1257541d7d37", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/预置数据导出", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "1b415396-2386-38dd-50b0-771c5960fc18", - "code": "UbccParamDataConfig", - "name": "业务参数配置", - "parentId": "UBCC0001", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "6465dca9-eb81-0743-edf3-33e9573b3ed8", - "code": "UbccParamDefinitionManager", - "name": "业务参数模板", - "parentId": "UBCC0001", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "SYS0102", - "code": "SYS0102", - "name": "业务对象", - "parentId": "UBCC0001", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "UBCC_BC0001", - "code": "BCP_BillCategory", - "name": "业务种类定义", - "parentId": "UBCC0001", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "UBCC_BC0002", - "code": "BCP_ConfCenter", - "name": "业务配置中心", - "parentId": "UBCC0001", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "12345f9a-a305-ba3e-0710-a9d93889710a", - "code": "CodeRuleDefine", - "name": "编码规则定义", - "parentId": "UBCC0001", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "001231bf-6293-5a53-57cc-e50db58d3db0", - "code": "Print Format Definition", - "name": "打印格式定义", - "parentId": "UBCC0001", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/业务配置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "Epp-pagemanager", - "code": "Page", - "name": "页面", - "parentId": "Epp-pagelayout", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/工作中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "Epp-portletmanager", - "code": "Portlet", - "name": "部件", - "parentId": "Epp-pagelayout", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/工作中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "Epp-widgetmanager", - "code": "MetaPortlet", - "name": "元部件", - "parentId": "Epp-pagelayout", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/工作中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "ed2e6a45-e815-cbc1-b8fb-41645a0b6db7", - "code": "DataSource", - "name": "部件数据源", - "parentId": "Epp-pagelayout", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/工作中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "dd50d8a3-48bc-d4f2-8830-fc26458a60f3", - "code": "DataSet", - "name": "部件数据集", - "parentId": "Epp-pagelayout", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/工作中心", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "eb785056-f432-d18e-09bf-b6c3a3b7c2d9", - "code": "BCP_BizQryFunc", - "name": "业务查询函数", - "parentId": "22821215-9dbe-7673-a4ec-b2f93f096b35", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/查询定制", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "568bfd2e-d0a2-d055-2055-3346290fbb88", - "code": "BCP_BizQryDataSet", - "name": "数据集", - "parentId": "22821215-9dbe-7673-a4ec-b2f93f096b35", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/查询定制", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "35d72855-ec34-67fd-135f-6f48bded396c", - "code": "QDPDefinitionMenu", - "name": "查询定义", - "parentId": "22821215-9dbe-7673-a4ec-b2f93f096b35", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/查询定制", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "1619ca8d-1216-8890-da40-1738f3af359e", - "code": "writeback", - "name": "业务数据回写管理", - "parentId": "22821215-9dbe-7673-a4ec-b2f93f096b35", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/查询定制", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "SYS0101", - "code": "SYS0101", - "name": "菜单", - "parentId": "Function Design", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/菜单定义", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "gspapp01", - "code": "APP Maintenance", - "name": "应用", - "parentId": "Function Design", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/菜单定义", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "func-operation", - "code": "func-operation", - "name": "功能操作", - "parentId": "Authorization Design", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/权限定义", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "authorization-object", - "code": "authorization-object", - "name": "权限对象", - "parentId": "Authorization Design", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/权限定义", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "authfield", - "code": "authfield", - "name": "权限字段", - "parentId": "Authorization Design", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/权限定义", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "bf8b90b8-d636-c09f-a776-5e735c62c54f", - "code": "ChgdrConfig", - "name": "日志配置", - "parentId": "03851cc7-9c34-a213-d7fa-3c831d596406", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/业务变更日志", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "dataie-rule-manage", - "code": "dataie-rule-manage", - "name": "导入导出规则", - "parentId": "dip-dataie", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/导入导出", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f31e2686-e2cc-5c1c-091a-f6cdb1c0ec78", - "code": "audit-export-runtime", - "name": "审计数据导出", - "parentId": "dip-dataie", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/导入导出", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "f56c2cf1-3070-802d-a87b-e4cc2a2c2eeb", - "code": "audit-export-manage", - "name": "审计导出规则", - "parentId": "dip-dataie", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/导入导出", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "0a7857db-e199-e031-f9a4-c26d811c9242", - "code": "FrameworkConfiguration", - "name": "框架个性化配置", - "parentId": "cf81a0c7-8019-74e2-0a81-cca95a26f72a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/系统设置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "024b93d1-f86f-0a0a-5374-64c25d0ce105", - "code": "contact-channel-config", - "name": "客服设置", - "parentId": "cf81a0c7-8019-74e2-0a81-cca95a26f72a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/系统设置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "1982a9b1-7281-e63e-5d4b-9f46402fb89e", - "code": "sso-tool", - "name": "单点登录生成器", - "parentId": "cf81a0c7-8019-74e2-0a81-cca95a26f72a", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/系统设置", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "ee3f58f0-440e-b870-f461-a658ab4145da", - "code": "EppSchedule", - "name": "我的日程", - "parentId": "a274453d-2465-5377-27da-c4c47883cc6b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/我的日程", - "icon": null, - "pinyin": "wodericheng", - "simpinyin": "wdrc", - "child": null - }, - { - "id": "cdf0e50c-7a0e-2c93-cc98-a4a285cc960d", - "code": "EppScheduleSet", - "name": "日程代录设置", - "parentId": "a274453d-2465-5377-27da-c4c47883cc6b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/我的日程", - "icon": null, - "pinyin": "richengdailushezhi", - "simpinyin": "rcdlsz", - "child": null - }, - { - "id": "986137b2-74dc-f13a-0667-553a1332218d", - "code": "日程集成", - "name": "日程集成", - "parentId": "a274453d-2465-5377-27da-c4c47883cc6b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/业务配置/我的日程", - "icon": null, - "pinyin": "richengjicheng", - "simpinyin": "rcjc", - "child": null - }, - { - "id": "fd97c5f5-e86e-bfc7-ec1b-453ef3c17586", - "code": "quick-sight-menu", - "name": "轻分析中心", - "parentId": "3680fe22-2b9c-ee80-4826-044ca843497b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/零代码/轻分析", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "97a8e09a-21f2-fe50-5e6e-7b16ab44e551", - "code": "quick-sight-manage-menu", - "name": "轻分析管理", - "parentId": "3680fe22-2b9c-ee80-4826-044ca843497b", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/业务公共/零代码/轻分析", - "icon": null, - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "d8b2aaec-85a6-43ce-8988-d159d1d0bbf6", - "code": "ListCardForm", - "name": "内置列表卡片界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": "neizhiliebiaokapianjiemian", - "simpinyin": "nzlbkpjm", - "child": null - }, - { - "id": "35b491ab-2224-44d7-a7f6-22d1a2aaf347", - "code": "ListForm", - "name": "列表", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "4cdabd44-e594-48b3-aa6f-d76825fce50b", - "code": "fybxdCard", - "name": "费用报销单卡片", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e976a71d-68f0-4e4e-8094-b7e8cc130f3a", - "code": "ListWithSidebarForm", - "name": "带侧边栏的列表界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e7a82c22-cd0e-458d-8c3c-5d648545e369", - "code": "ScrollspyCardForm", - "name": "内置滚动定位卡片界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b7a92e7d-53a1-4094-8141-aa0e9061b8c2", - "code": "DoubleListForm", - "name": "双列表界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "2561ab76-1f4f-4182-8547-7129a8eae3bc", - "code": "doubleListWithSidebarForm", - "name": "带侧边栏的双列表界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "0ef70dc0-a763-4f1e-861f-77514ea4e5c5", - "code": "listManageForm", - "name": "批量编辑列表界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "8bef78a9-c06b-47ff-be2d-777d0a373a2e", - "code": "listDictionaryForm", - "name": "多数据源列卡界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "29f849e3-38ce-49ff-876e-bea5093650ce", - "code": "modalCardForm", - "name": "弹窗卡片模板", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "910bcba3-cff3-4b47-a96d-463e7eca37c0", - "code": "listComponent", - "name": "列表组件", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "40089513-55f4-4e5c-9c6d-f18fc71fe75f", - "code": "doubleListFormInTab", - "name": "标签式双列表", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "143eb743-3364-4777-a0a7-daa944e18140", - "code": "cardTableForm", - "name": "表格类卡片模板", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e63b2788-8b96-49d9-8697-e73d565072e0", - "code": "ScrollspyCardForm1", - "name": "内置滚动定位卡片界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "693a8ea3-be01-4c97-a87e-3e4f45af099f", - "code": "modalCardForm1", - "name": "弹窗卡片模板", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "7c485db2-3c78-42d6-b293-6aeac65d99ed", - "code": "cardTableForm1", - "name": "表格类卡片模板", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "b6e0a7a3-21fd-476c-ae8c-ae1ddcd6050d", - "code": "doubleListForm", - "name": "双列表界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "a2825743-cb93-4595-8850-b6f23e0df2f4", - "code": "doubleListForm1", - "name": "双列表界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e7503370-a0e1-4105-89b2-2308abee9b0b", - "code": "listComponent1", - "name": "列表组件", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "e6e7b400-1858-4f1d-97aa-c0c894081a89", - "code": "doubleListFormInTab1", - "name": "标签式双列表", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "4e8725f6-1f5f-4c25-9363-5071b63923af", - "code": "states", - "name": "状态机验证", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": null, - "simpinyin": null, - "child": null - }, - { - "id": "37e31f6a-6960-41cf-afdb-49b8410fb590", - "code": "BXDList", - "name": "新报销单列表", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": "xinbaoxiaodanliebiao", - "simpinyin": "xbxdlb", - "child": null - }, - { - "id": "ff1be9e4-092a-4799-bb56-ef4b66b722ca", - "code": "BXDcard", - "name": "报销单卡片界面", - "parentId": "332c81f4-a8d4-f670-9e1e-605bb199cd56", - "layer": "4", - "menuType": "SysMenu", - "funcType": "4", - "menuPath": "/zz关键应用/zz模块/zz菜单分组", - "icon": "", - "pinyin": "baoxiaodankapianjiemian", - "simpinyin": "bxdkpjm", - "child": null - } -] \ No newline at end of file diff --git a/packages/farris-admin/src/components/header.component.tsx b/packages/farris-admin/src/components/header.component.tsx deleted file mode 100644 index 8d4cdf04fa4..00000000000 --- a/packages/farris-admin/src/components/header.component.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import { computed, defineComponent, ref } from 'vue'; -import { headerProps, HeaderProps } from './header.props'; - -import listViewData from './data.json'; -import FAccordion, { FAccordionItem } from '@farris/ui-vue/components/accordion'; - - -export default defineComponent({ - name: 'Nav Header', - props: headerProps, - emits: [], - setup(props: HeaderProps, context) { - const navContent = ref(); - const product = [] as any; - const modules = new Map(); - - function initData(dataArray: Map, item: any) { - - const element = dataArray.get(item.parentId); - if (element) { - element.push(item); - } else { - dataArray.set(item.parentId, [item]); - } - } - - function resolveData() { - listViewData.forEach((item: any) => { - switch (item.funcType) { - case '1': product.push(item); break; - case '2': initData(modules, item); break; - } - }); - return product; - } - const renderEditor = resolveData(); - - return () => { - return (
- - { - product.map((item: any) => { - - return ( - - - - { - (modules.get(item.id) || []).map((element: any) => { - return ( -
{element.name}
- ) - }) - } - -
-
- ) - }) - } -
); - } - } -}) \ No newline at end of file diff --git a/packages/farris-admin/src/components/header.props.ts b/packages/farris-admin/src/components/header.props.ts deleted file mode 100644 index 48de676053a..00000000000 --- a/packages/farris-admin/src/components/header.props.ts +++ /dev/null @@ -1,8 +0,0 @@ - -import { ExtractPropTypes } from "vue"; - - -export const headerProps = { -} as Record; - -export type HeaderProps = ExtractPropTypes; diff --git a/packages/farris-admin/src/main.ts b/packages/farris-admin/src/main.ts deleted file mode 100644 index a9e72478ec8..00000000000 --- a/packages/farris-admin/src/main.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { createApp } from 'vue'; -// import FarrisVue from '@farris/ui-vue'; -import App from './app.vue'; -// import { createDevkit } from '@farris/devkit-vue'; -// import router from './router'; - -// const devkit = createDevkit({ -// providers: [] -// }); - -const app = createApp(App); -// app.use(router); -// app.use(devkit); -// app.use(FarrisVue); -app.mount('#app'); diff --git a/packages/farris-admin/src/style.css b/packages/farris-admin/src/style.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/packages/farris-admin/src/vite-env.d.ts b/packages/farris-admin/src/vite-env.d.ts deleted file mode 100644 index e38e5224b9b..00000000000 --- a/packages/farris-admin/src/vite-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -// diff --git a/packages/farris-admin/tsconfig.json b/packages/farris-admin/tsconfig.json deleted file mode 100644 index 0b7f4ecc103..00000000000 --- a/packages/farris-admin/tsconfig.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "useDefineForClassFields": true, - "module": "ESNext", - "moduleResolution": "node", - "strict": true, - "jsx": "preserve", - "noImplicitAny": false, - "sourceMap": true, - "resolveJsonModule": true, - "isolatedModules": true, - "esModuleInterop": true, - "lib": ["ESNext", "DOM", "dom.iterable", "scripthost"], - "skipLibCheck": true, - "importHelpers": true, - "experimentalDecorators": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "types": ["vitest/globals", "@types/jest"], - "baseUrl": "./", - "paths": {} - }, - "include": ["components/**/*", "src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "designer/**/*"], - "references": [{ "path": "./tsconfig.node.json" }] -} diff --git a/packages/farris-admin/tsconfig.node.json b/packages/farris-admin/tsconfig.node.json deleted file mode 100644 index 2e16c8174ae..00000000000 --- a/packages/farris-admin/tsconfig.node.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - // "strict": true, - "composite": true, - "module": "ESNext", - "moduleResolution": "Node", - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true - }, - "include": ["vite.config.dev.ts"] -} diff --git a/packages/farris-admin/vite.config.build.ts b/packages/farris-admin/vite.config.build.ts deleted file mode 100644 index 87d9a18e946..00000000000 --- a/packages/farris-admin/vite.config.build.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { defineConfig } from 'vite'; - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [] -}); diff --git a/packages/farris-admin/vite.config.dev.ts b/packages/farris-admin/vite.config.dev.ts deleted file mode 100644 index 234270da9be..00000000000 --- a/packages/farris-admin/vite.config.dev.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { defineConfig } from 'vite'; -import vue from '@vitejs/plugin-vue'; -import vueJsx from '@vitejs/plugin-vue-jsx'; -import { resolve } from 'path'; - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [vue(), vueJsx()], - server: { - proxy: { - "/api": { - target: "http://localhost:5200", - changeOrigin: true, - secure: false - } - } - }, - resolve: { - alias: { - '@': resolve(__dirname, '../'), - '@farris/ui-vue': resolve(__dirname, '../ui-vue') - } - } -}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 849d8a5952f..93aa0d55bb3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -961,142 +961,6 @@ importers: specifier: ^0.40.4 version: 0.40.13(typescript@4.9.5) - packages/farris-admin: - dependencies: - '@farris/ui-vue': - specifier: workspace:^ - version: link:../ui-vue - '@monaco-editor/loader': - specifier: ^1.4.0 - version: 1.4.0(monaco-editor@0.52.2) - monaco-editor: - specifier: ^0.52.2 - version: 0.52.2 - vue: - specifier: ^3.2.37 - version: 3.5.12(typescript@4.9.5) - devDependencies: - '@babel/parser': - specifier: ^7.19.0 - version: 7.25.8 - '@babel/preset-env': - specifier: ^7.19.0 - version: 7.25.8(@babel/core@7.25.8) - '@babel/preset-typescript': - specifier: ^7.18.0 - version: 7.25.7(@babel/core@7.25.8) - '@babel/traverse': - specifier: ^7.19.0 - version: 7.25.7 - '@commitlint/cli': - specifier: ^19.3.0 - version: 19.5.0(@types/node@20.5.1)(typescript@4.9.5) - '@commitlint/config-conventional': - specifier: ^19.2.0 - version: 19.5.0 - '@farris/cli': - specifier: workspace:^ - version: link:../cli - '@farris/designer-dragula': - specifier: 0.0.5 - version: 0.0.5 - '@testing-library/vue': - specifier: ^7.0.0 - version: 7.0.0(@vue/compiler-sfc@3.5.12)(vue@3.5.12(typescript@4.9.5)) - '@types/jest': - specifier: ^26.0.24 - version: 26.0.24 - '@types/jsonp': - specifier: ^0.2.3 - version: 0.2.3 - '@types/lodash.debounce': - specifier: ^4.0.7 - version: 4.0.9 - '@typescript-eslint/eslint-plugin': - specifier: ^7.15.0 - version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5) - '@typescript-eslint/parser': - specifier: ^7.15.0 - version: 7.18.0(eslint@8.57.1)(typescript@4.9.5) - '@vitejs/plugin-vue': - specifier: ^4.2.3 - version: 4.6.2(vite@4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@4.9.5)) - '@vitejs/plugin-vue-jsx': - specifier: ^3.0.1 - version: 3.1.0(vite@4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@4.9.5)) - '@vue/babel-plugin-jsx': - specifier: ^1.1.1 - version: 1.2.5(@babel/core@7.25.8) - '@vue/compiler-sfc': - specifier: ^3.2.0 - version: 3.5.12 - '@vue/test-utils': - specifier: ^2.0.0 - version: 2.4.6 - '@vuedx/typecheck': - specifier: ^0.7.5 - version: 0.7.6 - '@vuedx/typescript-plugin-vue': - specifier: ^0.7.5 - version: 0.7.6 - babel-jest: - specifier: ^29.0.3 - version: 29.7.0(@babel/core@7.25.8) - chalk: - specifier: ^5.0.0 - version: 5.3.0 - commander: - specifier: ^9.4.0 - version: 9.5.0 - conventional-changelog-cli: - specifier: ^2.2.2 - version: 2.2.2 - happy-dom: - specifier: ^8.9.0 - version: 8.9.0 - inquirer: - specifier: ^9.1.1 - version: 9.3.7 - jest: - specifier: ^29.0.0 - version: 29.7.0(@types/node@20.5.1)(ts-node@10.9.2(@types/node@20.5.1)(typescript@4.9.5)) - ora: - specifier: ^6.1.2 - version: 6.3.1 - patch-vue-directive-ssr: - specifier: ^0.0.1 - version: 0.0.1 - sass: - specifier: ^1.32.2 - version: 1.80.3 - shelljs: - specifier: ^0.8.4 - version: 0.8.5 - typescript: - specifier: ^4.6.4 - version: 4.9.5 - vite: - specifier: ^4.4.1 - version: 4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0) - vite-plugin-dts: - specifier: ^2.1.0 - version: 2.3.0(@types/node@20.5.1)(rollup@4.24.0)(vite@4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0)) - vite-plugin-md: - specifier: ^0.20.0 - version: 0.20.6(@vitejs/plugin-vue@4.6.2(vite@4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@4.9.5)))(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@4.5.5(@types/node@20.5.1)(sass@1.80.3)(terser@5.36.0)) - vite-svg-loader: - specifier: ^4.0.0 - version: 4.0.0 - vitepress: - specifier: 1.0.0-alpha.8 - version: 1.0.0-alpha.8(@algolia/client-search@4.24.0)(@types/node@20.5.1)(react-dom@16.14.0(react@16.14.0))(react@16.14.0)(sass@1.80.3)(search-insights@2.17.2)(terser@5.36.0)(typescript@4.9.5) - vitepress-theme-demoblock: - specifier: 1.4.2 - version: 1.4.2(react-dom@16.14.0(react@16.14.0))(react@16.14.0)(sass@1.80.3)(typescript@4.9.5) - vue-tsc: - specifier: ^1.2.0 - version: 1.8.27(typescript@4.9.5) - packages/farris-theme: dependencies: '@types/gulp-autoprefixer': @@ -14607,7 +14471,7 @@ snapshots: fp-ts: 2.16.9 inferred-types: 0.37.6(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) markdown-it: 13.0.2 - vite-plugin-md: 0.22.5(@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0)) + vite-plugin-md: 0.22.5(@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)))(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0)) transitivePeerDependencies: - '@edge-runtime/vm' - '@vitejs/plugin-vue' @@ -15365,7 +15229,7 @@ snapshots: dependencies: bumpp: 8.2.1 callsites: 4.2.0 - inferred-types: 0.37.6(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) + inferred-types: 0.37.6(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) vitest: 0.25.8(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) transitivePeerDependencies: - '@edge-runtime/vm' @@ -15385,7 +15249,7 @@ snapshots: dependencies: bumpp: 8.2.1 callsites: 4.2.0 - inferred-types: 0.37.6(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) + inferred-types: 0.37.6(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) vitest: 0.25.8(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0) transitivePeerDependencies: - '@edge-runtime/vm' @@ -22572,7 +22436,7 @@ snapshots: - supports-color - terser - vite-plugin-md@0.22.5(@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0)): + vite-plugin-md@0.22.5(@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)))(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0)): dependencies: '@vitejs/plugin-vue': 5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)) '@yankeeinlondon/builder-api': 1.4.1(@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.80.3)(terser@5.36.0)(vite@5.4.9(@types/node@18.19.57)(sass-embedded@1.80.3)(sass@1.80.3)(terser@5.36.0)) @@ -22586,7 +22450,6 @@ snapshots: - '@vitest/browser' - '@vitest/ui' - encoding - - happy-dom - jsdom - less - lightningcss diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 4552f92dc72..2567ccae7d5 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -12,4 +12,3 @@ packages: - 'packages/ui-vue' - 'packages/command-services' - 'packages/ui-binding' - - 'packages/farris-admin' -- Gitee From ac7ce178e2258effa118d007daa9a4af97ffa930 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Fri, 27 Dec 2024 11:34:20 +0800 Subject: [PATCH 060/181] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=9C=BA=E5=85=83=E6=95=B0=E6=8D=AE=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=92=8C=E6=8F=90=E5=8F=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../composition/use-event-parameter-data.ts | 6 +- .../composition/use-form-statemachine.ts | 63 +++++++++++++------ .../src/components/designer.component.tsx | 15 +++-- .../designer/src/components/types/metadata.ts | 28 ++------- .../data-grid-component-creator.service.ts | 7 ++- .../designer-canvas/src/composition/types.ts | 3 +- .../src/designer-canvas.component.tsx | 3 +- .../schema/section-toolbar-item.schema.json | 5 ++ .../tab-toolbar-item.property-config.ts | 32 ++++++---- .../src/schema/tab-toolbar-item.schema.json | 8 ++- 10 files changed, 100 insertions(+), 70 deletions(-) diff --git a/packages/designer/src/components/composition/use-event-parameter-data.ts b/packages/designer/src/components/composition/use-event-parameter-data.ts index e857ae2aa56..0f711c1609b 100644 --- a/packages/designer/src/components/composition/use-event-parameter-data.ts +++ b/packages/designer/src/components/composition/use-event-parameter-data.ts @@ -100,8 +100,10 @@ export function useEventParameterData( // 构造actions data function buildActions() { const stateMachineMetadata = useFormStateMachineComposition.getStateMachineMetadata(); - const object = JSON.parse(stateMachineMetadata.content); - const actions = object && object.action || {}; + if (!stateMachineMetadata) { + return []; + } + const actions = stateMachineMetadata.action || {}; return getActionsChanged(actions); } diff --git a/packages/designer/src/components/composition/use-form-statemachine.ts b/packages/designer/src/components/composition/use-form-statemachine.ts index 6f957b206a6..40058f1c52a 100644 --- a/packages/designer/src/components/composition/use-form-statemachine.ts +++ b/packages/designer/src/components/composition/use-form-statemachine.ts @@ -1,35 +1,60 @@ -import { FormMetadaDataDom, MetadataDto, UseFormStateMachine } from "../types"; +import { UseFormSchema, UseFormStateMachine } from "../types"; import { MetadataService } from "./metadata.service"; -export default function (): UseFormStateMachine { +export default function (useFormSchemaComposition: UseFormSchema): UseFormStateMachine { let stateMachineMetadata: any; + let renderStateData: any = []; + const metadataService = new MetadataService(); + + /** + * 获取状态机中的可视化状态数据 + */ + function getRenderStates() { + return renderStateData || []; + } + + /** + * 提取状态机中的可视化状态数据 + */ + function resolveRenderStateData(stateMachineCode: string) { + renderStateData = []; + Object.keys(stateMachineMetadata.renderState).forEach(item => { + const state = stateMachineMetadata.renderState[item]; + renderStateData.push({ + id: item, + name: state.name, + exist: '是', + stateMachineId: stateMachineCode + }); + }); + } /** * 获取状态机元数据 - * @returns */ - function getStateMachineMetadataAsync( - formMetadata: FormMetadaDataDom, - metadataDto: MetadataDto): Promise { - const { stateMachines } = formMetadata.module; + function queryStateMachineMetadata(): void { + const formSchema = useFormSchemaComposition.getFormSchema(); + const formBasicInfo = useFormSchemaComposition.getFormMetadataBasicInfo(); + if (!formSchema?.module || !formBasicInfo) { + return; + } + const { stateMachines } = formSchema.module; if (stateMachines && stateMachines.length) { - const stateMachineID = stateMachines[0].uri; - const { relativePath } = metadataDto; - return metadataService.queryMetadataById(relativePath, stateMachineID); + const { uri: stateMachineID, id: stateMachineCode } = stateMachines[0]; + const { relativePath } = formBasicInfo; + metadataService.queryMetadataById(relativePath, stateMachineID).then(result => { + if (result?.data?.content) { + stateMachineMetadata = JSON.parse(result.data.content); + } + resolveRenderStateData(stateMachineCode); + }); } - return Promise.resolve(); + return; } - - - function setStateMachineMetadata(value: any) { - stateMachineMetadata = value || {}; - } - - function getStateMachineMetadata() { return stateMachineMetadata; } - return { getStateMachineMetadata, setStateMachineMetadata, getStateMachineMetadataAsync }; + return { getStateMachineMetadata, queryStateMachineMetadata, getRenderStates }; } diff --git a/packages/designer/src/components/designer.component.tsx b/packages/designer/src/components/designer.component.tsx index c2b9b9cab77..4d44d2dfbc5 100644 --- a/packages/designer/src/components/designer.component.tsx +++ b/packages/designer/src/components/designer.component.tsx @@ -35,16 +35,17 @@ export default defineComponent({ const activeShowDesignerType = ref('formDesigner'); const viewModelDesignerRef = ref(); const loadingService: any = inject('FLoadingService'); - const useFormStateMachineComposition = useFormStateMachine(); - provide('useFormStateMachine', useFormStateMachineComposition); + const currentViewType = ref('designer'); const codeViewComponent = ref(); // 注册 formSchema服务 const useFormSchemaComposition = useFormSchema(); provide('useFormSchema', useFormSchemaComposition); const commandBuilderService = useCommandBuilderService(useFormSchemaComposition); + const useFormStateMachineComposition = useFormStateMachine(useFormSchemaComposition); + provide('useFormStateMachine', useFormStateMachineComposition); // 注册 命令服务 - const formCommandService = useFormCommandService(useFormSchemaComposition,useFormStateMachineComposition, loadingService, commandBuilderService); + const formCommandService = useFormCommandService(useFormSchemaComposition, useFormStateMachineComposition, loadingService, commandBuilderService); provide('useFormCommand', formCommandService); // 注册事件编辑器服务 const useEventsEditorService = useEventsEditor(formCommandService, useFormSchemaComposition); @@ -74,11 +75,9 @@ export default defineComponent({ formCommandService.checkCommands(); // 赋值处理 designViewModelService.assembleDesignViewModel(); + // 加载状态机 + useFormStateMachineComposition.queryStateMachineMetadata(); }); - const metadataInfo = useFormSchemaComposition.getFormMetadataBasicInfo(); - return useFormStateMachineComposition.getStateMachineMetadataAsync(formSchema, metadataInfo); - }).then((result) => { - useFormStateMachineComposition.setStateMachineMetadata(result?.data); }); }); @@ -134,7 +133,7 @@ export default defineComponent({ loadingInstance.value.close(); }); } - + /** * 工具栏配置 */ diff --git a/packages/designer/src/components/types/metadata.ts b/packages/designer/src/components/types/metadata.ts index e88b8013490..84fcb093e38 100644 --- a/packages/designer/src/components/types/metadata.ts +++ b/packages/designer/src/components/types/metadata.ts @@ -150,7 +150,7 @@ export interface UseFormMetadata { /** 发布表单 */ publishFormMetadata: () => Promise<{ result: boolean, error?: string }>; /** 部署表单 */ - deployFrontFile: (metadataId:string, path:string) => Promise + deployFrontFile: (metadataId: string, path: string) => Promise } export interface UseFormSchema { @@ -239,26 +239,10 @@ export interface UseControlCreator { } export interface UseFormStateMachine { - /** - * 请求获取状态机元数据 - * @returns - */ - - getStateMachineMetadataAsync: ( - formMetadata: FormMetadaDataDom, - metadataDto: MetadataDto) => Promise; - /** - * 获取元数据 - * @returns - */ + /** 请求获取状态机元数据 */ + queryStateMachineMetadata: () => void; + /** 获取状态机元数据 */ getStateMachineMetadata: () => any; - - - /** - * 状态机元数据赋值 - * @returns - */ - setStateMachineMetadata: (value: any) => void; - - + /** 获取状态机元数据中的可视化状态 */ + getRenderStates: (value: any) => any[]; } diff --git a/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts b/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts index 92c1bc4dd0c..1c188b5d083 100644 --- a/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts +++ b/packages/ui-vue/components/data-grid/src/composition/data-grid-component-creator.service.ts @@ -18,6 +18,7 @@ export class DataGridComponentCreatorService { private controlCreatorUtils: any; private designViewModelUtils: any; private useFormCommand: any; + private formStateMachineUtils: any; constructor( private resolver: DynamicResolver, @@ -27,6 +28,7 @@ export class DataGridComponentCreatorService { this.controlCreatorUtils = this.designerHostService.controlCreatorUtils; this.designViewModelUtils = this.designerHostService.designViewModelUtils; this.useFormCommand = this.designerHostService.useFormCommand; + this.formStateMachineUtils = this.designerHostService.formStateMachineUtils; } public createComponent(buildInfo: ComponentBuildInfo) { @@ -100,13 +102,14 @@ export class DataGridComponentCreatorService { if (buildInfo.componentType !== 'data-grid' && buildInfo.componentType !== 'form') { return; } + const stateMachineRenderState = this.formStateMachineUtils && this.formStateMachineUtils.getRenderStates(); const btnType = DgControl['tab-page'].type === resolvedContainerType ? 'tab-toolbar-item' : 'section-toolbar-item'; const btns = [{ id: `button-add-${buildInfo.componentId}`, type: btnType, text: '新增', - disable: `!viewModel.stateMachine['canAddDetail']`, + disabled: stateMachineRenderState.find(d => d.id === 'canAddDetail') ? `!viewModel.stateMachine['canAddDetail']` : false, appearance: { class: 'btn btn-secondary f-btn-ml' }, @@ -116,7 +119,7 @@ export class DataGridComponentCreatorService { id: `button-remove-${buildInfo.componentId}`, type: btnType, text: '删除', - disable: `!viewModel.stateMachine['canRemoveDetail']`, + disabled: stateMachineRenderState.find(d => d.id === 'canRemoveDetail') ? `!viewModel.stateMachine['canRemoveDetail']` : false, appearance: { class: 'btn btn-secondary f-btn-ml' }, diff --git a/packages/ui-vue/components/designer-canvas/src/composition/types.ts b/packages/ui-vue/components/designer-canvas/src/composition/types.ts index f53afe54199..65ed7aa7301 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/types.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/types.ts @@ -26,12 +26,13 @@ export interface DesignerHostService { designViewModelUtils: any; controlCreatorUtils: any; metadataService?: any; + formStateMachineUtils: any; [key: string]: any; } /** * 绑定上下文 */ - export interface ComponentBindingSourceContext { +export interface ComponentBindingSourceContext { /** 控件绑定类型:字段|实体 */ bindingType: 'field' | 'entity'; /** 控件绑定的实体schema字段 */ diff --git a/packages/ui-vue/components/designer-canvas/src/designer-canvas.component.tsx b/packages/ui-vue/components/designer-canvas/src/designer-canvas.component.tsx index fbbb54cb666..cb6d97bca1f 100644 --- a/packages/ui-vue/components/designer-canvas/src/designer-canvas.component.tsx +++ b/packages/ui-vue/components/designer-canvas/src/designer-canvas.component.tsx @@ -34,7 +34,8 @@ export default defineComponent({ metadataService: inject('Meatdata_Http_Service_Token'), schemaService: inject('schemaService'), useFormCommand: inject('useFormCommand'), - modalService: inject(F_MODAL_SERVICE_TOKEN) + modalService: inject(F_MODAL_SERVICE_TOKEN), + formStateMachineUtils: inject('useFormStateMachine') }; provide('designer-host-service', designerHostService); diff --git a/packages/ui-vue/components/section/src/schema/section-toolbar-item.schema.json b/packages/ui-vue/components/section/src/schema/section-toolbar-item.schema.json index f2112eded53..7c7721d845d 100644 --- a/packages/ui-vue/components/section/src/schema/section-toolbar-item.schema.json +++ b/packages/ui-vue/components/section/src/schema/section-toolbar-item.schema.json @@ -37,6 +37,11 @@ "type": "string", "default": "" }, + "disabled": { + "description": "禁用", + "type": "boolean", + "default": false + }, "onClick": { "description": "点击事件", "type": "string", diff --git a/packages/ui-vue/components/tabs/src/property-config/tab-toolbar-item.property-config.ts b/packages/ui-vue/components/tabs/src/property-config/tab-toolbar-item.property-config.ts index 90b228e756a..bffe83b9f8d 100644 --- a/packages/ui-vue/components/tabs/src/property-config/tab-toolbar-item.property-config.ts +++ b/packages/ui-vue/components/tabs/src/property-config/tab-toolbar-item.property-config.ts @@ -14,6 +14,9 @@ export class TabToolbarItemProperty extends BaseControlProperty { // 外观 this.getAppearanceProperties(propertyData); + // 行为 + this.getbBehaviorConfig(); + // 事件 this.getEventPropConfig(propertyData); @@ -54,25 +57,30 @@ export class TabToolbarItemProperty extends BaseControlProperty { } private getAppearanceProperties(propertyData: any) { - const self = this; this.propertyConfig.categories['appearance'] = { title: '外观', properties: { - "class": { - "description": "组件的CSS样式", - "title": "class样式" - }, - "style": { - "description": "组件的内容样式", - "title": "style样式" + class: { + description: '组件的CSS样式', + title: 'class样式' + } + } + }; + } + private getbBehaviorConfig() { + this.propertyConfig.categories['behavior'] = { + title: "行为", + description: "Behavior", + properties: { + disabled: { + title: "禁用", + type: "boolean", + description: "按钮禁用状态", + refreshPanelAfterChanged: true } - }, - setPropertyRelates(changeObject: PropertyChangeObject, data: any) { - } }; } - private getEventPropConfig(propertyData: any) { const events = [ { diff --git a/packages/ui-vue/components/tabs/src/schema/tab-toolbar-item.schema.json b/packages/ui-vue/components/tabs/src/schema/tab-toolbar-item.schema.json index 35f61c2cd38..dba17106a83 100644 --- a/packages/ui-vue/components/tabs/src/schema/tab-toolbar-item.schema.json +++ b/packages/ui-vue/components/tabs/src/schema/tab-toolbar-item.schema.json @@ -20,9 +20,6 @@ "properties": { "class": { "type": "string" - }, - "style": { - "type": "string" } }, "default": {} @@ -37,6 +34,11 @@ "type": "string", "default": "" }, + "disabled": { + "description": "禁用", + "type": "boolean", + "default": false + }, "onClick": { "description": "点击事件", "type": "string", -- Gitee From f9ac6b4fca778d977919fcf271c38b2cb840b7c4 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Fri, 27 Dec 2024 16:45:02 +0800 Subject: [PATCH 061/181] =?UTF-8?q?feature:=20=E6=94=AF=E6=8C=81=E4=BB=8E?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E7=AE=B1=E5=88=9B=E5=BB=BA=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E6=96=B9=E6=A1=88=E3=80=81=E6=94=AF=E6=8C=81=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=96=B9=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../public/assets/template-rules/common.json | 14 ++ .../src/designer/use-designer-rules.ts | 27 +++ .../rule/use-dragula-common-rule.ts | 5 +- .../designer-toolbox/src/toolbox.json | 12 ++ .../src/composition/build-solution.ts | 156 ++++++++++++++++++ .../composition/use-querysolution-rules.ts | 41 ++++- .../src/schema/schema-resolver.ts | 13 +- 7 files changed, 264 insertions(+), 4 deletions(-) create mode 100644 packages/ui-vue/components/query-solution/src/composition/build-solution.ts diff --git a/packages/designer/public/assets/template-rules/common.json b/packages/designer/public/assets/template-rules/common.json index ef7244699f2..192e509fe03 100644 --- a/packages/designer/public/assets/template-rules/common.json +++ b/packages/designer/public/assets/template-rules/common.json @@ -411,5 +411,19 @@ "canMove": false, "canDelete": false, "canAccept": true + }, + "f-section-scheme": { + "description": "筛选方案的外层Section", + "canMove": true, + "canDelete": true, + "canAccept": { + "invalidContext": [ + { + "firstLevelChild": { + "type": "query-solution" + } + } + ] + } } } \ No newline at end of file diff --git a/packages/ui-vue/components/content-container/src/designer/use-designer-rules.ts b/packages/ui-vue/components/content-container/src/designer/use-designer-rules.ts index ba0c94532f9..cf356685c82 100644 --- a/packages/ui-vue/components/content-container/src/designer/use-designer-rules.ts +++ b/packages/ui-vue/components/content-container/src/designer/use-designer-rules.ts @@ -3,16 +3,43 @@ import { DesignerHostService, DesignerHTMLElement, DraggingResolveContext, UseDe import { useDragulaCommonRule } from "../../../designer-canvas/src/composition/rule/use-dragula-common-rule"; import { ComponentSchema, DesignerItemContext } from "../../../designer-canvas/src/types"; import { UseTemplateDragAndDropRules } from "../../../designer-canvas/src/composition/rule/use-template-rule"; +import { DgControl } from "../../../designer-canvas"; export function useDesignerRulesForContentContainer(designItemContext: DesignerItemContext, designerHostService?: DesignerHostService): UseDesignerRules { const schema = designItemContext.schema as ComponentSchema; const dragAndDropRules = new UseTemplateDragAndDropRules(); + /** + * 判断当前移动的控件是否为筛选方案或者筛选方案外层的分组面板 + */ + function checkIfDraggingQuerySolution(draggingContext: DraggingResolveContext) { + const { componentType, sourceType, sourceElement } = draggingContext; + if (sourceType === 'control' && componentType === DgControl['query-solution'].type) { + return true; + } + if (sourceType === 'move' && componentType === DgControl['section'].type && sourceElement?.className?.includes('f-section-scheme')) { + return true; + } + return false; + } + /** + * 判断当前容器是否可接收筛选方案 + */ + function checkCanAcceptQuerySolution() { + const containerClass = schema.appearance?.class; + const isPageLayer = containerClass && containerClass.includes('f-page-is-managelist'); + const solutionExisted = schema.contents && schema.contents.find(content => content.type === DgControl['section'].type && content.appearance?.class?.includes('f-section-scheme')); + return isPageLayer && !solutionExisted; + } /** * 判断是否可以接收拖拽新增的子级控件 */ function canAccepts(draggingContext: DraggingResolveContext): boolean { + if (checkIfDraggingQuerySolution(draggingContext)) { + return checkCanAcceptQuerySolution(); + } + const basalRule = useDragulaCommonRule().basalDragulaRuleForContainer(draggingContext, designerHostService); if (!basalRule) { return false; diff --git a/packages/ui-vue/components/designer-canvas/src/composition/rule/use-dragula-common-rule.ts b/packages/ui-vue/components/designer-canvas/src/composition/rule/use-dragula-common-rule.ts index 0d6b69c7c66..7f6131d6913 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/rule/use-dragula-common-rule.ts +++ b/packages/ui-vue/components/designer-canvas/src/composition/rule/use-dragula-common-rule.ts @@ -38,7 +38,10 @@ export function useDragulaCommonRule() { return false; } } - + // 限制筛选方案 + if (draggingContext.componentType === DgControl['query-solution'].type) { + return false; + } return true; } diff --git a/packages/ui-vue/components/designer-toolbox/src/toolbox.json b/packages/ui-vue/components/designer-toolbox/src/toolbox.json index 051b9a15b82..8e1c348e03c 100644 --- a/packages/ui-vue/components/designer-toolbox/src/toolbox.json +++ b/packages/ui-vue/components/designer-toolbox/src/toolbox.json @@ -94,5 +94,17 @@ "category": "container" } ] + }, + { + "type": "business", + "name": "业务类控件", + "items": [ + { + "id": "QuerySolution", + "type": "query-solution", + "name": "筛选方案", + "category": "container" + } + ] } ] \ No newline at end of file diff --git a/packages/ui-vue/components/query-solution/src/composition/build-solution.ts b/packages/ui-vue/components/query-solution/src/composition/build-solution.ts new file mode 100644 index 00000000000..8bc61f513e6 --- /dev/null +++ b/packages/ui-vue/components/query-solution/src/composition/build-solution.ts @@ -0,0 +1,156 @@ +import { useGuid } from "../.../../../../common"; +import { DesignerHostService, DgControl } from "../.../../../../designer-canvas"; +import { getSchemaByType } from "../.../../../../dynamic-resolver"; + +export function querySolutionCreatorService(context: Record, designerHostService?: DesignerHostService) { + + const formSchemaUtils = designerHostService?.formSchemaUtils; + const targetComponentInstance = context.parentComponentInstance; + /** 加载命令的控制器id */ + const loadCommandCmpId = '54bddc89-5f7e-4b91-9c45-80dd6606cfe9'; + + /** + * 创建查询相关命令 + * @param solutionMetadata 筛选方案元数据 + */ + function createCommandsForSolution(solutionMetadata: any) { + const targetComponentId = targetComponentInstance.belongedComponentId; + const viewModelId = formSchemaUtils.getViewModelIdByComponentId(targetComponentId); + const viewModel = formSchemaUtils.getViewModelById(viewModelId); + + // 1、预制筛选方案查询命令 + let newFilterCommandId; + if (viewModel && viewModel.commands) { + let filterCommand = viewModel.commands.find(command => command.handlerName === 'Filter' && command.cmpId === loadCommandCmpId); + if (!filterCommand) { + newFilterCommandId = useGuid().guid(); + filterCommand = { + id: newFilterCommandId, + code: 'rootviewmodelFilter1', + name: '过滤并加载数据1', + params: [ + { + name: 'filter', + shownName: '过滤条件', + value: '{UISTATE~/root-component/originalFilterConditionList}' + }, + { + name: 'sort', + shownName: '排序条件', + value: '' + } + ], + handlerName: 'Filter', + cmpId: loadCommandCmpId, + shortcut: {}, + extensions: [] + }; + viewModel.commands.push(filterCommand); + } else { + if (filterCommand.params && filterCommand.params.length) { + const filterParam = filterCommand.params.find(p => p.name === 'filter'); + if (filterParam) { + filterParam.value = '{UISTATE~/root-component/originalFilterConditionList}'; + } + } + } + + const filterCommandCode = filterCommand.code; + solutionMetadata.onQuery = filterCommandCode; + } + + // 2、预置筛选方案查询数据的构件 + const webCmds = formSchemaUtils.getFormSchema().module.webcmds; + if (webCmds) { + let loadDataCmd = webCmds.find(cmd => cmd.id === loadCommandCmpId); + if (!loadDataCmd) { + loadDataCmd = { + id: loadCommandCmpId, + path: 'igix/Web/WebCmp/bo-webcmp/metadata/webcmd/data-commands', + name: 'LoadCommands.webcmd', + refedHandlers: [] + }; + formSchemaUtils.getFormSchema().module.webcmds.push(loadDataCmd); + } + if (newFilterCommandId) { + loadDataCmd.refedHandlers.push( + { + host: newFilterCommandId, + handler: 'Filter' + } + ); + + } + } + } + + function createQuerySolution(): any { + // 1、组装筛选方案容器和筛选方案dom结构 + const solutionContainer = getSchemaByType(DgControl.section.type); + const solutionMetadata = getSchemaByType(DgControl['query-solution'].type); + if (!solutionContainer || !solutionMetadata) { + return; + } + const prefix = Math.random().toString(36).slice(2, 6); + Object.assign(solutionContainer, { + id: 'solution-container-' + prefix, + appearance: { + class: 'f-section-scheme f-section-in-managelist' + }, + showHeader: false, + contents: [solutionMetadata] + }); + + Object.assign(solutionMetadata, { + id: 'solution-' + prefix, + fields: [], + presetFields: [], + formId: formSchemaUtils.getFormMetadataBasicInfo().code + }); + + + // 2、关联DOM处理--新增样式 + const targetContainer = targetComponentInstance.schema; + if (targetContainer) { + if (!targetContainer.appearance) { + targetContainer.appearance.class = 'f-page-has-scheme'; + } else if (targetContainer.appearance.class && !targetContainer.appearance.class.includes('f-page-has-scheme')) { + targetContainer.appearance.class += ' f-page-has-scheme'; + } + } + + + // 3、预置筛选方案相关的变量 + const targetComponentId = targetComponentInstance.belongedComponentId; + const viewModelId = formSchemaUtils.getViewModelIdByComponentId(targetComponentId); + const viewModel = formSchemaUtils.getViewModelById(viewModelId); + if (viewModel?.states) { + if (!viewModel.states.find(state => state.code === 'originalFilterConditionList')) { + viewModel.states.push( + { + id: useGuid().guid(), + category: 'locale', + code: 'originalFilterConditionList', + name: '筛选方案筛选条件', + type: 'String' + } + ); + } + } + + // 4、创建查询相关命令 + createCommandsForSolution(solutionMetadata); + + // 5、因为涉及到新增控制器,所以这里需要获取控制器信息,方便交互面板展示命令数据 + const formCommandService = designerHostService?.useFormCommand; + if (formCommandService) { + formCommandService.checkCommands(); + } + + return solutionContainer; + } + + return { + createQuerySolution + }; +} diff --git a/packages/ui-vue/components/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.ts b/packages/ui-vue/components/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.ts index d9a246889a0..c1343b75669 100644 --- a/packages/ui-vue/components/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.ts +++ b/packages/ui-vue/components/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.ts @@ -1,4 +1,3 @@ - import { UseDesignerRules } from "../../../../../designer-canvas/src/composition/types"; import { ComponentSchema, DesignerComponentInstance, DesignerItemContext } from "../../../../../designer-canvas/src/types"; import { QuerySolutionPropertyConfig } from "../../../property-config/query-solution.property-config";; @@ -12,8 +11,46 @@ export function useQuerysolutionDesignerRules(designItemContext: DesignerItemCon return querySolutionProps.getPropertyConfig(schema, componentInstance); } + function canAccepts() { + return false; + } + function checkCanDeleteComponent() { + return false; + } + function checkCanMoveComponent() { + return false; + } + /** + * 组件删除后事件 + */ + function onRemoveComponent() { + // 1、移除根节点对应的样式 + if (designItemContext?.parent?.parent?.schema) { + const sectionParentSchema = designItemContext?.parent?.parent.schema; + if (sectionParentSchema.appearance?.class && sectionParentSchema.appearance?.class.includes('f-page-has-scheme')) { + sectionParentSchema.appearance.class = sectionParentSchema.appearance?.class.replace('f-page-has-scheme', '').replace(' ', ''); + } + } + + // 2、移除筛选方案相关的变量 + const formSchemaUtils = { designerHostService }; + const targetComponentId = designItemContext.componentInstance.value.belongedComponentId; + const viewModelId = formSchemaUtils.getViewModelIdByComponentId(targetComponentId); + const viewModel = formSchemaUtils.getViewModelById(viewModelId); + if (viewModel && viewModel.states) { + const filterVariableIndex = viewModel.states.findIndex(state => state.code === 'originalFilterConditionList'); + if (filterVariableIndex > -1) { + viewModel.states.splice(filterVariableIndex, 1); + } + } + } + return { - getPropsConfig + getPropsConfig, + canAccepts, + checkCanDeleteComponent, + checkCanMoveComponent, + onRemoveComponent } as UseDesignerRules; } diff --git a/packages/ui-vue/components/query-solution/src/schema/schema-resolver.ts b/packages/ui-vue/components/query-solution/src/schema/schema-resolver.ts index b02bdf93eec..6cfaa384157 100644 --- a/packages/ui-vue/components/query-solution/src/schema/schema-resolver.ts +++ b/packages/ui-vue/components/query-solution/src/schema/schema-resolver.ts @@ -1,5 +1,16 @@ +import { DesignerComponentInstance, DesignerHostService } from "../../../designer-canvas"; import { DynamicResolver } from "../../../dynamic-resolver"; +import { querySolutionCreatorService } from "../composition/build-solution"; -export function schemaResolver(resolver: DynamicResolver, schema: Record, context: Record): Record { +export function schemaResolver(resolver: DynamicResolver, schema: Record, context: Record, designerHostService?: DesignerHostService): Record { + + const parentComponentInstance = context.parentComponentInstance as DesignerComponentInstance; + if (parentComponentInstance && designerHostService) { + const solutionCreator = querySolutionCreatorService(context, designerHostService); + const solutionContainer = solutionCreator.createQuerySolution(); + if (solutionContainer) { + return solutionContainer; + } + } return schema; } -- Gitee From dada758d7a125d447ed26acb85911ace845679bf Mon Sep 17 00:00:00 2001 From: wang-xh Date: Fri, 27 Dec 2024 17:46:02 +0800 Subject: [PATCH 062/181] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=A3=80=E6=9F=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../composition/use-querysolution-rules.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui-vue/components/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.ts b/packages/ui-vue/components/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.ts index c1343b75669..6765c263764 100644 --- a/packages/ui-vue/components/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.ts +++ b/packages/ui-vue/components/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.ts @@ -33,7 +33,7 @@ export function useQuerysolutionDesignerRules(designItemContext: DesignerItemCon } // 2、移除筛选方案相关的变量 - const formSchemaUtils = { designerHostService }; + const { formSchemaUtils } = designerHostService; const targetComponentId = designItemContext.componentInstance.value.belongedComponentId; const viewModelId = formSchemaUtils.getViewModelIdByComponentId(targetComponentId); const viewModel = formSchemaUtils.getViewModelById(viewModelId); -- Gitee From 481c9a9c3db168d5d830ae49bedc2952ed45ba5d Mon Sep 17 00:00:00 2001 From: wang-xh Date: Tue, 31 Dec 2024 10:20:14 +0800 Subject: [PATCH 063/181] =?UTF-8?q?fix:=20=E6=96=B0=E5=A2=9E=E5=A1=AB?= =?UTF-8?q?=E6=8A=A5=E6=A8=A1=E6=9D=BF=E7=9A=84=E6=8E=A7=E5=88=B6=E8=A7=84?= =?UTF-8?q?=E5=88=99=EF=BC=9B=E4=BC=98=E5=8C=96=E6=A0=87=E7=AD=BE=E9=A1=B5?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E7=9A=84=E5=A1=AB=E5=85=85=E7=89=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../card-fill-in-form-template.json | 14 + .../composition/form-metadata.service.ts | 63 ++- .../src/components/designer.component.tsx | 2 +- .../designer/src/components/types/metadata.ts | 5 +- .../src/composition/class/control.css | 521 +----------------- .../designer/page-header.design.component.tsx | 37 +- ...response-layout-editor-setting.schema.json | 15 +- .../response-toolbar.design.component.tsx | 5 +- .../src/components/tab-header.component.tsx | 2 +- .../designer/tab-header.design.component.tsx | 2 +- .../designer/tab-page.design.component.tsx | 3 +- .../src/designer/tabs.design.component.tsx | 22 +- .../components/tabs/src/tabs.component.tsx | 11 +- .../ui-vue/components/tabs/src/tabs.props.ts | 2 + .../ui-vue/demos/tabs/tab-content-fill.vue | 25 + packages/ui-vue/demos/tabs/tab-type.vue | 4 +- packages/ui-vue/docs/components/tabs/index.md | 8 + 17 files changed, 158 insertions(+), 583 deletions(-) create mode 100644 packages/designer/public/assets/template-rules/card-fill-in-form-template.json create mode 100644 packages/ui-vue/demos/tabs/tab-content-fill.vue diff --git a/packages/designer/public/assets/template-rules/card-fill-in-form-template.json b/packages/designer/public/assets/template-rules/card-fill-in-form-template.json new file mode 100644 index 00000000000..086836f9b3c --- /dev/null +++ b/packages/designer/public/assets/template-rules/card-fill-in-form-template.json @@ -0,0 +1,14 @@ +{ + "f-page-layout": { + "description": "页面主区域容器", + "canAccept": false, + "canMove": false, + "canDelete": false + }, + "f-page-container": { + "description": "页面中心区域", + "canAccept": false, + "canMove": false, + "canDelete": false + } +} \ No newline at end of file diff --git a/packages/designer/src/components/composition/form-metadata.service.ts b/packages/designer/src/components/composition/form-metadata.service.ts index e9eafe0ac06..84c37fc2303 100644 --- a/packages/designer/src/components/composition/form-metadata.service.ts +++ b/packages/designer/src/components/composition/form-metadata.service.ts @@ -2,9 +2,10 @@ import axios from 'axios'; import { mergeWith, omit } from 'lodash-es'; import { DesignerProps } from '../designer.props'; import { FormMetadataConverter } from './form-metadata-converter'; -import { FormMetadaDataDom, MetadataDto, MetadataPathToken, UseFormSchema, UseFormMetadata } from '../types'; +import { FormMetadaDataDom, MetadataDto, MetadataPathToken, UseFormSchema, UseFormMetadata, FormMetaDataModule } from '../types'; import { inject } from 'vue'; import { MetadataService } from './metadata.service'; +import { FNotifyService } from '@farris/ui-vue/components/notify'; export function useFormMetadata(props: DesignerProps, useFormSchemaComposition: UseFormSchema): UseFormMetadata { @@ -82,23 +83,39 @@ export function useFormMetadata(props: DesignerProps, useFormSchemaComposition: /** * 获取拖拽控制规则:合并公共规则和模板的特定规则 */ - function queryFormTemplateRule(templateId: string): Promise { + function queryFormTemplateRule(formModule: FormMetaDataModule): Promise { + if (!formModule) { + return Promise.resolve(); + } + const { templateId, templateRule } = formModule; + const notifyService: any = new FNotifyService(); + notifyService.globalConfig = { position: 'top-center' }; + return new Promise((resolve, reject) => { - const rulesRequests = [axios.get(`assets/template-rules/common.json`)]; - if (templateId) { - rulesRequests.push(axios.get(`assets/template-rules/${templateId}.json`)); + const rulesRequests = [axios.get(`assets/template-rules/common.json`).then(response => response).catch(error => { + notifyService.error('获取表单公共控制规则失败。'); + return; + })]; + if (templateId && templateRule) { + rulesRequests.push(axios.get(`assets/template-rules/${templateId}.json`).then(response => response).catch(error => { + notifyService.error(`获取模板[${templateId}]的控制规则失败。`); + return; + })); } axios.all(rulesRequests).then(axios.spread((commonRuleResult, templateRuleResult) => { - - if (templateRuleResult) { - function customizer(objValue, srcValue) { - if (Array.isArray(objValue) && Array.isArray(srcValue)) { - return objValue.concat(srcValue);; + if (commonRuleResult) { + if (templateRuleResult) { + function customizer(objValue, srcValue) { + if (Array.isArray(objValue) && Array.isArray(srcValue)) { + return objValue.concat(srcValue);; + } } + mergeWith(commonRuleResult.data, templateRuleResult.data, customizer); } - mergeWith(commonRuleResult.data, templateRuleResult.data, customizer); + useFormSchemaComposition.setFormTemplateRule(commonRuleResult.data); } - useFormSchemaComposition.setFormTemplateRule(commonRuleResult.data); + + resolve(); }), () => { resolve(); @@ -112,7 +129,7 @@ export function useFormMetadata(props: DesignerProps, useFormSchemaComposition: * @description 发布 * @introduction post接口触发发布行为,ws负责接收发布状态 */ - function publishFormMetadata():Promise<{result:boolean, error?:string}> { + function publishFormMetadata(): Promise<{ result: boolean, error?: string }> { return new Promise((resolve, reject) => { let wsType = 'ws:'; if (location && location.protocol === 'https:') { @@ -124,29 +141,29 @@ export function useFormMetadata(props: DesignerProps, useFormSchemaComposition: publishStatusSocket.onopen = (() => { const metadataPathList = formMetadataBasicInfo.relativePath.split('/').filter(pathItem => pathItem); - const boPath = metadataPathList[0] + '/' + metadataPathList[1] + '/' + metadataPathList[2]; + const boPath = metadataPathList[0] + '/' + metadataPathList[1] + '/' + metadataPathList[2]; const api = `/api/dev/main/v1.0/repo-packages/publish?id=${formMetadataBasicInfo.bizobjectID}&path=${boPath}`; const requestHeader = { "content-type": "application/json" }; - axios.post(api, null, {headers: requestHeader}).then((response) => { + axios.post(api, null, { headers: requestHeader }).then((response) => { }); }); - publishStatusSocket.onerror = ((error:any) => { + publishStatusSocket.onerror = ((error: any) => { let errMessage = '构建异常,请重试'; - if(typeof(error.error) === 'string') { + if (typeof (error.error) === 'string') { errMessage = error.error; } - resolve({ result: false, error:errMessage}); + resolve({ result: false, error: errMessage }); }); publishStatusSocket.onmessage = ((event) => { // console.log(event); const progressInfoStr = event.data.match(/\{(.*)\}/)[0]; - const progressInfo = JSON.parse(progressInfoStr); + const progressInfo = JSON.parse(progressInfoStr); if (progressInfo.process === 100) { publishStatusSocket.close(); - resolve({result: true}); + resolve({ result: true }); } else { if (progressInfo.status === 1) { publishStatusSocket.close(); @@ -158,7 +175,7 @@ export function useFormMetadata(props: DesignerProps, useFormSchemaComposition: }); } - function deployFrontFile(metadataId, path) { + function deployFrontFile(metadataId, path) { const api = '/api/dev/main/v1.0/frontend-project/runvueform'; const requestHeader = { "content-type": "application/json" @@ -167,8 +184,8 @@ export function useFormMetadata(props: DesignerProps, useFormSchemaComposition: metadataId, path }; - return axios.post(api, sendData, {headers: requestHeader}); - } + return axios.post(api, sendData, { headers: requestHeader }); + } return { queryMetadata, saveFormMetadata, queryFormTemplateRule, publishFormMetadata, deployFrontFile }; } diff --git a/packages/designer/src/components/designer.component.tsx b/packages/designer/src/components/designer.component.tsx index 4d44d2dfbc5..9b8b7ebae90 100644 --- a/packages/designer/src/components/designer.component.tsx +++ b/packages/designer/src/components/designer.component.tsx @@ -69,7 +69,7 @@ export default defineComponent({ onBeforeMount(() => { useFormMetadataComposition.queryMetadata().then((formSchema: FormMetadaDataDom) => { schema.value = formSchema; - useFormMetadataComposition.queryFormTemplateRule(formSchema?.module?.templateId).then(() => { + useFormMetadataComposition.queryFormTemplateRule(formSchema?.module).then(() => { metadataLoaded.value = true; // 加载命令=》虽然是异步,但是此处不需要异步串联 formCommandService.checkCommands(); diff --git a/packages/designer/src/components/types/metadata.ts b/packages/designer/src/components/types/metadata.ts index 84fcb093e38..116e66dbb7b 100644 --- a/packages/designer/src/components/types/metadata.ts +++ b/packages/designer/src/components/types/metadata.ts @@ -75,6 +75,9 @@ export interface FormMetaDataModule { // 表单所属模板 templateId: string; + // 表单模板对应的拖拽控制规则 + templateRule?: string; + // 是否组合表单 isComposedFrm: boolean; @@ -146,7 +149,7 @@ export interface UseFormMetadata { /** 保存表单元数据 */ saveFormMetadata: () => Promise; /** 查询表单模板的拖拽控制规则 */ - queryFormTemplateRule: (templateId: string) => Promise; + queryFormTemplateRule: (module: any) => Promise; /** 发布表单 */ publishFormMetadata: () => Promise<{ result: boolean, error?: string }>; /** 部署表单 */ diff --git a/packages/ui-vue/components/designer-canvas/src/composition/class/control.css b/packages/ui-vue/components/designer-canvas/src/composition/class/control.css index dc6da5aba5e..9044cd61f76 100644 --- a/packages/ui-vue/components/designer-canvas/src/composition/class/control.css +++ b/packages/ui-vue/components/designer-canvas/src/composition/class/control.css @@ -1,489 +1,17 @@ -/*avatar*/ -.f-avatar.f-avatar-circle { - border-radius: 100%; - overflow: hidden; - width: 100px; - height: 100px; - margin: 0 auto; -} - -.f-avatar.f-avatar-circle .f-avatar-image { - display: inline-block; - width: 100%; - height: 100%; -} - -/*image 图像*/ -.ide-image img { - width: inherit; - height: 100px; - max-width: inherit; - max-height: inherit; -} - -/*数值控件*/ -.ide-numeric-box .input-group .btn-group-number { - height: 1.50003rem; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; - background-color: #fff; - border-left: 1px solid #d9d9d9; -} - -.ide-numeric-box .input-group .btn-group-number .btn-number-flag { - height: 50%; - display: -webkit-box; - display: flex; - box-shadow: none; - padding: 0 5px; - margin-left: 1px; - - overflow: hidden; - -webkit-transition: 0.1s linear; - transition: 0.1s linear; -} - -.ide-numeric-box .input-group .btn-group-number .btn-number-flag .number-arrow-chevron { - -webkit-box-flex: 1; - flex: 1; - line-height: 1; -} - -.ide-numeric-box .input-group .btn-group-number .btn-number-flag:hover { - height: 60% !important; -} - -.ide-numeric-box .input-group .btn-group-number .btn-number-flag:nth-child(2) { - border-top: 1px solid #d9d9d9; -} - -.ide-numeric-box input::-webkit-inner-spin-button, -.ide-numeric-box input::-webkit-outer-spin-button { - -webkit-appearance: none !important; - margin: 0; -} - -.ide-numeric-box .input-group .btn-group-number .number-arrow-chevron { - height: unset; -} - -/*富文本*/ -.ide-rich-text-box .f-form-control-textarea { - padding: 0; - border: 0; - max-width: 100%; - width: 100%; - height: auto; -} - -/*数值区间*/ -.ide-number-range .number-range { - position: relative; -} - -.ide-number-range .number-range .input-container { - display: flex; - padding: 0; - align-items: center; -} - -.ide-number-range .number-range .input-container .sub-input-group { - -webkit-box-flex: 1; - flex: 1; - position: relative; - display: -webkit-box; - display: flex; - -webkit-transition: 0.3s ease-out; - transition: 0.3s ease-out; -} - -.ide-number-range .number-range .input-container .sub-input-group .sub-input { - width: 100%; - border: none; - outline: 0; - background-color: rgba(0, 0, 0, 0); - min-width: 2px; - padding: 0.125rem 4px 0.125rem 0.5rem; -} - -.ide-number-range .number-range .input-container .spliter { - width: 15px; - text-align: center; -} - -.f-table-has-form .ide-number-range { - height: 100%; -} - -/** 智能输入框 */ -.f-cmp-inputgroup.ide-input-group .f-state-disabled .input-group-append { - display: flex; -} - -/*external-container 引入外部组件的容器*/ -.ide-external-container, -.ide-cmp-route-container { - min-height: 100px; - background: #fafafa; - height: 100%; - width: 100%; - display: inline-block; -} - -.ide-external-container::before, -.ide-cmp-route-container::before { - content: "\e136"; - width: 2em; - height: 2em; - -webkit-font-smoothing: antialiased; - font-size: 2rem; - font-weight: 400; - line-height: 1; - display: inline-block; - color: #ccc; - position: absolute; - left: 50%; - top: 50%; - margin-left: -1rem; - margin-top: -1rem; -} - -.ide-external-container::before { - content: "\e136"; - font-family: FarrisExtend; -} - -.ide-cmp-route-container::before { - content: "\eb79"; - font-family: FarrisIcons; -} - -.farris-component-ModalContainer .ide-external-container { - min-height: 70px; -} - -/* 复写 侧边栏 父级样式 */ -.farris-component-Sidebar { - position: initial !important; - min-height: auto; - margin-bottom: 0; -} - -.farris-component-Sidebar.farris-nested { - padding: 0 !important; - border: none !important; -} - -.f-sidebar-pos-right.f-sidebar-show .f-sidebar-main, .f-sidebar-pos-left.f-sidebar-show .f-sidebar-main { - transform: None !important; -} - -/*viewChange*/ -.f-viewchange-view-none { - display: none !important; -} - -/*Section */ -.ide-cmp-section .f-section-header .f-section-header--btn-placeholder { - position: absolute; - display: -webkit-inline-box; - display: inline-flex; - top: -30px; - left: 0; - opacity: 0; - overflow: hidden; - z-index: -90; -} - -.ide-cmp-section .f-section-content .toolbar-btn-inline-flex, -.ide-cmp-section .f-section-header .toolbar-btn-inline-flex { - display: -webkit-inline-box; - display: inline-flex; - overflow: hidden; -} - -.ide-cmp-section .f-section-header--toolbar { - -webkit-box-flex: 1; - flex: 1; - -webkit-box-align: center; - align-items: center; - width: 30%; - display: -webkit-box; - display: flex; - -webkit-box-pack: end; - justify-content: flex-end; - margin-left: 0.875rem; -} - -.ide-cmp-section .f-section-content--toolbar { - display: -webkit-box; - display: flex; - -webkit-box-align: center; - align-items: center; - overflow: auto; -} - -.ide-cmp-modal-footer .f-toolbar, -.ide-cmp-header .f-toolbar, -.ide-cmp-section .f-section-header .f-toolbar { - justify-content: normal; -} - -.ide-cmp-section.f-section-accordion.f-state-collapse>.f-section-content { - display: none; -} - -/* 小分组 fieldSet */ -.ide-cmp-fieldSet .f-section-formgroup-inputs.drag-container { - display: flex; - flex-wrap: wrap; -} - -.ide-cmp-fieldSet.f-section-formgroup.f-state-collapse .f-section-formgroup-inputs { - display: none; -} - -/* 若小分组没有间距,拖拽时会有控件位置晃动的情况 */ -.farris-component-Form>.drag-container>.farris-component-FieldSet { - margin-top: 10px; - margin-bottom: 10px; -} - -/** 列表 */ -.ide-dataGrid .header-cell { - height: 2.1875rem; - overflow: hidden; - padding: 0.4375rem 0; - white-space: nowrap; - width: 120px; - flex-shrink: 0; - background-color: #F4F5F9; -} - -.ide-dataGrid .header-cell:hover { - border-right: 2px solid #388FFF; - background: #EDF5FF; -} - -.ide-dataGrid .header-cell .caption { - border-right: 1px solid #E6E9F0 !important; - padding: 0 0.75rem; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; -} - -.farris-component-DataGrid .cardViewPanel .farris-component-Component { - flex-grow: 1 !important; - flex-shrink: 1 !important; - flex-basis: auto !important; -} - -.farris-component-DataGrid .cardViewPanel .farris-component-Component .f-page { - position: absolute !important; -} - -.farris-component-ModalFooter .ide-cmp-modal-footer.showtype-sidebar .fe-modal-footer-base { - display: flex; - align-items: center; - justify-content: flex-end; - flex-shrink: 0; - background: #fff; - padding: 0.875rem 1.5rem; - box-shadow: none; -} - /** 筛选方案 **/ .f-section-scheme { background: #fff; margin: 0.5625rem 0.5rem 0; } -/*Tag*/ -.ide-cmp-tag .k-icon.k-i-close { - font-size: 12px; -} - -.ide-cmp-tag .k-icon.k-i-close:hover { - cursor: pointer; -} - -.ide-cmp-tag .btn { - margin-left: 5px -} - -.ide-cmp-tag .farris-tag-disabled { - cursor: text; -} - -/*穿梭框*/ -.ide-cmp-multi-select { - min-height: 200px; -} - -.f-multi-select-list .search { - position: relative; -} - -.f-multi-select-list .search .form-control { - line-height: 1.875; - height: 1.875; - outline: none; -} - -/* .f-multi-select-list .f-table-norecords-content { - margin: -10.0625rem 0 0 -0.225rem; - } */ - -/*scroll-collapse-area 滚动収折组件,収折实现变动*/ -.ide-cmp-collapsible-area.f-state-expand .fe-collapsible-container { - height: auto; -} - -.ide-cmp-collapsible-area.f-state-collapse .fe-collapsible-container { - height: 0; -} - -.ide-cmp-collapsible-area .fe-collapsible-icon-container { - cursor: pointer; -} - -/* 动态区域相关 */ -.ide-cmp-dynamic-area.f-component-tabs .farris-tabs-title { - align-items: center; -} - -.ide-cmp-dynamic-area.f-component-tabs .addPanel span { - font-size: 18px; - text-align: center; - width: 1.875rem; - height: 1.875rem; - line-height: 1.875rem; - background-color: #fff; - color: #85888e; - border: 1px solid #85888e; -} - -.ide-cmp-dynamic-area .farris-nav-tabs .nav-item .st-drop-close { - opacity: 0; -} - -.ide-cmp-dynamic-area .farris-nav-tabs .nav-item:hover .st-drop-close { - opacity: .6; -} - -.ide-cmp-dynamic-area .ide-external-container.add-dynamic::before { - content: '\e11e'; -} - -/* table表格 */ -.ide-cmp-table.table .widget-panel { - position: absolute; - bottom: 0; - right: 0; - color: #fff; - background: #388FFF !important; - padding: 3px 1px 1px 4px; - z-index: 300; - display: none; -} - -.ide-cmp-table.table td { - position: relative; -} - -.ide-cmp-table.table td.dgComponentSelected .widget-panel { - display: block; -} - -/*查询*/ -.ide-cmp-spreadsheet, .ide-cmp-charts { - display: flex; - align-items: center; - justify-content: center; -} - -.ide-cmp-spreadsheet img { - width: 100%; - height: 100%; - max-width: 178px; - max-height: 132px; -} - -.ide-cmp-charts img { - width: 100%; - height: 100%; - max-width: 780px; - max-height: 271px; -} - -/** toolbar工具栏**/ -.f-toolbar.farris-component-ToolBar { - min-height: 20px; -} - -.toolbar-drag.sortable-toolbar-container .component-btn-group { - display: none !important; -} - -.toolbar-drag .sortable-mirror { - width: 0 !important; -} - -.toolbar-drag .sortable-mirror.sortable-chosen .btn.dropdown-toggle.dropdown-toggle-split { - display: none; -} - -.toolbar-drag .btn-primary.disabled+.dropdown-toggle, .toolbar-drag .btn-secondary.disabled+.dropdown-toggle { - color: #878D99; - background: #EAECF3; - border-color: #DEE1EA; -} - - -.ide-header-toolbar-lg .toolbar-drag .btn:not(.component-settings-button):not(.dropdown-toggle) { - padding: 0.25rem 1.125rem; - font-size: .875rem; - line-height: 1.4286; - border-radius: 3px; -} - -.ide-header-toolbar-lg .toolbar-drag .btn.dropdown-toggle.dropdown-toggle-split { - padding-top: 0.25rem; - padding-bottom: 0.25rem; - font-size: .875rem; -} - -.toolbar-drag .cascadeToolbar .btn:not(.component-settings-button) { - padding-right: 30px; -} - -/** 标签页Tab **/ -.farris-component-Tab .farris-tabs .farris-tabs-header .farris-tabs-title.scroll-tabs .nav-item { - background-color: white; -} - -.farris-component-Tab .farris-tabs .farris-tabs-header .farris-tabs-title.scroll-tabs .nav-item.gu-mirror { - position: fixed !important; -} - -.farris-component-Tab .farris-tabs .farris-tabs-header .farris-tabs-title.scroll-tabs .farris-nav-tabs.gu-unselectable .component-btn-group { - display: none; -} - -.farris-component-Tab .farris-tabs .farris-tabs-header.farris-tabs-inContent.hasToolbar .farris-tabs-toolbar { - width: 100%; -} - -.farris-component-Tab .farris-tabs .farris-tabs-header.farris-tabs-inContent .farris-tabs-toolbar .farris-tabs-inline-flex { - display: flex; -} - -/** 为了方便拖拽,区块上下增加间距 */ -.f-page.f-page-card .f-struct-like-card>.drag-container, .f-component-splitter-pane.f-page-content-main { - padding-top: 10px; - padding-bottom: 10px; +/** 标签页tabs **/ +.farris-component-tabs .farris-tabs-content.f-utils-fill-flex-column .farris-component-tab-page:has(.farris-tab-page-active) { + display: flex !important; + overflow: hidden; + flex-shrink: 1; + flex-grow: 1; + flex-basis: 0; + flex-direction: column !important; } /** 布局容器 ResponseLayout **/ @@ -500,36 +28,3 @@ .response-layout .response-layout-item:not(:last-child) { padding-right: 8px !important; } - -/** 子列表填充布局:若没有这个,struct-wrapper内部放任意容器的时候,无法出现滚动条 **/ -.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child { - overflow: hidden; -} - -/** 子列表填充布局:设计器section的适配样式 **/ -.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child .f-section-in-mainsubcard { - height: 100% -} - -.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child .f-section-in-main { - height: 100% -} - -.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child .f-section.f-section-fill>.f-section-content { - flex-basis: 0%; -} - -/** 子列表填充布局:标签页的滚动条要放到tab-body上,所以整个tab上设置overflow:hidden **/ -.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child .f-section .f-component-tabs .f-tabs-content-fill { - overflow: hidden; -} - -/** 子列表填充布局:标签页下直接放组件节点(附件组件、卡片组件)的场景要设置组件填充,否则组件无法显示 **/ -.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child .f-section .f-component-tabs .f-tabs-content-fill .farris-tabs-body>.farris-component-Component { - flex: 1; -} - -/** 子列表填充布局:目的是为了让标签页tab-body出现滚动条。因为设计时的section强制添加了f-utils-fill 样式,所以要覆盖掉他的overflow:hidden,否则无法出现滚动条 **/ -.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child .f-section .f-component-tabs .f-tabs-content-fill .farris-tabs-body .f-section.ide-cmp-section { - overflow: unset; -} \ No newline at end of file diff --git a/packages/ui-vue/components/page-header/src/designer/page-header.design.component.tsx b/packages/ui-vue/components/page-header/src/designer/page-header.design.component.tsx index 7ba0c8f0ed4..b604433eb7b 100644 --- a/packages/ui-vue/components/page-header/src/designer/page-header.design.component.tsx +++ b/packages/ui-vue/components/page-header/src/designer/page-header.design.component.tsx @@ -41,17 +41,40 @@ export default defineComponent({ } context.expose(componentInstance.value); - + function classConverter(currentClass: object, customClass: string) { + if (currentClass && customClass) { + const customClassArray = customClass.split(' '); + customClassArray.reduce((result: any, className: any) => { + result[className] = true; + return result; + }, currentClass); + } + } + const iconClass = computed(() => { + const classObject = { + 'f-title-icon': true + } as Record; + classConverter(classObject, props.iconClass); + return classObject; + }); + const icon = computed(() => { + const classObject = { + 'f-icon': true + } as Record; + classConverter(classObject, props.icon); + return classObject; + }); return () => { return (
diff --git a/packages/ui-vue/components/response-layout-editor/src/schema/response-layout-editor-setting.schema.json b/packages/ui-vue/components/response-layout-editor/src/schema/response-layout-editor-setting.schema.json index eab853a20cb..6604c769896 100644 --- a/packages/ui-vue/components/response-layout-editor/src/schema/response-layout-editor-setting.schema.json +++ b/packages/ui-vue/components/response-layout-editor/src/schema/response-layout-editor-setting.schema.json @@ -14,23 +14,10 @@ "type": "string", "default": "response-layout-editor-setting" }, - "appearance": { + "initialState": { "description": "", "type": "object", - "properties": { - "class": { - "type": "string" - }, - "style": { - "type": "string" - } - }, "default": {} - }, - "contents": { - "description": "", - "type": "array", - "default": [] } }, "required": [ diff --git a/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar.design.component.tsx b/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar.design.component.tsx index a24d393320a..344d9ee206e 100644 --- a/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar.design.component.tsx +++ b/packages/ui-vue/components/response-toolbar/src/designer/response-toolbar.design.component.tsx @@ -49,7 +49,8 @@ export default defineComponent({ const classObject = { 'f-toolbar': true, 'f-response-toolbar': true, - 'position-relative': true + 'position-relative': true, + 'px-2':true } as Record; return getCustomClass(classObject, props.customClass); }); @@ -356,7 +357,7 @@ export default defineComponent({ data-dragref={`${designItemContext.schema.id}-container`} class={responseToolbarClass.value}>
-
+
{toolbarItems.value // .filter((item) => item.visible) .map((item, index: number) => { diff --git a/packages/ui-vue/components/tabs/src/components/tab-header.component.tsx b/packages/ui-vue/components/tabs/src/components/tab-header.component.tsx index 89c321bb144..d80f56e55cc 100644 --- a/packages/ui-vue/components/tabs/src/components/tab-header.component.tsx +++ b/packages/ui-vue/components/tabs/src/components/tab-header.component.tsx @@ -37,7 +37,7 @@ export default function ( 'nav': true, 'farris-nav-tabs': true, 'flex-nowrap': true, - 'nav-fill': props.fill || props.tabType === 'fill', + 'nav-fill': props.tabType === 'fill', 'nav-pills': props.tabType === 'pills', 'flex-row': props.position === 'top' || props.position === 'bottom', 'flex-column': props.position === 'left' || props.position === 'right' diff --git a/packages/ui-vue/components/tabs/src/designer/tab-header.design.component.tsx b/packages/ui-vue/components/tabs/src/designer/tab-header.design.component.tsx index a6081264118..3c5c3fe9495 100644 --- a/packages/ui-vue/components/tabs/src/designer/tab-header.design.component.tsx +++ b/packages/ui-vue/components/tabs/src/designer/tab-header.design.component.tsx @@ -43,7 +43,7 @@ export default function ( 'nav': true, 'farris-nav-tabs': true, 'flex-nowrap': true, - 'nav-fill': props.fill || props.tabType === 'fill', + 'nav-fill': props.tabType === 'fill', 'nav-pills': props.tabType === 'pills', 'flex-row': props.position === 'top' || props.position === 'bottom', 'flex-column': props.position === 'left' || props.position === 'right' diff --git a/packages/ui-vue/components/tabs/src/designer/tab-page.design.component.tsx b/packages/ui-vue/components/tabs/src/designer/tab-page.design.component.tsx index ea99451cdf1..9272467189c 100644 --- a/packages/ui-vue/components/tabs/src/designer/tab-page.design.component.tsx +++ b/packages/ui-vue/components/tabs/src/designer/tab-page.design.component.tsx @@ -95,7 +95,8 @@ export default defineComponent({ const tabPageClass = computed(() => { const classObject = { 'farris-tab-page': true, - 'drag-container': true + 'drag-container': true, + 'farris-tab-page-active': isActivePage.value } as Record; return classObject; }); diff --git a/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx b/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx index 307de2607f8..ad002eb085f 100644 --- a/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx +++ b/packages/ui-vue/components/tabs/src/designer/tabs.design.component.tsx @@ -119,20 +119,16 @@ export default defineComponent({ }; provide('toolbar-item-handler', updateToolbarItems); // 填充模式 - const shouldShowNavFill = computed(() => { - return props.fill || props.tabType === 'fill'; - }); - // 药片模式 - const shouldShowNavPills = computed(() => { - return props.tabType === 'pills'; + const shouldFillParentContaner = computed(() => { + return props.fill; }); const tabsHeaderClass = computed(() => ({ 'farris-tabs-header': true, 'farris-tabs-inHead': hasInHeadClass.value, 'farris-tabs-inContent': !hasInHeadClass.value, - 'farris-tabs-nav-fill': shouldShowNavFill.value, - 'farris-tabs-nav-pills': shouldShowNavPills.value + 'farris-tabs-nav-fill': props.tabType === 'fill', + 'farris-tabs-nav-pills': props.tabType === 'pills' })); const tabsTitleStyle = computed(() => ({ @@ -222,10 +218,16 @@ export default defineComponent({
); } - + const tabsContentClass = computed(() => { + const classObject = { + 'farris-tabs-content': true, + 'f-utils-fill-flex-column': shouldFillParentContaner.value + } as Record; + return classObject; + }); function renderContent() { return ( -
+
{context.slots.default?.()}
); diff --git a/packages/ui-vue/components/tabs/src/tabs.component.tsx b/packages/ui-vue/components/tabs/src/tabs.component.tsx index 80bb2aa6b99..f79e8a777ba 100644 --- a/packages/ui-vue/components/tabs/src/tabs.component.tsx +++ b/packages/ui-vue/components/tabs/src/tabs.component.tsx @@ -88,21 +88,18 @@ export default defineComponent({ }); // 填充模式 const shouldFillParentContaner = computed(() => { - return props.fill || props.tabType === 'fill'; + return props.fill; }); // 提供者tabs,供增加、修改tab标题用 provide('tabs', { activeId, addTab, updateTab, tabPages, tabType, shouldFillParentContaner }); - // 药片模式 - const shouldShowNavPills = computed(() => { - return props.tabType === 'pills'; - }); + const tabsHeaderClass = computed(() => ({ 'farris-tabs-header': true, 'farris-tabs-inHead': hasInHeadClass.value, 'farris-tabs-inContent': !hasInHeadClass.value, - 'farris-tabs-nav-fill': shouldFillParentContaner.value, - 'farris-tabs-nav-pills': shouldShowNavPills.value + 'farris-tabs-nav-fill': props.tabType === 'fill', + 'farris-tabs-nav-pills': props.tabType === 'pills' })); const tabsTitleStyle = computed(() => ({ diff --git a/packages/ui-vue/components/tabs/src/tabs.props.ts b/packages/ui-vue/components/tabs/src/tabs.props.ts index 63de120237d..4091baeda2e 100644 --- a/packages/ui-vue/components/tabs/src/tabs.props.ts +++ b/packages/ui-vue/components/tabs/src/tabs.props.ts @@ -25,6 +25,7 @@ export type TabPosition = 'left' | 'right' | 'top' | 'bottom'; export type TabHeaderJustifyMode = 'left' | 'center' | 'right'; export const tabsProps = { + /** 标签页头部区域的展示类型 */ tabType: { type: String as PropType, default: 'default' }, autoTitleWidth: { type: Boolean, default: false }, titleLength: { type: Number, default: 7 }, @@ -40,6 +41,7 @@ export const tabsProps = { customClass: { type: String, default: '' }, /** 同上selectedTab属性 */ activeId: { type: String }, + /** 标签页内容区域是否填充 */ fill: { type: Boolean, default: false }, justifyContent: { type: String as PropType, default: 'left' } } as Record; diff --git a/packages/ui-vue/demos/tabs/tab-content-fill.vue b/packages/ui-vue/demos/tabs/tab-content-fill.vue new file mode 100644 index 00000000000..1704e888e20 --- /dev/null +++ b/packages/ui-vue/demos/tabs/tab-content-fill.vue @@ -0,0 +1,25 @@ + diff --git a/packages/ui-vue/demos/tabs/tab-type.vue b/packages/ui-vue/demos/tabs/tab-type.vue index 6b073368ab0..aee1353e75a 100644 --- a/packages/ui-vue/demos/tabs/tab-type.vue +++ b/packages/ui-vue/demos/tabs/tab-type.vue @@ -1,6 +1,6 @@