lyy 1 жил өмнө
parent
commit
c2f0f2745d

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

@@ -319,7 +319,9 @@ const getTableData=()=>{
     carId:carId.value,
     pathId:pathId.value,
     pageSize:viewType.value==1?1000:10,
-    pageNum:pageNum.value
+    pageNum:pageNum.value,
+    'params[mdate]': viewType.value==1?dayjs().format('YYYY-MM-DD'):null
+    
   }).then(res=>{
     if(res.code==200){
       total.value=res.total
@@ -514,8 +516,8 @@ onMounted(()=>{
                             <!-- <el-button size="mini" v-if="viewType==2" style="margin-left:6px;padding:0 2px;" type="primary"  @click="addItem({})">添加排班 </el-button> -->
                         </div>
                         <div class="title-right">
-                            <el-button @click="viewType=1">月视图 </el-button>
-                            <el-button @click="viewType=2">列表视图 </el-button>
+                            <el-button @click="viewType=1;getTableData()">月视图 </el-button>
+                            <el-button @click="viewType=2;getTableData()">列表视图 </el-button>
                         </div>
                     </div>
                     <div class="common-chart-wrap" id="caruse-wrap">