From cf9e6eb7bfe620184ada5594dabb2734b34bb7cb Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期一, 12 五月 2025 10:53:01 +0800
Subject: [PATCH] 添加 比对数据,不同变红警告
---
UI-Project/src/views/Returns/upreturns3.vue | 86 +++++++++++++++++++++++++++++++++++--------
1 files changed, 70 insertions(+), 16 deletions(-)
diff --git a/UI-Project/src/views/Returns/upreturns3.vue b/UI-Project/src/views/Returns/upreturns3.vue
index 092d468..2495dac 100644
--- a/UI-Project/src/views/Returns/upreturns3.vue
+++ b/UI-Project/src/views/Returns/upreturns3.vue
@@ -36,7 +36,7 @@
})
request.post("/loadGlass/up-patten-usage/setUpPattenRequest", {
state: null,
- stationCell: 6
+ stationCell: 5
}).then((response) => {
if (response.code == 200) {
} else {
@@ -182,7 +182,7 @@
// const handlesure = async () => {
// try {
// const response = await request.post('/loadGlass/up-patten-usage/selectUpPattenUsage', {
-// stationCell: 6,
+// stationCell: 5,
// engineerId: selectedProjectNo.value,
// filmRemove: parseInt(filmRemove.value, 10),
// })
@@ -287,7 +287,7 @@
let engineeringId = window.localStorage.getItem('engineeringIda')
if (engineeringId !== '') {
const response = await request.post('/loadGlass/engineering/engineering/pause', {
- stationCell: 6,
+ stationCell: 5,
filmRemove: filmRemove,
engineerId: engineeringId,
state: 0,
@@ -318,7 +318,7 @@
}
const response = await request.post("/loadGlass/up-patten-usage/setUpPattenRequest", {
state: selectValuesa[0],
- stationCell: 6
+ stationCell: 5
})
if (response.code === 200) {
tableData.value = response.data;
@@ -448,25 +448,79 @@
}
};
-// 鏋跺瓙鏁版嵁瀵规瘮
+
+// 鏋跺瓙鏁版嵁瀵规瘮 锛堟瘡涓�琛岄兘杩涜姣斿锛屼笉鍚岄兘鏄剧ず绾㈣壊锛�
+// const tableRowClassName = ({
+// row,
+// rowIndex: number
+// }) => {
+// // 鑾峰彇绗竴鏉℃暟鎹�
+// const firstData = tableData.value[0];
+
+// // 濡傛灉绗竴鏉℃暟鎹瓨鍦ㄤ笖鐘舵�佷笉鏄�100
+// if (firstData && firstData.state !== 100) {
+// // 鑾峰彇褰撳墠琛屼笌绗竴鏉℃暟鎹�
+// const previousRow = tableDataa.value.slice(0, rowIndex).reverse().find(item =>
+// item && item.patternWidth && item.patternHeight && item.patternThickness && item.filmsId
+// );
+
+// // 濡傛灉褰撳墠琛屾湁鏁版嵁锛岃繘琛屾瘮瀵�
+// if (row && row.patternWidth) {
+// const isMatch =
+// row.patternWidth === firstData.width &&
+// row.patternHeight === firstData.height &&
+// row.patternThickness === firstData.thickness &&
+// row.filmsId === firstData.filmsId;
+
+// return !isMatch ? 'danger-row' : '';
+// }
+// }
+
+// return '';
+// }
+
+
+// 鏋跺瓙鏁版嵁瀵规瘮 锛堟枡鏋�1绗竴琛屾湁鏁版嵁锛岃繘琛屾瘮瀵癸紝鏂欐灦2绗竴琛屾病鏈夋暟鎹紝杩涜姣斿锛�
const tableRowClassName = ({
row,
+ rowIndex
}: {
row: any;
- rowIndex: number
+ rowIndex: number;
}) => {
- // 鐩存帴鑾峰彇绗竴鏉℃暟鎹紝鐒跺悗鍒ゆ柇鐘舵��
+ // 鑾峰彇绗竴鏉℃暟鎹�
const firstData = tableData.value[0];
- // 濡傛灉绗竴鏉℃暟鎹瓨鍦ㄤ笖鐘舵�佷笉鏄�100锛岃繘琛屾瘮瀵�
- if (firstData && firstData.state !== 100 && row && row.patternWidth) {
- const isMatch =
- row.patternWidth === firstData.width &&
- row.patternHeight === firstData.height &&
- row.patternThickness === firstData.thickness &&
- row.filmsId === firstData.filmsId;
-
- return !isMatch ? 'danger-row' : '';
+ // 濡傛灉绗竴鏉℃暟鎹瓨鍦ㄤ笖鐘舵�佷笉鏄�100
+ if (firstData && firstData.state !== 100) {
+ // 鏂欐灦1
+ if (rowIndex === 0) {
+ // 鏂欐灦1绗竴琛屾湁鏁版嵁锛岃繘琛屾瘮瀵�
+ if (row && row.patternWidth) {
+ const isMatch =
+ row.patternWidth === firstData.width &&
+ row.patternHeight === firstData.height &&
+ row.patternThickness === firstData.thickness &&
+ row.filmsId === firstData.filmsId;
+
+ return !isMatch ? 'danger-row' : '';
+ }
+ }
+ // 鏂欐灦2
+ else if (rowIndex === 1) {
+ const firstRow = tableDataa.value[0];
+ if (!firstRow || !firstRow.patternWidth) {
+ if (row && row.patternWidth) {
+ const isMatch =
+ row.patternWidth === firstData.width &&
+ row.patternHeight === firstData.height &&
+ row.patternThickness === firstData.thickness &&
+ row.filmsId === firstData.filmsId;
+
+ return !isMatch ? 'danger-row' : '';
+ }
+ }
+ }
}
return '';
--
Gitblit v1.8.0