|
@@ -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'
|
|
|
}
|