yaowanxin
2 天以前 ae8d12c499079cf95d961bce28f6c677446130b0
src/views/business/inspectionTask/inspection.vue
@@ -598,6 +598,7 @@
        sampleName: null,
        state: null,
      },
      isSerialConnected: false, // 新增状态变量,串口连接状态
      id: null,
      changeType: null,
      insOrder: {},
@@ -1130,9 +1131,12 @@
      this.$refs.purchaseDialog.$refs["purchaseForm"].resetFields();
      this.purchaseDialog = false;
    },
    // 数据采集
    getDataAcquisitionDevice() {
      // connect()
      if (this.isSerialConnected) {
        connect();
      }
      // return
      let itemIds = [];
      this.currentSample.insProduct.forEach((item) => {
@@ -1159,6 +1163,11 @@
        this.dataAcquisitionLoading = false;
      });
    },
    // 假设存在一个方法用于更新串口连接状态
    // updateSerialConnectionStatus(status) {
    //   this.isSerialConnected = status;
    // },
    objectOrder(obj) {
      let newkey = Object.keys(obj).sort();
      let newObj = {};
@@ -1220,6 +1229,7 @@
              };
            }
            let list = this.tableList[0].arr;
            console.log(this.tableList[0]);
            // 循环页面列表信息,判断数采数据对应页面列表信息的检验项是哪个,并给当前检验项绑定设备信息
            list.forEach((item, index) => {
              let num0 = 0;