From 7d9d48cf1e9d5b28e59ea52a0ee1acdfd15f88e7 Mon Sep 17 00:00:00 2001
From: IPC-610 <IPC-610@DESKTOP-6LEOOS3>
Date: 星期二, 07 一月 2025 08:32:34 +0800
Subject: [PATCH] 问题修改

---
 Web/src/views/device/alarmManage/index.vue |   50 ++++++++++++++++++++++++++++++--------------------
 1 files changed, 30 insertions(+), 20 deletions(-)

diff --git a/Web/src/views/device/alarmManage/index.vue b/Web/src/views/device/alarmManage/index.vue
index a69788f..492665b 100644
--- a/Web/src/views/device/alarmManage/index.vue
+++ b/Web/src/views/device/alarmManage/index.vue
@@ -11,9 +11,10 @@
 					<el-table-column prop="alarmName" label="鎻忚堪" align="center"></el-table-column>
 					<el-table-column prop="stationNum" label="浣嶇疆" align="center"></el-table-column>
 					<el-table-column prop="alarmTime" label="鏃堕棿" align="center"></el-table-column>
-					<el-table-column label="鎿嶄綔" width="80" align="center" fixed="right" show-overflow-tooltip="" >
+					<el-table-column label="鎿嶄綔" width="80" align="center" fixed="right" show-overflow-tooltip="">
 						<template #default="scope">
-							<el-button icon="ele-Check" size="small" text="" type="primary" @click="topUpAlarm(scope.row)" >鎭㈠</el-button>
+							<el-button icon="ele-Check" size="small" text="" type="primary"
+								@click="topUpAlarm(scope.row)">鎭㈠</el-button>
 						</template>
 					</el-table-column>
 				</el-table>
@@ -65,15 +66,18 @@
 import { ElMessageBox, ElMessage } from "element-plus";
 import { cellsDataLine, cellsDataOne, cellsDataTwo, cellsDataThree } from './data';
 import { auth } from '/@/utils/authFunction';
+import Index from '../deviceInfo/index.vue';
 
 //杩炴帴signalR 鐩戝惉鍙樻洿
 onMounted(async () => {
 	signalR.off('PublicAlarm');
 	signalR.on('PublicAlarm', (dataArray: any) => {
 		dataArray.forEach(data => {
-			console.log(data);
+			console.log("1111111:"+data);
 			// 鏇存柊 tableData
 			const index = tableData.value.findIndex(t => t.id == data.id);
+			console.log("2222222:"+index.value);
+			
 			if (index === -1 && data.status == 1) {
 				// 濡傛灉涓嶅瓨鍦紝娣诲姞鏂版暟鎹�
 				tableData.value.unshift(data);
@@ -195,7 +199,7 @@
 // 		row.Layer = 3;
 // 	}
 // 	row.TypeName = type;
-	
+
 // 	console.log(row);
 // 	var res = await WriteInfo(row);
 // 	console.log(res.data.result);
@@ -203,22 +207,28 @@
 // }
 //鎶ヨ鎭㈠
 const topUpAlarm = async (row: any) => {
-  ElMessageBox.confirm(`纭畾瑕佹姤璀︽仮澶嶄换鍔″悧?`, "鎻愮ず", {
-    confirmButtonText: "纭畾",
-    cancelButtonText: "鍙栨秷",
-    type: "warning",
-  })
-    .then(async () => {
-      var param = Object.assign(row);
-	  console.log(row.stationNum);
-	  console.log(param);
-	  
-    //   await topUpWcsTask(param);
-    //   handleQuery();
-    //   handleQuery2();
-      ElMessage.success("缃《浠诲姟鎴愬姛"+param);
-    })
-    .catch(() => { });
+	ElMessageBox.confirm(`纭畾瑕佹姤璀︽仮澶嶄换鍔″悧?`, "鎻愮ず", {
+		confirmButtonText: "纭畾",
+		cancelButtonText: "鍙栨秷",
+		type: "warning",
+	})
+	.then(async () => {
+		var param = Object.assign(row);
+		console.log("row.stationNum:"+row.stationNum);
+		console.log("layer.value:"+layer.value);
+		var data = {
+			LocatNo: row.stationNum,//宸ヤ綅
+			Layer: layer.value,//妤煎眰
+		}
+
+		var res = await WriteInfo(data);
+		console.log("res.data.result:"+res.data.result);
+		//   await topUpWcsTask(param);
+		//   handleQuery();
+		//   handleQuery2();
+		// ElMessage.success("鎶ヨ鎭㈠澶辫触锛�" + res.data.result);
+	})
+	.catch(() => { });
 
 }
 

--
Gitblit v1.8.0