licp
2024-10-17 bb1edca3bf351497495e270014b229605e4460dc
src/components/do/b1-inspect-order-plan/circuit-parameters1.vue
@@ -116,7 +116,7 @@
              </div>
            </el-col>
            <el-col :span="2">
              <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':'待定') }}
              <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':(n.result===3?'不判定':(n.result===3?'不判定':'待定'))) }}
              </div>
            </el-col>
          </el-row>
@@ -167,7 +167,7 @@
              </div>
            </el-col>
            <el-col :span="2">
              <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':'待定') }}
              <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':(n.result===3?'不判定':(n.result===3?'不判定':'待定'))) }}
              </div>
            </el-col>
          </el-row>
@@ -210,7 +210,7 @@
              </div>
            </el-col>
            <el-col :span="2">
              <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':'待定') }}
              <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':(n.result===3?'不判定':'待定')) }}
              </div>
            </el-col>
          </el-row>
@@ -248,7 +248,7 @@
              </div>
            </el-col>
            <el-col :span="2">
              <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':'待定') }}
              <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'不合格':(n.result===1?'合格':(n.result===3?'不判定':'待定')) }}
              </div>
            </el-col>
          </el-row>
@@ -394,7 +394,8 @@
    },
    insProduct:{
      deep:true,
      handler:()=>{
      handler:function(val){
        // console.log('更新页面啦')
        this.initData()
      }
    }
@@ -414,6 +415,7 @@
    },
    // 初始化数据
    initData(){
      this.allBandList = []
      // 处理项目
      this.insProductNew = JSON.parse(JSON.stringify(this.insProduct)).filter(m=>m.inspectionItem.includes('电路试验'))
      this.insProductNew.forEach(async item => {
@@ -421,7 +423,7 @@
            this.intermodulationNum++
          }
        // 获取设备列表
        item.equipOptions = await this.getEquipOptions(item)
        item.equipOptions = []
      })
      if(this.insProductNew[0].insProductResult2&&this.insProductNew[0].insProductResult2.length>0){
        // 已经存在值时,赋值
@@ -494,12 +496,32 @@
          })
        }
      }else{
        console.log(2222)
        // 没有值时,初始化页面
        this.insProductNew.forEach(async item => {
          // 赋值设备
          item.equipName = ''
          item.equipValue = ''
          // 赋值端口和角度
          this.portList = [
            {
              value:'1',
            },
            {
              value:'2',
            },
            {
              value:'3',
            },
            {
              value:'4',
            },
          ]
          this.angleList = [
            {
              value:''
            }
          ]
          item.portList = JSON.parse(JSON.stringify(this.portList))
          item.angleList = JSON.parse(JSON.stringify(this.angleList))
          // 赋值结论
@@ -526,6 +548,7 @@
            projectList: JSON.parse(JSON.stringify(this.insProductNew))
          }
        )
        console.log(this.allBandList)
      }
    },
    // 删除数组