diff --git a/klp-ui/src/views/system/menu/index.vue b/klp-ui/src/views/system/menu/index.vue
index 92e302b3e..61eac578b 100644
--- a/klp-ui/src/views/system/menu/index.vue
+++ b/klp-ui/src/views/system/menu/index.vue
@@ -617,12 +617,30 @@ export default {
};
// 递归展平为一维数组,缩进体现层级
- const flattenTree = (nodes, level = 0, result = []) => {
+ const flattenTree = (nodes, level = 0, parentPath = '', result = []) => {
nodes.forEach(node => {
const prefix = '\u3000'.repeat(level); // 全角空格缩进
+ const ownPath = node.path || '';
+ // 计算完整路由地址(仅菜单类型 C 有效)
+ let fullPath = '';
+ if (node.menuType === 'C') {
+ if (node.isFrame === '0') {
+ // 外链:完整路由就是自身路径
+ fullPath = ownPath;
+ } else {
+ // 内部路由:父路径 + 自身路径
+ const parent = parentPath ? (parentPath.endsWith('/') ? parentPath : parentPath + '/') : '';
+ fullPath = '/' + parent + ownPath;
+ }
+ }
+ // 目录(M)的路径作为子节点的父路径
+ const currentParentPath = node.menuType === 'M' ? ownPath : parentPath;
+
result.push({
menuName: prefix + node.menuName,
menuType: menuTypeMap[node.menuType] || node.menuType,
+ path: ownPath,
+ fullPath: fullPath,
icon: node.icon || '',
orderNum: node.orderNum,
perms: node.perms || '',
@@ -631,7 +649,7 @@ export default {
createTime: node.createTime || ''
});
if (node.children && node.children.length > 0) {
- flattenTree(node.children, level + 1, result);
+ flattenTree(node.children, level + 1, currentParentPath, result);
}
});
return result;
@@ -647,19 +665,21 @@ export default {
// 构建 Excel 数据
const wsData = [
- ['菜单名称', '菜单类型', '图标', '排序', '权限标识', '组件路径', '状态', '创建时间'],
+ ['菜单名称', '菜单类型', '路由地址', '完整路由地址', '图标', '排序', '权限标识', '组件路径', '状态', '创建时间'],
...flatData.map(item => [
- item.menuName, item.menuType, item.icon,
- item.orderNum, item.perms, item.component,
- item.status, item.createTime
+ item.menuName, item.menuType, item.path,
+ item.fullPath, item.icon, item.orderNum,
+ item.perms, item.component, item.status,
+ item.createTime
])
];
const ws = XLSX.utils.aoa_to_sheet(wsData);
ws['!cols'] = [
- { wch: 30 }, { wch: 10 }, { wch: 12 },
- { wch: 8 }, { wch: 25 }, { wch: 30 },
- { wch: 8 }, { wch: 20 }
+ { wch: 30 }, { wch: 10 }, { wch: 22 },
+ { wch: 30 }, { wch: 12 }, { wch: 8 },
+ { wch: 25 }, { wch: 30 }, { wch: 8 },
+ { wch: 20 }
];
const wb = XLSX.utils.book_new();
diff --git a/klp-ui/src/views/wms/coil/panels/base.vue b/klp-ui/src/views/wms/coil/panels/base.vue
index 4a9f4d876..b3bdc664a 100644
--- a/klp-ui/src/views/wms/coil/panels/base.vue
+++ b/klp-ui/src/views/wms/coil/panels/base.vue
@@ -135,6 +135,14 @@
导出全部
+
+ 单行异常导出
+
+
+
+ 多行异常导出
+
+
按实际库区排序
@@ -2336,6 +2344,24 @@ export default {
}, 'coil.xlsx')
}
},
+ /** 单行异常导出 — 每个钢卷一行,附带异常信息 */
+ handleAbnormalExportSingle() {
+ const { orderBy, ...query } = this.queryParams;
+ query.selectType = query.itemType;
+ this.download('wms/materialCoil/exportAbnormal', {
+ ...query,
+ abnormalExportCount: 1,
+ }, `abnormalCoil_${new Date().getTime()}.xlsx`)
+ },
+ /** 多行异常导出 — 每个异常记录一行,附带异常信息 */
+ handleAbnormalExportMulti() {
+ const { orderBy, ...query } = this.queryParams;
+ query.selectType = query.itemType;
+ this.download('wms/materialCoil/exportAbnormal', {
+ ...query,
+ abnormalExportCount: 0,
+ }, `abnormalCoil_${new Date().getTime()}.xlsx`)
+ },
async handleNewExportProps(row) {
this.loading = true
let coilIds = ''