| | |
| | | <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)"> |
| | |
| | | :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(); // 获取紧急程度下拉框选项 |
| | |
| | | }, |
| | | methods: { |
| | | sss() { |
| | | console.log(this.$store.state.weightList) // |
| | | console.log(this.$store.state.weightList) // |
| | | }, |
| | | // 文件管理--开始 |
| | | getList() { |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | // 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; |
| | |
| | | |
| | | .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%; |
| | | } |