diff --git a/src/components/EditSites.vue b/src/components/EditSites.vue index cce6137..15f25bb 100644 --- a/src/components/EditSites.vue +++ b/src/components/EditSites.vue @@ -6,7 +6,7 @@ 新增 导出 导入 - 检测 + 检测{{ this.checkAllSitesLoading ? this.checkProgress + '/' + this.sites.length : '' }} 重置
@@ -150,6 +150,7 @@ export default { batchIsActive: 1, multipleSelection: [], checkAllSitesLoading: false, + checkProgress: 0, stopFlag: false, editOldkey: '' } @@ -442,6 +443,7 @@ export default { async checkAllSite () { this.checkAllSitesLoading = true this.stopFlag = false + this.checkProgress = 0 const uncheckedList = this.sites.filter(e => e.status === undefined || e.status === ' ') // 未检测过的优先 const other = this.sites.filter(e => !uncheckedList.includes(e)) await Promise.all(uncheckedList.map(site => this.checkSingleSite(site))) @@ -452,8 +454,12 @@ export default { }, async checkSingleSite (row) { row.status = ' ' - if (this.stopFlag) return row.status + if (this.stopFlag) { + this.checkProgress += 1 + return row.status + } const flag = await zy.check(row.key) + this.checkProgress += 1 if (flag) { row.status = '可用' } else { diff --git a/src/components/IPTV.vue b/src/components/IPTV.vue index 169d2e6..413e381 100644 --- a/src/components/IPTV.vue +++ b/src/components/IPTV.vue @@ -4,7 +4,7 @@ 导出 导入 - 检测 + 检测{{ this.checkAllChannelsLoading ? this.checkProgress + '/' + this.iptvList.length : '' }} 重置
@@ -121,6 +121,7 @@ export default { batchIsActive: 1, multipleSelection: [], checkAllChannelsLoading: false, + checkProgress: 0, stopFlag: false, show: { search: false @@ -427,6 +428,7 @@ export default { async checkAllChannels () { this.checkAllChannelsLoading = true this.stopFlag = false + this.checkProgress = 0 const uncheckedList = this.iptvList.filter(e => e.status === undefined || e.status === ' ') // 未检测过的优先 const other = this.iptvList.filter(e => !uncheckedList.includes(e)) await this.checkChannelList(uncheckedList) @@ -455,8 +457,12 @@ export default { }, async checkSingleChannel (row) { row.status = ' ' - if (this.stopFlag) return row.status + if (this.stopFlag) { + this.checkProgress += 1 + return row.status + } const flag = await zy.checkChannel(row.url) + this.checkProgress += 1 if (flag) { row.status = '可用' } else {