diff --git a/src/assets/image/16.png b/src/assets/image/16.png
new file mode 100644
index 0000000..e148aff
Binary files /dev/null and b/src/assets/image/16.png differ
diff --git a/src/assets/image/19.png b/src/assets/image/19.png
new file mode 100644
index 0000000..8ce5070
Binary files /dev/null and b/src/assets/image/19.png differ
diff --git a/src/assets/image/2.png b/src/assets/image/2.png
new file mode 100644
index 0000000..8fe1655
Binary files /dev/null and b/src/assets/image/2.png differ
diff --git a/src/assets/image/4.png b/src/assets/image/4.png
new file mode 100644
index 0000000..2ca299c
Binary files /dev/null and b/src/assets/image/4.png differ
diff --git a/src/assets/image/back.png b/src/assets/image/back.png
new file mode 100644
index 0000000..b932c11
Binary files /dev/null and b/src/assets/image/back.png differ
diff --git a/src/assets/image/left.png b/src/assets/image/left.png
new file mode 100644
index 0000000..93df411
Binary files /dev/null and b/src/assets/image/left.png differ
diff --git a/src/assets/image/right.png b/src/assets/image/right.png
new file mode 100644
index 0000000..5ba682f
Binary files /dev/null and b/src/assets/image/right.png differ
diff --git a/src/router/index.js b/src/router/index.js
index 93952cd..5353659 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -165,6 +165,13 @@ export const constantRoutes = [
component: () => import("@/views/deviceManagement/datascreen/index.vue"),
hidden: true,
},
+ //数据分析大屏
+ {
+ name: "dataAnalysisLargeScreen",
+ path: "/andonManagement/dataAnalysis/dataAnalysisLargeScreen",
+ component: () => import("@/views/andonManagement/dataAnalysis/largeScreen/index.vue"),
+ hidden: true,
+ },
// {
// name: 'Fullscreen2',
// path: '/fullscreen2',
diff --git a/src/views/andonManagement/dataAnalysis/largeScreen/index.vue b/src/views/andonManagement/dataAnalysis/largeScreen/index.vue
index 6e53a4a..b1d7696 100644
--- a/src/views/andonManagement/dataAnalysis/largeScreen/index.vue
+++ b/src/views/andonManagement/dataAnalysis/largeScreen/index.vue
@@ -1,3 +1,90 @@
- 大屏
-
\ No newline at end of file
+
+
返回首页
+
+ 数据分析大屏
+
+
+ {{ currentTime }}
+
+
+ 0
+
+
+ 1
+ 2
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/andonManagement/humanComputerInteraction/index.vue b/src/views/andonManagement/humanComputerInteraction/index.vue
index 9c7105f..9e94e8c 100644
--- a/src/views/andonManagement/humanComputerInteraction/index.vue
+++ b/src/views/andonManagement/humanComputerInteraction/index.vue
@@ -77,16 +77,21 @@
-
+
+
+
+
+
+
+
+
@@ -250,7 +255,9 @@ export default {
processingData: [],
total: 0,
loading: false,
- form: {},
+ form: {
+ durationTime: '',
+ },
form1: {},
formAdd: {},
queryVisible: false,
@@ -500,7 +507,9 @@ export default {
});
});
},
-
+ handleChange(val) {
+ this.form.durationTime = val
+ },
//处理完毕
hanleCompleted() {
let data = {
diff --git a/src/views/productManagement/workorder2.vue b/src/views/productManagement/workorder2.vue
index 0213b2d..b3976fd 100644
--- a/src/views/productManagement/workorder2.vue
+++ b/src/views/productManagement/workorder2.vue
@@ -309,9 +309,9 @@ export default {
for (let item of this.tableAllData) {
list[item.state]++;
}
-
+
return list;
-
+
}
},
mounted() {
@@ -376,7 +376,7 @@ export default {
? Number(item.pQualifiedNum)
: 0,
pQualifiedRate: item.pQualifiedRate !== null && item.pQualifiedRate !== undefined
- ? parseFloat(item.pQualifiedRate).toFixed(2)
+ ? parseFloat(item.pQualifiedRate * 100).toFixed(2)
: '0.00'
}
})
@@ -410,14 +410,29 @@ export default {
this.$message.info('已取消修改');
}
},
+ // 根据合格率计算预计合格数
+ calculateQualifiedNumFromRate(row) {
+ this.isEditing = true;
+ const previousNum = parseFloat(row.previousNumber) || 0;
+ const qualifiedRate = parseFloat(row.pQualifiedRate) || 0;
- // 处理预计合格率变更
+ if (previousNum > 0 && !isNaN(qualifiedRate)) {
+ const qualifiedNum = (previousNum * qualifiedRate) / 100;
+ this.$set(row, 'pQualifiedNum', Math.round(qualifiedNum));
+ } else {
+ this.$set(row, 'pQualifiedNum', 0);
+ }
+
+ this.addToUpdateQueue(row);
+ }, // 处理预计合格率变更
async handleQualifiedRateChange(row) {
try {
const currentValue = row.pQualifiedRate;
if (currentValue !== '' && !isNaN(currentValue)) {
await this.$modal.confirm(`确定要将合格率修改为 ${parseFloat(currentValue).toFixed(2)}% 吗?`);
this.formatQualifiedRate(row);
+ // 根据合格率自动计算预计合格数
+ this.calculateQualifiedNumFromRate(row);
}
} catch (error) {
this.$message.info('已取消修改');
@@ -435,7 +450,7 @@ export default {
} else {
this.$set(row, 'pQualifiedRate', '0.00');
}
-
+
// 添加到更新队列
this.addToUpdateQueue(row);
},
@@ -445,7 +460,7 @@ export default {
const num = parseFloat(row.pQualifiedNum);
this.$set(row, 'pQualifiedNum', isNaN(num) ? 0 : Math.round(num));
this.isEditing = false;
-
+
// 当合格数改变时,重新计算合格率
this.calculateQualifiedRate(row);
},
@@ -455,7 +470,7 @@ export default {
const rate = parseFloat(row.pQualifiedRate);
this.$set(row, 'pQualifiedRate', isNaN(rate) ? '0.00' : rate.toFixed(2));
this.isEditing = false;
-
+
// 添加到更新队列
this.addToUpdateQueue(row);
},
@@ -463,13 +478,13 @@ export default {
// 新增方法:添加到更新队列
addToUpdateQueue(row) {
// 将行数据添加到更新队列中
- this.updateQueue.set(row.id, {...row});
-
+ this.updateQueue.set(row.id, { ...row });
+
// 清除之前的定时器
if (this.updateTimer) {
clearTimeout(this.updateTimer);
}
-
+
// 设置新的定时器
this.updateTimer = setTimeout(() => {
this.processUpdateQueue();
@@ -480,17 +495,17 @@ export default {
async processUpdateQueue() {
// 获取所有待更新的行
const rowsToUpdate = Array.from(this.updateQueue.values());
-
+
// 清空队列
this.updateQueue.clear();
-
+
try {
// 逐个更新每行数据
for (const row of rowsToUpdate) {
const updateData = { ...row };
updateData.pQualifiedNum = Number(updateData.pQualifiedNum) || 0;
- let rate = Number(updateData.pQualifiedRate);
- updateData.pQualifiedRate = isNaN(rate) ? '0.00' : rate.toFixed(2);
+ let rate = Number(updateData.pQualifiedRate / 100);
+ updateData.pQualifiedRate = isNaN(rate / 100) ? '0.00' : rate.toFixed(2);
updateData.vehicleNumber = Number(updateData.vehicleNumber) || 0;
updateData.hangNumber = Number(updateData.hangNumber) || 0;
@@ -501,7 +516,7 @@ export default {
this.$notify.error(res.msg || '更新失败');
}
}
-
+
// 所有更新完成后刷新列表
this.$notify.success('更新成功');
this.getList();
diff --git a/src/views/productManagement/workorder_online.vue b/src/views/productManagement/workorder_online.vue
index 4e403bc..f6b19f2 100644
--- a/src/views/productManagement/workorder_online.vue
+++ b/src/views/productManagement/workorder_online.vue
@@ -128,7 +128,7 @@ export default {
return {
...item,
pQualifiedRate: item.pQualifiedRate !== null && item.pQualifiedRate !== undefined
- ? parseFloat(item.pQualifiedRate).toFixed(2)
+ ? parseFloat(item.pQualifiedRate*100).toFixed(2)
: '0.00'
}
})
@@ -147,19 +147,33 @@ export default {
this.$message.info('已取消修改');
}
},
+// 根据合格率计算预计合格数
+calculateQualifiedNumFromRate(row) {
+ const previousNumber = parseFloat(row.previousNumber);
+ const pQualifiedRate = parseFloat(row.pQualifiedRate);
- // 处理预计合格率变更
- async handleQualifiedRateChange(row) {
- try {
- const currentValue = row.pQualifiedRate;
- if (currentValue !== '' && !isNaN(currentValue)) {
- await this.$modal.confirm(`确定要将合格率修改为 ${parseFloat(currentValue).toFixed(2)}% 吗?`);
- this.formatQualifiedRate(row);
- }
- } catch (error) {
- this.$message.info('已取消修改');
- }
- },
+ if (!isNaN(previousNumber) && !isNaN(pQualifiedRate)) {
+ const qualifiedNum = (previousNumber * pQualifiedRate) / 100;
+ row.pQualifiedNum = qualifiedNum.toFixed(2);
+ console.log(row.pQualifiedNum, '根据合格率计算的合格数');
+
+ // 更新工单数据
+ this.updateWorkorderData(row);
+ }
+},
+// 处理预计合格率变更
+async handleQualifiedRateChange(row) {
+ try {
+ const currentValue = row.pQualifiedRate;
+ if (currentValue !== '' && !isNaN(currentValue)) {
+ await this.$modal.confirm(`确定要将合格率修改为 ${parseFloat(currentValue).toFixed(2)}% 吗?`);
+ this.formatQualifiedRate(row);
+ this.calculateQualifiedNumFromRate(row);
+ }
+ } catch (error) {
+ this.$message.info('已取消修改');
+ }
+},
calculateQualifiedRate(row) {
const previousNumber = parseFloat(row.previousNumber);
@@ -184,7 +198,7 @@ export default {
}
},
- // 格式化预计合格率为两位小数
+
formatQualifiedRate(row) {
if (row.pQualifiedRate !== '' && !isNaN(row.pQualifiedRate)) {
row.pQualifiedRate = parseFloat(row.pQualifiedRate).toFixed(2);
@@ -200,7 +214,7 @@ export default {
let data = {
...row,
pQualifiedRate: !isNaN(Number(row.pQualifiedRate))
- ? Number(row.pQualifiedRate).toFixed(2)
+ ? Number(row.pQualifiedRate/100).toFixed(2)
: '0.00',
pQualifiedNum: Number(row.pQualifiedNum) || 0,
};