| | |
| | | <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> |
| | | <table border="1" cellpadding="10" class="thermal-table"> |
| | | <tr> |
| | | <td>频点</td> |
| | | <td>频段</td> |
| | | <td :colspan="n.portList.length+1"> |
| | | <div style="display: flex;align-items: center;"> |
| | | <el-input size="small" placeholder="频点" v-model="n.often" :disabled="state>1" @blur="handlePort(n)"></el-input> |
| | | <!-- <el-input size="small" placeholder="频点" v-model="n.often" :disabled="state>1" @blur="handlePort(n)"></el-input> --> |
| | | <el-select v-model="n.often" placeholder="请选择" size="small" style="width: 200px;" :disabled="state>1"> |
| | | <el-option |
| | | v-for="item in bandList0" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | |
| | | return { |
| | | value: "", |
| | | bandList:[], |
| | | bandList0:[], |
| | | portList:[ |
| | | { |
| | | value:'1', |
| | |
| | | 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() |
| | |
| | | category: "电路试验波段" |
| | | }).then(res => { |
| | | this.bandList = res.data |
| | | }) |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "互调-频段" |
| | | }).then(res => { |
| | | this.bandList0 = res.data |
| | | }) |
| | | }, |
| | | // 初始化数据 |
| | |
| | | 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 |
| | | } |
| | | } |
| | | } |