From bc458b96305597cf661a86ddc66a3d29e4624b27 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期三, 03 十二月 2025 17:25:36 +0800
Subject: [PATCH] 调试
---
components/mold.vue | 61 ++++++++++++++++++++----------
1 files changed, 40 insertions(+), 21 deletions(-)
diff --git a/components/mold.vue b/components/mold.vue
index b6aa204..9acf1a1 100644
--- a/components/mold.vue
+++ b/components/mold.vue
@@ -86,17 +86,18 @@
<table class="styled-table">
<thead>
<tr>
- <th style="width:8%">鍒�鍏风紪鍙�</th>
- <th style="width:14%">鍒�鍏峰悕绉�</th>
- <th style="width:12%">涓婂垁鏃堕棿</th>
- <th class="num" style="width:8%">涓婂垁璁℃暟</th>
- <th style="width:12%">涓嬪垁鏃堕棿</th>
- <th class="num" style="width:8%">涓嬪垁璁℃暟</th>
- <th class="num" style="width:8%">浣跨敤娆℃暟</th>
- <th class="num" style="width:8%">浣跨敤涓婇檺</th>
- <th class="num" style="width:8%">瀵垮懡姣�%</th>
- <th class="num" style="width:8%">瀵垮懡姣旈璀﹀��</th>
- <th style="width:8%">棰勮鐘舵��</th>
+ <th style="width:7%">鍒�鍏风紪鍙�</th>
+ <th style="width:12%">鍒�鍏峰悕绉�</th>
+ <th style="width:10%">涓婂垁鏃堕棿</th>
+ <th class="num" style="width:7%">涓婂垁璁℃暟</th>
+ <th style="width:10%">涓嬪垁鏃堕棿</th>
+ <th class="num" style="width:7%">涓嬪垁璁℃暟</th>
+ <th class="num" style="width:7%">浣跨敤娆℃暟</th>
+ <th class="num" style="width:7%">浣跨敤涓婇檺</th>
+ <th class="num" style="width:7%">瀵垮懡姣�%</th>
+ <th class="num" style="width:7%">瀵垮懡姣旈璀﹀��</th>
+ <th style="width:7%">棰勮鐘舵��</th>
+ <th style="width:7%">鍒�鍏峰湪鏈虹姸鎬�</th>
</tr>
</thead>
<tbody>
@@ -109,28 +110,44 @@
<!-- 鍙湁绗竴琛屾樉绀� currentCjNum锛屽叾瀹冭鏄剧ず downCount -->
<td class="num">
<template v-if="idx === 0">
- {{ item.currentCjNum != null ? item.currentCjNum : '' }}
+ <!-- 绗竴琛岋細涓嬫満鏃朵笉瀹炴椂鏄剧ず currentCjNum锛屾樉绀� downCount -->
+ <template v-if="!item.downTime">
+ {{ item.currentCjNum != null ? item.currentCjNum : '' }}
+ </template>
+ <template v-else>
+ {{ item.downCount != null ? item.downCount : '' }}
+ </template>
</template>
<template v-else>
{{ item.downCount != null ? item.downCount : '' }}
</template>
</td>
- <!--<td class="num">{{ item.useCount != null ? item.useCount : '' }}</td>--><!--浣跨敤娆℃暟-->
+ <!--浣跨敤娆℃暟-->
<td class="num">
<template v-if="idx === 0">
- <!-- 绗竴琛屽疄鏃惰绠椾娇鐢ㄦ鏁� -->
- {{item.currentCjNum != null && item.upCount != null ? (Number(item.currentCjNum) - Number(item.upCount)) : (item.useCount != null ? item.useCount : '') }}
+ <!-- 绗竴琛屽疄鏃惰绠椾娇鐢ㄦ鏁帮紝鑻ヤ负涓嬫満鍒欎笉瀹炴椂鏄剧ず -->
+ <template v-if="!item.downTime">
+ {{item.currentCjNum != null && item.upCount != null ? (Number(item.currentCjNum) - Number(item.upCount)) : (item.useCount != null ? item.useCount : '') }}
+ </template>
+ <template v-else>
+ {{ item.useCount != null ? item.useCount : '' }}
+ </template>
</template>
<template v-else>
{{ item.useCount != null ? item.useCount : '' }}
</template>
</td>
<td class="num">{{ item.useLimit != null ? item.useLimit : '' }}</td>
- <!--<td class="num">{{ item.lifePercent }}</td>-->
+ <!--瀵垮懡姣�%-->
<td class="num">
<template v-if="idx === 0">
- <!-- 绗竴琛屽疄鏃惰绠楀鍛芥瘮% -->
- {{item.currentCjNum != null && item.upCount != null && item.useLimit != null && Number(item.useLimit) > 0 ? Math.round((Number(item.currentCjNum) - Number(item.upCount)) / Number(item.useLimit) * 100) + '%' : (item.lifePercent != null ? item.lifePercent : '') }}
+ <!-- 绗竴琛屽疄鏃惰绠楀鍛芥瘮%锛岃嫢涓轰笅鏈哄垯涓嶅疄鏃舵樉绀� -->
+ <template v-if="!item.downTime">
+ {{item.currentCjNum != null && item.upCount != null && item.useLimit != null && Number(item.useLimit) > 0 ? Math.round((Number(item.currentCjNum) - Number(item.upCount)) / Number(item.useLimit) * 100) + '%' : (item.lifePercent != null ? item.lifePercent : '') }}
+ </template>
+ <template v-else>
+ {{ item.lifePercent != null ? item.lifePercent : '' }}
+ </template>
</template>
<template v-else>
{{ item.lifePercent }}
@@ -141,9 +158,12 @@
<span v-if="item.warnStatus === '棰勮'" class="warn-badge">璀﹀憡</span>
<span v-else>{{ item.warnStatus }}</span>
</td>
+ <td>
+ {{ item.downTime ? '涓嬫満' : '鍦ㄦ満' }}<!--鍦ㄦ満鐘舵��-->
+ </td>
</tr>
<tr v-if="!toolRecords.length">
- <td colspan="11">鏆傛棤鏁版嵁</td>
+ <td colspan="12">鏆傛棤鏁版嵁</td>
</tr>
</tbody>
</table>
@@ -205,7 +225,7 @@
toolModel() { this.isDirty = true; }
},
methods: {
- //鏌ヨ褰撳墠鏁伴噰鏁帮紝浣滀负涓嬪垁璁℃暟瀹炴椂鏄剧ず
+ //鏌ヨ褰撳墠鏁伴噰鏁帮紝浣滀负涓嬪垁璁℃暟瀹炴椂鏄剧ず
async fetchCurrentCjNum(toolNo) {
if (!this.machineNo) return null;
try {
@@ -1189,5 +1209,4 @@
margin-right: 16px;
flex: none !important; /* 鍏抽敭锛氬交搴曠姝lex鎷変几 */
}
-
</style>
\ No newline at end of file
--
Gitblit v1.9.3