From 09a284403605916cbf5f9c20871618d3e03f15b8 Mon Sep 17 00:00:00 2001 From: lijianxiong <1518062161@qq.com> Date: Tue, 9 Sep 2025 17:24:23 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat=EF=BC=9A=E9=80=82=E9=85=8D=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E5=8F=82=E6=95=B0enableDataInfoBar=EF=BC=88=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=90=AF=E7=94=A8=E4=BF=A1=E6=81=AF=E6=A0=8F=EF=BC=89?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E8=AF=A5=E5=8F=82=E6=95=B0=E4=B8=BA?= =?UTF-8?q?true=E6=97=B6=E8=AF=86=E5=88=AB=E6=A8=A1=E5=9E=8BisShowDataInfo?= =?UTF-8?q?Bar=E9=85=8D=E7=BD=AE=EF=BC=8C=E4=B8=BAfalse=E5=88=99=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BF=A1=E6=81=AF=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/control/caption-bar/caption-bar.controller.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/runtime/src/controller/control/caption-bar/caption-bar.controller.ts b/packages/runtime/src/controller/control/caption-bar/caption-bar.controller.ts index 631691eac..d22546626 100644 --- a/packages/runtime/src/controller/control/caption-bar/caption-bar.controller.ts +++ b/packages/runtime/src/controller/control/caption-bar/caption-bar.controller.ts @@ -34,6 +34,8 @@ export class CaptionBarController const { showDataInfoBar } = this.view.model as IData; if (ibiz.config.view.onlyShowDataInfo && dataInfo) { this.state.caption = dataInfo; + } else if (!ibiz.config.view.enableDataInfoBar) { + this.state.caption = `${this.view.model.caption}`; } else { this.state.caption = `${this.view.model.caption}${ showDataInfoBar && dataInfo ? `-${dataInfo}` : '' -- Gitee From f8d2b04bf4ba1de1a2573e216906285a93d3dfb1 Mon Sep 17 00:00:00 2001 From: lijianxiong <1518062161@qq.com> Date: Tue, 9 Sep 2025 17:27:41 +0800 Subject: [PATCH 2/6] =?UTF-8?q?feat=EF=BC=9A=E9=80=82=E9=85=8D=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E5=8F=82=E6=95=B0editSaveMode=EF=BC=88=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E8=A1=8C=E7=BC=96=E8=BE=91=E4=BF=9D=E5=AD=98=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=EF=BC=89=E8=87=AA=E5=8A=A8=E4=BF=9D=E5=AD=98=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E8=AF=A5=E5=8F=82=E6=95=B0=E4=B8=BAauto?= =?UTF-8?q?=E6=97=B6=E5=B0=86=E6=AF=8F=E9=9A=943=E7=A7=92=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E4=B8=80=E6=AC=A1=E5=80=BC=E5=8F=98=E6=9B=B4=E5=90=8E?= =?UTF-8?q?=E7=9A=84=E8=A1=8C=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../control/grid/grid/grid.controller.ts | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/packages/runtime/src/controller/control/grid/grid/grid.controller.ts b/packages/runtime/src/controller/control/grid/grid/grid.controller.ts index 1019b47d0..1d5f647cb 100644 --- a/packages/runtime/src/controller/control/grid/grid/grid.controller.ts +++ b/packages/runtime/src/controller/control/grid/grid/grid.controller.ts @@ -358,6 +358,14 @@ export class GridController< return !!this.model.enableRowEditOrder; } + /** + * @description 自动保存的定时器引用 + * @protected + * @type {unknown} + * @memberof GridController + */ + protected autoSaveTimer?: unknown; + protected initState(): void { super.initState(); this.state.rows = []; @@ -415,6 +423,34 @@ export class GridController< await this.initGroup(); // 初始化数据导出对象 await this.initExportData(); + + this.initAutoSaveTimer(); + } + + /** + * @description 初始化自动保存定时器 + * @protected + * @memberof GridController + */ + protected initAutoSaveTimer(): void { + if (this.editSaveMode !== 'auto') return; + this.destroyAutoSaveTimer(); + this.autoSaveTimer = setInterval(() => { + // 该方法只会保存修改过的行数据 + this.saveAll(); + }, 3000); + } + + /** + * @description 销毁自动保存定时器 + * @protected + * @memberof GridController + */ + protected destroyAutoSaveTimer(): void { + if (this.autoSaveTimer) { + clearInterval(this.autoSaveTimer as number); + this.autoSaveTimer = undefined; + } } /** @@ -2165,4 +2201,15 @@ export class GridController< ): IApiGridColumnMapping[K] { return this.columns[id] as unknown as IApiGridColumnMapping[K]; } + + /** + * @description 生命周期-销毁完成 + * @protected + * @returns {*} {Promise} + * @memberof GridController + */ + protected async onDestroyed(): Promise { + await super.onDestroyed(); + this.destroyAutoSaveTimer(); + } } -- Gitee From bb9687558f0af71a456204016437773693193292 Mon Sep 17 00:00:00 2001 From: lijianxiong <1518062161@qq.com> Date: Tue, 9 Sep 2025 17:31:08 +0800 Subject: [PATCH 3/6] =?UTF-8?q?feat=EF=BC=9A=E8=B0=83=E6=95=B4=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E5=A4=9A=E6=95=B0=E6=8D=AE=E9=83=A8=E4=BB=B6=E9=9D=99?= =?UTF-8?q?=E9=BB=98=E6=89=A7=E8=A1=8C=E5=88=A0=E9=99=A4=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E5=B0=86=E5=88=A0=E9=99=A4=E7=A1=AE=E8=AE=A4=E5=BC=B9?= =?UTF-8?q?=E6=A1=86=E9=80=BB=E8=BE=91=E8=BF=81=E7=A7=BB=E5=88=B0=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E7=BB=84=E4=BB=B6=E4=B8=AD=E5=AE=9E=E7=8E=B0=EF=BC=8C?= =?UTF-8?q?=E7=94=A8=E4=BA=8E=E7=BB=9F=E4=B8=80=E5=BC=B9=E6=A1=86=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/form-detail/form-mdctrl/form-mdctrl-md.controller.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/runtime/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-md.controller.ts b/packages/runtime/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-md.controller.ts index ded3ecfcb..d053ed7fe 100644 --- a/packages/runtime/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-md.controller.ts +++ b/packages/runtime/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-md.controller.ts @@ -128,7 +128,9 @@ export class FormMDCtrlMDController * @memberof FormMDCtrlMDController */ remove(): void { - this.mdController.remove(); + this.mdController.remove({ + silent: true, + }); } /** -- Gitee From a136dbd54908558f487907d0cda6b50847f516e8 Mon Sep 17 00:00:00 2001 From: lijianxiong <1518062161@qq.com> Date: Tue, 9 Sep 2025 17:33:16 +0800 Subject: [PATCH 4/6] =?UTF-8?q?feat=EF=BC=9A=E8=B0=83=E6=95=B4=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E9=A1=B9=E7=BB=84=E4=BB=B6=E4=B8=AD=E5=A4=84=E7=90=86?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E9=A2=9D=E5=A4=96=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E5=B0=86=E5=85=B6=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E5=88=B0=E6=8E=A7=E5=88=B6=E5=99=A8=E4=B8=AD=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/editor/editor.controller.ts | 31 +++++++++++++++++++ .../form-item/form-item.controller.ts | 13 ++++++++ 2 files changed, 44 insertions(+) diff --git a/packages/runtime/src/controller/common/editor/editor.controller.ts b/packages/runtime/src/controller/common/editor/editor.controller.ts index 3d801ed1a..669efe40c 100644 --- a/packages/runtime/src/controller/common/editor/editor.controller.ts +++ b/packages/runtime/src/controller/common/editor/editor.controller.ts @@ -303,6 +303,37 @@ export class EditorController (item: IEditorItem) => item.id !== this.model.id, ); } + + this.initExtraParams(); + } + + /** + * @description 初始化额外参数 + * @protected + * @memberof FormItemController + */ + protected initExtraParams(): void { + // 额外参数 + const extraParams = {}; + + // 是否隐藏无值的单位 + let emptyHiddenUnit = true; + if ((this.parent as IData)?.emptyHiddenUnit === false) { + emptyHiddenUnit = (this.parent as IData)?.emptyHiddenUnit; + } + // 编辑器参数优先级最高 + const { EMPTYHIDDENUNIT, emptyhiddenunit } = this.editorParams; + if (EMPTYHIDDENUNIT) { + emptyHiddenUnit = Object.is(EMPTYHIDDENUNIT, 'true'); + } + if (emptyhiddenunit) { + emptyHiddenUnit = Object.is(emptyhiddenunit, 'true'); + } + Object.assign(extraParams, { + emptyHiddenUnit, + }); + + this.extraParams = extraParams; } /** diff --git a/packages/runtime/src/controller/control/form/form-detail/form-item/form-item.controller.ts b/packages/runtime/src/controller/control/form/form-detail/form-item/form-item.controller.ts index 6fa821bfc..2ed9e0489 100644 --- a/packages/runtime/src/controller/control/form/form-detail/form-item/form-item.controller.ts +++ b/packages/runtime/src/controller/control/form/form-detail/form-item/form-item.controller.ts @@ -173,6 +173,19 @@ export class FormItemController return this.model.dataType; } + /** + * @description 隐藏无值的单位 + * @readonly + * @type {boolean} + * @memberof FormItemController + */ + get emptyHiddenUnit(): boolean { + if (this.form?.controlParams?.emptyhiddenunit) { + return Object.is(this.form?.controlParams?.emptyhiddenunit, 'true'); + } + return ibiz.config.form.emptyHiddenUnit; + } + /** * tips缓存标识 * -- Gitee From 64c2f0eb29bea6f586683bccde396abe1195250b Mon Sep 17 00:00:00 2001 From: lijianxiong <1518062161@qq.com> Date: Tue, 9 Sep 2025 17:34:14 +0800 Subject: [PATCH 5/6] =?UTF-8?q?feat=EF=BC=9A=E6=9B=B4=E6=96=B0=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E5=8F=82=E6=95=B0=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/global-config/i-api-global-codelist-config.ts | 2 +- .../common/global-config/i-api-global-common-config.ts | 5 +++-- .../api/common/global-config/i-api-global-grid-config.ts | 6 +++--- .../common/global-config/i-api-global-kanban-config.ts | 2 ++ .../api/common/global-config/i-api-global-view-config.ts | 8 ++++---- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/packages/runtime/src/interface/api/common/global-config/i-api-global-codelist-config.ts b/packages/runtime/src/interface/api/common/global-config/i-api-global-codelist-config.ts index 0bf939e3b..3f7eb34c9 100644 --- a/packages/runtime/src/interface/api/common/global-config/i-api-global-codelist-config.ts +++ b/packages/runtime/src/interface/api/common/global-config/i-api-global-codelist-config.ts @@ -7,7 +7,7 @@ export interface IApiGlobalCodeListConfig { /** * @description 默认代码表超时时间(单位:毫秒),为避免动态代码表重复加载,当代码表没有配置缓存超时时长时,使用该参数设置代码表超时时间。 * @type {number} - * @default 60 * 60 * 1000 + * @default 3600000 * @memberof IApiGlobalCodeListConfig */ timeout: number; diff --git a/packages/runtime/src/interface/api/common/global-config/i-api-global-common-config.ts b/packages/runtime/src/interface/api/common/global-config/i-api-global-common-config.ts index d0f0533a2..5f6d056b8 100644 --- a/packages/runtime/src/interface/api/common/global-config/i-api-global-common-config.ts +++ b/packages/runtime/src/interface/api/common/global-config/i-api-global-common-config.ts @@ -13,7 +13,7 @@ export interface IApiGlobalCommonConfig { emptyText: string; /** - * @description 无值显示模式,值为 'PLACEHOLDER' 时显示占位文本内容,值为 'DEFAULT' 或占位文本无值时显示`emptyText` + * @description 无值显示模式,值为 'PLACEHOLDER' 时显示占位文本内容,值为 'DEFAULT' 或占位文本无值时显示`emptyText`参数所设置的值 * @type {'DEFAULT' | 'PLACEHOLDER'} * @default 'DEFAULT' * @memberof IApiGlobalCommonConfig @@ -35,7 +35,7 @@ export interface IApiGlobalCommonConfig { drawerOption?: string; /** - * @description 快速搜索提示分隔符 + * @description 快速搜索框占位文本分隔符,用于分割实体属性中启用了支持快速搜索的属性名称 * @type {string} * @default '、' * @memberof IApiGlobalCommonConfig @@ -45,6 +45,7 @@ export interface IApiGlobalCommonConfig { /** * @description 是否启用传入下载凭证 * @type {boolean} + * @default false * @memberof IApiGlobalCommonConfig */ enableDownloadTicket: boolean; diff --git a/packages/runtime/src/interface/api/common/global-config/i-api-global-grid-config.ts b/packages/runtime/src/interface/api/common/global-config/i-api-global-grid-config.ts index 0113221c2..f43725ec7 100644 --- a/packages/runtime/src/interface/api/common/global-config/i-api-global-grid-config.ts +++ b/packages/runtime/src/interface/api/common/global-config/i-api-global-grid-config.ts @@ -13,7 +13,7 @@ export interface IApiGlobalGridConfig { editShowMode: 'cell' | 'row' | 'all'; /** - * @description 表格行编辑保存模式,cell-blur 单元格失焦时保存整行数据;auto 自动保存,值变更之后一段时间保存整行数据;manual 手动保存,由界面行为调用表格整体保存或行保存 + * @description 表格行编辑保存模式,cell-blur 单元格失焦时保存整行数据;auto 自动保存,将每隔 3 秒保存一次值变更后的行数据;manual 手动保存,由界面行为调用表格整体保存或行保存 * @type {('cell-blur' | 'auto' | 'manual')} * @default cell-blur * @memberof IApiGlobalGridConfig @@ -37,9 +37,9 @@ export interface IApiGlobalGridConfig { overflowMode: 'wrap' | 'ellipsis'; /** - * @description 隐藏无值的单位 - * @default true + * @description 表格列格式化值时控制无值状态下单位的显示逻辑,当表格属性列配置了值格式化且绑定属性存在值时,此参数生效。若属性值格式化后无值,该参数为 true 则隐藏单位,为 false 则显示单位 * @type {boolean} + * @default true * @memberof IApiGlobalGridConfig */ emptyHiddenUnit: boolean; diff --git a/packages/runtime/src/interface/api/common/global-config/i-api-global-kanban-config.ts b/packages/runtime/src/interface/api/common/global-config/i-api-global-kanban-config.ts index 1408b77f2..62f395aeb 100644 --- a/packages/runtime/src/interface/api/common/global-config/i-api-global-kanban-config.ts +++ b/packages/runtime/src/interface/api/common/global-config/i-api-global-kanban-config.ts @@ -7,12 +7,14 @@ export interface IApiGlobalKanbanConfig { /** * @description 启用全屏 * @type {boolean} + * @default true * @memberof IApiGlobalKanbanConfig */ enableFullScreen: boolean; /** * @description 启用分组隐藏 * @type {boolean} + * @default false * @memberof IApiGlobalKanbanConfig */ enableGroupHidden: boolean; diff --git a/packages/runtime/src/interface/api/common/global-config/i-api-global-view-config.ts b/packages/runtime/src/interface/api/common/global-config/i-api-global-view-config.ts index 0990bc8c4..3aa6574b3 100644 --- a/packages/runtime/src/interface/api/common/global-config/i-api-global-view-config.ts +++ b/packages/runtime/src/interface/api/common/global-config/i-api-global-view-config.ts @@ -21,7 +21,7 @@ export interface IApiGlobalViewConfig { expCacheMode: string; /** - * @description 首页是否不采用分页导航模式,该参数为true时首页不显示分页导航栏 + * @description 是否禁用分页导航栏,该参数为true时首页不显示分页导航栏 * @default false * @type {boolean} * @memberof IApiGlobalViewConfig @@ -37,7 +37,7 @@ export interface IApiGlobalViewConfig { mobShowPresetBack: boolean; /** - * @description 移动端是否视图头 + * @description 移动端是否显示视图头 * @default true * @type {boolean} * @memberof IApiGlobalViewConfig @@ -45,8 +45,8 @@ export interface IApiGlobalViewConfig { mobShowViewHeader: boolean; /** - * @description 用户操作超时周期,超过该时间刷新用户访问状态 - * @default 300s + * @description 用户操作超时周期(单位:毫秒),超出该时间将刷新用户访问状态,用于协同编辑场景 + * @default 300000 * @type {number} * @memberof IApiGlobalViewConfig */ -- Gitee From 075e792c030cee2438df35f3042b0074aae10b67 Mon Sep 17 00:00:00 2001 From: lijianxiong <1518062161@qq.com> Date: Tue, 9 Sep 2025 17:34:36 +0800 Subject: [PATCH 6/6] =?UTF-8?q?feat=EF=BC=9A=E6=9B=B4=E6=96=B0CHANGELOG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/runtime/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/runtime/CHANGELOG.md b/packages/runtime/CHANGELOG.md index b99838bd5..dce93a1ec 100644 --- a/packages/runtime/CHANGELOG.md +++ b/packages/runtime/CHANGELOG.md @@ -17,6 +17,10 @@ - 多数据部件onBeforeLoad事件添加请求参数 - 更新移动端多数据部件界面行为组权限计算 - 更新表单按钮组界面行为权限计算 +- 适配全局参数enableDataInfoBar(是否启用信息栏)逻辑,该参数为true时识别模型isShowDataInfoBar配置,为false则不显示信息栏 +- 适配全局参数editSaveMode(表格行编辑保存模式)自动保存模式,该参数为auto时将每隔3秒保存一次值变更后的行数据 +- 调整表单多数据部件静默执行删除逻辑,将删除确认弹框逻辑迁移到表单组件中实现,用于统一弹框样式 +- 调整表单项组件中处理编辑器额外参数逻辑,将其迁移到控制器中处理 ## [0.7.41-alpha.23] - 2025-09-04 -- Gitee