2 Commits 2da49a187b ... 683bbb193a

Author SHA1 Message Date
  Koishi 683bbb193a .gitignore 文件修改、系统部分页面接口替换、字段替换、参数替换、样式修改。 1 year ago
  baiyanting 024e9752dc 修改系统的菜单权限问题(super_admin 可查看系统管理和基础数据) 1 year ago

+ 3 - 3
.gitignore

@@ -3,6 +3,6 @@ node_modules/
 .vscode
 .vscode
 dist
 dist
 dist_electron
 dist_electron
-.zip
-.rar
-.7z
+*.zip
+*.rar
+*.7z

+ 3 - 3
src/api/api.js

@@ -1,6 +1,6 @@
 import request from "./axios.js";
 import request from "./axios.js";
 export const baseURL = "http://10.81.3.154:6015/";
 export const baseURL = "http://10.81.3.154:6015/";
-// export const baseURL = "http://192.168.1.108:6015/";
+// export const baseURL = "http://192.168.1.102:6015/";
 import JSONBIG from "json-bigint";
 import JSONBIG from "json-bigint";
 
 
 // 获取场站数据
 // 获取场站数据
@@ -843,10 +843,10 @@ export const getWtModel = (wpId) => {
     });
     });
 };
 };
 
 
-export const getWpList = () => {
+export const getWpList = (types = "") => {
     return request({
     return request({
         method: "get",
         method: "get",
-        url: `/alertrule/querywpllist`,
+        url: `/alertrule/querywpllist?types=${types}`,
     });
     });
 };
 };
 export const getBpList = () => {
 export const getBpList = () => {

+ 7 - 2
src/components/Sidebar.vue

@@ -23,7 +23,10 @@
             </template>
             </template>
 
 
             <template v-for="subItem in item.children" :key="subItem.name">
             <template v-for="subItem in item.children" :key="subItem.name">
-              <el-menu-item :index="replaceRoute(subItem.path)">
+              <el-menu-item
+                v-if="subItem.isshow?.includes(identity) || !subItem.isshow"
+                :index="replaceRoute(subItem.path)"
+              >
                 {{ subItem.meta.title }}
                 {{ subItem.meta.title }}
               </el-menu-item>
               </el-menu-item>
             </template>
             </template>
@@ -52,13 +55,15 @@
 import { computed } from "vue";
 import { computed } from "vue";
 import { useRoute, useRouter } from "vue-router";
 import { useRoute, useRouter } from "vue-router";
 import { useStore } from "vuex";
 import { useStore } from "vuex";
-const identity = sessionStorage.getItem("identity");
+// const identity = sessionStorage.getItem("identity");
 
 
 const route = useRoute();
 const route = useRoute();
 const store = useStore();
 const store = useStore();
 const router = useRouter();
 const router = useRouter();
 let onRoutes = computed(() => route.path.replace("/", ""));
 let onRoutes = computed(() => route.path.replace("/", ""));
 let collapse = computed(() => store.state.collapse);
 let collapse = computed(() => store.state.collapse);
+const identity = computed(() => store.getters.roles);
+// console.log(identity);
 
 
 const replaceRoute = (route) => {
 const replaceRoute = (route) => {
   const regex = /\/:[^?]+?\?/g;
   const regex = /\/:[^?]+?\?/g;

+ 1 - 1
src/components/alarmPopupa/index.vue

@@ -78,7 +78,7 @@ export default {
       if (alarmItem.deviceType === "booststation") {
       if (alarmItem.deviceType === "booststation") {
         alarmName = "升压站报警";
         alarmName = "升压站报警";
       } else if (alarmItem.deviceType === "inverter") {
       } else if (alarmItem.deviceType === "inverter") {
-        alarmName = "逆变器报警";
+        alarmName = "光伏报警";
       } else if (alarmItem.deviceType === "windturbine") {
       } else if (alarmItem.deviceType === "windturbine") {
         alarmName = "设备报警";
         alarmName = "设备报警";
       } else if (alarmItem.deviceType === "station") {
       } else if (alarmItem.deviceType === "station") {

+ 1 - 2
src/pages/Login.vue

@@ -142,7 +142,6 @@ const loginFun = async () => {
         ElMessage.success("登录成功");
         ElMessage.success("登录成功");
       }
       }
     });
     });
-    sessionStorage.setItem("identity", res.identity || "admin");
   } else {
   } else {
     ElMessage.error(msg);
     ElMessage.error(msg);
   }
   }
@@ -201,4 +200,4 @@ const loginFun = async () => {
     }
     }
   }
   }
 }
 }
-</style>
+</style>

+ 3 - 7
src/pages/alarmConfig/bj_windturbine/windturbine.vue

@@ -54,13 +54,9 @@
           popper-class="select"
           popper-class="select"
           @change="categorychanged"
           @change="categorychanged"
         >
         >
-          <el-option key="1" label="风机报警" value="windturbine"></el-option>
-          <el-option
-            key="2"
-            label="升压站报警"
-            value="booststation"
-          ></el-option>
-          <el-option key="3" label="逆变器报警" value="inverter"></el-option>
+          <el-option key="2" label="升压站" value="booststation"></el-option>
+          <el-option key="1" label="风机" value="windturbine"></el-option>
+          <el-option key="3" label="光伏" value="inverter"></el-option>
         </el-select>
         </el-select>
         <el-select
         <el-select
           v-model="query.wpId"
           v-model="query.wpId"

+ 2 - 2
src/pages/alarmConfig/bj_windturbine/windturbine_components.vue

@@ -279,7 +279,7 @@ export default {
       categoryArray: [
       categoryArray: [
         { id: "windturbine", label: "风机报警" },
         { id: "windturbine", label: "风机报警" },
         { id: "booststation", label: "升压站报警" },
         { id: "booststation", label: "升压站报警" },
-        { id: "inverter", label: "逆变器报警" },
+        { id: "inverter", label: "光伏报警" },
       ],
       ],
       wpArray: [],
       wpArray: [],
       modelArray: [],
       modelArray: [],
@@ -379,7 +379,7 @@ export default {
       fetchRelatePartAndAlarmType().then((res) => {
       fetchRelatePartAndAlarmType().then((res) => {
         const keyMap = {
         const keyMap = {
           fjbj: "风机部件",
           fjbj: "风机部件",
-          gfbj: "逆变器部件",
+          gfbj: "光伏部件",
         };
         };
 
 
         let associatedComponentsArray = [];
         let associatedComponentsArray = [];

+ 29 - 21
src/pages/safe/historywaring.vue

@@ -10,7 +10,12 @@
           style="width: 100px"
           style="width: 100px"
           placeholder="全部"
           placeholder="全部"
           popper-class="select"
           popper-class="select"
-          @change="typechange"
+          @change="
+            () => {
+              getStationList();
+              typechange();
+            }
+          "
         >
         >
           <el-option
           <el-option
             v-for="item in state.typeList"
             v-for="item in state.typeList"
@@ -181,7 +186,7 @@
 </template>
 </template>
 
 
 <script setup>
 <script setup>
-import { watch, reactive, nextTick, computed, onMounted } from "vue";
+import { watch, reactive, nextTick, computed, onMounted, ref } from "vue";
 import { useRouter, useRoute } from "vue-router";
 import { useRouter, useRoute } from "vue-router";
 import dayjs from "dayjs";
 import dayjs from "dayjs";
 import {
 import {
@@ -190,6 +195,7 @@ import {
   fetchWindturbineList,
   fetchWindturbineList,
   fetchModel,
   fetchModel,
   fetchRelatePartAndAlarmType,
   fetchRelatePartAndAlarmType,
+  getWpList,
 } from "/@/api/api.js";
 } from "/@/api/api.js";
 import { ElMessage } from "element-plus";
 import { ElMessage } from "element-plus";
 import { initWebSocket } from "/@/websocket/indextest";
 import { initWebSocket } from "/@/websocket/indextest";
@@ -201,14 +207,15 @@ const isStation = computed(() => store.getters.isStation);
 const route = useRoute();
 const route = useRoute();
 
 
 onMounted(() => {
 onMounted(() => {
-  getequipmentmodel_list();
-  getfetchRelatePart();
   state.dateTime = [
   state.dateTime = [
     dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"),
     dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"),
     dayjs().format("YYYY-MM-DD HH:mm:ss"),
     dayjs().format("YYYY-MM-DD HH:mm:ss"),
   ];
   ];
   state.deviceId = route.params.deviceId || "";
   state.deviceId = route.params.deviceId || "";
   state.alarmId = route.params.alarmId || "";
   state.alarmId = route.params.alarmId || "";
+  getStationList();
+  getequipmentmodel_list();
+  getfetchRelatePart();
 });
 });
 // 机型
 // 机型
 const getequipmentmodel_list = async () => {
 const getequipmentmodel_list = async () => {
@@ -235,7 +242,7 @@ const state = reactive({
       value: "windturbine",
       value: "windturbine",
     },
     },
     {
     {
-      label: "逆变器",
+      label: "光伏",
       value: "inverter",
       value: "inverter",
     },
     },
   ],
   ],
@@ -255,36 +262,37 @@ const state = reactive({
   tableData: [],
   tableData: [],
   isshowwindturbineName: true,
   isshowwindturbineName: true,
   tableHeader: [
   tableHeader: [
-    { title: "时间", code: "ts", width: "180" },
-    { title: "场站", code: "stationname", width: "180" },
-    { title: "机组", code: "devicename", width: "180" },
-    { title: "故障编码", code: "nemCode" },
+    { title: "时间", code: "ts", width: "150" },
+    { title: "场站", code: "stationname", width: "150" },
+    { title: "机组", code: "devicename", width: "150" },
+    { title: "故障编码", code: "nemCode", width: "100" },
     { title: "故障原因", code: "faultCause" },
     { title: "故障原因", code: "faultCause" },
     { title: "故障解决方法", code: "resolvent" },
     { title: "故障解决方法", code: "resolvent" },
-    { title: "报警信息", code: "description" },
+    { title: "报警信息", code: "description", width: "180" },
     { title: "级别", code: "rank", width: "80" },
     { title: "级别", code: "rank", width: "80" },
     { title: "类型", code: "alarmtype", width: "80" },
     { title: "类型", code: "alarmtype", width: "80" },
   ],
   ],
   tableHeader1: [
   tableHeader1: [
-    { title: "时间", code: "ts", width: "180" },
-    { title: "升压站", code: "stationname", width: "180" },
-    { title: "报警信息", code: "description" },
+    { title: "时间", code: "ts", width: "150" },
+    { title: "升压站", code: "stationname", width: "150" },
+    { title: "报警信息", code: "description", width: "180" },
     { title: "级别", code: "rank", width: "80" },
     { title: "级别", code: "rank", width: "80" },
     { title: "类型", code: "alarmtype", width: "80" },
     { title: "类型", code: "alarmtype", width: "80" },
   ],
   ],
 });
 });
 // 场站列表/升压站列表
 // 场站列表/升压站列表
-const stationList = computed(() => {
-  if (state.typeVal == "windturbine") {
-    return store.state.stationListAll;
-  } else if (state.typeVal == "booststation") {
-    return store.state.booststationList;
-  }
-});
+const stationList = ref([]);
+
+const getStationList = async () => {
+  const { data } = await getWpList(state.typeVal);
+  console.log(1111, data);
+  stationList.value = data;
+};
+
 watch(
 watch(
   () => stationList,
   () => stationList,
   (val, old) => {
   (val, old) => {
-    val.value.length &&
+    val?.value?.length &&
       nextTick(async () => {
       nextTick(async () => {
         state.stationId = val.value[0]?.id;
         state.stationId = val.value[0]?.id;
         await getWindturbineList();
         await getWindturbineList();

+ 2 - 2
src/pages/safe/realwaring.vue

@@ -44,7 +44,7 @@
         </div>
         </div>
         <div class="lineItem card">
         <div class="lineItem card">
           <Safecom
           <Safecom
-            title="逆变器报警"
+            title="光伏报警"
             deviceType="inverter"
             deviceType="inverter"
             alarmType="inverter"
             alarmType="inverter"
           />
           />
@@ -67,7 +67,7 @@
         </div>
         </div>
         <div class="lineItem card">
         <div class="lineItem card">
           <Safecom
           <Safecom
-            title="逆变器自定义报警"
+            title="光伏自定义报警"
             deviceType="inverter"
             deviceType="inverter"
             alarmType="custom"
             alarmType="custom"
           />
           />

+ 1 - 1
src/pages/safe/safecomponent.vue

@@ -28,7 +28,7 @@
         label="报警信息"
         label="报警信息"
         show-overflow-tooltip
         show-overflow-tooltip
       />
       />
-      <el-table-column label="级别" width="75" show-overflow-tooltip>
+      <el-table-column label="级别" width="80" show-overflow-tooltip>
         <template #default="scope">
         <template #default="scope">
           <el-tag
           <el-tag
             class="ml-2"
             class="ml-2"

+ 1 - 1
src/permission.js

@@ -44,7 +44,7 @@ router.beforeEach((to, from, next) => {
             next("/");
             next("/");
         } else {
         } else {
             if (store.getters.roles.length == 0) {
             if (store.getters.roles.length == 0) {
-                store.dispatch("user/GetInfo").then(async() => {
+                store.dispatch("user/GetInfo").then(async () => {
                     next();
                     next();
                 });
                 });
             } else {
             } else {

+ 374 - 366
src/router/index.js

@@ -1,396 +1,404 @@
 import {
 import {
-    createRouter,
-    createWebHistory,
-    createWebHashHistory,
+  createRouter,
+  createWebHistory,
+  createWebHashHistory,
 } from "vue-router";
 } from "vue-router";
 import Home from "../pages/Home.vue";
 import Home from "../pages/Home.vue";
 import store from "@/store";
 import store from "@/store";
 import { getCookie } from "@/utils/auth"; // getToken from cookie
 import { getCookie } from "@/utils/auth"; // getToken from cookie
 const routes = [
 const routes = [
-    { path: "/", redirect: "/safe/realwaring" },
-    {
-        path: "/",
-        name: "Home",
-        redirect: "/safe/realwaring",
-        // redirect: '/firstPage',
-        component: Home,
-        children: [
-            //   {
-            //     icon: "el-icon-s-home",
-            //     path: "/firstPage",
-            //     name: "shouye",
-            //     meta: {
-            //       title: "系统首页",
-            //     },
-            //     component: () => import("../pages/firstPage.vue"),
-            //   },
+  { path: "/", redirect: "/safe/realwaring" },
+  {
+    path: "/",
+    name: "Home",
+    redirect: "/safe/realwaring",
+    // redirect: '/firstPage',
+    component: Home,
+    children: [
+      //   {
+      //     icon: "el-icon-s-home",
+      //     path: "/firstPage",
+      //     name: "shouye",
+      //     meta: {
+      //       title: "系统首页",
+      //     },
+      //     component: () => import("../pages/firstPage.vue"),
+      //   },
 
 
-            //   {
-            //     icon: "el-icon-s-home",
-            //     path: "/dashboard",
-            //     name: "dashboard",
-            //     meta: {
-            //       title: "系统首页",
-            //     },
-            //     component: () =>
-            //       import(
-            //         /* webpackChunkName: "dashboard" */
-            //         "../pages/Dashboard.vue"
-            //       ),
-            //   },
+      //   {
+      //     icon: "el-icon-s-home",
+      //     path: "/dashboard",
+      //     name: "dashboard",
+      //     meta: {
+      //       title: "系统首页",
+      //     },
+      //     component: () =>
+      //       import(
+      //         /* webpackChunkName: "dashboard" */
+      //         "../pages/Dashboard.vue"
+      //       ),
+      //   },
 
 
-            {
-                icon: "iconfont iconfengji",
-                path: "/safe",
-                name: "safe",
-                redirect: "/safe/realwaring",
-                meta: {
-                    title: "安全运行",
-                },
-                component: () =>
-                    import ("../pages/routerView.vue"),
-                children: [{
-                        path: "/safe/realwaring",
-                        name: "saferealwaring",
-                        meta: {
-                            title: "实时报警",
-                            keepAlive: true, //需要被缓存的组件
-                        },
-                        component: () =>
-                            import (
-                                /* webpackChunkName: "form" */
-                                "../pages/safe/realwaring.vue"
-                            ),
-                    },
-                    {
-                        path: "/safe/historywaring/:deviceId?/:alarmId?",
-                        name: "safehistorywaring",
-                        meta: {
-                            title: "报警记录",
-                        },
-                        component: () =>
-                            import (
-                                /* webpackChunkName: "form" */
-                                "../pages/safe/historywaring.vue"
-                            ),
-                    },
-                    {
-                        path: "/safe/dataSearch",
-                        name: "safedataSearch",
-                        meta: {
-                            title: "数据查询",
-                        },
-                        component: () =>
-                            import (
-                                /* webpackChunkName: "form" */
-                                "../pages/safe/datasearch.vue"
-                            ),
-                    },
-                ],
+      {
+        icon: "iconfont iconfengji",
+        path: "/safe",
+        name: "safe",
+        redirect: "/safe/realwaring",
+        meta: {
+          title: "安全运行",
+        },
+        component: () => import("../pages/routerView.vue"),
+        children: [
+          {
+            path: "/safe/realwaring",
+            name: "saferealwaring",
+            isshow: "super_admin,common",
+            meta: {
+              title: "实时报警",
+              keepAlive: true, //需要被缓存的组件
+            },
+            component: () =>
+              import(
+                /* webpackChunkName: "form" */
+                "../pages/safe/realwaring.vue"
+              ),
+          },
+          {
+            path: "/safe/historywaring/:deviceId?/:alarmId?",
+            name: "safehistorywaring",
+            isshow: "super_admin,common",
+            meta: {
+              title: "报警记录",
+            },
+            component: () =>
+              import(
+                /* webpackChunkName: "form" */
+                "../pages/safe/historywaring.vue"
+              ),
+          },
+          {
+            path: "/safe/dataSearch",
+            name: "safedataSearch",
+            isshow: "super_admin,common",
+            meta: {
+              title: "数据查询",
             },
             },
+            component: () =>
+              import(
+                /* webpackChunkName: "form" */
+                "../pages/safe/datasearch.vue"
+              ),
+          },
+        ],
+      },
 
 
-            {
-                icon: "iconfont iconguzhangzhenduan",
-                path: "/faultDiagnosis",
-                name: "faultDiagnosis",
-                redirect: "/faultDiagnosis/warning",
-                meta: {
-                    title: "状态检修",
-                    permission: true,
-                },
-                component: () =>
-                    import (
-                        /* webpackChunkName: "permission" */
-                        "../pages/routerView.vue"
-                    ),
-                children: [
-                    // {
-                    //     icon: 'el-icon-s-home',
-                    //     path: '/faultDiagnosis/record',
-                    //     name: 'faultDiagnosissrecord',
-                    //     meta: {
-                    //         title: '预警记录',
-                    //     },
-                    //     component: () =>
-                    //         import (
-                    //             /* webpackChunkName: "form" */
-                    //             '../pages/faultDiagnosis/record.vue'
-                    //         ),
-                    // },
-                    //   {
-                    //     icon: "el-icon-s-home",
-                    //     path: "/faultDiagnosis/warning",
-                    //     name: "faultDiagnosiswarning",
-                    //     meta: {
-                    //       title: "预警分析",
-                    //     },
-                    //     component: () =>
-                    //       import(
-                    //         /* webpackChunkName: "form" */
-                    //         "../pages/faultDiagnosis/warning.vue"
-                    //       ),
-                    //   },
-                    //   {
-                    //     icon: "el-icon-s-home",
-                    //     path: "/faultDiagnosis/statistics",
-                    //     name: "faultDiagnosisstatistics",
-                    //     meta: {
-                    //       title: "预警统计",
-                    //     },
-                    //     component: () =>
-                    //       import(
-                    //         /* webpackChunkName: "form" */
-                    //         "../pages/faultDiagnosis/statistics.vue"
-                    //       ),
-                    //   },
-                    {
-                        icon: "el-icon-s-home",
-                        path: "/basedata/FanDataStatisticTable",
-                        name: "FanDataStatisticTable",
-                        meta: {
-                            title: "原始报警分析",
-                            keepAlive: true,
-                        },
-                        component: () =>
-                            import ("../pages/baseData/FanDataStatisticTable.vue"),
-                    },
-                    //   {
-                    //     icon: "el-icon-s-home",
-                    //     path: "/basedata/FanDataStatisticTable",
-                    //     name: "FanDataStatisticTable",
-                    //     meta: {
-                    //       title: "原始报警统计",
-                    //       keepAlive: true,
-                    //     },
-                    //     component: () =>
-                    //       import("../pages/baseData/FanDataStatisticTable.vue"),
-                    //   },
-                    //   {
-                    //     icon: "el-icon-s-home",
-                    //     path: "/faultDiagnosis/report",
-                    //     name: "faultDiagnosisreport",
-                    //     meta: {
-                    //       title: "隐患报告",
-                    //     },
-                    //     component: () => import("../pages/faultDiagnosis/report.vue"),
-                    //   },
-                    //   {
-                    //     icon: "el-icon-s-home",
-                    //     path: "/faultDiagnosis/dangerReportReview",
-                    //     name: "dangerReportReview",
-                    //     meta: {
-                    //       title: "报告评审",
-                    //     },
-                    //     component: () =>
-                    //       import("../pages/faultDiagnosis/dangerReportReview.vue"),
-                    //   },
-                    //   {
-                    //     icon: "el-icon-s-home",
-                    //     path: "/faultDiagnosis/patrolInspectionPlan",
-                    //     name: "patrolInspectionPlan",
-                    //     meta: {
-                    //       title: "巡检计划",
-                    //     },
-                    //     component: () =>
-                    //       import("../pages/faultDiagnosis/patrolInspectionPlan.vue"),
-                    //   },
+      {
+        icon: "iconfont iconguzhangzhenduan",
+        path: "/faultDiagnosis",
+        name: "faultDiagnosis",
+        isshow: "super_admin,common",
+        redirect: "/faultDiagnosis/warning",
+        meta: {
+          title: "状态检修",
+          permission: true,
+        },
+        component: () =>
+          import(
+            /* webpackChunkName: "permission" */
+            "../pages/routerView.vue"
+          ),
+        children: [
+          // {
+          //     icon: 'el-icon-s-home',
+          //     path: '/faultDiagnosis/record',
+          //     name: 'faultDiagnosissrecord',
+          //     meta: {
+          //         title: '预警记录',
+          //     },
+          //     component: () =>
+          //         import (
+          //             /* webpackChunkName: "form" */
+          //             '../pages/faultDiagnosis/record.vue'
+          //         ),
+          // },
+          //   {
+          //     icon: "el-icon-s-home",
+          //     path: "/faultDiagnosis/warning",
+          //     name: "faultDiagnosiswarning",
+          //     meta: {
+          //       title: "预警分析",
+          //     },
+          //     component: () =>
+          //       import(
+          //         /* webpackChunkName: "form" */
+          //         "../pages/faultDiagnosis/warning.vue"
+          //       ),
+          //   },
+          //   {
+          //     icon: "el-icon-s-home",
+          //     path: "/faultDiagnosis/statistics",
+          //     name: "faultDiagnosisstatistics",
+          //     meta: {
+          //       title: "预警统计",
+          //     },
+          //     component: () =>
+          //       import(
+          //         /* webpackChunkName: "form" */
+          //         "../pages/faultDiagnosis/statistics.vue"
+          //       ),
+          //   },
+          {
+            icon: "el-icon-s-home",
+            path: "/basedata/FanDataStatisticTable",
+            name: "FanDataStatisticTable",
+            isshow: "super_admin,common",
+            meta: {
+              title: "原始报警分析",
+              keepAlive: true,
+            },
+            component: () =>
+              import("../pages/baseData/FanDataStatisticTable.vue"),
+          },
+          //   {
+          //     icon: "el-icon-s-home",
+          //     path: "/basedata/FanDataStatisticTable",
+          //     name: "FanDataStatisticTable",
+          //     meta: {
+          //       title: "原始报警统计",
+          //       keepAlive: true,
+          //     },
+          //     component: () =>
+          //       import("../pages/baseData/FanDataStatisticTable.vue"),
+          //   },
+          //   {
+          //     icon: "el-icon-s-home",
+          //     path: "/faultDiagnosis/report",
+          //     name: "faultDiagnosisreport",
+          //     meta: {
+          //       title: "隐患报告",
+          //     },
+          //     component: () => import("../pages/faultDiagnosis/report.vue"),
+          //   },
+          //   {
+          //     icon: "el-icon-s-home",
+          //     path: "/faultDiagnosis/dangerReportReview",
+          //     name: "dangerReportReview",
+          //     meta: {
+          //       title: "报告评审",
+          //     },
+          //     component: () =>
+          //       import("../pages/faultDiagnosis/dangerReportReview.vue"),
+          //   },
+          //   {
+          //     icon: "el-icon-s-home",
+          //     path: "/faultDiagnosis/patrolInspectionPlan",
+          //     name: "patrolInspectionPlan",
+          //     meta: {
+          //       title: "巡检计划",
+          //     },
+          //     component: () =>
+          //       import("../pages/faultDiagnosis/patrolInspectionPlan.vue"),
+          //   },
 
 
-                    //   {
-                    //     icon: "el-icon-s-home",
-                    //     path: "/faultDiagnosis/Recommend",
-                    //     name: "faultDiagnosisRecommend",
-                    //     meta: {
-                    //       title: "诊断报告",
-                    //     },
-                    //     component: () =>
-                    //       import(
-                    //         /* webpackChunkName: "form" */
-                    //         "../pages/faultDiagnosis/Recommend.vue"
-                    //       ),
-                    //   },
+          //   {
+          //     icon: "el-icon-s-home",
+          //     path: "/faultDiagnosis/Recommend",
+          //     name: "faultDiagnosisRecommend",
+          //     meta: {
+          //       title: "诊断报告",
+          //     },
+          //     component: () =>
+          //       import(
+          //         /* webpackChunkName: "form" */
+          //         "../pages/faultDiagnosis/Recommend.vue"
+          //       ),
+          //   },
 
 
-                    // {
-                    //     icon: 'el-icon-s-home',
-                    //     path: '/faultDiagnosis/fault',
-                    //     name: 'faultDiagnosisfault',
-                    //     meta: {
-                    //         title: '故障诊断',
-                    //     },
-                    //     component: () =>
-                    //         import (
-                    //             /* webpackChunkName: "form" */
-                    //             '../pages/faultDiagnosis/fault.vue'
-                    //         ),
-                    // },
+          // {
+          //     icon: 'el-icon-s-home',
+          //     path: '/faultDiagnosis/fault',
+          //     name: 'faultDiagnosisfault',
+          //     meta: {
+          //         title: '故障诊断',
+          //     },
+          //     component: () =>
+          //         import (
+          //             /* webpackChunkName: "form" */
+          //             '../pages/faultDiagnosis/fault.vue'
+          //         ),
+          // },
 
 
-                    // {
-                    //     icon: 'el-icon-s-home',
-                    //     path: '/faultDiagnosis/cluster',
-                    //     name: 'faultDiagnosiscluster',
-                    //     meta: {
-                    //         title: '聚类分析',
-                    //     },
-                    //     component: () =>
-                    //         import (
-                    //             /* webpackChunkName: "form" */
-                    //             '../pages/faultDiagnosis/cluster.vue'
-                    //         ),
-                    // },
-                ],
+          // {
+          //     icon: 'el-icon-s-home',
+          //     path: '/faultDiagnosis/cluster',
+          //     name: 'faultDiagnosiscluster',
+          //     meta: {
+          //         title: '聚类分析',
+          //     },
+          //     component: () =>
+          //         import (
+          //             /* webpackChunkName: "form" */
+          //             '../pages/faultDiagnosis/cluster.vue'
+          //         ),
+          // },
+        ],
+      },
+      {
+        icon: "iconfont iconbaojingpeizhi",
+        path: "/alarmconfig",
+        name: "alarmconfig",
+        isshow: "super_admin,common",
+        redirect: "/alarmconfig/station",
+        meta: {
+          title: "预警配置",
+        },
+        component: () =>
+          import(
+            /* webpackChunkName: "tabs" */
+            "../pages/routerView.vue"
+          ),
+        children: [
+          {
+            icon: "el-icon-s-home",
+            path: "/alarmConfig/custom",
+            isshow: "super_admin,common",
+            name: "alarmConfigcustom",
+            meta: {
+              title: "自定义预警",
             },
             },
-            {
-                icon: "iconfont iconbaojingpeizhi",
-                path: "/alarmconfig",
-                name: "alarmconfig",
-                // isshow: ["admin", "superuser"],
-                redirect: "/alarmconfig/station",
-                meta: {
-                    title: "预警配置",
-                },
-                component: () =>
-                    import (
-                        /* webpackChunkName: "tabs" */
-                        "../pages/routerView.vue"
-                    ),
-                children: [{
-                        icon: "el-icon-s-home",
-                        path: "/alarmConfig/custom",
-                        name: "alarmConfigcustom",
-                        meta: {
-                            title: "自定义预警",
-                        },
-                        component: () =>
-                            import (
-                                /* webpackChunkName: "form" */
-                                "../pages/alarmConfig/bj_custom/custom.vue"
-                            ),
-                    },
-                    {
-                        icon: "el-icon-s-home",
-                        path: "/alarmConfig/fan",
-                        name: "alarmConfigfan",
-                        meta: {
-                            title: "风机报警",
-                        },
-                        component: () =>
-                            import (
-                                /* webpackChunkName: "form" */
-                                "../pages/alarmConfig/bj_windturbine/windturbine.vue"
-                            ),
-                    },
-
-                    {
-                        icon: "el-icon-s-home",
-                        path: "/alarmConfig/Logs",
-                        name: "alarmConfigLogs",
-                        meta: {
-                            title: "规则修改日志",
-                        },
-                        component: () =>
-                            import (
-                                /* webpackChunkName: "form" */
-                                "../pages/alarmConfig/Logs.vue"
-                            ),
-                    },
-                ],
+            component: () =>
+              import(
+                /* webpackChunkName: "form" */
+                "../pages/alarmConfig/bj_custom/custom.vue"
+              ),
+          },
+          {
+            icon: "el-icon-s-home",
+            path: "/alarmConfig/fan",
+            isshow: "super_admin,common",
+            name: "alarmConfigfan",
+            meta: {
+              title: "报警配置",
             },
             },
+            component: () =>
+              import(
+                /* webpackChunkName: "form" */
+                "../pages/alarmConfig/bj_windturbine/windturbine.vue"
+              ),
+          },
 
 
-            {
-                icon: "iconfont iconjichushuju",
-                path: "/basedata",
-                name: "basedata",
-                // isshow: "admin",
-                redirect: "/basedata/station",
-                meta: {
-                    title: "基础数据",
-                },
-                component: () =>
-                    import (
-                        /* webpackChunkName: "home" */
-                        "../pages/routerView.vue"
-                    ),
-                children: [
-                    //   {
-                    //     icon: "el-icon-s-home",
-                    //     path: "/basedata/device",
-                    //     name: "basedatadevice",
-                    //     meta: {
-                    //       title: "设备模型",
-                    //       keepAlive: true,
-                    //     },
-                    //     component: () =>
-                    //       import(
-                    //         /* webpackChunkName: "form" */
-                    //         "../pages/baseData/device.vue"
-                    //       ),
-                    //   },
-                    {
-                        icon: "el-icon-s-home",
-                        path: "/basedata/dictionary",
-                        name: "basedatadictionary",
-                        meta: {
-                            title: "字典维护",
-                            keepAlive: true,
-                        },
-                        component: () =>
-                            import (
-                                /* webpackChunkName: "form" */
-                                "../pages/baseData/dictionary.vue"
-                            ),
-                    },
-                ],
-            },
-            //   {
-            //     icon: "el-icon-user-solid",
-            //     path: "/userManage",
-            //     name: "userManage",
-            //     isshow: "admin",
-            //     meta: {
-            //       title: "用户管理",
-            //     },
-            //     component: () => import("../pages/userManage/userManage.vue"),
-            //   },
-            {
-                icon: "iconfont iconxitongcaidan",
-                path: "/systemManage",
-                isshow: "admin",
-                name: "systemManage",
-                meta: {
-                    title: "系统管理",
-                },
-                component: () =>
-                    import ("../pages/systemManage/systemManage.vue"),
+          {
+            icon: "el-icon-s-home",
+            path: "/alarmConfig/Logs",
+            isshow: "super_admin,common",
+            name: "alarmConfigLogs",
+            meta: {
+              title: "规则修改日志",
             },
             },
+            component: () =>
+              import(
+                /* webpackChunkName: "form" */
+                "../pages/alarmConfig/Logs.vue"
+              ),
+          },
         ],
         ],
-    },
-    {
-        path: "/login",
-        name: "Login",
+      },
+
+      {
+        icon: "iconfont iconjichushuju",
+        path: "/basedata",
+        name: "basedata",
+        isshow: "super_admin",
+        redirect: "/basedata/station",
         meta: {
         meta: {
-            title: "登录",
+          title: "基础数据",
         },
         },
         component: () =>
         component: () =>
-            import (
-                /* webpackChunkName: "login" */
-                "../pages/Login.vue"
-            ),
-    },
-    {
+          import(
+            /* webpackChunkName: "home" */
+            "../pages/routerView.vue"
+          ),
+        children: [
+          //   {
+          //     icon: "el-icon-s-home",
+          //     path: "/basedata/device",
+          //     name: "basedatadevice",
+          //     meta: {
+          //       title: "设备模型",
+          //       keepAlive: true,
+          //     },
+          //     component: () =>
+          //       import(
+          //         /* webpackChunkName: "form" */
+          //         "../pages/baseData/device.vue"
+          //       ),
+          //   },
+          {
+            icon: "el-icon-s-home",
+            path: "/basedata/dictionary",
+            isshow: "super_admin",
+            name: "basedatadictionary",
+            meta: {
+              title: "字典维护",
+              keepAlive: true,
+            },
+            component: () =>
+              import(
+                /* webpackChunkName: "form" */
+                "../pages/baseData/dictionary.vue"
+              ),
+          },
+        ],
+      },
+      //   {
+      //     icon: "el-icon-user-solid",
+      //     path: "/userManage",
+      //     name: "userManage",
+      //     isshow: "admin",
+      //     meta: {
+      //       title: "用户管理",
+      //     },
+      //     component: () => import("../pages/userManage/userManage.vue"),
+      //   },
+      {
         icon: "iconfont iconxitongcaidan",
         icon: "iconfont iconxitongcaidan",
-        path: "/check",
-        // isshow: "admin",
-        name: "check",
+        path: "/systemManage",
+        isshow: "super_admin",
+        name: "systemManage",
         meta: {
         meta: {
-            title: "单点登录",
+          title: "系统管理",
         },
         },
-        component: () =>
-            import ("@/pages/check/check.vue"),
+        component: () => import("../pages/systemManage/systemManage.vue"),
+      },
+    ],
+  },
+  {
+    path: "/login",
+    name: "Login",
+    meta: {
+      title: "登录",
+    },
+    component: () =>
+      import(
+        /* webpackChunkName: "login" */
+        "../pages/Login.vue"
+      ),
+  },
+  {
+    icon: "iconfont iconxitongcaidan",
+    path: "/check",
+    // isshow: "admin",
+    name: "check",
+    meta: {
+      title: "单点登录",
     },
     },
+    component: () => import("@/pages/check/check.vue"),
+  },
 ];
 ];
 const constantRoutes = [];
 const constantRoutes = [];
 const router = createRouter({
 const router = createRouter({
-    history: createWebHashHistory(""),
-    routes,
+  history: createWebHashHistory(""),
+  routes,
 });
 });
 
 
-export default router;
+export default router;

+ 1 - 1
vite.config.js

@@ -31,7 +31,7 @@ export default defineConfig({
             "^/sharding": {
             "^/sharding": {
                 // target: 'http://wanghs.nat300.top',
                 // target: 'http://wanghs.nat300.top',
                 target: "http://10.81.3.154:6015",
                 target: "http://10.81.3.154:6015",
-                // target: "http://192.168.1.108:6015",
+                // target: "http://192.168.1.102:6015",
                 changeOrigin: true, //开启代理
                 changeOrigin: true, //开启代理
                 rewrite: (path) => path.replace(/^\/sharding/, ""),
                 rewrite: (path) => path.replace(/^\/sharding/, ""),
             },
             },