Pārlūkot izejas kodu

存量化学品总量展示修改

dedsudiyu 2 dienas atpakaļ
vecāks
revīzija
b3c0ef73f5
2 mainītis faili ar 8 papildinājumiem un 7 dzēšanām
  1. 7 6
      src/components/LabStats/ChemicalsStats.vue
  2. 1 1
      src/utils/request.js

+ 7 - 6
src/components/LabStats/ChemicalsStats.vue

@@ -24,6 +24,13 @@
           </div>
         </div>
 
+        <!-- 右下:类目统计 -->
+        <div class="chem-stat-item item-center">
+          <!--<div class="chem-stat-value" style="color:#ffb020;font-size:22px;">{{ stats.totalCategories }}</div>-->
+          <!--<div class="chem-stat-label">存量化学品总类目</div>-->
+          <div class="chem-stat-label">存量化学品</div>
+          <div class="chem-stat-sub">管控{{ stats.controlledCategories }}类 / 非管控{{ stats.uncontrolledCategories }}类</div>
+        </div>
         <!-- 右上:管控类,橙红色圆环 + 百分比居中 -->
         <div class="chem-stat-item item-red">
           <div class="chem-ring-wrap">
@@ -60,12 +67,6 @@
           </div>
         </div>
 
-        <!-- 右下:类目统计 -->
-        <div class="chem-stat-item item-center">
-          <div class="chem-stat-value" style="color:#ffb020;font-size:22px;">{{ stats.totalCategories }}</div>
-          <div class="chem-stat-label">存量化学品总类目</div>
-          <div class="chem-stat-sub">管控{{ stats.controlledCategories }}类 / 非管控{{ stats.uncontrolledCategories }}类</div>
-        </div>
 
       </div>
     </div>

+ 1 - 1
src/utils/request.js

@@ -61,7 +61,7 @@ service.interceptors.response.use(
     if (error.response && error.response.status === 401) {
       store.dispatch('logout')
       if (router.currentRoute.path !== '/login') {
-        router.replace('/login')
+        router.replace('/login').catch(() => {})
       }
     } else {
       const msg = error.response && error.response.data && error.response.data.message