From f79859bfe38baab95b9193aeccca51f72dd6e1fe Mon Sep 17 00:00:00 2001
From: liudl <673013083@qq.com>
Date: 星期四, 16 一月 2025 09:08:02 +0800
Subject: [PATCH] 新增结批总数量接口(未写内容)
---
Web/src/views/device/alarmManage/index.vue | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 54 insertions(+), 1 deletions(-)
diff --git a/Web/src/views/device/alarmManage/index.vue b/Web/src/views/device/alarmManage/index.vue
index 35f76d1..11ef7a2 100644
--- a/Web/src/views/device/alarmManage/index.vue
+++ b/Web/src/views/device/alarmManage/index.vue
@@ -11,6 +11,12 @@
<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,18 +61,21 @@
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';
+import Index from '../deviceInfo/index.vue';
//杩炴帴signalR 鐩戝惉鍙樻洿
onMounted(async () => {
signalR.off('PublicAlarm');
signalR.on('PublicAlarm', (dataArray: any) => {
dataArray.forEach(data => {
- console.log(data);
// 鏇存柊 tableData
const index = tableData.value.findIndex(t => t.id == data.id);
+
if (index === -1 && data.status == 1) {
// 濡傛灉涓嶅瓨鍦紝娣诲姞鏂版暟鎹�
tableData.value.unshift(data);
@@ -177,6 +186,50 @@
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:"+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(() => { });
+
+}
+
</script>
<style scoped>
--
Gitblit v1.8.0