Commit 64b2e12b authored by Wallen姚文辉's avatar Wallen姚文辉

修复页面变更轮询不停止的bug

parent 095eff5f
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>yinhe_test</title><script defer="defer" src="/js/chunk-vendors.822ae491.js"></script><script defer="defer" src="/js/app.5696f21a.js"></script><link href="/css/chunk-vendors.187ae3e6.css" rel="stylesheet"><link href="/css/app.7091cd70.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but yinhe_test doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html> <!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>yinhe_test</title><script defer="defer" src="/js/chunk-vendors.822ae491.js"></script><script defer="defer" src="/js/app.e1c3fdb4.js"></script><link href="/css/chunk-vendors.187ae3e6.css" rel="stylesheet"><link href="/css/app.7091cd70.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but yinhe_test doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -226,7 +226,8 @@ ...@@ -226,7 +226,8 @@
</template> </template>
<template #abf="{ row, index }"> <template #abf="{ row, index }">
<p> <p>
{{ row.success && row.total ? (parseInt(row.success) / parseInt(row.total) * 100).toFixed(2) + '%' : '' {{ row.success && row.total ? (parseInt(row.success) / parseInt(row.total) * 100).toFixed(2) +
'%' : ''
}} }}
</p> </p>
</template> </template>
...@@ -561,7 +562,8 @@ export default { ...@@ -561,7 +562,8 @@ export default {
priorityMap: {}, priorityMap: {},
typeMap: {}, typeMap: {},
caseCount: 0, caseCount: 0,
fugailu: 0 fugailu: 0,
timeoutFun: [],
} }
}, },
methods: { methods: {
...@@ -598,9 +600,13 @@ export default { ...@@ -598,9 +600,13 @@ export default {
getJenkinsInfo() { getJenkinsInfo() {
this.$request("get", '/tool/testport/runresult', null, this, (data) => { this.$request("get", '/tool/testport/runresult', null, this, (data) => {
this.jenkis_data = data.data; this.jenkis_data = data.data;
setTimeout(() => { const funid = setTimeout(() => {
this.getJenkinsInfo(); this.getJenkinsInfo();
console.info(this.timeoutFun);
const index = this.timeoutFun.findIndex(ele => { return ele == funid });
this.timeoutFun.splice(index, 1);
}, 5000); }, 5000);
this.timeoutFun.push(funid)
}) })
}, },
breforerunjenkins() { breforerunjenkins() {
...@@ -845,6 +851,11 @@ export default { ...@@ -845,6 +851,11 @@ export default {
this.getJenkinsInfo(); this.getJenkinsInfo();
this.myname = JSON.parse(localStorage.getItem("userinfo")).name this.myname = JSON.parse(localStorage.getItem("userinfo")).name
}, },
beforeUnmount() {
this.timeoutFun.forEach(ele => {
clearTimeout(ele)
})
},
mounted() { mounted() {
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment