Browse Source

fix:分类切换数据更新

chenlei 6 days ago
parent
commit
ae11bec8a6
1 changed files with 6 additions and 3 deletions
  1. 6 3
      src/views/chartETA/List.vue

+ 6 - 3
src/views/chartETA/List.vue

@@ -364,14 +364,14 @@ const listState = reactive({
     IsShowMe:false
 })
 //获取图表列表
-async function getChartList( IsSelected ){
+async function getChartList(){
     const {pageSize,cid,page,IsShowMe} = listState
     const res = await apiChart.pubChartList({
         PageSize: pageSize,
         CurrentIndex: page,
         ChartClassifyId: cid,
         IsShowMe,
-        IsSelected
+        IsSelected:category.value
     })
     if(res.Ret!==200) return 
     const arr = res.Data?res.Data.List:[]
@@ -400,7 +400,10 @@ function onLoad(){
 
 function onClickTab() {
     getCatalogList(category.value)
-    getChartList(category.value)
+    listState.list=[]
+    listState.page=1
+    listState.finished = true 
+    getChartList()
 }
 
 getCatalogList()