From 696b87e0f494eff98e1646fbde133430f22b1543 Mon Sep 17 00:00:00 2001
From: IPC-610 <IPC-610@DESKTOP-6LEOOS3>
Date: 星期日, 20 十月 2024 18:48:44 +0800
Subject: [PATCH] bug修复
---
Web/src/views/device/deviceInfo/index.vue | 42 +++++++++++++++++++++++++++++++-----------
1 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/Web/src/views/device/deviceInfo/index.vue b/Web/src/views/device/deviceInfo/index.vue
index cac9429..6281d12 100644
--- a/Web/src/views/device/deviceInfo/index.vue
+++ b/Web/src/views/device/deviceInfo/index.vue
@@ -20,6 +20,18 @@
<el-switch v-model="state.boDemo" active-text="" inactive-text="婕旂ず妯″紡"
@change="handleSwitchChange('boDemo', $event)"></el-switch>
</el-card>
+ <el-card class="box-card" shadow="hover" style="margin-top: 3px;">
+ <el-switch v-model="state.boDrumReversal" active-text="" inactive-text="婊氬姩鍙嶈浆"
+ @change="handleSwitchChange('boDrumReversal', $event)"></el-switch>
+ </el-card>
+ <el-card class="box-card" shadow="hover" style="margin-top: 3px;">
+ <el-switch v-model="state.boOutLock" active-text="" inactive-text="鍑哄簱閿佸畾"
+ @change="handleSwitchChange('boOutLock', $event)"></el-switch>
+ </el-card>
+ <el-card class="box-card" shadow="hover" style="margin-top: 3px;">
+ <el-switch v-model="state.boEnterLock" active-text="" inactive-text="鍏ュ簱閿佸畾"
+ @change="handleSwitchChange('boEnterLock', $event)"></el-switch>
+ </el-card>
</el-collapse-item>
<el-collapse-item title="鍫嗗灈鏈�" name="2">
@@ -81,6 +93,7 @@
import { listStatus, listPosition } from '/@/api/wcs/wcsPlc';
import { signalR } from './signalR';
import { cellsDataLine, cellsDataOne, cellsDataTwo, cellsDataThree } from './data';
+import { ElMessage } from "element-plus";
const state = ref<any>({});
const stackers = ref<any>({});
@@ -100,13 +113,14 @@
if (foundCell) {
//淇敼楂樺害
foundCell.BoxHeight = s.boxHeight;
+ foundCell.EndLocat = s.endLocat;
}
}
else if (s.type == 1) {
// 鏇存柊杈撻�佺嚎鏁版嵁
- updateCellData(cellsDataOne, s);
- updateCellData(cellsDataTwo, s);
- updateCellData(cellsDataThree, s);
+ updateCellData(cellsDataOne.value, s);
+ updateCellData(cellsDataTwo.value, s);
+ updateCellData(cellsDataThree.value, s);
}
});
};
@@ -135,15 +149,20 @@
signalR.off('UpdateService');
signalR.on('UpdateService', (data: any) => {
state.value = data;
+ if (data.error) {
+ ElMessage({
+ message: data.error,
+ type: "error",
+ });
+ }
});
signalR.off('PublicPosition');
signalR.on('PublicPosition', (data: any) => {
-
if (data.type == 1) {
// 鏇存柊杈撻�佺嚎鏁版嵁
- updateCellData(cellsDataOne, data);
- updateCellData(cellsDataTwo, data);
- updateCellData(cellsDataThree, data);
+ updateCellData(cellsDataOne.value, data);
+ updateCellData(cellsDataTwo.value, data);
+ updateCellData(cellsDataThree.value, data);
}
else if (data.type == 0) {
// 鏇存柊鍫嗗灈鏈烘暟鎹�
@@ -166,6 +185,7 @@
debugger;
const foundCell = cellsDataLine.value.find(cell => cell.Code === data.stationNum);
if (foundCell) {
+ foundCell.EndLocat = data.endLocat;
const startHeight = foundCell.BoxHeight;
const targetHeight = data.boxHeight;
const duration = 1000; // 鍔ㄧ敾鎸佺画鏃堕棿锛堟绉掞級
@@ -204,7 +224,7 @@
const activeName = ['1', '2', '3'];
//杈撻�佺嚎鏁版嵁
-let cellsData = ref(cellsDataOne);
+let cellsData = cellsDataOne.value;
// 灞傚钩闈㈢姸鎬�
@@ -216,8 +236,8 @@
//鍒囨崲灞傚钩闈�
function floorTogglePlain(buttonNumber) {
- const floorData = [cellsDataOne, cellsDataTwo, cellsDataThree];
-
+ const floorData = [cellsDataOne.value, cellsDataTwo.value, cellsDataThree.value];
+ debugger;
if (buttonNumber >= 1 && buttonNumber <= 3) {
const index = buttonNumber - 1;
floorStates.value = {
@@ -225,7 +245,7 @@
isPlain2: index !== 1,
isPlain3: index !== 2
};
- cellsData.value = floorData[index];
+ cellsData = floorData[index];
}
}
</script>
--
Gitblit v1.8.0