# 2026-08-14 工作记录 ## temporary-credit-limit 弹窗 label 固定 6 汉字宽度并换行 - 需求:用户反馈 `/business/temporary-credit-limit` 新增弹窗中 label「已使用项目资金使用额度(万元)」过宽(227px),希望超过 6 个汉字就换行。 ## loading-manage 搜索栏 label 宽度 160→88 - 用户要求把 `/business/loading-manage` 页面搜索栏所有 label 宽度从 160px 改为 88px。 - 改动:`src/views/business/loading-manage.vue` 第 4 行 ``。 - 注意事项:AGENTS.md 4.4 节规范"搜索组件 label 宽度统一不小于 160px",本次按用户指令执行但与项目规范冲突;如后续要恢复规范或全站统一,需要回滚。 ## shipping-template 弹窗高度改为接近全屏 - 用户要求把 `/business/shipping-template` 弹窗高度调到接近全屏(硬编码 200px 安全区太大)。 - 关键定位:Avue 库内置 `.avue-dialog { max-height: calc(100% - 200px) }` 加在 `el-dialog` 根元素(avue lib `packages/core/components/dialog-form/index4.js:14` `class:"avue-dialog"`);shipping-template 的 `dialogCustomClass:'shipping-template-dialog'` 合并到同一元素。项目样式(common.scss)在 main.js:24 晚于 Avue css(main.js:12)加载,可覆盖。 - 改动:`src/styles/element-ui.scss` 的 `.shipping-template-dialog.el-dialog` 规则,由 `margin-top:4vh; margin-bottom:0; height:calc(100vh - 4vh - 24px)` 改为 `margin-top:20px !important; margin-bottom:20px !important; height:calc(100vh - 40px); max-height:calc(100vh - 40px) !important`,用 max-height + !important 压过库内置上限。 - 注意:仅改 shipping-template 专属规则,未动库内置 `.avue-dialog` 根,也未影响其他弹窗。body/footer 的 flex 分摊规则(474-488 行)保持不变。 ## transport-plan 弹窗高度也改为接近全屏 - 用户要求 `/business/transport-plan` 新增/编辑弹窗同样改为接近全屏(原来固定 max-height: 72vh,内容少时下方留白)。 - 改动:`src/styles/element-ui.scss` 的 `.transport-plan-dialog.el-dialog` 规则,由 `margin-top:4vh; max-height:72vh` 改为 `margin-top:20px !important; margin-bottom:20px !important; height:calc(100vh - 40px); max-height:calc(100vh - 40px) !important`,与 shipping-template 弹窗完全对齐(压过库内置 `.avue-dialog` 的 max-height: calc(100% - 200px))。 - 已确认 `src/option/business/transport-plan.js:607` 有 `dialogCustomClass: 'transport-plan-dialog'`,CSS 生效。body/footer flex 分摊规则(504-520 行)保持不变。 ## waybill-manage 弹窗高度也改为接近全屏 - 用户要求 `/business/waybill-manage` 新增/编辑弹窗同样接近全屏。 - 机制澄清:waybill-manage 用封装组件 `src/views/business/components/business-crud-page.vue`,它内部 ``,option 由传入的 `crudOption`(即 waybill-manage.js 的 option)经 `cloneOption`(组件内 6261 行,浅展开+重映射 column,保留所有顶层属性)克隆而来。因此给 waybill-manage.js 的 option 顶层加 `dialogCustomClass` 即可只影响本页(不影响共用 business-crud-page 的其他页面)。Avue crud 弹窗 `dialog-form3.js:21` 会读取并应用 dialogCustomClass。 - 改动1:`src/option/business/waybill-manage.js` 的 `export const option = {` 顶层加 `dialogCustomClass: 'waybill-manage-dialog'`(在展开 `...createCrudOption(` 之前)。 - 改动2:`src/styles/element-ui.scss` 新增 `.waybill-manage-dialog.el-dialog / .el-dialog__header / .el-dialog__body / .avue-dialog__footer` 四条规则,复刻 shipping-template 方案(height/max-height: calc(100vh - 40px) !important;body max-height:none !important 解开全局 `.avue-crud__dialog .el-dialog__body` 的 200px 限制;footer sticky)。额外在 footer 加 `margin-top: 0 !important` 抵消全局 `.avue-crud__dialog .avue-dialog__footer { margin-top: -30px !important }`(863 行)的上移副作用(shipping-template 是 dialog-form 弹窗无 avue-crud__dialog class 故不受影响,waybill-manage 是 avue-crud 弹窗会受影响,必须处理)。 - 宽度来源: - `src/option/business/common.js` 的 `createCrudOption` 中 `labelWidth: 'auto'`; - Avue 会按当前弹窗内最长 label 自动计算宽度,故出现 227px。 - `src/styles/element-ui.scss` 第 164 行 `.el-dialog .el-form-item__label { white-space: nowrap }` 阻止换行。 - 改动: 1. `src/option/business/temporary-credit-limit.js`:option 增加 `dialogCustomClass: 'temporary-credit-limit-dialog'`。 2. `src/styles/element-ui.scss`:新增 `.temporary-credit-limit-dialog .el-form-item__label` 规则,固定宽度 `calc(6em + 24px)`,并设置 `white-space: normal; word-break: break-all; overflow-wrap: anywhere; line-height: 18px`,实现超长 label 自动换行。 3. 同时给 `.temporary-credit-limit-dialog .el-form-item { align-items: center; }` 保持垂直居中。 - 参考:同文件已有 `.avue-dialog--common-route` 使用相同 6em label 宽度方案。 ## transportCapacity/ship 到期筛选标签默认展开并靠前 - 需求:用户反馈 `/transportCapacity/ship` 页面搜索栏的「全部/30天内到期/已到期」标签需要点击「展开」后才显示,希望默认直接显示;且位置要位于搜索按钮前面。 - 原因:`src/option/transportCapacity/transport-ship.js` 中 `searchIndex: 4`,默认只展示前 4 个搜索条件,而 `expireStatus` 的 `searchOrder: 0`(Avue 越大越靠前)排在第 6 位,因此被折叠到第二行。 - 改动: - `src/option/transportCapacity/transport-ship.js`:`searchIndex: 4 → 6`,让全部 6 个搜索条件默认展开,标签无需再点展开即可看到。 - 由于 `expireStatus` 排在最后,展开后它自然位于第二行末尾、搜索按钮之前,满足"移到搜索按钮前面"的要求。 ## transportCapacity/vehicle 与 ship 到期筛选标签重构(对齐 driver 的 #search-menu 方案) - 需求:用户希望 `/transportCapacity/vehicle` 和 `/transportCapacity/ship` 的「全部/30天内到期/已到期」标签与 driver 页一致:① 不展开就直接显示;② 移到搜索按钮前面并保留间距。 - 关键差异(排查发现):driver 用 `#search-menu` 插槽把标签渲染在**按钮所在行**;而 vehicle/ship 之前用 `#expireStatus-search` 列插槽,标签被渲染进**搜索条件网格**(位置不对)。 - 改动(两页同样处理): 1. `.vue`:`