Răsfoiți Sursa

研报5.1 bug修复

hbchen 2 ani în urmă
părinte
comite
7c58784068
1 a modificat fișierele cu 22 adăugiri și 5 ștergeri
  1. 22 5
      pages-question/answerList.vue

+ 22 - 5
pages-question/answerList.vue

@@ -164,16 +164,33 @@ export default {
     },
     //点击bar
     changeBar({ key }) {
-      if (key === this.selectKey) return;
-      this.selectKey = key;
-      this.questionList = [];
-      this.page = 1;
+		if (key === this.selectKey) return;
+		this.selectKey = key;
+		this.questionList = [];
+		this.page = 1;
+		// 重新获取数量
+		apiBarTotal().then(res=>{
+		  if(res.code == 200){
+			  const { replied, wait, total,distribute } = res.data;
+			  for (const bar of this.barList) {
+				if(bar.label == '已回答'){
+				  bar.num = replied
+				}else if(bar.label == '未回答'){
+				  bar.num = wait
+				}else if(bar.label == '全部'){
+				  bar.num = total
+				}else if(bar.label == '待回答'){
+				  bar.num = distribute
+				}
+			  }
+		  }
+		});
       this.resetAudio();
       this.getQuestionData();
     },
     getSelectKey() {
       if(this.userInfo.is_inner === 1){
-        this.selectKey = 'Wait'
+        this.selectKey = 'Distribute'
       }else{
         this.selectKey = 'Replied'
       }