wsp 1 год назад
Родитель
Сommit
c829f192dd
4 измененных файлов с 232 добавлено и 18 удалено
  1. 25 0
      src/request/api.js
  2. 122 8
      src/views/carplanman/index.vue
  3. 79 4
      src/views/home/index.vue
  4. 6 6
      src/views/orderman/index.vue

+ 25 - 0
src/request/api.js

@@ -16,6 +16,31 @@ export const  apiauthlogout = query => {
     });
 };
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//https://khy.xiaole.vip/api/system/commonOther/static统计-订单数量
+
+export const  apisystemcommonOtherstatic = query => {
+    return service({
+        url: '/api/system/commonOther/static',
+        method: 'GET',
+		params:query
+    });
+};
+
 //https://khy.xiaole.vip/api/system/dzbcArea/list查询定制班车-区域列表
 
 export const  apisystemdzbcArealist = query => {

+ 122 - 8
src/views/carplanman/index.vue

@@ -206,6 +206,114 @@ const isautoChange=()=>{
   localStorage.setItem('isauto',isauto.value)
 }
 let carId=ref('')
+
+
+//params[mdate]
+//api/system/dzbcCar/list
+//https://khy.xiaole.vip/apisystemdzbcCarlist
+let cyclNum=ref('')
+let yzdTotal=ref('')
+let yypblxNum=ref('')
+let ypblx=ref('')
+let ypbNum=ref('')
+
+
+const getypbNum=()=>{
+  apisystemdzbcPathSchedulinglist({
+   
+    'params[mdate]':dayjs().format('YYYY-MM-DD'),
+    pageSize:10,
+    pageNum:pageNum.value
+  }).then(res=>{
+    if(res.code==200){
+      
+      ypbNum.value=res.total
+
+      
+
+    }
+    
+    
+  }).catch(err=>{
+    console.log(err)
+  })
+}
+
+
+
+
+const getyypblxNum=()=>{
+  apisystemdzbcCarlist({
+    pageSize:1,
+    'params[mdate]':dayjs().format('YYYY-MM-DD')
+  }).then(res=>{
+    if(res.code==200){
+
+      console.log('-------------------------------------',res)
+    
+      yypblxNum.value=res.total
+      }
+    
+      
+    }).catch(err=>{
+      console.log(err)
+    })
+  
+}
+//https://khy.xiaole.vip/apisystemdzbcCarlist
+const getcyclNum=()=>{
+  apisystemdzbcCarlist({
+    pageSize:1,
+    'params[mdate]':dayjs().format('YYYY-MM-DD')
+  }).then(res=>{
+    if(res.code==200){
+    
+      cyclNum.value=res.total
+      }
+    
+      
+    }).catch(err=>{
+      console.log(err)
+    })
+  
+}
+const getypblx=()=>{
+  apisystemdzbcPathlist({
+    
+  }).then(res=>{
+    if(res.code==200){
+    
+      ypblx.value=99
+      
+    }
+  
+    
+  }).catch(err=>{
+    console.log(err)
+  })
+}
+const getyzdData=()=>{
+  apisystemdzbcPathSchedulinglist({
+    isauto:1,
+    'params[mdate]':dayjs().format('YYYY-MM-DD'),
+    pageSize:10,
+    pageNum:pageNum.value
+  }).then(res=>{
+    if(res.code==200){
+      //systemdzbcPathSchedulinglist
+      yzdTotal.value=res.total
+
+      
+
+    }
+    
+    
+  }).catch(err=>{
+    console.log(err)
+  })
+}
+
+
 const getTableData=()=>{
   apisystemdzbcPathSchedulinglist({
     carId:carId.value,
@@ -297,6 +405,12 @@ const searchRoute=()=>{
 }
 let routeListLeft=ref([])
 onMounted(()=>{
+  //apisystemdzbcPathSchedulinglist
+  getypbNum()
+  getyypblxNum()
+  getcyclNum()
+  getyzdData()
+  getypblx()
   isauto.value=localStorage.getItem('isauto')=='true'?true:false
   
   apisystemdzbcCarlist({
@@ -546,9 +660,9 @@ onMounted(()=>{
 
                     </div>
                     <div class="right-desc">
-                        <div class="bold-title">排班</div>
+                        <div class="bold-title">月排班数量</div>
                         <div class="num-wrap" style="color:#2563EB">
-                            2458
+                            {{ ypbNum }}
                         </div>
                     </div>
                 </div>
@@ -559,9 +673,9 @@ onMounted(()=>{
 
                     </div>
                     <div class="right-desc">
-                        <div class="bold-title">待排班</div>
+                        <div class="bold-title">月己排班路线</div>
                         <div class="num-wrap" style="color:#16A34A">
-                            186
+                            {{yypblxNum}}
                         </div>
                     </div>
                 </div>
@@ -572,9 +686,9 @@ onMounted(()=>{
 
                         </div>
                         <div class="right-desc">
-                            <div class="bold-title">参与车辆</div>
+                            <div class="bold-title">参与排班车辆</div>
                             <div class="num-wrap" style="color:#9333EA">
-                                42
+                                {{ cyclNum }}
                             </div>
                         </div>
                 </div>
@@ -585,9 +699,9 @@ onMounted(()=>{
 
                         </div>
                         <div class="right-desc">
-                            <div class="bold-title">自动排</div>
+                            <div class="bold-title">自动排班数量</div>
                             <div class="num-wrap" style="color:#CA8A04">
-                                357
+                                {{ yzdTotal }}
                             </div>
                         </div>
                 </div>

+ 79 - 4
src/views/home/index.vue

@@ -60,8 +60,83 @@ let carUseOption = {
 };
 
 import { ref,onMounted } from 'vue'
+import { apisystemdzbcPathlist,apisystemdzbcCarlist,apisystemuserlist,apisystemcommonOtherstatic,apisystemuserresetPwd,apisystemuserDel,apisystemuserAdd,apisystemuserUpdate } from '../../request/api.js'
+let userNum=ref('')
+let carNum=ref('')
+let routeNum=ref('')
+const getTodayOrder=()=>{
+    
+    apisystemcommonOtherstatic({
+   
+        'params[kyzId]':1,
+        key:'order'
+    }).then(res=>{
+    if(res.code==200){
+        routeNum.value=res.total
+        
+    }
+    
+    
+    }).catch(err=>{
+    console.log(err)
+    })
+}
+const getRouteData=()=>{
+  apisystemdzbcPathlist({
+   
+    pageSize:30000,
+    pageNum:1
+  }).then(res=>{
+    if(res.code==200){
+        routeNum.value=res.total
+      
+    }
+    
+    
+  }).catch(err=>{
+    console.log(err)
+  })
+}
+const getuserData=()=>{
+  
+  apisystemuserlist({
+    
+    'params[roleNames]':'定制班车用户',
+    
+    pageSize:30000,
+    pageNum:1
+  }).then(res=>{
+    if(res.code==200){
+        userNum.value=res.total
+    }
+    
+    
+  }).catch(err=>{
+    console.log(err)
+  })
+}
+
+const getCarData=()=>{
+  apisystemdzbcCarlist({
+    
+    pageSize:30000,
+    pageNum:1
+  }).then(res=>{
+    if(res.code==200){
+        carNum.value=res.total
+    }
+    
+    
+  }).catch(err=>{
+    console.log(err)
+  })
+}
 
 onMounted(()=>{
+    getuserData()
+    getCarData()
+    getRouteData()
+    getTodayOrder()
     let orderWrapDom=document.getElementById('order-wrap')
     let orderWrapChart=window.echarts.init(orderWrapDom)
     orderWrapChart.setOption(orderWrapOption)
@@ -92,7 +167,7 @@ onMounted(()=>{
                     <div class="right-desc">
                         <div class="bold-title">总用户数</div>
                         <div class="num-wrap" style="color:#2563EB">
-                            2458
+                            {{ userNum }}
                         </div>
                     </div>
                    </div>
@@ -107,7 +182,7 @@ onMounted(()=>{
                     <div class="right-desc">
                         <div class="bold-title">车辆总数</div>
                         <div class="num-wrap" style="color:#16A34A">
-                            186
+                            {{ carNum }}
                         </div>
                     </div>
                    </div>
@@ -122,7 +197,7 @@ onMounted(()=>{
                         <div class="right-desc">
                             <div class="bold-title">路线总数</div>
                             <div class="num-wrap" style="color:#9333EA">
-                                42
+                                {{ routeNum }}
                             </div>
                         </div>
                     </div>
@@ -156,7 +231,7 @@ onMounted(()=>{
             </div>
             <div class="chart-item">
                 <el-card style="width: 97%">
-                    <div class="common-title">车辆使用率</div>
+                    <div class="common-title">车辆使用率</div>
                     <div class="common-chart-wrap" id="caruse-wrap"></div>
 
                 </el-card>

+ 6 - 6
src/views/orderman/index.vue

@@ -262,22 +262,22 @@ onMounted(()=>{
                   
                         <el-table-column prop="status" label="支付状态">
                           <template #default="scope">
-                           <div v-if="scope.row.status==0" style="background:#FEF9C3;width:94px;height:32px;border-radius:9999px;display:flex;align-items: center;justify-content: center;">
+                           <div v-if="scope.row.status==0" style="color:#409EFF;">
                            待支付
                            </div>
-                           <div v-if="scope.row.status==1" style="background:#DCFCE7;width:94px;height:32px;border-radius:9999px;display:flex;align-items: center;justify-content: center;">
+                           <div v-if="scope.row.status==1" style="color:#67C23A;">
                            已支付
                            </div>
-                           <div v-if="scope.row.status==2" style="color:#854D0E;background:#FEE2E2;width:94px;height:32px;border-radius:9999px;display:flex;align-items: center;justify-content: center;">
+                           <div v-if="scope.row.status==2" style="color:#E6A23C;">
                            取消待退款
                            </div>
-                           <div v-if="scope.row.status==3" style="background:#8DFD4C;width:94px;height:32px;border-radius:9999px;display:flex;align-items: center;justify-content: center;">
+                           <div v-if="scope.row.status==3" style="color:#409EFF;">
                            已转商户
                            </div>
-                           <div v-if="scope.row.status==4" style="background:#f5f5f5;width:94px;height:32px;border-radius:9999px;display:flex;align-items: center;justify-content: center;">
+                           <div v-if="scope.row.status==4" style="color:#F56C6C;">
                            已退款
                            </div>
-                           <div v-if="scope.row.status==5" style="background:red;width:94px;height:32px;border-radius:9999px;display:flex;align-items: center;justify-content: center;">
+                           <div v-if="scope.row.status==5" style="color:#909399;">
                            已关闭
                            </div>