lkk
2024-12-16 c7b33db117fd2893d7d1c93bf5d46e87d33e44d0
src/views/sampling/sampling/index.vue
@@ -391,6 +391,9 @@
      ids: [],
      // 绑定单选按钮
      tjStatus: "1",
      dayinData: [],
      jsonObj: {},
      // 非单个禁用
      single: true,
      // 非多个禁用
@@ -974,7 +977,6 @@
    buda() {
      var websocket = null;
      var url = this.valueUrl;
      if ("WebSocket" in window) {
        websocket = new WebSocket(url);
@@ -989,8 +991,7 @@
      };
      websocket.onopen = () => {
        this.websocket = websocket;
        var list = this.selectList;
        var data = list.map((item) => ({
        this.dayinData = this.selectList.map((item) => ({
          jyxh: item.jyxh,
          proName: item.proName,
          cusName: item.cusName,
@@ -999,24 +1000,21 @@
          cardId: item.cardId,
          tjTime: item.createTime,
        }));
        console.log(this.dayinData, 2222);
        // 连接设备
        var jsonObj = {
        this.jsonObj = {
          type: "3",
          array: {
            data: data,
            data: this.dayinData,
          },
        };
        var jStr = JSON.stringify(jsonObj);
        var jStr = JSON.stringify(this.jsonObj);
        this.websocket.send(jStr);
        var jsonObj = {};
        this.dialogVisible = false;
        this.jsonObj = {};
        // this.dialogVisible = false;
      };
      // websocket.onmessage = (event) => {
      //   var resultObj = eval("(" + event.data + ")");
      //   console.log(resultObj, 9988);
      // };
      this.getList();
      // this.getList();
    },
    // 确认采样
@@ -1079,8 +1077,8 @@
            websocket.onmessage = (event) => {
              var resultObj = eval("(" + event.data + ")");
              console.log(resultObj, 9988);
            };
 */
            }; */
            // this.Collection();
            this.getList();
          } else {