diff --git a/.gitignore b/.gitignore index f54aa569db389d38280ce3f83e5b4ea84f371309..8ff63ce66342fea52c1b56d249448252f222a72a 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,4 @@ node_modules/ meta/apps/* !meta/apps/caseapp/ !meta/apps/testapp/ +!meta/apps/attendance/ diff --git a/.qoder/rules/Drag_and_Drop_Animation.md b/.qoder/rules/Drag_and_Drop_Animation.md new file mode 100644 index 0000000000000000000000000000000000000000..7a29407239cb5624a1f319cf385d83376fb8b018 --- /dev/null +++ b/.qoder/rules/Drag_and_Drop_Animation.md @@ -0,0 +1,12 @@ +--- +trigger: manual +alwaysApply: false +description: 组件拖拽移动动画交互逻辑 +--- +H.LowCode.DesignEngine 项目中的 DesignPage.razor 是页面设计器,内部包含 ComponentPanel 用于放置可拖拽组件 DraggableItem,通过拖拽 DraggableItem 组件进行拖拽排序,目前基本功能已实现,但拖拽组件时,组件位移没有动画,需优化操作体验。 + +组件拖拽移动动画交互逻辑如下: +DraggableItem 组件拖拽过程中,当拖拽后的顺序大于原始顺序,说明组件向后拖拽,反之向前拖拽。 +向后拖拽时,被拖拽到上方的组件及两个组件中间的所有组件都向前移动;反之都向后移动。 +向前移动时,如果组件在当前行的第一个,则移动到上一行的末尾;向后移动时,如果组件在当前行的最后一个,则移动到下一行的第一个。 +被拖拽组件不跟随鼠标移动,设置半透明拖拽图像,拖拽到同一个组件上方内移动时,目标组件不要频繁移动,避免闪烁;连续拖拽到多个组件上方时需连续让位移动。 \ No newline at end of file diff --git a/.qoder/rules/Project.md b/.qoder/rules/Project.md new file mode 100644 index 0000000000000000000000000000000000000000..c8832f70a158e2506fe251a101bf325f07725fff --- /dev/null +++ b/.qoder/rules/Project.md @@ -0,0 +1,87 @@ +--- +trigger: model_decision +description: 本项目为可视化低代码平台, 旨在通过元数据驱动的方式实现应用的快速构建与渲染。其核心设计目标是将应用的结构、行为和样式抽象为可配置的元数据, 从而实现无需编写代码即可完成应用开发。 +--- +### 项目概述 +本项目为可视化低代码平台, 旨在通过元数据驱动的方式实现应用的快速构建与渲染。其核心设计目标是将应用的结构、行为和样式抽象为可配置的元数据, 从而实现无需编写代码即可完成应用开发。 + +项目基于 .NET 10、Abp 和 Blazor, 采用模块化分层架构, 前端采用 Blazor Auto 模式, 后端采用 .NET 9.0 Web API 技术。 + +#### 设计引擎和渲染引擎 +设计引擎(DesignEngine)和渲染引擎(RenderEngine)是系统的两大核心模块, 二者通过共享的 Common 模块进行协作。 + +设计引擎: 提供可视化编辑界面, 允许用户拖拽组件、配置属性、设置数据源和事件。其输出为结构化的元数据文件(JSON), 存储于 meta 目录。 +渲染引擎: 读取 meta 目录中的元数据, 在运行时动态生成 Blazor 组件树, 实现应用的展示与交互。 +两者通过 Common 模块中的元数据 Schema 保持契约一致, 确保设计时与运行时的行为统一。 + +#### 核心概念 +* 元数据 +在低代码平台中, 元数据是驱动系统配置、设计与渲染的核心。它通过结构化的JSON文件进行序列化存储, 并在设计引擎与渲染引擎之间传递, 实现“一次设计, 多端运行”的能力。本文深入分析元数据的设计原理、继承体系、存储结构、合并机制与生命周期管理, 揭示其作为系统配置中枢的关键作用。 + +* 应用 +在低代码平台中, “应用”(App)是最顶层的容器, 代表一个完整的、可独立运行和部署的业务系统。它不仅定义了系统的名称、标识、图标、描述等基本信息, 还通过元数据配置决定了其支持的平台类型和当前的发布状态。每个应用都拥有唯一的标识(Id), 并作为组织和管理其内部页面、菜单、数据源等资源的逻辑边界。 + +应用的生命周期由设计引擎(DesignEngine)管理, 其运行时表现则由渲染引擎(RenderEngine)负责。设计引擎允许开发者通过可视化界面进行应用的构建和修改, 而渲染引擎则将这些元数据转换为最终用户可交互的前端界面。 + +应用的元数据结构基于 AppSchemaBase 抽象类定义, 该类继承自 MetaSchemaBase, 并包含了一系列核心属性。 + +* 页面 +低代码平台中“页面”作为用户界面基本单元的建模方式。基于 PageSchemaBase 和 PagePropertySchema 等核心类, 详细解释页面的类型、布局配置、事件处理机制、组件树结构以及状态管理, 阐述页面在设计引擎中的拖拽构建过程和在渲染引擎中的动态加载与渲染流程。 + +* 组件 +“组件”是低代码平台中可复用的UI元素, 其设计遵循模块化、可配置和可扩展的原则。组件在设计时通过元数据定义其结构、属性、样式和事件, 在运行时根据配置动态渲染。系统通过分层架构将设计时与运行时逻辑分离, 确保灵活性与性能。 + +组件的核心实现基于 ComponentSchemaBase 类, 并通过设计时专用的 ComponentPartsSchema 扩展支持拖拽、选中状态等交互功能。属性、样式和事件均采用独立的模式进行管理, 便于动态配置与持久化。 + +* 数据源 +数据源(DataSource)是低代码平台中实现数据连接与抽象的核心模块。它为前端组件提供统一的数据访问接口, 支持多种数据来源, 包括数据库、API接口和静态选项。 + +* 菜单 +菜单功能的核心数据结构由 MenuSchema 类定义, 该类继承自 MetaSchemaBase, 用于描述菜单项的组织方式和行为特性。 + +### 元数据 +元数据的定义包含在项目 H.LowCode.MetaSchema (基础元数据据结构定义)、H.LowCode.MetaSchema.DesignEngine (基于 H.LowCode.MetaSchema, 扩展出设计引擎特有属性)、H.LowCode.Schema.RenderEngine (基于 H.LowCode.MetaSchema, 包含渲染引擎特有属性)。 +设计引擎通过可视化界面设计并使用 H.LowCode.MetaSchema.DesignEngine 项目中的元数据定义序列化生成 json 文件, 然后右渲染引擎将 json 反序列化为 H.LowCode.MetaSchema.RenderEngine 中的元数据定义, 再绑定到页面中渲染出页面。 + +#### 主要的元数据定义 +* AppSchemaBase: 应用的元数据定义, 包含应用的名称、标识、图标、描述等基本信息。 +* PageSchemaBase: 页面的元数据定义, 包含页面的类型、布局配置、事件处理机制、组件树结构以及状态管理。 +* * PagePartsSchema: 设计时页面的元数据定义 +* * PageSchema: 运行时页面的元数据定义 +* ComponentSchemaBase: 组件的元数据定义, 包含组件的结构、属性、样式和事件。 +* * ComponentPartsSchema: 设计时组件定义 +* * ComponentSchema: 运行时组件定义 +* MenuSchema: 菜单的元数据定义, 包含菜单项的组织方式和行为特性。 + +### 设计引擎 +#### 启动项目 +设计引擎启动项目 H.LowCode.DesignEngine.Host + +#### 物料 +物料的管理对应 H.LowCode.PartsDesignEngine 项目, 物料主要包含组件、主题等, 物料的元数据定义在 H.LowCode.MetaSchema.DesignEngine 项目中。 + +#### 页面设计器 +页面设计器用于设计页面, 基于已有物料进行拖拽、配置、事件绑定等操作, 最终生成页面的元数据文件。 + +页面设计器位于 H.LowCode.DesignEngine 项目的 DesignPage 页面, 包含 ComponentPanel(物料库)、DesignPanel(设计区域)、SettingPanel(配置面板)三个部分。 +* 物料库: 提供组件等物料的列表, 可拖拽到设计区域。 +* 设计区域: 可视化编辑页面, 支持组件的添加、删除、移动和调整大小。 + * * DesignPanel 包含多个 DraggableContainer, 此组件为一个可拖拽组件容器, 用于放置可拖拽组件 DraggableItem。 + * * DraggableItem 作为可拖拽组件, 用于包裹真实组件, 使所有组件具备可拖拽能力。 + * * DraggableItem 包裹的是 DraggableItem 组件, DraggableItem 组件的子组件为真实组件, 例如 Button、Input 等。DraggableItem 将组件元数据动态渲染为真实组件, 从而实现基于 json 元数据动态渲染页面的效果。 +* 配置面板: 对选中的组件进行属性、样式和事件的配置。 + +##### 页面设计器拖拽交互 +DraggableItem 组件拖拽过程中, 当拖拽后的顺序大于原始顺序, 说明组件向后拖拽, 反之向前拖拽。 +向后拖拽时, 被拖拽到上方的组件及两个组件中间的所有组件都向前移动;反之都向后移动。 +向前移动时, 如果组件在当前行的第一个, 则移动到上一行的末尾;向后移动时, 如果组件在当前行的最后一个, 则移动到下一行的第一个。 + +### 渲染引擎 +#### 启动项目 +设计引擎启动项目 H.LowCode.DesignEngine.Host + +#### 页面渲染 +渲染引擎负责根据页面的元数据文件, 动态生成 Blazor 组件树, 并在前端页面中渲染出来。渲染引擎位于 H.LowCode.RenderEngine 项目中, 主要负责以下几个方面的功能: +* 元数据解析: 读取页面的元数据文件, 解析出组件、样式、事件等信息。 +* 组件渲染: 根据解析出的元数据, 动态创建 Blazor 组件实例, 并将其添加到组件树中。 +* 事件处理: 为组件添加事件处理逻辑, 确保用户交互能够正确响应。 diff --git a/.trae/rules/project_rules.md b/.trae/rules/project_rules.md index 1ab899b4fd492e54304701b136b14706618c0a9c..13e6523d9f4bee0611558b41e8d6b0b6b7b612be 100644 --- a/.trae/rules/project_rules.md +++ b/.trae/rules/project_rules.md @@ -67,6 +67,11 @@ * * DraggableItem 包裹的是 DraggableItem 组件,DraggableItem 组件的子组件为真实组件,例如 Button、Input 等。DraggableItem 将组件元数据动态渲染为真实组件,从而实现基于 json 元数据动态渲染页面的效果。 * 配置面板:对选中的组件进行属性、样式和事件的配置。 +##### 页面设计器拖拽交互 +DraggableItem 组件拖拽过程中,当拖拽后的顺序大于原始顺序,说明组件向后拖拽,反之向前拖拽。 +向后拖拽时,被拖拽到上方的组件及两个组件中间的所有组件都向前移动;反之都向后移动。 +向前移动时,如果组件在当前行的第一个,则移动到上一行的末尾;向后移动时,如果组件在当前行的最后一个,则移动到下一行的第一个。 + ### 渲染引擎 #### 启动项目 设计引擎启动项目 H.LowCode.DesignEngine.Host diff --git a/README.md b/README.md index 8a04c73b50e8f1c3599d46c26da47f6addab049a..bfd3cf17b50b6839d99067dad8726f9a7de0cddb 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # H.LowCode ### 介绍 -* 低代码实验性项目 -* 基于 .NET 8.0 + Blazor 实现 +* 低代码实验性项目,基于 .NET + Blazor 实现 ### 分支规则 * master: 最新稳定代码 diff --git a/meta/apps/attendance/attendance.json b/meta/apps/attendance/attendance.json new file mode 100644 index 0000000000000000000000000000000000000000..29ca791d5c6ee572b4caea66dd105c7b24843f51 --- /dev/null +++ b/meta/apps/attendance/attendance.json @@ -0,0 +1 @@ +{"id":"attendance","n":"考勤管理系统","desc":"企业员工考勤管理系统,支持打卡记录、考勤统计、请假管理等功能","order":3,"platform":[0,2],"mt":"2025-11-01T05:09:05.6085187Z"} \ No newline at end of file diff --git a/meta/apps/attendance/datasource/approve_status_options.json b/meta/apps/attendance/datasource/approve_status_options.json new file mode 100644 index 0000000000000000000000000000000000000000..d0e7973d56970ba52c2a1febaf385a33968428aa --- /dev/null +++ b/meta/apps/attendance/datasource/approve_status_options.json @@ -0,0 +1 @@ +{"aid":"attendance","id":"approve_status_options","n":"审批状态选项","type":3,"options":[{"id":"0","n":"待审批","v":"0"},{"id":"1","n":"已通过","v":"1"},{"id":"2","n":"已拒绝","v":"2"},{"id":"3","n":"已撤销","v":"3"}],"mt":"2025-11-17T10:00:00.0000000Z"} \ No newline at end of file diff --git a/meta/apps/attendance/datasource/checkin_type_options.json b/meta/apps/attendance/datasource/checkin_type_options.json new file mode 100644 index 0000000000000000000000000000000000000000..06ac7be3deb71e3cc27eddbfa4d8e456d2ff9f70 --- /dev/null +++ b/meta/apps/attendance/datasource/checkin_type_options.json @@ -0,0 +1 @@ +{"aid":"attendance","id":"checkin_type_options","n":"打卡类型选项","type":3,"options":[{"id":"1","n":"上班打卡","v":"1"},{"id":"2","n":"下班打卡","v":"2"},{"id":"3","n":"外出打卡","v":"3"},{"id":"4","n":"外勤打卡","v":"4"}],"mt":"2025-11-17T10:00:00.0000000Z"} \ No newline at end of file diff --git a/meta/apps/attendance/datasource/department_options.json b/meta/apps/attendance/datasource/department_options.json new file mode 100644 index 0000000000000000000000000000000000000000..c42b1428647e38809ad64cca716ecb6870a24724 --- /dev/null +++ b/meta/apps/attendance/datasource/department_options.json @@ -0,0 +1 @@ +{"aid":"attendance","id":"department_options","n":"部门选项","type":3,"options":[{"id":"1","n":"总经理办公室","v":"1"},{"id":"2","n":"人力资源部","v":"2"},{"id":"3","n":"财务部","v":"3"},{"id":"4","n":"市场部","v":"4"},{"id":"5","n":"技术部","v":"5"},{"id":"6","n":"客服部","v":"6"}],"mt":"2025-11-17T10:00:00.0000000Z"} \ No newline at end of file diff --git a/meta/apps/attendance/datasource/leave_request.json b/meta/apps/attendance/datasource/leave_request.json new file mode 100644 index 0000000000000000000000000000000000000000..85e1321be02ef759f0bb62b3168971a5255b3b39 --- /dev/null +++ b/meta/apps/attendance/datasource/leave_request.json @@ -0,0 +1 @@ +{"aid":"attendance","id":"leave_request","n":"tb_leave_request","disn":"请假申请","type":1,"fields":[{"id":"f_id","n":"f_id","disn":"主键","type":"varchar","pk":true},{"id":"f_userid","n":"f_userid","disn":"申请人","type":"varchar"},{"id":"f_deptid","n":"f_deptid","disn":"部门id","type":"varchar","nul":true},{"id":"f_leave_type","n":"f_leave_type","disn":"请假类型","type":"int"},{"id":"f_start_time","n":"f_start_time","disn":"开始时间","type":"datetime"},{"id":"f_end_time","n":"f_end_time","disn":"结束时间","type":"datetime"},{"id":"f_days","n":"f_days","disn":"请假天数","type":"decimal","nul":true},{"id":"f_reason","n":"f_reason","disn":"请假原因","type":"varchar","nul":true},{"id":"f_status","n":"f_status","disn":"审批状态","type":"int"},{"id":"f_approver","n":"f_approver","disn":"审批人","type":"varchar","nul":true},{"id":"f_approve_time","n":"f_approve_time","disn":"审批时间","type":"datetime","nul":true},{"id":"f_approve_remark","n":"f_approve_remark","disn":"审批意见","type":"varchar","nul":true},{"id":"f_create_time","n":"f_create_time","disn":"创建时间","type":"datetime"}],"mt":"2025-11-17T10:00:00.0000000Z"} \ No newline at end of file diff --git a/meta/apps/attendance/datasource/leave_type_options.json b/meta/apps/attendance/datasource/leave_type_options.json new file mode 100644 index 0000000000000000000000000000000000000000..fea0a97289320b714411303abe5d552857576b48 --- /dev/null +++ b/meta/apps/attendance/datasource/leave_type_options.json @@ -0,0 +1 @@ +{"aid":"attendance","id":"leave_type_options","n":"请假类型选项","type":3,"options":[{"id":"1","n":"年假","v":"1"},{"id":"2","n":"病假","v":"2"},{"id":"3","n":"事假","v":"3"},{"id":"4","n":"婚假","v":"4"},{"id":"5","n":"产假","v":"5"},{"id":"6","n":"丧假","v":"6"}],"mt":"2025-11-17T10:00:00.0000000Z"} \ No newline at end of file diff --git a/meta/apps/attendance/datasource/overtime_request.json b/meta/apps/attendance/datasource/overtime_request.json new file mode 100644 index 0000000000000000000000000000000000000000..cd18e3379989363b926df9cad6776f98847dd636 --- /dev/null +++ b/meta/apps/attendance/datasource/overtime_request.json @@ -0,0 +1 @@ +{"aid":"attendance","id":"overtime_request","n":"tb_overtime_request","disn":"加班申请","type":1,"fields":[{"id":"f_id","n":"f_id","disn":"主键","type":"varchar","pk":true},{"id":"f_userid","n":"f_userid","disn":"申请人","type":"varchar"},{"id":"f_deptid","n":"f_deptid","disn":"部门id","type":"varchar","nul":true},{"id":"f_overtime_date","n":"f_overtime_date","disn":"加班日期","type":"date"},{"id":"f_start_time","n":"f_start_time","disn":"开始时间","type":"datetime"},{"id":"f_end_time","n":"f_end_time","disn":"结束时间","type":"datetime"},{"id":"f_hours","n":"f_hours","disn":"加班小时数","type":"decimal","nul":true},{"id":"f_overtime_type","n":"f_overtime_type","disn":"加班类型","type":"int"},{"id":"f_reason","n":"f_reason","disn":"加班原因","type":"varchar","nul":true},{"id":"f_status","n":"f_status","disn":"审批状态","type":"int"},{"id":"f_approver","n":"f_approver","disn":"审批人","type":"varchar","nul":true},{"id":"f_approve_time","n":"f_approve_time","disn":"审批时间","type":"datetime","nul":true},{"id":"f_approve_remark","n":"f_approve_remark","disn":"审批意见","type":"varchar","nul":true},{"id":"f_create_time","n":"f_create_time","disn":"创建时间","type":"datetime"}],"mt":"2025-11-17T10:00:00.0000000Z"} \ No newline at end of file diff --git a/meta/apps/attendance/datasource/overtime_type_options.json b/meta/apps/attendance/datasource/overtime_type_options.json new file mode 100644 index 0000000000000000000000000000000000000000..552604e63bacae6cb3512fd029c98151085ca196 --- /dev/null +++ b/meta/apps/attendance/datasource/overtime_type_options.json @@ -0,0 +1 @@ +{"aid":"attendance","id":"overtime_type_options","n":"加班类型选项","type":3,"options":[{"id":"1","n":"工作日加班","v":"1"},{"id":"2","n":"休息日加班","v":"2"},{"id":"3","n":"节假日加班","v":"3"}],"mt":"2025-11-17T10:00:00.0000000Z"} \ No newline at end of file diff --git a/meta/apps/attendance/datasource/wmtnh0uv.json b/meta/apps/attendance/datasource/wmtnh0uv.json new file mode 100644 index 0000000000000000000000000000000000000000..4d3f9e997c512ef7ef43d3c44aefb72e59a18947 --- /dev/null +++ b/meta/apps/attendance/datasource/wmtnh0uv.json @@ -0,0 +1 @@ +{"aid":"attendance","id":"wmtnh0uv","n":"tb_check","disn":"打卡","type":1,"fields":[{"id":"mbz5uzjz","n":"f_id","disn":"主键","type":"varchar","pk":true},{"id":"buw7kncf","n":"f_userid","disn":"打卡人","type":"varchar"},{"id":"9xmlbqfd","n":"f_deptid","disn":"部门id","type":"varchar","nul":true},{"id":"grq2ixzm","n":"f_checktime","disn":"打卡时间","type":"datetime"},{"id":"i7dtcouab","n":"f_checklocation","disn":"打卡地点","type":"varchar","nul":true},{"id":"z07icgya","n":"f_checktype","disn":"打卡类型","type":"int"}],"mt":"2025-11-01T15:10:09.6092882Z"} \ No newline at end of file diff --git a/meta/apps/attendance/menu/bgxoi2nn.json b/meta/apps/attendance/menu/bgxoi2nn.json new file mode 100644 index 0000000000000000000000000000000000000000..b8f44d866fd47d242b081e2511a91cae11b4176d --- /dev/null +++ b/meta/apps/attendance/menu/bgxoi2nn.json @@ -0,0 +1 @@ +{"aid":"attendance","id":"bgxoi2nn","pid":"","t":"考勤管理","type":1,"icon":"clock-circle","order":1,"childs":[],"mt":"2025-11-17T10:00:00.0000000Z"} \ No newline at end of file diff --git a/meta/apps/attendance/menu/elg0bxoe5.json b/meta/apps/attendance/menu/elg0bxoe5.json new file mode 100644 index 0000000000000000000000000000000000000000..5a416878867bca0ae935de1700694dcd04ace68c --- /dev/null +++ b/meta/apps/attendance/menu/elg0bxoe5.json @@ -0,0 +1 @@ +{"aid":"attendance","id":"elg0bxoe5","pid":"bgxoi2nn","t":"打卡","icon":"home","path":"nkeppmji","childs":[],"mt":"2025-11-20T16:17:57.4403894Z"} \ No newline at end of file diff --git a/meta/apps/attendance/menu/fhfmwygw.json b/meta/apps/attendance/menu/fhfmwygw.json new file mode 100644 index 0000000000000000000000000000000000000000..7811d63f4bf86457fadffe48c8a7e8868e1891e0 --- /dev/null +++ b/meta/apps/attendance/menu/fhfmwygw.json @@ -0,0 +1 @@ +{"aid":"attendance","id":"fhfmwygw","pid":"yur2mh2l","t":"加班申请管理","icon":"home","path":"s5v5kbsq","order":1,"childs":[],"mt":"2025-11-20T16:16:28.6424841Z"} \ No newline at end of file diff --git a/meta/apps/attendance/menu/ht4f3m2bs.json b/meta/apps/attendance/menu/ht4f3m2bs.json new file mode 100644 index 0000000000000000000000000000000000000000..750cd834b065854a2c7dffedebfd71b7f4b25dde --- /dev/null +++ b/meta/apps/attendance/menu/ht4f3m2bs.json @@ -0,0 +1 @@ +{"aid":"attendance","id":"ht4f3m2bs","pid":"bgxoi2nn","t":"打卡管理","icon":"edit","path":"gcfqc7xzc","order":1,"childs":[],"mt":"2025-11-17T10:00:00.0000000Z"} \ No newline at end of file diff --git a/meta/apps/attendance/menu/mh1tv0zl.json b/meta/apps/attendance/menu/mh1tv0zl.json new file mode 100644 index 0000000000000000000000000000000000000000..c1197d589b9d36a3928163298928000665584f03 --- /dev/null +++ b/meta/apps/attendance/menu/mh1tv0zl.json @@ -0,0 +1 @@ +{"aid":"attendance","id":"mh1tv0zl","pid":"pqezjhrs","t":"请假申请","icon":"home","path":"t7g1bfcyt","childs":[],"mt":"2025-11-20T16:17:02.6717419Z"} \ No newline at end of file diff --git a/meta/apps/attendance/menu/pqezjhrs.json b/meta/apps/attendance/menu/pqezjhrs.json new file mode 100644 index 0000000000000000000000000000000000000000..e637b925e5ebe172169428a5e6dafca389f8ab54 --- /dev/null +++ b/meta/apps/attendance/menu/pqezjhrs.json @@ -0,0 +1 @@ +{"aid":"attendance","id":"pqezjhrs","pid":"","t":"请假管理","type":1,"icon":"home","order":3,"childs":[],"mt":"2025-11-20T16:15:35.3316102Z"} \ No newline at end of file diff --git a/meta/apps/attendance/menu/ul6i14bx.json b/meta/apps/attendance/menu/ul6i14bx.json new file mode 100644 index 0000000000000000000000000000000000000000..3465234e132b34345805293f1242a70f49bb98ce --- /dev/null +++ b/meta/apps/attendance/menu/ul6i14bx.json @@ -0,0 +1 @@ +{"aid":"attendance","id":"ul6i14bx","pid":"pqezjhrs","t":"请假申请管理","icon":"home","path":"0lsuhfpon","order":1,"childs":[],"mt":"2025-11-20T16:17:24.790879Z"} \ No newline at end of file diff --git a/meta/apps/attendance/menu/xer5u6ng.json b/meta/apps/attendance/menu/xer5u6ng.json new file mode 100644 index 0000000000000000000000000000000000000000..bbe2598121f1049db59b255a6b5eca8e032559bd --- /dev/null +++ b/meta/apps/attendance/menu/xer5u6ng.json @@ -0,0 +1 @@ +{"aid":"attendance","id":"xer5u6ng","pid":"yur2mh2l","t":"加班申请","icon":"home","path":"ehougawr","childs":[],"mt":"2025-11-01T14:40:34.7552684Z"} \ No newline at end of file diff --git a/meta/apps/attendance/menu/yur2mh2l.json b/meta/apps/attendance/menu/yur2mh2l.json new file mode 100644 index 0000000000000000000000000000000000000000..db732719aa4cb6ff3de34da76d81c5b60d5669c5 --- /dev/null +++ b/meta/apps/attendance/menu/yur2mh2l.json @@ -0,0 +1 @@ +{"aid":"attendance","id":"yur2mh2l","pid":"","t":"加班管理","type":1,"icon":"home","order":2,"childs":[],"mt":"2025-11-01T14:13:20.6681892Z"} \ No newline at end of file diff --git a/meta/apps/attendance/page/0lsuhfpon.json b/meta/apps/attendance/page/0lsuhfpon.json new file mode 100644 index 0000000000000000000000000000000000000000..7ad2e9d500e50694ddf2f0176c5bca6efe576ff1 --- /dev/null +++ b/meta/apps/attendance/page/0lsuhfpon.json @@ -0,0 +1 @@ +{"comps":[{"libid":"antdesign","compid":"table","ct":1,"frag":{"dt":"H.LowCode.Components.Defaults.LcTable, H.LowCode.Components.Defaults","t":"H.LowCode.Components.Defaults.LcTable, H.LowCode.Components.Defaults","childs":[],"attrs":[]},"ds":{"dsgt":2,"dst":1,"dsid":"leave_request","dsv":"{\"tcols\":[{\"id\":\"f_id\",\"n\":\"f_id\",\"t\":\"id\",\"pk\":true},{\"id\":\"f_userid\",\"n\":\"f_userid\",\"t\":\"用户\"},{\"id\":\"f_deptid\",\"n\":\"f_deptid\",\"t\":\"部门\"},{\"id\":\"f_leave_type\",\"n\":\"f_leave_type\",\"t\":\"请假类型\"},{\"id\":\"f_start_time\",\"n\":\"f_start_time\",\"t\":\"开始时间\"},{\"id\":\"f_end_time\",\"n\":\"f_end_time\"},{\"id\":\"f_days\",\"n\":\"f_days\"},{\"id\":\"f_status\",\"n\":\"f_status\"},{\"id\":\"f_create_time\",\"n\":\"f_create_time\"}],\"searchs\":[{},{},{}],\"tbtns\":[{\"id\":\"create_leave\",\"n\":\"create\",\"bt\":1,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":10,\"etid\":\"t7g1bfcyt\",\"eta\":\"14\"}]},{\"id\":\"batch_approve\",\"n\":\"batchApprove\",\"sptevs\":[\"OnClick\"]}],\"rbtns\":[{\"id\":\"view_detail\",\"n\":\"view\",\"order\":1,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":10,\"etid\":\"t7g1bfcyt\",\"eta\":\"14\"}],\"rowparams\":{\"id\":\"f_id\"}},{\"id\":\"approve\",\"n\":\"approve\",\"order\":2,\"sptevs\":[\"OnClick\"]},{\"id\":\"delete\",\"n\":\"delete\",\"order\":3,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":40,\"edat\":20}]},{\"id\":\"edit\",\"n\":\"edit\",\"order\":4,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":40,\"edat\":10}]},{\"id\":\"save\",\"n\":\"save\",\"order\":5,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":40,\"edat\":30}]},{\"id\":\"cancel\",\"n\":\"cancel\",\"order\":6,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":40,\"edat\":40}]}]}"},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"order":10,"pub":1,"mt":"2025-11-17T10:00:00Z","id":"leave_table","pid":"root","n":"leave_table","lb":"请假申请列表","sptds":true,"stl":{"itemw":24,"itemh":400,"labelw":180},"valrules":[],"v":"0.0.1"}],"sptevs":["OnLoad"],"aid":"attendance","id":"0lsuhfpon","n":"请假申请管理","order":4,"pt":2,"pageprop":{"playout":2,"ds":{"dst":1}},"ds":{"dst":1},"mt":"2025-11-23T12:48:58.4631549Z"} \ No newline at end of file diff --git a/meta/apps/attendance/page/ehougawr.json b/meta/apps/attendance/page/ehougawr.json new file mode 100644 index 0000000000000000000000000000000000000000..b606f54505abf16dd535b11fef0812c7d8e3c460 --- /dev/null +++ b/meta/apps/attendance/page/ehougawr.json @@ -0,0 +1,456 @@ +{ + "comps": [ + { + "libid": "antdesign", + "compid": "datepicker", + "ct": 1, + "frag": { + "t": "AntDesign.DatePicker\u00601[[System.Nullable\u00601[[System.DateTime]]]], AntDesign", + "valt": "System.Nullable\u00601[System.DateTime]", + "attrs": [] + }, + "ds": { + "dsgt": 1 + }, + "attrdefgroups": [], + "childs": [], + "sptevs": [ + "OnClick", + "OnExpand" + ], + "evdefs": [], + "stydefs": [], + "order": 10, + "pub": 1, + "mt": "2025-11-17T10:00:00Z", + "id": "f_overtime_date", + "pid": "root", + "n": "f_overtime_date", + "lb": "加班日期", + "stl": { + "itemw": 8, + "itemh": 85, + "labelw": 120 + }, + "valrules": [ + { + "id": "f_overtime_date_required", + "cid": "f_overtime_date", + "type": 1, + "errmsg": "加班日期不能为空", + "trigger": 1, + "enabled": true, + "order": 1 + } + ], + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "timepicker", + "ct": 1, + "frag": { + "t": "AntDesign.TimePicker\u00601[[System.Nullable\u00601[[System.DateTime]]]], AntDesign", + "valt": "System.Nullable\u00601[System.DateTime]", + "attrs": [] + }, + "ds": { + "dsgt": 1 + }, + "attrdefgroups": [], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 20, + "pub": 1, + "mt": "2025-11-17T10:00:00Z", + "id": "f_start_time", + "pid": "root", + "n": "f_start_time", + "lb": "开始时间", + "stl": { + "itemw": 8, + "itemh": 85, + "labelw": 120 + }, + "valrules": [ + { + "id": "f_start_time_required", + "cid": "f_start_time", + "type": 1, + "errmsg": "开始时间不能为空", + "trigger": 1, + "enabled": true, + "order": 1 + } + ], + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "timepicker", + "ct": 1, + "frag": { + "t": "AntDesign.TimePicker\u00601[[System.Nullable\u00601[[System.DateTime]]]], AntDesign", + "valt": "System.Nullable\u00601[System.DateTime]", + "attrs": [] + }, + "ds": { + "dsgt": 1 + }, + "attrdefgroups": [], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 30, + "pub": 1, + "mt": "2025-11-17T10:00:00Z", + "id": "f_end_time", + "pid": "root", + "n": "f_end_time", + "lb": "结束时间", + "stl": { + "itemw": 8, + "itemh": 85, + "labelw": 120 + }, + "valrules": [ + { + "id": "f_end_time_required", + "cid": "f_end_time", + "type": 1, + "errmsg": "结束时间不能为空", + "trigger": 1, + "enabled": true, + "order": 1 + } + ], + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "inputnumber", + "ct": 1, + "frag": { + "t": "AntDesign.InputNumber\u00601[System.Int32], AntDesign", + "valt": "System.Int32", + "attrs": [] + }, + "ds": { + "dsgt": 1 + }, + "attrdefgroups": [], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 40, + "pub": 1, + "mt": "2025-11-17T10:00:00Z", + "id": "f_hours", + "pid": "root", + "n": "f_hours", + "lb": "加班小时数", + "stl": { + "itemw": 8, + "itemh": 85, + "labelw": 120 + }, + "valrules": [ + { + "id": "f_hours_required", + "cid": "f_hours", + "type": 1, + "errmsg": "加班小时数不能为空", + "trigger": 1, + "enabled": true, + "order": 1 + }, + { + "id": "f_hours_min", + "cid": "f_hours", + "type": 3, + "errmsg": "加班小时数必须大于0", + "trigger": 1, + "enabled": true, + "order": 2, + "rulev": "1" + } + ], + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "select", + "ct": 1, + "frag": { + "t": "AntDesign.Select\u00602[[System.String],[System.String]], antdesign", + "valt": "System.String", + "attrs": [] + }, + "ds": { + "dsgt": 1, + "dsid": "overtime_type_options" + }, + "attrdefgroups": [], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 50, + "pub": 1, + "mt": "2025-11-17T10:00:00Z", + "id": "f_overtime_type", + "pid": "root", + "n": "f_overtime_type", + "lb": "加班类型", + "sptds": true, + "stl": { + "itemw": 8, + "itemh": 85, + "labelw": 120 + }, + "valrules": [ + { + "id": "f_reason_required", + "cid": "f_reason", + "type": 1, + "errmsg": "加班原因不能为空", + "trigger": 1, + "enabled": true, + "order": 1 + }, + { + "id": "f_reason_min", + "cid": "f_reason", + "type": 3, + "errmsg": "加班原因不能少于5个字符", + "trigger": 1, + "enabled": true, + "order": 2, + "rulev": "5" + } + ], + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "textarea", + "ct": 1, + "frag": { + "t": "AntDesign.TextArea, AntDesign", + "valt": "System.String", + "attrs": [] + }, + "ds": { + "dsgt": 1 + }, + "attrdefgroups": [ + { + "gn": "基础属性", + "attrdefs": [ + { + "disn": "行数", + "pt": 2, + "desc": "", + "dftval": 4, + "attrn": "Rows", + "attrt": "System.Int32", + "attrv": 4 + }, + { + "disn": "是否禁用", + "pt": 6, + "desc": "", + "dftval": false, + "attrn": "Disabled", + "attrt": "System.Boolean", + "attrv": false + } + ] + } + ], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 60, + "pub": 1, + "mt": "2025-11-17T10:00:00Z", + "id": "f_reason", + "pid": "root", + "n": "f_reason", + "lb": "加班原因", + "stl": { + "itemw": 24, + "itemh": 120, + "labelw": 120 + }, + "valrules": [], + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "button", + "ct": 1, + "frag": { + "t": "AntDesign.Button, AntDesign", + "valt": "System.String", + "attrs": [ + { + "attrn": "Text", + "attrt": "System.String" + }, + { + "attrn": "Type", + "attrt": "System.String" + } + ] + }, + "ds": {}, + "attrdefgroups": [ + { + "gn": "基础属性", + "attrdefs": [ + { + "disn": "按钮文字", + "pt": 1, + "desc": "按钮显示的文本内容", + "dftval": "按钮", + "attrn": "Text", + "attrt": "System.String", + "attrv": "提交申请" + }, + { + "disn": "按钮类型", + "pt": 3, + "desc": "按钮的样式类型", + "dftval": "default", + "attrn": "Type", + "attrt": "System.String", + "attrv": "primary" + } + ] + } + ], + "childs": [], + "evdefs": [ + { + "en": "OnClick", + "disn": "点击事件", + "desc": "按钮被点击时触发的事件" + } + ], + "stydefs": [], + "order": 70, + "pub": 1, + "mt": "2025-11-17T10:00:00Z", + "id": "submit_btn", + "pid": "root", + "n": "submit_btn", + "lb": "提交按钮", + "stl": { + "itemw": 4, + "itemh": 50, + "labelw": 180 + }, + "evs": [ + { + "en": "OnClick", + "eht": 10, + "edat": 10 + } + ], + "valrules": [], + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "button", + "ct": 1, + "frag": { + "t": "AntDesign.Button, AntDesign", + "valt": "System.String", + "attrs": [ + { + "attrn": "Text", + "attrt": "System.String" + }, + { + "attrn": "Type", + "attrt": "System.String" + } + ] + }, + "ds": {}, + "attrdefgroups": [ + { + "gn": "基础属性", + "attrdefs": [ + { + "disn": "按钮文字", + "pt": 1, + "desc": "按钮显示的文本内容", + "dftval": "按钮", + "attrn": "Text", + "attrt": "System.String", + "attrv": "重置" + }, + { + "disn": "按钮类型", + "pt": 3, + "desc": "按钮的样式类型", + "dftval": "default", + "attrn": "Type", + "attrt": "System.String", + "attrv": "default" + } + ] + } + ], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 80, + "pub": 1, + "mt": "2025-11-17T10:00:00Z", + "id": "reset_btn", + "pid": "root", + "n": "reset_btn", + "lb": "重置按钮", + "stl": { + "itemw": 4, + "itemh": 50, + "labelw": 180 + }, + "evs": [ + { + "en": "OnClick", + "eht": 10, + "edat": 20 + } + ], + "valrules": [], + "v": "0.0.1" + } + ], + "sptevs": [ + "OnLoad" + ], + "aid": "attendance", + "id": "ehougawr", + "n": "加班申请", + "order": 6, + "pt": 1, + "pageprop": { + "playout": 2, + "ds": { + "dst": 1 + } + }, + "ds": { + "dsgt": 1, + "dst": 1, + "dsid": "overtime_request", + "dsn": "加班申请", + "dsv": "tb_overtime_request" + }, + "mt": "2025-11-23T10:52:08.2361057Z" +} \ No newline at end of file diff --git a/meta/apps/attendance/page/gcfqc7xzc.json b/meta/apps/attendance/page/gcfqc7xzc.json new file mode 100644 index 0000000000000000000000000000000000000000..1b6cb37016c4b20fe54665f30b22444fb91823b2 --- /dev/null +++ b/meta/apps/attendance/page/gcfqc7xzc.json @@ -0,0 +1 @@ +{"comps":[{"libid":"antdesign","compid":"table","ct":1,"frag":{"dt":"H.LowCode.Components.Defaults.LcTable, H.LowCode.Components.Defaults","t":"H.LowCode.Components.Defaults.LcTable, H.LowCode.Components.Defaults","childs":[],"attrs":[]},"ds":{"dsgt":2,"dst":1,"dsid":"wmtnh0uv","dsv":"{\"tcols\":[{\"id\":\"f_id\",\"n\":\"f_id\",\"t\":\"id\",\"pk\":true},{\"id\":\"f_userid\",\"n\":\"f_userid\",\"t\":\"用户\"},{\"id\":\"f_deptid\",\"n\":\"f_deptid\",\"t\":\"部门\"},{\"id\":\"f_checktime\",\"n\":\"f_checktime\",\"t\":\"打卡时间\"},{\"id\":\"f_checklocation\",\"n\":\"f_checklocation\",\"t\":\"打卡地点\"},{\"id\":\"f_checktype\",\"n\":\"f_checktype\",\"t\":\"打卡类型\"}],\"searchs\":[{},{},{},{}],\"tbtns\":[{\"id\":\"manual_checkin\",\"n\":\"manualCheckin\",\"bt\":1,\"sptevs\":[\"OnClick\"]},{\"id\":\"export_data\",\"n\":\"export\",\"sptevs\":[\"OnClick\"]},{\"id\":\"batch_delete\",\"n\":\"deleteSelections\",\"sptevs\":[\"OnClick\"]}],\"rbtns\":[{\"id\":\"view_detail\",\"n\":\"view\",\"order\":1,\"sptevs\":[\"OnClick\"]},{\"id\":\"edit_record\",\"n\":\"edit\",\"order\":2,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":40,\"edat\":10}]},{\"id\":\"delete_record\",\"n\":\"delete\",\"order\":3,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":40,\"edat\":20}]},{\"id\":\"save_record\",\"n\":\"save\",\"order\":4,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":40,\"edat\":30}]},{\"id\":\"cancel_edit\",\"n\":\"cancel\",\"order\":5,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":40,\"edat\":40}]}]}"},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"order":10,"pub":1,"mt":"2025-11-17T10:00:00Z","id":"checkin_table","pid":"root","n":"checkin_table","lb":"打卡记录列表","sptds":true,"stl":{"itemw":24,"itemh":450,"labelw":180},"valrules":[],"v":"0.0.1"}],"sptevs":["OnLoad"],"aid":"attendance","id":"gcfqc7xzc","n":"打卡管理","order":1,"pt":2,"pageprop":{"playout":2,"ds":{"dst":1}},"ds":{"dst":1},"mt":"2025-11-23T12:30:13.3927186Z"} \ No newline at end of file diff --git a/meta/apps/attendance/page/nkeppmji.json b/meta/apps/attendance/page/nkeppmji.json new file mode 100644 index 0000000000000000000000000000000000000000..ac60cd9d29b6922dd6eaa6214b40691f0a28edcc --- /dev/null +++ b/meta/apps/attendance/page/nkeppmji.json @@ -0,0 +1 @@ +{"comps":[{"libid":"antdesign","compid":"input","ct":1,"frag":{"t":"AntDesign.Input`1[System.String], AntDesign","childs":[],"valt":"System.String","attrs":[{"attrn":"TValue","attrt":"System.String"}]},"ds":{"dsgt":1},"attrdefgroups":[{"gn":"基础属性","attrdefs":[{"disn":"是否禁用","pt":6,"desc":"","dftval":false,"attrn":"Disabled","attrt":"System.Boolean","attrv":false},{"disn":"最大长度","pt":2,"desc":"字段输入的最大长度,为0时表示不限制长度","dftval":0,"attrn":"MaxLength","attrt":"System.Int32","attrv":20},{"disn":"输入提示","pt":1,"desc":"组件输入时的 Placeholder 提示","dftval":"","attrn":"Placeholder","attrt":"System.String","attrv":""}]}],"childs":[],"evdefs":[],"stydefs":[],"order":10,"pub":1,"mt":"2025-02-24T15:36:15.8037414Z","id":"i7ittugb","pid":"root","n":"f_userid","lb":"打卡人","stl":{"itemw":4,"itemh":85,"labelw":180},"valrules":[{"id":"f_userid_required","cid":"i7ittugb","enabled":true,"type":1,"errmsg":"打卡人不能为空","trigger":1,"order":1}],"v":"0.0.1"},{"libid":"antdesign","compid":"select","ct":1,"frag":{"t":"AntDesign.Select`2[[System.String],[System.String]], antdesign","childs":[],"valt":"System.String","attrs":[]},"ds":{"dsgt":1,"dsid":"department_options"},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"order":17,"pub":1,"mt":"2025-03-22T15:55:39.4807842Z","id":"be07hunku","pid":"root","n":"f_deptid","lb":"选择部门","sptds":true,"stl":{"itemw":4,"itemh":85,"labelw":180},"valrules":[{"id":"f_checktime_required","cid":"tw1qgcjp","type":1,"errmsg":"打卡时间不能为空","trigger":1,"order":1}],"v":"0.0.1"},{"libid":"antdesign","compid":"timepicker","ct":1,"frag":{"t":"AntDesign.TimePicker`1[[System.Nullable`1[[System.DateTime]]]], AntDesign","childs":[],"valt":"System.Nullable`1[System.DateTime]","attrs":[]},"ds":{"dsgt":1},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"order":16,"pub":1,"mt":"2025-03-05T15:31:24.9654966Z","id":"tw1qgcjp","pid":"root","n":"f_checktime","lb":"打卡时间","stl":{"itemw":4,"itemh":85,"labelw":180},"valrules":[{"id":"f_checktime_required","cid":"tw1qgcjp","enabled":true,"type":1,"errmsg":"打卡时间不能为空","trigger":1,"order":1}],"v":"0.0.1"},{"libid":"antdesign","compid":"input","ct":1,"frag":{"t":"AntDesign.Input`1[System.String], AntDesign","childs":[],"valt":"System.String","attrs":[{"attrn":"TValue","attrt":"System.String"}]},"ds":{"dsgt":1},"attrdefgroups":[{"gn":"基础属性","attrdefs":[{"disn":"是否禁用","pt":6,"desc":"","dftval":false,"attrn":"Disabled","attrt":"System.Boolean","attrv":false},{"disn":"最大长度","pt":2,"desc":"字段输入的最大长度,为0时表示不限制长度","dftval":0,"attrn":"MaxLength","attrt":"System.Int32","attrv":50},{"disn":"输入提示","pt":1,"desc":"组件输入时的 Placeholder 提示","dftval":"","attrn":"Placeholder","attrt":"System.String","attrv":""}]}],"childs":[],"evdefs":[],"stydefs":[],"order":10,"pub":1,"mt":"2025-02-24T15:36:15.8037414Z","id":"so4v7kba","pid":"root","n":"f_checklocation","lb":"打卡地点","stl":{"itemw":4,"itemh":85,"labelw":180},"valrules":[{"id":"f_checklocation_required","cid":"so4v7kba","enabled":true,"type":1,"errmsg":"打卡地点不能为空","trigger":1,"order":1}],"v":"0.0.1"},{"libid":"antdesign","compid":"radio","ct":1,"frag":{"t":"AntDesign.RadioGroup`1[System.String], AntDesign","childs":[],"valt":"System.String","attrs":[{"attrn":"TValue","attrt":"System.String"}]},"ds":{"dsfrag":{"t":"AntDesign.Radio`1[System.String], AntDesign","childs":[],"attrs":[{"attrn":"Value"}]},"dsgt":1,"dst":8,"fxopds":[{"l":"上班打卡","v":"0"},{"l":"下班打卡","v":"1"}]},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"order":13,"pub":1,"mt":"2025-03-23T07:26:31.4273273Z","id":"wlxwhf96","pid":"root","n":"f_checktype","lb":"打卡选项","sptds":true,"stl":{"itemw":4,"itemh":85,"labelw":180},"valrules":[{"id":"f_checktype_required","cid":"wlxwhf96","enabled":true,"type":1,"errmsg":"请选择打卡类型","trigger":1,"order":1}],"v":"0.0.1"}],"sptevs":["OnLoad"],"aid":"attendance","id":"nkeppmji","n":"打卡","pt":1,"pageprop":{"playout":1,"ds":{}},"ds":{"dst":1,"dsid":"wmtnh0uv","dsn":"打卡","dsv":"tb_check"},"mt":"2025-11-29T16:51:31.7913039Z"} \ No newline at end of file diff --git a/meta/apps/attendance/page/s5v5kbsq.json b/meta/apps/attendance/page/s5v5kbsq.json new file mode 100644 index 0000000000000000000000000000000000000000..8818837ba9e389e8c66710fdd31cd16bb852a71d --- /dev/null +++ b/meta/apps/attendance/page/s5v5kbsq.json @@ -0,0 +1 @@ +{"comps":[{"libid":"antdesign","compid":"table","ct":1,"frag":{"dt":"H.LowCode.Components.Defaults.LcTable, H.LowCode.Components.Defaults","t":"H.LowCode.Components.Defaults.LcTable, H.LowCode.Components.Defaults","childs":[],"attrs":[]},"ds":{"dsgt":2,"dst":1,"dsid":"overtime_request","dsv":"{\"tcols\":[{\"id\":\"f_id\",\"n\":\"f_id\",\"disn\":\"主键\",\"pk\":true},{\"id\":\"f_userid\",\"n\":\"f_userid\",\"disn\":\"申请人\"},{\"id\":\"f_deptid\",\"n\":\"f_deptid\",\"disn\":\"部门\"},{\"id\":\"f_overtime_date\",\"n\":\"f_overtime_date\",\"disn\":\"加班日期\"},{\"id\":\"f_start_time\",\"n\":\"f_start_time\",\"disn\":\"开始时间\"},{\"id\":\"f_end_time\",\"n\":\"f_end_time\",\"disn\":\"结束时间\"},{\"id\":\"f_hours\",\"n\":\"f_hours\",\"disn\":\"加班小时\"},{\"id\":\"f_overtime_type\",\"n\":\"f_overtime_type\",\"disn\":\"加班类型\"},{\"id\":\"f_status\",\"n\":\"f_status\",\"disn\":\"审批状态\"},{\"id\":\"f_create_time\",\"n\":\"f_create_time\",\"disn\":\"申请时间\"}],\"searchs\":[{\"id\":\"search_userid\",\"n\":\"f_userid\",\"disn\":\"申请人\",\"t\":1},{\"id\":\"search_status\",\"n\":\"f_status\",\"disn\":\"审批状态\",\"t\":3,\"dsid\":\"approve_status_options\"},{\"id\":\"search_dept\",\"n\":\"f_deptid\",\"disn\":\"部门\",\"t\":3,\"dsid\":\"department_options\"},{\"id\":\"search_date\",\"n\":\"f_overtime_date\",\"disn\":\"加班日期\",\"t\":4}],\"tbtns\":[{\"id\":\"create_overtime\",\"n\":\"create\",\"disn\":\"新建申请\",\"bt\":1,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":10,\"etid\":\"ehougawr\",\"eta\":\"14\"}]},{\"id\":\"batch_approve\",\"n\":\"batchApprove\",\"disn\":\"批量审批\",\"sptevs\":[\"OnClick\"]}],\"rbtns\":[{\"id\":\"view_detail\",\"n\":\"view\",\"disn\":\"查看详情\",\"order\":1,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":10,\"etid\":\"ehougawr\",\"eta\":\"14\"}],\"rowparams\":{\"id\":\"f_id\"}},{\"id\":\"approve\",\"n\":\"approve\",\"disn\":\"审批\",\"order\":2,\"sptevs\":[\"OnClick\"]},{\"id\":\"delete\",\"n\":\"delete\",\"disn\":\"删除\",\"order\":3,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":40,\"edat\":20}]},{\"id\":\"edit\",\"n\":\"edit\",\"disn\":\"编辑\",\"order\":4,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":40,\"edat\":10}]},{\"id\":\"save\",\"n\":\"save\",\"disn\":\"保存\",\"order\":5,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":40,\"edat\":30}]},{\"id\":\"cancel\",\"n\":\"cancel\",\"disn\":\"取消\",\"order\":6,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":40,\"edat\":40}]}]}"},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"order":10,"pub":1,"mt":"2025-11-17T10:00:00Z","id":"overtime_table","pid":"root","n":"overtime_table","lb":"加班申请列表","sptds":true,"stl":{"itemw":24,"itemh":400,"labelw":180},"valrules":[],"v":"0.0.1"}],"sptevs":["OnLoad"],"aid":"attendance","id":"s5v5kbsq","n":"加班申请管理","order":7,"pt":2,"pageprop":{"playout":2,"ds":{"dst":1}},"ds":{"dst":1},"mt":"2025-11-23T12:44:57.5659015Z"} \ No newline at end of file diff --git a/meta/apps/attendance/page/t7g1bfcyt.json b/meta/apps/attendance/page/t7g1bfcyt.json new file mode 100644 index 0000000000000000000000000000000000000000..33e0ae3544398ae2a0d238ac43afb3a1a0fe5d2b --- /dev/null +++ b/meta/apps/attendance/page/t7g1bfcyt.json @@ -0,0 +1,413 @@ +{ + "comps": [ + { + "libid": "antdesign", + "compid": "select", + "ct": 1, + "frag": { + "t": "AntDesign.Select\u00602[[System.String],[System.String]], antdesign", + "valt": "System.String", + "attrs": [] + }, + "ds": { + "dsgt": 1, + "dsid": "leave_type_options" + }, + "attrdefgroups": [], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 10, + "pub": 1, + "mt": "2025-11-17T10:00:00Z", + "id": "f_leave_type", + "pid": "root", + "n": "f_leave_type", + "lb": "请假类型", + "sptds": true, + "stl": { + "itemw": 8, + "itemh": 85, + "labelw": 120 + }, + "valrules": [ + { + "id": "f_start_time_required", + "cid": "f_start_time", + "type": 1, + "errmsg": "开始时间不能为空", + "trigger": 1, + "enabled": true, + "order": 1 + } + ], + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "datepicker", + "ct": 1, + "frag": { + "t": "AntDesign.DatePicker\u00601[[System.Nullable\u00601[[System.DateTime]]]], AntDesign", + "valt": "System.Nullable\u00601[System.DateTime]", + "attrs": [] + }, + "ds": { + "dsgt": 1 + }, + "attrdefgroups": [], + "childs": [], + "sptevs": [ + "OnClick", + "OnExpand" + ], + "evdefs": [], + "stydefs": [], + "order": 20, + "pub": 1, + "mt": "2025-11-17T10:00:00Z", + "id": "f_start_time", + "pid": "root", + "n": "f_start_time", + "lb": "开始时间", + "stl": { + "itemw": 8, + "itemh": 85, + "labelw": 120 + }, + "valrules": [ + { + "id": "f_end_time_required", + "cid": "f_end_time", + "type": 1, + "errmsg": "结束时间不能为空", + "trigger": 1, + "enabled": true, + "order": 1 + } + ], + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "datepicker", + "ct": 1, + "frag": { + "t": "AntDesign.DatePicker\u00601[[System.Nullable\u00601[[System.DateTime]]]], AntDesign", + "valt": "System.Nullable\u00601[System.DateTime]", + "attrs": [] + }, + "ds": { + "dsgt": 1 + }, + "attrdefgroups": [], + "childs": [], + "sptevs": [ + "OnClick", + "OnExpand" + ], + "evdefs": [], + "stydefs": [], + "order": 30, + "pub": 1, + "mt": "2025-11-17T10:00:00Z", + "id": "f_end_time", + "pid": "root", + "n": "f_end_time", + "lb": "结束时间", + "stl": { + "itemw": 8, + "itemh": 85, + "labelw": 120 + }, + "valrules": [ + { + "id": "f_days_required", + "cid": "f_days", + "type": 1, + "errmsg": "请假天数不能为空", + "trigger": 1, + "enabled": true, + "order": 1 + }, + { + "id": "f_days_min", + "cid": "f_days", + "type": 3, + "errmsg": "请假天数必须大于0", + "trigger": 1, + "enabled": true, + "order": 2, + "rulev": "1" + } + ], + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "inputnumber", + "ct": 1, + "frag": { + "t": "AntDesign.InputNumber\u00601[System.Int32], AntDesign", + "valt": "System.Int32", + "attrs": [] + }, + "ds": { + "dsgt": 1 + }, + "attrdefgroups": [], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 40, + "pub": 1, + "mt": "2025-11-17T10:00:00Z", + "id": "f_days", + "pid": "root", + "n": "f_days", + "lb": "请假天数", + "stl": { + "itemw": 8, + "itemh": 85, + "labelw": 120 + }, + "valrules": [ + { + "id": "f_reason_required", + "cid": "f_reason", + "type": 1, + "errmsg": "请假原因不能为空", + "trigger": 1, + "enabled": true, + "order": 1 + }, + { + "id": "f_reason_min", + "cid": "f_reason", + "type": 3, + "errmsg": "请假原因不能少于5个字符", + "trigger": 1, + "enabled": true, + "order": 2, + "rulev": "5" + } + ], + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "textarea", + "ct": 1, + "frag": { + "t": "AntDesign.TextArea, AntDesign", + "valt": "System.String", + "attrs": [] + }, + "ds": { + "dsgt": 1 + }, + "attrdefgroups": [ + { + "gn": "基础属性", + "attrdefs": [ + { + "disn": "行数", + "pt": 2, + "desc": "", + "dftval": 4, + "attrn": "Rows", + "attrt": "System.Int32", + "attrv": 4 + }, + { + "disn": "是否禁用", + "pt": 6, + "desc": "", + "dftval": false, + "attrn": "Disabled", + "attrt": "System.Boolean", + "attrv": false + } + ] + } + ], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 50, + "pub": 1, + "mt": "2025-11-17T10:00:00Z", + "id": "f_reason", + "pid": "root", + "n": "f_reason", + "lb": "请假原因", + "stl": { + "itemw": 24, + "itemh": 120, + "labelw": 120 + }, + "valrules": [], + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "button", + "ct": 1, + "frag": { + "t": "AntDesign.Button, AntDesign", + "valt": "System.String", + "attrs": [ + { + "attrn": "Text", + "attrt": "System.String" + }, + { + "attrn": "Type", + "attrt": "System.String" + } + ] + }, + "ds": {}, + "attrdefgroups": [ + { + "gn": "基础属性", + "attrdefs": [ + { + "disn": "按钮文字", + "pt": 1, + "desc": "按钮显示的文本内容", + "dftval": "按钮", + "attrn": "Text", + "attrt": "System.String", + "attrv": "提交申请" + }, + { + "disn": "按钮类型", + "pt": 3, + "desc": "按钮的样式类型", + "dftval": "default", + "attrn": "Type", + "attrt": "System.String", + "attrv": "primary" + } + ] + } + ], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 60, + "pub": 1, + "mt": "2025-11-17T10:00:00Z", + "id": "submit_btn", + "pid": "root", + "n": "submit_btn", + "lb": "提交按钮", + "stl": { + "itemw": 4, + "itemh": 50, + "labelw": 180 + }, + "evs": [ + { + "en": "OnClick", + "eht": 10, + "edat": 10 + } + ], + "valrules": [], + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "button", + "ct": 1, + "frag": { + "t": "AntDesign.Button, AntDesign", + "valt": "System.String", + "attrs": [ + { + "attrn": "Text", + "attrt": "System.String" + }, + { + "attrn": "Type", + "attrt": "System.String" + } + ] + }, + "ds": {}, + "attrdefgroups": [ + { + "gn": "基础属性", + "attrdefs": [ + { + "disn": "按钮文字", + "pt": 1, + "desc": "按钮显示的文本内容", + "dftval": "按钮", + "attrn": "Text", + "attrt": "System.String", + "attrv": "重置" + }, + { + "disn": "按钮类型", + "pt": 3, + "desc": "按钮的样式类型", + "dftval": "default", + "attrn": "Type", + "attrt": "System.String", + "attrv": "default" + } + ] + } + ], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 70, + "pub": 1, + "mt": "2025-11-17T10:00:00Z", + "id": "reset_btn", + "pid": "root", + "n": "reset_btn", + "lb": "重置按钮", + "stl": { + "itemw": 4, + "itemh": 50, + "labelw": 180 + }, + "evs": [ + { + "en": "OnClick", + "eht": 10, + "edat": 20 + } + ], + "valrules": [], + "v": "0.0.1" + } + ], + "sptevs": [ + "OnLoad" + ], + "aid": "attendance", + "id": "t7g1bfcyt", + "n": "请假申请", + "order": 3, + "pt": 1, + "pageprop": { + "playout": 2, + "ds": { + "dst": 1 + } + }, + "ds": { + "dsgt": 1, + "dst": 1, + "dsid": "leave_request", + "dsn": "请假申请", + "dsv": "tb_leave_request" + }, + "mt": "2025-11-23T10:51:59.3503316Z" +} \ No newline at end of file diff --git a/meta/apps/caseapp/caseapp.json b/meta/apps/caseapp/caseapp.json index ce6c8b47afb13245a247302210b6995292b47b7a..a6ebe6e8c83084ab9326ce75067bdd71a907cd32 100644 --- a/meta/apps/caseapp/caseapp.json +++ b/meta/apps/caseapp/caseapp.json @@ -1 +1 @@ -{"id":"caseapp","n":"用例系统","desc":"展示典型页面案例 (参考 amis 示例)","platform":[0,2],"mt":"2025-05-29T16:49:31.1628431Z"} \ No newline at end of file +{"id":"caseapp","n":"用例系统","desc":"展示典型页面案例 (参考 amis 示例)","platform":[0,2],"mt":"2025-11-01T05:00:46.7528722Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/datasource/iumn5yg5t.json b/meta/apps/caseapp/datasource/iumn5yg5t.json index a661fd0cfd2cb9b2d1c7d3281609e9806b496c2e..bfe7ef296775a0ae35b134387acc3876c22803ef 100644 --- a/meta/apps/caseapp/datasource/iumn5yg5t.json +++ b/meta/apps/caseapp/datasource/iumn5yg5t.json @@ -14,6 +14,6 @@ "hds": [] }, "ops": [], - "createdTime": "0001-01-01T00:00:00", - "modifiedTime": "2024-10-04T03:53:44.4086661Z" + "ct": "0001-01-01T00:00:00", + "mt": "2024-10-04T03:53:44.4086661Z" } \ No newline at end of file diff --git a/meta/apps/caseapp/datasource/qgzhc7w3z.json b/meta/apps/caseapp/datasource/qgzhc7w3z.json index 792405992935a4ea05f73dddca676f9fd3eaf3dc..8134e71b6587eef83018b98e679ff3c96536fff9 100644 --- a/meta/apps/caseapp/datasource/qgzhc7w3z.json +++ b/meta/apps/caseapp/datasource/qgzhc7w3z.json @@ -1 +1 @@ -{"aid":"caseapp","id":"qgzhc7w3z","n":"tb_test1","disn":"测试表1","desc":"xxx","type":1,"fields":[{"id":"9080f5b9-b155-4aa2-82d9-dc7a20192c06","n":"f_id","disn":"主键","type":"varchar","pk":true},{"id":"b4c09312-7267-45fc-94c1-15f893d0f5ea","n":"f_field1","disn":"字段1","type":"varchar","nul":true},{"id":"06f744b7-426a-41db-97a9-9edabca0424a","n":"f_field2","disn":"字段2","type":"int"},{"id":"5453147d-e0ed-422d-8dfd-bbaa8f979b65","n":"f_field3","disn":"字段3","type":"varchar"},{"id":"9f1b952a-d3a6-4739-bd8d-50f0462c717a","n":"f_field4","disn":"字段4","type":"bool"},{"id":"f995d0d4-951c-494d-acdb-aa794af12241","n":"f_field5","disn":"字段5","type":"int","nul":true},{"id":"fee2bf95-6a87-4a63-980d-b8986cbb2421","n":"f_field6","disn":"字段6","type":"varchar","nul":true},{"id":"c01c1d58-8adf-459a-9f28-316d19801b15","n":"f_field7","disn":"字段7","type":"varchar","nul":true},{"id":"ae6b8dee-2f4c-49d4-b65c-cfefbc361965","n":"f_field8","disn":"字段8","type":"varchar[]","nul":true},{"id":"5eb457fa-075f-4fbc-8609-f31a67d85bd9","n":"f_field9","disn":"字段9","type":"bool","nul":true},{"id":"06c9f63e-2aec-4320-a321-aceffa2accba","n":"f_field10","disn":"字段10","type":"datetime","nul":true},{"id":"1ddd77a8-c719-4289-a6e7-e00934dcc711","n":"f_field11","disn":"字段11","type":"varchar","nul":true},{"id":"e2fa36d6-4b5a-49de-993d-4ac75b673c0c","n":"f_field12","disn":"字段12","type":"varchar","nul":true},{"id":"rvgsbgsyi","n":"f_field13","disn":"字段13","type":"datetime","nul":true}],"ops":[],"modifiedTime":"2025-03-23T10:17:51.3553924Z"} \ No newline at end of file +{"aid":"caseapp","id":"qgzhc7w3z","n":"tb_test1","disn":"测试表1","desc":"xxx","type":1,"fields":[{"id":"9080f5b9-b155-4aa2-82d9-dc7a20192c06","n":"f_id","disn":"主键","type":"varchar","pk":true},{"id":"b4c09312-7267-45fc-94c1-15f893d0f5ea","n":"f_field1","disn":"字段1","type":"varchar","nul":true},{"id":"06f744b7-426a-41db-97a9-9edabca0424a","n":"f_field2","disn":"字段2","type":"int"},{"id":"5453147d-e0ed-422d-8dfd-bbaa8f979b65","n":"f_field3","disn":"字段3","type":"varchar"},{"id":"9f1b952a-d3a6-4739-bd8d-50f0462c717a","n":"f_field4","disn":"字段4","type":"bool"},{"id":"f995d0d4-951c-494d-acdb-aa794af12241","n":"f_field5","disn":"字段5","type":"int","nul":true},{"id":"fee2bf95-6a87-4a63-980d-b8986cbb2421","n":"f_field6","disn":"字段6","type":"varchar","nul":true},{"id":"c01c1d58-8adf-459a-9f28-316d19801b15","n":"f_field7","disn":"字段7","type":"varchar","nul":true},{"id":"ae6b8dee-2f4c-49d4-b65c-cfefbc361965","n":"f_field8","disn":"字段8","type":"varchar[]","nul":true},{"id":"5eb457fa-075f-4fbc-8609-f31a67d85bd9","n":"f_field9","disn":"字段9","type":"bool","nul":true},{"id":"06c9f63e-2aec-4320-a321-aceffa2accba","n":"f_field10","disn":"字段10","type":"datetime","nul":true},{"id":"1ddd77a8-c719-4289-a6e7-e00934dcc711","n":"f_field11","disn":"字段11","type":"varchar","nul":true},{"id":"e2fa36d6-4b5a-49de-993d-4ac75b673c0c","n":"f_field12","disn":"字段12","type":"varchar","nul":true},{"id":"rvgsbgsyi","n":"f_field13","disn":"字段13","type":"datetime","nul":true}],"ops":[],"mt":"2025-03-23T10:17:51.3553924Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/datasource/rsdjkqjz.json b/meta/apps/caseapp/datasource/rsdjkqjz.json index c5e033aea919ffefa9cba5950a8f8ab5de09b0b5..2e52b18eae6de99d7d5f705822bde08101610f2e 100644 --- a/meta/apps/caseapp/datasource/rsdjkqjz.json +++ b/meta/apps/caseapp/datasource/rsdjkqjz.json @@ -1 +1 @@ -{"aid":"caseapp","id":"rsdjkqjz","n":"tb_test2","disn":"测试表2","desc":"xxx2","order":0,"type":1,"pub":false,"fields":[{"id":"30d2e5e3-1d3c-4ea5-9cbf-a1a53e9ef911","n":"f_id","disn":"主键","type":"char(36)","pk":true,"nul":true,"unique":false},{"id":"a60c0703-1ded-42de-a78d-b4a45ce8b2f8","n":"f_field1","disn":"字段1","type":"varchar(50)","pk":false,"nul":true,"unique":false},{"id":"470bf63a-312f-411c-a082-6fb377aca533","n":"f_field2","disn":"字段2","type":"varchar(200)","pk":false,"nul":true,"unique":false},{"id":"61d5566d-0b37-4573-924e-5a0692a70ca6","n":"f_field3","disn":"字段3","type":"bit","pk":false,"nul":true,"unique":false}],"ops":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-10-04T04:22:27.9791098Z"} \ No newline at end of file +{"aid":"caseapp","id":"rsdjkqjz","n":"tb_test2","disn":"测试表2","desc":"xxx2","order":0,"type":1,"pub":false,"fields":[{"id":"30d2e5e3-1d3c-4ea5-9cbf-a1a53e9ef911","n":"f_id","disn":"主键","type":"char(36)","pk":true,"nul":true,"unique":false},{"id":"a60c0703-1ded-42de-a78d-b4a45ce8b2f8","n":"f_field1","disn":"字段1","type":"varchar(50)","pk":false,"nul":true,"unique":false},{"id":"470bf63a-312f-411c-a082-6fb377aca533","n":"f_field2","disn":"字段2","type":"varchar(200)","pk":false,"nul":true,"unique":false},{"id":"61d5566d-0b37-4573-924e-5a0692a70ca6","n":"f_field3","disn":"字段3","type":"bit","pk":false,"nul":true,"unique":false}],"ops":[],"ct":"0001-01-01T00:00:00","mt":"2024-10-04T04:22:27.9791098Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/datasource/s4sd6rvm.json b/meta/apps/caseapp/datasource/s4sd6rvm.json index f3edb270bd178bee0ba7c163b96a0635b3a37975..c4f7aec63ab309dcb97a34c05a9e700144f7cdb5 100644 --- a/meta/apps/caseapp/datasource/s4sd6rvm.json +++ b/meta/apps/caseapp/datasource/s4sd6rvm.json @@ -1 +1 @@ -{"aid":"caseapp","id":"s4sd6rvm","n":"tb_test3","disn":"测试表3","order":0,"type":1,"pubstatus":false,"fields":[{"id":"08d2c443-a47c-4c78-9ddc-d230dc148e30","n":"f_id","disn":"主键","type":"char(36)","pk":true,"nul":true,"unique":false},{"id":"a6677fda-3eca-47da-9389-19cb79a12237","n":"f_field1","disn":"列11","type":"varchar(20)","pk":false,"nul":true,"unique":false}],"ops":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-10-13T11:22:41.2074328Z"} \ No newline at end of file +{"aid":"caseapp","id":"s4sd6rvm","n":"tb_test3","disn":"测试表3","order":0,"type":1,"pubstatus":false,"fields":[{"id":"08d2c443-a47c-4c78-9ddc-d230dc148e30","n":"f_id","disn":"主键","type":"char(36)","pk":true,"nul":true,"unique":false},{"id":"a6677fda-3eca-47da-9389-19cb79a12237","n":"f_field1","disn":"列11","type":"varchar(20)","pk":false,"nul":true,"unique":false}],"ops":[],"ct":"0001-01-01T00:00:00","mt":"2024-10-13T11:22:41.2074328Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/5omcgxevf.json b/meta/apps/caseapp/menu/5omcgxevf.json index 4659829cad727161d0cbe506257a8d33907550d1..77a020bf574e84476493de9482e34a07bc3aac92 100644 --- a/meta/apps/caseapp/menu/5omcgxevf.json +++ b/meta/apps/caseapp/menu/5omcgxevf.json @@ -8,6 +8,6 @@ "path": "gndz2vecz", "order": 5, "childs": [], - "createdTime": "0001-01-01T00:00:00", - "modifiedTime": "2024-09-03T12:33:54.6558904Z" + "ct": "0001-01-01T00:00:00", + "mt": "2024-09-03T12:33:54.6558904Z" } \ No newline at end of file diff --git a/meta/apps/caseapp/menu/atp4qtco.json b/meta/apps/caseapp/menu/atp4qtco.json index 5df01151ce8327e6161d83d540ef57a1a4eb54e4..72371bb0640a133663089954a905786a1f448669 100644 --- a/meta/apps/caseapp/menu/atp4qtco.json +++ b/meta/apps/caseapp/menu/atp4qtco.json @@ -1 +1 @@ -{"aid":"caseapp","id":"atp4qtco","pid":"ylt35zso","t":"表头分组列表","type":0,"icon":"home","path":"7qa2yetz","order":4,"childs":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-06T17:24:44.3570099Z"} \ No newline at end of file +{"aid":"caseapp","id":"atp4qtco","pid":"ylt35zso","t":"表头分组列表","type":0,"icon":"home","path":"7qa2yetz","order":4,"childs":[],"ct":"0001-01-01T00:00:00","mt":"2024-09-06T17:24:44.3570099Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/bg8od2ni.json b/meta/apps/caseapp/menu/bg8od2ni.json index af3eea50ff9a40d77d7564c62cfcc425f9c09a5f..ac9cc23ccbd29b4bdb37a748399951baec52e69d 100644 --- a/meta/apps/caseapp/menu/bg8od2ni.json +++ b/meta/apps/caseapp/menu/bg8od2ni.json @@ -1 +1 @@ -{"aid":"caseapp","id":"bg8od2ni","pid":"nty4afb4","t":"文本编辑器","type":0,"icon":"home","path":"rlswps5","order":1,"childs":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-03T12:41:06.0951007Z"} \ No newline at end of file +{"aid":"caseapp","id":"bg8od2ni","pid":"nty4afb4","t":"文本编辑器","type":0,"icon":"home","path":"rlswps5","order":1,"childs":[],"ct":"0001-01-01T00:00:00","mt":"2024-09-03T12:41:06.0951007Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/bu27d1nch.json b/meta/apps/caseapp/menu/bu27d1nch.json index 395fdf43125b100ffa7c5c2a3f446b239042bb16..78cf2f47312deca3de8c6e66e248cbe271ddd141 100644 --- a/meta/apps/caseapp/menu/bu27d1nch.json +++ b/meta/apps/caseapp/menu/bu27d1nch.json @@ -1 +1 @@ -{"aid":"caseapp","id":"bu27d1nch","pid":"i7ftaaue","t":"表格样式表单","type":0,"icon":"home","path":"xjvks1d3f","order":9,"childs":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-03T12:34:52.0137917Z"} \ No newline at end of file +{"aid":"caseapp","id":"bu27d1nch","pid":"i7ftaaue","t":"表格样式表单","type":0,"icon":"home","path":"xjvks1d3f","order":9,"childs":[],"ct":"0001-01-01T00:00:00","mt":"2024-09-03T12:34:52.0137917Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/bzowg2n5.json b/meta/apps/caseapp/menu/bzowg2n5.json index f1aaef0334115184dfc6ddb99dae8f8101539bda..9bff912e0c12ea8588406fe78506743ff9331b47 100644 --- a/meta/apps/caseapp/menu/bzowg2n5.json +++ b/meta/apps/caseapp/menu/bzowg2n5.json @@ -1 +1 @@ -{"aid":"caseapp","id":"bzowg2n5","pid":"ylt35zso","t":"左右布局列表","type":0,"icon":"home","path":"4tnfvebp1","order":3,"childs":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-03T12:36:46.1652778Z"} \ No newline at end of file +{"aid":"caseapp","id":"bzowg2n5","pid":"ylt35zso","t":"左右布局列表","type":0,"icon":"home","path":"4tnfvebp1","order":3,"childs":[],"ct":"0001-01-01T00:00:00","mt":"2024-09-03T12:36:46.1652778Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/ckcbee4w.json b/meta/apps/caseapp/menu/ckcbee4w.json index 2659b336c663d51f47b6ea79f5b25523648b0987..bee2d68232b59285a256bdabb0728ae9ccdbf25f 100644 --- a/meta/apps/caseapp/menu/ckcbee4w.json +++ b/meta/apps/caseapp/menu/ckcbee4w.json @@ -1 +1 @@ -{"aid":"caseapp","id":"ckcbee4w","pid":"ylt35zso","t":"卡片列表","type":0,"icon":"home","path":"xovrp6nz","order":5,"childs":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-06T17:25:10.57999Z"} \ No newline at end of file +{"aid":"caseapp","id":"ckcbee4w","pid":"ylt35zso","t":"卡片列表","type":0,"icon":"home","path":"xovrp6nz","order":5,"childs":[],"ct":"0001-01-01T00:00:00","mt":"2024-09-06T17:25:10.57999Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/eh02qoa2.json b/meta/apps/caseapp/menu/eh02qoa2.json index c4c3468f5605a0e8a0736e5c1077fe69c40f40bd..aef9050962fa5a39a5c9da38b250549f5f575778 100644 --- a/meta/apps/caseapp/menu/eh02qoa2.json +++ b/meta/apps/caseapp/menu/eh02qoa2.json @@ -1 +1 @@ -{"aid":"caseapp","id":"eh02qoa2","pid":"haqpjbqqn","t":"监控页","type":0,"icon":"home","path":"uwz9o94b0","order":2,"childs":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-03T14:08:50.2869048Z"} \ No newline at end of file +{"aid":"caseapp","id":"eh02qoa2","pid":"haqpjbqqn","t":"监控页","type":0,"icon":"home","path":"uwz9o94b0","order":2,"childs":[],"ct":"0001-01-01T00:00:00","mt":"2024-09-03T14:08:50.2869048Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/elw05oex.json b/meta/apps/caseapp/menu/elw05oex.json index 0d6b4ace4d3469b5573f7b6d7b0e615bbede7b96..c02322b171688a94f96b2b356d2fcb585aef4b8b 100644 --- a/meta/apps/caseapp/menu/elw05oex.json +++ b/meta/apps/caseapp/menu/elw05oex.json @@ -1 +1 @@ -{"aid":"caseapp","id":"elw05oex","pid":"i7ftaaue","t":"校验表单","icon":"home","path":"pl3juvaok","order":3,"childs":[],"modifiedTime":"2025-05-24T04:18:32.0002267Z"} \ No newline at end of file +{"aid":"caseapp","id":"elw05oex","pid":"i7ftaaue","t":"校验表单","icon":"home","path":"pl3juvaok","order":3,"childs":[],"mt":"2025-05-24T04:18:32.0002267Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/g0nzkegz.json b/meta/apps/caseapp/menu/g0nzkegz.json index 39f01e5e63cc1e920ae2e0cdca857f2d21806f97..7fa27f80b55a067bbc318639141b3985540b2dbb 100644 --- a/meta/apps/caseapp/menu/g0nzkegz.json +++ b/meta/apps/caseapp/menu/g0nzkegz.json @@ -1 +1 @@ -{"aid":"caseapp","id":"g0nzkegz","pid":"nty4afb4","t":"地图","type":0,"icon":"home","path":"0lgu6xpop","order":3,"childs":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-03T12:42:14.1511219Z"} \ No newline at end of file +{"aid":"caseapp","id":"g0nzkegz","pid":"nty4afb4","t":"地图","type":0,"icon":"home","path":"0lgu6xpop","order":3,"childs":[],"ct":"0001-01-01T00:00:00","mt":"2024-09-03T12:42:14.1511219Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/haqpjbqqn.json b/meta/apps/caseapp/menu/haqpjbqqn.json index a1057aeaba2125b7ad86c27c1d3abf56980f07ee..1df6ba3365ec501d757a3d57843e6fea9d47d4ed 100644 --- a/meta/apps/caseapp/menu/haqpjbqqn.json +++ b/meta/apps/caseapp/menu/haqpjbqqn.json @@ -1 +1 @@ -{"aid":"caseapp","id":"haqpjbqqn","pid":"","t":"公共页","type":1,"icon":"home","order":3,"childs":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-07T08:59:34.3351671Z"} \ No newline at end of file +{"aid":"caseapp","id":"haqpjbqqn","pid":"","t":"公共页","type":1,"icon":"home","order":3,"childs":[],"ct":"0001-01-01T00:00:00","mt":"2024-09-07T08:59:34.3351671Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/i7ftaaue.json b/meta/apps/caseapp/menu/i7ftaaue.json index 3fe3d49a80e6692280ca7493037179fa181e3b90..7ffe244759b164742f62c69ed76efdb6f9991238 100644 --- a/meta/apps/caseapp/menu/i7ftaaue.json +++ b/meta/apps/caseapp/menu/i7ftaaue.json @@ -1 +1 @@ -{"aid":"caseapp","id":"i7ftaaue","pid":"","t":"表单页","type":1,"icon":"home","order":1,"childs":[],"modifiedTime":"2025-04-03T02:13:24.4010249Z"} \ No newline at end of file +{"aid":"caseapp","id":"i7ftaaue","pid":"","t":"表单页","type":1,"icon":"home","order":1,"childs":[],"mt":"2025-04-03T02:13:24.4010249Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/jhx1bvst.json b/meta/apps/caseapp/menu/jhx1bvst.json index 18b441c9689bae5a72c5104d116514178e303816..648a213e58fbe54a816cdd3d671d24a21bf97caa 100644 --- a/meta/apps/caseapp/menu/jhx1bvst.json +++ b/meta/apps/caseapp/menu/jhx1bvst.json @@ -1 +1 @@ -{"aid":"caseapp","id":"jhx1bvst","pid":"haqpjbqqn","t":"工作台","type":0,"icon":"home","path":"ymb3bsw","order":3,"childs":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-03T14:09:13.3123639Z"} \ No newline at end of file +{"aid":"caseapp","id":"jhx1bvst","pid":"haqpjbqqn","t":"工作台","type":0,"icon":"home","path":"ymb3bsw","order":3,"childs":[],"ct":"0001-01-01T00:00:00","mt":"2024-09-03T14:09:13.3123639Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/jyxsvsne.json b/meta/apps/caseapp/menu/jyxsvsne.json index 5ebd894736616d3a754634d04a4553ab85cae095..b2e8199d1dfc0373771881720a026633894b06e5 100644 --- a/meta/apps/caseapp/menu/jyxsvsne.json +++ b/meta/apps/caseapp/menu/jyxsvsne.json @@ -1 +1 @@ -{"aid":"caseapp","id":"jyxsvsne","pid":"i7ftaaue","t":"基础表单","icon":"home","path":"fhumgxyk","order":1,"childs":[],"modifiedTime":"2025-05-24T04:18:50.2970104Z"} \ No newline at end of file +{"aid":"caseapp","id":"jyxsvsne","pid":"i7ftaaue","t":"基础表单","icon":"home","path":"fhumgxyk","order":1,"childs":[],"mt":"2025-05-24T04:18:50.2970104Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/kxfyxvds.json b/meta/apps/caseapp/menu/kxfyxvds.json index 4513f435544e00c99e2a9f1c2c54fc624a5bb3f8..0d2687a443f484bacaa41766cc267ed4b5d0ae65 100644 --- a/meta/apps/caseapp/menu/kxfyxvds.json +++ b/meta/apps/caseapp/menu/kxfyxvds.json @@ -1 +1 @@ -{"aid":"caseapp","id":"kxfyxvds","pid":"i7ftaaue","t":"页面分栏表单","type":0,"icon":"home","path":"5kicsevr","order":8,"childs":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-03T12:34:27.5051983Z"} \ No newline at end of file +{"aid":"caseapp","id":"kxfyxvds","pid":"i7ftaaue","t":"页面分栏表单","type":0,"icon":"home","path":"5kicsevr","order":8,"childs":[],"ct":"0001-01-01T00:00:00","mt":"2024-09-03T12:34:27.5051983Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/lamkwel7.json b/meta/apps/caseapp/menu/lamkwel7.json index f845bf75ca34b0dc76118e53a6b658cf2855143d..fa8c736fed524c83ae01086198d83e081b65499c 100644 --- a/meta/apps/caseapp/menu/lamkwel7.json +++ b/meta/apps/caseapp/menu/lamkwel7.json @@ -8,6 +8,6 @@ "path": "g0qcqxzd", "order": 1, "childs": [], - "createdTime": "0001-01-01T00:00:00", - "modifiedTime": "2024-09-03T12:35:34.8294423Z" + "ct": "0001-01-01T00:00:00", + "mt": "2024-09-03T12:35:34.8294423Z" } \ No newline at end of file diff --git a/meta/apps/caseapp/menu/lbkmkoelq.json b/meta/apps/caseapp/menu/lbkmkoelq.json index a32beb2ec01b6286cb1fd2a45a2f07cfaa67e8c4..80217fc624fabd635bca174bafdf73f4a90bc24a 100644 --- a/meta/apps/caseapp/menu/lbkmkoelq.json +++ b/meta/apps/caseapp/menu/lbkmkoelq.json @@ -1 +1 @@ -{"aid":"caseapp","id":"lbkmkoelq","pid":"haqpjbqqn","t":"分析页","type":0,"icon":"home","path":"sf1duor2x","order":1,"childs":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-03T14:08:28.3299035Z"} \ No newline at end of file +{"aid":"caseapp","id":"lbkmkoelq","pid":"haqpjbqqn","t":"分析页","type":0,"icon":"home","path":"sf1duor2x","order":1,"childs":[],"ct":"0001-01-01T00:00:00","mt":"2024-09-03T14:08:28.3299035Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/nty4afb4.json b/meta/apps/caseapp/menu/nty4afb4.json index 128071e1e62296be75b6951dc00475e447cc3e6e..29f60428de80fa54031f151c1f0ab7fc735bf1fd 100644 --- a/meta/apps/caseapp/menu/nty4afb4.json +++ b/meta/apps/caseapp/menu/nty4afb4.json @@ -1 +1 @@ -{"aid":"caseapp","id":"nty4afb4","pid":"","t":"其他页","type":1,"icon":"home","order":9,"childs":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-03T14:07:59.9757475Z"} \ No newline at end of file +{"aid":"caseapp","id":"nty4afb4","pid":"","t":"其他页","type":1,"icon":"home","order":9,"childs":[],"ct":"0001-01-01T00:00:00","mt":"2024-09-03T14:07:59.9757475Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/uxf9ol4ux.json b/meta/apps/caseapp/menu/uxf9ol4ux.json index 970501795f99093183a2896a34927f165044dba7..71a271db00b76130da8f7e4d254aad3c7b004084 100644 --- a/meta/apps/caseapp/menu/uxf9ol4ux.json +++ b/meta/apps/caseapp/menu/uxf9ol4ux.json @@ -1 +1 @@ -{"aid":"caseapp","id":"uxf9ol4ux","pid":"nty4afb4","t":"代码编辑器","type":0,"icon":"home","path":"85oldiqok","order":2,"childs":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-03T12:41:27.9564968Z"} \ No newline at end of file +{"aid":"caseapp","id":"uxf9ol4ux","pid":"nty4afb4","t":"代码编辑器","type":0,"icon":"home","path":"85oldiqok","order":2,"childs":[],"ct":"0001-01-01T00:00:00","mt":"2024-09-03T12:41:27.9564968Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/uza6w4xk.json b/meta/apps/caseapp/menu/uza6w4xk.json index 4c0f4ccb3ab5dc9240a0d047572a3e2d8e9a6b21..43002a37d7998ae96b4bf875522201b0d5803b9d 100644 --- a/meta/apps/caseapp/menu/uza6w4xk.json +++ b/meta/apps/caseapp/menu/uza6w4xk.json @@ -1 +1 @@ -{"aid":"caseapp","id":"uza6w4xk","pid":"i7ftaaue","t":"分组表单","type":0,"icon":"home","path":"2qme5ln5e","order":4,"childs":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-03T12:33:31.4069177Z"} \ No newline at end of file +{"aid":"caseapp","id":"uza6w4xk","pid":"i7ftaaue","t":"分组表单","type":0,"icon":"home","path":"2qme5ln5e","order":4,"childs":[],"ct":"0001-01-01T00:00:00","mt":"2024-09-03T12:33:31.4069177Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/xjr5i6et.json b/meta/apps/caseapp/menu/xjr5i6et.json index 19fed55878c856e3fc2dfc732b31ddf282dcc468..052c39c48519268c073b34dc1d0078b2ee62108d 100644 --- a/meta/apps/caseapp/menu/xjr5i6et.json +++ b/meta/apps/caseapp/menu/xjr5i6et.json @@ -1 +1 @@ -{"aid":"caseapp","id":"xjr5i6et","pid":"i7ftaaue","t":"主从表单","type":0,"icon":"home","path":"2qceiqni","order":10,"childs":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-03T12:35:13.4550488Z"} \ No newline at end of file +{"aid":"caseapp","id":"xjr5i6et","pid":"i7ftaaue","t":"主从表单","type":0,"icon":"home","path":"2qceiqni","order":10,"childs":[],"ct":"0001-01-01T00:00:00","mt":"2024-09-03T12:35:13.4550488Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/xzk8d3pv.json b/meta/apps/caseapp/menu/xzk8d3pv.json index 1662ae8aaac0ab7087d50d6334390a91d6989f59..d23a2c669c4f8f3ae0fdb41eb432f162f220fd58 100644 --- a/meta/apps/caseapp/menu/xzk8d3pv.json +++ b/meta/apps/caseapp/menu/xzk8d3pv.json @@ -1 +1 @@ -{"aid":"caseapp","id":"xzk8d3pv","pid":"ylt35zso","t":"查询列表","type":0,"icon":"home","path":"huf12sk","order":2,"childs":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-06T17:24:11.2682942Z"} \ No newline at end of file +{"aid":"caseapp","id":"xzk8d3pv","pid":"ylt35zso","t":"查询列表","type":0,"icon":"home","path":"huf12sk","order":2,"childs":[],"ct":"0001-01-01T00:00:00","mt":"2024-09-06T17:24:11.2682942Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/menu/ylt35zso.json b/meta/apps/caseapp/menu/ylt35zso.json index 4dffea3bb3b4514fe8a3a70cf59922f671f26453..b25c0cc9578e3f0f95a6bcbb22ed095595bb08bb 100644 --- a/meta/apps/caseapp/menu/ylt35zso.json +++ b/meta/apps/caseapp/menu/ylt35zso.json @@ -1 +1 @@ -{"aid":"caseapp","id":"ylt35zso","pid":"","t":"列表页","type":1,"icon":"home","order":2,"childs":[],"modifiedTime":"2025-04-03T02:13:32.3676665Z"} \ No newline at end of file +{"aid":"caseapp","id":"ylt35zso","pid":"","t":"列表页","type":1,"icon":"home","order":2,"childs":[],"mt":"2025-04-03T02:13:32.3676665Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/page/0lgu6xpop.json b/meta/apps/caseapp/page/0lgu6xpop.json index 1da94c6af0a7d11d787e5fd9cd23fb6e14a74bb6..11a2a0e60c4472036f0a0add69ce9c2603dc383f 100644 --- a/meta/apps/caseapp/page/0lgu6xpop.json +++ b/meta/apps/caseapp/page/0lgu6xpop.json @@ -1 +1 @@ -{"aid":"caseapp","id":"0lgu6xpop","n":"地图","order":82,"pt":0,"pub":0,"comps":[],"pageprop":{"playout":2},"ds":{"type":0,"fields":[],"options":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"0001-01-01T00:00:00"},"i18n":{},"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-12T13:28:30.4945123Z"} \ No newline at end of file +{"aid":"caseapp","id":"0lgu6xpop","n":"地图","order":82,"pt":0,"pub":0,"comps":[],"pageprop":{"playout":2},"ds":{"type":0,"fields":[],"options":[],"ct":"0001-01-01T00:00:00","mt":"0001-01-01T00:00:00"},"i18n":{},"ct":"0001-01-01T00:00:00","mt":"2024-09-12T13:28:30.4945123Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/page/2qme5ln5e.json b/meta/apps/caseapp/page/2qme5ln5e.json index 3a1d3f6596ae249f068c3cdf75188010de6e6f8c..a4f919b8108ef4b17f77533172417f79ea89193a 100644 --- a/meta/apps/caseapp/page/2qme5ln5e.json +++ b/meta/apps/caseapp/page/2qme5ln5e.json @@ -1,7 +1,7 @@ { "comps": [ { - "compid": "fmiwu412", + "compid": "card", "libid": "antdesign", "cn": "Card", "ct": 1, @@ -28,7 +28,7 @@ ], "childs": [ { - "compid": "52391a70", + "compid": "input", "libid": "antdesign", "cn": "Input", "ct": 1, @@ -79,7 +79,7 @@ "ev": {} }, { - "compid": "52391a70", + "compid": "input", "libid": "antdesign", "cn": "Input", "ct": 1, @@ -130,7 +130,7 @@ "ev": {} }, { - "compid": "52391a70", + "compid": "input", "libid": "antdesign", "cn": "Input", "ct": 1, @@ -197,7 +197,7 @@ "ev": {} }, { - "compid": "fmiwu412", + "compid": "card", "libid": "antdesign", "cn": "Card", "ct": 1, @@ -224,7 +224,7 @@ ], "childs": [ { - "compid": "52391a70", + "compid": "input", "libid": "antdesign", "cn": "Input", "ct": 1, @@ -275,7 +275,7 @@ "ev": {} }, { - "compid": "52391a70", + "compid": "input", "libid": "antdesign", "cn": "Input", "ct": 1, @@ -326,7 +326,7 @@ "ev": {} }, { - "compid": "52391a70", + "compid": "input", "libid": "antdesign", "cn": "Input", "ct": 1, @@ -393,7 +393,7 @@ "ev": {} }, { - "compid": "fmiwu412", + "compid": "card", "libid": "antdesign", "cn": "Card", "ct": 1, @@ -420,7 +420,7 @@ ], "childs": [ { - "compid": "evuqdwzl", + "compid": "radio", "libid": "antdesign", "cn": "Radio", "ct": 1, @@ -468,7 +468,7 @@ "ev": {} }, { - "compid": "nwepem4i", + "compid": "switch", "libid": "antdesign", "cn": "Switch", "ct": 1, diff --git a/meta/apps/caseapp/page/4tnfvebp1.json b/meta/apps/caseapp/page/4tnfvebp1.json index 977a527abb8ee45a996415783bd3032d32545b3c..bb3026c9e0d9526c8c48a99ee571726f18f3f4e5 100644 --- a/meta/apps/caseapp/page/4tnfvebp1.json +++ b/meta/apps/caseapp/page/4tnfvebp1.json @@ -1 +1 @@ -{"comps":[],"aid":"caseapp","id":"4tnfvebp1","n":"左右布局列表","order":33,"pt":2,"pageprop":{"playout":2,"ds":{}},"ds":{},"modifiedTime":"2025-04-03T02:11:32.7965216Z"} \ No newline at end of file +{"comps":[],"aid":"caseapp","id":"4tnfvebp1","n":"左右布局列表","order":33,"pt":2,"pageprop":{"playout":2,"ds":{}},"ds":{},"mt":"2025-04-03T02:11:32.7965216Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/page/5kicsevr.json b/meta/apps/caseapp/page/5kicsevr.json index 1c79113559e99a25ab4fc2b8f51f4a593f06516d..46a6ee352f9455e60b8c3fbdd37da9c3317cae50 100644 --- a/meta/apps/caseapp/page/5kicsevr.json +++ b/meta/apps/caseapp/page/5kicsevr.json @@ -1,7 +1,7 @@ { "comps": [ { - "compid": "52391a70", + "compid": "input", "libid": "antdesign", "cn": "Input", "ct": 1, @@ -69,7 +69,7 @@ "desc": "用户姓名输入框" }, { - "compid": "52391a70", + "compid": "input", "libid": "antdesign", "cn": "Input", "ct": 1, @@ -137,7 +137,7 @@ "desc": "用户手机号输入框" }, { - "compid": "52391a70", + "compid": "input", "libid": "antdesign", "cn": "Input", "ct": 1, @@ -205,7 +205,7 @@ "desc": "用户邮箱输入框" }, { - "compid": "52391a70", + "compid": "input", "libid": "antdesign", "cn": "Input", "ct": 1, @@ -273,7 +273,7 @@ "desc": "用户公司输入框" }, { - "compid": "52391a70", + "compid": "input", "libid": "antdesign", "cn": "Input", "ct": 1, @@ -341,7 +341,7 @@ "desc": "用户职位输入框" }, { - "compid": "52391a70", + "compid": "input", "libid": "antdesign", "cn": "Input", "ct": 1, diff --git a/meta/apps/caseapp/page/7qa2yetz.json b/meta/apps/caseapp/page/7qa2yetz.json index b07809a814f8934196ff1af7ee9acbbabf0f7c8c..90bf7d6814143ae72061927b48ddddd677205daf 100644 --- a/meta/apps/caseapp/page/7qa2yetz.json +++ b/meta/apps/caseapp/page/7qa2yetz.json @@ -1 +1 @@ -{"comps":[],"aid":"caseapp","id":"7qa2yetz","n":"表头分组列表","order":34,"pt":2,"pageprop":{"playout":2,"ds":{}},"ds":{},"modifiedTime":"2025-04-03T02:11:39.2372899Z"} \ No newline at end of file +{"comps":[],"aid":"caseapp","id":"7qa2yetz","n":"表头分组列表","order":34,"pt":2,"pageprop":{"playout":2,"ds":{}},"ds":{},"mt":"2025-04-03T02:11:39.2372899Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/page/85oldiqok.json b/meta/apps/caseapp/page/85oldiqok.json index 6be7d66c5c69b4c6f90f78aeaf4f63d8e69483e9..874716310ba93899236a0a157796cc238b6ccf71 100644 --- a/meta/apps/caseapp/page/85oldiqok.json +++ b/meta/apps/caseapp/page/85oldiqok.json @@ -1 +1 @@ -{"aid":"caseapp","id":"85oldiqok","n":"代码编辑器","order":83,"pt":0,"pub":0,"comps":[],"pageprop":{"playout":2},"ds":{"type":0,"fields":[],"options":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"0001-01-01T00:00:00"},"i18n":{},"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-12T13:28:37.8746284Z"} \ No newline at end of file +{"aid":"caseapp","id":"85oldiqok","n":"代码编辑器","order":83,"pt":0,"pub":0,"comps":[],"pageprop":{"playout":2},"ds":{"type":0,"fields":[],"options":[],"ct":"0001-01-01T00:00:00","mt":"0001-01-01T00:00:00"},"i18n":{},"ct":"0001-01-01T00:00:00","mt":"2024-09-12T13:28:37.8746284Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/page/fhumgxyk.json b/meta/apps/caseapp/page/fhumgxyk.json index 7b64d102921d0a7a265143e41e91bea0aa9bf08d..0c93d7699571e862829e864b35130dba226293d2 100644 --- a/meta/apps/caseapp/page/fhumgxyk.json +++ b/meta/apps/caseapp/page/fhumgxyk.json @@ -1 +1,464 @@ -{"comps":[{"libid":"antdesign","compid":"52391a70","cn":"Input","ct":1,"frag":{"dt":"AntDesign.Input`1[System.String], AntDesign","t":"AntDesign.Input`1[System.String], AntDesign","childs":[],"valt":"System.String","attrs":[{"attrn":"TValue","attrt":"System.String"}]},"ds":{"dsgt":1},"attrdefgroups":[{"gn":"基础属性","attrdefs":[{"disn":"是否禁用","pt":6,"desc":"","dftval":false,"attrn":"Disabled","attrt":"System.Boolean","attrv":false},{"disn":"最大长度","pt":2,"desc":"字段输入的最大长度,为0时表示不限制长度","dftval":0,"attrn":"MaxLength","attrt":"System.Int32","attrv":20},{"disn":"输入提示","pt":1,"desc":"组件输入时的 Placeholder 提示","dftval":"","attrn":"Placeholder","attrt":"System.String","attrv":""}]}],"childs":[],"evdefs":[],"stydefs":[],"order":10,"pub":1,"mt":"2025-02-24T15:36:15.8037414Z","id":"0bd406f9","pid":"lyawwbh9f","n":"f_field1","lb":"输入框1","stl":{"itemw":4,"itemh":85,"labelw":180},"valrules":[{"id":"648ea2de-8c82-414b-b669-3b581ab9a11c","cid":"0bd406f9","type":1,"errmsg":"必填111","trigger":1,"enabled":true,"order":1}],"desc":"111","v":"0.0.1"},{"libid":"antdesign","compid":"52391a70","cn":"Input","ct":1,"frag":{"dt":"AntDesign.Input`1[System.String], AntDesign","t":"AntDesign.Input`1[System.String], AntDesign","childs":[],"valt":"System.String","attrs":[{"attrn":"TValue","attrt":"System.String"}]},"ds":{},"attrdefgroups":[{"gn":"基础属性","attrdefs":[{"disn":"是否禁用","pt":6,"desc":"","dftval":false,"attrn":"Disabled","attrt":"System.Boolean","attrv":true},{"disn":"最大长度","pt":2,"desc":"字段输入的最大长度,为0时表示不限制长度","dftval":0,"attrn":"MaxLength","attrt":"System.Int32","attrv":0},{"disn":"输入提示","pt":1,"desc":"组件输入时的 Placeholder 提示","dftval":"","attrn":"Placeholder","attrt":"System.String","attrv":"xxx"}]}],"childs":[],"evdefs":[],"stydefs":[],"order":10,"pub":1,"mt":"2025-02-24T15:36:15.8037414Z","id":"299f6803","pid":"lyawwbh9f","n":"f_field3","lb":"输入框2","stl":{"itemw":4,"itemh":85,"labelw":180},"valrules":[],"desc":"222","v":"0.0.1"},{"libid":"antdesign","compid":"evuqdwzl","cn":"Radio","ct":1,"frag":{"dt":"AntDesign.RadioGroup`1[System.String], AntDesign","t":"AntDesign.RadioGroup`1[System.String], AntDesign","childs":[],"valt":"System.String","attrs":[{"attrn":"TValue","attrt":"System.String"}]},"ds":{"dsfrag":{"t":"AntDesign.Radio`1[System.String], AntDesign","childs":[],"attrs":[{"attrn":"Value"}]},"dsgt":1,"dst":8,"fxopds":[{"l":"选项1","v":"op1"},{"l":"选项2","v":"op2"},{"l":"选项3","v":"op3"},{"l":"选项4","v":"op4"}]},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"order":13,"pub":1,"mt":"2025-03-01T02:58:56.1519656Z","id":"vjolyn1r","pid":"zkgldg5b","n":"f_field6","lb":"单选框3","sptds":true,"stl":{"itemw":4,"itemh":85,"labelw":180},"v":"0.0.1"},{"libid":"antdesign","compid":"vdcoqln1z","cn":"Checkbox","ct":1,"frag":{"dt":"AntDesign.CheckboxGroup`1[System.String], AntDesign","t":"AntDesign.CheckboxGroup`1[System.String], AntDesign","childs":[],"valt":"System.String[]","attrs":[]},"ds":{"dsfrag":{"t":"AntDesign.Checkbox, AntDesign","childs":[],"attrs":[{"attrn":"Label"}]},"dsgt":1,"dst":8,"fxopds":[{"l":"选项11","v":"ck1"},{"l":"选项22","v":"ck2"},{"l":"选项33","v":"字段8"}]},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"order":14,"pub":1,"mt":"2025-02-24T15:37:04.5563097Z","id":"4trfp5bk","pid":"zkgldg5b","n":"f_field8","lb":"复选框4","sptds":true,"stl":{"itemw":4,"itemh":85,"labelw":180},"v":"0.0.1"},{"libid":"antdesign","compid":"7bab5a19","cn":"DatePicker","ct":1,"frag":{"dt":"AntDesign.DatePicker`1[[System.Nullable`1[[System.DateTime]]]], AntDesign","t":"AntDesign.DatePicker`1[[System.Nullable`1[[System.DateTime]]]], AntDesign","childs":[],"valt":"System.Nullable`1[System.DateTime]","attrs":[]},"ds":{"dsgt":1},"attrdefgroups":[],"childs":[],"sptevs":["OnClick","OnExpand"],"evdefs":[],"stydefs":[],"order":15,"pub":1,"mt":"2025-02-24T15:59:32.6799272Z","id":"vdyv8q2ay","pid":"zkgldg5b","n":"f_field10","lb":"日期选择器5","stl":{"itemw":4,"itemh":85,"labelw":180},"v":"0.0.1"},{"libid":"antdesign","compid":"oikgmvkm","cn":"TimePicker","ct":1,"frag":{"dt":"AntDesign.TimePicker`1[[System.Nullable`1[[System.DateTime]]]], AntDesign","t":"AntDesign.TimePicker`1[[System.Nullable`1[[System.DateTime]]]], AntDesign","childs":[],"valt":"System.Nullable`1[System.DateTime]","attrs":[]},"ds":{},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"order":16,"pub":1,"mt":"2025-03-05T15:31:24.9654966Z","id":"itnmgtzg","pid":"zkgldg5b","n":"f_field13","lb":"时间选择器6","stl":{"itemw":4,"itemh":85,"labelw":180},"v":"0.0.1"},{"libid":"antdesign","compid":"5icgyefr","cn":"TextArea","ct":1,"frag":{"dt":"AntDesign.TextArea, AntDesign","t":"AntDesign.TextArea, AntDesign","childs":[],"valt":"System.String","attrs":[]},"ds":{"dsgt":1},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"order":12,"pub":1,"mt":"2025-02-24T15:36:40.7389762Z","id":"ibgtanur","pid":"ongkggvjy","n":"f_field7","lb":"文本框7","stl":{"itemw":4,"itemh":85,"labelw":180},"v":"0.0.1"},{"libid":"antdesign","compid":"9xulbbf5u","cn":"Select","ct":1,"frag":{"dt":"AntDesign.Select`2[[System.String],[System.String]], antdesign","t":"AntDesign.Select`2[[System.String],[System.String]], antdesign","childs":[],"valt":"System.String","attrs":[]},"ds":{},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"order":17,"pub":1,"mt":"2025-03-05T15:31:30.1523166Z","id":"c9acpmcp","pid":"ongkggvjy","n":"f_field11","lb":"选择器8","sptds":true,"stl":{"itemw":4,"itemh":85,"labelw":180},"v":"0.0.1"},{"libid":"antdesign","compid":"nwepem4i","cn":"Switch","ct":1,"frag":{"dt":"AntDesign.Switch, AntDesign","t":"AntDesign.Switch, AntDesign","childs":[],"valt":"System.Boolean","attrs":[]},"ds":{},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"order":19,"pub":1,"mt":"2025-03-05T15:31:40.4314786Z","id":"cgfb0e64","pid":"ongkggvjy","n":"f_field9","lb":"开关9","stl":{"itemw":4,"itemh":85,"labelw":180},"v":"0.0.1"}],"sptevs":["OnLoad"],"aid":"caseapp","id":"fhumgxyk","n":"基础表单","order":1,"pt":1,"pageprop":{"playout":3,"ds":{}},"ds":{"dst":1,"dsv":"tb_test1"},"mt":"2025-10-26T15:04:35.7776707Z"} \ No newline at end of file +{ + "comps": [ + { + "libid": "antdesign", + "compid": "input", + "cn": "Input", + "ct": 1, + "frag": { + "dt": "AntDesign.Input`1[System.String], AntDesign", + "t": "AntDesign.Input`1[System.String], AntDesign", + "childs": [], + "valt": "System.String", + "attrs": [ + { + "attrn": "TValue", + "attrt": "System.String" + } + ] + }, + "ds": { + "dsgt": 1 + }, + "attrdefgroups": [ + { + "gn": "基础属性", + "attrdefs": [ + { + "disn": "是否禁用", + "pt": 6, + "desc": "", + "dftval": false, + "attrn": "Disabled", + "attrt": "System.Boolean", + "attrv": false + }, + { + "disn": "最大长度", + "pt": 2, + "desc": "字段输入的最大长度,为0时表示不限制长度", + "dftval": 0, + "attrn": "MaxLength", + "attrt": "System.Int32", + "attrv": 20 + }, + { + "disn": "输入提示", + "pt": 1, + "desc": "组件输入时的 Placeholder 提示", + "dftval": "", + "attrn": "Placeholder", + "attrt": "System.String", + "attrv": "" + } + ] + } + ], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 10, + "pub": 1, + "mt": "2025-02-24T15:36:15.8037414Z", + "id": "0bd406f9", + "pid": "lyawwbh9f", + "n": "f_field1", + "lb": "输入框1", + "stl": { + "itemw": 4, + "itemh": 85, + "labelw": 180 + }, + "valrules": [ + { + "id": "648ea2de-8c82-414b-b669-3b581ab9a11c", + "cid": "0bd406f9", + "type": 1, + "errmsg": "必填111", + "trigger": 1, + "enabled": true, + "order": 1 + } + ], + "desc": "111", + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "input", + "cn": "Input", + "ct": 1, + "frag": { + "dt": "AntDesign.Input`1[System.String], AntDesign", + "t": "AntDesign.Input`1[System.String], AntDesign", + "childs": [], + "valt": "System.String", + "attrs": [ + { + "attrn": "TValue", + "attrt": "System.String" + } + ] + }, + "ds": {}, + "attrdefgroups": [ + { + "gn": "基础属性", + "attrdefs": [ + { + "disn": "是否禁用", + "pt": 6, + "desc": "", + "dftval": false, + "attrn": "Disabled", + "attrt": "System.Boolean", + "attrv": true + }, + { + "disn": "最大长度", + "pt": 2, + "desc": "字段输入的最大长度,为0时表示不限制长度", + "dftval": 0, + "attrn": "MaxLength", + "attrt": "System.Int32", + "attrv": 0 + }, + { + "disn": "输入提示", + "pt": 1, + "desc": "组件输入时的 Placeholder 提示", + "dftval": "", + "attrn": "Placeholder", + "attrt": "System.String", + "attrv": "xxx" + } + ] + } + ], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 10, + "pub": 1, + "mt": "2025-02-24T15:36:15.8037414Z", + "id": "299f6803", + "pid": "lyawwbh9f", + "n": "f_field3", + "lb": "输入框2", + "stl": { + "itemw": 4, + "itemh": 85, + "labelw": 180 + }, + "valrules": [], + "desc": "222", + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "radio", + "cn": "Radio", + "ct": 1, + "frag": { + "dt": "AntDesign.RadioGroup`1[System.String], AntDesign", + "t": "AntDesign.RadioGroup`1[System.String], AntDesign", + "childs": [], + "valt": "System.String", + "attrs": [ + { + "attrn": "TValue", + "attrt": "System.String" + } + ] + }, + "ds": { + "dsfrag": { + "t": "AntDesign.Radio`1[System.String], AntDesign", + "childs": [], + "attrs": [ + { + "attrn": "Value" + } + ] + }, + "dsgt": 1, + "dst": 8, + "fxopds": [ + { + "l": "选项1", + "v": "op1" + }, + { + "l": "选项2", + "v": "op2" + }, + { + "l": "选项3", + "v": "op3" + }, + { + "l": "选项4", + "v": "op4" + } + ] + }, + "attrdefgroups": [], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 13, + "pub": 1, + "mt": "2025-03-01T02:58:56.1519656Z", + "id": "vjolyn1r", + "pid": "zkgldg5b", + "n": "f_field6", + "lb": "单选框3", + "sptds": true, + "stl": { + "itemw": 4, + "itemh": 85, + "labelw": 180 + }, + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "checkbox", + "cn": "Checkbox", + "ct": 1, + "frag": { + "dt": "AntDesign.CheckboxGroup`1[System.String], AntDesign", + "t": "AntDesign.CheckboxGroup`1[System.String], AntDesign", + "childs": [], + "valt": "System.String[]", + "attrs": [] + }, + "ds": { + "dsfrag": { + "t": "AntDesign.Checkbox, AntDesign", + "childs": [], + "attrs": [ + { + "attrn": "Label" + } + ] + }, + "dsgt": 1, + "dst": 8, + "fxopds": [ + { + "l": "选项11", + "v": "ck1" + }, + { + "l": "选项22", + "v": "ck2" + }, + { + "l": "选项33", + "v": "字段8" + } + ] + }, + "attrdefgroups": [], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 14, + "pub": 1, + "mt": "2025-02-24T15:37:04.5563097Z", + "id": "4trfp5bk", + "pid": "zkgldg5b", + "n": "f_field8", + "lb": "复选框4", + "sptds": true, + "stl": { + "itemw": 4, + "itemh": 85, + "labelw": 180 + }, + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "datepicker", + "cn": "DatePicker", + "ct": 1, + "frag": { + "dt": "AntDesign.DatePicker`1[[System.Nullable`1[[System.DateTime]]]], AntDesign", + "t": "AntDesign.DatePicker`1[[System.Nullable`1[[System.DateTime]]]], AntDesign", + "childs": [], + "valt": "System.Nullable`1[System.DateTime]", + "attrs": [] + }, + "ds": { + "dsgt": 1 + }, + "attrdefgroups": [], + "childs": [], + "sptevs": [ + "OnClick", + "OnExpand" + ], + "evdefs": [], + "stydefs": [], + "order": 15, + "pub": 1, + "mt": "2025-02-24T15:59:32.6799272Z", + "id": "vdyv8q2ay", + "pid": "zkgldg5b", + "n": "f_field10", + "lb": "日期选择器5", + "stl": { + "itemw": 4, + "itemh": 85, + "labelw": 180 + }, + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "timepicker", + "cn": "TimePicker", + "ct": 1, + "frag": { + "dt": "AntDesign.TimePicker`1[[System.Nullable`1[[System.DateTime]]]], AntDesign", + "t": "AntDesign.TimePicker`1[[System.Nullable`1[[System.DateTime]]]], AntDesign", + "childs": [], + "valt": "System.Nullable`1[System.DateTime]", + "attrs": [] + }, + "ds": {}, + "attrdefgroups": [], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 16, + "pub": 1, + "mt": "2025-03-05T15:31:24.9654966Z", + "id": "itnmgtzg", + "pid": "zkgldg5b", + "n": "f_field13", + "lb": "时间选择器6", + "stl": { + "itemw": 4, + "itemh": 85, + "labelw": 180 + }, + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "textarea", + "cn": "TextArea", + "ct": 1, + "frag": { + "dt": "AntDesign.TextArea, AntDesign", + "t": "AntDesign.TextArea, AntDesign", + "childs": [], + "valt": "System.String", + "attrs": [] + }, + "ds": { + "dsgt": 1 + }, + "attrdefgroups": [], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 12, + "pub": 1, + "mt": "2025-02-24T15:36:40.7389762Z", + "id": "ibgtanur", + "pid": "ongkggvjy", + "n": "f_field7", + "lb": "文本框7", + "stl": { + "itemw": 4, + "itemh": 85, + "labelw": 180 + }, + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "select", + "cn": "Select", + "ct": 1, + "frag": { + "dt": "AntDesign.Select`2[[System.String],[System.String]], antdesign", + "t": "AntDesign.Select`2[[System.String],[System.String]], antdesign", + "childs": [], + "valt": "System.String", + "attrs": [] + }, + "ds": {}, + "attrdefgroups": [], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 17, + "pub": 1, + "mt": "2025-03-05T15:31:30.1523166Z", + "id": "c9acpmcp", + "pid": "ongkggvjy", + "n": "f_field11", + "lb": "选择器8", + "sptds": true, + "stl": { + "itemw": 4, + "itemh": 85, + "labelw": 180 + }, + "v": "0.0.1" + }, + { + "libid": "antdesign", + "compid": "switch", + "cn": "Switch", + "ct": 1, + "frag": { + "dt": "AntDesign.Switch, AntDesign", + "t": "AntDesign.Switch, AntDesign", + "childs": [], + "valt": "System.Boolean", + "attrs": [] + }, + "ds": {}, + "attrdefgroups": [], + "childs": [], + "evdefs": [], + "stydefs": [], + "order": 19, + "pub": 1, + "mt": "2025-03-05T15:31:40.4314786Z", + "id": "cgfb0e64", + "pid": "ongkggvjy", + "n": "f_field9", + "lb": "开关9", + "stl": { + "itemw": 4, + "itemh": 85, + "labelw": 180 + }, + "v": "0.0.1" + } + ], + "sptevs": [ + "OnLoad" + ], + "aid": "caseapp", + "id": "fhumgxyk", + "n": "基础表单", + "order": 1, + "pt": 1, + "pageprop": { + "playout": 3, + "ds": {} + }, + "ds": { + "dst": 1, + "dsv": "tb_test1" + }, + "mt": "2025-10-26T15:04:35.7776707Z" +} \ No newline at end of file diff --git a/meta/apps/caseapp/page/g0qcqxzd.json b/meta/apps/caseapp/page/g0qcqxzd.json index 357ab96acbdfb880f04c520283d5c08fd156bbcc..0eb98d4c68df4da92700078d30928d458409f6dc 100644 --- a/meta/apps/caseapp/page/g0qcqxzd.json +++ b/meta/apps/caseapp/page/g0qcqxzd.json @@ -1 +1,52 @@ -{"comps":[{"compid":"f2b54b4c","libid":"antdesign","cn":"Table","ct":1,"frag":{"dt":"H.LowCode.Components.Defaults.LcTable, H.LowCode.Components.Defaults","t":"H.LowCode.Components.Defaults.LcTable, H.LowCode.Components.Defaults","attrs":[]},"ds":{"dsgt":2,"dst":1,"dsid":"qgzhc7w3z","dsn":"tb_test1","dsv":"{\"tcols\":[{\"id\":\"i79talu1\",\"n\":\"f_field1\",\"t\":\"输入框1\"},{\"id\":\"vwvoqrn1s\",\"n\":\"f_field3\",\"t\":\"输入框2\"},{\"id\":\"ap0ceewr\",\"n\":\"f_field6\",\"t\":\"单选框3\"},{\"id\":\"ck9b6mez\",\"n\":\"Class\",\"t\":\"班级\"},{\"id\":\"es0qoauj\",\"n\":\"f_field10\",\"t\":\"日期选择5\"},{\"id\":\"t910chps\",\"n\":\"f_id\",\"t\":\"Id\",\"pk\":true}],\"searchs\":[],\"tbtns\":[{\"id\":\"wpnm70fe\",\"n\":\"create\",\"t\":\"新增\",\"bt\":1,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":10,\"etid\":\"fhumgxyk\",\"eta\":\"14\"}]},{\"id\":\"2qsecnfo\",\"n\":\"deleteSelections\",\"t\":\"删除选中\",\"sptevs\":[\"OnClick\"]}],\"rbtns\":[{\"id\":\"za8gxxdz\",\"n\":\"edit\",\"t\":\"编辑\",\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":10,\"etid\":\"fhumgxyk\",\"eta\":\"14\",\"eventArgs\":{\"param1\":\"111\"},\"rowparams\":{\"id\":\"f_id\"}}]},{\"id\":\"b17d3nrc\",\"n\":\"del\",\"t\":\"删除\",\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":40,\"edat\":20}]},{\"id\":\"vwrounbq\",\"n\":\"editRow\",\"t\":\"行内编辑\",\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":40,\"edat\":10}]}]}"},"attrdefgroups":[],"childs":[],"order":30,"pub":1,"mt":"2025-05-22T14:26:07.7475675Z","id":"fqmcwygx","pid":"nupedwmm3","n":"Table_926","lb":"表格-A","hlb":true,"sptds":true,"stl":{"itemw":24,"itemh":300,"labelw":180}}],"sptevs":["OnLoad"],"aid":"caseapp","id":"g0qcqxzd","n":"基础列表","order":31,"pt":2,"pageprop":{"playout":2,"ds":{}},"ds":{},"mt":"2025-09-26T16:52:21.2061257Z"} \ No newline at end of file +{ + "comps": [ + { + "compid": "table", + "libid": "antdesign", + "cn": "Table", + "ct": 1, + "frag": { + "dt": "H.LowCode.Components.Defaults.LcTable, H.LowCode.Components.Defaults", + "t": "H.LowCode.Components.Defaults.LcTable, H.LowCode.Components.Defaults", + "attrs": [] + }, + "ds": { + "dsgt": 2, + "dst": 1, + "dsid": "qgzhc7w3z", + "dsn": "tb_test1", + "dsv": "{\"tcols\":[{\"id\":\"i79talu1\",\"n\":\"f_field1\",\"t\":\"输入框1\"},{\"id\":\"vwvoqrn1s\",\"n\":\"f_field3\",\"t\":\"输入框2\"},{\"id\":\"ap0ceewr\",\"n\":\"f_field6\",\"t\":\"单选框3\"},{\"id\":\"ck9b6mez\",\"n\":\"Class\",\"t\":\"班级\"},{\"id\":\"es0qoauj\",\"n\":\"f_field10\",\"t\":\"日期选择5\"},{\"id\":\"t910chps\",\"n\":\"f_id\",\"t\":\"Id\",\"pk\":true}],\"searchs\":[],\"tbtns\":[{\"id\":\"wpnm70fe\",\"n\":\"create\",\"t\":\"新增\",\"bt\":1,\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":10,\"etid\":\"fhumgxyk\",\"eta\":\"14\"}]},{\"id\":\"2qsecnfo\",\"n\":\"deleteSelections\",\"t\":\"删除选中\",\"sptevs\":[\"OnClick\"]}],\"rbtns\":[{\"id\":\"za8gxxdz\",\"n\":\"edit\",\"t\":\"编辑\",\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":10,\"etid\":\"fhumgxyk\",\"eta\":\"14\",\"eventArgs\":{\"param1\":\"111\"},\"rowparams\":{\"id\":\"f_id\"}}]},{\"id\":\"b17d3nrc\",\"n\":\"del\",\"t\":\"删除\",\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":40,\"edat\":20}]},{\"id\":\"vwrounbq\",\"n\":\"editRow\",\"t\":\"行内编辑\",\"sptevs\":[\"OnClick\"],\"evs\":[{\"en\":\"OnClick\",\"eht\":40,\"edat\":10}]}]}" + }, + "attrdefgroups": [], + "childs": [], + "order": 30, + "pub": 1, + "mt": "2025-05-22T14:26:07.7475675Z", + "id": "fqmcwygx", + "pid": "nupedwmm3", + "n": "Table_926", + "lb": "表格-A", + "hlb": true, + "sptds": true, + "stl": { + "itemw": 24, + "itemh": 300, + "labelw": 180 + } + } + ], + "sptevs": [ + "OnLoad" + ], + "aid": "caseapp", + "id": "g0qcqxzd", + "n": "基础列表", + "order": 31, + "pt": 2, + "pageprop": { + "playout": 2, + "ds": {} + }, + "ds": {}, + "mt": "2025-09-26T16:52:21.2061257Z" +} \ No newline at end of file diff --git a/meta/apps/caseapp/page/gndz2vecz.json b/meta/apps/caseapp/page/gndz2vecz.json index f9e0af51a43be34ac211b5a4f4548427aeaf469c..c414b625d74c4f2b1b1034df9ffb7841b216f2a9 100644 --- a/meta/apps/caseapp/page/gndz2vecz.json +++ b/meta/apps/caseapp/page/gndz2vecz.json @@ -2,7 +2,7 @@ "comps": [ { "libid": "antdesign", - "compid": "jmmybvkua", + "compid": "tabs", "cn": "Tabs", "ct": 1, "frag": { @@ -90,7 +90,7 @@ ], "childs": [ { - "compid": "iatnu5wu", + "compid": "incontainer", "frag": { "childs": [], "attrs": [] diff --git a/meta/apps/caseapp/page/huf12sk.json b/meta/apps/caseapp/page/huf12sk.json index f17fad73cb75cfec2966f6be2b47b14dd80d8a71..8d1ba3378dde69c29e51f7c2793d1e7f5676b9a4 100644 --- a/meta/apps/caseapp/page/huf12sk.json +++ b/meta/apps/caseapp/page/huf12sk.json @@ -1 +1,31 @@ -{"comps":[{"compid":"nmt4tbnr","ds":{},"attrdefgroups":[],"childs":[],"id":"4c099d76-872e-41f6-a3f9-089a8a104757","pid":"321cd386-3b12-406d-83da-881a3b5d6afe","n":"table","stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{}}],"aid":"caseapp","id":"huf12sk","n":"查询列表","order":32,"pt":2,"pageprop":{"playout":2,"ds":{}},"ds":{},"modifiedTime":"2025-04-03T02:11:26.5648739Z"} \ No newline at end of file +{ + "comps": [ + { + "compid": "table", + "ds": {}, + "attrdefgroups": [], + "childs": [], + "id": "4c099d76-872e-41f6-a3f9-089a8a104757", + "pid": "321cd386-3b12-406d-83da-881a3b5d6afe", + "n": "table", + "stl": { + "itemh": 85, + "labelw": 180, + "display": "inline", + "pos": "static" + }, + "ev": {} + } + ], + "aid": "caseapp", + "id": "huf12sk", + "n": "查询列表", + "order": 32, + "pt": 2, + "pageprop": { + "playout": 2, + "ds": {} + }, + "ds": {}, + "mt": "2025-04-03T02:11:26.5648739Z" +} \ No newline at end of file diff --git a/meta/apps/caseapp/page/rlswps5.json b/meta/apps/caseapp/page/rlswps5.json index f78728c00878004eed88c3cd65eaaff8bf0af44a..a1cd25a474d45ab46bbdd93e97ec29ecc136fb65 100644 --- a/meta/apps/caseapp/page/rlswps5.json +++ b/meta/apps/caseapp/page/rlswps5.json @@ -1 +1 @@ -{"aid":"caseapp","id":"rlswps5","n":"文本编辑器","order":81,"pt":0,"pub":0,"comps":[],"pageprop":{"playout":2},"ds":{"type":0,"fields":[],"options":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"0001-01-01T00:00:00"},"i18n":{},"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-12T13:28:22.7333711Z"} \ No newline at end of file +{"aid":"caseapp","id":"rlswps5","n":"文本编辑器","order":81,"pt":0,"pub":0,"comps":[],"pageprop":{"playout":2},"ds":{"type":0,"fields":[],"options":[],"ct":"0001-01-01T00:00:00","mt":"0001-01-01T00:00:00"},"i18n":{},"ct":"0001-01-01T00:00:00","mt":"2024-09-12T13:28:22.7333711Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/page/sf1duor2x.json b/meta/apps/caseapp/page/sf1duor2x.json index 8ac39f6efb306234eb2ead233a218d0d1841b929..982fed9a2991a8476e7ef988e4b4746dd667aef4 100644 --- a/meta/apps/caseapp/page/sf1duor2x.json +++ b/meta/apps/caseapp/page/sf1duor2x.json @@ -1 +1 @@ -{"aid":"caseapp","id":"sf1duor2x","n":"分析页","order":61,"pt":0,"pub":0,"comps":[],"pageprop":{"playout":2},"ds":{"type":0,"fields":[],"options":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"0001-01-01T00:00:00"},"i18n":{},"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-12T02:44:53.435242Z"} \ No newline at end of file +{"aid":"caseapp","id":"sf1duor2x","n":"分析页","order":61,"pt":0,"pub":0,"comps":[],"pageprop":{"playout":2},"ds":{"type":0,"fields":[],"options":[],"ct":"0001-01-01T00:00:00","mt":"0001-01-01T00:00:00"},"i18n":{},"ct":"0001-01-01T00:00:00","mt":"2024-09-12T02:44:53.435242Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/page/uwz9o94b0.json b/meta/apps/caseapp/page/uwz9o94b0.json index d9a2f5853429679bd6b2929883a716aa49005c04..fb9e21cb563e6c9f629b5b8e0e9b388b35ce8908 100644 --- a/meta/apps/caseapp/page/uwz9o94b0.json +++ b/meta/apps/caseapp/page/uwz9o94b0.json @@ -1 +1 @@ -{"aid":"caseapp","id":"uwz9o94b0","n":"监控页","order":62,"pt":0,"pub":0,"comps":[],"pageprop":{"playout":2},"ds":{"type":0,"fields":[],"options":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"0001-01-01T00:00:00"},"i18n":{},"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-12T02:44:38.4337882Z"} \ No newline at end of file +{"aid":"caseapp","id":"uwz9o94b0","n":"监控页","order":62,"pt":0,"pub":0,"comps":[],"pageprop":{"playout":2},"ds":{"type":0,"fields":[],"options":[],"ct":"0001-01-01T00:00:00","mt":"0001-01-01T00:00:00"},"i18n":{},"ct":"0001-01-01T00:00:00","mt":"2024-09-12T02:44:38.4337882Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/page/xovrp6nz.json b/meta/apps/caseapp/page/xovrp6nz.json index 6af53140c01b838bb387edea6d4e4260826630c3..580b35ed660ecf481dab2a847336fcdbdf6fb7e1 100644 --- a/meta/apps/caseapp/page/xovrp6nz.json +++ b/meta/apps/caseapp/page/xovrp6nz.json @@ -1 +1 @@ -{"comps":[],"aid":"caseapp","id":"xovrp6nz","n":"卡片列表","order":35,"pt":2,"pageprop":{"playout":2,"ds":{}},"ds":{},"modifiedTime":"2025-04-03T02:11:46.044405Z"} \ No newline at end of file +{"comps":[],"aid":"caseapp","id":"xovrp6nz","n":"卡片列表","order":35,"pt":2,"pageprop":{"playout":2,"ds":{}},"ds":{},"mt":"2025-04-03T02:11:46.044405Z"} \ No newline at end of file diff --git a/meta/apps/caseapp/page/ymb3bsw.json b/meta/apps/caseapp/page/ymb3bsw.json index f25476be2df831b2ad90153badcfee864fc42d7b..e6eeee94b495e43bb46f184a28af1848e02120b1 100644 --- a/meta/apps/caseapp/page/ymb3bsw.json +++ b/meta/apps/caseapp/page/ymb3bsw.json @@ -1 +1 @@ -{"aid":"caseapp","id":"ymb3bsw","n":"工作台","order":63,"pt":0,"pub":0,"comps":[],"pageprop":{"playout":2},"ds":{"type":0,"fields":[],"options":[],"createdTime":"0001-01-01T00:00:00","modifiedTime":"0001-01-01T00:00:00"},"i18n":{},"createdTime":"0001-01-01T00:00:00","modifiedTime":"2024-09-12T02:44:46.6022488Z"} \ No newline at end of file +{"aid":"caseapp","id":"ymb3bsw","n":"工作台","order":63,"pt":0,"pub":0,"comps":[],"pageprop":{"playout":2},"ds":{"type":0,"fields":[],"options":[],"ct":"0001-01-01T00:00:00","mt":"0001-01-01T00:00:00"},"i18n":{},"ct":"0001-01-01T00:00:00","mt":"2024-09-12T02:44:46.6022488Z"} \ No newline at end of file diff --git a/meta/apps/testapp/testapp.json b/meta/apps/testapp/testapp.json index 2eb16453876901e4167b3349f680e25384529aaf..4e42f2a996f2f364518231f3b73f491e55948978 100644 --- a/meta/apps/testapp/testapp.json +++ b/meta/apps/testapp/testapp.json @@ -1 +1 @@ -{"id":"testapp","n":"测试系统","desc":"测试组件、页面不同设计场景","platform":[0],"mt":"2025-05-29T16:43:23.7831823Z"} \ No newline at end of file +{"id":"testapp","n":"测试系统","desc":"测试组件、页面不同设计场景","order":1,"platform":[0],"mt":"2025-11-01T05:09:18.459366Z"} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/85jlapqoc.json b/meta/parts/componentParts/antdesign/85jlapqoc.json deleted file mode 100644 index f4d6c3073d06acda506214faf38adcd616c9f37e..0000000000000000000000000000000000000000 --- a/meta/parts/componentParts/antdesign/85jlapqoc.json +++ /dev/null @@ -1 +0,0 @@ -{"cn":"List","ct":1,"attrdefgroups":[],"childs":[],"sptds":false,"order":35,"pub":1,"mt":"2025-03-05T15:32:25.9094807Z","id":"lbemleqn","libid":"antdesign","compid":"85jlapqoc","lb":"列表-A","container":false,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{},"ds":{"dst":0}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/8b0lapquf.json b/meta/parts/componentParts/antdesign/8b0lapquf.json deleted file mode 100644 index 2f276ba2a6dcf1a681ddaf5abfc8b7a73f947247..0000000000000000000000000000000000000000 --- a/meta/parts/componentParts/antdesign/8b0lapquf.json +++ /dev/null @@ -1 +0,0 @@ -{"cn":"Upload","ct":1,"frag":{"dt":"AntDesign.Upload, AntDesign","valt":"System.String","attrs":[]},"attrdefgroups":[],"childs":[],"sptds":false,"order":25,"pub":1,"mt":"2025-03-05T15:31:46.5454492Z","id":"35r8zuv0e","libid":"antdesign","compid":"8b0lapquf","lb":"上传-A","container":false,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{},"ds":{"dst":0}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/9xulbbf5u.json b/meta/parts/componentParts/antdesign/9xulbbf5u.json deleted file mode 100644 index ee97e8e7a1af0c99a40257d3c2e606fbc885f25c..0000000000000000000000000000000000000000 --- a/meta/parts/componentParts/antdesign/9xulbbf5u.json +++ /dev/null @@ -1 +0,0 @@ -{"compid":"9xulbbf5u","libid":"antdesign","cn":"Select","ct":1,"frag":{"dt":"AntDesign.Select\u00602[[System.String],[System.String]], antdesign","valt":"System.String","attrs":[]},"ds":{"dsgt":1},"attrdefgroups":[],"childs":[],"order":17,"pub":1,"mt":"2025-03-22T15:55:39.4807842Z","id":"76b2alet3","lb":"选择器-A","sptds":true,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/antdesign.json b/meta/parts/componentParts/antdesign/antdesign.json index 60fe0fa9c19ef15ed6e76cdceee913fc0b6963db..1951a5d122b3167c3c91e8bf4c2c88a779ca181a 100644 --- a/meta/parts/componentParts/antdesign/antdesign.json +++ b/meta/parts/componentParts/antdesign/antdesign.json @@ -1 +1 @@ -{"libid":"antdesign","libname":"antdesign","desc":"antdesign 风格的基础组件库","platform":[0],"modifiedTime":"2025-10-12T12:12:29.9587419Z"} \ No newline at end of file +{"libid":"antdesign","libname":"antdesign","desc":"antdesign 风格的基础组件库","platform":[0],"mt":"2025-10-12T12:12:29.9587419Z"} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/autocomplete.json b/meta/parts/componentParts/antdesign/autocomplete.json new file mode 100644 index 0000000000000000000000000000000000000000..e1cb8580152417be246e4ed21d7977c2ac82446e --- /dev/null +++ b/meta/parts/componentParts/antdesign/autocomplete.json @@ -0,0 +1 @@ +{"compid":"autocomplete","libid":"antdesign","cn":"AutoComplete","ct":1,"frag":{"dt":"AntDesign.AutoComplete\u00601[System.String], AntDesign","valt":"System.String","attrs":[]},"ds":{"dsgt":1},"attrdefgroups":[],"childs":[],"order":18,"pub":1,"mt":"2025-03-22T15:55:52.1413161Z","id":"pqxzqsh2","lb":"自动完成-A","sptds":true,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/button.json b/meta/parts/componentParts/antdesign/button.json new file mode 100644 index 0000000000000000000000000000000000000000..d59fe3637d76f63c95e62249b9db2c15967a98e6 --- /dev/null +++ b/meta/parts/componentParts/antdesign/button.json @@ -0,0 +1 @@ +{"compid":"button","libid":"antdesign","cn":"Button","ct":1,"frag":{"dt":"AntDesign.Button, AntDesign","valt":"System.String","attrs":[{"attrn":"Text","attrt":"System.String"},{"attrn":"Type","attrt":"System.String"}]},"attrdefgroups":[{"gn":"基础属性","attrdefs":[{"disn":"按钮文字","pt":1,"desc":"按钮显示的文本内容","dftval":"按钮","attrn":"Text","attrt":"System.String","attrv":"按钮"},{"disn":"按钮类型","pt":3,"desc":"按钮的样式类型","dftval":"default","attrn":"Type","attrt":"System.String","attrv":"default"},{"disn":"是否禁用","pt":6,"desc":"是否禁用按钮","dftval":false,"attrn":"Disabled","attrt":"System.Boolean","attrv":false},{"disn":"加载状态","pt":6,"desc":"按钮是否显示加载状态","dftval":false,"attrn":"Loading","attrt":"System.Boolean","attrv":false}]}],"childs":[],"evdefs":[{"en":"OnClick","disn":"点击事件","desc":"按钮被点击时触发的事件"}],"order":15,"pub":1,"mt":"2025-11-17T10:00:00.0000000Z","id":"button_parts","lb":"按钮-A","sptds":false,"container":false,"stl":{"itemh":50,"labelw":180,"display":"inline","pos":"static"},"ev":{}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/fmiwu412.json b/meta/parts/componentParts/antdesign/card.json similarity index 98% rename from meta/parts/componentParts/antdesign/fmiwu412.json rename to meta/parts/componentParts/antdesign/card.json index e513eed27331ff5fcff201c38a7655f8fef72b02..5141ae1e193fc24b136e2ad3ee2d36212e7048c9 100644 --- a/meta/parts/componentParts/antdesign/fmiwu412.json +++ b/meta/parts/componentParts/antdesign/card.json @@ -88,7 +88,7 @@ "mt": "2025-03-05T15:32:20.4958136Z", "id": "12nblk6r", "libid": "antdesign", - "compid": "fmiwu412", + "compid": "card", "lb": "卡片-A", "container": false, "stl": { diff --git a/meta/parts/componentParts/antdesign/cascader.json b/meta/parts/componentParts/antdesign/cascader.json new file mode 100644 index 0000000000000000000000000000000000000000..460b18f7d56ef6913a2a9dccdb44ec3422294cb2 --- /dev/null +++ b/meta/parts/componentParts/antdesign/cascader.json @@ -0,0 +1 @@ +{"libid":"antdesign","compid":"cascader","ct":1,"frag":{"dt":"AntDesign.Cascader, AntDesign","childs":[],"valt":"System.String","attrs":[]},"ds":{"dsgt":1},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"pub":1,"mt":"2025-11-21T17:03:58.9571236Z","id":"vwbvub2r","lb":"级联选择-A","sptds":true,"stl":{"itemw":4,"itemh":85,"labelw":180},"v":"0.0.1"} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/vdcoqln1z.json b/meta/parts/componentParts/antdesign/checkbox.json similarity index 95% rename from meta/parts/componentParts/antdesign/vdcoqln1z.json rename to meta/parts/componentParts/antdesign/checkbox.json index f6b72ae5b4c64a29c1561f0adf05bcd2959605fb..2623350469466f9d11e642b3b87d53a7510fc868 100644 --- a/meta/parts/componentParts/antdesign/vdcoqln1z.json +++ b/meta/parts/componentParts/antdesign/checkbox.json @@ -1,5 +1,5 @@ -{ - "compid": "vdcoqln1z", +{ + "compid": "checkbox", "libid": "antdesign", "cn": "Checkbox", "ct": 1, diff --git a/meta/parts/componentParts/antdesign/csbjlezr.json b/meta/parts/componentParts/antdesign/csbjlezr.json deleted file mode 100644 index a6fb929e3817fd6248e6bcd7c3099bb83ba9ac4b..0000000000000000000000000000000000000000 --- a/meta/parts/componentParts/antdesign/csbjlezr.json +++ /dev/null @@ -1 +0,0 @@ -{"compid":"csbjlezr","libid":"antdesign","cn":"TreeSelect","ct":1,"frag":{"dt":"AntDesign.TreeSelect\u00602[[System.String], [System.String]], AntDesign","valt":"System.String","attrs":[]},"ds":{},"attrdefgroups":[],"childs":[],"order":32,"pub":1,"mt":"2025-03-23T11:02:57.0710744Z","id":"jtx10vsi","lb":"树选择-A","sptds":true,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/7bab5a19.json b/meta/parts/componentParts/antdesign/datepicker.json similarity index 95% rename from meta/parts/componentParts/antdesign/7bab5a19.json rename to meta/parts/componentParts/antdesign/datepicker.json index 50671dc7965b219a5fa3c67b13721ed96a09defe..d6f8523d3f09ddb28da1df50ae6bad75791d5147 100644 --- a/meta/parts/componentParts/antdesign/7bab5a19.json +++ b/meta/parts/componentParts/antdesign/datepicker.json @@ -1,4 +1,4 @@ -{ +{ "cn": "DatePicker", "ct": 1, "frag": { @@ -14,7 +14,7 @@ "mt": "2025-02-24T15:59:32.6799272Z", "id": "xrckidu5", "libid": "antdesign", - "compid": "7bab5a19", + "compid": "datepicker", "lb": "日期选择器-A", "container": false, "stl": { diff --git a/meta/parts/componentParts/antdesign/elc02goef.json b/meta/parts/componentParts/antdesign/elc02goef.json deleted file mode 100644 index 9de3a9607062f7ce052f043f8a7d21f39397a497..0000000000000000000000000000000000000000 --- a/meta/parts/componentParts/antdesign/elc02goef.json +++ /dev/null @@ -1 +0,0 @@ -{"cn":"Image","ct":1,"frag":{"dt":"AntDesign.Image, AntDesign","valt":"System.String","attrs":[]},"attrdefgroups":[],"childs":[],"sptds":false,"order":26,"pub":1,"mt":"2025-03-05T15:31:51.2912846Z","id":"nuned6mm7","libid":"antdesign","compid":"elc02goef","lb":"图片-A","container":false,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{},"ds":{"dst":0}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/f63f79db.json b/meta/parts/componentParts/antdesign/f63f79db.json deleted file mode 100644 index 769886bf3bc060a5a83262ba178646599c752b23..0000000000000000000000000000000000000000 --- a/meta/parts/componentParts/antdesign/f63f79db.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "cn": "Grid", - "ct": 1, - "attrdefgroups": [], - "childs": [], - "sptds": false, - "order": 2, - "pub": 1, - "mt": "2025-02-24T15:35:34.3796467Z", - "id": "2meifnfm", - "libid": "antdesign", - "compid": "f63f79db", - "lb": "Grid 栅格-A", - "container": true, - "stl": { - "itemh": 85, - "labelw": 180, - "display": "inline", - "pos": "static" - }, - "ev": {}, - "ds": { - "dsgt": 1 - } -} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/flex.json b/meta/parts/componentParts/antdesign/flex.json new file mode 100644 index 0000000000000000000000000000000000000000..8f5c9a365e8f0652e8c9155133e0ce13a9514a8a --- /dev/null +++ b/meta/parts/componentParts/antdesign/flex.json @@ -0,0 +1 @@ +{"libid":"antdesign","compid":"flex","ct":1,"frag":{"dt":"AntDesign.Flex, AntDesign","childs":[],"attrs":[{"attrn":"Style","attrt":"System.String","attrv":"height:100%;"}],"content":"$(DraggableContainer)"},"ds":{"dsgt":1},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"order":1,"pub":1,"mt":"2025-11-22T13:10:54.9227361Z","id":"7d2lne5o","lb":"Flex 布局-A","container":true,"stl":{"itemw":24,"itemh":85,"labelw":180,"dfstl":"height: 200px;"},"v":"0.0.1"} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/grid.json b/meta/parts/componentParts/antdesign/grid.json new file mode 100644 index 0000000000000000000000000000000000000000..095fc2ca89d25b14e3105c72e646e72d5ad252d3 --- /dev/null +++ b/meta/parts/componentParts/antdesign/grid.json @@ -0,0 +1 @@ +{"libid":"antdesign","compid":"grid","ct":1,"frag":{"dt":"AntDesign.GridRow, AntDesign","childs":[{"dt":"AntDesign.GridCol, AntDesign","childs":[],"attrs":[{"attrn":"Style","attrt":"System.String","attrv":"width:33.33%; height:100%;"}],"content":"$(DraggableContainer)"},{"dt":"AntDesign.GridCol, AntDesign","childs":[],"attrs":[{"attrn":"Style","attrt":"System.String","attrv":"width:33.33%; height:100%;"}],"content":"$(DraggableContainer)"},{"dt":"AntDesign.GridCol, AntDesign","childs":[],"attrs":[{"attrn":"Style","attrt":"System.String","attrv":"width:33.33%; height:100%;"}],"content":"$(DraggableContainer)"}],"attrs":[{"attrn":"Style","attrt":"System.String","attrv":"height:100%;"}]},"ds":{"dsgt":1},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"order":2,"pub":1,"mt":"2025-11-23T01:40:01.1069114Z","id":"2meifnfm","lb":"Grid 栅格-A","container":true,"stl":{"itemw":24,"itemh":85,"labelw":180,"dfstl":"height: 200px;"},"v":"0.0.1"} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/image.json b/meta/parts/componentParts/antdesign/image.json new file mode 100644 index 0000000000000000000000000000000000000000..07f61cb9b767750e44aad4597327cae096eb4b21 --- /dev/null +++ b/meta/parts/componentParts/antdesign/image.json @@ -0,0 +1 @@ +{"cn":"Image","ct":1,"frag":{"dt":"AntDesign.Image, AntDesign","valt":"System.String","attrs":[]},"attrdefgroups":[],"childs":[],"sptds":false,"order":26,"pub":1,"mt":"2025-03-05T15:31:51.2912846Z","id":"nuned6mm7","libid":"antdesign","compid":"image","lb":"图片-A","container":false,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{},"ds":{"dst":0}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/52391a70.json b/meta/parts/componentParts/antdesign/input.json similarity index 98% rename from meta/parts/componentParts/antdesign/52391a70.json rename to meta/parts/componentParts/antdesign/input.json index 2fd6797e9f6916019384dc43b350d6369456cd80..c18dd46e1564231f34c568971e9f5ee2d576f538 100644 --- a/meta/parts/componentParts/antdesign/52391a70.json +++ b/meta/parts/componentParts/antdesign/input.json @@ -1,4 +1,4 @@ -{ +{ "cn": "Input", "ct": 1, "frag": { @@ -52,7 +52,7 @@ "mt": "2025-02-24T15:36:15.8037414Z", "id": "cj8ac3m42", "libid": "antdesign", - "compid": "52391a70", + "compid": "input", "lb": "输入框-A", "container": false, "stl": { diff --git a/meta/parts/componentParts/antdesign/jlcybdkg.json b/meta/parts/componentParts/antdesign/inputnumber.json similarity index 95% rename from meta/parts/componentParts/antdesign/jlcybdkg.json rename to meta/parts/componentParts/antdesign/inputnumber.json index 56ba64cc10b953d82c34beca711ad954bf2394d5..b3f05525f5fdd8297e8957129db57883f8c111de 100644 --- a/meta/parts/componentParts/antdesign/jlcybdkg.json +++ b/meta/parts/componentParts/antdesign/inputnumber.json @@ -1,4 +1,4 @@ -{ +{ "cn": "InputNumber", "ct": 1, "frag": { @@ -14,7 +14,7 @@ "mt": "2025-02-24T15:36:33.0043266Z", "id": "wymxwrfpw", "libid": "antdesign", - "compid": "jlcybdkg", + "compid": "inputnumber", "lb": "数字输入框-A", "container": false, "stl": { diff --git a/meta/parts/componentParts/antdesign/jmmybvkua.json b/meta/parts/componentParts/antdesign/jmmybvkua.json deleted file mode 100644 index 1cee315e1b1c6cb26d50d82a9dd471a8338161f7..0000000000000000000000000000000000000000 --- a/meta/parts/componentParts/antdesign/jmmybvkua.json +++ /dev/null @@ -1 +0,0 @@ -{"compid":"jmmybvkua","libid":"antdesign","cn":"Tabs","ct":1,"frag":{"dt":"AntDesign.Tabs, AntDesign","childs":[{"dt":"AntDesign.TabPane, AntDesign","childs":[],"attrs":[{"attrn":"Key","attrt":"System.String","attrv":"tab1"},{"attrn":"Tab","attrt":"System.String","attrv":"标签页1"}],"content":"$(DraggableContainer)"},{"dt":"AntDesign.TabPane, AntDesign","childs":[],"attrs":[{"attrn":"Key","attrt":"System.String","attrv":"tab2"},{"attrn":"Tab","attrt":"System.String","attrv":"标签页2"}],"content":"$(DraggableContainer)"}],"attrs":[]},"ds":{},"attrdefgroups":[{"gn":"基础属性","attrdefs":[{"disn":"默认激活标签","pt":1,"desc":"默认激活的标签页键值","dftval":"tab1","attrn":"DefaultActiveKey","attrt":"System.String"},{"disn":"标签位置","pt":1,"desc":"标签页的位置","dftval":"Top","attrn":"TabPosition","attrt":"AntDesign.TabPosition"},{"disn":"标签大小","pt":1,"desc":"标签页的大小","dftval":"Default","attrn":"Size","attrt":"AntDesign.TabSize"},{"disn":"是否动画","pt":6,"desc":"是否使用动画效果","dftval":true,"attrn":"Animated","attrt":"System.Boolean"}]}],"childs":[],"evdefs":[],"stydefs":[],"order":33,"pub":1,"mt":"2025-10-18T13:14:02.3929554Z","id":"iu1nxkgtk","lb":"标签页-A","hlb":true,"stl":{"itemw":4,"itemh":200,"labelw":180}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/6d997568.json b/meta/parts/componentParts/antdesign/layout.json similarity index 90% rename from meta/parts/componentParts/antdesign/6d997568.json rename to meta/parts/componentParts/antdesign/layout.json index d0d5c9fc9c8c438bce75db0529e4d6c22608306f..6086b326b0baa45180005920d45d6a3ea5a669a6 100644 --- a/meta/parts/componentParts/antdesign/6d997568.json +++ b/meta/parts/componentParts/antdesign/layout.json @@ -1,5 +1,5 @@ -{ - "compid": "6d997568", +{ + "compid": "layout", "libid": "antdesign", "cn": "Layout", "ct": 1, @@ -15,7 +15,7 @@ "attrv": "background: #f4f7fa; height:100%;" } ], - "content": "$(DropItemContainer)" + "content": "$(DraggableContainer)" }, { "dt": "AntDesign.Content, AntDesign", @@ -26,7 +26,7 @@ "attrv": "height: 100%;" } ], - "content": "$(DropItemContainer)" + "content": "$(DraggableContainer)" } ], "attrs": [ diff --git a/meta/parts/componentParts/antdesign/list.json b/meta/parts/componentParts/antdesign/list.json new file mode 100644 index 0000000000000000000000000000000000000000..b948c6b4e4d7579e87ff3f011715940c77de28d0 --- /dev/null +++ b/meta/parts/componentParts/antdesign/list.json @@ -0,0 +1 @@ +{"libid":"antdesign","compid":"list","ct":1,"frag":{"dt":"AntDesign.List, AntDesign","childs":[{"dt":"AntDesign.ListItem, AntDesign","childs":[],"attrs":[],"content":"$(DraggableContainer)"}],"attrs":[{"attrn":"Style","attrt":"System.String","attrv":"width:100%;"}]},"ds":{"dsgt":1},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"order":35,"pub":1,"mt":"2025-11-22T09:55:42.369244Z","id":"lbemleqn","lb":"列表-A","container":true,"stl":{"itemw":24,"itemh":200,"labelw":180},"v":"0.0.1"} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/nl9e6mko.json b/meta/parts/componentParts/antdesign/nl9e6mko.json deleted file mode 100644 index 80708be64107b40babdf8efb797654df9e1d7c1d..0000000000000000000000000000000000000000 --- a/meta/parts/componentParts/antdesign/nl9e6mko.json +++ /dev/null @@ -1 +0,0 @@ -{"compid":"nl9e6mko","libid":"antdesign","cn":"AutoComplete","ct":1,"frag":{"dt":"AntDesign.AutoComplete\u00601[System.String], AntDesign","valt":"System.String","attrs":[]},"ds":{"dsgt":1},"attrdefgroups":[],"childs":[],"order":18,"pub":1,"mt":"2025-03-22T15:55:52.1413161Z","id":"pqxzqsh2","lb":"自动完成-A","sptds":true,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/nwepem4i.json b/meta/parts/componentParts/antdesign/nwepem4i.json deleted file mode 100644 index 5d3837aa88809dd78dd2065a360a640fef382899..0000000000000000000000000000000000000000 --- a/meta/parts/componentParts/antdesign/nwepem4i.json +++ /dev/null @@ -1 +0,0 @@ -{"cn":"Switch","ct":1,"frag":{"dt":"AntDesign.Switch, AntDesign","valt":"System.Boolean","attrs":[]},"attrdefgroups":[],"childs":[],"sptds":false,"order":19,"pub":1,"mt":"2025-03-05T15:31:40.4314786Z","id":"eouljwau","libid":"antdesign","compid":"nwepem4i","lb":"开关-A","container":false,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{},"ds":{"dst":0}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/oikgmvkm.json b/meta/parts/componentParts/antdesign/oikgmvkm.json deleted file mode 100644 index b156fe633e1e85f5b2b3b6c25c9c38d2923e75db..0000000000000000000000000000000000000000 --- a/meta/parts/componentParts/antdesign/oikgmvkm.json +++ /dev/null @@ -1 +0,0 @@ -{"cn":"TimePicker","ct":1,"frag":{"dt":"AntDesign.TimePicker\u00601[[System.Nullable\u00601[[System.DateTime]]]], AntDesign","valt":"System.Nullable\u00601[System.DateTime]","attrs":[]},"attrdefgroups":[],"childs":[],"sptds":false,"order":16,"pub":1,"mt":"2025-03-05T15:31:24.9654966Z","id":"sbvdck2o","libid":"antdesign","compid":"oikgmvkm","lb":"时间选择器-A","container":false,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{},"ds":{"dst":0}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/ookcvyml.json b/meta/parts/componentParts/antdesign/ookcvyml.json deleted file mode 100644 index 75ad6339d91e3499c30b2a984612d845c3b31c5f..0000000000000000000000000000000000000000 --- a/meta/parts/componentParts/antdesign/ookcvyml.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "cn": "Flex", - "ct": 1, - "attrdefgroups": [], - "childs": [], - "sptds": false, - "order": 1, - "pub": 1, - "mt": "2025-02-24T15:32:37.6663575Z", - "id": "7d2lne5o", - "libid": "antdesign", - "compid": "ookcvyml", - "lb": "Flex 布局-A", - "container": false, - "stl": { - "itemh": 85, - "labelw": 180, - "display": "inline", - "pos": "static" - }, - "ev": {}, - "ds": { - "dsgt": 1 - } -} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/evuqdwzl.json b/meta/parts/componentParts/antdesign/radio.json similarity index 96% rename from meta/parts/componentParts/antdesign/evuqdwzl.json rename to meta/parts/componentParts/antdesign/radio.json index 5fd6a6a39c6b8d662772ae7ed99f58ce8692cb82..fe3208d29ea760528d2f4d79fb8105926ee0b498 100644 --- a/meta/parts/componentParts/antdesign/evuqdwzl.json +++ b/meta/parts/componentParts/antdesign/radio.json @@ -1,5 +1,5 @@ -{ - "compid": "evuqdwzl", +{ + "compid": "radio", "libid": "antdesign", "cn": "Radio", "ct": 1, diff --git a/meta/parts/componentParts/antdesign/select.json b/meta/parts/componentParts/antdesign/select.json new file mode 100644 index 0000000000000000000000000000000000000000..50b9a7f67ad3c02432d12ddd00f3872193e48dc5 --- /dev/null +++ b/meta/parts/componentParts/antdesign/select.json @@ -0,0 +1 @@ +{"compid":"select","libid":"antdesign","cn":"Select","ct":1,"frag":{"dt":"AntDesign.Select\u00602[[System.String],[System.String]], antdesign","valt":"System.String","attrs":[]},"ds":{"dsgt":1},"attrdefgroups":[],"childs":[],"order":17,"pub":1,"mt":"2025-03-22T15:55:39.4807842Z","id":"76b2alet3","lb":"选择器-A","sptds":true,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/sonvddk21.json b/meta/parts/componentParts/antdesign/sonvddk21.json deleted file mode 100644 index 856cbb9c8563c6e1486772ff1d5465f730fd3c41..0000000000000000000000000000000000000000 --- a/meta/parts/componentParts/antdesign/sonvddk21.json +++ /dev/null @@ -1 +0,0 @@ -{"compid":"sonvddk21","libid":"antdesign","cn":"Tree","ct":1,"frag":{"dt":"AntDesign.Tree\u00601[System.String], AntDesign","valt":"System.String","attrs":[]},"ds":{},"attrdefgroups":[],"childs":[],"order":31,"pub":1,"mt":"2025-03-23T11:02:45.2781898Z","id":"hepj4qcm","lb":"树-A","sptds":true,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/switch.json b/meta/parts/componentParts/antdesign/switch.json new file mode 100644 index 0000000000000000000000000000000000000000..625c1ea1ce869d0cf37115aa038884c9610b6d9e --- /dev/null +++ b/meta/parts/componentParts/antdesign/switch.json @@ -0,0 +1 @@ +{"cn":"Switch","ct":1,"frag":{"dt":"AntDesign.Switch, AntDesign","valt":"System.Boolean","attrs":[]},"attrdefgroups":[],"childs":[],"sptds":false,"order":19,"pub":1,"mt":"2025-03-05T15:31:40.4314786Z","id":"eouljwau","libid":"antdesign","compid":"switch","lb":"开关-A","container":false,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{},"ds":{"dst":0}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/f2b54b4c.json b/meta/parts/componentParts/antdesign/table.json similarity index 97% rename from meta/parts/componentParts/antdesign/f2b54b4c.json rename to meta/parts/componentParts/antdesign/table.json index a2059264092900aaa4c7af86370d11519c3722ef..fa058555d10103a6866b0b4af827c04e128d77d1 100644 --- a/meta/parts/componentParts/antdesign/f2b54b4c.json +++ b/meta/parts/componentParts/antdesign/table.json @@ -1,5 +1,5 @@ { - "compid": "f2b54b4c", + "compid": "table", "libid": "antdesign", "cn": "Table", "ct": 1, diff --git a/meta/parts/componentParts/antdesign/tabs.json b/meta/parts/componentParts/antdesign/tabs.json new file mode 100644 index 0000000000000000000000000000000000000000..990183c9aa59966b8a81cbf0034d42d3a579474d --- /dev/null +++ b/meta/parts/componentParts/antdesign/tabs.json @@ -0,0 +1 @@ +{"compid":"tabs","libid":"antdesign","cn":"Tabs","ct":1,"frag":{"dt":"AntDesign.Tabs, AntDesign","childs":[{"dt":"AntDesign.TabPane, AntDesign","childs":[],"attrs":[{"attrn":"Key","attrt":"System.String","attrv":"tab1"},{"attrn":"Tab","attrt":"System.String","attrv":"标签页1"}],"content":"$(DraggableContainer)"},{"dt":"AntDesign.TabPane, AntDesign","childs":[],"attrs":[{"attrn":"Key","attrt":"System.String","attrv":"tab2"},{"attrn":"Tab","attrt":"System.String","attrv":"标签页2"}],"content":"$(DraggableContainer)"}],"attrs":[]},"ds":{},"attrdefgroups":[{"gn":"基础属性","attrdefs":[{"disn":"默认激活标签","pt":1,"desc":"默认激活的标签页键值","dftval":"tab1","attrn":"DefaultActiveKey","attrt":"System.String"},{"disn":"标签位置","pt":1,"desc":"标签页的位置","dftval":"Top","attrn":"TabPosition","attrt":"AntDesign.TabPosition"},{"disn":"标签大小","pt":1,"desc":"标签页的大小","dftval":"Default","attrn":"Size","attrt":"AntDesign.TabSize"},{"disn":"是否动画","pt":6,"desc":"是否使用动画效果","dftval":true,"attrn":"Animated","attrt":"System.Boolean"}]}],"childs":[],"evdefs":[],"stydefs":[],"order":33,"pub":1,"mt":"2025-10-18T13:14:02.3929554Z","id":"iu1nxkgtk","lb":"标签页-A","hlb":true,"stl":{"itemw":4,"itemh":200,"labelw":180}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/5icgyefr.json b/meta/parts/componentParts/antdesign/textarea.json similarity index 94% rename from meta/parts/componentParts/antdesign/5icgyefr.json rename to meta/parts/componentParts/antdesign/textarea.json index 3e991af92e04a33e06f3d0b3769764f931d82030..3b7ba528506c1212ecc6038c44339f099e9d3a37 100644 --- a/meta/parts/componentParts/antdesign/5icgyefr.json +++ b/meta/parts/componentParts/antdesign/textarea.json @@ -1,4 +1,4 @@ -{ +{ "cn": "TextArea", "ct": 1, "frag": { @@ -14,7 +14,7 @@ "mt": "2025-02-24T15:36:40.7389762Z", "id": "dtqhqbmc", "libid": "antdesign", - "compid": "5icgyefr", + "compid": "textarea", "lb": "文本框-A", "container": false, "stl": { diff --git a/meta/parts/componentParts/antdesign/timepicker.json b/meta/parts/componentParts/antdesign/timepicker.json new file mode 100644 index 0000000000000000000000000000000000000000..b55cc32c4dfd030decad80c810e3b780de0392c7 --- /dev/null +++ b/meta/parts/componentParts/antdesign/timepicker.json @@ -0,0 +1 @@ +{"cn":"TimePicker","ct":1,"frag":{"dt":"AntDesign.TimePicker\u00601[[System.Nullable\u00601[[System.DateTime]]]], AntDesign","valt":"System.Nullable\u00601[System.DateTime]","attrs":[]},"attrdefgroups":[],"childs":[],"sptds":false,"order":16,"pub":1,"mt":"2025-03-05T15:31:24.9654966Z","id":"sbvdck2o","libid":"antdesign","compid":"timepicker","lb":"时间选择器-A","container":false,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{},"ds":{"dst":0}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/tree.json b/meta/parts/componentParts/antdesign/tree.json new file mode 100644 index 0000000000000000000000000000000000000000..ad8b35b1a77f927ac2196899016e2cae67dbf20f --- /dev/null +++ b/meta/parts/componentParts/antdesign/tree.json @@ -0,0 +1 @@ +{"compid":"tree","libid":"antdesign","cn":"Tree","ct":1,"frag":{"dt":"AntDesign.Tree\u00601[System.String], AntDesign","valt":"System.String","attrs":[]},"ds":{},"attrdefgroups":[],"childs":[],"order":31,"pub":1,"mt":"2025-03-23T11:02:45.2781898Z","id":"hepj4qcm","lb":"树-A","sptds":true,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/treeselect.json b/meta/parts/componentParts/antdesign/treeselect.json new file mode 100644 index 0000000000000000000000000000000000000000..7e663bd3d82462f0abb1d2ba817464faa64e9e34 --- /dev/null +++ b/meta/parts/componentParts/antdesign/treeselect.json @@ -0,0 +1 @@ +{"compid":"treeselect","libid":"antdesign","cn":"TreeSelect","ct":1,"frag":{"dt":"AntDesign.TreeSelect\u00602[[System.String], [System.String]], AntDesign","valt":"System.String","attrs":[]},"ds":{},"attrdefgroups":[],"childs":[],"order":32,"pub":1,"mt":"2025-03-23T11:02:57.0710744Z","id":"jtx10vsi","lb":"树选择-A","sptds":true,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/upload.json b/meta/parts/componentParts/antdesign/upload.json new file mode 100644 index 0000000000000000000000000000000000000000..56feec8bfa5998edd97c980b75a56507b6e68673 --- /dev/null +++ b/meta/parts/componentParts/antdesign/upload.json @@ -0,0 +1 @@ +{"cn":"Upload","ct":1,"frag":{"dt":"AntDesign.Upload, AntDesign","valt":"System.String","attrs":[]},"attrdefgroups":[],"childs":[],"sptds":false,"order":25,"pub":1,"mt":"2025-03-05T15:31:46.5454492Z","id":"35r8zuv0e","libid":"antdesign","compid":"upload","lb":"上传-A","container":false,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{},"ds":{"dst":0}} \ No newline at end of file diff --git a/meta/parts/componentParts/antdesign/yo3v3smv.json b/meta/parts/componentParts/antdesign/yo3v3smv.json deleted file mode 100644 index f2af00926092141422caf3d1778f60d49a1c6c50..0000000000000000000000000000000000000000 --- a/meta/parts/componentParts/antdesign/yo3v3smv.json +++ /dev/null @@ -1 +0,0 @@ -{"compid":"yo3v3smv","libid":"antdesign","cn":"Cascader","ct":1,"frag":{"dt":"AntDesign.Cascader, AntDesign","valt":"System.String","attrs":[]},"ds":{"dsgt":1},"attrdefgroups":[],"childs":[],"pub":1,"mt":"2025-03-23T11:02:19.7305221Z","id":"vwbvub2r","lb":"级联选择-A","sptds":true,"stl":{"itemh":85,"labelw":180,"display":"inline","pos":"static"},"ev":{}} \ No newline at end of file diff --git a/meta/parts/componentParts/common/common.json b/meta/parts/componentParts/common/common.json index 1ddaa76a4caa3b8515b1733a76acf5b8197b532d..5607382204a1d1604aa97cac87ec5c32719ae9eb 100644 --- a/meta/parts/componentParts/common/common.json +++ b/meta/parts/componentParts/common/common.json @@ -1 +1 @@ -{"libid":"common","libname":"common","desc":"常用组件库,如行政区划、组织用户等","platform":[0],"modifiedTime":"2025-10-12T12:38:38.3811663Z"} \ No newline at end of file +{"libid":"common","libname":"common","desc":"常用组件库,如行政区划、组织用户等","platform":[0],"mt":"2025-10-12T12:38:38.3811663Z"} \ No newline at end of file diff --git a/meta/parts/componentParts/common/lybwuphn6.json b/meta/parts/componentParts/common/lybwuphn6.json deleted file mode 100644 index 38de5c8f7083e983125a7cef79cf7a4a2d33a674..0000000000000000000000000000000000000000 --- a/meta/parts/componentParts/common/lybwuphn6.json +++ /dev/null @@ -1 +0,0 @@ -{"compid":"lybwuphn6","libid":"common","cn":"region","ct":2,"ds":{},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"mt":"2025-10-12T14:11:50.0909771Z","id":"76g2ae5m","n":"region","lb":"行政区划组件","stl":{"itemw":4,"itemh":85,"labelw":180}} \ No newline at end of file diff --git a/meta/parts/componentParts/common/qpqayjuhb.json b/meta/parts/componentParts/common/qpqayjuhb.json deleted file mode 100644 index 9417c47b373cfc5fb819740af005a075293f13ef..0000000000000000000000000000000000000000 --- a/meta/parts/componentParts/common/qpqayjuhb.json +++ /dev/null @@ -1 +0,0 @@ -{"compid":"qpqayjuhb","libid":"common","cn":"userselect","ct":2,"frag":{"attrs":[]},"ds":{},"attrdefgroups":[],"childs":[],"evdefs":[],"stydefs":[],"mt":"2025-10-12T14:12:11.9143366Z","id":"t2f1qecpq","lb":"用户选择组件","stl":{"itemw":4,"itemh":85,"labelw":180}} \ No newline at end of file diff --git a/meta/parts/componentParts/common/region.json b/meta/parts/componentParts/common/region.json new file mode 100644 index 0000000000000000000000000000000000000000..970ad44996a1bd28c1cf7b0b15b3bb7a032e96b3 --- /dev/null +++ b/meta/parts/componentParts/common/region.json @@ -0,0 +1,20 @@ +{ + "compid": "region", + "libid": "common", + "cn": "region", + "ct": 2, + "ds": {}, + "attrdefgroups": [], + "childs": [], + "evdefs": [], + "stydefs": [], + "mt": "2025-10-12T14:11:50.0909771Z", + "id": "76g2ae5m", + "n": "region", + "lb": "行政区划组件", + "stl": { + "itemw": 4, + "itemh": 85, + "labelw": 180 + } +} \ No newline at end of file diff --git a/meta/parts/componentParts/common/userselect.json b/meta/parts/componentParts/common/userselect.json new file mode 100644 index 0000000000000000000000000000000000000000..7611852428fd6a075fa2ba46f0a755a59b3f7cbe --- /dev/null +++ b/meta/parts/componentParts/common/userselect.json @@ -0,0 +1,22 @@ +{ + "compid": "userselect", + "libid": "common", + "cn": "userselect", + "ct": 2, + "frag": { + "attrs": [] + }, + "ds": {}, + "attrdefgroups": [], + "childs": [], + "evdefs": [], + "stydefs": [], + "mt": "2025-10-12T14:12:11.9143366Z", + "id": "t2f1qecpq", + "lb": "用户选择组件", + "stl": { + "itemw": 4, + "itemh": 85, + "labelw": 180 + } +} \ No newline at end of file diff --git a/src/Common/H.LowCode.Application.Contracts/Contexts/ICurrentApp.cs b/src/Common/H.LowCode.Application.Contracts/Contexts/ICurrentApp.cs new file mode 100644 index 0000000000000000000000000000000000000000..52048a4b7c0f78e5c830f5c63ee6b672f0ab5a74 --- /dev/null +++ b/src/Common/H.LowCode.Application.Contracts/Contexts/ICurrentApp.cs @@ -0,0 +1,20 @@ +using System; + +namespace H.LowCode.Application.Contracts; + +/// +/// 应用上下文服务接口 +/// 用于在请求生命周期中管理当前应用的 AppId +/// +public interface ICurrentApp +{ + /// + /// 获取当前请求的 AppId + /// + string? CurrentAppId { get; } + + /// + /// 从 HTTP 上下文中自动解析并设置 AppId + /// + void ResolveAppIdFromContext(); +} \ No newline at end of file diff --git a/src/Common/H.LowCode.Application.Contracts/Dtos/DataDtoBase.cs b/src/Common/H.LowCode.Application.Contracts/Dtos/DataDtoBase.cs index 263b3239b8c2095635c109b64c1c016dfa358053..6c79934aa72903f7a7d8f7a088c105b5218093f8 100644 --- a/src/Common/H.LowCode.Application.Contracts/Dtos/DataDtoBase.cs +++ b/src/Common/H.LowCode.Application.Contracts/Dtos/DataDtoBase.cs @@ -8,11 +8,16 @@ namespace H.LowCode.Application.Contracts; public abstract class DataDtoBase { + public DataDtoBase() + { + CreatedTime = DateTime.Now; + } + public DateTime CreatedTime { get; set; } - public string CreatedUser { get; set; } + public string? CreatedUser { get; set; } - public DateTime ModifiedTime { get; set; } + public DateTime? ModifiedTime { get; set; } - public string ModifiedUser { get; set; } + public string? ModifiedUser { get; set; } } \ No newline at end of file diff --git a/src/Common/H.LowCode.Application.Contracts/Dtos/FormDataDto.cs b/src/Common/H.LowCode.Application.Contracts/Dtos/FormDataDto.cs index 927e53c89009d477d06c006fa2d94d712e7aea03..45f304835e3dc51c34d87b8535a4b4576d254f52 100644 --- a/src/Common/H.LowCode.Application.Contracts/Dtos/FormDataDto.cs +++ b/src/Common/H.LowCode.Application.Contracts/Dtos/FormDataDto.cs @@ -1,9 +1,5 @@ using H.LowCode.MetaSchema; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace H.LowCode.Application.Contracts; @@ -26,8 +22,8 @@ public class FormFieldDto /// init 用于控制允许在 AutoMapper 场景赋值, 不允许外部赋值 public string TypeName { get; init; } - private object _value; - public object Value + private object? _value; + public object? Value { get { diff --git a/src/Common/H.LowCode.Application/Contexts/CurrentApp.cs b/src/Common/H.LowCode.Application/Contexts/CurrentApp.cs new file mode 100644 index 0000000000000000000000000000000000000000..fed42a7b6700755d2967378dc147693fa2e81fa3 --- /dev/null +++ b/src/Common/H.LowCode.Application/Contexts/CurrentApp.cs @@ -0,0 +1,54 @@ +using H.LowCode.Application.Contracts; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Logging; + +namespace H.LowCode.Application; + +/// +/// 应用上下文服务实现 +/// 负责从 HTTP 上下文中解析和管理当前请求的 AppId +/// +public class CurrentApp : ICurrentApp +{ + private readonly IHttpContextAccessor _httpContextAccessor; + private readonly ILogger _logger; + private string? _currentAppId; + + public CurrentApp( + IHttpContextAccessor httpContextAccessor, + ILogger logger) + { + _httpContextAccessor = httpContextAccessor; + _logger = logger; + } + + /// + /// 获取当前请求的 AppId + /// + public string? CurrentAppId + { + get + { + if (_currentAppId == null) + { + ResolveAppIdFromContext(); + } + return _currentAppId; + } + } + + /// + /// + /// + public void ResolveAppIdFromContext() + { + var session = _httpContextAccessor.HttpContext?.Session; + if (session == null) + { + _logger.LogWarning("HttpContext is null, cannot resolve AppId"); + return; + } + + _currentAppId = session.GetString("appid"); + } +} \ No newline at end of file diff --git a/src/Common/H.LowCode.Application/H.LowCode.Application.csproj b/src/Common/H.LowCode.Application/H.LowCode.Application.csproj new file mode 100644 index 0000000000000000000000000000000000000000..723d85c874f7ad7b984025adf05f0625b95a06ec --- /dev/null +++ b/src/Common/H.LowCode.Application/H.LowCode.Application.csproj @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/Common/H.LowCode.Application/LowCodeApplicationModule.cs b/src/Common/H.LowCode.Application/LowCodeApplicationModule.cs new file mode 100644 index 0000000000000000000000000000000000000000..8bf9cfa3fde0489d7945257d83966603d4c28ebd --- /dev/null +++ b/src/Common/H.LowCode.Application/LowCodeApplicationModule.cs @@ -0,0 +1,13 @@ +using H.LowCode.Application.Contracts; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Modularity; + +namespace H.LowCode.Application; + +public class LowCodeApplicationModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddScoped(); + } +} diff --git a/src/Common/H.LowCode.ComponentBase/ComponentBaseModule.cs b/src/Common/H.LowCode.ComponentBase/ComponentBaseModule.cs index e84537bc183710fa0bdc80f42b7377495d9a48a1..96c03dd72d0a6901dd133ec0414cbbb659a6954f 100644 --- a/src/Common/H.LowCode.ComponentBase/ComponentBaseModule.cs +++ b/src/Common/H.LowCode.ComponentBase/ComponentBaseModule.cs @@ -6,6 +6,6 @@ public class ComponentBaseModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - // 基础组件模块配置 + } } \ No newline at end of file diff --git a/src/Common/H.LowCode.ComponentBase/H.LowCode.ComponentBase.csproj b/src/Common/H.LowCode.ComponentBase/H.LowCode.ComponentBase.csproj index c16f211d4ca461544b789493659b4276a419560c..f727529cc09a50c9335602390b0dcdcd49878cf3 100644 --- a/src/Common/H.LowCode.ComponentBase/H.LowCode.ComponentBase.csproj +++ b/src/Common/H.LowCode.ComponentBase/H.LowCode.ComponentBase.csproj @@ -8,8 +8,8 @@ - - + + @@ -18,6 +18,7 @@ + diff --git a/src/Common/H.LowCode.ComponentBase/LowCodeLayoutComponentBase.cs b/src/Common/H.LowCode.ComponentBase/LowCodeLayoutComponentBase.cs index 8f392844a894edfa018db885c8c68c7dfffb6d77..16887ee71904690bd6da931522bbf50e302615e8 100644 --- a/src/Common/H.LowCode.ComponentBase/LowCodeLayoutComponentBase.cs +++ b/src/Common/H.LowCode.ComponentBase/LowCodeLayoutComponentBase.cs @@ -25,7 +25,7 @@ public abstract class LowCodeLayoutComponentBase : LayoutComponentBase } } - private string _appId; + private string? _appId; protected string AppId { get @@ -39,6 +39,14 @@ public abstract class LowCodeLayoutComponentBase : LayoutComponentBase } } + protected string AppName + { + get + { + return AppId; //TODO: 以后改为通过 AppId 获取 AppName + } + } + protected Uri GetBaseUri() { return new Uri(NavigationManager.BaseUri); diff --git a/src/Common/H.LowCode.ComponentBase/Storages/ISessionStorageService.cs b/src/Common/H.LowCode.ComponentBase/Storages/ISessionStorageService.cs new file mode 100644 index 0000000000000000000000000000000000000000..3cbbf7bfd54cbb4215f6fe6ec25a0051d3d4d53c --- /dev/null +++ b/src/Common/H.LowCode.ComponentBase/Storages/ISessionStorageService.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace H.LowCode.ComponentBase; + +public interface ISessionStorageService +{ + Task SetAsync(string key, string value); + Task GetAsync(string key); + Task RemoveAsync(string key); + Task ClearAsync(); +} diff --git a/src/Common/H.LowCode.Entity/Base/EntityBase.cs b/src/Common/H.LowCode.Entity/Base/EntityBase.cs index 74b94a1153e24e9b461842559ebb82eda26ea8f5..7fca7602d9c75ebdb81c2c5a25a9f89b2b394624 100644 --- a/src/Common/H.LowCode.Entity/Base/EntityBase.cs +++ b/src/Common/H.LowCode.Entity/Base/EntityBase.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace H.LowCode.Entity; @@ -10,13 +6,16 @@ public abstract class EntityBase { protected EntityBase() { + ConcurrencyStamp = Guid.NewGuid().ToString("N"); } - public DateTime CreatedTime { get; set; } + public string ConcurrencyStamp { get; set; } - public string CreatedUser { get; set; } + public DateTime CreationTime { get; set; } - public DateTime ModifiedTime { get; set; } + public string? CreatorId { get; set; } - public string ModifiedUser { get; set; } + public DateTime? ModificationTime { get; set; } + + public string? ModifierId { get; set; } } diff --git a/src/Common/H.LowCode.Entity/EntityManager/FieldTypeMapping.cs b/src/Common/H.LowCode.Entity/EntityManager/FieldTypeMapping.cs index e1433e9c33a7a8794dd0d782c2e0e9ef4a88e729..15c6cbc51ad1f5880b49f595aa1b321cb1f57305 100644 --- a/src/Common/H.LowCode.Entity/EntityManager/FieldTypeMapping.cs +++ b/src/Common/H.LowCode.Entity/EntityManager/FieldTypeMapping.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,40 +9,85 @@ public class FieldTypeMapping { public static Type GetFieldType(string fieldType, bool isNullable) { - string type = fieldType.ToLower(); - if (fieldType != "char" && fieldType != "varchar" - && fieldType != "varchar[]") - type = $"{type}{(isNullable ? "?" : string.Empty)}"; + if (string.IsNullOrWhiteSpace(fieldType)) + throw new ArgumentNullException(nameof(fieldType)); - switch (type) + // 规范化原始类型文本 + string raw = fieldType.Trim().ToLowerInvariant(); + + // 处理数组类型(如 varchar[]) + bool isArray = raw.EndsWith("[]"); + if (isArray) + raw = raw[..^2]; + + // 去除可空标记(如果来源包含 ?) + raw = raw.TrimEnd('?'); + + // 去除长度/精度说明(如 char(36)、varchar(255)、decimal(12,2)) + int parenIndex = raw.IndexOf('('); + string baseType = parenIndex >= 0 ? raw[..parenIndex].Trim() : raw; + + // 基础类型映射 + Type result = baseType switch + { + // 字符类型统一映射到 string + "char" => typeof(string), + "varchar" => typeof(string), + "nchar" => typeof(string), + "nvarchar" => typeof(string), + "text" => typeof(string), + "string" => typeof(string), + + // 布尔 + "bool" => typeof(bool), + "bit" => typeof(bool), + + // 整数 + "int" => typeof(int), + "integer" => typeof(int), + "smallint" => typeof(int), // 简化映射 + "bigint" => typeof(long), + "long" => typeof(long), + "tinyint" => typeof(byte), + + // 小数 + "decimal" => typeof(decimal), + "numeric" => typeof(decimal), + "money" => typeof(decimal), + + // 日期时间 + "datetime" => typeof(DateTime), + "timestamp" => typeof(DateTime), + "date" => typeof(DateTime), + "datetime2" => typeof(DateTime), + + // Guid + "guid" => typeof(Guid), + "uniqueidentifier" => typeof(Guid), + + // 浮点 + "float" => typeof(double), + "double" => typeof(double), + "real" => typeof(float), + + _ => null! + }; + + // 处理 varchar[] 等数组(仅支持字符串数组) + if (isArray) { - case "char": - case "varchar": - return typeof(string); - case "bool": - return typeof(bool); - case "bool?": - return typeof(bool?); - case "int": - return typeof(int); - case "int?": - return typeof(int?); - case "long": - return typeof(long); - case "long?": - return typeof(long?); - case "decimal": - return typeof(decimal); - case "decimal?": - return typeof(decimal?); - case "datetime": - return typeof(DateTime); - case "datetime?": - return typeof(DateTime?); - case "varchar[]": + if (result == typeof(string)) return typeof(string[]); - default: - throw new NotSupportedException($"not support type: {type}"); + throw new NotSupportedException($"not support array type: {fieldType}"); } + + if (result == null) + throw new NotSupportedException($"not support type: {fieldType}"); + + // 处理可空值类型 + if (isNullable && result.IsValueType && Nullable.GetUnderlyingType(result) == null) + return typeof(Nullable<>).MakeGenericType(result); + + return result; } } \ No newline at end of file diff --git a/src/Common/H.LowCode.MetaSchema.DesignEngine/ComponentPartsSchema.cs b/src/Common/H.LowCode.MetaSchema.DesignEngine/ComponentPartsSchema.cs index b9159b30d3c166e4fdc553f0535ce5a2041e0b2c..b34e3b03de93e96b820172811a31e516f20463d6 100644 --- a/src/Common/H.LowCode.MetaSchema.DesignEngine/ComponentPartsSchema.cs +++ b/src/Common/H.LowCode.MetaSchema.DesignEngine/ComponentPartsSchema.cs @@ -18,13 +18,6 @@ public class ComponentPartsSchema : ComponentSchemaBase [JsonPropertyName("compid")] public required string ComponentId { get; set; } - /// - /// 组件物料Name - /// - /// 一类组件唯一Name - [JsonPropertyName("cn")] - public string? ComponentName { get; set; } - /// /// 组件类型:1-原子组件 2-组合组件 /// @@ -106,7 +99,7 @@ public class ComponentPartsSchema : ComponentSchemaBase //Copy全新对象, Id 重新生成 newComponent.Id = ShortIdGenerator.Generate(); newComponent.ParentId = string.Empty; - newComponent.Name = $"{newComponent.ComponentName}_{Random.Shared.Next(100, 999)}"; + newComponent.Name = $"{newComponent.ComponentId}_{Random.Shared.Next(100, 999)}"; newComponent.DesignState.IsSelected = false; //手动赋值无法序列化属性 diff --git a/src/Common/H.LowCode.MetaSchema/AppSchemaBase.cs b/src/Common/H.LowCode.MetaSchema/AppSchemaBase.cs index ee83a9dbf2fcab866993af43e669e3e77f45d575..d29bd6eb6ab062b17e03d7ae5e55771f25344676 100644 --- a/src/Common/H.LowCode.MetaSchema/AppSchemaBase.cs +++ b/src/Common/H.LowCode.MetaSchema/AppSchemaBase.cs @@ -17,6 +17,9 @@ public abstract class AppSchemaBase : MetaSchemaBase [JsonPropertyName("desc")] public string? Description { get; set; } + [JsonPropertyName("order")] + public int Order { get; set; } + [JsonPropertyName("v")] public string? Version { get; set; } diff --git a/src/Common/H.LowCode.MetaSchema/DataSourceSchema.cs b/src/Common/H.LowCode.MetaSchema/DataSourceSchema.cs index a48e8e402fb6fc793fcc235971b57d0797bb91a6..0b001be22b6fdbf504065cd69f68b1156173fc3c 100644 --- a/src/Common/H.LowCode.MetaSchema/DataSourceSchema.cs +++ b/src/Common/H.LowCode.MetaSchema/DataSourceSchema.cs @@ -6,18 +6,18 @@ namespace H.LowCode.MetaSchema; public class DataSourceSchema : MetaSchemaBase { [JsonPropertyName("aid")] - public string AppId { get; set; } + public required string AppId { get; set; } - public string Id { get; set; } = ShortIdGenerator.Generate(); + public required string Id { get; set; } [JsonPropertyName("n")] - public string Name { get; set; } + public string? Name { get; set; } [JsonPropertyName("disn")] - public string DisplayName { get; set; } + public string? DisplayName { get; set; } [JsonPropertyName("desc")] - public string Description { get; set; } + public string? Description { get; set; } [JsonPropertyName("order")] public int Order { get; set; } @@ -46,7 +46,7 @@ public class DataSourceSchema : MetaSchemaBase /// API 数据源 /// [JsonPropertyName("api")] - public APIDataSourceSchema API { get; set; } + public APIDataSourceSchema? API { get; set; } #endregion #region DataSourceType=Option @@ -54,17 +54,17 @@ public class DataSourceSchema : MetaSchemaBase /// 选项数据源 /// [JsonPropertyName("ops")] - public OptionDataSourceSchema[] Options { get; set; } + public OptionDataSourceSchema[]? Options { get; set; } /// /// /// - public string Value { get; set; } + public string? Value { get; set; } /// /// 字典数据源 /// [JsonPropertyName("vals")] - public IDictionary Values { get; set; } + public IDictionary? Values { get; set; } #endregion } \ No newline at end of file diff --git a/src/Common/H.LowCode.MetaSchema/DataSourceSchemas/TableFieldSchema.cs b/src/Common/H.LowCode.MetaSchema/DataSourceSchemas/TableFieldSchema.cs index b973818a16edbb49347c2dcdddcc95249db89c7b..241dc60b33e70f6d692d6908efab4b99394ec9cd 100644 --- a/src/Common/H.LowCode.MetaSchema/DataSourceSchemas/TableFieldSchema.cs +++ b/src/Common/H.LowCode.MetaSchema/DataSourceSchemas/TableFieldSchema.cs @@ -10,16 +10,16 @@ namespace H.LowCode.MetaSchema; public record TableFieldSchema { [JsonPropertyName("id")] - public string Id { get; set; } + public string? Id { get; set; } [JsonPropertyName("n")] - public string Name { get; set; } + public string? Name { get; set; } [JsonPropertyName("disn")] - public string DisplayName { get; set; } + public string? DisplayName { get; set; } [JsonPropertyName("type")] - public string Type { get; set; } + public string? Type { get; set; } [JsonPropertyName("pk")] public bool IsPrimaryKey { get; set; } @@ -34,5 +34,5 @@ public record TableFieldSchema public bool IsUnique { get; set; } [JsonPropertyName("m")] - public string Comments { get; set; } + public string? Comments { get; set; } } diff --git a/src/Common/H.LowCode.MetaSchema/MenuSchema.cs b/src/Common/H.LowCode.MetaSchema/MenuSchema.cs index 85afe7af25e9f18bc1c0882859a8a44e880a8384..c1bd6be7f12fc86209df573cd3bd049533314208 100644 --- a/src/Common/H.LowCode.MetaSchema/MenuSchema.cs +++ b/src/Common/H.LowCode.MetaSchema/MenuSchema.cs @@ -6,15 +6,15 @@ namespace H.LowCode.MetaSchema; public class MenuSchema : MetaSchemaBase { [JsonPropertyName("aid")] - public string AppId { get; set; } + public required string AppId { get; set; } - public string Id { get; set; } = ShortIdGenerator.Generate(); + public required string Id { get; set; } [JsonPropertyName("pid")] - public string ParentId { get; set; } + public string? ParentId { get; set; } [JsonPropertyName("t")] - public string Title { get; set; } + public string? Title { get; set; } /// /// 菜单类型 @@ -23,13 +23,13 @@ public class MenuSchema : MetaSchemaBase [JsonPropertyName("type")] public int MenuType { get; set; } - public string Icon { get; set; } + public string? Icon { get; set; } /// /// 菜单地址 /// [JsonPropertyName("path")] - public string MenuUrl { get; set; } + public string? MenuUrl { get; set; } public int Order { get; set; } diff --git a/src/Common/H.LowCode.MetaSchema/MetaSchemaBase.cs b/src/Common/H.LowCode.MetaSchema/MetaSchemaBase.cs index bb53e2bbdcdac7cbdc963971873bfaa7fa2e343a..aadca6aa162d7526a40103612a14ff3aa8025b79 100644 --- a/src/Common/H.LowCode.MetaSchema/MetaSchemaBase.cs +++ b/src/Common/H.LowCode.MetaSchema/MetaSchemaBase.cs @@ -5,15 +5,15 @@ namespace H.LowCode.MetaSchema; public abstract class MetaSchemaBase : StateHasChangeSchema { - [JsonPropertyName("cu")] - public string? CreatedUser { get; set; } + [JsonPropertyName("cid")] + public string? CreatorId { get; set; } [JsonPropertyName("ct")] - public DateTime? CreatedTime { get; set; } + public DateTime? CreationTime { get; set; } - [JsonPropertyName("mu")] - public string? ModifiedUser { get; set; } + [JsonPropertyName("mid")] + public string? ModifierId { get; set; } [JsonPropertyName("mt")] - public DateTime? ModifiedTime { get; set; } + public DateTime? ModificationTime { get; set; } } diff --git a/src/Common/H.LowCode.MetaSchema/PropertySchemas/ValidationRuleSchema.cs b/src/Common/H.LowCode.MetaSchema/PropertySchemas/ValidationRuleSchema.cs index 6ee2511d4e6dd99f7a17d093b9dd9d644f3849dd..491d4769155deced6d0572df98aa48eda83dc99b 100644 --- a/src/Common/H.LowCode.MetaSchema/PropertySchemas/ValidationRuleSchema.cs +++ b/src/Common/H.LowCode.MetaSchema/PropertySchemas/ValidationRuleSchema.cs @@ -21,6 +21,12 @@ public class ValidationRuleSchema [JsonPropertyName("cid")] public string ComponentId { get; set; } + /// + /// 是否启用 + /// + [JsonPropertyName("enabled")] + public bool IsEnabled { get; set; } + /// /// 校验规则类型 /// @@ -81,12 +87,6 @@ public class ValidationRuleSchema [JsonPropertyName("trigger")] public ValidationTriggerEnum Trigger { get; set; } = ValidationTriggerEnum.Blur; - /// - /// 是否启用 - /// - [JsonPropertyName("enabled")] - public bool IsEnabled { get; set; } = true; - /// /// 排序 /// diff --git a/src/DesignEngine/H.LowCode.DesignEngine.Application/AppServices/AppApplicationService.cs b/src/DesignEngine/H.LowCode.DesignEngine.Application/AppServices/AppApplicationService.cs index 414fded123269e6a9171e9d4a30e921eaaf979c7..37e91a365b54879af4dcb30798cab91efa940a60 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.Application/AppServices/AppApplicationService.cs +++ b/src/DesignEngine/H.LowCode.DesignEngine.Application/AppServices/AppApplicationService.cs @@ -1,4 +1,4 @@ -using H.LowCode.Configuration; +using H.LowCode.Configuration; using H.LowCode.DesignEngine.Application.Contracts; using H.LowCode.DesignEngine.Domain.Repositories; using H.LowCode.DesignEngine.Model; @@ -13,20 +13,28 @@ namespace H.LowCode.DesignEngine.Application; [RemoteService] public class AppApplicationService : ApplicationService, IAppApplicationService { - private IEnumerable _sites => LazyServiceProvider.GetRequiredService>>().Value; + private readonly IEnumerable _sites; + private readonly IAppRepository _repository; - private IAppRepository _repository => LazyServiceProvider.GetRequiredService(); + public AppApplicationService(IOptions> siteOptions, IAppRepository repository) + { + _sites = siteOptions.Value; + _repository = repository; + } public async Task> GetAppsAsync() { var appSchemas = await GetListAsync(); - return appSchemas.Select(x => new AppListModel + var apps = appSchemas.Select(x => new AppListModel { Id = x.Id, SiteUrl = _sites.FirstOrDefault(t => t.AppId.Equals(x.Id, StringComparison.OrdinalIgnoreCase))?.SiteUrl, Name = x.Name, - Description = x.Description - }).ToList(); + Description = x.Description, + Order = x.Order + }); + + return [.. apps.OrderBy(t => t.Order)]; } public async Task> GetListAsync() diff --git a/src/DesignEngine/H.LowCode.DesignEngine.Application/AppServices/DataSourceAppService.cs b/src/DesignEngine/H.LowCode.DesignEngine.Application/AppServices/DataSourceAppService.cs index e63439fd51c3b1e49b11ba2e00a98976dfbedbf4..ad126c7e456f10f19002ade4db8571dbc91a3084 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.Application/AppServices/DataSourceAppService.cs +++ b/src/DesignEngine/H.LowCode.DesignEngine.Application/AppServices/DataSourceAppService.cs @@ -30,7 +30,7 @@ public class DataSourceAppService : ApplicationService, IDataSourceAppService Order = dataSourceSchema.Order, DataSourceType = dataSourceSchema.DataSourceType, PublishStatus = dataSourceSchema.PublishStatus, - ModifiedTime = dataSourceSchema.ModifiedTime + ModifiedTime = dataSourceSchema.ModificationTime }; list.Add(model); } diff --git a/src/DesignEngine/H.LowCode.DesignEngine.EntityFrameworkCore/EntityFrameworkCore/DesignEngineDbContext.cs b/src/DesignEngine/H.LowCode.DesignEngine.EntityFrameworkCore/EntityFrameworkCore/DesignEngineDbContext.cs index adba260cb223bdd9f59c6aadabb004abfdc57e10..e378c74194d01a1fe89f5f83f0b73392aafc3c38 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.EntityFrameworkCore/EntityFrameworkCore/DesignEngineDbContext.cs +++ b/src/DesignEngine/H.LowCode.DesignEngine.EntityFrameworkCore/EntityFrameworkCore/DesignEngineDbContext.cs @@ -1,29 +1,29 @@ -using H.LowCode.DesignEngine.Domain; +using H.LowCode.Application.Contracts; using H.LowCode.Entity; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata.Builders; -using System; -using System.Collections.Generic; -using System.Linq; using System.Linq.Expressions; -using System.Reflection; -using System.Text; namespace H.LowCode.DesignEngine.EntityFrameworkCore; public class DesignEngineDbContext : DbContext { - public string AppId { get; private set; } + public string? AppId { get; private set; } - private DbContextOptions _dbOptions; + private DbContextOptions _dbOptions; private EntityTypeManager _entityTypeManager; - public DesignEngineDbContext(DbContextOptions options, - EntityTypeManager entityTypeManager) : base(options) + // Accept non-generic DbContextOptions so derived contexts with different generic options can pass theirs + public DesignEngineDbContext(DbContextOptions options, + EntityTypeManager entityTypeManager, + ICurrentApp currentApp) : base(options) { _dbOptions = options; _entityTypeManager = entityTypeManager; + + // 从应用上下文服务获取当前 AppId + AppId = currentApp.CurrentAppId; } public async Task AddAsync(FormEntity formEntity) @@ -146,7 +146,7 @@ public class DesignEngineDbContext : DbContext /// protected override void OnModelCreating(ModelBuilder modelBuilder) { - var dynamicEntities = _entityTypeManager.LoadDynamicEntities(); + var dynamicEntities = GetEntityTypes(); for (var i = 0; i < dynamicEntities.Count(); i++) { var dynamicEntity = dynamicEntities[i]; @@ -171,6 +171,12 @@ public class DesignEngineDbContext : DbContext base.OnModelCreating(modelBuilder); } + protected virtual IList GetEntityTypes() + { + var dynamicEntities = _entityTypeManager.LoadDynamicEntities(AppId); + return [.. dynamicEntities]; + } + private void ConfigureProperties(EntityTypeBuilder entityBuilder, DynamicEntityInfo dynamicEntity, Type entityType) { foreach (var field in dynamicEntity.Fields) diff --git a/src/DesignEngine/H.LowCode.DesignEngine.EntityFrameworkCore/EntityManager/EntityTypeManager.cs b/src/DesignEngine/H.LowCode.DesignEngine.EntityFrameworkCore/EntityManager/EntityTypeManager.cs index 2db9f50dceae5209c8b313915c77cc77ecdb071c..9f58da070f11e008626d067b27a0721bff027b7b 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.EntityFrameworkCore/EntityManager/EntityTypeManager.cs +++ b/src/DesignEngine/H.LowCode.DesignEngine.EntityFrameworkCore/EntityManager/EntityTypeManager.cs @@ -1,8 +1,9 @@ -using System.Reflection.Emit; -using System.Reflection; -using System.ComponentModel.DataAnnotations; +using H.LowCode.DesignEngine.Domain.Repositories; using H.LowCode.Entity; -using H.LowCode.DesignEngine.Domain.Repositories; +using System.ComponentModel.DataAnnotations; +using System.Reflection; +using System.Reflection.Emit; +using Volo.Abp.Domain.Entities; namespace H.LowCode.DesignEngine.EntityFrameworkCore; @@ -13,7 +14,7 @@ public class EntityTypeManager private const string _dynamicAssemblyName = "H.LowCode.DynamicEntity"; private const string _dynamicModuleName = "DynamicModule"; - private static List _dynamicEntities = []; + private static Dictionary> _dynamicEntitiesDic = []; private IDataSourceRepository _dataSourceRepository; @@ -22,14 +23,22 @@ public class EntityTypeManager _dataSourceRepository = dataSourceRepository; } - public IReadOnlyList LoadDynamicEntities() + public IReadOnlyList LoadDynamicEntities(string appId) { + if (string.IsNullOrEmpty(appId)) + { + throw new EntityNotFoundException($"{nameof(appId)} is empty"); + } + InitDynamicAssembly(); - if(_dynamicEntities.Count > 0) - return _dynamicEntities; + if (_dynamicEntitiesDic.ContainsKey(appId)) + return _dynamicEntitiesDic[appId]; + + var dynamicEntities = new List(); + + var entities = _dataSourceRepository.GetAllEntities(appId); - var entities = _dataSourceRepository.GetAllEntities("caseapp"); foreach (var entity in entities) { var fields = entity.TableFields.Select(f => new DynamicEntityField() @@ -54,10 +63,12 @@ public class EntityTypeManager EnableSoftDelete = entity.EnableSoftDelete, Fields = fields }; - _dynamicEntities.Add(dynamicEntity); - return _dynamicEntities; + dynamicEntities.Add(dynamicEntity); } - return _dynamicEntities; + + _dynamicEntitiesDic[appId] = dynamicEntities; + + return dynamicEntities; } private static void InitDynamicAssembly() diff --git a/src/DesignEngine/H.LowCode.DesignEngine.EntityFrameworkCore/H.LowCode.DesignEngine.EntityFrameworkCore.csproj b/src/DesignEngine/H.LowCode.DesignEngine.EntityFrameworkCore/H.LowCode.DesignEngine.EntityFrameworkCore.csproj index e815e4fa1788daebe14ee046df6c76731b83eae0..dd82138da6717ef492fd7bcefc7ec906acf5cda8 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.EntityFrameworkCore/H.LowCode.DesignEngine.EntityFrameworkCore.csproj +++ b/src/DesignEngine/H.LowCode.DesignEngine.EntityFrameworkCore/H.LowCode.DesignEngine.EntityFrameworkCore.csproj @@ -10,6 +10,7 @@ + diff --git a/src/DesignEngine/H.LowCode.DesignEngine.Host.Client/DesignEngineHostClientModule.cs b/src/DesignEngine/H.LowCode.DesignEngine.Host.Client/DesignEngineHostClientModule.cs index 3799cb308bf50c739a92f9e363a661fa551e16d3..6fb20389a36531e0fc4df98901f713d811394cbc 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.Host.Client/DesignEngineHostClientModule.cs +++ b/src/DesignEngine/H.LowCode.DesignEngine.Host.Client/DesignEngineHostClientModule.cs @@ -1,7 +1,9 @@ +using H.LowCode.Application; using H.LowCode.Application.Contracts; using H.LowCode.ComponentBase; using H.LowCode.Components.Defaults; using H.LowCode.DesignEngine.Application.Contracts; +using H.LowCode.DesignEngineBase; using H.LowCode.MyApp; using H.LowCode.PartsDesignEngine; using H.LowCode.Portal; @@ -17,8 +19,9 @@ namespace H.LowCode.DesignEngine.Host.Client; typeof(AbpAutofacWebAssemblyModule), //动态API代理 typeof(AbpHttpClientModule), - typeof(DesignEngineApplicationContractsModule), //=====lowcode-web=====// + typeof(DesignEngineBaseModule), + typeof(DesignEngineApplicationContractsModule), //Portal typeof(LowCodePortalModule), //DesignEngine @@ -41,10 +44,16 @@ public class DesignEngineHostClientModule : AbpModule //应用状态 context.Services.AddSingleton(new LowCodeAppState(true)); + + // 注册 Session 服务 + context.Services.AddScoped(); } private static void ConfigureHttpClient(ServiceConfigurationContext context, IWebAssemblyHostEnvironment environment) { + // 注册 HTTP 上下文访问器 + context.Services.AddHttpContextAccessor(); + context.Services.AddTransient(sp => new HttpClient { BaseAddress = new Uri(environment.BaseAddress) diff --git a/src/DesignEngine/H.LowCode.DesignEngine.Host.Client/Services/ClientSessionStorageService.cs b/src/DesignEngine/H.LowCode.DesignEngine.Host.Client/Services/ClientSessionStorageService.cs new file mode 100644 index 0000000000000000000000000000000000000000..2282042a04e869013c04fc476057912ab0ea8919 --- /dev/null +++ b/src/DesignEngine/H.LowCode.DesignEngine.Host.Client/Services/ClientSessionStorageService.cs @@ -0,0 +1,72 @@ +using H.LowCode.ComponentBase; +using Microsoft.JSInterop; +using System; +using System.Text.Json; + +namespace H.LowCode.DesignEngine.Host.Client; + +public class ClientSessionStorageService : ISessionStorageService +{ + private readonly IJSRuntime _jsRuntime; + + public ClientSessionStorageService(IJSRuntime jsRuntime) + { + _jsRuntime = jsRuntime; + } + + public async Task SetAsync(string key, string value) + { + try + { + await _jsRuntime.InvokeVoidAsync("sessionStorage.setItem", key, value); + } + catch (Exception ex) + { + Console.WriteLine($"Error storing session data: {ex.Message}"); + throw; + } + } + + public async Task GetAsync(string key) + { + try + { + var value = await _jsRuntime.InvokeAsync( + "sessionStorage.getItem", key); + + if (string.IsNullOrEmpty(value)) + return default; + + return value; + } + catch (Exception ex) + { + Console.WriteLine($"Error retrieving session data: {ex.Message}"); + return default; + } + } + + public async Task RemoveAsync(string key) + { + try + { + await _jsRuntime.InvokeVoidAsync("sessionStorage.removeItem", key); + } + catch (Exception ex) + { + Console.WriteLine($"Error removing session data: {ex.Message}"); + } + } + + public async Task ClearAsync() + { + try + { + await _jsRuntime.InvokeVoidAsync("sessionStorage.clear"); + } + catch (Exception ex) + { + Console.WriteLine($"Error clearing session data: {ex.Message}"); + } + } +} diff --git a/src/DesignEngine/H.LowCode.DesignEngine.Host/Components/App.razor b/src/DesignEngine/H.LowCode.DesignEngine.Host/Components/App.razor index a83049942390abeafb8ba6afcb7946297a697f61..b68caadcf5f7d5216cac8f3bf700d8e049cb0d40 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.Host/Components/App.razor +++ b/src/DesignEngine/H.LowCode.DesignEngine.Host/Components/App.razor @@ -23,12 +23,12 @@ - + - - + + diff --git a/src/DesignEngine/H.LowCode.DesignEngine.Host/DesignEngineHostModule.cs b/src/DesignEngine/H.LowCode.DesignEngine.Host/DesignEngineHostModule.cs index a725eb98ff9f7347421b8cb0f9ddb262b79bd6e0..9075233f1198197c798a4b9cc48f0c091532ec7f 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.Host/DesignEngineHostModule.cs +++ b/src/DesignEngine/H.LowCode.DesignEngine.Host/DesignEngineHostModule.cs @@ -1,8 +1,10 @@ +using H.LowCode.Application; using H.LowCode.ComponentBase; using H.LowCode.Components.Defaults; using H.LowCode.DesignEngine.Application; using H.LowCode.DesignEngine.EntityFrameworkCore; using H.LowCode.DesignEngine.Repository.JsonFile; +using H.LowCode.DesignEngineBase; using H.LowCode.MyApp; using H.LowCode.PartsDesignEngine; using H.LowCode.Portal; @@ -17,6 +19,8 @@ namespace H.LowCode.DesignEngine.Host; typeof(AbpAutofacModule), typeof(AbpAspNetCoreMvcModule), //=====lowcode-server=====// + typeof(LowCodeApplicationModule), + typeof(DesignEngineBaseModule), typeof(DesignEngineApplicationModule), typeof(DesignEngineEntityFrameworkCoreModule), typeof(DesignEngineJsonFileRepositoryModule), diff --git a/src/DesignEngine/H.LowCode.DesignEngine.Host/H.LowCode.DesignEngine.Host.csproj b/src/DesignEngine/H.LowCode.DesignEngine.Host/H.LowCode.DesignEngine.Host.csproj index 62561de502ec17ee5435041344306cf4a9de8511..2180a453969fe59bab67568973039379a3297cb5 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.Host/H.LowCode.DesignEngine.Host.csproj +++ b/src/DesignEngine/H.LowCode.DesignEngine.Host/H.LowCode.DesignEngine.Host.csproj @@ -13,6 +13,7 @@ + diff --git a/src/DesignEngine/H.LowCode.DesignEngine.Host/Program.cs b/src/DesignEngine/H.LowCode.DesignEngine.Host/Program.cs index 0a71a6f3196447db98ce789072d4007de116c2ad..1523980818e41b9be54fe095262432b79fae3666 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.Host/Program.cs +++ b/src/DesignEngine/H.LowCode.DesignEngine.Host/Program.cs @@ -1,10 +1,11 @@ +using H.LowCode.Application; +using H.LowCode.ComponentBase; +using H.LowCode.DesignEngine.Host; using H.LowCode.DesignEngine.Host.Client; -using System.Text.Json; using H.LowCode.DesignEngine.Host.Components; -using H.Util.Blazor; -using H.LowCode.DesignEngine.Host; using Microsoft.AspNetCore.ResponseCompression; using System.IO.Compression; +using System.Text.Json; var builder = WebApplication.CreateBuilder(args); @@ -34,7 +35,7 @@ builder.Services.AddControllers().AddJsonOptions(options => options.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; }); -// ������Ӧѹ�� +// 启用响应压缩 builder.Services.AddResponseCompression(options => { options.Providers.Add(); @@ -44,6 +45,10 @@ builder.Services.Configure(options => options.Level = CompressionLevel.Optimal; }); +// 注册 Session 服务 +builder.Services.AddSession(); +builder.Services.AddScoped(); + #region LowCode builder.Host.UseAutofac(); @@ -80,7 +85,9 @@ app.UseStaticFiles(new StaticFileOptions }); app.MapStaticAssets(); + app.UseRouting(); +app.UseSession(); app.UseAntiforgery(); app.MapControllers(); diff --git a/src/DesignEngine/H.LowCode.DesignEngine.Host/Services/ServerSessionStorageService.cs b/src/DesignEngine/H.LowCode.DesignEngine.Host/Services/ServerSessionStorageService.cs new file mode 100644 index 0000000000000000000000000000000000000000..73ec0e3bd6e96e56f9e3422b588e884e370aeee8 --- /dev/null +++ b/src/DesignEngine/H.LowCode.DesignEngine.Host/Services/ServerSessionStorageService.cs @@ -0,0 +1,79 @@ +using H.LowCode.ComponentBase; +using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage; +using System.Text; +using System.Text.Json; + +namespace H.LowCode.DesignEngine.Host; + +public class ServerSessionStorageService : ISessionStorageService +{ + private readonly IHttpContextAccessor _httpContextAccessor; + //private readonly ProtectedSessionStorage _sessionStorage; + + public ServerSessionStorageService( + //ProtectedSessionStorage sessionStorage, + IHttpContextAccessor httpContextAccessor) + { + _httpContextAccessor = httpContextAccessor; + //_sessionStorage = sessionStorage; + } + + public async Task SetAsync(string key, string value) + { + // 使用 ASP.NET Core 原生 Session + var httpContext = _httpContextAccessor.HttpContext; + if (httpContext?.Session != null) + { + httpContext.Session.SetString(key, value); + } + + // 同时存储到 ProtectedSessionStorage(用于服务端持久化) + //await _sessionStorage.SetAsync(key, value); + } + + public async Task GetAsync(string key) + { + // 首先尝试从 ASP.NET Core Session 获取 + var httpContext = _httpContextAccessor.HttpContext; + if (httpContext?.Session != null) + { + var value = httpContext.Session.GetString(key); + if (!string.IsNullOrEmpty(value)) + { + return value; + } + } + + // 如果 Session 中没有,尝试从 ProtectedSessionStorage 获取 + //try + //{ + // var result = await _sessionStorage.GetAsync(key); + // return result.Success ? result.Value : default; + //} + //catch + //{ + // return default; + //} + return null; + } + + public async Task RemoveAsync(string key) + { + var httpContext = _httpContextAccessor.HttpContext; + if (httpContext?.Session != null) + { + httpContext.Session.Remove(key); + } + + //await _sessionStorage.DeleteAsync(key); + } + + public async Task ClearAsync() + { + var httpContext = _httpContextAccessor.HttpContext; + if (httpContext?.Session != null) + { + httpContext.Session.Clear(); + } + } +} diff --git a/src/DesignEngine/H.LowCode.DesignEngine.Host/appsettings.json b/src/DesignEngine/H.LowCode.DesignEngine.Host/appsettings.json index 9d21e3cdebcf0e55f540ca33cd89ed86c0f8ea6d..3b9a41e6e947b94d6964308ae273cb31d98ad51a 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.Host/appsettings.json +++ b/src/DesignEngine/H.LowCode.DesignEngine.Host/appsettings.json @@ -28,7 +28,7 @@ "SiteUrl": "https://localhost:5191" }, { - "AppId": "timekeeping", + "AppId": "attendance", "SiteUrl": "https://localhost:5191" } ] diff --git a/src/DesignEngine/H.LowCode.DesignEngine.Model/Models/AppListModel.cs b/src/DesignEngine/H.LowCode.DesignEngine.Model/Models/AppListModel.cs index aeeea7f1923f59a452f4ac417e229402b6e37799..1dc5907dc19c3254bf314b63651862ff5706995e 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.Model/Models/AppListModel.cs +++ b/src/DesignEngine/H.LowCode.DesignEngine.Model/Models/AppListModel.cs @@ -22,6 +22,9 @@ public class AppListModel [JsonPropertyName("desc")] public string? Description { get; set; } + [JsonPropertyName("order")] + public int Order { get; set; } + [JsonPropertyName("pub")] public PublishStatusEnum PublishStatus { get; set; } diff --git a/src/DesignEngine/H.LowCode.DesignEngine.Model/PartsModels/ComponentPartsListModel.cs b/src/DesignEngine/H.LowCode.DesignEngine.Model/PartsModels/ComponentPartsListModel.cs index 2b29d2380c297b0222b31e2c70f748ce24b1f8c5..585fb895926b85771f4c3e393fd835201f1637db 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.Model/PartsModels/ComponentPartsListModel.cs +++ b/src/DesignEngine/H.LowCode.DesignEngine.Model/PartsModels/ComponentPartsListModel.cs @@ -13,9 +13,6 @@ public class ComponentPartsListModel [JsonPropertyName("compid")] public string ComponentId { get; set; } - [JsonPropertyName("cn")] - public string ComponentName { get; set; } - [JsonPropertyName("lb")] public string Label { get; set; } diff --git a/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/PartsRepositories/ComponentPartsRepository.cs b/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/PartsRepositories/ComponentPartsRepository.cs index 03c0cce725958468e9e8b0aba4908682ffee49f5..96a5aa01bcf01efc57cb1b5f0d503131fa6a53bf 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/PartsRepositories/ComponentPartsRepository.cs +++ b/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/PartsRepositories/ComponentPartsRepository.cs @@ -1,4 +1,4 @@ -using H.LowCode.Configuration; +using H.LowCode.Configuration; using H.LowCode.DesignEngine.Model; using H.LowCode.DesignEngine.Domain.Repositories; using H.LowCode.MetaSchema; @@ -29,7 +29,7 @@ public class ComponentPartsRepository : PartsFileRepositoryBase, IComponentParts if (!Directory.Exists(componentPartsFolder)) return list; - var files = Directory.GetFiles(componentPartsFolder); + var files = Directory.GetFiles(componentPartsFolder, "*.json"); foreach (var fileName in files) { if (fileName.EndsWith($"{libraryId}.json")) @@ -47,7 +47,6 @@ public class ComponentPartsRepository : PartsFileRepositoryBase, IComponentParts { LibraryId = componentPartsSchema.LibraryId, ComponentId = componentPartsSchema.ComponentId, - ComponentName = componentPartsSchema.ComponentName, ComponentType = componentPartsSchema.ComponentType, IsContainer = componentPartsSchema.IsContainer, IsSupportDataSource = componentPartsSchema.IsSupportDataSource, @@ -74,7 +73,7 @@ public class ComponentPartsRepository : PartsFileRepositoryBase, IComponentParts if (!Directory.Exists(componentPartsFolder)) return list; - var files = Directory.GetFiles(componentPartsFolder); + var files = Directory.GetFiles(componentPartsFolder, "*.json"); foreach (var fileName in files) { if (fileName.EndsWith($"{libraryId}.json")) diff --git a/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/Repositories/AppFileRepository.cs b/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/Repositories/AppFileRepository.cs index 5b194064ab3b39ec969a25dca8f330994908b81d..6da21d48a14f880fa126d6e42a31c79c1ccbf80b 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/Repositories/AppFileRepository.cs +++ b/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/Repositories/AppFileRepository.cs @@ -1,9 +1,7 @@ using H.LowCode.Configuration; using H.LowCode.DesignEngine.Domain.Repositories; -using H.LowCode.MetaSchema; using H.LowCode.MetaSchema.DesignEngine; using Microsoft.Extensions.Options; -using System.Collections.Generic; using System.Text; namespace H.LowCode.DesignEngine.Repository.JsonFile; @@ -46,7 +44,7 @@ public class AppFileRepository : FileRepositoryBase, IAppRepository ArgumentNullException.ThrowIfNull(appSchema); ArgumentException.ThrowIfNullOrEmpty(appSchema.Id); - appSchema.ModifiedTime = DateTime.UtcNow; + appSchema.ModificationTime = DateTime.UtcNow; string fileName = string.Format(appFileName_Format, _metaBaseDir, appSchema.Id, appSchema.Id); diff --git a/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/Repositories/DataSourceFileRepository.cs b/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/Repositories/DataSourceFileRepository.cs index 73dfe46488200e763d224f7f1405b803ffda47f3..333253024b722f721a2efd97fd904fbeff754142 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/Repositories/DataSourceFileRepository.cs +++ b/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/Repositories/DataSourceFileRepository.cs @@ -1,4 +1,4 @@ -using H.LowCode.Configuration; +using H.LowCode.Configuration; using H.LowCode.DesignEngine.Domain.Repositories; using H.LowCode.MetaSchema; using Microsoft.Extensions.Options; @@ -23,7 +23,7 @@ public class DataSourceFileRepository : FileRepositoryBase, IDataSourceRepositor if (!Directory.Exists(dataSourceFolder)) return list; - var files = Directory.GetFiles(dataSourceFolder); + var files = Directory.GetFiles(dataSourceFolder, "*.json"); foreach (var fileName in files) { var dataSourceSchemaJson = ReadAllText(fileName); @@ -58,7 +58,7 @@ public class DataSourceFileRepository : FileRepositoryBase, IDataSourceRepositor ArgumentNullException.ThrowIfNull(dataSourceSchema); ArgumentException.ThrowIfNullOrEmpty(dataSourceSchema.Id); - dataSourceSchema.ModifiedTime = DateTime.UtcNow; + dataSourceSchema.ModificationTime = DateTime.UtcNow; string fileName = string.Format(dataSourceName_Format, _metaBaseDir, appId, dataSourceSchema.Id); diff --git a/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/Repositories/MenuFileRepository.cs b/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/Repositories/MenuFileRepository.cs index c62a52f00e35de22f953b2c1cefd3b66721ae4d5..2d7b4d96267870df425038f09e44d7ffa6a816cb 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/Repositories/MenuFileRepository.cs +++ b/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/Repositories/MenuFileRepository.cs @@ -1,8 +1,7 @@ -using H.LowCode.Configuration; +using H.LowCode.Configuration; using H.LowCode.DesignEngine.Domain.Repositories; using H.LowCode.MetaSchema; using Microsoft.Extensions.Options; -using System.Collections.Generic; using System.Text; namespace H.LowCode.DesignEngine.Repository.JsonFile; @@ -36,7 +35,7 @@ public class MenuFileRepository : FileRepositoryBase, IMenuRepository if (!Directory.Exists(menuFolder)) return list; - var files = Directory.GetFiles(menuFolder); + var files = Directory.GetFiles(menuFolder, "*.json"); foreach (var fileName in files) { var menuSchemaJson = ReadAllText(fileName); @@ -55,7 +54,7 @@ public class MenuFileRepository : FileRepositoryBase, IMenuRepository ArgumentNullException.ThrowIfNull(menuSchema); ArgumentException.ThrowIfNullOrEmpty(menuSchema.Id); - menuSchema.ModifiedTime = DateTime.UtcNow; + menuSchema.ModificationTime = DateTime.UtcNow; string fileName = string.Format(menuFileName_Format, _metaBaseDir, menuSchema.AppId, menuSchema.Id); @@ -79,7 +78,7 @@ public class MenuFileRepository : FileRepositoryBase, IMenuRepository if (!Directory.Exists(menuFolder)) return; - var files = Directory.GetFiles(menuFolder); + var files = Directory.GetFiles(menuFolder, "*.json"); foreach (var file in files) { var menuSchemaJson = ReadAllText(file); diff --git a/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/Repositories/PageFileRepository.cs b/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/Repositories/PageFileRepository.cs index 384975aa52d5721127be250e114bdc139c381ac4..21656aec82b236a330f54998e205596fd284db50 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/Repositories/PageFileRepository.cs +++ b/src/DesignEngine/H.LowCode.DesignEngine.Repository.JsonFile/Repositories/PageFileRepository.cs @@ -1,4 +1,4 @@ -using H.LowCode.Configuration; +using H.LowCode.Configuration; using H.LowCode.DesignEngine.Model; using H.LowCode.DesignEngine.Domain.Repositories; using H.LowCode.MetaSchema.DesignEngine; @@ -24,7 +24,7 @@ public class PageFileRepository : FileRepositoryBase, IPageRepository if (!Directory.Exists(pageFolder)) return list; - var files = Directory.GetFiles(pageFolder); + var files = Directory.GetFiles(pageFolder, "*.json"); foreach (var fileName in files) { var pageSchemaJson = ReadAllText(fileName); @@ -37,7 +37,7 @@ public class PageFileRepository : FileRepositoryBase, IPageRepository Order = pageSchema.Order, PageType = pageSchema.PageType, PublishStatus = pageSchema.PublishStatus, - ModifiedTime = pageSchema.ModifiedTime + ModifiedTime = pageSchema.ModificationTime }; list.Add(model); @@ -63,7 +63,7 @@ public class PageFileRepository : FileRepositoryBase, IPageRepository ArgumentNullException.ThrowIfNull(pageSchema); ArgumentException.ThrowIfNullOrEmpty(pageSchema.Id); - pageSchema.ModifiedTime = DateTime.UtcNow; + pageSchema.ModificationTime = DateTime.UtcNow; string fileName = string.Format(pageFileName_Format, _metaBaseDir, pageSchema.AppId, pageSchema.Id); diff --git a/src/DesignEngine/H.LowCode.DesignEngine/SettingPanel/PageSetting.razor b/src/DesignEngine/H.LowCode.DesignEngine/SettingPanel/PageSetting.razor index 910ef51cb8e0243d1bb52a31c3506f4d78b47716..75fcfbe51c4acb57382f1553b7d61f6b5edd5045 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine/SettingPanel/PageSetting.razor +++ b/src/DesignEngine/H.LowCode.DesignEngine/SettingPanel/PageSetting.razor @@ -1,5 +1,6 @@ @namespace H.LowCode.DesignEngine @inherits DesignEngineLowCodeComponentBase +@inject IDataSourceAppService DataSourceAppService @if (Page != null) { @@ -26,15 +27,61 @@ {
- +
+ @if (!string.IsNullOrEmpty(_selectedDbDataSourceId)) + { +
+ +
+
表名:@_selectedDbDataSource?.Name
+
中文名:@_selectedDbDataSource?.DisplayName
+ @if (!string.IsNullOrEmpty(_selectedDbDataSource?.Description)) + { +
描述:@_selectedDbDataSource.Description
+ } +
+
+ } } else if (Page.DataSource.DataSourceType == PageDataSourceTypeEnum.API) {
- +
+ @if (!string.IsNullOrEmpty(_selectedApiDataSourceId)) + { +
+ +
+
名称:@_selectedApiDataSource?.DisplayName
+
请求:@_selectedApiDataSource?.API?.Method @(_selectedApiDataSource?.API?.Path)
+ @if (!string.IsNullOrEmpty(_selectedApiDataSource?.Description)) + { +
描述:@_selectedApiDataSource.Description
+ } +
+
+ } } } @@ -63,11 +110,28 @@ protected override async Task OnInitializedAsync() { await base.OnInitializedAsync(); + await LoadDataSourcesAsync(); + + // 如果已有配置,初始化选中态 + if (!string.IsNullOrEmpty(Page?.DataSource?.DataSourceId)) + { + if (Page.DataSource.DataSourceType == PageDataSourceTypeEnum.DB) + { + _selectedDbDataSourceId = Page.DataSource.DataSourceId; + await LoadSelectedDbDataSourceAsync(); + } + else if (Page.DataSource.DataSourceType == PageDataSourceTypeEnum.API) + { + _selectedApiDataSourceId = Page.DataSource.DataSourceId; + await LoadSelectedApiDataSourceAsync(); + } + } } private void OnLayoutChange(int pageLayout) { - BlazorEventDispatcher.Publish("designengine.pagesetting.pagelayout.onchange", pageLayout); + // 使用InvokeAsync确保在正确的线程上下文中执行 + InvokeAsync(() => BlazorEventDispatcher.Publish("designengine.pagesetting.pagelayout.onchange", pageLayout)); } private void OnStyleChange(string customStyle) @@ -78,6 +142,87 @@ private bool _eventVisible; private IList _eventList; + private IList _dbDataSources = new List(); + private IList _apiDataSources = new List(); + private string _selectedDbDataSourceId; + private string _selectedApiDataSourceId; + private DataSourceSchema _selectedDbDataSource; + private DataSourceSchema _selectedApiDataSource; + + private async Task LoadDataSourcesAsync() + { + try + { + var dbInput = new DataSourceInput { DataSourceType = ComponentDataSourceTypeEnum.DB }; + _dbDataSources = await DataSourceAppService.GetListAsync(Page.AppId, dbInput); + + var apiInput = new DataSourceInput { DataSourceType = ComponentDataSourceTypeEnum.API }; + _apiDataSources = await DataSourceAppService.GetListAsync(Page.AppId, apiInput); + } + catch (Exception ex) + { + Console.WriteLine($"加载数据源失败: {ex.Message}"); + } + } + + private async Task OnDbDataSourceSelected(DataSourceListModel selected) + { + if (selected == null) return; + _selectedDbDataSourceId = selected.Id; + await LoadSelectedDbDataSourceAsync(); + UpdatePageDataSourceForDb(); + } + + private async Task OnApiDataSourceSelected(DataSourceListModel selected) + { + if (selected == null) return; + _selectedApiDataSourceId = selected.Id; + await LoadSelectedApiDataSourceAsync(); + UpdatePageDataSourceForApi(); + } + + private async Task LoadSelectedDbDataSourceAsync() + { + if (string.IsNullOrEmpty(_selectedDbDataSourceId)) return; + try + { + _selectedDbDataSource = await DataSourceAppService.GetByIdAsync(Page.AppId, _selectedDbDataSourceId); + } + catch (Exception ex) + { + Console.WriteLine($"加载数据表详情失败: {ex.Message}"); + } + } + + private async Task LoadSelectedApiDataSourceAsync() + { + if (string.IsNullOrEmpty(_selectedApiDataSourceId)) return; + try + { + _selectedApiDataSource = await DataSourceAppService.GetByIdAsync(Page.AppId, _selectedApiDataSourceId); + } + catch (Exception ex) + { + Console.WriteLine($"加载 API 详情失败: {ex.Message}"); + } + } + + private void UpdatePageDataSourceForDb() + { + if (Page?.DataSource == null || _selectedDbDataSource == null) return; + Page.DataSource.DataSourceId = _selectedDbDataSource.Id; + Page.DataSource.DataSourceName = _selectedDbDataSource.DisplayName; + Page.DataSource.DataSourceValue = _selectedDbDataSource.Name; + } + + private void UpdatePageDataSourceForApi() + { + if (Page?.DataSource == null || _selectedApiDataSource == null) return; + Page.DataSource.DataSourceId = _selectedApiDataSource.Id; + Page.DataSource.DataSourceName = _selectedApiDataSource.DisplayName; + Page.DataSource.DataSourceValue = _selectedApiDataSource.API?.Path; + } + private void ShowEventModal() { _eventList = Page.Events ?? []; diff --git a/src/DesignEngine/H.LowCode.DesignEngine/SettingPanel/SettingPanel.razor b/src/DesignEngine/H.LowCode.DesignEngine/SettingPanel/SettingPanel.razor index e809ea24b4b39cae28af8354401f35c6c3ef3b3d..7502576b7cd17ed743ac735a84340dbc25c9d041 100644 --- a/src/DesignEngine/H.LowCode.DesignEngine/SettingPanel/SettingPanel.razor +++ b/src/DesignEngine/H.LowCode.DesignEngine/SettingPanel/SettingPanel.razor @@ -52,10 +52,14 @@ //订阅设计面板中的组件点击事件 BlazorEventDispatcher.Subscribe("designengine.draggableitem.onclick", (value) => { - _component = (ComponentPartsSchema)value; - _showPropertyPanel = true; - _tabs.ActivatePane("tab_property"); - StateHasChanged(); + if (value != null) + { + _component = (ComponentPartsSchema)value; + _showPropertyPanel = true; + _tabs.ActivatePane("tab_property"); + // 使用InvokeAsync确保在正确的线程上下文中执行 + InvokeAsync(StateHasChanged); + } }); //订阅设计面板取消选中事件 @@ -64,8 +68,9 @@ _component = null; _showPropertyPanel = false; _tabs.ActivatePane("tab_page"); - StateHasChanged(); + // 使用InvokeAsync确保在正确的线程上下文中执行 + InvokeAsync(StateHasChanged); }); } #endregion -} +} \ No newline at end of file diff --git a/src/DesignEngine/H.LowCode.DesignEngineBase/DesignEngineBaseModule.cs b/src/DesignEngine/H.LowCode.DesignEngineBase/DesignEngineBaseModule.cs new file mode 100644 index 0000000000000000000000000000000000000000..d7b1f4540bf1fdd2eb3406f155a3b94bcdc6ddbb --- /dev/null +++ b/src/DesignEngine/H.LowCode.DesignEngineBase/DesignEngineBaseModule.cs @@ -0,0 +1,13 @@ +using H.LowCode.Application.Contracts; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Modularity; + +namespace H.LowCode.DesignEngineBase; + +public class DesignEngineBaseModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + + } +} diff --git a/src/DesignEngine/H.LowCode.DesignEngineBase/DesignEngineDynamicComponentBase.cs b/src/DesignEngine/H.LowCode.DesignEngineBase/DesignEngineDynamicComponentBase.cs index 7b707f62cda2cc205aadf9b394150d7f476063e2..75778de20e7d9df9aef2c6d2294d282c3924d0de 100644 --- a/src/DesignEngine/H.LowCode.DesignEngineBase/DesignEngineDynamicComponentBase.cs +++ b/src/DesignEngine/H.LowCode.DesignEngineBase/DesignEngineDynamicComponentBase.cs @@ -4,7 +4,6 @@ using H.LowCode.MetaSchema.DesignEngine; using H.Util.Ids; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Rendering; -using System; namespace H.LowCode.DesignEngineBase; diff --git a/src/DesignEngine/H.LowCode.DesignEngineBase/DraggableComponents/ComponentItem.razor b/src/DesignEngine/H.LowCode.DesignEngineBase/DraggableComponents/ComponentItem.razor index a737b357bf52f5002389816fcf4097aaf1e45410..d1ee8051b7f87ff8e3c751428031c0b9e631a1c8 100644 --- a/src/DesignEngine/H.LowCode.DesignEngineBase/DraggableComponents/ComponentItem.razor +++ b/src/DesignEngine/H.LowCode.DesignEngineBase/DraggableComponents/ComponentItem.razor @@ -48,11 +48,11 @@ private RenderFragment GetRenderFragment() { - if (Component == null || Component.Fragment == null) + if (Component?.Fragment == null) throw new NullReferenceException($"{nameof(Component)} or {nameof(Component.Fragment)} is null"); if (string.IsNullOrEmpty(Component.Name)) - Component.Name = $"{Component.ComponentName}_{Random.Shared.Next(100, 999)}"; + Component.Name = $"{Component.ComponentId}_{Random.Shared.Next(100, 999)}"; if (string.IsNullOrEmpty(Component.Fragment.TypeName)) Component.Fragment.TypeName = Component.Fragment.DefaultTypeName; diff --git a/src/DesignEngine/H.LowCode.DesignEngineBase/DraggableComponents/DraggableContainer.razor b/src/DesignEngine/H.LowCode.DesignEngineBase/DraggableComponents/DraggableContainer.razor index 80593ebd849e906b74adda4c9999eb5f70d045c4..8682430e966977a81fe1dffa1c98fbf2b51b5354 100644 --- a/src/DesignEngine/H.LowCode.DesignEngineBase/DraggableComponents/DraggableContainer.razor +++ b/src/DesignEngine/H.LowCode.DesignEngineBase/DraggableComponents/DraggableContainer.razor @@ -59,7 +59,11 @@ //订阅 ComponentPanel 中的组件点击事件 BlazorEventDispatcher.Subscribe("designengine.dragitem.onclick", (value) => { - DragDropHandler((ComponentPartsSchema)value); + if (value != null) + { + // 使用InvokeAsync确保在正确的线程上下文中执行 + InvokeAsync(() => DragDropHandler((ComponentPartsSchema)value)); + } }); } } @@ -69,6 +73,9 @@ private void OnDrop() { var currentDragComponent = DragDropStateService.GetCurrentDragComponent(PageCascading.AppId, PageCascading.PageId); + if (currentDragComponent == null) + return; + DragDropHandler(currentDragComponent); //重置拖拽样式和动画状态 @@ -83,7 +90,8 @@ DragDropStateService.ResetDragStyle(PageCascading.AppId, PageCascading.PageId); } - BlazorEventDispatcher.Publish("designengine.draggableitem.onblur", null); + // 使用InvokeAsync确保在正确的线程上下文中执行 + InvokeAsync(() => BlazorEventDispatcher.Publish("designengine.draggableitem.onblur", null)); } private void OnItemClick(ComponentPartsSchema component) @@ -97,7 +105,8 @@ } component.DesignState.IsSelected = true; - StateHasChanged(); + // 使用InvokeAsync确保在正确的线程上下文中执行 + InvokeAsync(StateHasChanged); DragDropStateService.SetLastSelectedComponent(PageCascading.AppId, PageCascading.PageId, component); } @@ -105,15 +114,16 @@ private void OnItemDelete(ComponentPartsSchema component) { DraggableItem_Remove(ContainerComponent, component); - StateHasChanged(); + // 使用InvokeAsync确保在正确的线程上下文中执行 + InvokeAsync(StateHasChanged); } private void OnItemCopy(ComponentPartsSchema component) { var newComponent = component.DeepClone(); DragItem_Add(ContainerComponent, newComponent, null, false); - StateHasChanged(); - } + // 使用InvokeAsync确保在正确的线程上下文中执行 + InvokeAsync(StateHasChanged); } #endregion #region private @@ -143,11 +153,11 @@ } } - StateHasChanged(); + // 使用InvokeAsync确保在正确的线程上下文中执行 + InvokeAsync(StateHasChanged); //拖拽释放后将 LastDragOverComponent 置空(避免下一次(如空白区或Copy按钮)拖拽无放置区时,读取到了上次的放置区) - DragDropStateService.SetLastDragOverComponent(PageCascading.AppId, PageCascading.PageId, null); - } + DragDropStateService.SetLastDragOverComponent(PageCascading.AppId, PageCascading.PageId, null); } /// /// 新增 DragItem @@ -165,7 +175,7 @@ currentDragComponent.DesignState.IsSelected = isSelected; DragDropStateService.SetLastSelectedComponent(PageCascading.AppId, PageCascading.PageId, currentDragComponent); } - currentDragComponent.Refresh = StateHasChanged; + currentDragComponent.Refresh = () => InvokeAsync(StateHasChanged); //如果拖拽到放置区对象上方,按照顺序添加 if (dragOverComponent != null) diff --git a/src/DesignEngine/H.LowCode.DesignEngineBase/DraggableComponents/DraggableItem.razor b/src/DesignEngine/H.LowCode.DesignEngineBase/DraggableComponents/DraggableItem.razor index 4c1bd0f95fcf6367cdf5875b5a364dd4a9929915..96afa63a21fb8756255d07302d3ac650700366ec 100644 --- a/src/DesignEngine/H.LowCode.DesignEngineBase/DraggableComponents/DraggableItem.razor +++ b/src/DesignEngine/H.LowCode.DesignEngineBase/DraggableComponents/DraggableItem.razor @@ -15,9 +15,12 @@ transition: @(Component.DesignState.IsAnimating && !isDragging ? "transform 0.2s ease-out" : "none"); z-index: @(isDragging ? "9999" : "auto"); position: @(isDragging ? "relative" : "static"); + opacity: @(isDragging ? "0.6" : "1"); + pointer-events: @(isDragging ? "none" : "auto"); @Component.Style.DefaultStyle @Component.Style.CustomStyle" @onclick="OnClick" @onclick:stopPropagation @ondragstart="OnDragStart" @ondragstart:stopPropagation + @ondrag="OnDrag" @ondrag:stopPropagation @ondragenter="OnDragEnter" @ondragenter:preventDefault @ondragenter:stopPropagation @ondragover="OnDragOver" @ondragover:preventDefault @ondragover:stopPropagation @ondragleave="OnDragLeave" @ondragleave:stopPropagation @@ -94,6 +97,8 @@ //await JSRuntime.InvokeAsync("import", "./_content/H.LowCode.DesignEngineBase/js/elementUtils.js"); await UpdateDimensions(); + //设置拖拽图像(自定义 DragImage) -- 暂时屏蔽此逻辑,拖拽已改为跟随鼠标移动,无需设置拖拽图像 + //try { await JSRuntime.InvokeVoidAsync("elementUtils.attachDragImage", itemRef, Component?.Label ?? "组件"); } catch { } RegisterEventDispatcher(); } } @@ -123,8 +128,12 @@ //订阅 PageSetting 中的组件点击事件 BlazorEventDispatcher.Subscribe("designengine.pagesetting.pagelayout.onchange", (value) => { - PageCascading.PageLayout = (int)value; - StateHasChanged(); + if (value != null) + { + PageCascading.PageLayout = (int)value; + // 使用InvokeAsync确保在正确的线程上下文中执行 + InvokeAsync(StateHasChanged); + } }); } } @@ -136,6 +145,8 @@ .If("draggableitem-component", () => Component.IsContainer == false) .If("draggableitem-container", () => Component.IsContainer); + DraggableItemClassMapper.If("draggableitem-dragging", () => isDragging); + DraggableItemBoxClassMapper.Clear() .If("draggableitem-box-layout", () => Component.IsContainer) .If("draggableitem-animating", () => Component.DesignState.IsAnimating); @@ -153,7 +164,8 @@ ResetAllAnimationStates(); OnItemClick.Invoke(Component); - BlazorEventDispatcher.Publish("designengine.draggableitem.onclick", Component); + // 使用InvokeAsync确保在正确的线程上下文中执行 + InvokeAsync(() => BlazorEventDispatcher.Publish("designengine.draggableitem.onclick", Component)); } private void OnDragStart(DragEventArgs dragEventArgs) @@ -166,23 +178,18 @@ //记录当前选中对象 DragDropStateService.SetCurrentDragComponent(PageCascading.AppId, PageCascading.PageId, Component); - //重置所有组件的动画状态 - ResetAllAnimationStates(); + //拖拽开始前,清理兄弟组件残留动画,避免初始闪烁 + ClearSiblingAnimation(); } private void OnDragEnter(DragEventArgs dragEventArgs) { + // 更新最后悬停目标,但避免全量重置以防频繁进出同一目标导致闪烁 DragDropStateService.SetLastDragOverComponent(PageCascading.AppId, PageCascading.PageId, Component); - - //重置所有组件的动画状态 - ResetAllAnimationStates(); } private void OnDragOver(DragEventArgs dragEventArgs) { - Console.WriteLine($"OnDragOver:{isDragging}"); - TriggerCurrentSiblingAnimation(dragEventArgs.ClientX, dragEventArgs.ClientY); - var currentDragComponent = DragDropStateService.GetCurrentDragComponent(PageCascading.AppId, PageCascading.PageId); if (ReferenceEquals(currentDragComponent, Component)) return; @@ -230,6 +237,11 @@ ResetAllAnimationStates(); } + private void OnDrag(DragEventArgs dragEventArgs) + { + TriggerCurrentSiblingAnimation(dragEventArgs.ClientX, dragEventArgs.ClientY); + } + private void OnMouseOver() { if (Component.DesignState.IsSelected == false) @@ -262,8 +274,12 @@ // 使用 transform3d 优化性能,触发 GPU 加速,添加 will-change 提示浏览器优化 var currentDragComponent = DragDropStateService.GetCurrentDragComponent(PageCascading.AppId, PageCascading.PageId); - currentDragComponent.DesignState.AnimationTransform = $"translate3d({dragOffsetX}px, {dragOffsetY}px, 0)"; - currentDragComponent.DesignState.IsAnimating = true; + if (currentDragComponent != null) + { + currentDragComponent.DesignState.AnimationTransform = $"translate3d({dragOffsetX}px, {dragOffsetY}px, 0)"; + currentDragComponent.DesignState.IsAnimating = true; + currentDragComponent.RefreshState(); + } } private void OnDelete() @@ -283,16 +299,16 @@ /// private void ResetAllAnimationStates() { - // var rootComponent = DragDropStateService.GetRootComponent(PageCascading.AppId, PageCascading.PageId); - // if (rootComponent?.Childrens != null) - // { - // foreach (var child in rootComponent.Childrens) - // { - // child.DesignState.AnimationTransform = string.Empty; - // child.DesignState.IsAnimating = false; - // child.RefreshState(); - // } - // } + var rootComponent = DragDropStateService.GetRootComponent(PageCascading.AppId, PageCascading.PageId); + if (rootComponent?.Childrens != null) + { + foreach (var child in rootComponent.Childrens) + { + child.DesignState.AnimationTransform = string.Empty; + child.DesignState.IsAnimating = false; + child.RefreshState(); + } + } } /// @@ -391,19 +407,20 @@ /// private void ClearSiblingAnimation() { - // var rootComponent = DragDropStateService.GetRootComponent(PageCascading.AppId, PageCascading.PageId); - // if (rootComponent?.Childrens != null) - // { - // foreach (var child in rootComponent.Childrens) - // { - // if (!ReferenceEquals(child, DragDropStateService.GetCurrentDragComponent(PageCascading.AppId, PageCascading.PageId))) - // { - // child.DesignState.AnimationTransform = string.Empty; - // child.DesignState.IsAnimating = false; - // child.RefreshState(); - // } - // } - // } + var rootComponent = DragDropStateService.GetRootComponent(PageCascading.AppId, PageCascading.PageId); + if (rootComponent?.Childrens != null) + { + var currentDragComponent = DragDropStateService.GetCurrentDragComponent(PageCascading.AppId, PageCascading.PageId); + foreach (var child in rootComponent.Childrens) + { + if (!ReferenceEquals(child, currentDragComponent)) + { + child.DesignState.AnimationTransform = string.Empty; + child.DesignState.IsAnimating = false; + child.RefreshState(); + } + } + } } #endregion @@ -421,4 +438,4 @@ Console.WriteLine($"Error disposing DraggableItem: {ex.Message}"); } } -} \ No newline at end of file +} diff --git a/src/DesignEngine/H.LowCode.DesignEngineBase/DraggableComponents/DraggableItem.razor.css b/src/DesignEngine/H.LowCode.DesignEngineBase/DraggableComponents/DraggableItem.razor.css index 8353752723b7b9ae952cae674e1bbdafe2cc4236..8ff4ff3b2244772eb19e4016c026459bb6a1cd3a 100644 --- a/src/DesignEngine/H.LowCode.DesignEngineBase/DraggableComponents/DraggableItem.razor.css +++ b/src/DesignEngine/H.LowCode.DesignEngineBase/DraggableComponents/DraggableItem.razor.css @@ -1,8 +1,15 @@ .draggableitem-box { height: 85px; border: #f0f2f5 solid 2px; - transition: transform 0.3s ease-in-out; + transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1); will-change: transform; + /* 增强边框清晰度 */ +/* outline: 1px solid rgba(0, 0, 0, 0.05);*/ + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + /* 确保文字清晰度 */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; } .draggableitem-box-layout { @@ -10,7 +17,7 @@ } .draggableitem-animating { - transition: transform 0.3s ease-in-out; + transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1); will-change: transform; } @@ -24,6 +31,12 @@ transform: translate3d(0, 0, 0); backface-visibility: hidden; perspective: 1000px; + /* 增强文字和组件清晰度 */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; + /* 增强对比度 */ + filter: contrast(1.05); } /* 无法阻止冒泡, 改用 onmouseover, onmouseout 实现 */ @@ -65,6 +78,10 @@ display: flex; align-items: center; justify-content: center; + /* 增强图标清晰度 */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + filter: contrast(1.1) saturate(1.05); } .draggableitem-pointer-wrapper { @@ -79,13 +96,52 @@ justify-content: center; align-items: center; padding: 0 4px; + /* 添加边框增强可见性 */ + border: 1px solid rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); } .draggableitem-pointer { color: #fff; padding: 0 4px; + /* 增强图标清晰度 */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + filter: contrast(1.1) saturate(1.05); } .draggableitem-pointer:hover { cursor: pointer; - } \ No newline at end of file + } + +/* 添加拖拽动画相关样式 */ +.draggableitem-dragging { + z-index: 9999; + transform: translate3d(0, 0, 0) scale(1.02); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + transition: all 0.2s cubic-bezier(0.2, 0, 0.2, 1); +} + +.draggableitem-placeholder { + opacity: 0.5; + transform: scale(0.95); + transition: all 0.2s cubic-bezier(0.2, 0, 0.2, 1); +} + +/* 确保组件内部元素清晰度 */ +.draggableitem * { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; +} + +/* 特别优化Ant Design组件的清晰度 */ +.draggableitem .ant-typography, +.draggableitem .ant-input, +.draggableitem .ant-select, +.draggableitem .ant-btn { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; + filter: contrast(1.05) saturate(1.02); +} \ No newline at end of file diff --git a/src/DesignEngine/H.LowCode.DesignEngineBase/H.LowCode.DesignEngineBase.csproj b/src/DesignEngine/H.LowCode.DesignEngineBase/H.LowCode.DesignEngineBase.csproj index 0ac3607110675707fd3f59089f8d54916ff0cb32..a0872bb60e210939b0e97af6af46aff41b53d90e 100644 --- a/src/DesignEngine/H.LowCode.DesignEngineBase/H.LowCode.DesignEngineBase.csproj +++ b/src/DesignEngine/H.LowCode.DesignEngineBase/H.LowCode.DesignEngineBase.csproj @@ -10,6 +10,7 @@ +
diff --git a/src/DesignEngine/H.LowCode.DesignEngineBase/wwwroot/js/elementUtils.js b/src/DesignEngine/H.LowCode.DesignEngineBase/wwwroot/js/elementUtils.js index dd16f4472a63eb9850a7a46b278a400236dc2eb9..76f4a09466bde1daa26840aa9d63bc788b19b1d0 100644 --- a/src/DesignEngine/H.LowCode.DesignEngineBase/wwwroot/js/elementUtils.js +++ b/src/DesignEngine/H.LowCode.DesignEngineBase/wwwroot/js/elementUtils.js @@ -1,5 +1,5 @@ window.elementUtils = { - // ȡԪسߴϢmargin + // 获取元素尺寸信息,包括margin getDimensions: function (element) { if (!element) return null; @@ -7,7 +7,7 @@ window.elementUtils = { const computedStyle = window.getComputedStyle(element); const containerWidth = element.parentElement ? element.parentElement.getBoundingClientRect().width : 0; - // ʵʳߴ磨margin + // 计算实际尺寸(包括margin) const margin = { top: parseFloat(computedStyle.marginTop), right: parseFloat(computedStyle.marginRight), @@ -27,7 +27,7 @@ window.elementUtils = { }; }, - // Ϣ + // 计算容器信息 getContainerInfo: function (element) { if (!element || !element.parentElement) return null; @@ -46,4 +46,191 @@ window.elementUtils = { } }; } + , + // 获取鼠标下方的组件 id(忽略当前拖拽组件) + getComponentIdByPoint: function (x, y, ignoreId) { + try { + const elements = document.elementsFromPoint(x, y); + for (const el of elements) { + if (!el || !el.classList) continue; + if (el.classList.contains('draggableitem-box')) { + const id = el.getAttribute('data-component-id') || (el.dataset ? el.dataset.componentId : null); + if (id && id !== ignoreId) { + return id; + } + } + } + } catch (e) { + // ignore + } + return null; + } + , + // 为元素绑定 dragstart 事件,使用"整个 DraggableItem"作为拖拽图像 + attachDragImage: function (element, label) { + if (!element) return; + try { + element.addEventListener('dragstart', function (e) { + try { + // 1) 生成跟随鼠标的高对比覆盖层(而不是使用浏览器半透明的默认拖拽图像) + const target = element.querySelector('.draggableitem') || element; + const rect = target.getBoundingClientRect(); + + // 克隆原始元素以保持所有样式 + const clone = target.cloneNode(true); + clone.style.width = '100%'; + clone.style.height = '100%'; + + // 创建一个包裹容器来增强视觉效果 + const overlay = document.createElement('div'); + overlay.style.cssText = [ + 'position:fixed', + 'top:0', + 'left:0', + 'transform:translate(-9999px,-9999px)', + 'will-change:transform', + 'pointer-events:none', + 'z-index:2147483647', + 'width:' + rect.width + 'px', + 'height:' + rect.height + 'px', + 'background:transparent', + 'border: 1px solid #409eff', // 添加清晰的蓝色边框 + 'border-radius: 4px', + 'opacity: 0.6', // 调整透明度使内容更清晰 + 'box-shadow: 0 8px 16px rgba(0,0,0,0.2)', // 添加阴影增强视觉效果 + 'filter: contrast(1.1) saturate(1.05)', // 增强对比度和饱和度 + '-webkit-font-smoothing: antialiased', // 优化文字清晰度 + '-moz-osx-font-smoothing: grayscale', + 'text-rendering: optimizeLegibility' + ].join(';'); + overlay.appendChild(clone); + document.body.appendChild(overlay); + + // 特别优化克隆元素中的文字和图标清晰度 + const texts = overlay.querySelectorAll('span, div, p, h1, h2, h3, h4, h5, h6, label, .ant-typography'); + for (let i = 0; i < texts.length; i++) { + const textEl = texts[i]; + textEl.style.webkitFontSmoothing = 'antialiased'; + textEl.style.mozOsxFontSmoothing = 'grayscale'; + textEl.style.textRendering = 'optimizeLegibility'; + textEl.style.filter = 'contrast(1.15) saturate(1.1)'; + } + + // 优化图标清晰度 + const icons = overlay.querySelectorAll('.anticon, .icon, svg, i'); + for (let i = 0; i < icons.length; i++) { + const iconEl = icons[i]; + iconEl.style.webkitFontSmoothing = 'antialiased'; + iconEl.style.mozOsxFontSmoothing = 'grayscale'; + iconEl.style.filter = 'contrast(1.2) saturate(1.15)'; + } + + // 记录鼠标相对于组件中心的偏移,居中效果更直观 + const offsetX = rect.width / 2; + const offsetY = rect.height / 2; + element.__dragOverlay = overlay; + element.__dragOffsetX = offsetX; + element.__dragOffsetY = offsetY; + + // 设置 DataTransfer,提升不同浏览器/模式下的拖拽兼容性(WASM 下尤为重要) + if (e.dataTransfer) { + try { + e.dataTransfer.effectAllowed = 'move'; + e.dataTransfer.dropEffect = 'move'; + const id = element.getAttribute && element.getAttribute('data-component-id'); + e.dataTransfer.setData('text/plain', (label || id || 'drag')); + } catch {} + } + + // 2) 用一个 1x1 的透明元素作为 drag image,避免浏览器默认半透明图像影响清晰度 + const tiny = document.createElement('div'); + tiny.style.cssText = 'width:1px;height:1px;opacity:0;position:absolute;top:-9999px;left:-9999px'; + document.body.appendChild(tiny); + if (e.dataTransfer && e.dataTransfer.setDragImage) { + e.dataTransfer.setDragImage(tiny, 0, 0); + } + setTimeout(function () { try { document.body.removeChild(tiny); } catch {} }, 0); + + // 3) 跟随鼠标:在 WASM 模式下增加多事件回退以保证坐标获取 + let raf = 0; + const getPoint = function (ev) { + try { + if (ev && ev.touches && ev.touches.length) { + return { x: ev.touches[0].clientX, y: ev.touches[0].clientY }; + } + let x = typeof ev.clientX === 'number' ? ev.clientX : 0; + let y = typeof ev.clientY === 'number' ? ev.clientY : 0; + if ((!x && !y) && typeof ev.pageX === 'number' && typeof ev.pageY === 'number') { + const doc = document.documentElement || { scrollLeft: 0, scrollTop: 0 }; + const body = document.body || { scrollLeft: 0, scrollTop: 0 }; + const sl = doc.scrollLeft || body.scrollLeft || 0; + const st = doc.scrollTop || body.scrollTop || 0; + x = ev.pageX - sl; + y = ev.pageY - st; + } + return { x: x || 0, y: y || 0 }; + } catch { return { x: 0, y: 0 }; } + }; + const updateOverlay = function (ev) { + try { + if (!element.__dragOverlay) return; + if (raf) return; + raf = requestAnimationFrame(function () { + raf = 0; + const p = getPoint(ev); + const tx = p.x - element.__dragOffsetX; + const ty = p.y - element.__dragOffsetY; + element.__dragOverlay.style.transform = 'translate(' + tx + 'px,' + ty + 'px)'; + }); + } catch {} + }; + const onDragOver = function (ev) { updateOverlay(ev); }; + const onMouseMove = function (ev) { updateOverlay(ev); }; + const onTouchMove = function (ev) { updateOverlay(ev); }; + const onDragEnd = function () { + try { + window.removeEventListener('dragover', onDragOver, true); + document.removeEventListener('dragover', onDragOver, true); + element.removeEventListener('drag', onDragOver, true); + window.removeEventListener('mousemove', onMouseMove, true); + window.removeEventListener('touchmove', onTouchMove, true); + if (element.__dragOverlay && element.__dragOverlay.parentNode) { + element.__dragOverlay.parentNode.removeChild(element.__dragOverlay); + } + element.__dragOverlay = null; + } catch {} + }; + // 优先使用 dragover,其次使用 document/window 的 mousemove/touchmove 作为回退 + window.addEventListener('dragover', onDragOver, true); + document.addEventListener('dragover', onDragOver, true); + element.addEventListener('drag', onDragOver, true); + window.addEventListener('mousemove', onMouseMove, true); + window.addEventListener('touchmove', onTouchMove, { passive: true, capture: true }); + + // 始终允许页面上的 drop 行为,防止某些浏览器在未允许 drop 时过早结束拖拽 + const dragoverAllow = function (ev) { try { if (ev && ev.preventDefault) ev.preventDefault(); if (ev && ev.dataTransfer) ev.dataTransfer.dropEffect = 'move'; } catch {} }; + document.addEventListener('dragover', dragoverAllow, true); + document.addEventListener('dragenter', dragoverAllow, true); + document.addEventListener('drop', dragoverAllow, true); + + window.addEventListener('dragend', function(){ + try { + document.removeEventListener('dragover', dragoverAllow, true); + document.removeEventListener('dragenter', dragoverAllow, true); + document.removeEventListener('drop', dragoverAllow, true); + } catch {} + onDragEnd(); + }, { once: true }); + window.addEventListener('drop', function(){ + try { + document.removeEventListener('dragover', dragoverAllow, true); + document.removeEventListener('dragenter', dragoverAllow, true); + document.removeEventListener('drop', dragoverAllow, true); + } catch {} + onDragEnd(); + }, { once: true }); + } catch {} + }, { passive: true }); + } catch {} + } }; \ No newline at end of file diff --git a/src/DesignEngine/H.LowCode.MyApp/Pages/DataSource/APIDataSourceList.razor b/src/DesignEngine/H.LowCode.MyApp/Pages/DataSource/APIDataSourceList.razor index 2348bd60895cdf6405c8d8e51ca24472da700b54..44c593bbe4865a928abb4c2a3768f1158529f3c3 100644 --- a/src/DesignEngine/H.LowCode.MyApp/Pages/DataSource/APIDataSourceList.razor +++ b/src/DesignEngine/H.LowCode.MyApp/Pages/DataSource/APIDataSourceList.razor @@ -65,7 +65,7 @@ private bool _visible; private string _modalTitle; private Form _form; - private DataSourceSchema _dataSource = new DataSourceSchema(); + private DataSourceSchema _dataSource; protected override async Task OnInitializedAsync() { @@ -141,6 +141,7 @@ _dataSource = new() { AppId = AppId, + Id = ShortIdGenerator.Generate(), DataSourceType = ComponentDataSourceTypeEnum.API, API = new() }; diff --git a/src/DesignEngine/H.LowCode.MyApp/Pages/DataSource/OptionDataSourceList.razor b/src/DesignEngine/H.LowCode.MyApp/Pages/DataSource/OptionDataSourceList.razor index fc7ff6bdc028c88358e51203c828d8a5070195e4..86ad5b2a46768a87b3d4009500d71ecdc868d5db 100644 --- a/src/DesignEngine/H.LowCode.MyApp/Pages/DataSource/OptionDataSourceList.razor +++ b/src/DesignEngine/H.LowCode.MyApp/Pages/DataSource/OptionDataSourceList.razor @@ -13,8 +13,8 @@ @bind-PageIndex="@_pageIndex" @bind-PageSize="@_pageSize"> - - + + @@ -37,11 +37,7 @@ [Parameter] public string AppId { get; set; } - private IEnumerable _dataSource = - [ - new (){ Name = "option1", DisplayName="Option1", DataSourceType = ComponentDataSourceTypeEnum.Option }, - new (){ Name = "option2", DisplayName="Option2", DataSourceType = ComponentDataSourceTypeEnum.Option } - ]; + private IEnumerable _dataSource = []; private DataSourceSchema _currentDataSource; @@ -55,7 +51,13 @@ private async Task CreateAsync() { await Task.Delay(1); - _currentDataSource = new() { DataSourceType = ComponentDataSourceTypeEnum.DB }; + _currentDataSource = new() + { + AppId = AppId, + Id = ShortIdGenerator.Generate(), + DataSourceType = ComponentDataSourceTypeEnum.DB + }; + _visible = true; _modalTitle = "新建数据表"; StateHasChanged(); diff --git a/src/DesignEngine/H.LowCode.MyApp/Pages/DataSource/TableDataSourceList.razor b/src/DesignEngine/H.LowCode.MyApp/Pages/DataSource/TableDataSourceList.razor index 42812259e89ccb87bfac368a692399dc852d798b..d305512f15d990f7eac0e196a638f343a05e7e19 100644 --- a/src/DesignEngine/H.LowCode.MyApp/Pages/DataSource/TableDataSourceList.razor +++ b/src/DesignEngine/H.LowCode.MyApp/Pages/DataSource/TableDataSourceList.razor @@ -246,7 +246,12 @@ private async Task CreateAsync() { await Task.Delay(1); - _dataSource = new() { AppId = AppId, DataSourceType = ComponentDataSourceTypeEnum.DB }; + _dataSource = new() + { + AppId = AppId, + Id = ShortIdGenerator.Generate(), + DataSourceType = ComponentDataSourceTypeEnum.DB + }; _visible = true; _modalTitle = "新建数据表"; diff --git a/src/DesignEngine/H.LowCode.MyApp/Pages/MenuManager.razor b/src/DesignEngine/H.LowCode.MyApp/Pages/MenuManager.razor index fdd3db86de691f2be8d15a61ce9326662d610e53..5fcb05e4842d800aa29b7226e682bc590401dfc7 100644 --- a/src/DesignEngine/H.LowCode.MyApp/Pages/MenuManager.razor +++ b/src/DesignEngine/H.LowCode.MyApp/Pages/MenuManager.razor @@ -1,4 +1,4 @@ -@page "/myapp/{AppId}/menumanager" +@page "/myapp/{AppId}/menumanager" @namespace H.LowCode.MyApp @inherits DesignEngineLowCodePageComponentBase @layout MyAppLayout @@ -6,6 +6,35 @@ @inject IMenuAppService MenuAppService 菜单管理 +
@@ -23,7 +52,7 @@ RowKey="x=>x.Id" HidePagination DefaultExpandAllRows> - + @if(context.MenuType == 1) @@ -45,12 +74,11 @@ RowKey="x=>x.Id" HidePagination DefaultExpandAllRows>
- @if (context.ParentId.IsNullOrEmpty() == false) - { - - - - } + + + @RenderParentTreeNodes(GetSelectableParentMenus(context.Id)) + + @@ -61,7 +89,26 @@ RowKey="x=>x.Id" HidePagination DefaultExpandAllRows> - +
+ + + + + + @foreach (var icon in _iconList) + { + + + @icon + + } + + + + + + +
@if (context.MenuType == 0) { @@ -87,7 +134,7 @@ RowKey="x=>x.Id" HidePagination DefaultExpandAllRows> private bool _visible = false; private Form _form; - private MenuSchema _menuSchema = new MenuSchema(); + private MenuSchema _menuSchema; protected override async Task OnInitializedAsync() { @@ -108,8 +155,7 @@ RowKey="x=>x.Id" HidePagination DefaultExpandAllRows> private void CreateAsync(string parentId) { - _menuSchema = new MenuSchema(); - _menuSchema.AppId = AppId; + _menuSchema = new MenuSchema() { AppId = AppId, Id = ShortIdGenerator.Generate() }; _menuSchema.ParentId = parentId; _visible = true; @@ -165,4 +211,132 @@ RowKey="x=>x.Id" HidePagination DefaultExpandAllRows> { return await MenuAppService.SaveAsync(_menuSchema); } + + private readonly string[] _iconList = new[] + { + "home","appstore","menu","bars","database","setting","tool","api", + "user","team","cloud-upload","deployment-unit","bar-chart" + }; + + private void SelectIcon(string icon) + { + _menuSchema.Icon = icon; + StateHasChanged(); + } + + + private IEnumerable GetSelectableParentMenus(string currentId) + { + if (_menuList == null) + return Array.Empty(); + + var exclude = new HashSet(); + var current = FindMenuById(_menuList, currentId); + if (current != null) + { + exclude.Add(current.Id); + CollectDescendantIds(current, exclude); + } + + return FilterMenus(_menuList, exclude); + } + + private MenuSchema FindMenuById(IEnumerable nodes, string id) + { + if (string.IsNullOrWhiteSpace(id) || nodes == null) + return null; + + foreach (var n in nodes) + { + if (n.Id == id) + return n; + var found = FindMenuById(n.Childrens, id); + if (found != null) + return found; + } + return null; + } + + private void CollectDescendantIds(MenuSchema node, HashSet set) + { + if (node?.Childrens == null) + return; + foreach (var c in node.Childrens) + { + set.Add(c.Id); + CollectDescendantIds(c, set); + } + } + + private IEnumerable FilterMenus(IEnumerable nodes, HashSet exclude) + { + if (nodes == null) + return Array.Empty(); + var result = new List(); + foreach (var n in nodes) + { + if (exclude.Contains(n.Id)) + continue; + var copy = new MenuSchema + { + AppId = n.AppId, + Id = n.Id, + ParentId = n.ParentId, + Title = n.Title, + MenuType = n.MenuType, + Icon = n.Icon, + MenuUrl = n.MenuUrl, + Order = n.Order, + Childrens = new List() + }; + var children = FilterMenus(n.Childrens, exclude); + foreach (var c in children) + copy.Childrens.Add(c); + result.Add(copy); + } + return result; + } + + private RenderFragment RenderParentTreeNodes(IEnumerable nodes) => builder => + { + var seq = 0; + void AddNodes(IEnumerable ns) + { + if (ns == null) + return; + foreach (var m in ns) + { + builder.OpenComponent>(seq++); + builder.AddAttribute(seq++, "Title", m.Title); + builder.AddAttribute(seq++, "Key", m.Id); + if (m.Childrens != null && m.Childrens.Count > 0) + { + builder.AddAttribute(seq++, "ChildContent", (RenderFragment)(childBuilder => + { + var childSeq = 0; + void AddChildNodes(IEnumerable childNodes) + { + foreach (var cm in childNodes) + { + childBuilder.OpenComponent>(childSeq++); + childBuilder.AddAttribute(childSeq++, "Title", cm.Title); + childBuilder.AddAttribute(childSeq++, "Key", cm.Id); + if (cm.Childrens != null && cm.Childrens.Count > 0) + { + childBuilder.AddAttribute(childSeq++, "ChildContent", (RenderFragment)(grandChildBuilder => + { + AddChildNodes(cm.Childrens); + })); + } + childBuilder.CloseComponent(); + } + } + AddChildNodes(m.Childrens); + })); + } + builder.CloseComponent(); + } + } + AddNodes(nodes); + }; } \ No newline at end of file diff --git a/src/DesignEngine/H.LowCode.MyApp/Pages/MyApps/AppForm.razor b/src/DesignEngine/H.LowCode.MyApp/Pages/MyApps/AppForm.razor index 5a21864d93f1b863b80cbd6b7f13e538dd8dc153..82a9cdc56c4cd5a9d99e5b40740f69983ecf348f 100644 --- a/src/DesignEngine/H.LowCode.MyApp/Pages/MyApps/AppForm.razor +++ b/src/DesignEngine/H.LowCode.MyApp/Pages/MyApps/AppForm.razor @@ -18,6 +18,9 @@ ValidateOnChange="true"> + + + @code { diff --git a/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/ComponentLibraryManager.razor b/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/ComponentLibraryManager.razor index cabb682eacbeb41182cf674b5db3159815ea7e64..daedd59f399187f9fd60e23040c3e3ed3ce5bcb0 100644 --- a/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/ComponentLibraryManager.razor +++ b/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/ComponentLibraryManager.razor @@ -142,7 +142,7 @@ @component.Label
- @component.ComponentName + @component.ComponentId
@@ -176,12 +176,26 @@ 设计 } - - + + - + } + else + { + + }
@@ -349,7 +363,7 @@ private IEnumerable FilteredComponents => _componentParts?.Where(comp => string.IsNullOrEmpty(_componentSearchText) || - comp.ComponentName.Contains(_componentSearchText, StringComparison.OrdinalIgnoreCase) || + comp.ComponentId.Contains(_componentSearchText, StringComparison.OrdinalIgnoreCase) || comp.Label.Contains(_componentSearchText, StringComparison.OrdinalIgnoreCase)) ?? Enumerable.Empty(); @@ -504,6 +518,38 @@ } } + private async Task PublishComponent(string componentId) + { + try + { + var comp = await ComponentPartsAppService.GetByIdAsync(_selectedLibraryId, componentId); + comp.PublishStatus = 1; + await ComponentPartsAppService.SaveAsync(comp); + await LoadComponentPartsAsync(); + await Message.SuccessAsync("组件已发布"); + } + catch (Exception ex) + { + await Message.ErrorAsync($"发布失败:{ex.Message}"); + } + } + + private async Task UnpublishComponent(string componentId) + { + try + { + var comp = await ComponentPartsAppService.GetByIdAsync(_selectedLibraryId, componentId); + comp.PublishStatus = 0; + await ComponentPartsAppService.SaveAsync(comp); + await LoadComponentPartsAsync(); + await Message.SuccessAsync("已取消发布"); + } + catch (Exception ex) + { + await Message.ErrorAsync($"取消发布失败:{ex.Message}"); + } + } + private async Task OnComponentUpdated(ComponentPartsSchema componentParts) { // 刷新当前组件库的组件列表 diff --git a/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/ComponentPartsBasicForm.razor b/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/ComponentPartsBasicForm.razor index a808e1785a733808f9bea0c4063226d5759755f5..36bc1e9acf8f043f4f2ccaf3c530cdd2154524de 100644 --- a/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/ComponentPartsBasicForm.razor +++ b/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/ComponentPartsBasicForm.razor @@ -7,9 +7,9 @@
- +
@@ -53,6 +53,10 @@
+
+ + +
@@ -79,7 +83,8 @@ [Parameter] public EventCallback OnComponentUpdated { get; set; } - private ComponentPartsSchema? _componentParts; + private ComponentPartsSchema _componentParts; + private bool _isPublished = false; private bool _loading = false; private string _modalTitle => IsEditMode ? "编辑组件" : "新增组件"; @@ -99,13 +104,15 @@ _componentParts = new ComponentPartsSchema { Id = ShortIdGenerator.Generate(), - ComponentId = ShortIdGenerator.Generate(), + ComponentId = "", ComponentType = 1, // 默认原子组件 IsContainer = false, IsSupportDataSource = false, + PublishStatus = 0, Order = 0, Version = "0.0.1" }; + _isPublished = false; } } } @@ -125,6 +132,10 @@ Visible = false; await VisibleChanged.InvokeAsync(Visible); } + else + { + _isPublished = _componentParts.PublishStatus == 1; + } } catch (Exception ex) { @@ -140,9 +151,9 @@ private async Task OnOk() { // 手动验证必填字段 - if (string.IsNullOrWhiteSpace(_componentParts.ComponentName)) + if (string.IsNullOrWhiteSpace(_componentParts.ComponentId)) { - await Message.ErrorAsync("请输入组件名称"); + await Message.ErrorAsync("请输入组件Id"); return; } @@ -183,15 +194,15 @@ var componentParts = new ComponentPartsSchema { Id = ShortIdGenerator.Generate(), - ComponentId = ShortIdGenerator.Generate(), + ComponentId = _componentParts.ComponentId, LibraryId = LibraryId, - ComponentName = _componentParts.ComponentName, Label = _componentParts.Label, ComponentType = _componentParts.ComponentType, Order = _componentParts.Order, Version = _componentParts.Version, IsContainer = _componentParts.IsContainer, IsSupportDataSource = _componentParts.IsSupportDataSource, + PublishStatus = _isPublished ? 1 : 0, Description = _componentParts.Description, Fragment = new ComponentPartsFragmentSchema { @@ -227,13 +238,13 @@ var componentParts = await ComponentPartsAppService.GetByIdAsync(LibraryId, ComponentId); // 更新基本信息 - componentParts.ComponentName = _componentParts.ComponentName; componentParts.Label = _componentParts.Label; componentParts.ComponentType = _componentParts.ComponentType; componentParts.Order = _componentParts.Order; componentParts.Version = _componentParts.Version; componentParts.IsContainer = _componentParts.IsContainer; componentParts.IsSupportDataSource = _componentParts.IsSupportDataSource; + componentParts.PublishStatus = _isPublished ? 1 : 0; componentParts.Description = _componentParts.Description; // 保存更新 diff --git a/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/ComponentPartsDesignerPage.razor b/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/ComponentPartsDesignerPage.razor index 0572deb6f18c6814cdfc1db72a4031d06e31cff9..ed37b912fd47544cb77e2490d801d56456c4d6cd 100644 --- a/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/ComponentPartsDesignerPage.razor +++ b/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/ComponentPartsDesignerPage.razor @@ -6,7 +6,7 @@ @inject DragDropStateService DragDropStateService @inject IComponentPartsAppService ComponentPartsAppService -@($"{(_partsSchema?.ComponentName ?? PartsId)} - 低代码组件设计器") +@($"{(_partsSchema?.ComponentId ?? PartsId)} - 低代码组件设计器") @if (_loading) { @@ -22,7 +22,7 @@ else @("<") 返回
-

@(_partsSchema?.ComponentName ?? "新建低代码组件")

+

@(_partsSchema?.ComponentId ?? "新建低代码组件")

@@ -99,7 +99,6 @@ else ComponentId = PartsId, LibraryId = _libraryId, ComponentType = 2, // 低代码组件 - ComponentName = "新建低代码组件", Name = $"LowCodeComponent_{PartsId}", Order = 0, Version = "1.0.0", @@ -149,9 +148,9 @@ else StateHasChanged(); // 验证必填字段 - if (string.IsNullOrWhiteSpace(_partsSchema.ComponentName)) + if (string.IsNullOrWhiteSpace(_partsSchema.ComponentId)) { - await Message.WarningAsync("请输入组件名称!"); + await Message.WarningAsync("请输入组件Id!"); return; } diff --git a/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/ComponentPartsEditorPage.razor b/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/ComponentPartsEditorPage.razor index 7e7dca437eebbec80e30b9a7a9a3b2450e36d13d..b9065141e77b37a35cb805f81813ac751f98e3dd 100644 --- a/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/ComponentPartsEditorPage.razor +++ b/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/ComponentPartsEditorPage.razor @@ -5,7 +5,7 @@ @inject IComponentPartsAppService ComponentPartsAppService -@($"{_componentParts?.ComponentName ?? "组件"} - 原子组件编辑器") +@($"{_componentParts?.ComponentId ?? "组件"} - 原子组件编辑器")
@@ -14,7 +14,7 @@

- @(_componentParts?.ComponentName ?? "组件编辑") + @(_componentParts?.ComponentId ?? "组件编辑")

原子组件编辑器 diff --git a/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/Components/ComponentFragmentEditor.razor b/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/Components/ComponentFragmentEditor.razor index ef33408c9ae768560091c13244c1f061f068395a..acb42ce6447216b189abed31553c153f0392d410 100644 --- a/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/Components/ComponentFragmentEditor.razor +++ b/src/DesignEngine/H.LowCode.PartsDesignEngine/Pages/ComponentParts/Components/ComponentFragmentEditor.razor @@ -2,7 +2,7 @@ @inherits DesignEngineLowCodeComponentBase
- + @@ -47,10 +47,12 @@ var attr = Fragment.Attributes[i]; var currentIndex = i; - + - + + + @@ -69,7 +71,10 @@
- +
@@ -191,6 +196,17 @@ await FragmentChanged.InvokeAsync(Fragment); StateHasChanged(); } + + private static string GetAttrValueString(ComponentAttributeFragmentSchema attr) + { + return attr?.AttributeValue?.ToString() ?? string.Empty; + } + + private static void SetAttrValue(ComponentAttributeFragmentSchema attr, string value) + { + if (attr == null) return; + attr.AttributeValue = value; + } } - @**@ diff --git a/src/RenderEngine/H.LowCode.Themes.AntBlazor/PageRender/FormPageRender.razor b/src/RenderEngine/H.LowCode.Themes.AntBlazor/PageRender/FormPageRender.razor index 47005d5a5825930fd7a8e47ceee500ae91de7264..6aac2cfbbcc66039bd2983ed3231e1d49f8d8801 100644 --- a/src/RenderEngine/H.LowCode.Themes.AntBlazor/PageRender/FormPageRender.razor +++ b/src/RenderEngine/H.LowCode.Themes.AntBlazor/PageRender/FormPageRender.razor @@ -29,25 +29,42 @@ @code { [Parameter] - public required PageSchema Page { get; set; } + public PageSchema Page { get; set; } [PersistentState] - public required FormDataDto _formDto { get; set; } + public FormDataDto _formDto { get; set; } private string? Id; - public required Dictionary _fieldDictData; + public Dictionary _fieldDictData; protected override async Task OnInitializedAsync() { await base.OnInitializedAsync(); Id = GetQueryValue("id"); - _formDto = await FormDataAppService.GetAsync(Page.AppId, Page.Id, Id); - - if (_formDto.Fields == null) - _fieldDictData = new Dictionary(); + if (string.IsNullOrEmpty(Id)) + { + _formDto = new FormDataDto + { + Name = Page?.DataSource?.DataSourceValue, + Fields = Page.Components + .Where(t => t.IsContainer == false) + .Select(t => new FormFieldDto + { + Name = t.Name, + TypeName = t.Fragment.ValueType, + Value = t.Fragment.GetDefaultValue() + }).ToList() + }; + } else - _fieldDictData = _formDto.Fields.ToDictionary(x => x.Name, x => x.Value); + { + _formDto = await FormDataAppService.GetAsync(Page.AppId, Page.Id, Id); + } + + _fieldDictData = (_formDto.Fields == null) + ? new Dictionary() + : _formDto.Fields.ToDictionary(x => x.Name, x => x.Value); } private async Task OnFinishAsync() diff --git a/src/RenderEngine/H.LowCode.Themes.AntBlazor/Pages/HomePage.razor b/src/RenderEngine/H.LowCode.Themes.AntBlazor/Pages/HomePage.razor index 56524eb220e205c9eaf699e29d830e308252daba..53f65f7c01f8fde1e0f9147f2575e36eacadcc8e 100644 --- a/src/RenderEngine/H.LowCode.Themes.AntBlazor/Pages/HomePage.razor +++ b/src/RenderEngine/H.LowCode.Themes.AntBlazor/Pages/HomePage.razor @@ -1,7 +1,7 @@ @page "/" @page "/{AppId}/index" @namespace H.LowCode.Themes.AntBlazor -@inherits LowCodePageComponentBase +@inherits RenderEnginePageComponentBase @layout AntBlazorThemeLayout 首页 @@ -9,7 +9,5 @@

首页

@code { - [Parameter] - public string AppId { get; set; } - + } diff --git a/src/RenderEngine/H.LowCode.Themes.AntBlazor/Pages/MetaPage.razor b/src/RenderEngine/H.LowCode.Themes.AntBlazor/Pages/MetaPage.razor index b4ab99fbba4df4b41a2494f6b29fc2f297826446..30f83568189db3ff776b75bbe85b72e9dbd1723a 100644 --- a/src/RenderEngine/H.LowCode.Themes.AntBlazor/Pages/MetaPage.razor +++ b/src/RenderEngine/H.LowCode.Themes.AntBlazor/Pages/MetaPage.razor @@ -1,11 +1,11 @@ @page "/{AppId}/{PageId}" @namespace H.LowCode.Themes.AntBlazor -@inherits LowCodePageComponentBase +@inherits RenderEnginePageComponentBase @layout AntBlazorThemeLayout @inject IMetaAppService MetaAppService -@($"{_pageCascadingModel.PageName}") +@(_pageCascadingModel?.PageName ?? "加载中...") @if (_pageSchema != null) @@ -24,25 +24,24 @@ } else { - throw new NotImplementedException($"PageType: {_pageSchema.PageType}"); + } } - @code { - [Parameter] - public string AppId { get; set; } - +@code { [Parameter] public string PageId { get; set; } [PersistentState] - public required PageSchema _pageSchema { get; set; } + public PageSchema _pageSchema { get; set; } private PageCascadingModel _pageCascadingModel; protected override async Task OnInitializedAsync() { + await base.OnInitializedAsync(); + _pageCascadingModel = new() { AppId = AppId, PageId = PageId, PageName = "..." }; _pageSchema = await LoadPageSchemaAsync(); diff --git a/src/RenderEngine/H.LowCode.Themes.AntBlazor/Pages/MetaPage_Test.razor b/src/RenderEngine/H.LowCode.Themes.AntBlazor/Pages/MetaPage_Test.razor index da49418fe057dadceacdd318aa257c395faa6c8d..274c84fb1d580a2ea850678a286d8bbc42bcc819 100644 --- a/src/RenderEngine/H.LowCode.Themes.AntBlazor/Pages/MetaPage_Test.razor +++ b/src/RenderEngine/H.LowCode.Themes.AntBlazor/Pages/MetaPage_Test.razor @@ -1,6 +1,6 @@ @page "/caseapp/test" @namespace H.LowCode.Themes.AntBlazor -@inherits LowCodePageComponentBase +@inherits RenderEnginePageComponentBase @layout AntBlazorThemeLayout @inject IMetaAppService MetaAppService diff --git a/src/RenderEngine/H.LowCode.Themes.AntBlazor/_Imports.razor b/src/RenderEngine/H.LowCode.Themes.AntBlazor/_Imports.razor index 8a7647bc06b2560d8c58ddbe8be1c5e40d71b2e7..6c983c36eb48548f5fcde140ff284f5f036f9a8d 100644 --- a/src/RenderEngine/H.LowCode.Themes.AntBlazor/_Imports.razor +++ b/src/RenderEngine/H.LowCode.Themes.AntBlazor/_Imports.razor @@ -8,7 +8,7 @@ @using AntDesign.ProLayout @using H.LowCode.Application.Contracts @using H.LowCode.ComponentBase -@using H.LowCode.RenderEngine.Abstraction +@using H.LowCode.RenderEngineBase @using H.LowCode.RenderEngine.Application.Contracts @using H.LowCode.MetaSchema @using H.LowCode.MetaSchema.RenderEngine diff --git a/src/Tools/H.LowCode.DbMigrator/DbMigrationService.cs b/src/Tools/H.LowCode.DbMigrator/DbMigrationService.cs index 91c6a7f360fc6f11ed6c7e29ed8eb93306faefe6..a625ff7dccfc5e181b0783eed5e46da1e263c41d 100644 --- a/src/Tools/H.LowCode.DbMigrator/DbMigrationService.cs +++ b/src/Tools/H.LowCode.DbMigrator/DbMigrationService.cs @@ -1,13 +1,7 @@ -using Microsoft.Extensions.Logging.Abstractions; -using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using Microsoft.Extensions.Logging.Abstractions; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; +using Microsoft.Extensions.Logging; namespace H.LowCode.DbMigrator; @@ -17,13 +11,16 @@ public class DbMigrationService : ITransientDependency private readonly IDataSeeder _dataSeeder; private readonly IEnumerable _dbSchemaMigrators; + private readonly MigrationCurrentApp _currentApp; public DbMigrationService( IDataSeeder dataSeeder, - IEnumerable dbSchemaMigrators) + IEnumerable dbSchemaMigrators, + MigrationCurrentApp currentApp) { _dataSeeder = dataSeeder; _dbSchemaMigrators = dbSchemaMigrators; + _currentApp = currentApp; Logger = NullLogger.Instance; } @@ -32,8 +29,15 @@ public class DbMigrationService : ITransientDependency { Logger.LogInformation("Started database migrations..."); + // 首先执行数据库架构迁移(不依赖 AppId) await MigrateDatabaseSchemaAsync(); - await SeedDataAsync(); + + // 然后遍历所有应用进行数据种子 + await _currentApp.ForEachAppAsync(async (appId) => + { + Logger.LogInformation("开始为应用 {AppId} 执行数据种子", appId); + await SeedDataAsync(); + }); Logger.LogInformation("Successfully completed all database migrations."); Logger.LogInformation("You can safely end this process..."); diff --git a/src/Tools/H.LowCode.DbMigrator/H.LowCode.DbMigrator.csproj b/src/Tools/H.LowCode.DbMigrator/H.LowCode.DbMigrator.csproj index c3856882bbbc3b4a4b9d280e932d70288bc0baa2..2a69caaa928b6dbbc9233f799fc5dd27f83a9f31 100644 --- a/src/Tools/H.LowCode.DbMigrator/H.LowCode.DbMigrator.csproj +++ b/src/Tools/H.LowCode.DbMigrator/H.LowCode.DbMigrator.csproj @@ -25,6 +25,8 @@ + + diff --git a/src/Tools/H.LowCode.DbMigrator/LowCodeDbMigratorModule.cs b/src/Tools/H.LowCode.DbMigrator/LowCodeDbMigratorModule.cs index fada74e7aa0e58b4839547e61a1ed7f63f449415..28c894ff3a398e4f5bf277b8c14af8b5c775258d 100644 --- a/src/Tools/H.LowCode.DbMigrator/LowCodeDbMigratorModule.cs +++ b/src/Tools/H.LowCode.DbMigrator/LowCodeDbMigratorModule.cs @@ -1,6 +1,8 @@ -using H.LowCode.DesignEngine.EntityFrameworkCore; +using H.LowCode.DesignEngine.Application; +using H.LowCode.DesignEngine.EntityFrameworkCore; using H.LowCode.DesignEngine.Repository.JsonFile; using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Diagnostics; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Data; @@ -10,7 +12,8 @@ namespace H.LowCode.DbMigrator; [DependsOn( typeof(DesignEngineJsonFileRepositoryModule), - typeof(DesignEngineEntityFrameworkCoreModule) + typeof(DesignEngineEntityFrameworkCoreModule), + typeof(DesignEngineApplicationModule) )] public class LowCodeDbMigratorModule : AbpModule { @@ -20,12 +23,18 @@ public class LowCodeDbMigratorModule : AbpModule context.Services.AddTransient(); + // 注册迁移专用的应用上下文服务 + context.Services.AddScoped(); + //使用 MigratorDbContext 而不是 DesignEngineDbContext 的原因为需要指定迁移程序集,但又不想在 DesignEngineDbContext 中指定迁移程序集。 context.Services.AddDbContext(options => { var connectionString = context.Services.GetConfiguration().GetConnectionString("Default"); - string migrationAssembly = typeof(DesignEngineEntityFrameworkCoreModule).Namespace; - options.UseSqlServer(connectionString, b => b.MigrationsAssembly(migrationAssembly)); + // Ensure migrations assembly points to this DbMigrator project so runtime can find generated migrations + var migrationAssembly = typeof(LowCodeDbMigratorModule).Assembly.GetName().Name; + options + .UseSqlServer(connectionString, b => b.MigrationsAssembly(migrationAssembly)) + .ConfigureWarnings(warnings => warnings.Ignore(RelationalEventId.PendingModelChangesWarning)); }); } } diff --git a/src/Tools/H.LowCode.DbMigrator/MigrationGenerator/MigratorDbContextFactory.cs b/src/Tools/H.LowCode.DbMigrator/MigrationGenerator/MigratorDbContextFactory.cs index b5c9b67c2f9e7bae12f591276e5d4765d8dc23ce..3803885edf4da12021bda0586a23afe3f07a259d 100644 --- a/src/Tools/H.LowCode.DbMigrator/MigrationGenerator/MigratorDbContextFactory.cs +++ b/src/Tools/H.LowCode.DbMigrator/MigrationGenerator/MigratorDbContextFactory.cs @@ -1,14 +1,9 @@ -using Microsoft.EntityFrameworkCore.Design; +using H.LowCode.DesignEngine.EntityFrameworkCore; +using H.LowCode.DesignEngine.Repository.JsonFile; using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Design; using Microsoft.Extensions.Configuration; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; -using H.LowCode.DesignEngine.EntityFrameworkCore; -using H.LowCode.DesignEngine.Repository.JsonFile; namespace H.LowCode.DbMigrator; @@ -25,18 +20,19 @@ public class MigratorDbContextFactory : IDesignTimeDbContextFactory() - .UseSqlServer(configuration.GetConnectionString("Default"), b => b.MigrationsAssembly(migrationAssembly)); + string connectionString = configuration.GetConnectionString("Default"); + var builder = new DbContextOptionsBuilder() + .UseSqlServer(connectionString, b => b.MigrationsAssembly(migrationAssembly)); var services = new ServiceCollection(); services.AddApplication(); services.AddApplication(); var serviceProvider = services.BuildServiceProvider(); EntityTypeManager entityTypeManager = serviceProvider.GetService(); + MigrationCurrentApp currentApp = serviceProvider.GetService(); - return new MigratorDbContext(builder.Options, entityTypeManager); + return new MigratorDbContext(builder.Options, entityTypeManager, currentApp); } } diff --git a/src/Tools/H.LowCode.DbMigrator/MigrationServices/MigratorDbContext.cs b/src/Tools/H.LowCode.DbMigrator/MigrationServices/MigratorDbContext.cs index 1cccf4d78fd092f76f2c47f54bd5d9dccc7e81a7..98cda5fedfae153b00be7ced61f262589b339f60 100644 --- a/src/Tools/H.LowCode.DbMigrator/MigrationServices/MigratorDbContext.cs +++ b/src/Tools/H.LowCode.DbMigrator/MigrationServices/MigratorDbContext.cs @@ -1,10 +1,6 @@ -using H.LowCode.DesignEngine.EntityFrameworkCore; +using H.LowCode.DesignEngine.EntityFrameworkCore; +using H.LowCode.Entity; using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace H.LowCode.DbMigrator; @@ -15,8 +11,26 @@ namespace H.LowCode.DbMigrator; ///
public class MigratorDbContext : DesignEngineDbContext { - public MigratorDbContext(DbContextOptions options, - EntityTypeManager entityTypeManager) : base(options, entityTypeManager) + private readonly EntityTypeManager _entityTypeManager; + private readonly MigrationCurrentApp _currentApp; + + public MigratorDbContext(DbContextOptions options, + EntityTypeManager entityTypeManager, + MigrationCurrentApp currentApp) : base(options, entityTypeManager, currentApp) + { + _entityTypeManager = entityTypeManager; + _currentApp = currentApp; + } + + protected override IList GetEntityTypes() { + IList dynamicEntities = []; + // 同步等待遍历所有应用,确保实体完整加载 + _currentApp.ForEachAppAsync(async (appId) => + { + var currentAppDynamicEntities = _entityTypeManager.LoadDynamicEntities(appId); + dynamicEntities = [.. dynamicEntities, .. currentAppDynamicEntities]; + }).GetAwaiter().GetResult(); + return dynamicEntities; } } diff --git a/src/Tools/H.LowCode.DbMigrator/Migrations/20250225020741_Initial.Designer.cs b/src/Tools/H.LowCode.DbMigrator/Migrations/20251116160054_Init.Designer.cs similarity index 40% rename from src/Tools/H.LowCode.DbMigrator/Migrations/20250225020741_Initial.Designer.cs rename to src/Tools/H.LowCode.DbMigrator/Migrations/20251116160054_Init.Designer.cs index d22c1f64569a42e9f07817fb41e767fafa1a753e..966861ba1f682efe3b25efc72052c01255579c12 100644 --- a/src/Tools/H.LowCode.DbMigrator/Migrations/20250225020741_Initial.Designer.cs +++ b/src/Tools/H.LowCode.DbMigrator/Migrations/20251116160054_Init.Designer.cs @@ -12,19 +12,70 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace H.LowCode.DbMigrator.Migrations { [DbContext(typeof(MigratorDbContext))] - [Migration("20250225020741_Initial")] - partial class Initial + [Migration("20251116160054_Init")] + partial class Init { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "9.0.1") + .HasAnnotation("ProductVersion", "10.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + modelBuilder.Entity("H.LowCode.DynamicEntity.tb_check", b => + { + b.Property("f_id") + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("varchar(50)"); + + b.Property("ConcurrencyStamp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnType("nvarchar(max)"); + + b.Property("ModificationTime") + .HasColumnType("datetime2"); + + b.Property("ModifierId") + .HasColumnType("nvarchar(max)"); + + b.Property("f_checklocation") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_checktime") + .HasColumnType("datetime2"); + + b.Property("f_checktype") + .HasMaxLength(10) + .HasColumnType("int"); + + b.Property("f_deptid") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_userid") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.HasKey("f_id"); + + b.ToTable("tb_check", (string)null); + }); + modelBuilder.Entity("H.LowCode.DynamicEntity.tb_test1", b => { b.Property("f_id") @@ -32,16 +83,20 @@ namespace H.LowCode.DbMigrator.Migrations .IsUnicode(false) .HasColumnType("varchar(50)"); - b.Property("CreatedTime") + b.Property("ConcurrencyStamp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") .HasColumnType("datetime2"); - b.Property("CreatedUser") + b.Property("CreatorId") .HasColumnType("nvarchar(max)"); - b.Property("ModifiedTime") + b.Property("ModificationTime") .HasColumnType("datetime2"); - b.Property("ModifiedUser") + b.Property("ModifierId") .HasColumnType("nvarchar(max)"); b.Property("f_field1") @@ -91,17 +146,89 @@ namespace H.LowCode.DbMigrator.Migrations .IsUnicode(true) .HasColumnType("nvarchar(50)"); - b.Property("f_field8") + b.PrimitiveCollection("f_field8") + .HasColumnType("nvarchar(max)"); + + b.Property("f_field9") + .HasColumnType("bit"); + + b.HasKey("f_id"); + + b.ToTable("tb_test1", (string)null); + }); + + modelBuilder.Entity("H.LowCode.DynamicEntity.tb_test2", b => + { + b.Property("f_id") + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("varchar(50)"); + + b.Property("ConcurrencyStamp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnType("nvarchar(max)"); + + b.Property("ModificationTime") + .HasColumnType("datetime2"); + + b.Property("ModifierId") + .HasColumnType("nvarchar(max)"); + + b.Property("f_field1") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_field2") .HasMaxLength(50) .IsUnicode(true) .HasColumnType("nvarchar(50)"); - b.Property("f_field9") + b.Property("f_field3") .HasColumnType("bit"); b.HasKey("f_id"); - b.ToTable("tb_test1", (string)null); + b.ToTable("tb_test2", (string)null); + }); + + modelBuilder.Entity("H.LowCode.DynamicEntity.tb_test3", b => + { + b.Property("f_id") + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("varchar(50)"); + + b.Property("ConcurrencyStamp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnType("nvarchar(max)"); + + b.Property("ModificationTime") + .HasColumnType("datetime2"); + + b.Property("ModifierId") + .HasColumnType("nvarchar(max)"); + + b.Property("f_field1") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.HasKey("f_id"); + + b.ToTable("tb_test3", (string)null); }); #pragma warning restore 612, 618 } diff --git a/src/Tools/H.LowCode.DbMigrator/Migrations/20250225020741_Initial.cs b/src/Tools/H.LowCode.DbMigrator/Migrations/20251116160054_Init.cs similarity index 34% rename from src/Tools/H.LowCode.DbMigrator/Migrations/20250225020741_Initial.cs rename to src/Tools/H.LowCode.DbMigrator/Migrations/20251116160054_Init.cs index 03f2d3b88e09956cc91299e5d9d8a350964de334..57e97a30eeef1e5fbf57a85a117b09af44f433c9 100644 --- a/src/Tools/H.LowCode.DbMigrator/Migrations/20250225020741_Initial.cs +++ b/src/Tools/H.LowCode.DbMigrator/Migrations/20251116160054_Init.cs @@ -6,11 +6,32 @@ using Microsoft.EntityFrameworkCore.Migrations; namespace H.LowCode.DbMigrator.Migrations { /// - public partial class Initial : Migration + public partial class Init : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { + migrationBuilder.CreateTable( + name: "tb_check", + columns: table => new + { + f_id = table.Column(type: "varchar(50)", unicode: false, maxLength: 50, nullable: false), + f_userid = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + f_deptid = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + f_checktime = table.Column(type: "datetime2", nullable: false), + f_checklocation = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + f_checktype = table.Column(type: "int", maxLength: 10, nullable: false), + ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "nvarchar(max)", nullable: true), + ModificationTime = table.Column(type: "datetime2", nullable: true), + ModifierId = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_tb_check", x => x.f_id); + }); + migrationBuilder.CreateTable( name: "tb_test1", columns: table => new @@ -23,28 +44,74 @@ namespace H.LowCode.DbMigrator.Migrations f_field5 = table.Column(type: "int", nullable: true), f_field6 = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), f_field7 = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - f_field8 = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + f_field8 = table.Column(type: "nvarchar(max)", nullable: true), f_field9 = table.Column(type: "bit", nullable: true), f_field10 = table.Column(type: "datetime2", nullable: true), f_field11 = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), f_field12 = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), f_field13 = table.Column(type: "datetime2", nullable: true), - CreatedTime = table.Column(type: "datetime2", nullable: false), - CreatedUser = table.Column(type: "nvarchar(max)", nullable: true), - ModifiedTime = table.Column(type: "datetime2", nullable: false), - ModifiedUser = table.Column(type: "nvarchar(max)", nullable: true) + ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "nvarchar(max)", nullable: true), + ModificationTime = table.Column(type: "datetime2", nullable: true), + ModifierId = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_tb_test1", x => x.f_id); }); + + migrationBuilder.CreateTable( + name: "tb_test2", + columns: table => new + { + f_id = table.Column(type: "varchar(50)", unicode: false, maxLength: 50, nullable: false), + f_field1 = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + f_field2 = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + f_field3 = table.Column(type: "bit", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "nvarchar(max)", nullable: true), + ModificationTime = table.Column(type: "datetime2", nullable: true), + ModifierId = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_tb_test2", x => x.f_id); + }); + + migrationBuilder.CreateTable( + name: "tb_test3", + columns: table => new + { + f_id = table.Column(type: "varchar(50)", unicode: false, maxLength: 50, nullable: false), + f_field1 = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "nvarchar(max)", nullable: true), + ModificationTime = table.Column(type: "datetime2", nullable: true), + ModifierId = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_tb_test3", x => x.f_id); + }); } /// protected override void Down(MigrationBuilder migrationBuilder) { + migrationBuilder.DropTable( + name: "tb_check"); + migrationBuilder.DropTable( name: "tb_test1"); + + migrationBuilder.DropTable( + name: "tb_test2"); + + migrationBuilder.DropTable( + name: "tb_test3"); } } } diff --git a/src/Tools/H.LowCode.DbMigrator/Migrations/20251123125049_Attendance.Designer.cs b/src/Tools/H.LowCode.DbMigrator/Migrations/20251123125049_Attendance.Designer.cs new file mode 100644 index 0000000000000000000000000000000000000000..ee52627f6025faa2a529b62bffab001d27ded002 --- /dev/null +++ b/src/Tools/H.LowCode.DbMigrator/Migrations/20251123125049_Attendance.Designer.cs @@ -0,0 +1,393 @@ +// +using System; +using H.LowCode.DbMigrator; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace H.LowCode.DbMigrator.Migrations +{ + [DbContext(typeof(MigratorDbContext))] + [Migration("20251123125049_Attendance")] + partial class Attendance + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "10.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("H.LowCode.DynamicEntity.tb_check", b => + { + b.Property("f_id") + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("varchar(50)"); + + b.Property("ConcurrencyStamp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnType("nvarchar(max)"); + + b.Property("ModificationTime") + .HasColumnType("datetime2"); + + b.Property("ModifierId") + .HasColumnType("nvarchar(max)"); + + b.Property("f_checklocation") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_checktime") + .HasColumnType("datetime2"); + + b.Property("f_checktype") + .HasMaxLength(10) + .HasColumnType("int"); + + b.Property("f_deptid") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_userid") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.HasKey("f_id"); + + b.ToTable("tb_check", (string)null); + }); + + modelBuilder.Entity("H.LowCode.DynamicEntity.tb_leave_request", b => + { + b.Property("f_id") + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("varchar(50)"); + + b.Property("ConcurrencyStamp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnType("nvarchar(max)"); + + b.Property("ModificationTime") + .HasColumnType("datetime2"); + + b.Property("ModifierId") + .HasColumnType("nvarchar(max)"); + + b.Property("f_approve_remark") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_approve_time") + .HasColumnType("datetime2"); + + b.Property("f_approver") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_create_time") + .HasColumnType("datetime2"); + + b.Property("f_days") + .HasColumnType("decimal(18,2)"); + + b.Property("f_deptid") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_end_time") + .HasColumnType("datetime2"); + + b.Property("f_leave_type") + .HasMaxLength(10) + .HasColumnType("int"); + + b.Property("f_reason") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_start_time") + .HasColumnType("datetime2"); + + b.Property("f_status") + .HasMaxLength(10) + .HasColumnType("int"); + + b.Property("f_userid") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.HasKey("f_id"); + + b.ToTable("tb_leave_request", (string)null); + }); + + modelBuilder.Entity("H.LowCode.DynamicEntity.tb_overtime_request", b => + { + b.Property("f_id") + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("varchar(50)"); + + b.Property("ConcurrencyStamp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnType("nvarchar(max)"); + + b.Property("ModificationTime") + .HasColumnType("datetime2"); + + b.Property("ModifierId") + .HasColumnType("nvarchar(max)"); + + b.Property("f_approve_remark") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_approve_time") + .HasColumnType("datetime2"); + + b.Property("f_approver") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_create_time") + .HasColumnType("datetime2"); + + b.Property("f_deptid") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_end_time") + .HasColumnType("datetime2"); + + b.Property("f_hours") + .HasColumnType("decimal(18,2)"); + + b.Property("f_overtime_date") + .HasColumnType("datetime2"); + + b.Property("f_overtime_type") + .HasMaxLength(10) + .HasColumnType("int"); + + b.Property("f_reason") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_start_time") + .HasColumnType("datetime2"); + + b.Property("f_status") + .HasMaxLength(10) + .HasColumnType("int"); + + b.Property("f_userid") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.HasKey("f_id"); + + b.ToTable("tb_overtime_request", (string)null); + }); + + modelBuilder.Entity("H.LowCode.DynamicEntity.tb_test1", b => + { + b.Property("f_id") + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("varchar(50)"); + + b.Property("ConcurrencyStamp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnType("nvarchar(max)"); + + b.Property("ModificationTime") + .HasColumnType("datetime2"); + + b.Property("ModifierId") + .HasColumnType("nvarchar(max)"); + + b.Property("f_field1") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_field10") + .HasColumnType("datetime2"); + + b.Property("f_field11") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_field12") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_field13") + .HasColumnType("datetime2"); + + b.Property("f_field2") + .HasMaxLength(10) + .HasColumnType("int"); + + b.Property("f_field3") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_field4") + .HasColumnType("bit"); + + b.Property("f_field5") + .HasColumnType("int"); + + b.Property("f_field6") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_field7") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.PrimitiveCollection("f_field8") + .HasColumnType("nvarchar(max)"); + + b.Property("f_field9") + .HasColumnType("bit"); + + b.HasKey("f_id"); + + b.ToTable("tb_test1", (string)null); + }); + + modelBuilder.Entity("H.LowCode.DynamicEntity.tb_test2", b => + { + b.Property("f_id") + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("varchar(50)"); + + b.Property("ConcurrencyStamp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnType("nvarchar(max)"); + + b.Property("ModificationTime") + .HasColumnType("datetime2"); + + b.Property("ModifierId") + .HasColumnType("nvarchar(max)"); + + b.Property("f_field1") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_field2") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_field3") + .HasColumnType("bit"); + + b.HasKey("f_id"); + + b.ToTable("tb_test2", (string)null); + }); + + modelBuilder.Entity("H.LowCode.DynamicEntity.tb_test3", b => + { + b.Property("f_id") + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("varchar(50)"); + + b.Property("ConcurrencyStamp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnType("nvarchar(max)"); + + b.Property("ModificationTime") + .HasColumnType("datetime2"); + + b.Property("ModifierId") + .HasColumnType("nvarchar(max)"); + + b.Property("f_field1") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.HasKey("f_id"); + + b.ToTable("tb_test3", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Tools/H.LowCode.DbMigrator/Migrations/20251123125049_Attendance.cs b/src/Tools/H.LowCode.DbMigrator/Migrations/20251123125049_Attendance.cs new file mode 100644 index 0000000000000000000000000000000000000000..52520b4b2cf2f98eb0c595a740594b3ff43521b7 --- /dev/null +++ b/src/Tools/H.LowCode.DbMigrator/Migrations/20251123125049_Attendance.cs @@ -0,0 +1,82 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace H.LowCode.DbMigrator.Migrations +{ + /// + public partial class Attendance : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "tb_leave_request", + columns: table => new + { + f_id = table.Column(type: "varchar(50)", unicode: false, maxLength: 50, nullable: false), + f_userid = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + f_deptid = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + f_leave_type = table.Column(type: "int", maxLength: 10, nullable: false), + f_start_time = table.Column(type: "datetime2", nullable: false), + f_end_time = table.Column(type: "datetime2", nullable: false), + f_days = table.Column(type: "decimal(18,2)", nullable: true), + f_reason = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + f_status = table.Column(type: "int", maxLength: 10, nullable: false), + f_approver = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + f_approve_time = table.Column(type: "datetime2", nullable: true), + f_approve_remark = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + f_create_time = table.Column(type: "datetime2", nullable: false), + ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "nvarchar(max)", nullable: true), + ModificationTime = table.Column(type: "datetime2", nullable: true), + ModifierId = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_tb_leave_request", x => x.f_id); + }); + + migrationBuilder.CreateTable( + name: "tb_overtime_request", + columns: table => new + { + f_id = table.Column(type: "varchar(50)", unicode: false, maxLength: 50, nullable: false), + f_userid = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + f_deptid = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + f_overtime_date = table.Column(type: "datetime2", nullable: false), + f_start_time = table.Column(type: "datetime2", nullable: false), + f_end_time = table.Column(type: "datetime2", nullable: false), + f_hours = table.Column(type: "decimal(18,2)", nullable: true), + f_overtime_type = table.Column(type: "int", maxLength: 10, nullable: false), + f_reason = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + f_status = table.Column(type: "int", maxLength: 10, nullable: false), + f_approver = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + f_approve_time = table.Column(type: "datetime2", nullable: true), + f_approve_remark = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + f_create_time = table.Column(type: "datetime2", nullable: false), + ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "nvarchar(max)", nullable: true), + ModificationTime = table.Column(type: "datetime2", nullable: true), + ModifierId = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_tb_overtime_request", x => x.f_id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "tb_leave_request"); + + migrationBuilder.DropTable( + name: "tb_overtime_request"); + } + } +} diff --git a/src/Tools/H.LowCode.DbMigrator/Migrations/MigratorDbContextModelSnapshot.cs b/src/Tools/H.LowCode.DbMigrator/Migrations/MigratorDbContextModelSnapshot.cs index 5aeb1ced5942417a54bc0321511a7524367c3151..122a98bd26b250bf8f3b6426954e1edd0c29ff80 100644 --- a/src/Tools/H.LowCode.DbMigrator/Migrations/MigratorDbContextModelSnapshot.cs +++ b/src/Tools/H.LowCode.DbMigrator/Migrations/MigratorDbContextModelSnapshot.cs @@ -17,11 +17,219 @@ namespace H.LowCode.DbMigrator.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "9.0.1") + .HasAnnotation("ProductVersion", "10.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + modelBuilder.Entity("H.LowCode.DynamicEntity.tb_check", b => + { + b.Property("f_id") + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("varchar(50)"); + + b.Property("ConcurrencyStamp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnType("nvarchar(max)"); + + b.Property("ModificationTime") + .HasColumnType("datetime2"); + + b.Property("ModifierId") + .HasColumnType("nvarchar(max)"); + + b.Property("f_checklocation") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_checktime") + .HasColumnType("datetime2"); + + b.Property("f_checktype") + .HasMaxLength(10) + .HasColumnType("int"); + + b.Property("f_deptid") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_userid") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.HasKey("f_id"); + + b.ToTable("tb_check", (string)null); + }); + + modelBuilder.Entity("H.LowCode.DynamicEntity.tb_leave_request", b => + { + b.Property("f_id") + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("varchar(50)"); + + b.Property("ConcurrencyStamp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnType("nvarchar(max)"); + + b.Property("ModificationTime") + .HasColumnType("datetime2"); + + b.Property("ModifierId") + .HasColumnType("nvarchar(max)"); + + b.Property("f_approve_remark") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_approve_time") + .HasColumnType("datetime2"); + + b.Property("f_approver") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_create_time") + .HasColumnType("datetime2"); + + b.Property("f_days") + .HasColumnType("decimal(18,2)"); + + b.Property("f_deptid") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_end_time") + .HasColumnType("datetime2"); + + b.Property("f_leave_type") + .HasMaxLength(10) + .HasColumnType("int"); + + b.Property("f_reason") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_start_time") + .HasColumnType("datetime2"); + + b.Property("f_status") + .HasMaxLength(10) + .HasColumnType("int"); + + b.Property("f_userid") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.HasKey("f_id"); + + b.ToTable("tb_leave_request", (string)null); + }); + + modelBuilder.Entity("H.LowCode.DynamicEntity.tb_overtime_request", b => + { + b.Property("f_id") + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("varchar(50)"); + + b.Property("ConcurrencyStamp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnType("nvarchar(max)"); + + b.Property("ModificationTime") + .HasColumnType("datetime2"); + + b.Property("ModifierId") + .HasColumnType("nvarchar(max)"); + + b.Property("f_approve_remark") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_approve_time") + .HasColumnType("datetime2"); + + b.Property("f_approver") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_create_time") + .HasColumnType("datetime2"); + + b.Property("f_deptid") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_end_time") + .HasColumnType("datetime2"); + + b.Property("f_hours") + .HasColumnType("decimal(18,2)"); + + b.Property("f_overtime_date") + .HasColumnType("datetime2"); + + b.Property("f_overtime_type") + .HasMaxLength(10) + .HasColumnType("int"); + + b.Property("f_reason") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_start_time") + .HasColumnType("datetime2"); + + b.Property("f_status") + .HasMaxLength(10) + .HasColumnType("int"); + + b.Property("f_userid") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.HasKey("f_id"); + + b.ToTable("tb_overtime_request", (string)null); + }); + modelBuilder.Entity("H.LowCode.DynamicEntity.tb_test1", b => { b.Property("f_id") @@ -29,16 +237,20 @@ namespace H.LowCode.DbMigrator.Migrations .IsUnicode(false) .HasColumnType("varchar(50)"); - b.Property("CreatedTime") + b.Property("ConcurrencyStamp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") .HasColumnType("datetime2"); - b.Property("CreatedUser") + b.Property("CreatorId") .HasColumnType("nvarchar(max)"); - b.Property("ModifiedTime") + b.Property("ModificationTime") .HasColumnType("datetime2"); - b.Property("ModifiedUser") + b.Property("ModifierId") .HasColumnType("nvarchar(max)"); b.Property("f_field1") @@ -88,17 +300,89 @@ namespace H.LowCode.DbMigrator.Migrations .IsUnicode(true) .HasColumnType("nvarchar(50)"); - b.Property("f_field8") + b.PrimitiveCollection("f_field8") + .HasColumnType("nvarchar(max)"); + + b.Property("f_field9") + .HasColumnType("bit"); + + b.HasKey("f_id"); + + b.ToTable("tb_test1", (string)null); + }); + + modelBuilder.Entity("H.LowCode.DynamicEntity.tb_test2", b => + { + b.Property("f_id") + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("varchar(50)"); + + b.Property("ConcurrencyStamp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnType("nvarchar(max)"); + + b.Property("ModificationTime") + .HasColumnType("datetime2"); + + b.Property("ModifierId") + .HasColumnType("nvarchar(max)"); + + b.Property("f_field1") .HasMaxLength(50) .IsUnicode(true) .HasColumnType("nvarchar(50)"); - b.Property("f_field9") + b.Property("f_field2") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.Property("f_field3") .HasColumnType("bit"); b.HasKey("f_id"); - b.ToTable("tb_test1", (string)null); + b.ToTable("tb_test2", (string)null); + }); + + modelBuilder.Entity("H.LowCode.DynamicEntity.tb_test3", b => + { + b.Property("f_id") + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("varchar(50)"); + + b.Property("ConcurrencyStamp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnType("nvarchar(max)"); + + b.Property("ModificationTime") + .HasColumnType("datetime2"); + + b.Property("ModifierId") + .HasColumnType("nvarchar(max)"); + + b.Property("f_field1") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)"); + + b.HasKey("f_id"); + + b.ToTable("tb_test3", (string)null); }); #pragma warning restore 612, 618 } diff --git a/src/Tools/H.LowCode.DbMigrator/Services/MigrationCurrentApp.cs b/src/Tools/H.LowCode.DbMigrator/Services/MigrationCurrentApp.cs new file mode 100644 index 0000000000000000000000000000000000000000..f9ed9d152931a48930d02ef3c073fd4113b04ba2 --- /dev/null +++ b/src/Tools/H.LowCode.DbMigrator/Services/MigrationCurrentApp.cs @@ -0,0 +1,85 @@ +using H.LowCode.Application.Contracts; +using H.LowCode.DesignEngine.Application.Contracts; +using Microsoft.Extensions.Logging; + +namespace H.LowCode.DbMigrator; + +/// +/// 迁移工具专用的应用上下文服务 +/// 支持遍历所有应用的 AppId 进行数据库迁移 +/// +public class MigrationCurrentApp : ICurrentApp +{ + private readonly ILogger _logger; + private readonly IAppApplicationService _appService; + private string? _currentAppId; + + public MigrationCurrentApp( + ILogger logger, + IAppApplicationService appService) + { + _logger = logger; + _appService = appService; + } + + /// + /// 获取当前设置的 AppId + /// + public string? CurrentAppId => _currentAppId; + + /// + /// 设置当前的 AppId + /// + /// 应用ID + public void SetAppId(string? appId) + { + _currentAppId = appId; + _logger.LogDebug("Migration context: AppId set to {AppId}", appId); + } + + /// + /// 迁移过程中不需要从上下文解析 AppId + /// + public void ResolveAppIdFromContext() + { + _logger.LogDebug("Migration context: AppId resolution ignored"); + } + + /// + /// 获取所有应用的 AppId 列表 + /// + /// 应用 ID 列表 + public async Task> GetAllAppIdsAsync() + { + var apps = await _appService.GetAppsAsync(); + return [.. apps.Select(a => a.Id)]; + } + + /// + /// 遍历所有应用执行指定操作 + /// + /// 要执行的操作 + public async Task ForEachAppAsync(Func action) + { + var appIds = await GetAllAppIdsAsync(); + + foreach (var appId in appIds) + { + // 设置当前 AppId + SetAppId(appId); + + try + { + await action(appId); + } + catch (Exception ex) + { + _logger.LogError(ex, "处理应用 {AppId} 时发生错误", appId); + throw; + } + } + + // 清空当前 AppId + SetAppId(null); + } +} \ No newline at end of file diff --git a/src/Tools/H.LowCode.DbMigrator/appsettings.json b/src/Tools/H.LowCode.DbMigrator/appsettings.json index 426376a0719334164acad7e6ef79b4b39332c4d4..514a94e78ce6581e0c13180a2ca8aa392ac53082 100644 --- a/src/Tools/H.LowCode.DbMigrator/appsettings.json +++ b/src/Tools/H.LowCode.DbMigrator/appsettings.json @@ -3,7 +3,6 @@ "Default": "Server=(localdb)\\MSSQLLocalDB;Database=H_LowCode;Trusted_Connection=True;TrustServerCertificate=True" }, "Meta": { - "appsFilePath": "D:\\H\\code\\my\\lowcode\\meta\\apps", - "partsFilePath": "D:\\H\\code\\my\\lowcode\\meta\\parts" + "appsFilePath": "../../../meta/apps" } } diff --git a/src/Tools/H.LowCode.MetaMigrator/H.LowCode.MetaMigrator.csproj b/src/Tools/H.LowCode.MetaMigrator/H.LowCode.MetaMigrator.csproj index 3f47529ff3e80887fe12df4782d9c9256970c286..43b461791cd0139e0d4fdd79dbb89e42080fda3d 100644 --- a/src/Tools/H.LowCode.MetaMigrator/H.LowCode.MetaMigrator.csproj +++ b/src/Tools/H.LowCode.MetaMigrator/H.LowCode.MetaMigrator.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Tools/H.LowCode.MetaMigrator/Program.cs b/src/Tools/H.LowCode.MetaMigrator/Program.cs index 3751555cbd32d09340c8cb7b75ce8311c4330054..39946ea18ec175d456744dff96fdb9ea4f4bddf9 100644 --- a/src/Tools/H.LowCode.MetaMigrator/Program.cs +++ b/src/Tools/H.LowCode.MetaMigrator/Program.cs @@ -1,2 +1,2 @@ -// See https://aka.ms/new-console-template for more information +// See https://aka.ms/new-console-template for more information Console.WriteLine("Hello, World!"); diff --git a/src/Utils/H.Extensions.System/TypeExtension.cs b/src/Utils/H.Extensions.System/TypeExtension.cs index 21bc71b68964f957a6298a90a5d1cd21f1c9b5d8..a114fa3287c864ab53fc4d50318143f5133db6f0 100644 --- a/src/Utils/H.Extensions.System/TypeExtension.cs +++ b/src/Utils/H.Extensions.System/TypeExtension.cs @@ -35,4 +35,50 @@ public static class TypeExtension return null; } + + public static Type ResolveType(this string typeName) + { + if (string.IsNullOrWhiteSpace(typeName)) + return null; + + var type = Type.GetType(typeName, throwOnError: false, ignoreCase: true); + if (type != null) + return type; + + var (fullName, asmName) = SplitTypeName(typeName); + if (string.IsNullOrEmpty(fullName)) + return null; + + foreach (var asm in AppDomain.CurrentDomain.GetAssemblies()) + { + if (!string.IsNullOrEmpty(asmName)) + { + var name = asm.GetName().Name; + if (!string.Equals(name, asmName, StringComparison.OrdinalIgnoreCase)) + continue; + } + var t = asm.GetType(fullName, throwOnError: false, ignoreCase: true); + if (t != null) + return t; + } + + foreach (var asm in AppDomain.CurrentDomain.GetAssemblies()) + { + var t = asm.GetType(fullName, throwOnError: false, ignoreCase: true); + if (t != null) + return t; + } + + return null; + } + + private static (string fullName, string asmName) SplitTypeName(string typeName) + { + var idx = typeName.IndexOf(','); + if (idx < 0) + return (typeName.Trim(), null); + var fullName = typeName.Substring(0, idx).Trim(); + var asmName = typeName.Substring(idx + 1).Trim(); + return (fullName, asmName); + } } diff --git a/src/Utils/H.Util.Blazor/BlazorEventDispatcher.cs b/src/Utils/H.Util.Blazor/BlazorEventDispatcher.cs index c57196770ca216749258eb5967e95558afbec7d1..a2c5844cd182b894b119efda2ab4ee7dd3762e16 100644 --- a/src/Utils/H.Util.Blazor/BlazorEventDispatcher.cs +++ b/src/Utils/H.Util.Blazor/BlazorEventDispatcher.cs @@ -9,13 +9,13 @@ public static class BlazorEventDispatcher /// key 格式建议(小写):{组件库名称}.{组件名称}.{事件名称} /// 如:designengine.dragitem.onclick /// - private static Dictionary> _actions; + private static Dictionary> _actions; static BlazorEventDispatcher() { - _actions = new Dictionary>(); + _actions = []; } - public static void Subscribe(string eventName, Action action) + public static void Subscribe(string eventName, Action action) { if (!_actions.ContainsKey(eventName)) { @@ -35,7 +35,7 @@ public static class BlazorEventDispatcher } } - public static void Publish(string eventName, object param) + public static void Publish(string eventName, object? param) { if (_actions.ContainsKey(eventName)) {