From 8f8dfc2652f11931a3ee953a434233fdf71149d2 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期三, 12 六月 2024 09:32:13 +0800
Subject: [PATCH] 增加接口的返回是否成功,清理钢化文件
---
UI-Project/src/views/Returns/returns.vue | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/UI-Project/src/views/Returns/returns.vue b/UI-Project/src/views/Returns/returns.vue
index 7f8942c..2aadf11 100644
--- a/UI-Project/src/views/Returns/returns.vue
+++ b/UI-Project/src/views/Returns/returns.vue
@@ -13,7 +13,7 @@
const adda = ref(false)
const flake = ref(false)
const flakea = ref(false)
-import { WebSocketHost } from '@/utils/constants'
+import { WebSocketHost ,host} from '@/utils/constants'
import request from "@/utils/request"
const ida = ref(null);
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
@@ -25,9 +25,9 @@
const selectedValuea = ref('');
const selectedValueb = ref('');
const selectedValuec = ref('');
-const upstatus = ref(''); // 鍋囪杩欎釜鐢ㄤ簬鏄剧ず鑷姩/鎵嬪姩鐘舵��
+const upstatus = ref('涓婄墖鏈烘墜鍔ㄧ姸鎬侊細'); // 鍋囪杩欎釜鐢ㄤ簬鏄剧ず鑷姩/鎵嬪姩鐘舵��
const cuttingMachine = ref(''); // 鍋囪杩欎釜鐢ㄤ簬瀛樺偍鍚庣杩斿洖鐨勭姸鎬佸�硷紙0鎴�1锛�
-const cuttingMachineStatusColor = ref(''); // 鐢ㄤ簬鍔ㄦ�佽缃甶鏍囩鐨勮儗鏅壊
+const cuttingMachineStatusColor = ref('#911005'); // 鐢ㄤ簬鍔ㄦ�佽缃甶鏍囩鐨勮儗鏅壊
const inKageWord = ref(0); // 鐢ㄤ簬瀛樺偍瑕佷紶閫掔粰鎺ュ彛鐨刬nKageWord鍊�
const options = ref<any[]>([]); // 涓嬫媺閫夐」鍒楄〃
const selectOptions = ref<Array<any>>([]); // 涓嬫媺閫夐�夐」鏁扮粍
@@ -102,7 +102,7 @@
const titleSelectJsona = ref({
processTypea: [],
})
-const socketUrl = `ws://${WebSocketHost}:88/api/loadGlass/api/talk/loadGlass`;
+const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlass`;
// 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
const handleMessage = (data) => {
// 鏇存柊 tableData 鐨勬暟鎹�
@@ -497,7 +497,7 @@
-const wsUrl = `ws://${WebSocketHost}:88/api/loadGlass/api/talk/loadGlass`;
+const wsUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlass`;
const ws = new WebSocket(wsUrl);
ws.onopen = () => {
console.log('WebSocket杩炴帴宸叉墦寮�');
@@ -526,7 +526,7 @@
const status = data.InkageStatus[0];
cuttingMachine.value = status;
upstatus.value = status === '1' ? '涓婄墖鏈鸿仈鏈虹姸鎬侊細' : '涓婄墖鏈烘墜鍔ㄧ姸鎬侊細';
- cuttingMachineStatusColor.value = status === '1' ? '#911005' : 'green';
+ cuttingMachineStatusColor.value = status === '1' ? 'green' : '#911005';
inKageWord.value = status === '1' ? 0 : 1;
} else {
// 澶勭悊閿欒鎯呭喌鎴栨棤鏁堟暟鎹�
@@ -544,7 +544,7 @@
if (response.code == 200) {
const status = response.data.status;
upstatus.value = status === '1' ? '涓婄墖鏈鸿仈鏈虹姸鎬侊細' : '涓婄墖鏈烘墜鍔ㄧ姸鎬侊細';
- cuttingMachineStatusColor.value = status === '1' ? '#911005' : 'green';
+ cuttingMachineStatusColor.value = status === '1' ? 'green' : '#911005';
// 鏄剧ず鎴愬姛娑堟伅
ElMessage.success(response.message);
} else {
@@ -575,7 +575,7 @@
<el-button style="margin-top: 5px;margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisible = true">閫夋嫨宸ョ▼</el-button>
<el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="primary" @click="handleBind">寮�濮嬩笂鐗�</el-button>
<el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="warning" @click="handleBinda">鏆傚仠</el-button>
- <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="danger" @click="handleBindb">鍋滄浠诲姟</el-button>
+ <!-- <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="danger" @click="handleBindb">鍋滄浠诲姟</el-button> -->
<el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading">
<div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
--
Gitblit v1.8.0