diff --git a/.workbuddy/memory/2025-07-29.md b/.workbuddy/memory/2025-07-29.md new file mode 100644 index 0000000..729873c --- /dev/null +++ b/.workbuddy/memory/2025-07-29.md @@ -0,0 +1,3 @@ +## 2025-07-29 + +- 货物类型管理页面(cargo-type):搜索栏「类型」和「货物类型编码」字段 searchSpan 从 12 分别调整为 6 和 8,收窄 input 宽度使两字段在一排内紧凑展示 diff --git a/src/option/base/cargo-type.js b/src/option/base/cargo-type.js index d47b951..7bb3b0a 100644 --- a/src/option/base/cargo-type.js +++ b/src/option/base/cargo-type.js @@ -24,7 +24,7 @@ const validateRemark = (rule, value, callback) => { export const getCargoTypeOption = ctx => ({ height: 'auto', - calcHeight: 32, + calcHeight: 22, dialogWidth: 760, labelPosition: 'right', labelWidth: 'auto', @@ -35,8 +35,8 @@ export const getCargoTypeOption = ctx => ({ updateBtnText: '提交', searchShow: true, searchIcon: false, - searchLabelWidth: 80, - searchMenuSpan: 24, + searchLabelWidth: 50, + searchMenuSpan: 10, searchIndex: 8, searchMenuPosition: 'right', border: true, @@ -57,7 +57,7 @@ export const getCargoTypeOption = ctx => ({ dataType: 'number', dicData: typeLevelDic, search: true, - searchSpan: 12, + searchSpan: 6, value: 2, span: 24, minWidth: 120, @@ -81,6 +81,7 @@ export const getCargoTypeOption = ctx => ({ addDisplay: false, editDisplay: false, display: false, + showOverflowTooltip: true, minWidth: 160, }, { @@ -101,6 +102,7 @@ export const getCargoTypeOption = ctx => ({ minWidth: 150, maxlength: 50, showWordLimit: true, + showOverflowTooltip: true, rules: [{ validator: validateCargoName, trigger: 'blur' }], }, { @@ -108,7 +110,7 @@ export const getCargoTypeOption = ctx => ({ prop: 'cargoCode', minWidth: 140, search: true, - searchSpan: 12, + searchSpan: 6, maxlength: 4, editDisabled: true, rules: [ @@ -155,14 +157,15 @@ export const getCargoTypeOption = ctx => ({ maxlength: 200, showWordLimit: true, overHidden: true, + showOverflowTooltip: true, rules: [{ validator: validateRemark, trigger: 'blur' }], }, { label: '更新时间', prop: 'updateTime', type: 'datetime', - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', addDisplay: false, editDisplay: false, display: false, @@ -172,8 +175,8 @@ export const getCargoTypeOption = ctx => ({ label: '创建时间', prop: 'createTime', type: 'datetime', - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', addDisplay: false, editDisplay: false, display: false, diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss index 93b6606..11eabe3 100644 --- a/src/styles/element-ui.scss +++ b/src/styles/element-ui.scss @@ -263,6 +263,7 @@ justify-content: flex-end; width: 100%; box-sizing: border-box; + padding: 10px 0 !important; } .avue-crud__pagination .el-pagination, @@ -277,7 +278,6 @@ justify-content: flex-end; width: 100%; gap: 6px; - padding: 18px 0 0; color: #303133; font-size: 14px; font-weight: 400; diff --git a/src/views/base/cargo-type.vue b/src/views/base/cargo-type.vue index 77a4d8f..cd908f2 100644 --- a/src/views/base/cargo-type.vue +++ b/src/views/base/cargo-type.vue @@ -600,10 +600,6 @@ export default { background: transparent; } - :deep(.el-card) { - box-shadow: none; - } - // ��除 basic-container 卡片内层 el-card 的 padding(规范 4.4) :deep(.basic-container__card) > .el-card__body { padding: 0; @@ -611,15 +607,37 @@ export default { // 搜索栏 label 收窄(覆盖 Avue 内置 min-width:160px) :deep(.avue-crud__search) .el-form-item_label { - min-width: 80px !important; - width: 80px !important; + min-width: 50px !important; + width: 50px !important; } :deep(.el-table) { --el-table-border-color: #eff1f7; --el-table-row-hover-bg-color: #f5f7fa; + --el-table-row-height: 40px; + + // 表头加高 + .el-table__header-wrapper .el-table__cell { + padding: 10px 0; + } + + // 数据行保持紧凑 + .el-table__body .el-table__cell { + padding: 6px 0; + } } + // 底部空白区域自适应:表格 body 不再强制撑满计算高度 + :deep(.avue-crud .el-table__body-wrapper) { + max-height: none !important; + height: auto !important; + } + + // 同步让外层表格容器也自适应 + //:deep(.avue-crud .el-table) { + // height: auto !important; + //} + :deep(.el-table__body tr:nth-child(even) > td.el-table__cell) { background: #fafafa; }