From 3fded48ebb1bd240c1b4c77e7f29d6138d801ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=93=B2=E5=A5=87?= <13840175730@139.com> Date: Fri, 13 Sep 2024 17:25:43 +0800 Subject: [PATCH] =?UTF-8?q?1.web=E7=AB=AF=E5=A2=9E=E5=8A=A0=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E9=A1=B5=E9=9D=A2=E6=98=BE=E7=A4=BA=E7=9B=B4=E8=A7=82?= =?UTF-8?q?=E5=9B=BE=E5=92=8C=E7=9C=8B=E6=9D=BF=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/jhzx/symxCX.vue | 2 +- src/views/kban/comps/GxChanLiang.vue | 9 +++++-- src/views/kban/comps/MainChanLian.vue | 9 ++++--- src/views/kban/comps/MainCq.vue | 9 ++++--- src/views/kban/comps/MainGeYueChanLiang.vue | 9 ++++--- src/views/kban/comps/MainYueChanLiang.vue | 10 ++++--- src/views/kban/index.vue | 29 ++++++++++++++++----- src/views/sjfx/pssjFX.vue | 7 ++--- src/views/sjfx/sygdFX.vue | 17 ++++++++---- src/views/tp/czfdzgtcx.vue | 2 +- 10 files changed, 69 insertions(+), 34 deletions(-) diff --git a/src/views/jhzx/symxCX.vue b/src/views/jhzx/symxCX.vue index 4996eb1..0d30fa3 100644 --- a/src/views/jhzx/symxCX.vue +++ b/src/views/jhzx/symxCX.vue @@ -3025,7 +3025,7 @@ export default { getCzxx({}).then(res => { this.dictData = res.data }) - this.queryParam.beginTime = XEUtils.toDateString(XEUtils.getWhatMonth(new Date(), 1, 'first'),'yyyy/MM/dd') + this.queryParam.beginTime = XEUtils.toDateString(XEUtils.getWhatMonth(new Date(), 0, 'first'),'yyyy/MM/dd') }, //初始化表1 数据 initList() { diff --git a/src/views/kban/comps/GxChanLiang.vue b/src/views/kban/comps/GxChanLiang.vue index 75e6301..cdb7f19 100644 --- a/src/views/kban/comps/GxChanLiang.vue +++ b/src/views/kban/comps/GxChanLiang.vue @@ -31,12 +31,13 @@ export default { data(){ return { show:false, - cards:[] + cards:[], + delay:null, } }, mounted () { this.getData() - setInterval(this.getData, 30000) + this.delay=setInterval(this.getData, 30000) }, methods: { async getData() { @@ -46,6 +47,10 @@ export default { this.cards = [上料, 抛丸, 理料, 划线, 切割] this.show = true }, + clear(){ + console.log("本月计划完成情况停止加载数据") + clearInterval(this.delay) + }, createData (list) { const data={ "上料": { diff --git a/src/views/kban/comps/MainChanLian.vue b/src/views/kban/comps/MainChanLian.vue index 2de0918..8b49ce5 100644 --- a/src/views/kban/comps/MainChanLian.vue +++ b/src/views/kban/comps/MainChanLian.vue @@ -21,7 +21,8 @@ export default { }, ], rowNum: 9 - } + }, + delay:null } }, mounted() { @@ -30,6 +31,7 @@ export default { }, created(){ this.getData(); + this.delay=setInterval(this.getData,30000) }, sockets:{}, methods:{ @@ -46,11 +48,10 @@ export default { this.config.data=data this.config.rowNum=total this.show=true - this.execute() }) }, - execute(){ - setTimeout(this.getData,30000) + clear(){ + clearInterval(this.delay) } } } diff --git a/src/views/kban/comps/MainCq.vue b/src/views/kban/comps/MainCq.vue index 1c51504..6fe90ba 100644 --- a/src/views/kban/comps/MainCq.vue +++ b/src/views/kban/comps/MainCq.vue @@ -26,7 +26,8 @@ export default { digitalFlopStyle: { fontSize: 20 } - } + }, + delay:null, } }, mounted() { @@ -35,6 +36,7 @@ export default { }, created(){ this.getData(); + this.delay=setInterval(this.getData,30000) }, sockets:{}, methods:{ @@ -50,11 +52,10 @@ export default { }) this.config.data=data this.show=true - this.execute() }) }, - execute(){ - setTimeout(this.getData,30000) + clear(){ + clearInterval(this.delay) } } } diff --git a/src/views/kban/comps/MainGeYueChanLiang.vue b/src/views/kban/comps/MainGeYueChanLiang.vue index d22e30b..b5faea5 100644 --- a/src/views/kban/comps/MainGeYueChanLiang.vue +++ b/src/views/kban/comps/MainGeYueChanLiang.vue @@ -21,7 +21,8 @@ export default { value: 71 }, ], - } + }, + delay:null, } }, mounted() { @@ -30,6 +31,7 @@ export default { }, created(){ this.getData(); + this.delay=setInterval(this.getData,30000) }, sockets:{}, methods:{ @@ -42,11 +44,10 @@ export default { } this.config.data=data this.show=true - this.execute() }) }, - execute(){ - setTimeout(this.getData,30000) + clear(){ + clearInterval(this.delay) } } } diff --git a/src/views/kban/comps/MainYueChanLiang.vue b/src/views/kban/comps/MainYueChanLiang.vue index 0dcd0f0..18755f7 100644 --- a/src/views/kban/comps/MainYueChanLiang.vue +++ b/src/views/kban/comps/MainYueChanLiang.vue @@ -24,7 +24,8 @@ export default { shape: 'round', waveHeight: 25, waveNum: 2 - } + }, + delay:null, } }, mounted() { @@ -33,6 +34,7 @@ export default { }, created(){ this.getData(); + this.delay=setInterval(this.getData,30000) }, sockets:{}, methods:{ @@ -49,11 +51,11 @@ export default { const point=(this.dun/total*100).toFixed(2) this.config.data=[point] this.show=true - this.execute() }) }, - execute(){ - setTimeout(this.getData,30000) + clear(){ + console.log("本月计划完成情况停止加载数据") + clearInterval(this.delay) } } } diff --git a/src/views/kban/index.vue b/src/views/kban/index.vue index 7d86e84..6f56326 100644 --- a/src/views/kban/index.vue +++ b/src/views/kban/index.vue @@ -5,17 +5,17 @@