Rmengdi 9 mēneši atpakaļ
vecāks
revīzija
c9e62c4a9e

+ 2 - 2
.env.development

@@ -1,5 +1,5 @@
 # 应用端口
-VITE_APP_PORT=3000
+VITE_APP_PORT=3100
 
 # 代理前缀
 VITE_APP_BASE_API=/dev-api
@@ -13,4 +13,4 @@ VITE_APP_WS_ENDPOINT=wss://api.youlai.tech/ws  # 线上
 # VITE_APP_WS_ENDPOINT=ws://localhost:8989/ws  # 本地
 
 # 是否启用 Mock 服务
-VITE_MOCK_DEV_SERVER=false
+VITE_MOCK_DEV_SERVER=true

+ 50 - 311
mock/menu.mock.ts

@@ -8,77 +8,25 @@ export default defineMock([
       code: "00000",
       data: [
         {
-          path: "/system",
+          path: "/data",
+          redirect: { name: "dataCollection" }, // 设置默认重定向路径
           component: "Layout",
-          redirect: "/system/user",
-          name: "/system",
+          name: "/data",
           meta: {
-            title: "系统管理",
-            icon: "system",
+            title: "数据采集",
+            icon: "api",
             hidden: false,
             alwaysShow: false,
             params: null,
           },
           children: [
             {
-              path: "user",
-              component: "system/user/index",
-              name: "User",
-              meta: {
-                title: "用户管理",
-                icon: "el-icon-User",
-                hidden: false,
-                keepAlive: true,
-                alwaysShow: false,
-                params: null,
-              },
-            },
-            {
-              path: "role",
-              component: "system/role/index",
-              name: "Role",
+              path: "dataCollection",
+              component: "sLongDemo/dataCollection/index",
+              name: "dataCollection",
               meta: {
-                title: "角色管理",
-                icon: "role",
-                hidden: false,
-                keepAlive: true,
-                alwaysShow: false,
-                params: null,
-              },
-            },
-            {
-              path: "menu",
-              component: "system/menu/index",
-              name: "Menu",
-              meta: {
-                title: "菜单管理",
-                icon: "menu",
-                hidden: false,
-                keepAlive: true,
-                alwaysShow: false,
-                params: null,
-              },
-            },
-            {
-              path: "dept",
-              component: "system/dept/index",
-              name: "Dept",
-              meta: {
-                title: "部门管理",
-                icon: "tree",
-                hidden: false,
-                keepAlive: true,
-                alwaysShow: false,
-                params: null,
-              },
-            },
-            {
-              path: "dict",
-              component: "system/dict/index",
-              name: "Dict",
-              meta: {
-                title: "字典管理",
-                icon: "dict",
+                title: "数据采集",
+                icon: "api",
                 hidden: false,
                 keepAlive: true,
                 alwaysShow: false,
@@ -88,23 +36,24 @@ export default defineMock([
           ],
         },
         {
-          path: "/api",
+          path: "/bearing",
+          redirect: { name: "bearingManage" }, // 设置默认重定向路径
           component: "Layout",
-          name: "/api",
+          name: "/bearing",
           meta: {
-            title: "接口文档",
+            title: "轴承管理",
             icon: "api",
             hidden: false,
-            alwaysShow: true,
+            alwaysShow: false,
             params: null,
           },
           children: [
             {
-              path: "apifox",
-              component: "demo/api/apifox",
-              name: "Apifox",
+              path: "bearingManage",
+              component: "sLongDemo/bearingManage/index",
+              name: "bearingManage",
               meta: {
-                title: "Apifox",
+                title: "轴承管理",
                 icon: "api",
                 hidden: false,
                 keepAlive: true,
@@ -115,37 +64,27 @@ export default defineMock([
           ],
         },
         {
-          path: "/doc",
+          path: "/diagnostic",
+          redirect: { name: "diagnosticModelManage" }, // 设置默认重定向路径
           component: "Layout",
-          redirect: "https://juejin.cn/post/7228990409909108793",
-          name: "/doc",
+          name: "/diagnostic",
           meta: {
-            title: "平台文档",
-            icon: "document",
+            title: "诊断模型管理",
+            icon: "api",
             hidden: false,
             alwaysShow: false,
             params: null,
           },
           children: [
             {
-              path: "internal-doc",
-              component: "demo/internal-doc",
-              name: "InternalDoc",
-              meta: {
-                title: "平台文档(内嵌)",
-                icon: "document",
-                hidden: false,
-                alwaysShow: false,
-                params: null,
-              },
-            },
-            {
-              path: "https://juejin.cn/post/7228990409909108793",
-              name: "Https://juejin.cn/post/7228990409909108793",
+              path: "diagnosticModelManage",
+              component: "sLongDemo/diagnosticModelManage/index",
+              name: "diagnosticModelManage",
               meta: {
-                title: "平台文档(外链)",
-                icon: "el-icon-Link",
+                title: "诊断模型管理",
+                icon: "api",
                 hidden: false,
+                keepAlive: true,
                 alwaysShow: false,
                 params: null,
               },
@@ -153,157 +92,25 @@ export default defineMock([
           ],
         },
         {
-          path: "/multi-level",
+          path: "/fault",
+          redirect: { name: "faultDiagnosis" }, // 设置默认重定向路径
           component: "Layout",
-          name: "/multiLevel",
+          name: "/fault",
           meta: {
-            title: "多级菜单",
-            icon: "cascader",
-            hidden: false,
-            alwaysShow: true,
-            params: null,
-          },
-          children: [
-            {
-              path: "multi-level1",
-              component: "demo/multi-level/level1",
-              name: "MultiLevel1",
-              meta: {
-                title: "菜单一级",
-                icon: "",
-                hidden: false,
-                alwaysShow: true,
-                params: null,
-              },
-              children: [
-                {
-                  path: "multi-level2",
-                  component: "demo/multi-level/children/level2",
-                  name: "MultiLevel2",
-                  meta: {
-                    title: "菜单二级",
-                    icon: "",
-                    hidden: false,
-                    alwaysShow: false,
-                    params: null,
-                  },
-                  children: [
-                    {
-                      path: "multi-level3-1",
-                      component: "demo/multi-level/children/children/level3-1",
-                      name: "MultiLevel31",
-                      meta: {
-                        title: "菜单三级-1",
-                        icon: "",
-                        hidden: false,
-                        keepAlive: true,
-                        alwaysShow: false,
-                        params: null,
-                      },
-                    },
-                    {
-                      path: "multi-level3-2",
-                      component: "demo/multi-level/children/children/level3-2",
-                      name: "MultiLevel32",
-                      meta: {
-                        title: "菜单三级-2",
-                        icon: "",
-                        hidden: false,
-                        keepAlive: true,
-                        alwaysShow: false,
-                        params: null,
-                      },
-                    },
-                  ],
-                },
-              ],
-            },
-          ],
-        },
-        {
-          path: "/component",
-          component: "Layout",
-          name: "/component",
-          meta: {
-            title: "组件封装",
-            icon: "menu",
+            title: "故障诊断",
+            icon: "api",
             hidden: false,
             alwaysShow: false,
             params: null,
           },
           children: [
             {
-              path: "curd",
-              component: "demo/curd/index",
-              name: "Curd",
+              path: "faultDiagnosis",
+              component: "sLongDemo/faultDiagnosis/index",
+              name: "faultDiagnosis",
               meta: {
-                title: "增删改查",
-                icon: "",
-                hidden: false,
-                keepAlive: true,
-                alwaysShow: false,
-                params: null,
-              },
-            },
-            {
-              path: "table-select",
-              component: "demo/table-select/index",
-              name: "TableSelect",
-              meta: {
-                title: "列表选择器",
-                icon: "",
-                hidden: false,
-                keepAlive: true,
-                alwaysShow: false,
-                params: null,
-              },
-            },
-            {
-              path: "wang-editor",
-              component: "demo/wang-editor",
-              name: "WangEditor",
-              meta: {
-                title: "富文本编辑器",
-                icon: "",
-                hidden: false,
-                keepAlive: true,
-                alwaysShow: false,
-                params: null,
-              },
-            },
-            {
-              path: "upload",
-              component: "demo/upload",
-              name: "Upload",
-              meta: {
-                title: "图片上传",
-                icon: "",
-                hidden: false,
-                keepAlive: true,
-                alwaysShow: false,
-                params: null,
-              },
-            },
-            {
-              path: "icon-selector",
-              component: "demo/icon-selector",
-              name: "IconSelector",
-              meta: {
-                title: "图标选择器",
-                icon: "",
-                hidden: false,
-                keepAlive: true,
-                alwaysShow: false,
-                params: null,
-              },
-            },
-            {
-              path: "dict-demo",
-              component: "demo/dict",
-              name: "DictDemo",
-              meta: {
-                title: "字典组件",
-                icon: "",
+                title: "故障诊断",
+                icon: "api",
                 hidden: false,
                 keepAlive: true,
                 alwaysShow: false,
@@ -313,99 +120,31 @@ export default defineMock([
           ],
         },
         {
-          path: "/route-param",
+          path: "/experimental",
+          redirect: { name: "experimentalDataManage" }, // 设置默认重定向路径
           component: "Layout",
-          name: "/routeParam",
+          name: "/experimental",
           meta: {
-            title: "路由参数",
-            icon: "el-icon-ElementPlus",
-            hidden: false,
-            alwaysShow: true,
-            params: null,
-          },
-          children: [
-            {
-              path: "route-param-type1",
-              component: "demo/route-param",
-              name: "RouteParamType1",
-              meta: {
-                title: "参数(type=1)",
-                icon: "el-icon-Star",
-                hidden: false,
-                keepAlive: true,
-                alwaysShow: false,
-                params: {
-                  type: "1",
-                },
-              },
-            },
-            {
-              path: "route-param-type2",
-              component: "demo/route-param",
-              name: "RouteParamType2",
-              meta: {
-                title: "参数(type=2)",
-                icon: "el-icon-StarFilled",
-                hidden: false,
-                keepAlive: true,
-                alwaysShow: false,
-                params: {
-                  type: "2",
-                },
-              },
-            },
-          ],
-        },
-        {
-          path: "/function",
-          component: "Layout",
-          name: "/function",
-          meta: {
-            title: "功能演示",
-            icon: "menu",
+            title: "实验数据管理",
+            icon: "api",
             hidden: false,
             alwaysShow: false,
             params: null,
           },
           children: [
             {
-              path: "icon-demo",
-              component: "demo/icons",
-              name: "IconDemo",
-              meta: {
-                title: "Icons",
-                icon: "el-icon-Notification",
-                hidden: false,
-                keepAlive: true,
-                alwaysShow: false,
-                params: null,
-              },
-            },
-            {
-              path: "/function/websocket",
-              component: "demo/websocket",
-              name: "/function/websocket",
+              path: "experimentalDataManage",
+              component: "sLongDemo/experimentalDataManage/index",
+              name: "experimentalDataManage",
               meta: {
-                title: "Websocket",
-                icon: "",
+                title: "实验数据管理",
+                icon: "api",
                 hidden: false,
                 keepAlive: true,
                 alwaysShow: false,
                 params: null,
               },
             },
-            {
-              path: "other/:id",
-              component: "demo/other",
-              name: "Other/:id",
-              meta: {
-                title: "敬请期待...",
-                icon: "",
-                hidden: false,
-                alwaysShow: false,
-                params: null,
-              },
-            },
           ],
         },
       ],

+ 352 - 0
mock/sLongDemo/dataCollection.mock.ts

@@ -0,0 +1,352 @@
+import { defineMock } from "../base";
+
+export default defineMock([
+  {
+    url: "dataCollection/page",
+    method: ["GET"],
+    body: {
+      code: "00000",
+      data: {
+        list: [
+          {
+            id: 1,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "2",
+            sensorType: "振动",
+            sensorCoordinates: "A10",
+            time: "2024-03-26 11:35:56",
+            validValue: "0.210069342000400",
+            maxValue: "0.224300636823651",
+            healthStatus: 1,
+          },
+          {
+            id: 2,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "2",
+            sensorType: "振动",
+            sensorCoordinates: "A11",
+            time: "2024-03-26 11:35:56",
+            validValue: "0.21040204167366",
+            maxValue: "-0.0177574195647",
+            healthStatus: 1,
+          },
+          {
+            id: 3,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "3",
+            sensorType: "振动",
+            sensorCoordinates: "A12",
+            time: "2024-03-26 11:35:56",
+            validValue: "0.209233790636036",
+            maxValue: "0.07523538174526",
+            healthStatus: 1,
+          },
+          {
+            id: 4,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "4",
+            sensorType: "振动",
+            sensorCoordinates: "A13",
+            time: "2024-03-26 11:35:56",
+            validValue: "0.211453402800669",
+            maxValue: "0.16496707632154",
+            healthStatus: 1,
+          },
+          {
+            id: 5,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "5",
+            sensorType: "压力",
+            sensorCoordinates: "B21",
+            time: "2024-03-26 11:35:56",
+            validValue: "-3.046634829124908",
+            maxValue: "-3.03802514032163",
+            healthStatus: 1,
+          },
+          {
+            id: 6,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "6",
+            sensorType: "压力",
+            sensorCoordinates: "B22",
+            time: "2024-03-26 11:35:56",
+            validValue: "-9.74457550048828",
+            maxValue: "-9.73577594723653",
+            healthStatus: 1,
+          },
+          {
+            id: 7,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "7",
+            sensorType: "流速",
+            sensorCoordinates: "C31",
+            time: "2024-03-26 11:35:56",
+            validValue: "-2.54472327232361",
+            maxValue: "-2.54447360412365",
+            healthStatus: 1,
+          },
+          {
+            id: 8,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "8",
+            sensorType: "流速",
+            sensorCoordinates: "C32",
+            time: "2024-03-26 11:35:56",
+            validValue: "-2.66635298728943",
+            maxValue: "-2.66610383915432",
+            healthStatus: 1,
+          },
+          {
+            id: 9,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "9",
+            sensorType: "温度",
+            sensorCoordinates: "D41",
+            time: "2024-03-26 11:35:56",
+            validValue: "-137.339324951172",
+            maxValue: "-137.30499261248654",
+            healthStatus: 1,
+          },
+          {
+            id: 10,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "10",
+            sensorType: "温度",
+            sensorCoordinates: "D42",
+            time: "2024-03-26 11:35:56",
+            validValue: "-160.112747192383",
+            maxValue: "-160.07223514598321",
+            healthStatus: 1,
+          },
+          {
+            id: 11,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "11",
+            sensorType: "温度",
+            sensorCoordinates: "D43",
+            time: "2024-03-26 11:35:56",
+            validValue: "-169.500579833984",
+            maxValue: "-169.44480893652984",
+            healthStatus: 1,
+          },
+          {
+            id: 12,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "12",
+            sensorType: "温度",
+            sensorCoordinates: "D44",
+            time: "2024-03-26 11:35:56",
+            validValue: "-108.504341125488",
+            maxValue: "-108.48224634856327",
+            healthStatus: 1,
+          },
+          {
+            id: 13,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "13",
+            sensorType: "交流电",
+            sensorCoordinates: "E51",
+            time: "2024-03-26 11:35:56",
+            validValue: "0.00581519678235054",
+            maxValue: "0.00693559734236953",
+            healthStatus: 1,
+          },
+          {
+            id: 14,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "14",
+            sensorType: "交流电",
+            sensorCoordinates: "E52",
+            time: "2024-03-26 11:35:56",
+            validValue: "0.062148357956423",
+            maxValue: "0.06594863214756",
+            healthStatus: 1,
+          },
+          {
+            id: 15,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "15",
+            sensorType: "湿度",
+            sensorCoordinates: "O75",
+            time: "2024-03-26 11:35:56",
+            validValue: "57.5",
+            maxValue: "60.0",
+            healthStatus: 1,
+          },
+          {
+            id: 16,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "16",
+            sensorType: "振动",
+            sensorCoordinates: "P80",
+            time: "2024-03-26 11:35:56",
+            validValue: "0.206",
+            maxValue: "0.216",
+            healthStatus: 1,
+          },
+          {
+            id: 17,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "17",
+            sensorType: "压力",
+            sensorCoordinates: "Q85",
+            time: "2024-03-26 11:35:56",
+            validValue: "101.5",
+            maxValue: "104.0",
+            healthStatus: 1,
+          },
+          {
+            id: 18,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "18",
+            sensorType: "温度",
+            sensorCoordinates: "R90",
+            time: "2024-03-26 11:35:56",
+            validValue: "23.5",
+            maxValue: "25.0",
+            healthStatus: 1,
+          },
+          {
+            id: 19,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "19",
+            sensorType: "湿度",
+            sensorCoordinates: "S95",
+            time: "2024-03-26 11:35:56",
+            validValue: "59.0",
+            maxValue: "63.5",
+            healthStatus: 1,
+          },
+          {
+            id: 20,
+            siteName: "站点1",
+            siteNumber: "1",
+            channelNumber: "20",
+            sensorType: "振动",
+            sensorCoordinates: "T100",
+            time: "2024-03-26 11:35:56",
+            validValue: "0.207",
+            maxValue: "0.217",
+            healthStatus: 1,
+          },
+        ],
+        total: 20,
+      },
+      msg: "一切ok",
+    },
+  },
+]);
+
+// 角色映射表数据
+// const roleMap: Record<string, any> = {
+//   2: {
+//     id: 2,
+//     name: "系统管理员",
+//     code: "ADMIN",
+//     status: 1,
+//     sort: 2,
+//     createTime: "2021-03-25 12:39:54",
+//     updateTime: null,
+//   },
+//   3: {
+//     id: 3,
+//     name: "访问游客",
+//     code: "GUEST",
+//     status: 1,
+//     sort: 3,
+//     createTime: "2021-05-26 15:49:05",
+//     updateTime: "2019-05-05 16:00:00",
+//   },
+//   4: {
+//     id: 4,
+//     name: "系统管理员1",
+//     code: "ADMIN1",
+//     status: 1,
+//     sort: 2,
+//     createTime: "2021-03-25 12:39:54",
+//     updateTime: null,
+//   },
+//   5: {
+//     id: 5,
+//     name: "系统管理员2",
+//     code: "ADMIN2",
+//     status: 1,
+//     sort: 2,
+//     createTime: "2021-03-25 12:39:54",
+//     updateTime: null,
+//   },
+
+//   6: {
+//     id: 6,
+//     name: "系统管理员3",
+//     code: "ADMIN3",
+//     status: 1,
+//     sort: 2,
+//     createTime: "2021-03-25 12:39:54",
+//     updateTime: null,
+//   },
+//   7: {
+//     id: 7,
+//     name: "系统管理员4",
+//     code: "ADMIN4",
+//     status: 1,
+//     sort: 2,
+//     createTime: "2021-03-25 12:39:54",
+//     updateTime: null,
+//   },
+//   8: {
+//     id: 8,
+//     name: "系统管理员5",
+//     code: "ADMIN5",
+//     status: 1,
+//     sort: 2,
+//     createTime: "2021-03-25 12:39:54",
+//     updateTime: null,
+//   },
+//   9: {
+//     id: 9,
+//     name: "系统管理员6",
+//     code: "ADMIN6",
+//     status: 1,
+//     sort: 2,
+//     createTime: "2021-03-25 12:39:54",
+//     updateTime: "2023-12-04 11:43:15",
+//   },
+//   10: {
+//     id: 10,
+//     name: "系统管理员7",
+//     code: "ADMIN7",
+//     status: 1,
+//     sort: 2,
+//     createTime: "2021-03-25 12:39:54",
+//     updateTime: null,
+//   },
+//   11: {
+//     id: 11,
+//     name: "系统管理员8",
+//     code: "ADMIN8",
+//     status: 1,
+//     sort: 2,
+//     createTime: "2021-03-25 12:39:54",
+//     updateTime: null,
+//   },
+// };

+ 123 - 0
mock/sLongDemo/sideTree.mock.ts

@@ -0,0 +1,123 @@
+import { defineMock } from "../base";
+
+export default defineMock([
+  {
+    url: "sideTree/options",
+    method: ["GET"],
+    body: {
+      code: "00000",
+      data: [
+        {
+          value: 1,
+          label: "外球面球轴承",
+          children: [
+            {
+              value: 11,
+              label: "UCPH205",
+            },
+            {
+              value: 12,
+              label: "UCPH206",
+            },
+          ],
+        },
+        {
+          value: 2,
+          label: "滚子轴承",
+          children: [
+            {
+              value: 21,
+              label: "KLM11749-LM11710",
+            },
+            {
+              value: 22,
+              label: "KL44643-L44610",
+            },
+          ],
+        },
+        {
+          value: 3,
+          label: "角接触球轴承",
+          children: [
+            {
+              value: 31,
+              label: "23805",
+            },
+            {
+              value: 32,
+              label: "234422",
+            },
+          ],
+        },
+      ],
+      msg: "一切ok",
+    },
+  },
+]);
+
+// 部门映射表数据
+const sideTreeMap: Record<string, any> = {
+  1: {
+    id: 1,
+    name: "外球面球轴承",
+    parentId: 0,
+    status: 1,
+    sort: 1,
+  },
+  11: {
+    id: 11,
+    name: "UCPH205",
+    parentId: 1,
+    status: 1,
+    sort: 1,
+  },
+  12: {
+    id: 12,
+    name: "UCPH206",
+    parentId: 1,
+    status: 1,
+    sort: 2,
+  },
+  2: {
+    id: 2,
+    name: "滚子轴承",
+    parentId: 0,
+    status: 1,
+    sort: 2,
+  },
+  21: {
+    id: 21,
+    name: "KLM11749-LM11710",
+    parentId: 2,
+    status: 1,
+    sort: 1,
+  },
+  22: {
+    id: 22,
+    name: "KL44643-L44610",
+    parentId: 2,
+    status: 1,
+    sort: 2,
+  },
+  3: {
+    id: 3,
+    name: "角接触球轴承",
+    parentId: 0,
+    status: 1,
+    sort: 3,
+  },
+  31: {
+    id: 31,
+    name: "23805",
+    parentId: 3,
+    status: 1,
+    sort: 1,
+  },
+  32: {
+    id: 32,
+    name: "234422",
+    parentId: 3,
+    status: 1,
+    sort: 2,
+  },
+};

+ 1 - 1
package.json

@@ -1,5 +1,5 @@
 {
-  "name": "vue3-element-admin",
+  "name": "旋转机械耦合故障诊断开发平台",
   "version": "2.15.0",
   "private": true,
   "type": "module",

+ 34 - 0
src/api/sLongDemo/dataCollection.ts

@@ -0,0 +1,34 @@
+import request from "@/utils/request";
+
+const dataCollection_BASE_URL = "/api/v1/dataCollection";
+
+class dataCollectionAPI {
+  /** 获取角色分页数据 */
+  static getPage(queryParams?: dataCollectionPageQuery) {
+    return request<any, PageResult<dataCollectionPageVO[]>>({
+      url: `${dataCollection_BASE_URL}/page`,
+      method: "get",
+      params: queryParams,
+    });
+  }
+}
+export default dataCollectionAPI;
+
+export interface dataCollectionPageQuery extends PageQuery {
+  /** 搜索关键字 */
+  keywords?: string;
+}
+
+/** 分页对象 */
+export interface dataCollectionPageVO {
+  id?: number;
+  siteName?: string;
+  siteNumber?: string;
+  channelNumber?: string;
+  sensorType?: string;
+  sensorCoordinates?: string;
+  time?: string;
+  validValue?: string;
+  maxValue?: string;
+  healthStatus?: number;
+}

+ 40 - 0
src/api/sLongDemo/sideTree.ts

@@ -0,0 +1,40 @@
+import request from "@/utils/request";
+
+const sideTree_BASE_URL = "/api/v1/sideTree";
+
+class sideTreeAPI {
+  /** 获取下拉列表 */
+  static getOptions() {
+    return request<any, OptionType[]>({
+      url: `${sideTree_BASE_URL}/options`,
+      method: "get",
+    });
+  }
+}
+export default sideTreeAPI;
+
+export interface sideTreeQuery {
+  keywords?: string;
+  status?: number;
+}
+
+/** 部门类型 */
+export interface sideTreeVO {
+  children?: sideTreeVO[];
+  createTime?: Date;
+  id?: number;
+  name?: string;
+  parentId?: number;
+  sort?: number;
+  status?: number;
+  updateTime?: Date;
+}
+
+/** 部门表单类型 */
+export interface sideTreeForm {
+  id?: number;
+  name?: string;
+  parentId: number;
+  sort?: number;
+  status?: number;
+}

BIN
src/assets/images/head.jpg


BIN
src/assets/logo.png


+ 5 - 6
src/layout/components/NavBar/components/NavbarAction.vue

@@ -55,7 +55,9 @@
             <div class="flex-x-between">
               <el-link type="primary" :underline="false">
                 <span class="text-xs">查看更多</span>
-                <el-icon class="text-xs"><ArrowRight /></el-icon>
+                <el-icon class="text-xs">
+                  <ArrowRight />
+                </el-icon>
               </el-link>
               <el-link type="primary" :underline="false">
                 <span class="text-xs">全部已读</span>
@@ -69,10 +71,7 @@
     <!-- 用户头像 -->
     <el-dropdown class="nav-action-item" trigger="click">
       <div class="flex-center h100% p10px">
-        <img
-          :src="userStore.user.avatar + '?imageView2/1/w/80/h/80'"
-          class="rounded-full mr-10px w24px h24px"
-        />
+        <img :src="head" class="rounded-full mr-10px w24px h24px" />
         <span>{{ userStore.user.username }}</span>
       </div>
       <template #dropdown>
@@ -114,7 +113,7 @@ import {
 import defaultSettings from "@/settings";
 import { DeviceEnum } from "@/enums/DeviceEnum";
 import { MessageTypeEnum, MessageTypeLabels } from "@/enums/MessageTypeEnum";
-
+import head from "@/assets/images/head.jpg";
 const appStore = useAppStore();
 const tagsViewStore = useTagsViewStore();
 const userStore = useUserStore();

+ 4 - 2
src/layout/components/Sidebar/components/SidebarLogo.vue

@@ -35,9 +35,11 @@ defineProps({
   }
 
   .logo-title {
-    flex-shrink: 0; /* 防止容器在空间不足时缩小 */
+    flex-shrink: 0;
+
+    /* 防止容器在空间不足时缩小 */
     margin-left: 10px;
-    font-size: 14px;
+    font-size: 18px;
     font-weight: bold;
     color: white;
   }

+ 1 - 2
src/router/index.ts

@@ -31,7 +31,7 @@ export const constantRoutes: RouteRecordRaw[] = [
     children: [
       {
         path: "dashboard",
-        component: () => import("@/views/dashboard/index.vue"),
+        component: () => import("@/views/homePage/index.vue"),
         // 用于 keep-alive 功能,需要与 SFC 中自动推导或显式声明的组件名称一致
         // 参考文档: https://cn.vuejs.org/guide/built-ins/keep-alive.html#include-exclude
         name: "Dashboard",
@@ -60,7 +60,6 @@ export const constantRoutes: RouteRecordRaw[] = [
       },
     ],
   },
-
   // 外部链接
   // {
   //   path: "/external-link",

+ 2 - 1
src/styles/variables.scss

@@ -30,6 +30,7 @@
   --menu-active-text: var(--el-menu-active-color);
   --menu-hover: #263445;
   --sidebar-logo-background: #2d3748;
+  --el-font-size-base: 16px;
 
   // 修复表格 fixed 列被选中后由于透明色导致叠字的 bug
   .el-table {
@@ -52,7 +53,7 @@ $menu-active-text: var(--menu-active-text); // 菜单激活文字颜色
 $menu-hover: var(--menu-hover); // 菜单悬停背景色
 $sidebar-logo-background: var(--sidebar-logo-background); // 侧边栏 Logo 背景色
 
-$sidebar-width: 210px; // 侧边栏宽度
+$sidebar-width: 300px; // 侧边栏宽度
 $sidebar-width-collapsed: 54px; // 侧边栏收缩宽度
 $navbar-height: 50px; // 导航栏高度
 $tags-view-height: 34px; // TagsView 高度

+ 1 - 0
src/types/components.d.ts

@@ -101,6 +101,7 @@ declare module "vue" {
     TagsView: (typeof import("./../layout/components/TagsView/index.vue"))["default"];
     ThemeColorPicker: (typeof import("./../layout/components/Settings/components/ThemeColorPicker.vue"))["default"];
     WangEditor: (typeof import("./../components/WangEditor/index.vue"))["default"];
+    sideTree: (typeof import("./../views/sLongDemo/components/side-tree.vue"))["default"];
   }
   export interface ComponentCustomProperties {
     vLoading: (typeof import("element-plus/es"))["ElLoadingDirective"];

+ 11 - 5
src/views/dashboard/index.vue

@@ -152,11 +152,15 @@
             <div class="flex-x-between">
               <div class="flex-y-center">
                 通知公告
-                <el-icon class="ml-1"><Notification /></el-icon>
+                <el-icon class="ml-1">
+                  <Notification />
+                </el-icon>
               </div>
               <el-link type="primary">
                 <span class="text-xs">查看更多</span>
-                <el-icon class="text-xs"><ArrowRight /></el-icon>
+                <el-icon class="text-xs">
+                  <ArrowRight />
+                </el-icon>
               </el-link>
             </div>
           </template>
@@ -177,7 +181,9 @@
                 {{ item.title }}
               </el-text>
               <el-link>
-                <el-icon class="text-sm"><View /></el-icon>
+                <el-icon class="text-sm">
+                  <View />
+                </el-icon>
               </el-link>
             </div>
           </el-scrollbar>
@@ -398,8 +404,8 @@ function connectWebSocket() {
     connectHeaders: {
       Authorization: localStorage.getItem(TOKEN_KEY) || "",
     },
-    debug: (str) => {
-      console.log(str);
+    debug: () => {
+      // console.log(str);
     },
     onConnect: () => {
       console.log("连接成功");

+ 3 - 3
src/views/demo/websocket.vue

@@ -143,8 +143,8 @@ function connectWebSocket() {
     connectHeaders: {
       Authorization: localStorage.getItem(TOKEN_KEY) || "",
     },
-    debug: (str) => {
-      console.log(str);
+    debug: () => {
+      // console.log(str);
     },
     onConnect: () => {
       console.log("连接成功");
@@ -226,7 +226,7 @@ function sendToUser() {
 }
 
 onMounted(() => {
-  connectWebSocket();
+  // connectWebSocket();
 });
 </script>
 

+ 148 - 0
src/views/homePage/index.vue

@@ -0,0 +1,148 @@
+<!-- 用户管理 -->
+<template>
+  <div class="app-container">
+    <el-row :gutter="20">
+      <el-col :lg="4" :xs="24" class="mb-[12px]">
+        <sideTree />
+      </el-col>
+
+      <el-col :lg="20" :xs="24">
+        <div class="graph">图谱展示</div>
+
+        <el-card shadow="never" class="table">
+          <el-descriptions border :column="5">
+            <el-descriptions-item
+              :rowspan="2"
+              :width="0"
+              label=""
+              align="center"
+            >
+              <el-image
+                style="width: 100px; height: 100px"
+                src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
+              />
+            </el-descriptions-item>
+            <el-descriptions-item label="重量:">1.5kg</el-descriptions-item>
+            <el-descriptions-item label="内环宽度:">1cm</el-descriptions-item>
+            <el-descriptions-item label="节圆直径:">
+              1.2cm
+            </el-descriptions-item>
+            <el-descriptions-item label="经向静态载荷:">
+              7.9kN
+            </el-descriptions-item>
+            <el-descriptions-item label="最高转速:">
+              7000rpm
+            </el-descriptions-item>
+            <el-descriptions-item label="外环宽度:">2cm</el-descriptions-item>
+            <el-descriptions-item label="滚珠个数:">9</el-descriptions-item>
+            <el-descriptions-item label="经向动态载荷:">
+              14kN
+            </el-descriptions-item>
+          </el-descriptions>
+          <template #footer>
+            <div class="footer">
+              <el-button type="primary" @click="dialog.visible = true">
+                查看模型
+              </el-button>
+            </div>
+          </template>
+        </el-card>
+      </el-col>
+    </el-row>
+
+    <el-dialog v-model="dialog.visible" append-to-body>
+      <div class="text-center">
+        <el-image
+          style="width: 300px; height: 300px"
+          src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
+        />
+        <el-descriptions border :column="4">
+          <el-descriptions-item label="重量:">1.5kg</el-descriptions-item>
+          <el-descriptions-item label="内环宽度:">1cm</el-descriptions-item>
+          <el-descriptions-item label="节圆直径:">1.2cm</el-descriptions-item>
+          <el-descriptions-item label="经向静态载荷:">
+            7.9kN
+          </el-descriptions-item>
+          <el-descriptions-item label="最高转速:">
+            7000rpm
+          </el-descriptions-item>
+          <el-descriptions-item label="外环宽度:">2cm</el-descriptions-item>
+          <el-descriptions-item label="滚珠个数:">9</el-descriptions-item>
+          <el-descriptions-item label="经向动态载荷:">
+            14kN
+          </el-descriptions-item>
+        </el-descriptions>
+      </div>
+
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="dialog.visible = false">
+            确 定
+          </el-button>
+          <el-button @click="dialog.visible = false">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup lang="ts">
+defineOptions({
+  name: "HomePage",
+  inheritAttrs: false,
+});
+
+const userFormRef = ref(ElForm);
+
+const removeIds = ref([]);
+/**  用户弹窗对象  */
+const dialog = reactive({
+  visible: false,
+  title: "",
+});
+/**
+ * 打开弹窗
+ *
+ * @param id 用户ID
+ */
+async function handleOpenDialog(id?: number) {
+  dialog.visible = true;
+}
+
+/** 关闭弹窗 */
+function handleCloseDialog() {
+  dialog.visible = false;
+  userFormRef.value.resetFields();
+  userFormRef.value.clearValidate();
+}
+
+/** 表单提交 */
+const handleSubmit = useThrottleFn(() => {}, 3000);
+onMounted(() => {});
+</script>
+<style lang="scss" scoped>
+.graph {
+  width: 100%;
+  height: calc(100vh - 410px);
+  padding: 10px;
+  // background-color: aqua;
+  border: 1px solid #ccc;
+  border-radius: 20px;
+}
+
+.table {
+  // background-color: aquamarine;
+  position: relative;
+  width: 100%;
+  max-height: 300px;
+  padding-bottom: 20px;
+  margin-top: 30px;
+  border: none;
+
+  .footer {
+    position: absolute;
+    right: 50px;
+    bottom: 10px;
+  }
+}
+</style>

+ 13 - 5
src/views/profile/index.vue

@@ -7,7 +7,7 @@
           <el-card>
             <!-- 头像和昵称部分 -->
             <div class="relative w-100px h-100px flex-center">
-              <el-avatar :src="userProfile.avatar" :size="100" />
+              <el-avatar :size="100" />
               <el-button
                 type="info"
                 class="absolute bottom-0 right-0 cursor-pointer"
@@ -37,7 +37,9 @@
               <!-- 用户名 -->
               <el-descriptions-item>
                 <template #label>
-                  <el-icon class="align-middle"><User /></el-icon>
+                  <el-icon class="align-middle">
+                    <User />
+                  </el-icon>
                   用户名
                 </template>
                 {{ userProfile.username }}
@@ -53,14 +55,18 @@
               </el-descriptions-item>
               <el-descriptions-item>
                 <template #label>
-                  <el-icon class="align-middle"><Phone /></el-icon>
+                  <el-icon class="align-middle">
+                    <Phone />
+                  </el-icon>
                   手机号码
                 </template>
                 {{ userProfile.mobile }}
               </el-descriptions-item>
               <el-descriptions-item>
                 <template #label>
-                  <el-icon class="align-middle"><Message /></el-icon>
+                  <el-icon class="align-middle">
+                    <Message />
+                  </el-icon>
                   邮箱
                 </template>
                 {{ userProfile.email }}
@@ -82,7 +88,9 @@
 
               <el-descriptions-item>
                 <template #label>
-                  <el-icon class="align-middle"><Timer /></el-icon>
+                  <el-icon class="align-middle">
+                    <Timer />
+                  </el-icon>
                   创建日期
                 </template>
                 {{ userProfile.createTime }}

+ 63 - 0
src/views/sLongDemo/bearingManage/index.vue

@@ -0,0 +1,63 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="20">
+      <el-col :lg="4" :xs="24" class="mb-[12px]">
+        <sideTree />
+      </el-col>
+      <el-col :lg="20" :xs="24">
+        <el-card shadow="never">
+          <template #header>
+            <div class="flex-x-between">
+              <div>
+                <el-button type="success">模型导入</el-button>
+              </div>
+              <div>
+                <el-button type="primary">模型编辑</el-button>
+              </div>
+              <div>
+                <el-button type="warning">模型保存</el-button>
+              </div>
+            </div>
+          </template>
+          <div class="text-center">
+            <el-image
+              style="width: 500px; height: 500px"
+              src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
+            />
+            <el-descriptions border :column="4">
+              <el-descriptions-item label="重量:">1.5kg</el-descriptions-item>
+              <el-descriptions-item label="内环宽度:">
+                1cm
+              </el-descriptions-item>
+              <el-descriptions-item label="节圆直径:">
+                1.2cm
+              </el-descriptions-item>
+              <el-descriptions-item label="经向静态载荷:">
+                7.9kN
+              </el-descriptions-item>
+              <el-descriptions-item label="最高转速:">
+                7000rpm
+              </el-descriptions-item>
+              <el-descriptions-item label="外环宽度:">
+                2cm
+              </el-descriptions-item>
+              <el-descriptions-item label="滚珠个数:">9</el-descriptions-item>
+              <el-descriptions-item label="经向动态载荷:">
+                14kN
+              </el-descriptions-item>
+            </el-descriptions>
+          </div>
+        </el-card>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+defineOptions({
+  name: "BearingManage",
+  inherititems: false,
+});
+</script>
+
+<style lang="scss" scoped></style>

+ 67 - 0
src/views/sLongDemo/components/side-tree.vue

@@ -0,0 +1,67 @@
+<template>
+  <el-card shadow="never">
+    <el-input v-model="sideTreeName" placeholder="名称" clearable>
+      <template #prefix>
+        <i-ep-search />
+      </template>
+    </el-input>
+
+    <el-tree
+      ref="sideTreeTreeRef"
+      class="mt-2"
+      :data="sideTreeList"
+      :props="{ children: 'children', label: 'label', disabled: '' }"
+      :expand-on-click-node="false"
+      :filter-node-method="handleFilter"
+      default-expand-all
+      @node-click="handleNodeClick"
+    />
+  </el-card>
+</template>
+
+<script setup lang="ts">
+import sideTreeAPI from "@/api/sLongDemo/sideTree";
+const props = defineProps({
+  modelValue: {
+    type: [Number],
+    default: undefined,
+  },
+});
+
+const sideTreeList = ref<OptionType[]>();
+const sideTreeTreeRef = ref(ElTree);
+const sideTreeName = ref();
+
+const emits = defineEmits(["node-click"]);
+
+const sideTreeId = useVModel(props, "modelValue", emits);
+
+watchEffect(
+  () => {
+    sideTreeTreeRef.value.filter(sideTreeName.value);
+  },
+  {
+    flush: "post", // watchEffect会在DOM挂载或者更新之前就会触发,此属性控制在DOM元素更新后运行
+  }
+);
+
+/** 部门筛选 */
+function handleFilter(value: string, data: any) {
+  if (!value) {
+    return true;
+  }
+  return data.label.indexOf(value) !== -1;
+}
+
+/** 部门树节点 Click */
+function handleNodeClick(data: { [key: string]: any }) {
+  sideTreeId.value = data.value;
+  emits("node-click");
+}
+
+onBeforeMount(() => {
+  sideTreeAPI.getOptions().then((data) => {
+    sideTreeList.value = data;
+  });
+});
+</script>

+ 165 - 0
src/views/sLongDemo/dataCollection/firstChart.vue

@@ -0,0 +1,165 @@
+<template>
+  <div ref="chartRef" id="chart" style="width: 500px; height: 300px"></div>
+</template>
+
+<script setup name="firstChart">
+import { onMounted, ref } from "vue";
+import * as echarts from "echarts";
+
+const chartRef = ref(null);
+
+const chartData = {
+  xAxis: [
+    "2024-03-25 12:39:54",
+    "2024-03-25 12:39:56",
+    "2024-03-25 12:39:58",
+    "2024-03-25 12:40:00",
+    "2024-03-25 12:40:02",
+    "2024-03-25 12:40:04",
+    "2024-03-25 12:40:06",
+    "2024-03-25 12:40:08",
+    "2024-03-25 12:40:10",
+    "2024-03-25 12:40:12",
+    "2024-03-25 12:40:14",
+    "2024-03-25 12:40:16",
+    "2024-03-25 12:40:18",
+    "2024-03-25 12:40:20",
+    "2024-03-25 12:40:22",
+    "2024-03-25 12:40:24",
+    "2024-03-25 12:40:26",
+    "2024-03-25 12:40:28",
+    "2024-03-25 12:40:30",
+    "2024-03-25 12:40:32",
+    "2024-03-25 12:40:34",
+    "2024-03-25 12:40:36",
+    "2024-03-25 12:40:38",
+    "2024-03-25 12:40:40",
+    "2024-03-25 12:40:42",
+    "2024-03-25 12:40:44",
+    "2024-03-25 12:40:46",
+    "2024-03-25 12:40:48",
+    "2024-03-25 12:40:50",
+    "2024-03-25 12:40:52",
+    "2024-03-25 12:40:54",
+    "2024-03-25 12:40:56",
+    "2024-03-25 12:40:58",
+    "2024-03-25 12:40:60",
+    "2024-03-25 12:41:00",
+    "2024-03-25 12:41:02",
+    "2024-03-25 12:41:04",
+    "2024-03-25 12:41:06",
+    "2024-03-25 12:41:08",
+    "2024-03-25 12:41:10",
+    "2024-03-25 12:41:12",
+    "2024-03-25 12:41:14",
+    "2024-03-25 12:41:16",
+    "2024-03-25 12:41:18",
+    "2024-03-25 12:41:20",
+    "2024-03-25 12:41:22",
+    "2024-03-25 12:41:24",
+    "2024-03-25 12:41:26",
+    "2024-03-25 12:41:28",
+    "2024-03-25 12:41:30",
+    "2024-03-25 12:41:32",
+    "2024-03-25 12:41:34",
+    "2024-03-25 12:41:36",
+    "2024-03-25 12:41:38",
+    "2024-03-25 12:41:40",
+    "2024-03-25 12:41:42",
+    "2024-03-25 12:41:44",
+    "2024-03-25 12:41:46",
+    "2024-03-25 12:41:48",
+    "2024-03-25 12:41:50",
+    "2024-03-25 12:41:52",
+    "2024-03-25 12:41:54",
+    "2024-03-25 12:41:56",
+    "2024-03-25 12:41:58",
+    "2024-03-25 12:41:60",
+    "2024-03-25 12:42:00",
+    "2024-03-25 12:42:02",
+    "2024-03-25 12:42:04",
+    "2024-03-25 12:42:06",
+    "2024-03-25 12:42:08",
+    "2024-03-25 12:42:10",
+    "2024-03-25 12:42:12",
+    "2024-03-25 12:42:14",
+    "2024-03-25 12:42:16",
+    "2024-03-25 12:42:18",
+    "2024-03-25 12:42:20",
+    "2024-03-25 12:42:22",
+    "2024-03-25 12:42:24",
+    "2024-03-25 12:42:26",
+    "2024-03-25 12:42:28",
+    "2024-03-25 12:42:30",
+    "2024-03-25 12:42:32",
+    "2024-03-25 12:42:34",
+    "2024-03-25 12:42:36",
+    "2024-03-25 12:42:38",
+    "2024-03-25 12:42:40",
+    "2024-03-25 12:42:42",
+    "2024-03-25 12:42:44",
+    "2024-03-25 12:42:46",
+    "2024-03-25 12:42:48",
+    "2024-03-25 12:42:50",
+    "2024-03-25 12:42:52",
+    "2024-03-25 12:42:54",
+    "2024-03-25 12:42:56",
+    "2024-03-25 12:42:58",
+    "2024-03-25 12:42:60",
+  ],
+  series: [
+    45, 123, 67, 189, 112, 134, 256, 178, 290, 211, 222, 133, 244, 55, 166, 277,
+    188, 99, 100, 211, 232, 143, 154, 65, 76, 187, 98, 155, 201, 131, 242, 153,
+    64, 175, 86, 97, 81, 191, 130, 41, 252, 163, 74, 85, 196, 117, 118, 129,
+    236, 152, 108, 213, 71, 165, 223, 182, 143, 208, 155, 11, 128, 232, 264,
+    255, 170, 137, 193, 163, 201, 158, 109, 226, 239, 184, 116, 134, 196, 253,
+    175, 110, 246, 231, 252, 131, 198, 162, 150, 242, 225, 173, 123, 188, 263,
+    218, 141, 107,
+  ],
+};
+
+const initChart = () => {
+  const chartInstance = echarts.init(chartRef.value);
+
+  const option = {
+    title: {
+      text: "时域图",
+    },
+    tooltip: {
+      trigger: "axis",
+    },
+    xAxis: {
+      // splitLine: {
+      //   show: true,
+      // },
+      type: "category",
+      data: chartData.xAxis,
+    },
+    yAxis: {
+      axisLine: {
+        show: true,
+      },
+      splitLine: {
+        show: true,
+      },
+      name: "m/s2",
+      type: "value",
+    },
+    series: [
+      {
+        data: chartData.series,
+        type: "line",
+        smooth: true,
+      },
+    ],
+  };
+
+  chartInstance.setOption(option);
+};
+
+onMounted(() => {
+  nextTick(() => {
+    initChart();
+  });
+});
+</script>

+ 336 - 0
src/views/sLongDemo/dataCollection/index.vue

@@ -0,0 +1,336 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="20">
+      <el-col :lg="4" :xs="24" class="mb-[12px]">
+        <sideTree />
+      </el-col>
+      <el-col :lg="20" :xs="24">
+        <el-card shadow="never" class="table-container">
+          <template #header>
+            <div class="flex-x-between">
+              <div>
+                <el-button
+                  v-hasPerm="['sys:dataCollection:add']"
+                  type="success"
+                >
+                  <i-ep-plus />
+                  站点管理
+                </el-button>
+                <el-button
+                  v-hasPerm="['sys:dataCollection:delete']"
+                  type="warning"
+                >
+                  <i-ep-setting />
+                  参数设置
+                </el-button>
+                <el-button
+                  v-hasPerm="['sys:dataCollection:delete']"
+                  type="primary"
+                >
+                  <i-ep-Document />
+                  存储设置
+                </el-button>
+                <el-button
+                  v-hasPerm="['sys:dataCollection:delete']"
+                  type="danger"
+                >
+                  <i-ep-view />
+                  数据回放
+                </el-button>
+                <el-button
+                  v-hasPerm="['sys:dataCollection:delete']"
+                  type="info"
+                >
+                  <i-ep-VideoPlay />
+                  开始采集
+                </el-button>
+                <el-button
+                  v-hasPerm="['sys:dataCollection:delete']"
+                  color="#626aef"
+                >
+                  <i-ep-VideoPause />
+                  停止采集
+                </el-button>
+                <el-button
+                  v-hasPerm="['sys:dataCollection:delete']"
+                  color="#47487a"
+                >
+                  <i-ep-FolderOpened />
+                  数据存储
+                </el-button>
+              </div>
+            </div>
+          </template>
+
+          <el-table
+            v-loading="loading"
+            size="small"
+            :data="pageData"
+            height="300px"
+          >
+            <el-table-column type="selection" width="50" align="center" />
+            <el-table-column
+              key="id"
+              label="编号"
+              align="center"
+              prop="id"
+              width="80"
+            />
+            <el-table-column label="站点名称" align="center" prop="siteName" />
+            <el-table-column label="站点号" align="center" prop="siteNumber" />
+            <el-table-column
+              label="通道号"
+              align="center"
+              prop="channelNumber"
+            />
+            <el-table-column
+              label="传感器类型"
+              align="center"
+              prop="sensorType"
+            />
+            <el-table-column
+              label="传感器坐标"
+              align="center"
+              prop="sensorCoordinates"
+              width="120"
+            />
+            <el-table-column
+              label="时间"
+              align="center"
+              prop="time"
+              width="200"
+            />
+            <el-table-column
+              label="有效值"
+              align="center"
+              prop="validValue"
+              width="200"
+            />
+            <el-table-column
+              label="最大值"
+              align="center"
+              prop="maxValue"
+              width="200"
+            />
+            <el-table-column
+              label="健康状况"
+              align="center"
+              prop="healthStatus"
+              width="180"
+            >
+              <template #default="scope">
+                <el-tag
+                  :type="scope.row.healthStatus == 1 ? 'success' : 'info'"
+                >
+                  {{ scope.row.healthStatus == 1 ? "正常" : "异常" }}
+                </el-tag>
+              </template>
+            </el-table-column>
+          </el-table>
+          <pagination
+            v-if="total > 0"
+            v-model:total="total"
+            v-model:page="queryParams.pageNum"
+            v-model:limit="queryParams.pageSize"
+            @pagination="handleQuery"
+          />
+        </el-card>
+        <div class="bottom">
+          <el-tabs
+            type="border-card"
+            v-model="activeName"
+            class="demo-tabs"
+            @tab-click="handleClick"
+          >
+            <el-tab-pane label="振动-加速度" name="first">
+              <div class="flex">
+                <firstChart />
+                <secondChart />
+                <div>
+                  <div class="top flex h-110px">
+                    <div class="info">
+                      <div>最新告警信息:</div>
+                      <div class="warnInfo">
+                        11:35:50:通道3告警;
+                        <br />
+                        11:35:50:通道4告警;
+                        <br />
+                        11:35:50:通道5告警;
+                      </div>
+                    </div>
+                    <div class="right">
+                      <div class="deng">警告闪烁</div>
+
+                      <el-button plain color="#47487a">
+                        <i-ep-FolderOpened />
+                        查看告警数据
+                      </el-button>
+                    </div>
+                  </div>
+                  <div class="bottomTable">
+                    <el-divider content-position="left">特殊值分析</el-divider>
+                    <el-table
+                      v-loading="loading"
+                      :data="specialData"
+                      size="small"
+                    >
+                      <el-table-column
+                        key="id"
+                        label="通道"
+                        align="center"
+                        prop="channel"
+                        width="80"
+                      />
+                      <el-table-column
+                        label="加速度通频值(m/ss)"
+                        align="center"
+                        prop="acceleration"
+                      />
+                      <el-table-column
+                        label="速度RMES值(mm/s)"
+                        align="center"
+                        prop="RMES"
+                      />
+                    </el-table>
+                  </div>
+                </div>
+              </div>
+            </el-tab-pane>
+            <el-tab-pane label="振动-速度" name="second">Task</el-tab-pane>
+            <el-tab-pane label="振动-gSE分析" name="third">Task</el-tab-pane>
+            <el-tab-pane label="压力" name="fourth">Task</el-tab-pane>
+            <el-tab-pane label="流量" name="fourth">Task</el-tab-pane>
+            <el-tab-pane label="温度" name="fourth">Task</el-tab-pane>
+            <el-tab-pane label="AC电流" name="fourth">Task</el-tab-pane>
+          </el-tabs>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+defineOptions({
+  name: "DataCollection",
+  inherititems: false,
+});
+import dataCollectionAPI, {
+  dataCollectionPageQuery,
+  dataCollectionPageVO,
+} from "@/api/sLongDemo/dataCollection";
+import type { TabsPaneContext } from "element-plus";
+import firstChart from "@/views/sLongDemo/dataCollection/firstChart.vue";
+import secondChart from "@/views/sLongDemo/dataCollection/firstChart.vue";
+
+const pageData = ref<dataCollectionPageVO[]>();
+const total = ref(0);
+const loading = ref(false);
+const activeName = ref("first");
+const queryParams = reactive<dataCollectionPageQuery>({
+  pageNum: 1,
+  pageSize: 20,
+});
+const specialData = [
+  {
+    channel: 1,
+    acceleration: "0.210869342036529",
+    RMES: "0.1252698691848526",
+  },
+  {
+    channel: 2,
+    acceleration: "0.210402041675926",
+    RMES: "0.1238168311832614",
+  },
+  {
+    channel: 3,
+    acceleration: "0.209233790647856",
+    RMES: "0.1257580983765234",
+  },
+  {
+    channel: 4,
+    acceleration: "0.211453482556924",
+    RMES: "0.1240880729184567",
+  },
+];
+function handleQuery() {
+  // debugger
+  loading.value = true;
+  dataCollectionAPI
+    .getPage(queryParams)
+    .then((data) => {
+      pageData.value = data.list;
+      total.value = data.total;
+    })
+    .finally(() => {
+      loading.value = false;
+    });
+}
+const handleClick = (tab: TabsPaneContext, event: Event) => {
+  console.log(tab, event);
+};
+onMounted(() => {
+  handleQuery();
+});
+</script>
+
+<style lang="scss" scoped>
+.bottom {
+  height: calc(100vh - 600px);
+  margin-top: 20px;
+}
+
+.info {
+  width: 300px;
+
+  .warnInfo {
+    padding: 10px;
+    border: 1px solid #ccc;
+    border-radius: 10px;
+  }
+}
+
+.right {
+  position: relative;
+  width: 200px;
+
+  .el-button {
+    position: absolute;
+    right: 20px;
+    bottom: 0;
+    margin-top: 10px;
+  }
+}
+
+@keyframes test {
+  0% {
+    opacity: 1;
+  }
+
+  50% {
+    opacity: 0.4;
+  }
+
+  100% {
+    opacity: 1;
+  }
+}
+
+.deng {
+  position: absolute;
+  left: 40%;
+  width: 50px;
+  height: 50px;
+  padding: 10px;
+  padding-left: 13px;
+  font-size: 12px;
+  color: #fff;
+  background-color: rgb(255 1 1 / 80%);
+  border-radius: 50%;
+  animation: test 1000ms infinite;
+  animation: test 1000ms infinite;
+}
+
+.bottomTable {
+  width: 500px;
+}
+</style>

+ 165 - 0
src/views/sLongDemo/dataCollection/secondChart.vue

@@ -0,0 +1,165 @@
+<template>
+  <div ref="chartRef" id="chart" style="width: 500px; height: 300px"></div>
+</template>
+
+<script setup name="secondChart">
+import { onMounted, ref } from "vue";
+import * as echarts from "echarts";
+
+const chartRef = ref(null);
+
+const chartData = {
+  xAxis: [
+    "2024-03-25 12:39:54",
+    "2024-03-25 12:39:56",
+    "2024-03-25 12:39:58",
+    "2024-03-25 12:40:00",
+    "2024-03-25 12:40:02",
+    "2024-03-25 12:40:04",
+    "2024-03-25 12:40:06",
+    "2024-03-25 12:40:08",
+    "2024-03-25 12:40:10",
+    "2024-03-25 12:40:12",
+    "2024-03-25 12:40:14",
+    "2024-03-25 12:40:16",
+    "2024-03-25 12:40:18",
+    "2024-03-25 12:40:20",
+    "2024-03-25 12:40:22",
+    "2024-03-25 12:40:24",
+    "2024-03-25 12:40:26",
+    "2024-03-25 12:40:28",
+    "2024-03-25 12:40:30",
+    "2024-03-25 12:40:32",
+    "2024-03-25 12:40:34",
+    "2024-03-25 12:40:36",
+    "2024-03-25 12:40:38",
+    "2024-03-25 12:40:40",
+    "2024-03-25 12:40:42",
+    "2024-03-25 12:40:44",
+    "2024-03-25 12:40:46",
+    "2024-03-25 12:40:48",
+    "2024-03-25 12:40:50",
+    "2024-03-25 12:40:52",
+    "2024-03-25 12:40:54",
+    "2024-03-25 12:40:56",
+    "2024-03-25 12:40:58",
+    "2024-03-25 12:40:60",
+    "2024-03-25 12:41:00",
+    "2024-03-25 12:41:02",
+    "2024-03-25 12:41:04",
+    "2024-03-25 12:41:06",
+    "2024-03-25 12:41:08",
+    "2024-03-25 12:41:10",
+    "2024-03-25 12:41:12",
+    "2024-03-25 12:41:14",
+    "2024-03-25 12:41:16",
+    "2024-03-25 12:41:18",
+    "2024-03-25 12:41:20",
+    "2024-03-25 12:41:22",
+    "2024-03-25 12:41:24",
+    "2024-03-25 12:41:26",
+    "2024-03-25 12:41:28",
+    "2024-03-25 12:41:30",
+    "2024-03-25 12:41:32",
+    "2024-03-25 12:41:34",
+    "2024-03-25 12:41:36",
+    "2024-03-25 12:41:38",
+    "2024-03-25 12:41:40",
+    "2024-03-25 12:41:42",
+    "2024-03-25 12:41:44",
+    "2024-03-25 12:41:46",
+    "2024-03-25 12:41:48",
+    "2024-03-25 12:41:50",
+    "2024-03-25 12:41:52",
+    "2024-03-25 12:41:54",
+    "2024-03-25 12:41:56",
+    "2024-03-25 12:41:58",
+    "2024-03-25 12:41:60",
+    "2024-03-25 12:42:00",
+    "2024-03-25 12:42:02",
+    "2024-03-25 12:42:04",
+    "2024-03-25 12:42:06",
+    "2024-03-25 12:42:08",
+    "2024-03-25 12:42:10",
+    "2024-03-25 12:42:12",
+    "2024-03-25 12:42:14",
+    "2024-03-25 12:42:16",
+    "2024-03-25 12:42:18",
+    "2024-03-25 12:42:20",
+    "2024-03-25 12:42:22",
+    "2024-03-25 12:42:24",
+    "2024-03-25 12:42:26",
+    "2024-03-25 12:42:28",
+    "2024-03-25 12:42:30",
+    "2024-03-25 12:42:32",
+    "2024-03-25 12:42:34",
+    "2024-03-25 12:42:36",
+    "2024-03-25 12:42:38",
+    "2024-03-25 12:42:40",
+    "2024-03-25 12:42:42",
+    "2024-03-25 12:42:44",
+    "2024-03-25 12:42:46",
+    "2024-03-25 12:42:48",
+    "2024-03-25 12:42:50",
+    "2024-03-25 12:42:52",
+    "2024-03-25 12:42:54",
+    "2024-03-25 12:42:56",
+    "2024-03-25 12:42:58",
+    "2024-03-25 12:42:60",
+  ],
+  series: [
+    45, 123, 67, 189, 112, 134, 256, 178, 290, 211, 222, 133, 244, 55, 166, 277,
+    188, 99, 100, 211, 232, 143, 154, 65, 76, 187, 98, 155, 201, 131, 242, 153,
+    64, 175, 86, 97, 81, 191, 130, 41, 252, 163, 74, 85, 196, 117, 118, 129,
+    236, 152, 108, 213, 71, 165, 223, 182, 143, 208, 155, 11, 128, 232, 264,
+    255, 170, 137, 193, 163, 201, 158, 109, 226, 239, 184, 116, 134, 196, 253,
+    175, 110, 246, 231, 252, 131, 198, 162, 150, 242, 225, 173, 123, 188, 263,
+    218, 141, 107,
+  ],
+};
+
+const initChart = () => {
+  const chartInstance = echarts.init(chartRef.value);
+
+  const option = {
+    title: {
+      text: "频域图",
+    },
+    tooltip: {
+      trigger: "axis",
+    },
+    xAxis: {
+      // splitLine: {
+      //   show: true,
+      // },
+      type: "category",
+      data: chartData.xAxis,
+    },
+    yAxis: {
+      axisLine: {
+        show: true,
+      },
+      splitLine: {
+        show: true,
+      },
+      name: "m/s2",
+      type: "value",
+    },
+    series: [
+      {
+        data: chartData.series,
+        type: "line",
+        smooth: true,
+      },
+    ],
+  };
+
+  chartInstance.setOption(option);
+};
+
+onMounted(() => {
+  nextTick(() => {
+    initChart();
+  });
+});
+</script>

+ 12 - 0
src/views/sLongDemo/diagnosticModelManage/index.vue

@@ -0,0 +1,12 @@
+<template>
+  <div>诊断模型管理</div>
+</template>
+
+<script setup lang="ts">
+defineOptions({
+  name: "DiagnosticModelManage",
+  inherititems: false,
+});
+</script>
+
+<style lang="scss" scoped></style>

+ 12 - 0
src/views/sLongDemo/experimentalDataManage/index.vue

@@ -0,0 +1,12 @@
+<template>
+  <div>实验数据管理</div>
+</template>
+
+<script setup lang="ts">
+defineOptions({
+  name: "ExperimentalDataManage",
+  inherititems: false,
+});
+</script>
+
+<style lang="scss" scoped></style>

+ 12 - 0
src/views/sLongDemo/faultDiagnosis/index.vue

@@ -0,0 +1,12 @@
+<template>
+  <div>故障诊断</div>
+</template>
+
+<script setup lang="ts">
+defineOptions({
+  name: "FaultDiagnosis",
+  inherititems: false,
+});
+</script>
+
+<style lang="scss" scoped></style>

+ 18 - 8
src/views/system/dept/index.vue

@@ -27,7 +27,8 @@
             搜索
           </el-button>
           <el-button @click="handleResetQuery">
-            <i-ep-refresh />重置
+            <i-ep-refresh />
+            重置
           </el-button>
         </el-form-item>
       </el-form>
@@ -39,14 +40,18 @@
           v-hasPerm="['sys:dept:add']"
           type="success"
           @click="handleOpenDialog(0, undefined)"
-          ><i-ep-plus />新增</el-button
         >
+          <i-ep-plus />
+          新增
+        </el-button>
         <el-button
           v-hasPerm="['sys:dept:delete']"
           type="danger"
           :disabled="ids.length === 0"
           @click="handleDelete()"
-          ><i-ep-delete />删除
+        >
+          <i-ep-delete />
+          删除
         </el-button>
       </template>
 
@@ -78,7 +83,9 @@
               link
               size="small"
               @click.stop="handleOpenDialog(scope.row.id, undefined)"
-              ><i-ep-plus />新增
+            >
+              <i-ep-plus />
+              新增
             </el-button>
             <el-button
               v-hasPerm="['sys:dept:edit']"
@@ -86,7 +93,9 @@
               link
               size="small"
               @click.stop="handleOpenDialog(scope.row.parentId, scope.row.id)"
-              ><i-ep-edit />编辑
+            >
+              <i-ep-edit />
+              编辑
             </el-button>
             <el-button
               v-hasPerm="['sys:dept:delete']"
@@ -95,7 +104,8 @@
               size="small"
               @click.stop="handleDelete(scope.row.id)"
             >
-              <i-ep-delete />删除
+              <i-ep-delete />
+              删除
             </el-button>
           </template>
         </el-table-column>
@@ -148,8 +158,8 @@
 
       <template #footer>
         <div class="dialog-footer">
-          <el-button type="primary" @click="handleSubmit"> 确 定 </el-button>
-          <el-button @click="handleCloseDialog"> 取 消 </el-button>
+          <el-button type="primary" @click="handleSubmit">确 定</el-button>
+          <el-button @click="handleCloseDialog">取 消</el-button>
         </div>
       </template>
     </el-dialog>

+ 2 - 0
vite.config.ts

@@ -49,6 +49,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
           additionalData: `
             @use "@/styles/variables.scss" as *;
           `,
+          api: "modern-compiler",
         },
       },
     },
@@ -59,6 +60,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
       port: Number(env.VITE_APP_PORT),
       // 运行是否自动打开浏览器
       open: true,
+      hmr: true,
       proxy: {
         /** 代理前缀为 /dev-api 的请求  */
         [env.VITE_APP_BASE_API]: {