From 820fe5e39c1027e0373b9d24bbfd9d7fc86722d1 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Tue, 13 May 2025 14:52:47 +0800
Subject: [PATCH] feat:请求头添加areaCode

---
 src/views/wel/index.vue |  184 ++++++++++++++++++++++-----------------------
 src/axios.js            |    4 +
 2 files changed, 94 insertions(+), 94 deletions(-)

diff --git a/src/axios.js b/src/axios.js
index 7dacdc5..76fa2d0 100644
--- a/src/axios.js
+++ b/src/axios.js
@@ -5,6 +5,7 @@
  * isSerialize是否开启form表单提交
  * isToken是否需要token
  */
+
 import axios from 'axios';
 import store from '@/store/';
 import router from '@/router/';
@@ -62,6 +63,9 @@
 			config.url = baseUrl + config.url;
 		}
 		//安全请求header
+		console.log('selectedAreaCode',store.state.user.userInfo.detail.areaCode);
+		
+		config.headers['areaCode'] = store.state.user.userInfo.detail.areaCode
 		config.headers['Blade-Requested-With'] = 'BladeHttpRequest';
 		//headers判断是否需要
 		const authorization = config.authorization === false;
diff --git a/src/views/wel/index.vue b/src/views/wel/index.vue
index da1a71b..45a00bb 100644
--- a/src/views/wel/index.vue
+++ b/src/views/wel/index.vue
@@ -48,9 +48,7 @@
                           <!-- <div :style="{ color: item.color }" class="status-value">
                             {{ item.value }}<span>个</span>
                           </div> -->
-                           <div  class="status-value">
-                            {{ item.value }}<span>个</span>
-                          </div>
+                          <div class="status-value">{{ item.value }}<span>个</span></div>
                           <div class="ratio">
                             占比
                             <span :style="{ color: item.color }"
@@ -334,98 +332,97 @@
     if (!hasResult) event_num.push(0);
   });
   var option = {
- tooltip: {
-    trigger: 'item',
-    axisPointer: {
-      type: 'shadow',
-    },
-  },
-  grid: {
-    left: '2%',
-    right: '4%',
-    bottom: '14%',
-    top: '16%',
-    containLabel: true,
-  },
-  legend: {
-    data: ['飞行时长', '飞行里程', '任务成果'],
-    left: 'center',
-    top: '5%',
-    color: '#383838',  // 直接配置颜色
-    itemWidth: 15,
-    itemHeight: 10,
-    itemGap: 25,
-  },
-  xAxis: {
-    type: 'category',
-    data: categories,
-    axisLine: {
-      lineStyle: {
-        color: '#cdd5e2',
+    tooltip: {
+      trigger: 'item',
+      axisPointer: {
+        type: 'shadow',
       },
     },
-    axisLabel: {
-      interval: 0,
-      color: '#383838',  // 直接配置颜色
+    grid: {
+      left: '2%',
+      right: '4%',
+      bottom: '14%',
+      top: '16%',
+      containLabel: true,
     },
-  },
-  yAxis: [
-    {
-      type: 'log',
-      name: '单位:万套',
-      nameTextStyle: {
-        color: '#383838',
-       
-      },
-      min: 1,
-      logBase: 3,
+    legend: {
+      data: ['飞行时长', '飞行里程', '任务成果'],
+      left: 'center',
+      top: '5%',
+      color: '#383838', // 直接配置颜色
+      itemWidth: 15,
+      itemHeight: 10,
+      itemGap: 25,
+    },
+    xAxis: {
+      type: 'category',
+      data: categories,
       axisLine: {
-        show: false,
         lineStyle: {
           color: '#cdd5e2',
-        },
-      },
-      splitLine: {
-        show: true,
-        lineStyle: {
-          type: 'dashed',
-          color: '#cdd5e2',
-          width: 1,
-          opacity: 0.5,
         },
       },
       axisLabel: {
-        color: '#666666',  // 直接配置颜色
+        interval: 0,
+        color: '#383838', // 直接配置颜色
       },
     },
-    {
-      type: 'log',
-      name: '',
-      nameTextStyle: {
-        color: '#383838',
-      },
-      min: 1,
-      logBase: 3,
-      axisLine: {
-        show: false,
-        lineStyle: {
-          color: '#cdd5e2',
+    yAxis: [
+      {
+        type: 'log',
+        name: '单位:万套',
+        nameTextStyle: {
+          color: '#383838',
+        },
+        min: 1,
+        logBase: 3,
+        axisLine: {
+          show: false,
+          lineStyle: {
+            color: '#cdd5e2',
+          },
+        },
+        splitLine: {
+          show: true,
+          lineStyle: {
+            type: 'dashed',
+            color: '#cdd5e2',
+            width: 1,
+            opacity: 0.5,
+          },
+        },
+        axisLabel: {
+          color: '#666666', // 直接配置颜色
         },
       },
-      splitLine: {
-        show: true,
-        lineStyle: {
-          type: 'dashed',
-          color: '#cdd5e2',
-          width: 1,
-          opacity: 0.5,
+      {
+        type: 'log',
+        name: '',
+        nameTextStyle: {
+          color: '#383838',
+        },
+        min: 1,
+        logBase: 3,
+        axisLine: {
+          show: false,
+          lineStyle: {
+            color: '#cdd5e2',
+          },
+        },
+        splitLine: {
+          show: true,
+          lineStyle: {
+            type: 'dashed',
+            color: '#cdd5e2',
+            width: 1,
+            opacity: 0.5,
+          },
+        },
+        axisLabel: {
+          color: '#383838', // 直接配置颜色
         },
       },
-      axisLabel: {
-        color: '#383838',  // 直接配置颜色
-      },
-    }
-  ],
+    ],
     series: [
       {
         name: '飞行时长',
@@ -453,7 +450,7 @@
         },
         data: flight_distance,
       },
-     
+
       {
         name: '任务成果',
         type: 'line',
@@ -519,9 +516,9 @@
         .name {
           display: flex;
           align-items: center;
-           font-weight: bold;
-        font-size: 16px;
-        color: #363636;
+          font-weight: bold;
+          font-size: 16px;
+          color: #363636;
           font-family: 'YouSheBiaoTiHei';
           span {
             margin-right: 4px;
@@ -556,8 +553,7 @@
           }
           .card-item.active {
             color: #1441ff;
-            border: 1px solid #1C5CFF;
-         
+            border: 1px solid #1c5cff;
           }
         }
       }
@@ -598,7 +594,7 @@
                 }
                 .total-number {
                   font-family: 'YouSheBiaoTiHei';
-                  
+
                   font-weight: bold;
                   font-size: 32px;
                   color: #2a54ff;
@@ -626,7 +622,7 @@
                     display: flex;
                     flex-direction: column;
                     // align-items: center;
-                   padding: 9px 4px 7px 10px;
+                    padding: 9px 4px 7px 10px;
                     text-align: left;
                     .status-label {
                       font-weight: 400;
@@ -646,10 +642,10 @@
                       font-weight: bold;
                       font-size: 30px;
                       margin: 5px 0;
-                    // font-style: italic;
-                    display: inline-block;
-                    transform: skewX(-5deg);
-                      
+                      // font-style: italic;
+                      display: inline-block;
+                      transform: skewX(-5deg);
+
                       span {
                         font-weight: 400;
                         font-size: 14px;
@@ -713,8 +709,8 @@
                     display: flex;
                     align-items: center;
                     font-weight: 400;
-font-size: 14px;
-color: #7C8091;
+                    font-size: 14px;
+                    color: #7c8091;
                   }
                   .flydata {
                     margin-top: 15px;

--
Gitblit v1.9.3