ソースを参照

Merge branch 'master' of http://git.xt.wenhq.top:8083/wenhongquan/khy_dzbc_ui

lyy 1 年間 前
コミット
84b221ef13

+ 1 - 1
index.html

@@ -4,7 +4,7 @@
     <meta charset="UTF-8">
     <link rel="icon" href="/favicon.ico">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>车辆调度管理系统</title>
+    <title>定制班车管理系统</title>
   </head>
   <body>
     <div id="app"></div>

BIN
src/assets/icons/clzs.png


BIN
src/assets/icons/jrdd.png


BIN
src/assets/icons/lxzs.png


BIN
src/assets/icons/zyhs.png


+ 30 - 5
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 => {
@@ -244,7 +269,7 @@ export const apisystemdzbcOrderUpdate = query => {
 
 
 
-//查询定制班车-客运列表https://khy.xiaole.vip/api/system/dzbcKyz/list
+//查询定制班车-客运公司列表https://khy.xiaole.vip/api/system/dzbcKyz/list
 
 export const  apisystemdzbcKyzlist = query => {
     return service({
@@ -254,7 +279,7 @@ export const  apisystemdzbcKyzlist = query => {
     });
 };
 
-//导出定制班车-客运列表https://khy.xiaole.vip/api/system/dzbcKyz/export
+//导出定制班车-客运公司列表https://khy.xiaole.vip/api/system/dzbcKyz/export
 export const  apisystemdzbcKyzexport = query => {
     return service({
         url: '/api/system/dzbcKyz/export',
@@ -264,7 +289,7 @@ export const  apisystemdzbcKyzexport = query => {
     });
 };
 
-//新增定制班车-客运https://khy.xiaole.vip/api/system/dzbcKyz
+//新增定制班车-客运公司https://khy.xiaole.vip/api/system/dzbcKyz
 export const  apisystemdzbcKyzAdd = query => {
     return service({
         url: `/api/system/dzbcKyz`,
@@ -273,7 +298,7 @@ export const  apisystemdzbcKyzAdd = query => {
     });
 };
 
-//删除定制班车-客运https://khy.xiaole.vip/api/system/dzbcKyz/{ids}
+//删除定制班车-客运公司https://khy.xiaole.vip/api/system/dzbcKyz/{ids}
 export const  apisystemdzbcKyzDel = query => {
     return service({
         url: `/api/system/dzbcKyz/${query.id}`,
@@ -281,7 +306,7 @@ export const  apisystemdzbcKyzDel = query => {
     });
 };
 
-//修改定制班车-客运https://khy.xiaole.vip/api/system/dzbcKyz
+//修改定制班车-客运公司https://khy.xiaole.vip/api/system/dzbcKyz
 export const apisystemdzbcKyzUpdate = query => {
     return service({
         url: `/api/system/dzbcKyz`,

+ 3 - 3
src/views/HomeView.vue

@@ -49,7 +49,7 @@ let filterName=computed(()=>{
       res='订单管理'
       break;
     case '/passengerstation':
-      res='客运管理'
+      res='客运公司管理'
       break;
     case '/roleman':
       res='角色管理'
@@ -106,7 +106,7 @@ watch(() => route, (newRoute, oldRoute) => {
           placeholder="搜索菜单..."
           :suffix-icon="Search"
         /> -->
-        车辆调度管理系统
+        定制班车管理系统
         </div>
         <el-menu
        
@@ -187,7 +187,7 @@ watch(() => route, (newRoute, oldRoute) => {
           <div class="ima-icon">
             <img style="width:12px;height:auto" src="../../public/imgs/orderman.png" alt="">
           </div>
-          <span style="flex:1">客运管理</span>
+          <span style="flex:1">客运公司管理</span>
           <div class="next-img">
             <el-icon><ArrowRightBold /></el-icon>
           </div>

+ 5 - 41
src/views/areaman/index.vue

@@ -147,21 +147,7 @@ const getTableData=()=>{
   }).then(res=>{
     if(res.code==200){
       total.value=res.total
-      tableData.value=res.rows.map(item=>{
-        let data=passengerstation.value.filter(kyz=>{
-          return item.kyzId==kyz.id
-          
-        })[0]
-
-       
-
-        if(data){
-          item.kyzName=data.name
-        }
-
-        return item
-        
-      })
+      tableData.value=res.rows
     }
     loading.value=false
     
@@ -184,13 +170,8 @@ const deleteItem=(id)=>{
 }
 let passengerstation=ref([])
 onMounted(()=>{
- 
-  apisystemdzbcKyzlist({}).then((res:any)=>{
-    passengerstation.value=res.rows
-    getTableData()
-  }).catch((err:any)=>{
-    console.log(err)
-  })
+  getTableData()
+  
 })
 
 
@@ -240,7 +221,7 @@ onMounted(()=>{
                         
                         </el-table-column>
                        
-                        <el-table-column prop="kyzName" label="所属客运站" />
+                        
                         <el-table-column prop="remark" label="备注" />
                         <el-table-column fixed="right" label="操作" min-width="120">
                           <template #default="scope">
@@ -305,24 +286,7 @@ onMounted(()=>{
             </el-col>
            
            
-            <el-col :span="12">
-              <el-form-item label="所属客运站">
-                <el-select
-                  v-model="ruleForm.kyzId"
-                  placeholder="所属客运站"
-                  
-                  style="width: 100%"
-                >
-                  <el-option
-                    v-for="item in passengerstation"
-                    :key="item.value"
-                    :label="item.name"
-                    :value="item.id"
-                  />
-                </el-select>
-               
-              </el-form-item>
-            </el-col>
+           
             <el-col :span="24">
               <el-form-item label="经纬度">
                 <el-input placeholder="经纬度" v-model="ruleForm.location" />

+ 42 - 3
src/views/carman/index.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import { apisystemuserlist,apisystemdzbcCarlist,apisystemdzbcCarexport,apisystemdzbcCarDel,apisystemdzbcCarAdd,apisystemdzbcCarUpdate } from '../../request/api.js'
+import { apisystemdzbcKyzlist,apisystemuserlist,apisystemdzbcCarlist,apisystemdzbcCarexport,apisystemdzbcCarDel,apisystemdzbcCarAdd,apisystemdzbcCarUpdate } from '../../request/api.js'
 import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
 import { ElMessage } from 'element-plus'
 interface RuleForm {
@@ -161,6 +161,21 @@ const getTableData=()=>{
           item.nickName=data.nickName
         }
 
+
+        let kyzdata=kyzList.value.filter(kyz=>{
+          return item.kyzId==kyz.id
+          
+        })[0]
+
+       
+
+        if(kyzdata){
+          item.kyzName=kyzdata.name
+        }
+
+
+
+
         return item
         
       })
@@ -185,6 +200,7 @@ const deleteItem=(id)=>{
   })
 }
 let sijiList=ref([])
+let kyzList=ref([])
 onMounted(()=>{
  
   apisystemuserlist({
@@ -194,6 +210,12 @@ onMounted(()=>{
     if(res.code==200){
       
       sijiList.value=res.rows
+      apisystemdzbcKyzlist({}).then((res:any)=>{
+        kyzList.value=res.rows
+        
+      }).catch((err:any)=>{
+        console.log(err)
+      })
       getTableData()
     }
    
@@ -247,7 +269,7 @@ onMounted(()=>{
                     <el-table element-loading-text='加载中' header-row-class-name="reset-gray-head" :data="tableData"  style="width: 100%" v-loading="loading">
                         <el-table-column prop="carNum" label="车牌号" />
                         <el-table-column prop="carZw" label="座位数" />
-                       
+                        <el-table-column prop="kyzName" label="所属客运公司" />
                         <el-table-column prop="driverId" label="司机">
                           <template #default="scope">
                           <div class="table-user-wrap">
@@ -336,7 +358,24 @@ onMounted(()=>{
               </el-form-item>
             </el-col>
 
-            
+             <el-col :span="12">
+              <el-form-item label="所属客运公司">
+                <el-select
+                  v-model="ruleForm.kyzId"
+                  placeholder="所属客运公司"
+                  
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in kyzList"
+                    :key="item.value"
+                    :label="item.name"
+                    :value="item.id"
+                  />
+                </el-select>
+               
+              </el-form-item>
+            </el-col>
            
             <el-col :span="12">
               <el-form-item label="司机">

+ 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>

+ 85 - 10
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)
@@ -77,7 +152,7 @@ onMounted(()=>{
 <template>
     <div>
         <div class="title">
-            欢迎使用车辆调度管理系统
+            欢迎使用定制班车管理系统
         </div>
         <div class="sub-title">
             请从左侧菜单选择要管理的功能模块
@@ -87,12 +162,12 @@ onMounted(()=>{
                 <el-card style="width: 94%">
                    <div class="card-wrap-inner">
                     <div class="left-icon">
-
+                        <img style="height:100%;width:auto" src="../../assets/icons/lxzs.png" alt="">
                     </div>
                     <div class="right-desc">
                         <div class="bold-title">总用户数</div>
                         <div class="num-wrap" style="color:#2563EB">
-                            2458
+                            {{ userNum }}
                         </div>
                     </div>
                    </div>
@@ -102,12 +177,12 @@ onMounted(()=>{
                 <el-card style="width: 94%">
                     <div class="card-wrap-inner">
                     <div class="left-icon">
-
+                        <img style="height:100%;width:auto" src="../../assets/icons/clzs.png" alt="">
                     </div>
                     <div class="right-desc">
                         <div class="bold-title">车辆总数</div>
                         <div class="num-wrap" style="color:#16A34A">
-                            186
+                            {{ carNum }}
                         </div>
                     </div>
                    </div>
@@ -117,12 +192,12 @@ onMounted(()=>{
                 <el-card style="width: 94%">
                     <div class="card-wrap-inner">
                         <div class="left-icon">
-
+                            <img style="height:100%;width:auto" src="../../assets/icons/zyhs.png" alt="">
                         </div>
                         <div class="right-desc">
                             <div class="bold-title">路线总数</div>
                             <div class="num-wrap" style="color:#9333EA">
-                                42
+                                {{ routeNum }}
                             </div>
                         </div>
                     </div>
@@ -132,7 +207,7 @@ onMounted(()=>{
                 <el-card style="width: 94%">
                     <div class="card-wrap-inner">
                         <div class="left-icon">
-
+                            <img style="height:100%;width:auto" src="../../assets/icons/jrdd.png" alt="">
                         </div>
                         <div class="right-desc">
                             <div class="bold-title">今日订单</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>
@@ -188,7 +263,7 @@ onMounted(()=>{
                     margin-right:10px;
                     height:40px;
                     width:40px;
-                    background:red;
+                   
                     border-radius: 50%
                 }
                 .num-wrap{

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

@@ -101,7 +101,7 @@ onMounted(()=>{
     
         <div class="ms-login">
             <div class="right">
-                <div class="ms-title">车辆调度管理系统</div>
+                <div class="ms-title">定制班车管理系统</div>
                 <div style="padding-bottom:20px">
                     请登录以继续使用
                 </div>

+ 16 - 8
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>
                           
@@ -299,10 +299,18 @@ onMounted(()=>{
                           </template>
                         </el-table-column>
                         <el-table-column prop="price" label="单价">
-                         
+                          <template #default="scope">
+                            <div>
+                              {{ scope.row.price/100 }}
+                            </div>
+                          </template>
                         </el-table-column>
                         <el-table-column prop="totalPrice" label="总价">
-                         
+                          <template #default="scope">
+                            <div>
+                              {{ scope.row.totalPrice/100 }}
+                            </div>
+                          </template>
                         </el-table-column>
                         
                     </el-table>

+ 7 - 7
src/views/passengerstation/index.vue

@@ -132,7 +132,7 @@ const downExcell=()=>{
     const link = document.createElement('a');
     link.href = url;
     // 把获得的blob的对象链接赋值给新创建的这个 a 链接
-    link.setAttribute('download', '客运列表.xls'); // 设置下载文件名
+    link.setAttribute('download', '客运公司列表.xls'); // 设置下载文件名
     document.body.appendChild(link);
     // 使用js点击这个链接
     link.click();
@@ -190,14 +190,14 @@ onMounted(()=>{
        <div class="common-top">
         <div class="left-part">
           <div class="title">
-            客运管理
+            客运公司管理
           </div>
           <div class="sub-title">
             
           </div>
         </div>
         <div class="right-part">
-          <el-button type="primary" :icon="Plus" @click="addItem({})">新增客运  </el-button>
+          <el-button type="primary" :icon="Plus" @click="addItem({})">新增客运公司  </el-button>
         </div>
        </div>
 
@@ -207,7 +207,7 @@ onMounted(()=>{
                         <el-input
                           v-model="name"
                          
-                          placeholder="搜索客运..."
+                          placeholder="搜索客运公司..."
                           style="width:260px"
                         >
                         
@@ -226,7 +226,7 @@ onMounted(()=>{
                       </div>
                     </div>
                     <el-table element-loading-text='加载中' header-row-class-name="reset-gray-head" :data="tableData"  style="width: 100%" v-loading="loading">
-                        <el-table-column prop="name" label="客运名称" />
+                        <el-table-column prop="name" label="客运公司名称" />
                         <el-table-column prop="addr" label="地址" />
                        
                         <el-table-column prop="contactName" label="联系人">
@@ -298,8 +298,8 @@ onMounted(()=>{
         >
           <el-row :gutter="20">
             <el-col :span="12">
-              <el-form-item label="客运名称" prop="name">
-                <el-input placeholder="客运名称" v-model="ruleForm.name" />
+              <el-form-item label="客运公司名称" prop="name">
+                <el-input placeholder="客运公司名称" v-model="ruleForm.name" />
               </el-form-item>
             </el-col>
             <el-col :span="12">