| | |
| | | isMore:false, |
| | | insProductNew:[], |
| | | intermodulationNum:0,//互调检验项目的数量 |
| | | loading:{} |
| | | loading:{}, |
| | | upTemplateState:false, |
| | | }; |
| | | }, |
| | | watch: { |
| | | // 角度数量变化时,更新所有频段下面的所有项目下的所有端口和角度 |
| | | angleList(val) { |
| | | this.allBandList.forEach(item => { |
| | | if(!this.upTemplateState){ |
| | | this.allBandList.forEach(item => { |
| | | item.projectList.forEach(m => { |
| | | if(m.angleList.length!==val.length){ |
| | | m.angleList = JSON.parse(JSON.stringify(this.angleList)) |
| | |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | currentNum(val) { |
| | | this.initData() |
| | |
| | | angleList.push({value:m}) |
| | | }) |
| | | this.angleList = angleList |
| | | this.upTemplateState = false |
| | | } |
| | | let tell = '' |
| | | if(item.tell.includes(',')){ |
| | |
| | | }, |
| | | // 删除数组 |
| | | deleteList(index,list,type){ |
| | | this.upTemplateState = false |
| | | if(list.length>1){ |
| | | if(type=='互调'){ |
| | | let index = null; |
| | |
| | | }, |
| | | // 添加数组 |
| | | addList(list,type){ |
| | | this.upTemplateState = false |
| | | if(type=='互调'){ |
| | | let obj = null; |
| | | let index = null; |
| | |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | // 更新模板 |
| | | upTemplate(obj){ |
| | | this.upTemplateState = true; |
| | | // return |
| | | obj.allBandList.forEach((item,index)=>{ |
| | | if(!this.allBandList[index]){ |
| | | this.allBandList[index] = { |
| | | projectList:this.HaveJson(this.allBandList[0].projectList), |
| | | band:item.band |
| | | } |
| | | } |
| | | let arr = [] |
| | | item.projectList.forEach((m,i)=>{ |
| | | if(this.allBandList[index].projectList.find(n=>n.inspectionItemSubclass==m.inspectionItemSubclass)){ |
| | | let obj0 = { |
| | | angleList:m.angleList, |
| | | portList:m.portList, |
| | | portNum:m.portNum, |
| | | value:m.value, |
| | | valueType:m.valueType |
| | | } |
| | | arr.push({...this.allBandList[index].projectList.find(n=>n.inspectionItemSubclass==m.inspectionItemSubclass),...obj0}) |
| | | } |
| | | }) |
| | | this.allBandList[index].projectList = arr |
| | | }) |
| | | this.angleList = obj.angleList |
| | | this.intermodulationNum = obj.intermodulationNum |
| | | } |
| | | } |
| | | } |