重命名電廠詳細頁面,並更新相關路由與選單配置

This commit is contained in:
koko 2025-10-28 18:12:42 +08:00
parent 0e767795be
commit b605bb3036
4 changed files with 8 additions and 8 deletions

View File

@ -35,7 +35,7 @@ function findMenuItem(route) {
}
// /plant/:id
if (
child.routeName === "PlantDetail" &&
child.routeName === "PlantInfo" &&
route.path &&
route.path.startsWith("/plant/")
) {
@ -58,7 +58,7 @@ function buildBreadcrumb(route) {
},
];
let itemTitle = match.item.title;
if (route.name === "PlantDetail" && route.params.id) {
if (route.name === "PlantInfo" && route.params.id) {
const plantNames = {
"1": "四磺子坪",
"2": "宜蘭大清水",

View File

@ -27,21 +27,21 @@ export const menuConfig = [
id: 'plant-1',
title: '四磺子坪',
path: '/plant/1',
routeName: 'PlantDetail',
routeName: 'PlantInfo',
params: { id: 1 }
},
{
id: 'plant-2',
title: '宜蘭大清水',
path: '/plant/2',
routeName: 'PlantDetail',
routeName: 'PlantInfo',
params: { id: 2 }
},
{
id: 'plant-3',
title: '宜蘭小清水',
path: '/plant/3',
routeName: 'PlantDetail',
routeName: 'PlantInfo',
params: { id: 3 }
}
]

View File

@ -2,7 +2,7 @@ import { createRouter, createWebHashHistory } from "vue-router";
import Home from "../views/Home.vue";
import PlantsOverview from "../views/PlantsOverview.vue";
import PlantReport from "../views/PlantReport.vue";
import PlantDetail from "../views/PlantDetail.vue";
import PlantInfo from "../views/PlantInfo.vue";
const routes = [
{
@ -29,8 +29,8 @@ const routes = [
},
{
path: "/plant/:id",
name: "PlantDetail",
component: PlantDetail,
name: "PlantInfo",
component: PlantInfo,
meta: {
title: "電廠詳細",
menuGroup: "factory-info",