From 4c2306b012351c27fbd457126e65d885478a6fb4 Mon Sep 17 00:00:00 2001
From: IPC-610 <IPC-610@DESKTOP-6LEOOS3>
Date: 星期三, 30 十月 2024 11:34:42 +0800
Subject: [PATCH] qwe
---
Web/src/views/device/alarmManage/index.vue | 49 +++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/Web/src/views/device/alarmManage/index.vue b/Web/src/views/device/alarmManage/index.vue
index 13d6956..a69788f 100644
--- a/Web/src/views/device/alarmManage/index.vue
+++ b/Web/src/views/device/alarmManage/index.vue
@@ -11,6 +11,11 @@
<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="" >
+ <template #default="scope">
+ <el-button icon="ele-Check" size="small" text="" type="primary" @click="topUpAlarm(scope.row)" >鎭㈠</el-button>
+ </template>
+ </el-table-column>
</el-table>
<el-pagination v-model:currentPage="tableParams.page" v-model:page-size="tableParams.pageSize"
:total="tableParams.total" :page-sizes="[10, 20, 50, 100, 200, 500]" size="small" background=""
@@ -55,9 +60,11 @@
import { ref, reactive, onMounted, computed } from 'vue';
import 'splitpanes/dist/splitpanes.css';
import { listWcsAlarmInfo, resetWcsAlarmInfo } from '/@/api/wcs/wcsAlarmInfo';
+import { WriteInfo } from '/@/api/wcs/wcsDevice';
import { signalR } from './signalR';
import { ElMessageBox, ElMessage } from "element-plus";
import { cellsDataLine, cellsDataOne, cellsDataTwo, cellsDataThree } from './data';
+import { auth } from '/@/utils/authFunction';
//杩炴帴signalR 鐩戝惉鍙樻洿
onMounted(async () => {
@@ -84,7 +91,6 @@
}
}
}
-
// 鏇存柊杈撻�佺嚎鏁版嵁
updateCellData(cellsDataOne.value, data);
updateCellData(cellsDataTwo.value, data);
@@ -96,10 +102,11 @@
function updateCellData(cellsData: any[], data: any) {
const foundCell = cellsData.find(cell => cell.Code === data.stationNum);
if (foundCell) {
+ //涓�涓偣浣嶆湁涓�涓俊鎭姤璀﹀氨瑙﹀彂鎶ヨ锛屽彇娑堟姤璀﹂渶瑕佺‘璁よ繖涓偣浣嶆病鏈変换浣曟姤璀︿俊鎭�
if (data.status == 1) {
foundCell.IsUse = 4;
}
- else {
+ else if (tableData.value.findIndex(c => c.stationNum == foundCell.Code) == -1) {
foundCell.IsUse = 0;
}
}
@@ -177,6 +184,44 @@
cellsData.value = cellsDataThree.value;
}
}
+
+// const write = async (type: string,row: any) => {
+// if (floorStates.value.isPlain1 == false) {
+// row.Layer = 1;
+// }else if(floorStates.value.isPlain2 == false){
+// row.Layer = 2;
+// }
+// else if(floorStates.value.isPlain3 == false){
+// row.Layer = 3;
+// }
+// row.TypeName = type;
+
+// console.log(row);
+// var res = await WriteInfo(row);
+// console.log(res.data.result);
+// ElMessage.success(res.data.result);
+// }
+//鎶ヨ鎭㈠
+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(() => { });
+
+}
+
</script>
<style scoped>
--
Gitblit v1.8.0