From 8114ef9bf2704a2bc05a15a36ab677808195a274 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期五, 14 三月 2025 10:40:18 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
UI-Project/src/views/Returns/upreturns.vue | 59 ++++++++++++++++++-----------------------------------------
1 files changed, 18 insertions(+), 41 deletions(-)
diff --git a/UI-Project/src/views/Returns/upreturns.vue b/UI-Project/src/views/Returns/upreturns.vue
index 87b14cc..5e9904d 100644
--- a/UI-Project/src/views/Returns/upreturns.vue
+++ b/UI-Project/src/views/Returns/upreturns.vue
@@ -31,6 +31,7 @@
const buttonEnabledStatus = ref({});
const globalDate = inject('globalDate');
import { inject } from 'vue';
+import { tr } from "element-plus/es/locale";
const tableData = ref([])
const titleSelectJson = ref({
engineerId: [],
@@ -83,42 +84,25 @@
if (data.LoadOneState != null) {
cuttingMachineStatusColor.value = data.LoadOneState[0] == 1 ? 'green' : '#911005';
}
- if (data.list!=null) {
- tableDataa.value = data.list[0].slice(0, 2);
- }else {
- tableDataa.value = ''
- }
if (data.stationOne != null) {
- // data.stationOne[0].forEach(station => {
- // stationInfos[station.slot] = {
- // hasValidDimension: station.patternHeight !== null && station.patternHeight !== '' ||
- // station.patternThickness !== null && station.patternThickness !== ''
- // };
- // console.log(station);
- // console.log(stationInfos[station.slot]);
-
- // });
data.stationOne[0].forEach((station) => {
- stationInfos[station.patternHeight] = {
- hasPatternHeight: station.patternHeight !== null && station.patternHeight !== '',
- };
- // buttonEnabledStatus.value[workstationId] = hasValidDimension;
- console.log(station);
- console.log(stationInfos[station.patternHeight]);
-});
+ if(station.patternThickness !== undefined){
+ station.haspatternThickness=false;
+ }else{
+ station.haspatternThickness=true;
+ }
+ // stationInfos[station.patternThickness] = {
+ // haspatternThickness: station.patternThickness !== undefined,
+ // };
+ });
+
+ console.log(data.stationOne);
+ if (data.list != null) {
+ tableDataa.value = data.list[0].slice(0, 2);
+ } else {
+ tableDataa.value = [];
+ }
}
- // if (data.stationOne != null) {
- // // 鍒濆鍖栨寜閽姸鎬佸璞�
- // buttonEnabledStatus.value = {};
- // data.stationOne[0].forEach((station, index) => {
- // const workstationId = station.workstationId;
- // const hasValidDimension = station.patternHeight !== null && station.patternHeight !== '' ||
- // station.patternThickness !== null && station.patternThickness !== '';
- // buttonEnabledStatus.value[workstationId] = hasValidDimension;
- // console.log(station.workstationId);
-
- // });
- // }
if(data.loadTask1!=null){
tableData.value = data.loadTask1[0]
window.localStorage.setItem('engineeringIda', tableData.value[0].engineeringId)
@@ -132,13 +116,6 @@
canSelectProjectc.value = false;
tableData.value = '';
}
-};
-// 妫�鏌ユ寜閽槸鍚﹀彲鐢�
-// const isButtonEnabled = (slot: string) => {
-// return buttonEnabledStatus.value[slot] || false;
-// };
-const isButtonEnabled = (patternHeight: string) => {
- return stationInfos[patternHeight]?.hasValidDimension ?? false;
};
onBeforeUnmount(() => {
closeWebSocket();
@@ -529,7 +506,7 @@
<el-table-column prop="number" align="center" :label="$t('basicData.quantity')" min-width="80"/>
<el-table-column fixed="right" :label="$t('film.operate')" align="center">
<template #default="scope">
- <el-button size="mini" :disabled="!isButtonEnabled(scope.row.patternHeight)" type="text" plain @click="handleptask(scope.row.workstationId)">{{ $t('basicData.rackreset') }}</el-button>
+ <el-button size="mini" :disabled="(!stationInfos[scope.row.patternThickness])" type="text" plain @click="handleptask(scope.row.workstationId)">{{ $t('basicData.rackreset') }}{{ scope.row.haspatternThickness}}</el-button>
</template>
</el-table-column>
</el-table>
--
Gitblit v1.8.0