From 5367b3b4d92588c4e76728e6bd4ad6aae0cbb967 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 23 七月 2026 13:05:25 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_pro2.0' into dev_pro2.0
---
src/views/mes/workbench/components/WorkstationPanel.vue | 91 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 91 insertions(+), 0 deletions(-)
diff --git a/src/views/mes/workbench/components/WorkstationPanel.vue b/src/views/mes/workbench/components/WorkstationPanel.vue
index eb93fcb..3d44c26 100644
--- a/src/views/mes/workbench/components/WorkstationPanel.vue
+++ b/src/views/mes/workbench/components/WorkstationPanel.vue
@@ -7,10 +7,14 @@
defineProps<{
workstation?: MesMdWorkstationApi.Workstation;
+ /** 鏄惁宸蹭笂宸� */
+ isClockIn?: boolean;
}>();
const emit = defineEmits<{
change: [];
+ 'clock-in': [];
+ 'clock-out': [];
}>();
</script>
@@ -61,6 +65,32 @@
<span class="ws-panel__meta-label">鍦扮偣</span>
<span class="ws-panel__meta-value">{{ workstation.address ?? '鈥�' }}</span>
</div>
+ </div>
+
+ <!-- 涓婂伐/涓嬪伐 -->
+ <div v-if="workstation" class="ws-panel__clock">
+ <div v-if="isClockIn" class="ws-panel__clock-status">
+ <IconifyIcon icon="lucide:check-circle" class="ws-panel__clock-icon" />
+ <span>宸蹭笂宸�</span>
+ </div>
+ <button
+ v-if="!isClockIn"
+ type="button"
+ class="ws-panel__clock-btn ws-panel__clock-btn--in"
+ @click="emit('clock-in')"
+ >
+ <IconifyIcon class="ws-panel__clock-btn-icon" icon="lucide:play" />
+ 涓婂伐
+ </button>
+ <button
+ v-else
+ type="button"
+ class="ws-panel__clock-btn ws-panel__clock-btn--out"
+ @click="emit('clock-out')"
+ >
+ <IconifyIcon class="ws-panel__clock-btn-icon" icon="lucide:pause" />
+ 涓嬪伐
+ </button>
</div>
</section>
</template>
@@ -262,4 +292,65 @@
text-overflow: ellipsis;
white-space: nowrap;
}
+
+// --- 涓婂伐/涓嬪伐 ---
+.ws-panel__clock {
+ margin-top: 12px;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 10px;
+}
+
+.ws-panel__clock-status {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ font-size: 14px;
+ font-weight: 600;
+ color: #a5d6a7;
+}
+
+.ws-panel__clock-icon {
+ font-size: 18px;
+}
+
+.ws-panel__clock-btn {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 6px;
+ padding: 10px 0;
+ border: none;
+ border-radius: 8px;
+ font-size: 15px;
+ font-weight: 700;
+ cursor: pointer;
+ transition: all 0.2s;
+}
+
+.ws-panel__clock-btn-icon {
+ font-size: 16px;
+}
+
+.ws-panel__clock-btn--in {
+ background: #4caf50;
+ color: #fff;
+ box-shadow: 0 2px 8px rgb(0 0 0 / 18%);
+
+ &:hover {
+ background: #43a047;
+ }
+}
+
+.ws-panel__clock-btn--out {
+ background: rgb(255 255 255 / 18%);
+ color: #ffcdd2;
+ border: 1px solid rgb(255 255 255 / 28%);
+
+ &:hover {
+ background: rgb(255 255 255 / 28%);
+ }
+}
</style>
--
Gitblit v1.9.3