浏览代码

司机管理优化

wsp 1 年之前
父节点
当前提交
41f9d47faf

+ 3 - 3
src/request/api.js

@@ -22,7 +22,7 @@ export const  apisystemdzbcArealist = query => {
     return service({
     return service({
         url: '/api/system/dzbcArea/list',
         url: '/api/system/dzbcArea/list',
         method: 'GET',
         method: 'GET',
-		data:query
+		params:query
     });
     });
 };
 };
 
 
@@ -70,7 +70,7 @@ export const  apisystemdzbcSitelist = query => {
     return service({
     return service({
         url: '/api/system/dzbcSite/list',
         url: '/api/system/dzbcSite/list',
         method: 'GET',
         method: 'GET',
-		data:query
+		params:query
     });
     });
 };
 };
 
 
@@ -118,7 +118,7 @@ export const  apisystemdzbcCarlist = query => {
     return service({
     return service({
         url: '/api/system/dzbcCar/list',
         url: '/api/system/dzbcCar/list',
         method: 'GET',
         method: 'GET',
-		data:query
+		params:query
     });
     });
 };
 };
 
 

+ 2 - 0
src/request/index.ts

@@ -66,6 +66,8 @@ service.interceptors.response.use(
           type: 'error',
           type: 'error',
           duration: 5 * 1000
           duration: 5 * 1000
         });
         });
+        
+        
         break;
         break;
     }
     }
     return res
     return res

+ 10 - 6
src/views/areaman/index.vue

@@ -85,7 +85,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
 
 
 import { ref,onMounted,reactive } from 'vue'
 import { ref,onMounted,reactive } from 'vue'
 import { Search,Download,Tools,Plus,Check,Close } from "@element-plus/icons-vue";
 import { Search,Download,Tools,Plus,Check,Close } from "@element-plus/icons-vue";
-let searchWord=ref('')
+let name=ref('')
 let total=ref(0)
 let total=ref(0)
 let pageNum=ref(1)
 let pageNum=ref(1)
 let dialogVisible=ref(false)
 let dialogVisible=ref(false)
@@ -134,8 +134,14 @@ const downExcell=()=>{
     console.log(err)
     console.log(err)
   })
   })
 }
 }
+const searchClick=()=>{
+  pageNum.value=1
+  getTableData()
+
+}
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemdzbcArealist({
   apisystemdzbcArealist({
+    name:name.value,
     pageSize:10,
     pageSize:10,
     pageNum:pageNum.value
     pageNum:pageNum.value
   }).then(res=>{
   }).then(res=>{
@@ -209,17 +215,15 @@ onMounted(()=>{
                     <div class="common-search-box">
                     <div class="common-search-box">
                       <div class="left-part">
                       <div class="left-part">
                         <el-input
                         <el-input
-                          v-model="searchWord"
+                          v-model="name"
                          
                          
                           placeholder="搜索区域名称..."
                           placeholder="搜索区域名称..."
                           style="width:260px"
                           style="width:260px"
                         >
                         >
                         
                         
-                          <template #append>
-                            <el-button :icon="Search" />
-                          </template>
+                         
                         </el-input>
                         </el-input>
-                        <!-- <el-button style="margin-left:10px">筛选</el-button> -->
+                        <el-button @click="searchClick" style="margin-left:10px">筛选</el-button>
                       </div>
                       </div>
                       <div class="right-part">
                       <div class="right-part">
                       
                       

+ 5 - 0
src/views/bannerman/index.vue

@@ -157,6 +157,11 @@ const downExcell=()=>{
     console.log(err)
     console.log(err)
   })
   })
 }
 }
+const searchClick=()=>{
+  pageNum.value=1
+  getTableData()
+
+}
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemdzbcBannerlist({
   apisystemdzbcBannerlist({
     pageSize:5,
     pageSize:5,

+ 59 - 15
src/views/carman/index.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
 <script setup lang="ts">
-import { apisystemdzbcCarlist,apisystemdzbcCarexport,apisystemdzbcCarDel,apisystemdzbcCarAdd,apisystemdzbcCarUpdate } from '../../request/api.js'
+import { apisystemuserlist,apisystemdzbcCarlist,apisystemdzbcCarexport,apisystemdzbcCarDel,apisystemdzbcCarAdd,apisystemdzbcCarUpdate } from '../../request/api.js'
 import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
 import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
 import { ElMessage } from 'element-plus'
 import { ElMessage } from 'element-plus'
 interface RuleForm {
 interface RuleForm {
@@ -86,7 +86,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
 
 
 import { ref,onMounted,reactive } from 'vue'
 import { ref,onMounted,reactive } from 'vue'
 import { Search,Download,Tools,Plus,Check,Close } from "@element-plus/icons-vue";
 import { Search,Download,Tools,Plus,Check,Close } from "@element-plus/icons-vue";
-let searchWord=ref('')
+let carNum=ref('')
 let total=ref(0)
 let total=ref(0)
 let pageNum=ref(1)
 let pageNum=ref(1)
 let dialogVisible=ref(false)
 let dialogVisible=ref(false)
@@ -136,14 +136,34 @@ const downExcell=()=>{
     console.log(err)
     console.log(err)
   })
   })
 }
 }
+const searchClick=()=>{
+  pageNum.value=1
+  getTableData()
+
+}
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemdzbcCarlist({
   apisystemdzbcCarlist({
+    carNum:carNum.value,
     pageSize:10,
     pageSize:10,
     pageNum:pageNum.value
     pageNum:pageNum.value
   }).then(res=>{
   }).then(res=>{
     if(res.code==200){
     if(res.code==200){
       total.value=res.total
       total.value=res.total
-      tableData.value=res.rows
+      tableData.value=res.rows.map(item=>{
+        let data=sijiList.value.filter(siji=>{
+          return item.driverId==siji.userId
+          
+        })[0]
+
+       
+
+        if(data){
+          item.nickName=data.nickName
+        }
+
+        return item
+        
+      })
     }
     }
     loading.value=false
     loading.value=false
     
     
@@ -164,9 +184,23 @@ const deleteItem=(id)=>{
     console.log(err)
     console.log(err)
   })
   })
 }
 }
-
+let sijiList=ref([])
 onMounted(()=>{
 onMounted(()=>{
-  getTableData()
+ 
+  apisystemuserlist({
+    roleId:'1763484881548447746',
+    pageNum:1
+  }).then(res=>{
+    if(res.code==200){
+      
+      sijiList.value=res.rows
+      getTableData()
+    }
+   
+    
+  }).catch(err=>{
+    console.log(err)
+  })
 })
 })
 
 
 
 
@@ -192,7 +226,7 @@ onMounted(()=>{
                     <div class="common-search-box">
                     <div class="common-search-box">
                       <div class="left-part">
                       <div class="left-part">
                         <el-input
                         <el-input
-                          v-model="searchWord"
+                          v-model="carNum"
                          
                          
                           placeholder="搜索车牌号..."
                           placeholder="搜索车牌号..."
                           style="width:260px"
                           style="width:260px"
@@ -205,9 +239,7 @@ onMounted(()=>{
                        
                        
                       </div>
                       </div>
                       <div class="right-part">
                       <div class="right-part">
-                      
-                        
-                        <el-button :icon="Tools">筛选</el-button>
+                        <!-- <el-button :icon="Tools">筛选</el-button> -->
                         <el-button :loading="excellloading" @click="downExcell" :icon="Download">{{ excellloading?'正在导出':'导出' }}</el-button>
                         <el-button :loading="excellloading" @click="downExcell" :icon="Download">{{ excellloading?'正在导出':'导出' }}</el-button>
                       </div>
                       </div>
                     </div>
                     </div>
@@ -225,11 +257,11 @@ onMounted(()=>{
                         <el-table-column prop="driverId" label="司机">
                         <el-table-column prop="driverId" label="司机">
                           <template #default="scope">
                           <template #default="scope">
                           <div class="table-user-wrap">
                           <div class="table-user-wrap">
-                            <div class="left-part">
+                            <!-- <div class="left-part">
 
 
-                            </div>
+                            </div> -->
                             <div class="right-part">
                             <div class="right-part">
-                              <div style="color:#000"></div>
+                              <div style="color:#000">{{ scope.row.nickName }}</div>
                               <div style="color: #6B7280;">ID:{{ scope.row.driverId }}</div>
                               <div style="color: #6B7280;">ID:{{ scope.row.driverId }}</div>
                             </div>
                             </div>
                           </div>
                           </div>
@@ -239,8 +271,6 @@ onMounted(()=>{
                         <el-table-column prop="gps" label="GPS设备">
                         <el-table-column prop="gps" label="GPS设备">
                         
                         
                         </el-table-column>
                         </el-table-column>
-                       
-                        <el-table-column prop="date" label="创建时间" />
                         <el-table-column fixed="right" label="操作" min-width="120">
                         <el-table-column fixed="right" label="操作" min-width="120">
                           <template #default="scope">
                           <template #default="scope">
                             <el-button link type="primary" @click="addItem(scope.row)" size="small">
                             <el-button link type="primary" @click="addItem(scope.row)" size="small">
@@ -308,10 +338,24 @@ onMounted(()=>{
                 <el-input placeholder="GPS设备序列号" v-model="ruleForm.gps" />
                 <el-input placeholder="GPS设备序列号" v-model="ruleForm.gps" />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
+
+            
            
            
             <el-col :span="12">
             <el-col :span="12">
               <el-form-item label="司机">
               <el-form-item label="司机">
-                <el-input placeholder="司机" v-model="ruleForm.driverId" />
+                
+                <el-select
+                 placeholder="司机" v-model="ruleForm.driverId"
+                  
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in sijiList"
+                    :key="item.nickName"
+                    :label="item.nickName"
+                    :value="item.userId"
+                  />
+                </el-select>
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :span="12">
             <el-col :span="12">

+ 5 - 0
src/views/carplanman/index.vue

@@ -158,6 +158,11 @@ const downExcell=()=>{
     console.log(err)
     console.log(err)
   })
   })
 }
 }
+const searchClick=()=>{
+  pageNum.value=1
+  getTableData()
+
+}
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemdzbcPathSchedulinglist({
   apisystemdzbcPathSchedulinglist({
     pageSize:10,
     pageSize:10,

+ 5 - 0
src/views/orderman/index.vue

@@ -139,6 +139,11 @@ const downExcell=()=>{
     console.log(err)
     console.log(err)
   })
   })
 }
 }
+const searchClick=()=>{
+  pageNum.value=1
+  getTableData()
+
+}
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemdzbcOrderlist({
   apisystemdzbcOrderlist({
     pageSize:10,
     pageSize:10,

+ 5 - 0
src/views/passengerstation/index.vue

@@ -143,6 +143,11 @@ const downExcell=()=>{
     console.log(err)
     console.log(err)
   })
   })
 }
 }
+const searchClick=()=>{
+  pageNum.value=1
+  getTableData()
+
+}
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemdzbcKyzlist({
   apisystemdzbcKyzlist({
     pageSize:10,
     pageSize:10,

+ 5 - 0
src/views/roleman/index.vue

@@ -139,6 +139,11 @@ const downExcell=()=>{
     console.log(err)
     console.log(err)
   })
   })
 }
 }
+const searchClick=()=>{
+  pageNum.value=1
+  getTableData()
+
+}
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemrolelist({
   apisystemrolelist({
     pageSize:10,
     pageSize:10,

+ 5 - 0
src/views/routeman/index.vue

@@ -139,6 +139,11 @@ const downExcell=()=>{
     console.log(err)
     console.log(err)
   })
   })
 }
 }
+const searchClick=()=>{
+  pageNum.value=1
+  getTableData()
+
+}
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemdzbcPathlist({
   apisystemdzbcPathlist({
     pageSize:10,
     pageSize:10,

+ 12 - 6
src/views/stationman/index.vue

@@ -85,7 +85,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
 
 
 import { ref,onMounted,reactive } from 'vue'
 import { ref,onMounted,reactive } from 'vue'
 import { Search,Download,Tools,Plus,Check,Close } from "@element-plus/icons-vue";
 import { Search,Download,Tools,Plus,Check,Close } from "@element-plus/icons-vue";
-let searchWord=ref('')
+let name=ref('')
 let total=ref(0)
 let total=ref(0)
 let pageNum=ref(1)
 let pageNum=ref(1)
 let dialogVisible=ref(false)
 let dialogVisible=ref(false)
@@ -135,8 +135,14 @@ const downExcell=()=>{
     console.log(err)
     console.log(err)
   })
   })
 }
 }
+const searchClick=()=>{
+  pageNum.value=1
+  getTableData()
+
+}
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemdzbcSitelist({
   apisystemdzbcSitelist({
+    name:name.value,
     pageSize:10,
     pageSize:10,
     pageNum:pageNum.value
     pageNum:pageNum.value
   }).then(res=>{
   }).then(res=>{
@@ -210,20 +216,20 @@ onMounted(()=>{
                     <div class="common-search-box">
                     <div class="common-search-box">
                       <div class="left-part">
                       <div class="left-part">
                         <el-input
                         <el-input
-                          v-model="searchWord"
+                          v-model="name"
                          
                          
                           placeholder="搜索站点..."
                           placeholder="搜索站点..."
                           style="width:260px"
                           style="width:260px"
                         >
                         >
                         
                         
-                          <template #append>
+                          <!-- <template #append>
                             <el-button :icon="Search" />
                             <el-button :icon="Search" />
-                          </template>
+                          </template> -->
                         </el-input>
                         </el-input>
-                        <el-button style="margin-left:10px">筛选</el-button>
+                        <el-button @click="searchClick" style="margin-left:10px">筛选</el-button>
                       </div>
                       </div>
                       <div class="right-part">
                       <div class="right-part">
-                        <el-button :icon="Tools">筛选</el-button>
+                        <!-- <el-button :icon="Tools">筛选</el-button> -->
                         <el-button :loading="excellloading" @click="downExcell" :icon="Download">{{ excellloading?'正在导出':'导出' }}</el-button>
                         <el-button :loading="excellloading" @click="downExcell" :icon="Download">{{ excellloading?'正在导出':'导出' }}</el-button>
                         
                         
                       </div>
                       </div>

+ 12 - 7
src/views/userman/index.vue

@@ -109,7 +109,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
 
 
 import { ref,onMounted,reactive } from 'vue'
 import { ref,onMounted,reactive } from 'vue'
 import { Search,Download,Tools,Plus,Check,Close } from "@element-plus/icons-vue";
 import { Search,Download,Tools,Plus,Check,Close } from "@element-plus/icons-vue";
-let searchWord=ref('')
+let nickName=ref('')
 let total=ref(0)
 let total=ref(0)
 let pageNum=ref(1)
 let pageNum=ref(1)
 let dialogVisible=ref(false)
 let dialogVisible=ref(false)
@@ -154,8 +154,15 @@ const statusChange=val=>{
   })
   })
 }
 }
 
 
+const searchClick=()=>{
+  pageNum.value=1
+  getTableData()
+
+}
+
 const getTableData=()=>{
 const getTableData=()=>{
   apisystemuserlist({
   apisystemuserlist({
+    nickName:nickName.value,
     pageSize:10,
     pageSize:10,
     pageNum:pageNum.value
     pageNum:pageNum.value
   }).then(res=>{
   }).then(res=>{
@@ -251,17 +258,15 @@ onMounted(()=>{
                     <div class="common-search-box">
                     <div class="common-search-box">
                       <div class="left-part">
                       <div class="left-part">
                         <el-input
                         <el-input
-                          v-model="searchWord"
+                          v-model="nickName"
                          
                          
-                          placeholder="搜索用户"
+                          placeholder="用户昵称"
                           style="width:260px"
                           style="width:260px"
                         >
                         >
                         
                         
-                          <template #append>
-                            <el-button :icon="Search" />
-                          </template>
+                         
                         </el-input>
                         </el-input>
-                        <el-button style="margin-left:10px">筛选</el-button>
+                        <el-button @click="searchClick"  style="margin-left:10px">筛选</el-button>
                       </div>
                       </div>
                       <div class="right-part">
                       <div class="right-part">