| | |
| | | <div
|
| | | slot="header"
|
| | | class="clearfix"
|
| | | style="display: flex; align-items: center"
|
| | | style="display: flex; align-items: center;margin-top: -20px;"
|
| | | >
|
| | | <!-- 左侧按钮组 -->
|
| | | <div>
|
| | |
| | | >
|
| | | <el-button type="success" size="mini">吊装位入库</el-button>
|
| | | </div>
|
| | |
|
| | | <!-- 右侧选择框 -->
|
| | | <el-form-item style="margin-top: 15px; width: 150px">
|
| | | <el-form-item style="margin-top: 15px; width: 150px;margin-left: 10px;">
|
| | | <el-select v-model="formData2.dzw" placeholder="请选择吊装位">
|
| | | <el-option label="吊装位1" value="吊装位1"></el-option>
|
| | | <el-option label="吊装位2" value="吊装位2"></el-option>
|
| | |
| | |
|
| | |
|
| | | <script setup>
|
| | | import { ref, onMounted, onBeforeUnmount } from "vue"; // 导入 Vue 3 的模块
|
| | | import { ref, onMounted, onBeforeUnmount,onUnmounted } from "vue"; // 导入 Vue 3 的模块
|
| | | //import * as echarts from 'echarts';
|
| | | import { ElMessage, ElMessageBox } from "element-plus";
|
| | | // import {tableData} from '@/stores/tableData.js';
|
| | |
| | | row.enableState = 1 - row.enableState; // Toggle between 0 and 1
|
| | | // 此处可以添加保存状态的逻辑,比如调用 API 更新数据
|
| | | };
|
| | | let socket = null;
|
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/glassStorage/api/talk/storageTask`;
|
| | | // 定义消息处理函数,更新 receivedData 变量
|
| | | const handleMessage = (data) => {
|
| | |
| | | // 替换原来的 createTime 字段为格式化后的日期时间字符串
|
| | | item.startTime = formattedDateTime;
|
| | | });
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | };
|
| | |
|
| | | onMounted(() => {
|
| | | initializeWebSocket(socketUrl, handleMessage);
|
| | | socket = initializeWebSocket(socketUrl, handleMessage);
|
| | | });
|
| | | onUnmounted(() => {
|
| | | if (socket) {
|
| | | closeWebSocket(socket);
|
| | | }
|
| | | });
|
| | | onBeforeUnmount(() => {
|
| | | console.log("关闭了");
|
| | | closeWebSocket();
|