fix(cargo-type): 修复查看编辑弹窗请求未完成问题

- 删除 beforeOpen 中 view/edit 分支的 getDetail 调用,避免请求失败卡死弹窗
- 直接复用已填充的 this.form,提升弹窗打开性能和稳定性
- 调整菜单宽度由 220 改为 160,优化界面布局
- 更新导出逻辑,去除导出时对 ids 的拼接,统一按搜索条件导出
- 隐藏 Avue 内置“新增”按钮,仅保留自定义菜单中新增按钮
This commit is contained in:
2026-07-29 12:20:50 +08:00
parent a71d2c9350
commit 90d96e01a4
3 changed files with 11 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ export const getCargoTypeOption = ctx => ({
editBtn: false,
selection: true,
dialogClickModal: false,
menuWidth: 220,
menuWidth: 160,
column: [
{
label: '类型',

View File

@@ -131,7 +131,6 @@
<script>
import {
getDetail,
getList,
getNextCode,
getParentOptions,
@@ -488,12 +487,10 @@ export default {
beforeOpen(done, type) {
this.dialogType = type || 'add';
if (['edit', 'view'].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data || {};
this.ensureParentOption(this.form);
this.syncColumnDisplay();
done();
});
// 列表已返回完整 CargoTypeVO直接复用 Avue 填充的 this.form无需再请求 detail
this.ensureParentOption(this.form);
this.syncColumnDisplay();
done();
return;
}
this.form = {