From 2aaf035bc907ac3906aac05c82e45a6c2ae56866 Mon Sep 17 00:00:00 2001 From: Vce Date: Wed, 29 May 2024 17:20:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8A=B3=E5=8A=A1=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=8E=AF=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 4 ++-- pages/projectEnd/laborManage/index.vue | 32 +++++++++++++++----------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/main.js b/main.js index 9b8451d9..de572767 100644 --- a/main.js +++ b/main.js @@ -37,11 +37,11 @@ if (process.env.NODE_ENV === 'development') { console.log('开发环境') // Vue.prototype.url_config = 'http://47.93.215.234:9809/' // 鞍钢正式地址(弃用) // Vue.prototype.url_config = 'http://42.180.188.17:9809/' // 鞍钢正式地址 - // Vue.prototype.url_config = 'http://42.180.188.17:11211/' // 鞍钢测试地址 + Vue.prototype.url_config = 'http://42.180.188.17:11211/' // 鞍钢测试地址 // Vue.prototype.url_config = 'http://182.90.224.237:51234/' //雄哥内网穿透地址 // Vue.prototype.url_config = 'http://jxj.zhgdyun.com:61212/' //杰哥内网穿透地址 // Vue.prototype.url_config = ' http://192.168.34.221:28888/' //郭圣雄本地 - Vue.prototype.url_config = 'http://192.168.34.221:9111/' //郭圣雄本地 + // Vue.prototype.url_config = 'http://192.168.34.221:9111/' //郭圣雄本地 // Vue.prototype.url_config = 'http://192.168.34.155:19111/' //彭洁本地 // Vue.prototype.work_url = 'http://47.93.215.234:19997' // 工作流线上地址(弃用) // Vue.prototype.work_url = 'http://42.180.188.17:19997' // 工作流线上地址 diff --git a/pages/projectEnd/laborManage/index.vue b/pages/projectEnd/laborManage/index.vue index 7b18e22e..fcd73ffa 100644 --- a/pages/projectEnd/laborManage/index.vue +++ b/pages/projectEnd/laborManage/index.vue @@ -72,16 +72,16 @@ - + + - + + {{Math.abs(lwRadio(statictisData))}}% {{Math.abs(lwRadio(statictisData))}}% - - {{Math.abs(lwRadio(statictisData))}} - {{Math.abs(lwRadio(statictisData))}}% @@ -90,16 +90,16 @@ - + + - + + {{Math.abs(glRadio(statictisData))}}% {{Math.abs(glRadio(statictisData))}}% - - {{Math.abs(glRadio(statictisData))}} - {{Math.abs(glRadio(statictisData))}}% @@ -267,18 +267,22 @@ }, methods: { lwRadio(statictisData){ - let today = statictisData.attendancePerson.lwPersonTotal - let yesterday = statictisData.yesterdayAttendancePerson.lwPersonTotal - if(yesterday === 0) return '--' - + let today = Number(statictisData.attendancePerson.lwPersonTotal) + let yesterday = Number(statictisData.yesterdayAttendancePerson.lwPersonTotal) + if(yesterday === 0) return 999999999 + // yesterday = 5 + // today = 5 + if(today - yesterday === 0) return 0 let radio = (((today - yesterday)/yesterday)*100).toFixed(2) return radio }, glRadio(statictisData){ let today = statictisData.attendancePerson.glPersonTotal let yesterday = statictisData.yesterdayAttendancePerson.glPersonTotal - if(yesterday === 0) return '--' - + if(yesterday === 0) return 999999999 + // yesterday = 5 + // today = 5 + if(today - yesterday === 0) return 0 let radio = (((today - yesterday)/yesterday)*100).toFixed(2) return radio },