| | |
| | | <el-button type="primary" @click="spliceTemperatureTest">保存</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 功率容量--填写端口 --> |
| | | <el-dialog title="填写端口" :visible.sync="powerShow" |
| | | :close-on-click-modal="false" :close-on-press-escape="false" |
| | | width="50%"> |
| | | <el-table |
| | | :data="powerTable" |
| | | border |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | fixed |
| | | prop="sample" |
| | | label="样品" |
| | | min-width="150"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="model" |
| | | label="型号" |
| | | min-width="120"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="inspectionItem" |
| | | label="检验项" |
| | | min-width="120"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="ask" |
| | | label="端口" |
| | | min-width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input-number v-model="scope.row.ask" :min="1" :max="100" label="端口" size="small"></el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="powerShow=false">取消</el-button> |
| | | <el-button type="primary" @click="savePowerTest">保存</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="文件预览" |
| | | :visible.sync="lookFileVisible" |
| | |
| | | ruleInfo:{ |
| | | rule:null, |
| | | num:null, |
| | | } |
| | | }, |
| | | powerShow:false, |
| | | powerTable:[] |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | return |
| | | } |
| | | this.spliceTemperatureTest() |
| | | }, |
| | | savePowerTest(){ |
| | | if(!this.powerTable.every(m=>m.ask)) |
| | | { |
| | | this.$message.error('请填写完整数据') |
| | | } |
| | | let num = 0; |
| | | let sampleList = this.HaveJson(this.sampleList) |
| | | sampleList.forEach(item=>{ |
| | | item.insProduct.forEach(m=>{ |
| | | if(m.inspectionItem.includes('功率试验')&&m.state==1){ |
| | | m.ask = '端口数:'+this.powerTable[num].ask |
| | | num++ |
| | | } |
| | | }) |
| | | }) |
| | | this.saveMethod(sampleList) |
| | | this.powerShow = false; |
| | | }, |
| | | cleanTemperatureTest () { |
| | | this.temperatureTest = [] |
| | |
| | | this.bsm3Dia = true; |
| | | return |
| | | } |
| | | let isPower = this.totalArr.find(a => a.inspectionItem.includes('功率试验')&&a.state==1) |
| | | if (isPower) { |
| | | this.powerTable = this.totalArr.filter(a => a.inspectionItem.includes('功率试验')&&a.state==1) |
| | | this.powerTable.forEach(a => { |
| | | a.ask = null |
| | | }) |
| | | this.powerShow = true; |
| | | return |
| | | } |
| | | this.saveMethod(sampleList) |
| | | } |
| | | } |