From 4f3d4cdf483850cc4a0557b3617dffd15591ece2 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期三, 03 十二月 2025 17:02:31 +0800
Subject: [PATCH] 滑条

---
 components/mold.vue |   71 +++++++++++++++++++++++++++--------
 1 files changed, 54 insertions(+), 17 deletions(-)

diff --git a/components/mold.vue b/components/mold.vue
index 7e21efb..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,23 +110,60 @@
                         <!-- 鍙湁绗竴琛屾樉绀� 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">
+                                <!-- 绗竴琛屽疄鏃惰绠椾娇鐢ㄦ鏁帮紝鑻ヤ负涓嬫満鍒欎笉瀹炴椂鏄剧ず -->
+                                <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">
+                                <!-- 绗竴琛屽疄鏃惰绠楀鍛芥瘮%锛岃嫢涓轰笅鏈哄垯涓嶅疄鏃舵樉绀� -->
+                                <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 }}
+                            </template>
+                        </td>
                         <td class="num">{{ item.lifeWarn }}</td>
                         <td :class="item.warnStatus === '棰勮' ? 'warn-cell' : (item.warnStatus === '姝e父' ? 'ok-cell' : '')">
                             <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>
@@ -187,7 +225,7 @@
             toolModel() { this.isDirty = true; }
         },
         methods: {
-    //鏌ヨ褰撳墠鏁伴噰鏁帮紝浣滀负涓嬪垁璁℃暟瀹炴椂鏄剧ず
+            //鏌ヨ褰撳墠鏁伴噰鏁帮紝浣滀负涓嬪垁璁℃暟瀹炴椂鏄剧ず
             async fetchCurrentCjNum(toolNo) {
                 if (!this.machineNo) return null;
                 try {
@@ -1171,5 +1209,4 @@
         margin-right: 16px;
         flex: none !important; /* 鍏抽敭锛氬交搴曠姝lex鎷変几 */
     }
-
 </style>
\ No newline at end of file

--
Gitblit v1.9.3