|
@@ -10,6 +10,7 @@ import{
|
|
|
import { apiApplyPermission } from '@/api/user'
|
|
|
import{ref,reactive} from "vue"
|
|
|
import {useStore} from 'vuex'
|
|
|
+import {ElMessageBox} from "element-plus"
|
|
|
import {onBeforeRouteLeave,useRouter} from "vue-router"
|
|
|
import { useElementSize } from '@vueuse/core'
|
|
|
import moment from 'moment';
|
|
@@ -199,11 +200,28 @@ const toApply = (type='')=>{
|
|
|
}
|
|
|
const changeTopTar = (key)=>{
|
|
|
question.selectKey = key
|
|
|
- question.list=[]
|
|
|
- question.page_index=1
|
|
|
// 清除定时器
|
|
|
clearInterval(timer)
|
|
|
// 清除当前播放的音频信息和索引
|
|
|
+ // 重新获取数量
|
|
|
+ apiBarTotal().then(res=>{
|
|
|
+ if(res.code == 200){
|
|
|
+ const { replied, wait, total,distribute } = res.data;
|
|
|
+ for (const bar of question.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
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ question.list=[]
|
|
|
+ question.page_index=1
|
|
|
question.audioPlayingIndex=-1
|
|
|
question.audioPlayingItem = null
|
|
|
question.isTotalData = false
|
|
@@ -227,15 +245,9 @@ const getQuestionList=()=>{
|
|
|
question.isFinish = true
|
|
|
if(res.code == 200){
|
|
|
let arr =res.data || []
|
|
|
- if(params.page_index ==1){
|
|
|
- if(arr.length==0) return
|
|
|
- question.list = arr
|
|
|
- }else{
|
|
|
- if(arr.length==0){
|
|
|
- question.isTotalData = true
|
|
|
- return
|
|
|
- }
|
|
|
- question.list = [...question.list,...arr]
|
|
|
+ question.list = [...question.list,...arr]
|
|
|
+ if(arr.length==0 || arr.length<params.page_size){
|
|
|
+ question.isTotalData = true
|
|
|
}
|
|
|
for (const item of question.list) {
|
|
|
if(!item.audio_status && item.reply_status==3){
|
|
@@ -400,7 +412,7 @@ getBarList()
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="question-noData" v-show="question.list.length==0 && question.isFinish">
|
|
|
+ <div class="question-noData" v-show="question.list.length==0 && !question.isLoading">
|
|
|
<img :src="$store.state.globalImgUrls.activityNoAuth" alt="没有数据">
|
|
|
<span>暂无数据</span>
|
|
|
</div>
|