From 2e6501e276809672d19d4463f6488f96cf144fc4 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Wed, 2 Jul 2025 19:33:56 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E6=8B=96=E6=8B=BD?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E6=97=B6=E6=97=A0=E6=B3=95=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=8C=87=E5=AE=9A=E6=8E=A7=E4=BB=B6=E7=B1=BB=E5=9E=8B=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 --- .../components/form-designer/form-designer.component.tsx | 3 ++- .../composition/control-creator/use-control-creator.ts | 2 +- packages/designer/src/components/designer.component.tsx | 8 ++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) 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 ba93c31696..3062b497cc 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 @@ -7,6 +7,7 @@ import MonacoEditor from '../monaco-editor/monaco-editor.component'; import FEntityTreeView from '../entity-tree-view/components/entity-tree-view.component'; import FCustomClassEditor from './components/custom-class-editor/custom-class-editor.component'; import modulePropertyConfig from '../../types/form-property-config.json'; +import ToolboxItems from '../../types/toolbox/pc-toolbox.json'; export default defineComponent({ name: 'FFormDesigner', @@ -190,7 +191,7 @@ export default defineComponent({ - + diff --git a/packages/designer/src/components/composition/control-creator/use-control-creator.ts b/packages/designer/src/components/composition/control-creator/use-control-creator.ts index 6deb8db86c..d8917058f9 100644 --- a/packages/designer/src/components/composition/control-creator/use-control-creator.ts +++ b/packages/designer/src/components/composition/control-creator/use-control-creator.ts @@ -1,4 +1,4 @@ -import { getSchemaByType } from "@farris/ui-vue/components"; +import { getSchemaByTypeForDesigner as getSchemaByType } from "@farris/ui-vue/components"; import { FormBindingType, EntityObjectField, EntityObjectFieldTypeName, UseControlCreator } from "../../types"; import { PageMetadataConverter } from "../page-metadata-converter"; diff --git a/packages/designer/src/components/designer.component.tsx b/packages/designer/src/components/designer.component.tsx index 60241424a3..f69b7e4162 100644 --- a/packages/designer/src/components/designer.component.tsx +++ b/packages/designer/src/components/designer.component.tsx @@ -3,7 +3,7 @@ import { DesignerProps, designerProps } from "./designer.props"; import { usePageSchema } from "./composition/use-page-schema"; import { usePageMetadata } from "./composition/use-page-metadata"; import { MetadataPathToken, PageMetadataContent } from "./types"; -import { FModalService, ModalOptions, FNotifyService, FLoadingService, FResponseToolbar, FCapsule, CapsuleItem, DesignerHost } from '@farris/ui-vue/components'; +import { FModalService, ModalOptions, FNotifyService, FLoadingService, FResponseToolbar, FCapsule, CapsuleItem, DesignerHost, F_MODAL_SERVICE_TOKEN } from '@farris/ui-vue/components'; import { ConfigOptions } from "./composition/types"; import { useCommand } from "./composition/command.service"; import { useCommandBuilderService } from "./composition/command-builder.service"; @@ -47,7 +47,8 @@ export default defineComponent({ const config = useConfig(); // 初始化 Farris Designer 全局配置对象,并记录初始化异步对象,用于监听初始化完成事件 const configInitialized = config.initialize(); - + const modalService = inject(F_MODAL_SERVICE_TOKEN); + const messagerService = inject('FMessageBoxService'); const designerHostService = {} as DesignerHost; provide('designer-host-service', designerHostService); @@ -89,6 +90,9 @@ export default defineComponent({ // 页面元数据服务 const usePageMetadataComposition = usePageMetadata(props, options, useMetadataComposition, usePageSchemaComposition, useResolveMetadataUrlComposition); designerHostService.usePageMetadataComposition = usePageMetadataComposition; + + designerHostService.modalService = modalService; + designerHostService.messagerService = messagerService; } -- Gitee From c7fa6103efed71a6a5929b2beaa702251a8f628f Mon Sep 17 00:00:00 2001 From: wang-xh Date: Wed, 2 Jul 2025 20:08:06 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E5=8C=BA=E5=88=86=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?pc=E7=9A=84=E6=8E=A7=E4=BB=B6=E5=88=9B=E5=BB=BA=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/designer/public/assets/monaco-editor.config.json | 2 +- .../components/form-designer/form-designer.component.tsx | 3 +-- .../composition/control-creator/use-control-creator.ts | 2 +- .../control-creator/use-pc-control-creator.service.ts | 2 +- packages/designer/src/components/designer.component.tsx | 6 +++--- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/designer/public/assets/monaco-editor.config.json b/packages/designer/public/assets/monaco-editor.config.json index dde5099923..eff7f43f62 100644 --- a/packages/designer/public/assets/monaco-editor.config.json +++ b/packages/designer/public/assets/monaco-editor.config.json @@ -1,3 +1,3 @@ { - "vsPath": "/platform/common/web/monaco/vs" + "vsPath": "/assets/monaco-editor/min/vs" } \ No newline at end of file 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 3062b497cc..ba93c31696 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 @@ -7,7 +7,6 @@ import MonacoEditor from '../monaco-editor/monaco-editor.component'; import FEntityTreeView from '../entity-tree-view/components/entity-tree-view.component'; import FCustomClassEditor from './components/custom-class-editor/custom-class-editor.component'; import modulePropertyConfig from '../../types/form-property-config.json'; -import ToolboxItems from '../../types/toolbox/pc-toolbox.json'; export default defineComponent({ name: 'FFormDesigner', @@ -191,7 +190,7 @@ export default defineComponent({ - + diff --git a/packages/designer/src/components/composition/control-creator/use-control-creator.ts b/packages/designer/src/components/composition/control-creator/use-control-creator.ts index d8917058f9..6deb8db86c 100644 --- a/packages/designer/src/components/composition/control-creator/use-control-creator.ts +++ b/packages/designer/src/components/composition/control-creator/use-control-creator.ts @@ -1,4 +1,4 @@ -import { getSchemaByTypeForDesigner as getSchemaByType } from "@farris/ui-vue/components"; +import { getSchemaByType } from "@farris/ui-vue/components"; import { FormBindingType, EntityObjectField, EntityObjectFieldTypeName, UseControlCreator } from "../../types"; import { PageMetadataConverter } from "../page-metadata-converter"; diff --git a/packages/designer/src/components/composition/control-creator/use-pc-control-creator.service.ts b/packages/designer/src/components/composition/control-creator/use-pc-control-creator.service.ts index 319f6cdc20..24178109ed 100644 --- a/packages/designer/src/components/composition/control-creator/use-pc-control-creator.service.ts +++ b/packages/designer/src/components/composition/control-creator/use-pc-control-creator.service.ts @@ -1,4 +1,4 @@ -import { getSchemaByType } from "@farris/ui-vue/components"; +import { getSchemaByTypeForDesigner as getSchemaByType } from "@farris/ui-vue/components"; import { FormBindingType, EntityObjectField, EntityObjectFieldTypeName, UseControlCreator } from "../../types"; import { PageMetadataConverter } from "../page-metadata-converter"; diff --git a/packages/designer/src/components/designer.component.tsx b/packages/designer/src/components/designer.component.tsx index f69b7e4162..1e664ec4a0 100644 --- a/packages/designer/src/components/designer.component.tsx +++ b/packages/designer/src/components/designer.component.tsx @@ -23,7 +23,7 @@ import FFlowDesigner from '../components/components/flow-designer/flow-designer. import FViewModelDesigner from '../components/components/view-model-designer/view-model-designer.component'; import FPreview from './preview.component'; import './designer.scss'; -import { DesignerMode } from "./types/designer-context"; +import { DesignerMode, UseDesignerContext } from "./types/designer-context"; export default defineComponent({ @@ -51,7 +51,7 @@ export default defineComponent({ const messagerService = inject('FMessageBoxService'); const designerHostService = {} as DesignerHost; provide('designer-host-service', designerHostService); - + const designerContext = inject('designerContext') as UseDesignerContext; // pageSchema服务 const usePageSchemaComposition = usePageSchema(); designerHostService.pageSchema = usePageSchemaComposition; @@ -70,7 +70,7 @@ export default defineComponent({ const useEntitySchemaComposition = useEntitySchema(options, useMetadataComposition, usePageSchemaComposition); designerHostService.entitySchema = useEntitySchemaComposition; // 控件创建服务 - const controlCreatorService = useControlCreator(); + const controlCreatorService = designerContext.useControlCreator(); designerHostService.controlCreator = controlCreatorService; // 操作表单设计时ViewModel的工具类 const useDesignViewModelComposition = useDesignViewModel(usePageSchemaComposition, useEntitySchemaComposition); -- Gitee From cbfb8b31a1451b84c0082e4af8f5cf04b9ba20e8 Mon Sep 17 00:00:00 2001 From: wang-xh Date: Fri, 4 Jul 2025 10:08:02 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3PC=20=E7=AB=AF?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E8=AE=BE=E8=AE=A1=E5=99=A8=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E4=B8=AD=E7=82=B9=E5=87=BB=E8=BE=93=E5=85=A5=E7=B1=BB=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../public/designer-canvas/list-card.json | 1310 +++++++++-------- .../combo-list.property-config.ts | 4 +- .../split-form-component.component.tsx | 4 +- .../designer/form-group.design.component.tsx | 4 +- .../input-group.property-config.ts | 2 +- 5 files changed, 735 insertions(+), 589 deletions(-) diff --git a/packages/designer/public/designer-canvas/list-card.json b/packages/designer/public/designer-canvas/list-card.json index 889ab589c4..90e7a9d7d0 100644 --- a/packages/designer/public/designer-canvas/list-card.json +++ b/packages/designer/public/designer-canvas/list-card.json @@ -1,588 +1,734 @@ { - "id": "root-component", - "type": "component", - "componentType": "frame", - "contents": [ - { - "id": "root-layout", - "type": "content-container", - "appearance": { - "class": "f-page f-page-navigate f-page-is-grid-card" - }, - "contents": [ - { - "id": "page-header", - "type": "page-header", - "appearance": { - "class": "f-page-header" - }, - "icon": "f-icon f-icon-page-title-dictionary", - "title": "项目字典", - "toolbar": { - "type": "response-toolbar", - "buttons": [ - { - "id": "button-add", - "type": "ToolBarItem", - "appearance": { - "class": "btn-primary" - }, - "text": "新增" - }, - { - "id": "button-edit", - "type": "ToolBarItem", - "text": "编辑" - }, - { - "id": "button-save", - "type": "ToolBarItem", - "text": "保存" - }, - { - "id": "button-cancel", - "type": "ToolBarItem", - "text": "取消" - }, - { - "id": "button-delete", - "type": "ToolBarItem", - "text": "删除" - } - ] + "Header" : { + "Code" : "CommonDictionary", + "Type" : "Form", + "NameSpace" : "Inspur.GS.SagiDemo.SagiDemeModule.CommonDictionaries.CommonDictionaries.Front", + "CertId" : null, + "Name" : "通用字典", + "FileName" : "CommonDictionary.frm", + "BizobjectID" : "d8b09de6-5e7c-bfdf-d308-468827ba0d6b", + "Language" : null, + "Extendable" : false, + "NameLanguage" : { + "zh-CHS" : "通用字典", + "en" : "Common Dictionary", + "zh-CHT" : "" + }, + "ID" : "35dd45be-60c7-4ae8-a827-533424031b76", + "IsTranslating" : false + }, + "Refs" : [ { + "DependentMetadata" : { + "ID" : "4fdfc52d-8ac3-4f56-b431-d371c1fcf3ec", + "CertId" : null, + "NameSpace" : "Inspur.GS.SagiDemo.SagiDemeModule.CommonDictionaries.CommonDictionaries.Front", + "Code" : "CommonDictionary.frm", + "Name" : "CommonDictionary.frm", + "Type" : "ResourceMetadata", + "BizobjectID" : "d8b09de6-5e7c-bfdf-d308-468827ba0d6b" + } + } ], + "Content" : { + "code" : null, + "name" : null, + "Contents" : { + "module" : { + "id" : "35dd45be-60c7-4ae8-a827-533424031b76", + "code" : "CommonDictionary", + "name" : "通用字典", + "type" : "Module", + "creator" : "Sagi", + "creationDate" : "2025-02-07T07:43:41.186Z", + "templateId" : "list-card-template", + "templateRule" : "list-card-template", + "entity" : [ { + "eapiId" : "626b3ac9-e713-4cf2-95bd-9d01e401b51e", + "eapiCode" : "CommonDictionary_frm", + "eapiName" : "通用字典_frm", + "eapiNameSpace" : "Inspur.GS.SagiDemo.SagiDemeModule.CommonDictionaries.CommonDictionaries.Front", + "voPath" : "SagiDemo/SagiDemeModule/CommonDictionaries/bo-commondictionaries-front/metadata/components", + "voNameSpace" : "Inspur.GS.SagiDemo.SagiDemeModule.CommonDictionaries.CommonDictionaries.Front", + "name" : "通用字典_frm", + "id" : "52c7e73a-4797-4547-a772-fd50edf39f63", + "entities" : [ { + "label" : "commonDictionarys", + "name" : "通用字典", + "id" : "57a6ad1b-0dc2-4617-b820-a973da18887c", + "type" : { + "$type" : "EntityType", + "fields" : [ { + "$type" : "SimpleField", + "defaultValue" : "", + "editor" : { + "$type" : "TextBox" + }, + "require" : true, + "multiLanguage" : false, + "readonly" : false, + "label" : "id", + "name" : "主键", + "id" : "740c1cff-164d-4f47-96d9-cf7c8075cddb", + "type" : { + "$type" : "StringType", + "displayName" : "字符串", + "length" : 36, + "name" : "String" + }, + "path" : "ID", + "code" : "ID", + "originalId" : "740c1cff-164d-4f47-96d9-cf7c8075cddb", + "bindingField" : "id", + "bindingPath" : "id" + }, { + "$type" : "SimpleField", + "defaultValue" : "", + "editor" : { + "$type" : "DateBox", + "format" : "'yyyy-MM-dd'" + }, + "require" : false, + "multiLanguage" : false, + "readonly" : false, + "label" : "version", + "name" : "版本", + "id" : "43a7c79e-56e0-442e-b39d-8f9f45e8b0c8", + "type" : { + "$type" : "DateTimeType", + "displayName" : "日期时间", + "name" : "DateTime" + }, + "path" : "Version", + "code" : "Version", + "originalId" : "43a7c79e-56e0-442e-b39d-8f9f45e8b0c8", + "bindingField" : "version", + "bindingPath" : "version" + }, { + "$type" : "SimpleField", + "defaultValue" : "", + "editor" : { + "$type" : "TextBox" + }, + "require" : false, + "multiLanguage" : false, + "readonly" : false, + "label" : "code", + "name" : "编号", + "id" : "ddfc72d4-0c9b-49bf-8f41-8047264f6edc", + "type" : { + "$type" : "StringType", + "displayName" : "字符串", + "length" : 36, + "name" : "String" + }, + "path" : "Code", + "code" : "Code", + "originalId" : "ddfc72d4-0c9b-49bf-8f41-8047264f6edc", + "bindingField" : "code", + "bindingPath" : "code" + }, { + "$type" : "SimpleField", + "defaultValue" : "", + "editor" : { + "$type" : "TextBox" + }, + "require" : false, + "multiLanguage" : false, + "readonly" : false, + "label" : "name", + "name" : "名称", + "id" : "1ecd5759-6df4-41c8-9526-0108a5e2d9b6", + "type" : { + "$type" : "StringType", + "displayName" : "字符串", + "length" : 36, + "name" : "String" + }, + "path" : "Name", + "code" : "Name", + "originalId" : "1ecd5759-6df4-41c8-9526-0108a5e2d9b6", + "bindingField" : "name", + "bindingPath" : "name" + }, { + "$type" : "SimpleField", + "defaultValue" : "", + "editor" : { + "$type" : "TextBox" + }, + "require" : false, + "multiLanguage" : false, + "readonly" : false, + "label" : "category", + "name" : "分类", + "id" : "8e00ef40-17ba-4cbb-8a3c-709cf40b7939", + "type" : { + "$type" : "StringType", + "displayName" : "字符串", + "length" : 36, + "name" : "String" + }, + "path" : "Category", + "code" : "Category", + "originalId" : "8e00ef40-17ba-4cbb-8a3c-709cf40b7939", + "bindingField" : "category", + "bindingPath" : "category" + }, { + "$type" : "SimpleField", + "defaultValue" : "", + "editor" : { + "$type" : "EnumField" + }, + "require" : false, + "multiLanguage" : false, + "readonly" : false, + "label" : "enableStatus", + "name" : "启用状态", + "id" : "df3b84c2-dc6b-419c-85e3-0006b0535e61", + "type" : { + "$type" : "EnumType", + "displayName" : "枚举", + "name" : "Enum", + "enumValues" : [ { + "disabled" : false, + "name" : "未启用", + "value" : "0" + }, { + "disabled" : false, + "name" : "已启用", + "value" : "1" + } ], + "valueType" : { + "$type" : "StringType", + "displayName" : "字符串", + "length" : 36, + "name" : "String" } + }, + "path" : "EnableStatus", + "code" : "EnableStatus", + "originalId" : "df3b84c2-dc6b-419c-85e3-0006b0535e61", + "bindingField" : "enableStatus", + "bindingPath" : "enableStatus" + } ], + "entities" : [ ], + "primary" : "id", + "displayName" : "通用字典", + "name" : "CommonDictionary" + }, + "code" : "CommonDictionary" + } ], + "sourceUri" : "api/sagidemo/sagidememodule/v1.0/CommonDictionary_frm", + "code" : "CommonDictionary_frm", + "variables" : [ ], + "sourceType" : "vo", + "extendProperties" : { + "enableStdTimeFormat" : true + } + } ], + "states" : [ ], + "stateMachines" : [ { + "id" : "CommonDictionary_state_machine", + "name" : "通用字典", + "uri" : "cde50e74-98bb-484d-8c21-247c84e615e0", + "code" : "CommonDictionary_frm", + "nameSpace" : "Inspur.GS.SagiDemo.SagiDemeModule.CommonDictionaries.CommonDictionaries.Front" + } ], + "viewmodels" : [ { + "id" : "root-viewmodel", + "code" : "root-viewmodel", + "name" : "通用字典", + "fields" : [ ], + "stateMachine" : "CommonDictionary_state_machine", + "serviceRefs" : [ ], + "commands" : [ ], + "states" : [ ], + "bindTo" : "/", + "enableValidation" : false, + "enableUnifiedSession" : false + }, { + "id" : "data-grid-component-viewmodel", + "code" : "data-grid-component-viewmodel", + "name" : "通用字典", + "fields" : [ { + "type" : "Form", + "id" : "ddfc72d4-0c9b-49bf-8f41-8047264f6edc", + "fieldName" : "code", + "groupId" : null, + "groupName" : null, + "updateOn" : "blur" + }, { + "type" : "Form", + "id" : "1ecd5759-6df4-41c8-9526-0108a5e2d9b6", + "fieldName" : "name", + "groupId" : null, + "groupName" : null, + "updateOn" : "blur" + }, { + "type" : "Form", + "id" : "df3b84c2-dc6b-419c-85e3-0006b0535e61", + "fieldName" : "enableStatus", + "groupId" : null, + "groupName" : null, + "updateOn" : "change" + } ], + "commands" : [ { + "id" : "fda876c8-7230-46e7-af3d-d38233642275", + "code" : "loadList1", + "name" : "加载列表数据", + "params" : [ ], + "handlerName" : "loadList", + "cmpId" : "7c48ef46-339c-42d4-8365-a21236c63044", + "extensions" : [ ], + "isInvalid" : false + }, { + "id" : "22576fc1-08fb-49a9-b132-295c7392b481", + "code" : "remove1", + "name" : "删除当前数据", + "params" : [ { + "name" : "id", + "shownName" : "待删除数据的标识", + "value" : "{DATA~/id}" + } ], + "handlerName" : "remove", + "cmpId" : "7c48ef46-339c-42d4-8365-a21236c63044", + "extensions" : [ ], + "isInvalid" : false + }, { + "id" : "8788c27e-722a-4b98-9d57-98eafb526fe5", + "code" : "loadCard1", + "name" : "加载卡片数据", + "params" : [ ], + "handlerName" : "loadCard", + "cmpId" : "7c48ef46-339c-42d4-8365-a21236c63044", + "extensions" : [ ], + "isInvalid" : false + }, { + "id" : "ef281c13-4480-4256-901e-4bef5f92bd9e", + "code" : "add1", + "name" : "新增一条数据", + "params" : [ ], + "handlerName" : "add", + "cmpId" : "7c48ef46-339c-42d4-8365-a21236c63044", + "extensions" : [ ], + "isInvalid" : false + }, { + "id" : "e7cf83c2-e52d-4dce-aded-047a819c8068", + "code" : "changePage1", + "name" : "切换页码", + "params" : [ { + "name" : "loadCommandName", + "shownName" : "切换页面后回调方法", + "value" : "loadList1" + }, { + "name" : "loadCommandFrameId", + "shownName" : "目标组件", + "value" : "data-grid-component" + } ], + "handlerName" : "changePage", + "cmpId" : "7c48ef46-339c-42d4-8365-a21236c63044", + "extensions" : [ ], + "isInvalid" : false + } ], + "serviceRefs" : [ ], + "states" : [ ], + "bindTo" : "/", + "parent" : "root-viewmodel", + "enableValidation" : false + }, { + "id" : "detail-form-component-viewmodel", + "code" : "detail-form-component-viewmodel", + "name" : "通用字典", + "fields" : [ { + "type" : "Form", + "id" : "ddfc72d4-0c9b-49bf-8f41-8047264f6edc", + "fieldName" : "code", + "groupId" : null, + "groupName" : null, + "updateOn" : "blur" + }, { + "type" : "Form", + "id" : "1ecd5759-6df4-41c8-9526-0108a5e2d9b6", + "fieldName" : "name", + "groupId" : null, + "groupName" : null, + "updateOn" : "blur" + }, { + "type" : "Form", + "id" : "8e00ef40-17ba-4cbb-8a3c-709cf40b7939", + "fieldName" : "category", + "groupId" : null, + "groupName" : null, + "updateOn" : "blur" + } ], + "commands" : [ { + "id" : "d12acc4e-6274-44dc-95e6-cedeb5e66707", + "code" : "edit1", + "name" : "编辑数据", + "params" : [ { + "name" : "id", + "shownName" : "待编辑数据的标识", + "value" : "{DATA~/id}" + }, { + "name" : "transitionAction", + "shownName" : "状态机动作", + "value" : "Edit" + } ], + "handlerName" : "edit", + "cmpId" : "7c48ef46-339c-42d4-8365-a21236c63044", + "extensions" : [ ], + "isInvalid" : false + }, { + "id" : "5707d460-c441-45c4-8fe1-f77abd9f75b1", + "code" : "save1", + "name" : "保存变更", + "params" : [ ], + "handlerName" : "save", + "cmpId" : "7c48ef46-339c-42d4-8365-a21236c63044", + "extensions" : [ ], + "isInvalid" : false + }, { + "id" : "b3897b4b-a37f-48e3-afb3-8489cec02806", + "code" : "cancel1", + "name" : "取消变更", + "params" : [ ], + "handlerName" : "cancel", + "cmpId" : "7c48ef46-339c-42d4-8365-a21236c63044", + "extensions" : [ ], + "isInvalid" : false + } ], + "serviceRefs" : [ ], + "states" : [ ], + "bindTo" : "/", + "parent" : "root-viewmodel", + "enableValidation" : true + } ], + "components" : [ { + "id" : "root-component", + "type" : "component", + "componentType" : "frame", + "viewModel" : "root-viewmodel", + "contents" : [ { + "id" : "root-layout", + "type" : "content-container", + "appearance" : { + "class" : "f-page f-page-navigate f-page-is-grid-card" + }, + "contents" : [ { + "id" : "page-header", + "type" : "page-header", + "appearance" : { + "class" : "f-page-header" }, - { - "id": "main-container", - "type": "content-container", - "appearance": { - "class": "f-page-main" + "iconClass" : "f-title-icon f-text-orna-dict", + "icon" : "f-icon f-icon-page-title-dictionary", + "title" : "通用字典", + "toolbar" : { + "type" : "response-toolbar", + "buttons" : [ { + "id" : "button-add", + "type" : "response-toolbar-item", + "appearance" : { + "class" : "btn-primary" }, - "contents": [ - { - "id": "content-splitter", - "type": "splitter", - "appearance": { - "class": "f-page-content" - }, - "contents": [ - { - "id": "content-list", - "type": "splitter-pane", - "appearance": { - "class": "f-col-w6 f-page-content-nav" - }, - "contents": [ - { - "id": "data-grid-component", - "type": "component", - "componentType": "data-grid", - "appearance": { - "class": "f-struct-wrapper f-utils-fill-flex-column" - }, - "contents": [ - { - "id": "data-grid-section", - "type": "section", - "appearance": { - "class": "f-section-grid f-section-in-nav" - }, - "showHeader": false, - "contents": [ - { - "id": "dataGrid", - "type": "data-grid", - "appearance": { - "class": "f-component-grid" - }, - "columns": [ - { - "id": "code_6d5f8d5b_1fvq", - "type": "GridField", - "title": "项目编号", - "field": "code", - "dataType": "string", - "binding": { - "type": "Form", - "path": "code", - "field": "6d5f8d5b-c68a-47fa-9f3b-f3805489cfae" - }, - "resizable": true - }, - { - "id": "name_2efe6193_lljv", - "type": "GridField", - "title": "项目名称", - "field": "name", - "dataType": "string", - "binding": { - "type": "Form", - "path": "name", - "field": "2efe6193-278c-4b5f-9f31-cdd8ee48751a" - }, - "resizable": true - }, - { - "id": "projectStatus_7d2dd238_3d6l", - "type": "GridField", - "title": "项目状态", - "binding": { - "type": "Form", - "path": "projectStatus", - "field": "7d2dd238-42a7-4643-a849-cdac3b4fe13f", - "fullPath": "ProjectStatus" - }, - "field": "projectStatus", - "dataType": "enum", - "data": [ - { - "name": "进行中", - "value": "1" - }, - { - "name": "已结项", - "value": "2" - } - ], - "resizable": true - } - ] - } - ] - } - ] - } - ], - "position": "left" - }, - { - "id": "content-main", - "type": "splitter-pane", - "appearance": { - "class": "f-page-content-main" - }, - "contents": [ - { - "id": "detail-form-component", - "type": "component", - "componentType": "form-col-1", - "appearance": { - "class": "f-struct-wrapper" - }, - "contents": [ - { - "id": "detail-form-section", - "type": "section", - "appearance": { - "class": "f-section-form f-section-in-main" - }, - "mainTitle": "基本信息", - "enableMaximize": true, - "enableAccordion": "default", - "contents": [ - { - "id": "detail-form-layout", - "type": "content-container", - "appearance": { - "class": "f-form-layout farris-form farris-form-controls-inline" - }, - "contents": [ - { - "id": "code_6d5f8d5b_9fr4", - "type": "form-group", - "label": "项目编号", - "appearance": { - "class": "col-12" - }, - "editor": { - "type": "input-group" - } - }, - { - "id": "name_2efe6193_39dg", - "type": "form-group", - "label": "项目名称", - "appearance": { - "class": "col-12" - }, - "editor": { - "type": "input-group" - } - }, - { - "id": "projectType_ddd6903b_6eoa", - "type": "form-group", - "label": "项目类别", - "appearance": { - "class": "col-12" - }, - "editor": { - "type": "combo-list", - "data": [ - { - "name": "产品类", - "value": "Product" - }, - { - "name": "服务类", - "value": "Service" - }, - { - "name": "其他类", - "value": "Other" - } - ] - } - }, - { - "id": "projectStatus_7d2dd238_bbnz", - "type": "form-group", - "label": "项目状态", - "appearance": { - "class": "col-12" - }, - "editor": { - "type": "combo-list", - "data": [ - { - "name": "进行中", - "value": "1" - }, - { - "name": "已结项", - "value": "2" - } - ] - } - }, - { - "id": "department_Department_name_bfbd5da4_8fuc", - "type": "form-group", - "label": "所属部门", - "appearance": { - "class": "col-12" - }, - "editor": { - "type": "lookup", - "mappingFields": {"code": "department_code"} - } - } - ] - } - ] - } - ] - }, - { - "id": "advanced-form-component", - "type": "component", - "componentType": "form-col-1", - "appearance": { - "class": "f-struct-wrapper" - }, - "contents": [ - { - "id": "advanced-form-section", - "type": "section", - "appearance": { - "class": "f-section-form f-section-in-main" - }, - "mainTitle": "高级信息", - "contents": [ - { - "id": "advanced-form-layout", - "type": "content-container", - "appearance": { - "class": "f-form-layout farris-form farris-form-controls-inline" - }, - "contents": [ - { - "id": "total_29cf60dd_mmq3", - "type": "form-group", - "label": "项目金额", - "appearance": { - "class": "col-12" - }, - "editor": { - "type": "number-spinner" - } - }, - { - "id": "description_847d76a3_gzfo", - "type": "form-group", - "label": "项目备注", - "appearance": { - "class": "col-12" - }, - "editor": { - "type": "text" - } - } - ] - } - ] - } - ] - }, - { - "id": "detail-container", - "type": "content-container", - "appearance": { - "class": "f-struct-wrapper" - }, - "size": null, - "contents": [ - { - "id": "detail-section", - "type": "section", - "appearance": { - "class": "f-section-tabs f-section-in-mainsubcard" - }, - "contents": [ - { - "id": "detail-tab", - "type": "tabs", - "controlSource": "Farris", - "appearance": { - "class": "f-component-tabs f-tabs-has-grid" - }, - "contents": [ - { - "id": "bxddemodetail-tab-page", - "type": "tab-page", - "title": "报销明细", - "appearance": null, - "contents": [ - { - "id": "bxddemodetail-component", - "type": "component", - "appearance": { - "class": "f-struct-is-subgrid" - }, - "contents": [ - { - "id": "bxddemodetail-component-layout", - "type": "content-container", - "appearance": { - "class": "f-grid-is-sub f-utils-flex-column" - }, - "contents": [ - { - "id": "dataGrid_bxddemodetail", - "type": "data-grid", - "dataSource": "bxdDemoDetails", - "columns": [ - { - "id": "detailDate_f72e0c49_t5rz", - "type": "GridField", - "title": "费用日期", - "field": "detailDate", - "dataType": "datetime", - "editor": { - "id": "detailDate_f72e0c49_7fjv", - "type": "date-picker", - "title": "日期选择" - } - }, - { - "id": "amount_d99e60e7_lkns", - "type": "GridField", - "title": "报销金额", - "field": "amount", - "dataType": "number", - "editor": { - "id": "amount_d99e60e7_mcnp", - "type": "number-spinner", - "title": "数值框" - } - }, - { - "id": "description_10492a0d_ldc1", - "type": "GridField", - "title": "费用说明", - "field": "description", - "dataType": "string", - "editor": { - "id": "description_10492a0d_rj53", - "type": "input-group", - "title": "多行文本框" - } - }, - { - "id": "invoiceNumber_4b707cce_m1tt", - "type": "GridField", - "title": "发票号码", - "field": "invoiceNumber", - "dataType": "string", - "editor": { - "id": "invoiceNumber_4b707cce_qrci", - "type": "input-group", - "title": "文本" - } - } - ], - "appearance": { - "class": "f-component-grid f-utils-fill" - } - } - ] - } - ], - "componentType": "dataGrid" - } - ], - "toolbar": { - "id": "bxddemodetail-tab-toolbar", - "type": "TabToolbar", - "position": "inHead", - "contents": [ - { - "id": "bxddemodetailAddButton", - "type": "TabToolbarItem", - "text": "新增", - "appearance": { - "class": "btn btn-secondary f-btn-ml" - } - }, - { - "id": "bxddemodetailRemoveButton", - "type": "TabToolbarItem", - "text": "删除", - "appearance": { - "class": "btn btn-secondary f-btn-ml" - } - } - ] - } - }, - { - "id": "bxddemoattachment-tab-page", - "type": "tab-page", - "title": "附件", - "appearance": null, - "contents": [ - { - "id": "bxddemoattachment-component", - "type": "component", - "appearance": { - "class": "f-struct-is-subgrid" - }, - "contents": [ - { - "id": "bxddemoattachment-component-layout", - "type": "content-container", - "appearance": { - "class": "f-grid-is-sub f-utils-flex-column" - }, - "contents": [ - { - "id": "dataGrid_bxddemoattachment", - "type": "data-grid", - "dataSource": "bxddemoattachments", - "columns": [ - { - "id": "description_10492a0d_ldc1", - "type": "GridField", - "title": "文件名", - "field": "description", - "dataType": "string", - "editor": { - "id": "description_10492a0d_rj53", - "type": "input-group", - "title": "多行文本框" - } - }, - { - "id": "amount_d99e60e7_lkns", - "type": "GridField", - "title": "文件大小", - "field": "amount", - "dataType": "number", - "editor": { - "id": "amount_d99e60e7_mcnp", - "type": "number-spinner", - "title": "数值框" - } - }, - { - "id": "invoiceNumber_4b707cce_m1tt", - "type": "GridField", - "title": "上传人", - "field": "invoiceNumber", - "dataType": "string", - "editor": { - "id": "invoiceNumber_4b707cce_qrci", - "type": "input-group", - "title": "文本" - } - }, - { - "id": "detailDate_f72e0c49_t5rz", - "type": "GridField", - "title": "上传日期", - "field": "detailDate", - "dataType": "datetime", - "editor": { - "id": "detailDate_f72e0c49_7fjv", - "type": "date-picker", - "title": "日期选择" - } - } - ], - "appearance": { - "class": "f-component-grid f-utils-fill" - } - } - ] - } - ], - "componentType": "dataGrid" - } - ], - "toolbar": { - "id": "bxddemoattachment-tab-toolbar", - "type": "TabToolbar", - "position": "inHead", - "contents": [ - { - "id": "bxddemoattachmentAddButton", - "type": "TabToolbarItem", - "text": "上传", - "appearance": { - "class": "btn btn-secondary f-btn-ml" - } - }, - { - "id": "bxddemoattachmentRemoveButton", - "type": "TabToolbarItem", - "text": "删除", - "appearance": { - "class": "btn btn-secondary f-btn-ml" - } - } - ] - } - } - ] - } - ], - "toolbar": { - "id": "detail-section-toolbar", - "type": "SectionToolbar", - "position": "inHead", - "contents": [] - } - } - ] - } - ], - "position": "main" - } - ] - } - ] + "disabled" : "!viewModel.stateMachine['canAdd']", + "onClick" : "root-viewmodel.data-grid-component-viewmodel.add1", + "text" : "新增" + }, { + "id" : "button-edit", + "type" : "response-toolbar-item", + "text" : "编辑", + "disabled" : "!viewModel.stateMachine['canEdit']", + "onClick" : "root-viewmodel.detail-form-component-viewmodel.edit1" + }, { + "id" : "button-save", + "type" : "response-toolbar-item", + "text" : "保存", + "disabled" : "!viewModel.stateMachine['canSave']", + "onClick" : "root-viewmodel.detail-form-component-viewmodel.save1" + }, { + "id" : "button-cancel", + "type" : "response-toolbar-item", + "text" : "取消", + "disabled" : "!viewModel.stateMachine['canCancel']", + "onClick" : "root-viewmodel.detail-form-component-viewmodel.cancel1" + }, { + "id" : "button-delete", + "type" : "response-toolbar-item", + "text" : "删除", + "disabled" : "!viewModel.stateMachine['canRemove']", + "onClick" : "root-viewmodel.data-grid-component-viewmodel.remove1" + } ] } - ] + }, { + "id" : "main-container", + "type" : "content-container", + "appearance" : { + "class" : "f-page-main" + }, + "contents" : [ { + "id" : "content-splitter", + "type" : "splitter", + "appearance" : { + "class" : "f-page-content" + }, + "contents" : [ { + "id" : "content-list", + "type" : "splitter-pane", + "appearance" : { + "class" : "f-col-w6 f-page-content-nav" + }, + "resizable" : true, + "contents" : [ { + "id" : "data-grid-component-ref", + "type" : "component-ref", + "component" : "data-grid-component" + } ] + }, { + "id" : "content-main", + "type" : "splitter-pane", + "appearance" : { + "class" : "f-page-content-main" + }, + "contents" : [ { + "id" : "detail-component-ref", + "type" : "component-ref", + "component" : "detail-form-component" + } ] + } ] + } ] + } ] + } ] + }, { + "id" : "data-grid-component", + "type" : "component", + "componentType" : "data-grid", + "viewModel" : "data-grid-component-viewmodel", + "appearance" : { + "class" : "f-struct-wrapper f-utils-fill-flex-column" + }, + "onInit" : "loadList1", + "contents" : [ { + "id" : "data-grid-section", + "type" : "section", + "appearance" : { + "class" : "f-section-grid f-section-in-nav" + }, + "fill" : true, + "showHeader" : false, + "contents" : [ { + "id" : "dataGrid", + "type" : "data-grid", + "appearance" : { + "class" : "f-component-grid" + }, + "dataSource" : "commonDictionarys", + "columns" : [ { + "id" : "code_ddfc72d4_hxcr", + "type" : "data-grid-column", + "title" : "编号", + "field" : "code", + "dataType" : "string", + "binding" : { + "type" : "Form", + "path" : "code", + "field" : "ddfc72d4-0c9b-49bf-8f41-8047264f6edc", + "fullPath" : "Code" + }, + "width" : 120, + "visible" : true, + "filter" : "", + "showSetting" : false, + "actualWidth" : 120 + }, { + "id" : "name_1ecd5759_yj0s", + "type" : "data-grid-column", + "title" : "名称", + "field" : "name", + "dataType" : "string", + "binding" : { + "type" : "Form", + "path" : "name", + "field" : "1ecd5759-6df4-41c8-9526-0108a5e2d9b6", + "fullPath" : "Name" + }, + "width" : 120, + "visible" : true, + "filter" : "", + "showSetting" : false, + "actualWidth" : 120 + }, { + "id" : "enableStatus_df3b84c2_jhvi", + "type" : "data-grid-column", + "title" : "启用状态", + "field" : "enableStatus", + "dataType" : "enum", + "binding" : { + "type" : "Form", + "path" : "enableStatus", + "field" : "df3b84c2-dc6b-419c-85e3-0006b0535e61", + "fullPath" : "EnableStatus" + }, + "width" : 120, + "formatter" : { + "type" : "enum", + "data" : [ { + "disabled" : false, + "name" : "未启用", + "value" : "0" + }, { + "disabled" : false, + "name" : "已启用", + "value" : "1" + } ] + }, + "visible" : true, + "filter" : "", + "showSetting" : true, + "actualWidth" : 120 + } ], + "fieldEditable" : false, + "onClickRow" : "loadCard1", + "onPageIndexChanged" : "changePage1", + "onPageSizeChanged" : "changePage1", + "pagination" : { + "enable" : true, + "mode" : "server" + }, + "disabled" : "viewModel.stateMachine['editable']" + } ] + } ] + }, { + "id" : "detail-form-component", + "type" : "component", + "componentType" : "form", + "formColumns" : 1, + "viewModel" : "detail-form-component-viewmodel", + "appearance" : { + "class" : "f-struct-wrapper" + }, + "contents" : [ { + "id" : "detail-form-section", + "type" : "section", + "appearance" : { + "class" : "f-section-form f-section-in-main" + }, + "mainTitle" : "基本信息", + "contents" : [ { + "id" : "detail-form-layout", + "type" : "response-form", + "appearance" : { + "class" : "f-form-layout farris-form farris-form-controls-inline" + }, + "contents" : [ { + "id" : "code_ddfc72d4_njzh", + "type" : "form-group", + "appearance" : { + "class" : "col-12" + }, + "label" : "编号", + "binding" : { + "type" : "Form", + "path" : "code", + "field" : "ddfc72d4-0c9b-49bf-8f41-8047264f6edc", + "fullPath" : "Code" + }, + "editor" : { + "type" : "input-group", + "readonly" : "!viewModel.stateMachine['editable']", + "maxLength" : 36 + }, + "path" : "code" + }, { + "id" : "name_1ecd5759_onbj", + "type" : "form-group", + "appearance" : { + "class" : "col-12" + }, + "label" : "名称", + "binding" : { + "type" : "Form", + "path" : "name", + "field" : "1ecd5759-6df4-41c8-9526-0108a5e2d9b6", + "fullPath" : "Name" + }, + "editor" : { + "type" : "input-group", + "readonly" : "!viewModel.stateMachine['editable']", + "maxLength" : 36 + }, + "path" : "name" + }, { + "id" : "category_8e00ef40_wdtg", + "type" : "form-group", + "appearance" : { + "class" : "col-12" + }, + "label" : "分类", + "binding" : { + "type" : "Form", + "path" : "category", + "field" : "8e00ef40-17ba-4cbb-8a3c-709cf40b7939", + "fullPath" : "Category" + }, + "editor" : { + "type" : "input-group", + "readonly" : "!viewModel.stateMachine['editable']", + "maxLength" : 36 + }, + "path" : "category" + } ], + "controlsInline" : true, + "formAutoIntl" : true + } ] + } ] + } ], + "webcmds" : [ { + "id" : "7c48ef46-339c-42d4-8365-a21236c63044", + "path" : "/projects/packages/Inspur.GS.Gsp.Web.WebCmp/webcmd", + "name" : "ListCardController.webcmd", + "refedHandlers" : [ { + "host" : "fda876c8-7230-46e7-af3d-d38233642275", + "handler" : "loadList" + }, { + "host" : "8788c27e-722a-4b98-9d57-98eafb526fe5", + "handler" : "loadCard" + }, { + "host" : "ef281c13-4480-4256-901e-4bef5f92bd9e", + "handler" : "add" + }, { + "host" : "d12acc4e-6274-44dc-95e6-cedeb5e66707", + "handler" : "edit" + }, { + "host" : "5707d460-c441-45c4-8fe1-f77abd9f75b1", + "handler" : "save" + }, { + "host" : "b3897b4b-a37f-48e3-afb3-8489cec02806", + "handler" : "cancel" + }, { + "host" : "22576fc1-08fb-49a9-b132-295c7392b481", + "handler" : "remove" + }, { + "host" : "e7cf83c2-e52d-4dce-aded-047a819c8068", + "handler" : "changePage" + } ], + "code" : "ListCardController", + "nameSpace" : "Inspur.GS.Gsp.Web.WebCmp" + } ], + "projectName" : "bo-commondictionaries-front", + "actions" : [ ] } - ] -} \ No newline at end of file + }, + "Id" : "35dd45be-60c7-4ae8-a827-533424031b76", + "CreationDate" : null + }, + "extendRule" : null, + "relativePath" : "SagiDemo/SagiDemeModule/CommonDictionaries/bo-commondictionaries-front/metadata/components", + "extendProperty" : "", + "extended" : false, + "previousVersion" : null, + "version" : null, + "properties" : { + "SchemaVersion" : null, + "CacheVersion" : null, + "Framework" : "Vue" + } + } \ No newline at end of file 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 ce5195c648..5ce4c189f0 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 @@ -11,7 +11,7 @@ export class ComboListProperty extends InputBaseProperty { const self = this; let fieldType = ''; if (propertyData?.binding?.type === 'Form') { - const fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, this.viewModelId); + const fieldInfo = this.entitySchema.getFieldByIDAndVMID(propertyData.binding.field, this.viewModelId); if (fieldInfo?.schemaField?.type) { fieldType = fieldInfo.schemaField.type.$type; } @@ -149,7 +149,7 @@ export class ComboListProperty extends InputBaseProperty { const self = this; let fieldType = ''; if (propertyData?.binding?.type === 'Form') { - const fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, this.viewModelId); + const fieldInfo = this.entitySchema.getFieldByIDAndVMID(propertyData.binding.field, this.viewModelId); if (fieldInfo?.schemaField?.type) { fieldType = fieldInfo.schemaField.type.$type; } diff --git a/packages/ui-vue/components/component/src/components/split-form-component.component.tsx b/packages/ui-vue/components/component/src/components/split-form-component.component.tsx index dc35c53c86..15c1f881d7 100644 --- a/packages/ui-vue/components/component/src/components/split-form-component.component.tsx +++ b/packages/ui-vue/components/component/src/components/split-form-component.component.tsx @@ -13,7 +13,7 @@ export default defineComponent({ const treeGridRef = ref(); const dataSource = ref(props.data); const columns = ref([{ field: 'name', title: '名称' }, { field: 'bindingPath', title: '绑定字段' }]); - const { schemaService, formSchemaUtils } = props.designerHostService; + const { entitySchema, formSchemaUtils } = props.designerHostService; const notifyService: any = new FNotifyService(); notifyService.globalConfig = { position: 'top-center' }; @@ -34,7 +34,7 @@ export default defineComponent({ onBeforeMount(() => { const viewModelId = formSchemaUtils.getViewModelIdByComponentId(props.componentId); - const { name: tableName } = schemaService.getTableInfoByViewModelId(viewModelId); + const { name: tableName } = entitySchema.getTableInfoByViewModelId(viewModelId); componentTitle.value = tableName; const fieldTreeBuilder = new FieldTreeBuilder(props.designerHostService, props.componentId); 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 80842dd19f..2c1d2322cc 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 @@ -1,9 +1,9 @@ - import { defineComponent, inject, onMounted, ref } from 'vue'; +import { defineComponent, inject, onMounted, ref } from 'vue'; 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 FDynamicFormGroupDesign from '../component/dynamic-form-group/dynamic-form-group.design.component'; -import { propertyConfigSchemaMap } from '../../../../components/dynamic-resolver/src/property-config-resolver'; +import { propertyConfigSchemaMapForDesigner } from '../../../../components/dynamic-resolver'; import { DesignerHost } from '../../../../components/designer-canvas/src/composition/types'; import { useDesignerRulesForFormGroup } from './form-group-use-designer-rules'; diff --git a/packages/ui-vue/components/input-group/src/property-config/input-group.property-config.ts b/packages/ui-vue/components/input-group/src/property-config/input-group.property-config.ts index aaae75c291..63184bf6b5 100644 --- a/packages/ui-vue/components/input-group/src/property-config/input-group.property-config.ts +++ b/packages/ui-vue/components/input-group/src/property-config/input-group.property-config.ts @@ -18,7 +18,7 @@ export class InputGroupProperty extends InputBaseProperty { // 获取绑定字段schema中的长度属性 let maxLength; if (propertyData?.binding?.type === 'Form') { - const fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, this.viewModelId); + const fieldInfo = this.entitySchema.getFieldByIDAndVMID(propertyData.binding.field, this.viewModelId); if (fieldInfo?.schemaField?.type) { maxLength = fieldInfo.schemaField.type.length; } -- Gitee