| | |
| | | :purchaseDialog="purchaseDialog" @resetPurchaseDialog="resetPurchaseDialog"></purchase-verification> |
| | | <!--查看工时弹框--> |
| | | <viewManHourDia ref="viewManHourDia" @submit="openAddVerifyDia"></viewManHourDia> |
| | | <button @click="sss">连接串口</button> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | { |
| | | name: "1285nm~1330nm", |
| | | arr: [12, 13, 14, 15], |
| | | // 初始化 getDataIndex1 为数组 |
| | | getDataIndex1: [], |
| | | isShowSelect: false, |
| | | maxNum: 5 |
| | | }, |
| | | { |
| | | name: "1525nm~1575nm", |
| | | arr: [12, 13, 14, 15], |
| | | // 初始化 getDataIndex1 为数组 |
| | | getDataIndex1: [], |
| | | isShowSelect: false, |
| | | maxNum: 5 |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | { |
| | | name: "截至波长", |
| | | arr: [12, 13, 14, 15], |
| | | // 初始化 getDataIndex1 为数组 |
| | | getDataIndex1: [], |
| | | isShowSelect: false, |
| | | maxNum: 5 |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | this.startWorker(); |
| | | // this.getList0() // 任务切换 |
| | | this.scrollInit(); |
| | | disconnect() |
| | | }, |
| | | activated() { |
| | | this.getTypeDicts(); // 获取紧急程度下拉框选项 |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | // getDataAcquisitionDevice() { |
| | | // if (this.isSerialConnected) { |
| | | // connect(); |
| | | // } |
| | | // // return |
| | | // let itemIds = []; |
| | | // this.currentSample.insProduct.forEach((item) => { |
| | | // if (item.inspectionItemType === "1") { |
| | | // itemIds.push(item.id); |
| | | // } |
| | | // }); |
| | | // const params = { |
| | | // entrustCode: this.insOrder.entrustCode, |
| | | // sampleCode: this.currentSample.sampleCode, |
| | | // id: this.currentSample.id, |
| | | // itemIds: itemIds, |
| | | // }; |
| | | // this.dataAcquisitionLoading = true; |
| | | // dataCollection(params).then((res) => { |
| | | // this.dataAcquisitionLoading = false; |
| | | // if (res.code != 200) { |
| | | // return; |
| | | // } |
| | | // this.dataAcquisitionInfoNew = this.HaveJson(res.data); |
| | | // // 对数采回来的值进行处理 |
| | | // this.handleDataAcquisition(res.data); |
| | | // }).catch(err => { |
| | | // this.dataAcquisitionLoading = false; |
| | | // }); |
| | | // }, |
| | | // 假设存在一个方法用于更新串口连接状态 |
| | | // updateSerialConnectionStatus(status) { |
| | | // this.isSerialConnected = status; |
| | | // }, |
| | | |
| | | objectOrder(obj) { |
| | | let newkey = Object.keys(obj).sort(); |
| | | let newObj = {}; |
| | |
| | | return newObj; |
| | | }, |
| | | handleDataAcquisition(data, noDialog) { |
| | | console.log(data); |
| | | // 是否可以编辑数采数据 |
| | | if (this.dataAcquisitionEidtAble) { |
| | | this.getDataType = 1; |
| | |
| | | }; |
| | | } |
| | | let list = this.tableList[0].arr; |
| | | console.log(this.tableList[0]); |
| | | // 循环页面列表信息,判断数采数据对应页面列表信息的检验项是哪个,并给当前检验项绑定设备信息 |
| | | list.forEach((item, index) => { |
| | | let num0 = 0; |
| | |
| | | } |
| | | }; |
| | | let list = this.tableList[0].arr; |
| | | console.log(this.tableList[0]); |
| | | let maxNum = 0; |
| | | list.forEach((item, index) => { |
| | | let num0 = 0; |
| | |
| | | } else { |
| | | // 如果都不存在,则,进入处理数采线程里去处理数据 |
| | | try { |
| | | console.log(this.dataAcquisitionInfo); |
| | | // 向 Worker 发送消息,开始处理逻辑 |
| | | this.getDataIndexLoading = false; |
| | | this.dataGetDia = false; |