| | |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <div style="display: flex;align-items: center;justify-content: flex-end;" class="btns"> |
| | | <el-button type="primary" size="small" @click="addList(allBandList)" :disabled="state>1">添加频段</el-button> |
| | | <el-button type="primary" size="small" @click="addList(allBandList,'频段')" :disabled="state>1">添加频段</el-button> |
| | | <el-button size="small" @click="deleteList(allBandList.length-1,allBandList,'删除频段')" :disabled="state>1">删除频段</el-button> |
| | | <el-button type="primary" size="small" @click="addList(angleList)" v-if="!(state>1)&&intermodulationNum>0">添加角度</el-button> |
| | | <el-button size="small" @click="deleteList(angleList.length-1,angleList)" v-if="!(state>1)&&intermodulationNum>0">删除角度</el-button> |
| | |
| | | <div style="text-align: center;">{{ n.unit }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.tell }}</div> |
| | | <div style="text-align: center;" v-html="n.tell"></div> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> |
| | |
| | | <div style="text-align: center;">{{ n.unit }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.tell }}</div> |
| | | <div style="text-align: center;" v-html="n.tell"></div> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> |
| | |
| | | |
| | | <script> |
| | | export default { |
| | | props:['insProduct','orderId','sampleId','state'], |
| | | props:['insProduct','orderId','sampleId','state','num'], |
| | | data() { |
| | | return { |
| | | value: "", |
| | |
| | | // 初始化数据 |
| | | initData(){ |
| | | // 处理项目 |
| | | this.insProductNew = JSON.parse(JSON.stringify(this.insProduct)) |
| | | this.insProductNew = JSON.parse(JSON.stringify(this.insProduct)).filter(m=>m.inspectionItem.includes('电路试验')) |
| | | this.insProductNew.forEach(async item => { |
| | | // 获取设备列表 |
| | | item.equipOptions = await this.getEquipOptions(item) |
| | |
| | | }) |
| | | this.angleList = angleList |
| | | } |
| | | let tell = '' |
| | | if(item.tell.includes(',')){ |
| | | item.tell.split(',').forEach((m,i)=>{ |
| | | tell = tell + m+ (i==item.tell.split(',').length-1?'':'<br/>') |
| | | }) |
| | | }else{ |
| | | tell = item.tell |
| | | } |
| | | let obj = { |
| | | inspectionItemSubclass: item.inspectionItemSubclass, |
| | | unit:item.unit, |
| | | tell:item.tell, |
| | | tell:tell, |
| | | result:n.result, |
| | | id:item.id, |
| | | often:n.often, |
| | | equipName:n.equipName, |
| | | equipValue:n.equipValue, |
| | | frequency:n.frequency |
| | | frequency:n.frequency, |
| | | sonLaboratory:item.sonLaboratory |
| | | } |
| | | this.$set(obj,'portList', n.port?portList:[]) |
| | | this.$set(obj,'angleList', n.angle?angleList:[]) |
| | |
| | | message: '不能删除最后一个互调' |
| | | }); |
| | | }else{ |
| | | if(list[index].frequency){ |
| | | this.$confirm(`是否确定删除 ${list[index].often} 频点数据?`, "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.$axios.post(this.$api.insOrderPlan.deleteInsContext2, { |
| | | frequency:list[index].frequency, |
| | | productId:list[index].id, |
| | | often:list[index].often |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.$message.error('删除失败') |
| | | return |
| | | } |
| | | this.$message.success('已删除') |
| | | list.splice(index, 1) |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }).catch(() => {}) |
| | | }else{ |
| | | list.splice(index, 1) |
| | | } |
| | | list.splice(index, 1) |
| | | } |
| | | }else if(type=='删除频段'){ |
| | | this.$confirm(`是否确定删除 ${list[index].band} 频段数据?`, "提示", { |
| | |
| | | }).then(() => { |
| | | this.$axios.post(this.$api.insOrderPlan.deleteInsContext, { |
| | | frequency:list[index].band, |
| | | productIds:list[index].projectList.map(m=>m.id) |
| | | productIds:list[index].projectList.map(m=>m.id), |
| | | num:this.num |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | |
| | | index = i; |
| | | } |
| | | }) |
| | | obj.often = '' |
| | | obj.result = '' |
| | | let num0 = obj.value.length |
| | | let num1 = obj.value[0].length |
| | | delete obj.value |
| | | obj.value = [] |
| | | for(let i = 0;i<num0;i++){ |
| | | obj.value.push([]) |
| | | for(let j = 0;j<num1;j++){ |
| | | obj.value[i].push('') |
| | | } |
| | | } |
| | | list.splice(index+1, 0, obj) |
| | | }else if(type=='频段'){ |
| | | let obj = JSON.parse(JSON.stringify(list[0])); |
| | | obj.band = '' |
| | | obj.projectList.forEach(item=>{ |
| | | item.often = '' |
| | | item.result = '' |
| | | item.frequency = '' |
| | | let num0 = item.value.length |
| | | let num1 = item.value[0].length |
| | | delete item.value |
| | | item.value = [] |
| | | for(let i = 0;i<num0;i++){ |
| | | item.value.push([]) |
| | | for(let j = 0;j<num1;j++){ |
| | | item.value[i].push('') |
| | | } |
| | | } |
| | | }) |
| | | list.push(obj) |
| | | }else{ |
| | | let obj = JSON.parse(JSON.stringify(list[0])); |
| | | list.push(obj) |
| | |
| | | if(!n.often){ |
| | | return |
| | | } |
| | | if(!n.often.includes('MHz')){ |
| | | if(!n.often.includes('MHz')||!n.often.includes('MHZ')){ |
| | | n.often = n.often + 'MHz' |
| | | } |
| | | }, |