From 8d58c40af40493bd5f066cbfdb1ffd9f113c22fc Mon Sep 17 00:00:00 2001
From: 严智鑫 <test>
Date: 星期三, 03 九月 2025 16:37:21 +0800
Subject: [PATCH] 1.前端推数据使用了最新的webSokect客户现场总是掉线,修改为接口方式 2.设备交互整体增加异常处理以及PLC连接方式改为短连接
---
UI-Project/src/views/MechanicalArm/mechanicalArm.vue | 567 ++++++++++++++++++++++++++++++++-----------------------
1 files changed, 328 insertions(+), 239 deletions(-)
diff --git a/UI-Project/src/views/MechanicalArm/mechanicalArm.vue b/UI-Project/src/views/MechanicalArm/mechanicalArm.vue
index a173998..219468b 100644
--- a/UI-Project/src/views/MechanicalArm/mechanicalArm.vue
+++ b/UI-Project/src/views/MechanicalArm/mechanicalArm.vue
@@ -1,13 +1,14 @@
<!-- 涓婄墖鏈� -->
<script setup>
import request from "@/utils/request";
-import { ElMessage, ElMessageBox } from "element-plus";
-import { computed, reactive, ref, onMounted, onBeforeUnmount, onUnmounted } from 'vue'
-import { useI18n } from 'vue-i18n'
-import { WebSocketHost, host } from '@/utils/constants'
-import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
+import {ElMessage, ElMessageBox} from "element-plus";
+import {computed, reactive, ref, onMounted, onBeforeUnmount, onUnmounted} from 'vue'
+import {useI18n} from 'vue-i18n'
+import {WebSocketHost, host} from '@/utils/constants'
+import {initializeWebSocket, closeWebSocket} from '@/utils/WebSocketService';
+
let language = ref(localStorage.getItem('lang') || 'zh')
-const { t } = useI18n()
+const {t} = useI18n()
const requestData = reactive({
account: '',
password: '',
@@ -24,12 +25,121 @@
const scanCodeOld = ref([]);
const searchs = ref();
-const userInfo=JSON.parse(window.localStorage.getItem('userInfo'));
-const pageParams=userInfo.user.menus[0].pages[0].params;
-const pageParamsJson=JSON.parse(pageParams);
+const userInfo = JSON.parse(window.localStorage.getItem('userInfo'));
+const pageParams = userInfo.user.menus[0].pages[0].params;
+const pageParamsJson = JSON.parse(pageParams);
const machineId = pageParamsJson.machineId;//褰撳墠椤甸潰鐨勮澶嘔D
console.log(machineId);
var errorScanId;
+
+// 鏂板锛氬畾鏃朵换鍔D锛堢敤浜庢竻闄ゅ畾鏃跺櫒锛�
+const timerId = ref(null);
+/**
+ * 鍗曟鎺ュ彛璇锋眰鍑芥暟
+ * 浣滅敤锛氳皟鐢ㄥ悗绔帴鍙o紝鑾峰彇鏁版嵁鍚庝氦缁� handleMessage 澶勭悊
+ */
+const fetchMachineData = async () => {
+ try {
+ // 宸查鍙栫殑浠诲姟鏁版嵁
+ request.post("/deviceInteraction/primitiveTask/findMachineTask",{
+ "id": machineId
+ }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
+ if (res.code === 200) {
+ // 鍋囪鍚庣杩斿洖鐨勬暟鎹牸寮忎笌 handleMessage 棰勬湡涓�鑷�
+ const responseData = res.data || {};
+ loadData.value = responseData;
+ }
+ });
+ // 绾夸笅鏁版嵁
+ } catch (err) {
+ console.error('瀹氭椂璇锋眰鍚庣鎺ュ彛銆愬凡棰嗗彇鐨勪换鍔℃暟鎹�戝け璐ワ細', err);
+ }
+ try {
+ // 鍙鍙栫殑浠诲姟鏁版嵁
+ request.post("/deviceInteraction/primitiveTask/findKBBTJPDrawingBP").then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
+ if (res.code === 200) {
+ // 鍋囪鍚庣杩斿洖鐨勬暟鎹牸寮忎笌 handleMessage 棰勬湡涓�鑷�
+ const responseData = res.data || {};
+ findPrimitiveTask.value = responseData;
+ }
+ });
+ } catch (err) {
+ console.error('瀹氭椂璇锋眰鍚庣鎺ュ彛銆愬彲棰嗗彇鐨勪换鍔℃暟鎹細瀹㈡埛琛ㄣ�戝け璐ワ細', err);
+ }
+ try {
+ // 璁惧鏁版嵁
+ request.post("/deviceInteraction/machine/findMachine", {
+ "id": machineId
+ }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
+ if (res.code === 200) {
+ // 鍋囪鍚庣杩斿洖鐨勬暟鎹牸寮忎笌 handleMessage 棰勬湡涓�鑷�
+ const responseData = res.data || {};
+ findMachine.value = responseData;
+ if (Object.keys(findMachine.value).length === 0) {
+ if (findMachine.value.mode == "1") {
+ modevalue.value = {
+ value: '1',
+ label: '鏍囧噯',
+ };
+ } else if (findMachine.value.mode == "2") {
+ modevalue.value = {
+ value: '2',
+ label: '瀹氬埗',
+ };
+ } else if (findMachine.value.mode == "3") {
+ modevalue.value = {
+ value: '3',
+ label: '鎵嬪姩',
+ };
+ }
+ }
+ }
+ });
+ } catch (err) {
+ console.error('瀹氭椂璇锋眰鍚庣鎺ュ彛澶辫触銆愯澶囨暟鎹�戯細', err);
+ }
+
+};
+
+/**
+ * 鍚姩瀹氭椂鍣�
+ * @param {number} interval - 瀹氭椂闂撮殧锛堟绉掞紝榛樿500ms锛屼笌鍚庣浠诲姟棰戠巼瀵归綈锛�
+ */
+const startTimer = (interval = 500) => {
+ // 鍏堟竻闄ゅ凡鏈夊畾鏃跺櫒锛堥伩鍏嶉噸澶嶅垱寤猴級
+ if (timerId.value) clearInterval(timerId.value);
+ // 绔嬪嵆鎵ц涓�娆★紙閬垮厤棣栨绛夊緟闂撮殧锛�
+ fetchMachineData();
+ // 鍒涘缓鏂板畾鏃跺櫒
+ timerId.value = setInterval(() => {
+ fetchMachineData();
+ }, interval);
+};
+
+/**
+ * 娓呴櫎瀹氭椂鍣紙閬垮厤鍐呭瓨娉勬紡锛�
+ */
+const clearTimer = () => {
+ if (timerId.value) {
+ clearInterval(timerId.value);
+ timerId.value = null; // 閲嶇疆ID
+ }
+};
+
+// 缁勪欢鍗歌浇鏃舵竻闄ゅ畾鏃跺櫒锛堝叧閿細閬垮厤缁勪欢閿�姣佸悗瀹氭椂鍣ㄤ粛杩愯锛�
+onUnmounted(() => {
+ clearTimer();
+});
+
+onMounted(async () => {
+ startTimer(500); // 500ms 闂撮殧锛堝彲鏍规嵁涓氬姟璋冩暣锛屽1000ms锛�
+ // //浣跨敤WebSocket鏂瑰紡灞曠ず鏁版嵁
+ // socket = initializeWebSocket(socketUrl, handleMessage);// 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
+ // //浣跨敤WebSocket鏂瑰紡灞曠ず鏁版嵁
+ // socketDownLineTask = initializeWebSocket(socketDownLineTaskUrl, handleMessage2);// 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
+});
+
+
//浣跨敤WebSocket鏂瑰紡灞曠ず鏁版嵁
let socket = null;
let socketDownLineTask = null;
@@ -38,25 +148,24 @@
// 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
-
const handleMessage = (data) => {
// 鏇存柊 tableData 鐨勬暟鎹�
- let dataJson = data[""+machineId][0];
+ let dataJson = data["" + machineId][0];
loadData.value = dataJson.findPrimitiveTasking[0];
findPrimitiveTask.value = dataJson.findPrimitiveTask[0];
findMachine.value = dataJson.machine[0];
- if(findMachine.value.mode=="1"){
+ if (findMachine.value.mode == "1") {
modevalue.value = {
- value: '1',
- label: '鏍囧噯',
- };
- }else if(findMachine.value.mode=="2"){
+ value: '1',
+ label: '鏍囧噯',
+ };
+ } else if (findMachine.value.mode == "2") {
modevalue.value = {
value: '2',
label: '瀹氬埗',
};
- }else if(findMachine.value.mode=="3"){
+ } else if (findMachine.value.mode == "3") {
modevalue.value = {
value: '3',
label: '鎵嬪姩',
@@ -87,40 +196,8 @@
socket = initializeWebSocket(socketUrl, handleMessage);// 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
//浣跨敤WebSocket鏂瑰紡灞曠ず鏁版嵁
socketDownLineTask = initializeWebSocket(socketDownLineTaskUrl, handleMessage2);// 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
-
+
});
-//鎶ヨ鎻愮ず
-const errorInfoFuntion = async (info) => {
- let infoScancode = '鎵爜ID锛�' + info.scanId + ' ' + info.scanCode;
- ElMessageBox.confirm(
- infoScancode,
- t('delivery.prompt'),
- {
- confirmButtonText: t('functionState.sureStart'),
- cancelButtonText: t('functionState.cancel'),
- type: 'warning',
- }
- )
- .then(() => {
- //閲嶆柊琛ュ崟
- request.post("/deviceInteraction/tasking/glassAgainTopLine",
- {
- "scanId": info.scanId,
- }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
- if (res.code === 200) {
- ElMessage.success(res.message);
- } else {
- ElMessage.warning(res.message)
- }
- })
- })
- .catch(() => {
- ElMessage({
- type: 'info',
- message: t('functionState.cancel'),
- })
- })
-}
//淇敼宸ヤ綔鐘舵�� 銆愬け璐�/姝e湪宸ヤ綔/瀹屽伐銆�
const workStatus = async (row, state) => {
let url;
@@ -134,161 +211,161 @@
return;
}
ElMessageBox.confirm(
- t('functionState.tips'),
- t('delivery.prompt'),
- {
- confirmButtonText: t('functionState.sure'),
- cancelButtonText: t('functionState.cancel'),
- type: 'warning',
- }
+ t('functionState.tips'),
+ t('delivery.prompt'),
+ {
+ confirmButtonText: t('functionState.sure'),
+ cancelButtonText: t('functionState.cancel'),
+ type: 'warning',
+ }
)
- .then(() => {
- //寮�濮嬩慨鏀�
- request.post(url,
- {
- "id": machineId
- }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
+ .then(() => {
+ //寮�濮嬩慨鏀�
+ request.post(url,
+ {
+ "id": machineId
+ }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
if (res.code === 200) {
ElMessage.success(res.message);
} else {
ElMessage.warning(res.message)
}
})
- })
- .catch(() => {
- ElMessage({
- type: 'info',
- message: t('functionState.cancel'),
})
- })
+ .catch(() => {
+ ElMessage({
+ type: 'info',
+ message: t('functionState.cancel'),
+ })
+ })
}
//瀹氬埗/鏍囧噯
const machineMode = async (mode) => {
ElMessageBox.confirm(
- t('functionState.tips'),
- t('delivery.prompt'),
- {
- confirmButtonText: t('functionState.sure'),
- cancelButtonText: t('functionState.cancel'),
- type: 'warning',
- }
+ t('functionState.tips'),
+ t('delivery.prompt'),
+ {
+ confirmButtonText: t('functionState.sure'),
+ cancelButtonText: t('functionState.cancel'),
+ type: 'warning',
+ }
)
- .then(() => {
- //涓嬬嚎鎺ュ彛
- request.post("/deviceInteraction/machine/toggleModeMachine",
- {
- "id": machineId,
- "mode": mode
- }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
+ .then(() => {
+ //涓嬬嚎鎺ュ彛
+ request.post("/deviceInteraction/machine/toggleModeMachine",
+ {
+ "id": machineId,
+ "mode": mode
+ }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
if (res.code === 200) {
ElMessage.success(res.message);
} else {
ElMessage.warning(res.message)
}
})
- })
- .catch(() => {
- ElMessage({
- type: 'info',
- message: t('functionState.cancel'),
})
- })
+ .catch(() => {
+ ElMessage({
+ type: 'info',
+ message: t('functionState.cancel'),
+ })
+ })
}
//寮�宸�/鏆傚仠
const machineStatus = async (state) => {
ElMessageBox.confirm(
- t('functionState.tips'),
- t('delivery.prompt'),
- {
- confirmButtonText: t('functionState.sure'),
- cancelButtonText: t('functionState.cancel'),
- type: 'warning',
- }
+ t('functionState.tips'),
+ t('delivery.prompt'),
+ {
+ confirmButtonText: t('functionState.sure'),
+ cancelButtonText: t('functionState.cancel'),
+ type: 'warning',
+ }
)
- .then(() => {
- //涓嬬嚎鎺ュ彛
- request.post("/deviceInteraction/machine/updateMachineState",
- {
- "id": machineId,
- "state": state
- }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
+ .then(() => {
+ //涓嬬嚎鎺ュ彛
+ request.post("/deviceInteraction/machine/updateMachineState",
+ {
+ "id": machineId,
+ "state": state
+ }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
if (res.code === 200) {
ElMessage.success(res.message);
} else {
ElMessage.warning(res.message)
}
})
- })
- .catch(() => {
- ElMessage({
- type: 'info',
- message: t('functionState.cancel'),
})
- })
+ .catch(() => {
+ ElMessage({
+ type: 'info',
+ message: t('functionState.cancel'),
+ })
+ })
}
//鐮存崯
const damagedTask = async (row) => {
ElMessageBox.confirm(
- t('functionState.tips'),
- t('delivery.prompt'),
- {
- confirmButtonText: t('functionState.sure'),
- cancelButtonText: t('functionState.cancel'),
- type: 'warning',
- }
+ t('functionState.tips'),
+ t('delivery.prompt'),
+ {
+ confirmButtonText: t('functionState.sure'),
+ cancelButtonText: t('functionState.cancel'),
+ type: 'warning',
+ }
)
- .then(() => {
- //涓嬬嚎鎺ュ彛
- request.post("/deviceInteraction/tasking/damagedTask",
- {
- "glassId": row.glassId
- }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
+ .then(() => {
+ //涓嬬嚎鎺ュ彛
+ request.post("/deviceInteraction/tasking/damagedTask",
+ {
+ "glassId": row.glassId
+ }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
if (res.code === 200) {
ElMessage.success(res.message);
} else {
ElMessage.warning(res.message)
}
})
- })
- .catch(() => {
- ElMessage({
- type: 'info',
- message: t('functionState.cancel'),
})
- })
+ .catch(() => {
+ ElMessage({
+ type: 'info',
+ message: t('functionState.cancel'),
+ })
+ })
}
//涓嬬嚎(鎷胯蛋)
const glassDownLine = async (row) => {
ElMessageBox.confirm(
- t('functionState.tips'),
- t('delivery.prompt'),
- {
- confirmButtonText: t('functionState.sure'),
- cancelButtonText: t('functionState.cancel'),
- type: 'warning',
- }
+ t('functionState.tips'),
+ t('delivery.prompt'),
+ {
+ confirmButtonText: t('functionState.sure'),
+ cancelButtonText: t('functionState.cancel'),
+ type: 'warning',
+ }
)
- .then(() => {
- //涓嬬嚎鎺ュ彛
- request.post("/deviceInteraction/tasking/glassDownLine",
- {
- "glassId": row.glassId,
- }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
+ .then(() => {
+ //涓嬬嚎鎺ュ彛
+ request.post("/deviceInteraction/tasking/glassDownLine",
+ {
+ "glassId": row.glassId,
+ }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
if (res.code === 200) {
ElMessage.success(res.message);
} else {
ElMessage.warning(res.message)
}
})
- })
- .catch(() => {
- ElMessage({
- type: 'info',
- message: t('functionState.cancel'),
})
- })
+ .catch(() => {
+ ElMessage({
+ type: 'info',
+ message: t('functionState.cancel'),
+ })
+ })
}
const topLineShow = async () => {
blind.value = true;
@@ -296,22 +373,22 @@
//棰嗗彇浠诲姟/缁撴潫浠诲姟
const startOrStopTask = async (row, line, isWorking) => {
ElMessageBox.confirm(
- t('functionState.tips'),
- t('delivery.prompt'),
- {
- confirmButtonText: t('functionState.sure'),
- cancelButtonText: t('functionState.cancel'),
- type: 'warning',
- }
+ t('functionState.tips'),
+ t('delivery.prompt'),
+ {
+ confirmButtonText: t('functionState.sure'),
+ cancelButtonText: t('functionState.cancel'),
+ type: 'warning',
+ }
)
- .then(() => {
- //棰嗗彇浠诲姟
- request.post("/deviceInteraction/primitiveTask/startOrStopPrimitiveTasking",
- {
- "id": row.id,
- "getLine": line,
- "isWorking": isWorking
- }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
+ .then(() => {
+ //棰嗗彇浠诲姟
+ request.post("/deviceInteraction/primitiveTask/startOrStopPrimitiveTasking",
+ {
+ "id": row.id,
+ "getLine": line,
+ "isWorking": isWorking
+ }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
if (res.code === 200) {
ElMessage.success(res.message);
} else {
@@ -319,13 +396,13 @@
ElMessage.warning(res.message)
}
})
- })
- .catch(() => {
- ElMessage({
- type: 'info',
- message: t('functionState.cancel'),
})
- })
+ .catch(() => {
+ ElMessage({
+ type: 'info',
+ message: t('functionState.cancel'),
+ })
+ })
}
const handleDialogClose = () => {
@@ -338,10 +415,10 @@
}
const filterTableData = computed(() =>
- loadData.value.filter(
- (data) =>
- !searchs.value || data.scanId.toLowerCase().includes(searchs.value.toLowerCase())
- )
+ loadData.value.filter(
+ (data) =>
+ !searchs.value || data.scanId.toLowerCase().includes(searchs.value.toLowerCase())
+ )
)
//涓嬫媺妗嗘ā寮忛�夋嫨
@@ -364,45 +441,45 @@
const modeShow = async () => {
blindMode.value = true;
- blindModeNumberLocal.value=findMachine.taskCount;
+ blindModeNumberLocal.value = findMachine.taskCount;
}
//妯″紡閫夋嫨鏃惰繘琛屽鐞�
const modeChange = async () => {
- let mode=modevalue.value;
+ let mode = modevalue.value;
request.post("/deviceInteraction/machine/toggleModeMachine",
- {
- "id": machineId,
- "mode": mode
- }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
- if (res.code === 200) {
- ElMessage.success(res.message);
- } else {
- ElMessage.warning(res.message)
- }
- })
- if(modevalue.value=='3'){
+ {
+ "id": machineId,
+ "mode": mode
+ }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
+ if (res.code === 200) {
+ ElMessage.success(res.message);
+ } else {
+ ElMessage.warning(res.message)
+ }
+ })
+ if (modevalue.value == '3') {
//褰撴槸鎵嬪姩妯″紡鏃跺脊绐楁彁绀� 璁剧疆涓婄墖鏁伴噺
blindMode.value = true;
}
-
+
}
//鎻愪氦淇敼鎵嬪姩妯″紡鐨勫惛鐗囨暟閲�
const fetchSubmit = async () => {
//鎵爜鍥炶溅鎻愪氦
request.post("/deviceInteraction/machine/manualOperationTask",
- {
- "id": machineId,
- "taskCount": blindModeNumberLocal.value,
- "finshCount": 0
- }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
- if (res.code === 200) {
- ElMessage.success(res.message);
- } else {
- ElMessage.warning(res.message)
- }
- })
- blindMode.value = false;
+ {
+ "id": machineId,
+ "taskCount": blindModeNumberLocal.value,
+ "finshCount": 0
+ }).then((res) => { // 鏇挎崲涓轰綘鐨凙PI绔偣
+ if (res.code === 200) {
+ ElMessage.success(res.message);
+ } else {
+ ElMessage.warning(res.message)
+ }
+ })
+ blindMode.value = false;
}
</script>
<template>
@@ -414,24 +491,26 @@
<!-- 鏈鍙栫殑鏍囧噯浠诲姟 -->
<el-table :data="findPrimitiveTask" stripe style="height:660px"
- :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }"
- :cell-style="{ textAlign: 'center' }">
+ :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }"
+ :cell-style="{ textAlign: 'center' }">
<!-- <el-table-column type="selection" min-width="30" /> -->
- <el-table-column type="index" :label="$t('glassInfo.number')" min-width="30" />
- <el-table-column prop="batchNumber" :label="$t('glassInfo.batchNumber')" />
- <el-table-column prop="taskType" :label="$t('glassInfo.taskType')" />
- <el-table-column prop="scanId" :label="$t('glassInfo.scanId')" />
- <el-table-column prop="length" :label="$t('glassInfo.length')" />
- <el-table-column prop="width" :label="$t('glassInfo.width')" />
- <el-table-column prop="thickness" :label="$t('glassInfo.thickness')" />
- <el-table-column prop="taskQuantity" :label="$t('glassInfo.taskQuantity')" />
- <el-table-column prop="reportCount" :label="$t('glassInfo.reportCount')" />
- <el-table-column prop="workState" :label="$t('glassInfo.workState')" />
+ <el-table-column type="index" :label="$t('glassInfo.number')" min-width="30"/>
+ <el-table-column prop="batchNumber" :label="$t('glassInfo.batchNumber')"/>
+ <el-table-column prop="taskType" :label="$t('glassInfo.taskType')"/>
+ <el-table-column prop="scanId" :label="$t('glassInfo.scanId')"/>
+ <el-table-column prop="length" :label="$t('glassInfo.length')"/>
+ <el-table-column prop="width" :label="$t('glassInfo.width')"/>
+ <el-table-column prop="thickness" :label="$t('glassInfo.thickness')"/>
+ <el-table-column prop="taskQuantity" :label="$t('glassInfo.taskQuantity')"/>
+ <el-table-column prop="reportCount" :label="$t('glassInfo.reportCount')"/>
+ <el-table-column prop="workState" :label="$t('glassInfo.workState')"/>
<el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="70">
<template #default="scope">
<el-button size="small" link type="primary" plain @click="startOrStopTask(scope.row, findMachine.id, 1)">{{
- $t('functionState.getTask') }}</el-button>
+ $t('functionState.getTask')
+ }}
+ </el-button>
</template>
</el-table-column>
</el-table>
@@ -444,15 +523,16 @@
</div>
<div>
鎵嬪姩杈撳叆涓婄墖鏁伴噺锛�
- <el-input v-model="blindModeNumberLocal" style="width: 200px;" type="Number" id="blindMode" @keyup.enter="fetchSubmit"></el-input>
-
+ <el-input v-model="blindModeNumberLocal" style="width: 200px;" type="Number" id="blindMode"
+ @keyup.enter="fetchSubmit"></el-input>
+
</div>
<!-- <div>
<el-button size="mini" link type="primary" plain @click="startOrStopTask(scope.row, 2, 2)">纭</el-button>
<el-button size="mini" link type="primary" plain @click="startOrStopTask(scope.row, 2, 2)">鍙栨秷</el-button>
</div> -->
</el-dialog>
- <hr />
+ <hr/>
<br>
<div id="search">
<!-- 鍔熻兘 -->
@@ -460,33 +540,40 @@
<div class="flex flex-wrap gap-4 items-center">
涓婄墖鏈鸿繍琛屾ā寮�:
<el-select v-model="modevalue" @change="modeChange" placeholder="璇烽�夋嫨妯″紡" size="large" style="width: 220px">
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
+ <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"/>
</el-select>
-
+
<span>
- <span @click="modeShow" style="margin-left: 40px;">{{ findMachine.mode=="3"? ("涓婄墖鏁伴噺锛�"+findMachine.taskCount):"" }}</span>
- <span style="margin-left: 40px;">{{ findMachine.mode=="3"? ("宸插畬鎴愭暟閲忥細"+findMachine.finshCount):"" }}</span>
+ <span @click="modeShow" style="margin-left: 40px;">{{
+ findMachine.mode == "3" ? ("涓婄墖鏁伴噺锛�" + findMachine.taskCount) : ""
+ }}</span>
+ <span style="margin-left: 40px;">{{
+ findMachine.mode == "3" ? ("宸插畬鎴愭暟閲忥細" + findMachine.finshCount) : ""
+ }}</span>
</span>
-
-
+
+
</div>
<br>
<el-button :type="(findMachine['state'] == '鏆傚仠' ? 'danger' : 'success')" id="ButtonMachineStatus"
- @click="machineStatus((findMachine['state'] == '鏆傚仠' ? '寮�宸�' : '鏆傚仠'))">{{ findMachine['state'] == '寮�宸�' ?
- $t('functionState.start') : $t('functionState.stop') }}</el-button>
+ @click="machineStatus((findMachine['state'] == '鏆傚仠' ? '寮�宸�' : '鏆傚仠'))">{{
+ findMachine['state'] == '寮�宸�' ?
+ $t('functionState.start') : $t('functionState.stop')
+ }}
+ </el-button>
<el-button type="primary" id="ButtonTopLine" @click="topLineShow">{{ $t('functionState.getTask') }}</el-button>
</div>
<div id="main-body" style="min-height:240px;">
<!-- 琛ㄦ牸鍐呭 -->
<el-table :data="filterTableData" stripe style="height:260px"
- :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }"
- :cell-style="{ textAlign: 'center' }">
+ :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }"
+ :cell-style="{ textAlign: 'center' }">
<!-- <el-table-column type="selection" min-width="30" /> -->
- <el-table-column type="index" :label="$t('glassInfo.number')" min-width="30" />
- <el-table-column prop="batchNumber" sortable :label="$t('glassInfo.batchNumber')" />
- <el-table-column prop="taskType" sortable :label="$t('glassInfo.taskType')" />
+ <el-table-column type="index" :label="$t('glassInfo.number')" min-width="30"/>
+ <el-table-column prop="batchNumber" sortable :label="$t('glassInfo.batchNumber')"/>
+ <el-table-column prop="taskType" sortable :label="$t('glassInfo.taskType')"/>
<el-table-column prop="scanId" :label="$t('glassInfo.scanId')">
<template #header>
<div>
@@ -496,30 +583,32 @@
<el-input v-model="searchs" type="primary" id="ReportSubmission" @keyup.enter="fetchData"></el-input>
<template #reference>
<el-icon>
- <Filter />
+ <Filter/>
</el-icon>
</template>
</el-popover>
<el-icon>
- <CaretTop />
+ <CaretTop/>
</el-icon>
<el-icon>
- <CaretBottom />
+ <CaretBottom/>
</el-icon>
<!-- <el-input v-model="searchs" type="primary" id="ReportSubmission" @keyup.enter="fetchData"></el-input> -->
<!-- <el-input size="small" placeholder="Type to search" /> -->
</div>
</template>
</el-table-column>
- <el-table-column prop="length" sortable :label="$t('glassInfo.length')" />
- <el-table-column prop="width" sortable :label="$t('glassInfo.width')" />
- <el-table-column prop="thickness" sortable :label="$t('glassInfo.thickness')" />
- <el-table-column prop="taskQuantity" sortable :label="$t('glassInfo.taskQuantity')" />
- <el-table-column prop="isWorking" sortable :label="$t('glassInfo.isWorking')" />
+ <el-table-column prop="length" sortable :label="$t('glassInfo.length')"/>
+ <el-table-column prop="width" sortable :label="$t('glassInfo.width')"/>
+ <el-table-column prop="thickness" sortable :label="$t('glassInfo.thickness')"/>
+ <el-table-column prop="taskQuantity" sortable :label="$t('glassInfo.taskQuantity')"/>
+ <el-table-column prop="isWorking" sortable :label="$t('glassInfo.isWorking')"/>
<el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270">
<template #default="scope">
<el-button size="mini" link type="primary" plain @click="startOrStopTask(scope.row, 2, 2)">{{
- $t('functionState.stopTask') }}</el-button>
+ $t('functionState.stopTask')
+ }}
+ </el-button>
</template>
</el-table-column>
</el-table>
@@ -533,9 +622,9 @@
</div> -->
<div style="width: 30%;min-width: 300px; height: 460px;float: left;padding: 20px;;">
<el-table :data="sendRecords" stripe
- :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center', height: '30px' }"
- :cell-style="{ textAlign: 'center' }">
- <el-table-column prop="sendContent" :label="$t('glassInfo.sendContent')" />
+ :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center', height: '30px' }"
+ :cell-style="{ textAlign: 'center' }">
+ <el-table-column prop="sendContent" :label="$t('glassInfo.sendContent')"/>
</el-table>
</div>
<div style="clear锛歜oth"></div>
--
Gitblit v1.8.0