From 224625e10fd8429014a1e39a4c4aac18e31b45da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’>
Date: Wed, 13 Mar 2024 15:30:08 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.dev | 4 ++--
src/views/report/glass/day.vue | 12 ++++++----
src/views/report/glass/inputTable.vue | 8 ++++++-
src/views/report/glass/month.vue | 7 +++---
src/views/report/glass/weekly.vue | 7 +++---
src/views/report/glass/year.vue | 7 +++---
.../report/productionDayReport/index.vue | 23 ++++++++++++++-----
.../report/productionMonthReport/index.vue | 20 ++++++++++++----
.../report/productionWeekReport/index.vue | 20 ++++++++++++----
.../report/productionYearReport/index.vue | 20 ++++++++++++----
10 files changed, 90 insertions(+), 38 deletions(-)
diff --git a/.env.dev b/.env.dev
index e796eafc..34598f0d 100644
--- a/.env.dev
+++ b/.env.dev
@@ -1,7 +1,7 @@
###
# @Author: Do not edit
# @Date: 2023-08-29 09:40:39
- # @LastEditTime: 2024-03-13 08:40:35
+ # @LastEditTime: 2024-03-13 14:57:16
# @LastEditors: zhp
# @Description:
###
@@ -25,7 +25,7 @@ VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# VUE_APP_BASE_API = 'http://192.168.1.47:48082'
# socket地址
-VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
+VUE_APP_Socket_API = 'ws://192.168.0.30:8888'
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
# 积木报表指向地址
diff --git a/src/views/report/glass/day.vue b/src/views/report/glass/day.vue
index 82513e1e..c3ef5ec6 100644
--- a/src/views/report/glass/day.vue
+++ b/src/views/report/glass/day.vue
@@ -1,7 +1,7 @@
@@ -100,11 +100,13 @@ export default {
await this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.filter(item => {
this.proLineList.forEach(it => {
- if (item.lineId === it.id) {
+ if (item.lineId === it.id) {
item.lineName = it.name
- item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? item.originalGlassStatisticsTrend + '%' : null
- item.actualProductTrend = item.actualProductTrend ? item.actualProductTrend + '%' : null
- item.originalGlassPassTrend = item.originalGlassPassTrend ? item.originalGlassPassTrend * 100 + '%' : null
+
+ item.dailyOutputTrend = item.dailyOutputTrend ? parseFloat((item.dailyOutputTrend * 100).toFixed(2)) + '%' : null
+ item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
+ item.actualProductTrend = item.actualProductTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
+ item.originalGlassPassTrend = item.originalGlassPassTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
}
})
if (item.det === false) {
diff --git a/src/views/report/glass/inputTable.vue b/src/views/report/glass/inputTable.vue
index 26dc8b13..d5d6614a 100644
--- a/src/views/report/glass/inputTable.vue
+++ b/src/views/report/glass/inputTable.vue
@@ -1,7 +1,7 @@
@@ -197,6 +197,12 @@ const cols = [
},
methods: {
updateData() {
+ this.data.forEach((ele, index) => {
+ delete ele.dailyOutputTrend
+ delete ele.originalGlassStatisticsTrend
+ delete ele.actualProductTrend
+ delete ele.originalGlassPassTrend
+ });
updateGlass(this.data).then(response => {
updateGlassRemark(this.sum).then(res => {
this.$modal.msgSuccess("修改成功");
diff --git a/src/views/report/glass/month.vue b/src/views/report/glass/month.vue
index 7e892aba..011a2c4b 100644
--- a/src/views/report/glass/month.vue
+++ b/src/views/report/glass/month.vue
@@ -81,9 +81,10 @@ export default {
this.proLineList.forEach(it => {
if (item.lineId === it.id) {
item.lineName = it.name
- item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? item.originalGlassStatisticsTrend + '%' : null
- item.actualProductTrend = item.actualProductTrend ? item.actualProductTrend + '%' : null
- item.originalGlassPassTrend = item.originalGlassPassTrend ? item.originalGlassPassTrend * 100 + '%' : null
+ item.dailyOutputTrend = item.dailyOutputTrend ? parseFloat((item.dailyOutputTrend * 100).toFixed(2)) + '%' : null
+ item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
+ item.actualProductTrend = item.actualProductTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
+ item.originalGlassPassTrend = item.originalGlassPassTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
}
})
if (item.det === false) {
diff --git a/src/views/report/glass/weekly.vue b/src/views/report/glass/weekly.vue
index c7909045..8c85adbf 100644
--- a/src/views/report/glass/weekly.vue
+++ b/src/views/report/glass/weekly.vue
@@ -172,9 +172,10 @@ export default {
this.proLineList.forEach(it => {
if (item.lineId === it.id) {
item.lineName = it.name
- item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? item.originalGlassStatisticsTrend + '%' : null
- item.actualProductTrend = item.actualProductTrend ? item.actualProductTrend + '%' : null
- item.originalGlassPassTrend = item.originalGlassPassTrend ? item.originalGlassPassTrend * 100 + '%' : null
+ item.dailyOutputTrend = item.dailyOutputTrend ? parseFloat((item.dailyOutputTrend * 100).toFixed(2)) + '%' : null
+ item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
+ item.actualProductTrend = item.actualProductTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
+ item.originalGlassPassTrend = item.originalGlassPassTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
}
})
if (item.det === false) {
diff --git a/src/views/report/glass/year.vue b/src/views/report/glass/year.vue
index 681b1932..c9146476 100644
--- a/src/views/report/glass/year.vue
+++ b/src/views/report/glass/year.vue
@@ -82,9 +82,10 @@ export default {
this.tableData = response.data.filter(item => {
this.proLineList.forEach(it => {
if (item.lineId === it.id) {
- item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? item.originalGlassStatisticsTrend + '%' : null
- item.actualProductTrend = item.actualProductTrend ? item.actualProductTrend + '%' : null
- item.originalGlassPassTrend = item.originalGlassPassTrend ? item.originalGlassPassTrend * 100 + '%' : null
+ item.dailyOutputTrend = item.dailyOutputTrend ? parseFloat((item.dailyOutputTrend * 100).toFixed(2)) + '%' : null
+ item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
+ item.actualProductTrend = item.actualProductTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
+ item.originalGlassPassTrend = item.originalGlassPassTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
item.lineName = it.name
}
})
diff --git a/src/views/report/productionDayReport/index.vue b/src/views/report/productionDayReport/index.vue
index c40e1a0e..0d8e23d0 100644
--- a/src/views/report/productionDayReport/index.vue
+++ b/src/views/report/productionDayReport/index.vue
@@ -1,7 +1,7 @@
@@ -47,7 +47,8 @@
- {{ scope.row.inputTrend ? scope.row.inputTrend + '%' : undefined}}
+ {{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend * 100).toFixed(2)) + '%' :
+ undefined}}
@@ -70,7 +71,8 @@
- {{ scope.row.goodProductTrend ? scope.row.goodProductTrend + '%' : undefined }}
+ {{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend * 100).toFixed(2)) +
+ '%' : undefined }}
@@ -91,7 +93,8 @@
- {{ scope.row.missCheckTrend ? scope.row.missCheckTrend + '%' : undefined }}
+ {{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend * 100).toFixed(2)) + '%' :
+ undefined }}
@@ -114,7 +117,9 @@
- {{ scope.row.goodProductPassTrend ? scope.row.goodProductPassTrend + '%' : undefined }}
+ {{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend *
+ 100).toFixed(2)) +
+ '%' : undefined }}
@@ -527,10 +532,16 @@ export default {
}
})
let updateArr = this.list
+ updateArr.forEach((ele, index) => {
+ delete ele.inputTrend
+ delete ele.goodProductTrend
+ delete ele.missCheckTrend
+ delete ele.goodProductPassTrend
+ });
// console.log(JSON.stringify(updateArr[1]))
const result = await Promise.all([
await updateSumProductionDataList(obj),
- await updateProductionDataList(updateArr),
+ await updateProductionDataList(updateArr)
])
console.log(result);
if (result[0].data == true && result[1].data == true) {
diff --git a/src/views/report/productionMonthReport/index.vue b/src/views/report/productionMonthReport/index.vue
index e76a3b65..a7c695cf 100644
--- a/src/views/report/productionMonthReport/index.vue
+++ b/src/views/report/productionMonthReport/index.vue
@@ -1,7 +1,7 @@
@@ -49,7 +49,8 @@
- {{ scope.row.inputTrend ? scope.row.inputTrend + '%' : undefined }}
+ {{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend *
+ 100).toFixed(2)) + '%' : undefined }}
@@ -72,7 +73,8 @@
- {{ scope.row.goodProductTrend ? scope.row.goodProductTrend + '%' : undefined }}
+ {{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend *
+ 100).toFixed(2)) + '%' : undefined }}
@@ -93,7 +95,8 @@
- {{ scope.row.missCheckTrend ? scope.row.missCheckTrend +'%' : undefined }}
+ {{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend *
+ 100).toFixed(2)) +'%' : undefined }}
@@ -116,7 +119,8 @@
- {{ scope.row.goodProductPassTrend ? scope.row.goodProductPassTrend + '%' :undefined }}
+ {{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend *
+ 100).toFixed(2))+ '%' :undefined }}
@@ -531,6 +535,12 @@ export default {
}
})
let updateArr = this.list
+ updateArr.forEach((ele, index) => {
+ delete ele.inputTrend
+ delete ele.goodProductTrend
+ delete ele.missCheckTrend
+ delete ele.goodProductPassTrend
+ });
// console.log(JSON.stringify(updateArr[1]))
const result = await Promise.all([
await updateSumProductionDataList(obj),
diff --git a/src/views/report/productionWeekReport/index.vue b/src/views/report/productionWeekReport/index.vue
index faad215a..c70dd072 100644
--- a/src/views/report/productionWeekReport/index.vue
+++ b/src/views/report/productionWeekReport/index.vue
@@ -1,7 +1,7 @@
@@ -50,7 +50,8 @@
- {{ scope.row.inputTrend ? scope.row.inputTrend + '%' : undefined }}
+ {{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend *
+ 100).toFixed(2)) + '%' : undefined }}
@@ -73,7 +74,8 @@
- {{ scope.row.goodProductTrend ? scope.row.goodProductTrend + '%' : undefined }}
+ {{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend *
+ 100).toFixed(2)) + '%' : undefined }}
@@ -94,7 +96,8 @@
- {{ scope.row.missCheckTrend ? scope.row.missCheckTrend + '%' : undefined }}
+ {{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend *
+ 100).toFixed(2)) + '%' : undefined }}
@@ -117,7 +120,8 @@
- {{ scope.row.goodProductPassTrend ? scope.row.goodProductPassTrend + '%' : undefined }}
+ {{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend *
+ 100).toFixed(2)) + '%' :undefined }}
@@ -501,6 +505,12 @@ export default {
}
})
let updateArr = this.list
+ updateArr.forEach((ele, index) => {
+ delete ele.inputTrend
+ delete ele.goodProductTrend
+ delete ele.missCheckTrend
+ delete ele.goodProductPassTrend
+ });
// console.log(JSON.stringify(updateArr[1]))
const result = await Promise.all([
await updateSumProductionDataList(obj),
diff --git a/src/views/report/productionYearReport/index.vue b/src/views/report/productionYearReport/index.vue
index 1b0d03c7..c3dd264c 100644
--- a/src/views/report/productionYearReport/index.vue
+++ b/src/views/report/productionYearReport/index.vue
@@ -1,7 +1,7 @@
@@ -52,7 +52,8 @@
- {{ scope.row.inputTrend ? scope.row.inputTrend + '%' : undefined }}
+ {{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend *
+ 100).toFixed(2)) + '%' : undefined }}
@@ -75,7 +76,8 @@
- {{ scope.row.goodProductTrend ? scope.row.goodProductTrend + '%' : undefined }}
+ {{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend *
+ 100).toFixed(2)) + '%' : undefined }}
@@ -96,7 +98,8 @@
- {{ scope.row.missCheckTrend ? scope.row.missCheckTrend + '%' : undefined }}
+ {{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend *
+ 100).toFixed(2)) + '%' : undefined }}
@@ -120,7 +123,8 @@
- {{ scope.row.goodProductPassTrend ? scope.row.goodProductPassTrend + '%' : undefined }}
+ {{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend *
+ 100).toFixed(2)) + '%' : undefined }}
@@ -445,6 +449,12 @@ export default {
}
})
let updateArr = this.list
+ updateArr.forEach((ele, index) => {
+ delete ele.inputTrend
+ delete ele.goodProductTrend
+ delete ele.missCheckTrend
+ delete ele.goodProductPassTrend
+ });
// console.log(JSON.stringify(updateArr[1]))
const result = await Promise.all([
await updateSumProductionDataList(obj),