|
@@ -1,16 +1,23 @@
|
|
|
|
|
+// import { map } from "core-js/core/array";
|
|
|
|
|
+
|
|
|
// 读取记录的主键,兼容多种 ID 字段名
|
|
// 读取记录的主键,兼容多种 ID 字段名
|
|
|
export function pickId(row) {
|
|
export function pickId(row) {
|
|
|
return row?.id ?? row?.mapId ?? row?.map_id ?? row?.ID ?? row?.MapId;
|
|
return row?.id ?? row?.mapId ?? row?.map_id ?? row?.ID ?? row?.MapId;
|
|
|
}
|
|
}
|
|
|
|
|
+export function pickName(row) {
|
|
|
|
|
+ return row?.map;
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
// === 根据真实路由配置构造跳转对象 ===
|
|
// === 根据真实路由配置构造跳转对象 ===
|
|
|
|
|
|
|
|
// Nav route: name: 'Navigation', path: '/map/maplist/navigation/index/:mapId(\\d+)', params: { mapId }
|
|
// Nav route: name: 'Navigation', path: '/map/maplist/navigation/index/:mapId(\\d+)', params: { mapId }
|
|
|
export function buildNavTo(row) {
|
|
export function buildNavTo(row) {
|
|
|
const id = pickId(row);
|
|
const id = pickId(row);
|
|
|
|
|
+ const mapName = pickName(row);
|
|
|
|
|
+ console.log("路由跳转mapName:", mapName);
|
|
|
return {
|
|
return {
|
|
|
name: 'Navigation',
|
|
name: 'Navigation',
|
|
|
- params: { mapId: id }
|
|
|
|
|
|
|
+ params: { mapId: id, mapName:mapName }
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -26,9 +33,10 @@ export function buildEditTo(row) {
|
|
|
// Calibration route: name: 'Calibration', path: '/map/maplist/calibration/index/:mapId(\\d+)', params: { mapId }
|
|
// Calibration route: name: 'Calibration', path: '/map/maplist/calibration/index/:mapId(\\d+)', params: { mapId }
|
|
|
export function buildCalibrateTo(row) {
|
|
export function buildCalibrateTo(row) {
|
|
|
const id = pickId(row);
|
|
const id = pickId(row);
|
|
|
|
|
+ const mapName = pickName(row);
|
|
|
return {
|
|
return {
|
|
|
name: 'Calibration',
|
|
name: 'Calibration',
|
|
|
- params: { mapId: id }
|
|
|
|
|
|
|
+ params: { mapId: id , mapName:mapName}
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
|
|
|