Jelajahi Sumber

优化排班

lyy 1 tahun lalu
induk
melakukan
1ceefcb73b
1 mengubah file dengan 19 tambahan dan 2 penghapusan
  1. 19 2
      src/views/carplanman/index.vue

+ 19 - 2
src/views/carplanman/index.vue

@@ -262,6 +262,22 @@ const clickRoute=item=>{
   pathId.value=item.id
   searchClick()
 }
+const searchRoute=()=>{
+  apisystemdzbcPathlist({
+    name:searchkey.value
+  }).then(res=>{
+    if(res.code==200){
+    
+      routeListLeft.value=res.rows
+      
+    }
+  
+    
+  }).catch(err=>{
+    console.log(err)
+  })
+}
+let routeListLeft=ref([])
 onMounted(()=>{
   isauto.value=localStorage.getItem('isauto')=='true'?true:false
   
@@ -277,6 +293,7 @@ onMounted(()=>{
         if(res.code==200){
         
           routeList.value=res.rows
+          routeListLeft.value=res.rows
           apisystemdzbcSitelist({
     
           }).then(res=>{
@@ -328,11 +345,11 @@ onMounted(()=>{
                     >
 
                     <template #append>
-                        <el-button :icon="Search" />
+                        <el-button :icon="Search" @click="searchRoute" />
                     </template>
                     </el-input>
                     <div class="common-chart-wrap" id="order-wrap">
-                        <div class="lefttop-card-wrap" v-for="item in routeList" :key="item.id" @click="clickRoute(item)">
+                        <div class="lefttop-card-wrap" v-for="item in routeListLeft" :key="item.id" @click="clickRoute(item)">
                             <div class="left-part">
                                 <div class="title">{{item.name}}</div>
                                 <div class="time">发车时间: {{item.mtime}}</div>