|  |  | 
 |  |  |           <el-button :loading="dataAcquisitionLoading" v-if="state == 1" size="small" type="primary" | 
 |  |  |             @click="getDataAcquisitionDevice">数据采集</el-button> | 
 |  |  |           <el-button :type="dataAcquisitionEidtAble ? '' : 'primary'" v-if="state == 1" size="small" | 
 |  |  |             @click="dataAcquisitionEidtAble = !dataAcquisitionEidtAble,disconnect()">{{ dataAcquisitionEidtAble ? "关闭编辑" : "编辑数采" | 
 |  |  |             @click="dataAcquisitionEidtAble = !dataAcquisitionEidtAble">{{ dataAcquisitionEidtAble ? "关闭编辑" : "编辑数采" | 
 |  |  |             }}</el-button> | 
 |  |  |         </div> | 
 |  |  |       </div> | 
 |  |  | 
 |  |  |         <el-button :loading="submitLoading" type="primary" @click="submit()">确 定</el-button> | 
 |  |  |       </span> | 
 |  |  |     </el-dialog> | 
 |  |  |      <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" | 
 |  |  |     :visible.sync="dataGetDia" title="数据采集" width="80%"> | 
 |  |  |     <div> | 
 |  |  |       <table border="1" cellpadding="10" class="thermal-table"> | 
 |  |  |         <tr> | 
 |  |  |           <td style="width: 120px">检验项分类</td> | 
 |  |  |           <td style="width: 120px">检验项</td> | 
 |  |  |           <td style="width: 120px">检验子项</td> | 
 |  |  |           <td>数采数据</td> | 
 |  |  |         </tr> | 
 |  |  |         <template v-for="(item, index) in getData"> | 
 |  |  |     <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" | 
 |  |  |       :visible.sync="dataGetDia" title="数据采集" width="80%"> | 
 |  |  |       <div> | 
 |  |  |         <table border="1" cellpadding="10" class="thermal-table"> | 
 |  |  |           <tr> | 
 |  |  |             <td :rowspan="item.child.length">{{ item.sortName }}</td> | 
 |  |  |             <td :rowspan="item.child.length">{{ item.faName }}</td> | 
 |  |  |             <td>{{ item.child[0].name }}</td> | 
 |  |  |             <td style="text-align: left"> | 
 |  |  |               <!-- 添加容器 div --> | 
 |  |  |               <div class="data-collection-items"> | 
 |  |  |             <td style="width: 120px">检验项分类</td> | 
 |  |  |             <td style="width: 120px">检验项</td> | 
 |  |  |             <td style="width: 120px">检验子项</td> | 
 |  |  |             <td>数采数据</td> | 
 |  |  |           </tr> | 
 |  |  |           <template v-for="(item, index) in getData"> | 
 |  |  |             <tr> | 
 |  |  |               <td :rowspan="item.child.length">{{ item.sortName }}</td> | 
 |  |  |               <td :rowspan="item.child.length">{{ item.faName }}</td> | 
 |  |  |               <td>{{ item.child[0].name }}</td> | 
 |  |  |               <td style="text-align: left"> | 
 |  |  |                 <!-- 添加容器 div --> | 
 |  |  |                 <div class="data-collection-items"> | 
 |  |  |                 <el-select v-if="item.child[0].isShowSelect" v-model="item.child[0].getDataIndex1" | 
 |  |  |                   :multiple-limit="item.child[0].maxNum" clearable filterable multiple placeholder="请选择" | 
 |  |  |                   @change="setData(item)"> | 
 |  |  |                   <el-option v-for="(subItem, subIndex) in item.child[0].arr" :key="index + '-' + subIndex" :filter-method="filterMethod" | 
 |  |  |                     :label="subIndex + 1 + '^' + subItem.result" :value="subIndex + '^' + subItem.result"> | 
 |  |  |                   <el-option v-for="(item, index) in item.child[0].arr" :key="index" :filter-method="filterMethod" | 
 |  |  |                     :label="index + 1 + '^' + item.result" :value="index + '^' + item.result"> | 
 |  |  |                     <span>{{ | 
 |  |  |                       "序号:" + | 
 |  |  |                       (subIndex + 1) + | 
 |  |  |                       (index + 1) + | 
 |  |  |                       "," + | 
 |  |  |                       "结果:" + | 
 |  |  |                       subItem.result + | 
 |  |  |                       item.result + | 
 |  |  |                       "," + | 
 |  |  |                       "厚度:" + | 
 |  |  |                       subItem.thickness + | 
 |  |  |                       item.thickness + | 
 |  |  |                       "," + | 
 |  |  |                       "时间:" + | 
 |  |  |                       subItem.mergedDateTime | 
 |  |  |                       item.mergedDateTime | 
 |  |  |                     }}</span> | 
 |  |  |                   </el-option> | 
 |  |  |                 </el-select> | 
 |  |  |                 <el-checkbox-group v-if="!item.child[0].isShowSelect" v-model="item.child[0].getDataIndex1" | 
 |  |  |                   :max="item.child[0].maxNum"> | 
 |  |  |                   <el-checkbox v-for="(n, j) in item.child[0].arr" :key="index + '-' + j + 'aaaaaa'" :label="j + '^' + n" | 
 |  |  |                   @change="handleGroupSelect(item.child[0], j)" >{{ n }}</el-checkbox> | 
 |  |  |                   <el-checkbox v-for="(n, j) in item.child[0].arr" :key="j" :label="j + '^' + n">{{ n }}</el-checkbox> | 
 |  |  |                 </el-checkbox-group> | 
 |  |  |               </div> | 
 |  |  |             </td> | 
 |  |  |           </tr> | 
 |  |  |           <tr v-for="(m, i) in item.child" v-show="i > 0" :key="index + '-' + i + 'bbbbbbbbbbbbbb'"> | 
 |  |  |             <td>{{ m.name }}</td> | 
 |  |  |             <td style="text-align: left"> | 
 |  |  |               <!-- 添加容器 div --> | 
 |  |  |               <div class="data-collection-items"> | 
 |  |  |                 </div> | 
 |  |  |               </td> | 
 |  |  |             </tr> | 
 |  |  |             <tr v-for="(m, i) in item.child" v-show="i > 0" :key="i + 'bbbbbbbbbbbbbb'"> | 
 |  |  |               <td>{{ m.name }}</td> | 
 |  |  |               <td style="text-align: left"> | 
 |  |  |                  <!-- 添加容器 div --> | 
 |  |  |                  <div class="data-collection-items"> | 
 |  |  |                 <el-select v-if="m.isShowSelect" v-model="m.getDataIndex1" :multiple-limit="m.maxNum" clearable | 
 |  |  |                   filterable multiple placeholder="请选择"> | 
 |  |  |                   <el-option v-for="(subItem, index1) in m.arr" :key="index + '-' + index1 + 'cccccccc'" | 
 |  |  |                     :label="index1 + 1 + '^' + subItem.result" :value="index1 + '^' + subItem.result"> | 
 |  |  |                   <el-option v-for="(item, index1) in m.arr" :key="index1" :label="index + 1 + '^' + item.result" | 
 |  |  |                     :value="index1 + '^' + item.result"> | 
 |  |  |                     <span>{{ | 
 |  |  |                       "序号:" + | 
 |  |  |                       (index1 + 1) + | 
 |  |  |                       "," + | 
 |  |  |                       "结果:" + | 
 |  |  |                       subItem.result + | 
 |  |  |                       item.result + | 
 |  |  |                       "," + | 
 |  |  |                       "厚度:" + | 
 |  |  |                       subItem.thickness + | 
 |  |  |                       item.thickness + | 
 |  |  |                       "," + | 
 |  |  |                       "时间:" + | 
 |  |  |                       subItem.mergedDateTime | 
 |  |  |                       item.mergedDateTime | 
 |  |  |                     }}</span> | 
 |  |  |                   </el-option> | 
 |  |  |                 </el-select> | 
 |  |  |                 <el-checkbox-group v-if="!m.isShowSelect" v-model="m.getDataIndex1" :max="m.maxNum"> | 
 |  |  |                   <el-checkbox v-for="(n, j) in m.arr" :key="index + '-' + j + 'dddddddd'" :label="j + '^' + n" | 
 |  |  |                   @change="handleGroupSelect(m, j)" >{{ n }}</el-checkbox> | 
 |  |  |                   <el-checkbox v-for="(n, j) in m.arr" :key="j" :label="j + '^' + n">{{ n }}</el-checkbox> | 
 |  |  |                 </el-checkbox-group> | 
 |  |  |               </div> | 
 |  |  |             </td> | 
 |  |  |           </tr> | 
 |  |  |         </template> | 
 |  |  |       </table> | 
 |  |  |     </div> | 
 |  |  |     <span slot="footer" class="dialog-footer"> | 
 |  |  |       <el-button @click="dataGetDia = false">取 消</el-button> | 
 |  |  |       <el-button :loading="getDataIndexLoading" type="primary" @click="submitDataGet()">确 定</el-button> | 
 |  |  |     </span> | 
 |  |  |   </el-dialog> | 
 |  |  |  | 
 |  |  |               </td> | 
 |  |  |             </tr> | 
 |  |  |           </template> | 
 |  |  |         </table> | 
 |  |  |       </div> | 
 |  |  |       <span slot="footer" class="dialog-footer"> | 
 |  |  |         <el-button @click="dataGetDia = false">取 消</el-button> | 
 |  |  |         <el-button :loading="getDataIndexLoading" type="primary" @click="submitDataGet()">确 定</el-button> | 
 |  |  |       </span> | 
 |  |  |     </el-dialog> | 
 |  |  |     <el-dialog :close-on-click-modal="false" :visible.sync="addCheck" title="指定报告审核人员" width="400px" | 
 |  |  |       @close="closeAddVerifyDia"> | 
 |  |  |       <div class="body" style="display: flex; padding: 10px; align-items: center"> | 
 |  |  | 
 |  |  | import AddUnPass from "../unpass/components/addUnPass.vue"; | 
 |  |  | import InspectionWord from "./components/InspectionWord.vue"; | 
 |  |  | import PurchaseVerification from "../unpass/components/PurchaseVerification.vue"; | 
 |  |  | import { connect,disconnect } from "@/utils/connect.js"; | 
 |  |  |  | 
 |  |  | import { | 
 |  |  |   doInsOrder, | 
 |  |  |   getCableTag, | 
 |  |  | 
 |  |  |             { | 
 |  |  |               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(); // 获取紧急程度下拉框选项 | 
 |  |  | 
 |  |  |   beforeDestroy() { | 
 |  |  |     // 在组件销毁前确保停止 Worker,避免内存泄漏 | 
 |  |  |     this.stopWorker(); | 
 |  |  |     disconnect() | 
 |  |  |   }, | 
 |  |  |   methods: { | 
 |  |  |     // 文件管理--开始 | 
 |  |  | 
 |  |  |       }).catch(() => { }); | 
 |  |  |     }, | 
 |  |  |     // 文件管理--结束 | 
 |  |  |   // 处理整组勾选逻辑的方法 | 
 |  |  |     handleGroupSelect(childItem, clickedIndex) { | 
 |  |  |       // 计算所在组的起始索引 | 
 |  |  |       const groupStartIndex = Math.floor(clickedIndex / 5) * 5; | 
 |  |  |       // 清空当前已选 | 
 |  |  |       childItem.getDataIndex1 = []; | 
 |  |  |       // 遍历当前组的 5 个元素,添加到选中列表 | 
 |  |  |       for (let i = groupStartIndex; i < groupStartIndex + 5 && i < childItem.arr.length; i++) { | 
 |  |  |         childItem.getDataIndex1.push(i + '^' + childItem.arr[i]); | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |  | 
 |  |  |     // 任务切换--开始 | 
 |  |  |     getList0() { | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     // 数据采集 | 
 |  |  |     getDataAcquisitionDevice() { | 
 |  |  |       // connect() | 
 |  |  |       // return | 
 |  |  |       let itemIds = []; | 
 |  |  |       this.currentSample.insProduct.forEach((item) => { | 
 |  |  |         if (item.inspectionItemType === "1") { | 
 |  |  | 
 |  |  |               } else { | 
 |  |  |                 str0 = i + "," + j; | 
 |  |  |               } | 
 |  |  |             }; | 
 |  |  |             } | 
 |  |  |             let list = this.tableList[0].arr; | 
 |  |  |             console.log(this.tableList[0]); | 
 |  |  |             let maxNum = 0; | 
 |  |  |             list.forEach((item, index) => { | 
 |  |  |               let num0 = 0; | 
 |  |  | 
 |  |  |                   } | 
 |  |  |                   let num = 0; | 
 |  |  |                   list[index].forEach((n) => { | 
 |  |  |                     // console.log(n.v.ps.value); | 
 |  |  |                     if ( | 
 |  |  |                       n.v.ps && | 
 |  |  |                       n.v.ps.value && | 
 |  |  | 
 |  |  |       } else { | 
 |  |  |         // 如果都不存在,则,进入处理数采线程里去处理数据 | 
 |  |  |         try { | 
 |  |  |           console.log(this.dataAcquisitionInfo); | 
 |  |  |           // 向 Worker 发送消息,开始处理逻辑 | 
 |  |  |           this.getDataIndexLoading = false; | 
 |  |  |           this.dataGetDia = false; | 
 |  |  | 
 |  |  |       this.$router.go(-1) | 
 |  |  |     } | 
 |  |  |   }, | 
 |  |  |   destroyed() { | 
 |  |  |     disconnect() | 
 |  |  |   }, | 
 |  |  | }; | 
 |  |  | </script> | 
 |  |  | <style scoped> | 
 |  |  | 
 |  |  |   max-width: 1000px; | 
 |  |  |   /* 设置最大宽度 */ | 
 |  |  | } | 
 |  |  |  | 
 |  |  |  | 
 |  |  | .data-collection-items { | 
 |  |  |   display: flex; | 
 |  |  |   flex-wrap: wrap;  | 
 |  |  |   flex-wrap: wrap; | 
 |  |  | } | 
 |  |  | .data-collection-items .el-select, | 
 |  |  | .data-collection-items .el-checkbox { | 
 |  |  |   flex-basis: 20% ;  | 
 |  |  |   flex-basis: 20% ; | 
 |  |  |   box-sizing: border-box; | 
 |  |  |   padding: 5px 2%; | 
 |  |  |   padding: 5px 15px; | 
 |  |  | } | 
 |  |  | </style> |