Kaynağa Gözat

初始化默认不选中第一个分类

hbchen 7 ay önce
ebeveyn
işleme
2e19af7d5d
1 değiştirilmiş dosya ile 10 ekleme ve 13 silme
  1. 10 13
      src/views/semantics_manage/asr/ASR.vue

+ 10 - 13
src/views/semantics_manage/asr/ASR.vue

@@ -242,10 +242,11 @@
         </div>
       </div>
       <!-- 列表 -->
-      <div class="asr-main-right" v-else v-permission="permissionBtn.semanticPermission.ASR_view">
+      <div class="asr-main-right" v-else v-permission="permissionBtn.semanticPermission.ASR_view" 
+      v-infinite-scroll="handleLoadMore" :infinite-scroll-immediate="true" :infinite-scroll-disabled="articleListRequest.finished">
         <template v-if="articleList && articleList.length>0">
           <div class="file-count">共{{ total }}个文件</div>
-          <div class="file-container" v-infinite-scroll="handleLoadMore" :infinite-scroll-immediate="true">
+          <div class="file-container">
             <div class="file-item" v-for="item in articleList" :key="item.SpeechRecognitionId" @click="switchDetail(item)">
               <div class="file-main">
                 <el-tooltip :content="item.FileName" placement="top" v-tooltipHidable>
@@ -381,7 +382,7 @@ export default {
       authorsList:[],
       tagsList:[],
       articleListRequest:{
-        finished:false,
+        finished:true,
         loading:false
       },
       result:[],
@@ -434,11 +435,10 @@ export default {
       }
     },
     select_node_data(value){
-      if(value){ 
-        if(value.TagId || value.MenuId){
-          // 列表
-          this.getArticleList()
-        }
+      if((!value) || value.TagId || value.MenuId){ 
+        // 列表
+        this.page=1
+        this.getArticleList()
       }
     },
     /* 选中搜索指标 展开目录 选中指标 展示数据 */
@@ -455,6 +455,7 @@ export default {
     this.getTreeData()
     this.getAdminList()
     this.getTransferStatus()
+    this.getArticleList()
   },
   methods: {
     tabChange(tab){
@@ -474,8 +475,6 @@ export default {
       asrInterface.getCatalogueList({ParentId:0}).then(res=>{
         if(res.Ret == 200){
           this.treeData=res.Data || []
-          // 默认选中第一个一级分类
-          this.select_node_key = this.select_node_key||this.treeData[0].UniqueCode
           this.$nextTick(()=>{
             this.$refs.treeRef.setCurrentKey(this.select_node_key);
             this.select_node_data = this.$refs.treeRef.getCurrentNode()
@@ -492,8 +491,6 @@ export default {
       asrInterface.getTagCatalogueList({ParentId:0}).then(res=>{
         if(res.Ret == 200){
           this.tagTreeData=res.Data || []
-          // 默认选中第一个一级分类
-          this.tag_select_node_key = this.tag_select_node_key || this.tagTreeData[0].UniqueCode
           this.$nextTick(()=>{
             this.$refs.tagTreeRef.setCurrentKey(this.tag_select_node_key);
             this.select_node_data = this.$refs.tagTreeRef.getCurrentNode()
@@ -1017,7 +1014,6 @@ export default {
       this.articleParams.createtimeRange=this.filterForm.createtimeRange
       this.articleParams.tags=this.filterForm.tags
       this.search_txt=""
-      this.select_node_data=""
       if(this.leftShowLabel=="目录"){
         this.select_node_key=""
         this.$nextTick(()=>{
@@ -1029,6 +1025,7 @@ export default {
           this.$refs.tagTreeRef.setCurrentKey(null);
         })
       }
+      this.select_node_data=""
       this.getArticleList()
       this.showFilterPopopver=false
     },