diff --git a/templates/repo/debugjob/index.tmpl b/templates/repo/debugjob/index.tmpl
index 043816e9f..5381602b9 100755
--- a/templates/repo/debugjob/index.tmpl
+++ b/templates/repo/debugjob/index.tmpl
@@ -427,6 +427,7 @@
{{if .CanDebug}}
{{$.i18n.Tr "repo.submit_image"}}
{{else}}
私有
公开
-
-
+
+
-
-
+
+
-
-
+
+
@@ -473,6 +473,7 @@ export default {
tableDataCustom: [],
starCustom:[],
loadingCustom:false,
+ refreshCustomTimer: null,
currentPageStar:1,
pageSizeStar:10,
@@ -485,6 +486,7 @@ export default {
methods: {
handleClick(tab, event) {
this.search = ''
+ this.stopImageListCustomRefresh();
if(tab.name=="first"){
this.paramsPublic.q = ''
this.getImageListPublic()
@@ -560,9 +562,31 @@ export default {
});
this.loadingCustom = false
+ this.getImageListCustomRefresh()
})
},
+ getImageListCustomRefresh() {
+ this.stopImageListCustomRefresh();
+ this.refreshCustomTimer = setInterval(() => {
+ this.tableDataCustom.forEach(item => {
+ if (item.status === 0) {
+ this.$axios.get(`/image/${item.id}`, {}).then((res) => {
+ const newData = res.data;
+ this.tableDataCustom.forEach(it => {
+ if (it.id === newData.id) {
+ it.status = newData.status;
+ }
+ });
+ })
+ }
+ });
+ }, 5000);
+ },
+
+ stopImageListCustomRefresh() {
+ this.refreshCustomTimer && clearInterval(this.refreshCustomTimer);
+ },
getImageListStar(){
this.loadingStar = true
this.$axios.get('/explore/images/star',{
@@ -715,8 +739,10 @@ export default {
else{
this.getImageListPublic()
}
+ },
+ beforeDestroy() {
+ this.stopImageListCustomRefresh();
}
-
};