From 49043881ba8f87bbbea679618be58965ef64ad6d Mon Sep 17 00:00:00 2001 From: liuyun Date: Wed, 14 Oct 2026 19:46:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(c1):=20=E6=9C=8D=E5=8A=A1=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E9=A1=B5=E8=AF=84=E5=AE=A1=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 回退对脚手架文件(ty-crud/ty-dialog)的越界修改 - 列表页改用 ty-search-form + ty-table 组合,去掉对 ty-crud 的依赖 - 详情弹窗改用默认 footer + confirmText「关闭」,去掉自关逻辑 - 状态变更区块加 v-permission="elder:status-change" - 新增「下次服务」占位列(显示 —) - 目标状态下拉排除当前状态与不可逆终态(dead/terminated) - 失能等级去掉「(最高级)」后缀 - 建档/详情组件从 src/pages 迁至 src/components(对齐 change-password-form 约定,避免被 vue-router 注册为路由) - components.d.ts 由构建重新生成,不再手改 Co-Authored-By: Claude Sonnet 4.6 --- components.d.ts | 8 ++ .../elder => }/components/elder-detail.vue | 52 ++++---- .../ltc/elder => }/components/elder-form.vue | 2 +- src/components/ty-crud.vue | 5 +- src/components/ty-dialog.vue | 1 - src/pages/ltc/elder/constants.ts | 2 +- src/pages/ltc/elder/index.vue | 116 +++++++++++------- 7 files changed, 112 insertions(+), 74 deletions(-) rename src/{pages/ltc/elder => }/components/elder-detail.vue (78%) rename src/{pages/ltc/elder => }/components/elder-form.vue (99%) diff --git a/components.d.ts b/components.d.ts index 07cd891..76c55b7 100644 --- a/components.d.ts +++ b/components.d.ts @@ -20,9 +20,12 @@ declare module 'vue' { ElCard: typeof import('element-plus/es')['ElCard'] ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup'] + ElCol: typeof import('element-plus/es')['ElCol'] ElColorPicker: typeof import('element-plus/es')['ElColorPicker'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] + ElderDetail: typeof import('./src/components/elder-detail.vue')['default'] + ElderForm: typeof import('./src/components/elder-form.vue')['default'] ElDescriptions: typeof import('element-plus/es')['ElDescriptions'] ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem'] ElDialog: typeof import('element-plus/es')['ElDialog'] @@ -45,6 +48,7 @@ declare module 'vue' { ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElResult: typeof import('element-plus/es')['ElResult'] + ElRow: typeof import('element-plus/es')['ElRow'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSlider: typeof import('element-plus/es')['ElSlider'] @@ -93,9 +97,12 @@ declare global { const ElCard: typeof import('element-plus/es')['ElCard'] const ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] const ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup'] + const ElCol: typeof import('element-plus/es')['ElCol'] const ElColorPicker: typeof import('element-plus/es')['ElColorPicker'] const ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] const ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] + const ElderDetail: typeof import('./src/components/elder-detail.vue')['default'] + const ElderForm: typeof import('./src/components/elder-form.vue')['default'] const ElDescriptions: typeof import('element-plus/es')['ElDescriptions'] const ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem'] const ElDialog: typeof import('element-plus/es')['ElDialog'] @@ -118,6 +125,7 @@ declare global { const ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] const ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] const ElResult: typeof import('element-plus/es')['ElResult'] + const ElRow: typeof import('element-plus/es')['ElRow'] const ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] const ElSelect: typeof import('element-plus/es')['ElSelect'] const ElSlider: typeof import('element-plus/es')['ElSlider'] diff --git a/src/pages/ltc/elder/components/elder-detail.vue b/src/components/elder-detail.vue similarity index 78% rename from src/pages/ltc/elder/components/elder-detail.vue rename to src/components/elder-detail.vue index 7501fef..e45ef15 100644 --- a/src/pages/ltc/elder/components/elder-detail.vue +++ b/src/components/elder-detail.vue @@ -26,20 +26,22 @@ {{ elder.note ?? '-' }} - 状态变更 - - - - - - - - - - - 变更 - - +
+ 状态变更 + + + + + + + + + + + 变更 + + +
状态日志 @@ -50,18 +52,13 @@ - -
- 关闭 -
diff --git a/src/pages/ltc/elder/components/elder-form.vue b/src/components/elder-form.vue similarity index 99% rename from src/pages/ltc/elder/components/elder-form.vue rename to src/components/elder-form.vue index a7e8601..43ccf3c 100644 --- a/src/pages/ltc/elder/components/elder-form.vue +++ b/src/components/elder-form.vue @@ -132,7 +132,7 @@ import { GENDER_OPTIONS, INSURE_TYPE_OPTIONS, INSURE_VERIFY_STATUS_OPTIONS, -} from '../constants' +} from '@/pages/ltc/elder/constants' defineOptions({ name: 'ElderForm' }) diff --git a/src/components/ty-crud.vue b/src/components/ty-crud.vue index b5e8bf7..b5df406 100644 --- a/src/components/ty-crud.vue +++ b/src/components/ty-crud.vue @@ -12,7 +12,7 @@
- + 新增{{ entityName }} @@ -122,8 +122,6 @@ const props = withDefaults( selection?: boolean /** 新增按钮所需权限码(无该权限且非超管时隐藏新增按钮)。 */ createPermission?: string - /** 是否显示内置「新增」按钮(false 时可改用 #toolbar 插槽自定义建档入口)。 */ - showCreate?: boolean actionsWidth?: number | string }>(), { @@ -134,7 +132,6 @@ const props = withDefaults( actions: () => ['edit', 'delete'], collapseCount: 2, selection: false, - showCreate: true, actionsWidth: 140, }, ) diff --git a/src/components/ty-dialog.vue b/src/components/ty-dialog.vue index ab00c9b..1cb432f 100644 --- a/src/components/ty-dialog.vue +++ b/src/components/ty-dialog.vue @@ -12,7 +12,6 @@