From e4ffe157b23d0798ba9475eeb9e797313b477a31 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期五, 02 八月 2024 18:47:09 +0800
Subject: [PATCH] 修改采集逻辑
---
src/components/do/b1-inspect-order-plan/Inspection.vue | 54 ++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 44 insertions(+), 10 deletions(-)
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index 8db3532..8bd547b 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -226,6 +226,9 @@
display: flex;
align-items: center;
}
+ .custom-dialog .el-dialog__body {
+ max-width: 1000px; /* 璁剧疆鏈�澶у搴� */
+ }
</style>
<template>
<div v-loading="loading" class="inspection">
@@ -784,7 +787,7 @@
<el-button type="primary" @click="submit()">纭� 瀹�</el-button>
</span>
</el-dialog>
- <el-dialog title="鏁版嵁閲囬泦-璁$畻鏁版嵁閫夋嫨" :visible.sync="dataGetDia" min-width="400px" :close-on-click-modal="false" :close-on-press-escape="false" :before-close="beforeDataGetDia">
+ <el-dialog title="鏁版嵁閲囬泦-璁$畻鏁版嵁閫夋嫨" :visible.sync="dataGetDia" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" custom-class="custom-dialog">
<div>
<table border="1" cellpadding="10" class="thermal-table">
<tr>
@@ -796,19 +799,19 @@
<tr>
<td :rowspan="item.child.length">{{item.faName}}</td>
<td>{{ item.child[0].name }}</td>
- <td>
+ <td style="text-align: left;">
<el-checkbox-group
- v-model="getDataIndex">
+ v-model="getDataIndex" :max="item.child[0].maxNum">
<el-checkbox v-for="(n,j) in item.child[0].arr" :label="j" :key="j+'ppppppppp'">{{n}}</el-checkbox>
</el-checkbox-group>
</td>
</tr>
<tr v-for="(m,i) in item.child" :key="i+'bbbbbbbbbbbbbb'" v-show="i>0">
<td>{{ m.name }}</td>
- <td>
+ <td style="text-align: left;">
<el-checkbox-group
- v-model="getDataIndex">
- <el-checkbox v-for="(n,j) in m.arr" :label="j" :key="j+'bbbbbbbbbbbbbb'">{{n}}</el-checkbox>
+ v-model="getDataIndex" :max="m.maxNum">
+ <el-checkbox v-for="(n,j) in m.arr" :label="j" :key="j+'bbbbbbbbbbbbbb'" >{{n}}</el-checkbox>
</el-checkbox-group>
</td>
</tr>
@@ -816,7 +819,6 @@
</table>
</div>
<span slot="footer" class="dialog-footer">
- <el-button @click="beforeDataGetDia()">鍙� 娑�</el-button>
<el-button type="primary" @click="submitDataGet()" :loading="getDataIndexLoading">纭� 瀹�</el-button>
</span>
</el-dialog>
@@ -1274,16 +1276,48 @@
child:[]
}
for(let j in data[i]){
- console.log(j,data[i][j])
if(j!='frequency'&&data[i][j]&&!data[i][j].isCalculation){
this.dataAcquisitionInfo[i+','+j] = {
value:data[i][j].result,
frequency:data[i].frequency
}
}else if(j!='frequency'&&data[i][j]&&data[i][j].isCalculation){
+ let str0 = i+','+j
+ let list = this.tableList[0].arr
+ let maxNum = 0
+ list.forEach((item,index)=>{
+ let num0 = 0;
+ let str = ''
+ item.forEach(m=>{
+ if(m.v.ps&&(m.v.ps.value=='妫�楠屽瓙椤�'||m.v.ps.value=='妫�楠岄」')){
+ if(m.v.ps&&m.v.ps.value=='妫�楠岄」'){
+ if(num0==0){
+ str = m.v.v+','
+ num0++
+ }
+ }
+ if(m.v.ps&&m.v.ps.value=='妫�楠屽瓙椤�'){
+ if(num0==1){
+ str = str+m.v.v
+ }
+ }
+ let num = 0;
+ list[index].forEach(n=>{
+ if(n.v.ps&&n.v.ps.value&&typeof n.v.ps.value == 'string'&&n.v.ps.value.includes('妫�楠屽��')){
+ num++
+ }
+ })
+ if(str0==str){
+ maxNum = num
+ }
+ }
+ })
+ })
+ console.log(44444444444,maxNum)
let obj0 = {
name:j,
- arr:data[i][j].result
+ arr:data[i][j].result,
+ maxNum:maxNum
}
obj.child.push(obj0)
}
@@ -1337,7 +1371,7 @@
this.getDataIndex.sort((a, b) => a - b);
for (let i in this.dataAcquisitionInfoNew){
for(let j in this.dataAcquisitionInfoNew[i]){
- if(j!='frequency'&&this.dataAcquisitionInfoNew[i][j].isCalculation){
+ if(j!='frequency'&&this.dataAcquisitionInfoNew[i]&&this.dataAcquisitionInfoNew[i][j]&&this.dataAcquisitionInfoNew[i][j].isCalculation){
let arr = []
for(let k = 0;k<this.dataAcquisitionInfoNew[i][j].result.length;k++){
if(this.getDataIndex.includes(k)){
--
Gitblit v1.9.3