From ab308e37501bfcbe74a723b9b29007478536d5a0 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期三, 28 八月 2024 10:54:53 +0800
Subject: [PATCH] 掰片/识别和钢化模块新增按钮和按钮点击判断条件,更新算法
---
UI-Project/src/views/Identify/identify.vue | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/UI-Project/src/views/Identify/identify.vue b/UI-Project/src/views/Identify/identify.vue
index 013068a..8d2760c 100644
--- a/UI-Project/src/views/Identify/identify.vue
+++ b/UI-Project/src/views/Identify/identify.vue
@@ -35,12 +35,12 @@
</div>
</el-scrollbar>
<el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose">
- <el-button type="warning" plain :icon="Delete" @click="handleDamage(currentGlassId)" style="width: 140px;margin-left: 10px;">
+ <el-button :disabled="currentGlassRect?.glass_state === 8" type="warning" plain :icon="Delete" @click="handleDamage(currentGlassId)" style="width: 140px;margin-left: 10px;">
{{ $t('order.dilapidation') }}
</el-button>
- <el-button type="danger" plain @click="handleManualTake(currentGlassId)" style="width: 140px;margin-top: 10px;">
+ <el-button :disabled="currentGlassRect?.glass_state === 9" type="danger" plain @click="handleManualTake(currentGlassId)" style="width: 140px;margin-top: 10px;">
<el-icon class="el-icon--right"><Upload /></el-icon>
- {{ $t('order.Takeaway') }}</el-button>
+ {{ $t('order.takeaway') }}</el-button>
</el-dialog>
</el-card>
</template>
@@ -74,6 +74,9 @@
// blind.value = true; // 鎵撳紑缁戝畾鏋跺瓙瀵硅瘽妗�
// };
// 鏄剧ず瀵硅瘽妗嗗苟璁剧疆褰撳墠 glass_id
+const currentGlassRect = computed(() => {
+ return adjustedRects.value.find(rect => rect.glass_id === currentGlassId.value);
+});
function showDialog(glassId: number) {
currentGlassId.value = glassId;
blind.value = true;
--
Gitblit v1.8.0