瀏覽代碼

修改驾驶舱

zhaoke 2 年之前
父節點
當前提交
affa17a73e

+ 2 - 6
src/views/dashboard/hooks/usePublic.ts

@@ -462,7 +462,6 @@ export function usePublic() {
   const findData = (arr1, arr2, key, dot) => {
     const msg = _.unionWith(arr1, arr2, _.isEqual)
     const res = _.unionBy(msg, key)
-    const result: any = []
     res.forEach((item) => {
       arr2.forEach((p) => {
         if (item[key] == p[key]) {
@@ -470,11 +469,8 @@ export function usePublic() {
         }
       })
     })
-    res.forEach((item) => {
-      if (item[dot] && item[dot] != undefined) {
-        result.push(item)
-      }
-    })
+    const newArr = res.filter((item) => item['name'])
+    const result = newArr.filter((item) => item[dot] && item[dot] != undefined)
     return result
   }
   return {

+ 1 - 1
src/views/dashboard/index.vue

@@ -71,7 +71,7 @@
               <div class="dashboard-content-top-center-top-list-num">{{ stockNums }}</div>
             </div>
             <div class="dashboard-content-top-center-top-list">
-              <div class="dashboard-content-top-center-top-list-txt">卸载总量KG</div>
+              <div class="dashboard-content-top-center-top-list-txt">卸载总量KG</div>
               <div class="dashboard-content-top-center-top-list-num">{{ weightNums }}</div>
             </div>
           </div>

+ 0 - 1
src/views/dashboard/indexHomeOut.vue

@@ -185,7 +185,6 @@ import { usePublic, showTimeMsg } from "./hooks/usePublic";
 import nodeCode from "./hooks/nodeCode";
 import { parseTime, isValue } from "@/utils/validate";
 import * as _ from "lodash";
-console.log(nodeCode);
 const {
   optionLeft,
   airCompaneBaggage,

+ 1 - 1
src/views/dashboard/indexIn.vue

@@ -80,7 +80,7 @@
             </div>
             <div class="dashboard-content-top-center-top-list">
               <div class="dashboard-content-top-center-top-list-txt">
-                卸载总量KG
+                卸载总量KG
               </div>
               <div class="dashboard-content-top-center-top-list-num">
                 {{ weightNums }}