wenhongquan 2 lat temu
rodzic
commit
f77cb86188
1 zmienionych plików z 10 dodań i 4 usunięć
  1. 10 4
      src/views/yunying/scheduling/index.vue

+ 10 - 4
src/views/yunying/scheduling/index.vue

@@ -72,7 +72,7 @@
                             </div>
                         </div>
                         <div style="position:absolute;bottom:10px;right:6px;font-size:10px">
-                            <span>乘客:{{ gettotalpeople(item) }}人 </span> <span style="margin-left: 10px;">货物:11个</span>
+                            <span>客流:{{ gettotalpeople(item,11) }}人 </span> <span>乘客:{{ gettotalpeople(item,0) }}人 </span> <span style="margin-left: 10px;">货物:11个</span>
                         </div>
                     </div>
                 </el-card>
@@ -137,10 +137,16 @@ const queryFormRef = ref<ElFormInstance>();
 const carInfoFormRef = ref<ElFormInstance>();
 
 
-const gettotalpeople = (item) => {
+const gettotalpeople = (item,type) => {
   if (item.peoplecount != undefined && item.peoplecount != null) {
-    var totalpeople = item.peoplecount['total'];
-    return totalpeople.totalin - totalpeople.totalout>0?totalpeople.totalin - totalpeople.totalout:0;
+      var totalpeople = item.peoplecount['total'];
+      if (type == 1) {
+        return totalpeople.totalin - totalpeople.totalout>0?totalpeople.totalin - totalpeople.totalout:0;
+      }
+      if (type == 0) {
+          return totalpeople.totalin;
+      }
+
   }
   return 0;
 }