jc-wangyt 4 өдөр өмнө
parent
commit
9add786324

+ 43 - 42
src/router/index.js

@@ -61,48 +61,7 @@ export const constantRoutes = [
     component: () => import('@/views/error/401'),
     hidden: true
   },
-  {
-    path: '/bizoppmanage',
-    component: Layout,
-    redirect: 'index',
-    meta: { title: '商机运营', icon: 'dashboard', affix: true },
-    children: [
-      {
-        path: 'index',
-        component: () => import('@/views/bizoppmanage/index'),
-        name: 'BizOppManage',
-        meta: { title: '商机运营', icon: 'dashboard', affix: true },
-      },
-      {
-        path: 'bizoppdetails',
-        component: () => import('@/views/bizoppmanage/details'),
-        name: 'BizOppDetails',
-        hidden: true,
-        meta: { title: '商机详情', noCache: true, icon: 'dashboard', breadcrumb: false },
-      }
-    ]
-  },
-  {
-    path: '/openMarketBid',
-    component: Layout,
-    redirect: 'index',
-    meta: { title: '公开市场', icon: 'dashboard', affix: true },
-    children: [
-      {
-        path: 'index',
-        component: () => import('@/views/openMarketBid/index'),
-        name: 'OpenMarketBid',
-        meta: { title: '公开市场', icon: 'dashboard', affix: true },
-      },
-      {
-        path: 'details',
-        component: () => import('@/views/openMarketBid/details'),
-        name: 'OpenMarketBidDetails',
-        hidden: true,
-        meta: { title: '公开市场详情', noCache: true, icon: 'dashboard', breadcrumb: false },
-      }
-    ]
-  },
+  
 
   {
     path: '',
@@ -162,6 +121,48 @@ export const constantRoutes = [
       },
     ]
   },
+  {
+    path: '/bizoppmanage',
+    component: Layout,
+    redirect: 'index',
+    meta: { title: '商机运营', icon: 'dashboard', affix: true },
+    children: [
+      {
+        path: 'index',
+        component: () => import('@/views/bizoppmanage/index'),
+        name: 'BizOppManage',
+        meta: { title: '商机运营', icon: 'dashboard', affix: true },
+      },
+      {
+        path: 'bizoppdetails',
+        component: () => import('@/views/bizoppmanage/details'),
+        name: 'BizOppDetails',
+        hidden: true,
+        meta: { title: '商机详情', noCache: true, icon: 'dashboard', breadcrumb: false },
+      }
+    ]
+  },
+  {
+    path: '/openMarketBid',
+    component: Layout,
+    redirect: 'index',
+    meta: { title: '公开市场', icon: 'dashboard', affix: true },
+    children: [
+      {
+        path: 'index',
+        component: () => import('@/views/openMarketBid/index'),
+        name: 'OpenMarketBid',
+        meta: { title: '公开市场', icon: 'dashboard', affix: true },
+      },
+      {
+        path: 'details',
+        component: () => import('@/views/openMarketBid/details'),
+        name: 'OpenMarketBidDetails',
+        hidden: true,
+        meta: { title: '公开市场详情', noCache: true, icon: 'dashboard', breadcrumb: false },
+      }
+    ]
+  },
   {
     path: '/user',
     component: Layout,

+ 24 - 10
src/views/alarm/index.vue

@@ -176,18 +176,32 @@ export default {
       });
 
       // exportAlarmData(this.currentMonth).then(res => {
-      exportNewAlarmData(this.currentMonth).then(res => {
+      exportNewAlarmData(this.currentMonth).then(async (res) => {
         // 处理导出成功逻辑
         const blob = new Blob([res], { type: 'application/vnd.ms-excel' });
-        const url = window.URL.createObjectURL(blob);
-        const a = document.createElement('a');
-        a.href = url;
-        a.download = `告警数据_${this.currentMonth}.xlsx`;
-        document.body.appendChild(a);
-        a.click();
-        document.body.removeChild(a);
-        window.URL.revokeObjectURL(url);
-        this.$message.success('导出成功');
+        try {
+          const fileHandle = await window.showSaveFilePicker({
+            suggestedName: `告警数据_${this.currentMonth}.xlsx`,
+            types: [
+              {
+                description: 'Excel文件',
+                accept: {
+                  'application/vnd.ms-excel': ['.xlsx']
+                }
+              }
+            ]
+          });
+          const writable = await fileHandle.createWritable();
+          await writable.write(blob);
+          await writable.close();
+          this.$message.success('导出成功');
+        } catch (error) {
+          console.error('导出失败:', error);
+          // 如果用户取消选择,不显示错误信息
+          if (error.name !== 'AbortError') {
+            this.$message.error('导出失败');
+          }
+        }
       }).finally(() => {
         loading.close();
       })

+ 0 - 309
src/views/driving/index.txt

@@ -1,309 +0,0 @@
-{
-    "msg": "操作成功",
-    "code": 200,
-    "data": {
-        "metricCategory": {
-            "content": {
-                "totalSystems": 5,
-                "configuredCount": 0,
-                "unconfiguredCount": 5,
-                "noDataCount": 0
-            },
-            "threshold": {
-                "totalSystems": 5,
-                "configuredCount": 0,
-                "unconfiguredCount": 5,
-                "noDataCount": 0
-            }
-        },
-        "alarmList": [
-            {
-                "monitorName": "数据库监控",
-                "tableName": "cus_db_monitor",
-                "systemId": "7c110d",
-                "systemName": "系统4",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 22:55:00",
-                "category": "内容类"
-            },
-            {
-                "monitorName": "数据库监控",
-                "tableName": "cus_db_monitor",
-                "systemId": "2e319c",
-                "systemName": "系统2",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 18:55:00",
-                "category": "内容类"
-            },
-            {
-                "monitorName": "数据库监控",
-                "tableName": "cus_db_monitor",
-                "systemId": "2e319c",
-                "systemName": "系统2",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 16:55:00",
-                "category": "内容类"
-            },
-            {
-                "monitorName": "系统内部连接性监控",
-                "tableName": "cus_internal_connect_monitor",
-                "systemId": "e6a6e3",
-                "systemName": "系统3",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 15:55:19",
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "异常IP访问监控",
-                "tableName": "cus_ip_abnormal_monitor",
-                "systemId": "7c110d",
-                "systemName": "系统4",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 15:55:19",
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "异常IP访问监控",
-                "tableName": "cus_ip_abnormal_monitor",
-                "systemId": "e6a6e3",
-                "systemName": "系统3",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 15:55:19",
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "异常IP访问监控",
-                "tableName": "cus_ip_abnormal_monitor",
-                "systemId": "7c110d",
-                "systemName": "系统4",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 15:55:19",
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "系统内部连接性监控",
-                "tableName": "cus_internal_connect_monitor",
-                "systemId": "e6a6e3",
-                "systemName": "系统3",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 15:55:19",
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "系统内部连接性监控",
-                "tableName": "cus_internal_connect_monitor",
-                "systemId": "7c110d",
-                "systemName": "系统4",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 15:55:19",
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "系统内部连接性监控",
-                "tableName": "cus_internal_connect_monitor",
-                "systemId": "e6a6e3",
-                "systemName": "系统3",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 15:55:19",
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "定时任务异常监控",
-                "tableName": "cus_task_exception_monitor",
-                "systemId": "2e319c",
-                "systemName": "系统2",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 15:55:19",
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "异常IP访问监控",
-                "tableName": "cus_ip_abnormal_monitor",
-                "systemId": "7c110d",
-                "systemName": "系统4",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 15:55:19",
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "用户权限变更监控",
-                "tableName": "sec_permission_monitor",
-                "systemId": "4c984c",
-                "systemName": "系统5",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 15:55:19",
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "异常IP访问监控",
-                "tableName": "cus_ip_abnormal_monitor",
-                "systemId": "1631b4",
-                "systemName": "系统1",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 15:55:19",
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "用户权限变更监控",
-                "tableName": "sec_permission_monitor",
-                "systemId": "e6a6e3",
-                "systemName": "系统3",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 15:55:19",
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "系统内部连接性监控",
-                "tableName": "cus_internal_connect_monitor",
-                "systemId": "7c110d",
-                "systemName": "系统4",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 15:55:19",
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "用户权限变更监控",
-                "tableName": "sec_permission_monitor",
-                "systemId": "7c110d",
-                "systemName": "系统4",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 15:55:19",
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "用户权限变更监控",
-                "tableName": "sec_permission_monitor",
-                "systemId": "4c984c",
-                "systemName": "系统5",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 15:55:19",
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "用户权限变更监控",
-                "tableName": "sec_permission_monitor",
-                "systemId": "4c984c",
-                "systemName": "系统5",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 15:55:19",
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "定时任务异常监控",
-                "tableName": "cus_task_exception_monitor",
-                "systemId": "1631b4",
-                "systemName": "系统1",
-                "alarmStatus": "untreated",
-                "triggerTime": "2026-02-12 15:55:19",
-                "category": "阈值类"
-            }
-        ],
-        "monitorPointCounts": [
-            {
-                "monitorName": "数据库监控",
-                "tableName": "cus_db_monitor",
-                "count": 0,
-                "category": "内容类"
-            },
-            {
-                "monitorName": "用户权限变更监控",
-                "tableName": "sec_permission_monitor",
-                "count": 0,
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "系统内部连接性监控",
-                "tableName": "cus_internal_connect_monitor",
-                "count": 0,
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "异常IP访问监控",
-                "tableName": "cus_ip_abnormal_monitor",
-                "count": 0,
-                "category": "阈值类"
-            },
-            {
-                "monitorName": "定时任务异常监控",
-                "tableName": "cus_task_exception_monitor",
-                "count": 0,
-                "category": "阈值类"
-            }
-        ],
-        "trend": {
-            "dates": [
-                "02-18",
-                "02-19",
-                "02-20",
-                "02-21",
-                "02-22",
-                "02-23",
-                "02-24"
-            ],
-            "contentCounts": [
-                0,
-                0,
-                0,
-                0,
-                0,
-                0,
-                0
-            ],
-            "thresholdCounts": [
-                0,
-                0,
-                0,
-                0,
-                0,
-                0,
-                0
-            ],
-            "existenceCounts": [
-                528,
-                528,
-                528,
-                528,
-                528,
-                528,
-                528
-            ]
-        },
-        "systemCategories": [
-            {
-                "systemId": "1631b4",
-                "systemName": "系统1",
-                "contentCount": 0,
-                "thresholdCount": 0,
-                "existenceCount": 840
-            },
-            {
-                "systemId": "2e319c",
-                "systemName": "系统2",
-                "contentCount": 0,
-                "thresholdCount": 0,
-                "existenceCount": 336
-            },
-            {
-                "systemId": "4c984c",
-                "systemName": "系统5",
-                "contentCount": 0,
-                "thresholdCount": 0,
-                "existenceCount": 840
-            },
-            {
-                "systemId": "7c110d",
-                "systemName": "系统4",
-                "contentCount": 0,
-                "thresholdCount": 0,
-                "existenceCount": 840
-            },
-            {
-                "systemId": "e6a6e3",
-                "systemName": "系统3",
-                "contentCount": 0,
-                "thresholdCount": 0,
-                "existenceCount": 840
-            }
-        ]
-    }
-}

+ 2 - 2
src/views/driving/index.vue

@@ -609,7 +609,7 @@ export default {
                     value: contentData.noDataCount || 0, name: '无数据'
                   }
                 ],
-                color: ['#8BC34A', '#BDBDBD', '#F44336']
+                color: ['#8BC34A', '#fafa03', '#F44336']
               }
             ]
           }
@@ -664,7 +664,7 @@ export default {
                     value: thresholdData.noDataCount || 0, name: '无数据'
                   }
                 ],
-                color: ['#8BC34A', '#BDBDBD', '#F44336']
+                color: ['#8BC34A', '#fafa03', '#F44336']
               }
             ]
           }

+ 2 - 2
vue.config.js

@@ -9,8 +9,8 @@ const CompressionPlugin = require('compression-webpack-plugin')
 
 const name = process.env.VUE_APP_TITLE || '黑龙江运行保障能力' // 网页标题
 
-// const baseUrl = 'http://10.130.22.73:1090/' // 后端接口
-const baseUrl = 'http://10.64.12.216:12321' // 后端接口
+const baseUrl = 'http://10.130.22.73:1090/' // 后端接口
+// const baseUrl = 'http://10.64.12.216:12321' // 后端接口
 
 
 const port = process.env.port || process.env.npm_config_port || 80 // 端口