|
|
|
@ -115,14 +115,14 @@ export default {
|
|
|
|
|
index: "/userManagement",
|
|
|
|
|
title: "用户管理",
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// index: "/roleManagement",
|
|
|
|
|
// title: "角色管理",
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// index: "/menuManagement",
|
|
|
|
|
// title: "菜单功能管理",
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
index: "/roleManagement",
|
|
|
|
|
title: "角色管理",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
index: "/menuManagement",
|
|
|
|
|
title: "菜单功能管理",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
index: "/deviceUpgrade",
|
|
|
|
|
title: "升级管理",
|
|
|
|
@ -139,153 +139,6 @@ export default {
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
items1: [
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-s-home",
|
|
|
|
|
index: "stritl",
|
|
|
|
|
title: "首页",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-camera",
|
|
|
|
|
index: "/realTimeMonitor",
|
|
|
|
|
title: "实时监控",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-film",
|
|
|
|
|
index: "/pictureRotation",
|
|
|
|
|
title: "图片轮巡",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-bell",
|
|
|
|
|
index: "/photoAlarm",
|
|
|
|
|
title: "告警处理",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-search",
|
|
|
|
|
index: "/realTimeSearch",
|
|
|
|
|
title: "历史图片",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-files",
|
|
|
|
|
index: "/property",
|
|
|
|
|
title: "资产管理",
|
|
|
|
|
subs: [
|
|
|
|
|
{
|
|
|
|
|
index: "/lineInformation",
|
|
|
|
|
title: "线路信息管理",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
index: "/towerInformation",
|
|
|
|
|
title: "杆塔信息管理",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
index: "/cameraChannel",
|
|
|
|
|
title: "通道管理",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
index: "/photographicDevice",
|
|
|
|
|
title: "拍照装置管理",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
index: "/devicePhotoSchedule",
|
|
|
|
|
title: "拍照时间表设置",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-monitor",
|
|
|
|
|
index: "/system",
|
|
|
|
|
title: "系统管理",
|
|
|
|
|
subs: [
|
|
|
|
|
{
|
|
|
|
|
index: "/userManagement",
|
|
|
|
|
title: "用户管理",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
items2: [
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-s-home",
|
|
|
|
|
index: "stritl",
|
|
|
|
|
title: "首页",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-camera",
|
|
|
|
|
index: "/realTimeMonitor",
|
|
|
|
|
title: "实时监控",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-film",
|
|
|
|
|
index: "/pictureRotation",
|
|
|
|
|
title: "图片轮巡",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-bell",
|
|
|
|
|
index: "photoAlarm",
|
|
|
|
|
title: "告警处理",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-search",
|
|
|
|
|
index: "/realTimeSearch",
|
|
|
|
|
title: "历史图片",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-files",
|
|
|
|
|
index: "/property",
|
|
|
|
|
title: "资产管理",
|
|
|
|
|
subs: [
|
|
|
|
|
{
|
|
|
|
|
index: "/lineInformation",
|
|
|
|
|
title: "线路信息管理",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
index: "/towerInformation",
|
|
|
|
|
title: "杆塔信息管理",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
index: "/photographicDevice",
|
|
|
|
|
title: "拍照装置管理",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
index: "/devicePhotoSchedule",
|
|
|
|
|
title: "拍照时间表设置",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
hnjcitems: [
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-s-home",
|
|
|
|
|
index: "stritl",
|
|
|
|
|
title: "首页",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-camera",
|
|
|
|
|
index: "/realTimeMonitor",
|
|
|
|
|
title: "实时监控",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-film",
|
|
|
|
|
index: "/pictureRotation",
|
|
|
|
|
title: "图片轮巡",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-bell",
|
|
|
|
|
index: "photoAlarm",
|
|
|
|
|
title: "告警处理",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-search",
|
|
|
|
|
index: "/realTimeSearch",
|
|
|
|
|
title: "历史图片",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
role: "",
|
|
|
|
|
menuList: [],
|
|
|
|
|
};
|
|
|
|
@ -322,8 +175,11 @@ export default {
|
|
|
|
|
// 遍历原始数组,根据条件构建新数组
|
|
|
|
|
originalArray.forEach((item) => {
|
|
|
|
|
const { id, key, desc } = item;
|
|
|
|
|
console.log(key);
|
|
|
|
|
console.log(key, desc);
|
|
|
|
|
const index = key.startsWith("/") ? key.substring(1) : key; // 移除开头的斜杠
|
|
|
|
|
// 移除desc中"-"后面的内容
|
|
|
|
|
const processedDesc = desc.split("-")[0].trim();
|
|
|
|
|
console.log(index, processedDesc);
|
|
|
|
|
const icon = icons[index] || icons["default"]; // 获取图标,如果未找到则使用默认图标
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
@ -336,7 +192,10 @@ export default {
|
|
|
|
|
].includes(index)
|
|
|
|
|
) {
|
|
|
|
|
// 如果包含杆塔或线路信息,则添加到资产管理子菜单
|
|
|
|
|
assetManagementSubs.push({ index: "/" + index, title: desc });
|
|
|
|
|
assetManagementSubs.push({
|
|
|
|
|
index: "/" + index,
|
|
|
|
|
title: processedDesc,
|
|
|
|
|
});
|
|
|
|
|
} else if (
|
|
|
|
|
[
|
|
|
|
|
"userManagement",
|
|
|
|
@ -348,10 +207,13 @@ export default {
|
|
|
|
|
].includes(index)
|
|
|
|
|
) {
|
|
|
|
|
// 如果包含用户列表等,则添加到系统管理子菜单
|
|
|
|
|
systemManagementSubs.push({ index: "/" + index, title: desc });
|
|
|
|
|
systemManagementSubs.push({
|
|
|
|
|
index: "/" + index,
|
|
|
|
|
title: processedDesc,
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
// 其他菜单项直接添加到新数组中
|
|
|
|
|
newArray.push({ icon, index: "/" + index, title: desc });
|
|
|
|
|
newArray.push({ icon, index: "/" + index, title: processedDesc });
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -387,22 +249,19 @@ export default {
|
|
|
|
|
console.log("用户管理");
|
|
|
|
|
console.log(this.role);
|
|
|
|
|
|
|
|
|
|
// this.menuList = JSON.parse(localStorage.getItem("menuPermission"));
|
|
|
|
|
// console.log(this.menuList);
|
|
|
|
|
// this.getMenuArr(this.menuList);
|
|
|
|
|
this.menuList = JSON.parse(localStorage.getItem("menuPermission"));
|
|
|
|
|
console.log(this.menuList);
|
|
|
|
|
this.getMenuArr(this.menuList);
|
|
|
|
|
|
|
|
|
|
if (this.role == 0) {
|
|
|
|
|
this.items = this.items;
|
|
|
|
|
} else if (this.role == 1) {
|
|
|
|
|
this.items = this.items1;
|
|
|
|
|
} else if (this.role == 2) {
|
|
|
|
|
this.items = this.items2;
|
|
|
|
|
} else if (this.role == 4) {
|
|
|
|
|
this.items = this.hnjcitems;
|
|
|
|
|
}
|
|
|
|
|
// //this.activeIndex = this.items[0].index;
|
|
|
|
|
// console.log(this.items);
|
|
|
|
|
console.log(this.activeIndex);
|
|
|
|
|
// if (this.role == 0) {
|
|
|
|
|
// this.items = this.items;
|
|
|
|
|
// } else if (this.role == 1) {
|
|
|
|
|
// this.items = this.items1;
|
|
|
|
|
// } else if (this.role == 2) {
|
|
|
|
|
// this.items = this.items2;
|
|
|
|
|
// } else if (this.role == 4) {
|
|
|
|
|
// this.items = this.hnjcitems;
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|