wxw
2025-06-09 dbde3162fd361dcba4316b58754ccecf39a81a9f
Web/src/views/device/alarmManage/index.vue
@@ -11,12 +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="">
               <!-- <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-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=""
@@ -66,15 +66,16 @@
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);
@@ -211,15 +212,15 @@
   })
   .then(async () => {
      var param = Object.assign(row);
      console.log(row.stationNum);
      console.log(layer.value);
      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);
      console.log("res.data.result:"+res.data.result);
      //   await topUpWcsTask(param);
      //   handleQuery();
      //   handleQuery2();