| | |
| | | </el-select> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="item.inspectionItemSubclass&&item.inspectionItemSubclass.includes('低')"> |
| | | <td>电调结果</td> |
| | | <td v-for="(m,i) in item.list0" :key="i"> |
| | | <el-input v-model="m.value" :placeholder="'第'+(i+1)+'次'" size="small" :disabled="state>1" style="display: inline-block;width: 50%;" @change="save(item)"></el-input> |
| | | <el-button icon="el-icon-minus" circle size="mini" type="danger" |
| | | :disabled="state>1" style="margin: 5px;display: inline-block;" @click="deleteList(item.list0,i,m)" ></el-button> |
| | | <el-button icon="el-icon-plus" circle size="mini" type="primary" :disabled="state>1" style="margin: 5px;display: inline-block;" v-if="i==item.list0.length-1&&i<4" @click="addList(item.list0,item.list0.length-1)"></el-button> |
| | | </td> |
| | | </tr> |
| | | <tr style="background-color: #F0F1F5;"> |
| | | <td colspan="2">时间</td> |
| | | <td colspan="1">温度</td> |
| | |
| | | </tr> |
| | | <tr v-for="(m,i) in item.list" :key="i+item.id"> |
| | | <td colspan="2"> |
| | | <el-time-picker |
| | | v-model="m.time" |
| | | placeholder="时间" size="small" editable format="HH:mm" value-format="HH:mm" style="width: 100%;" @change="save(item)" :disabled="state>1"> |
| | | </el-time-picker> |
| | | <el-date-picker |
| | | v-model="m.time" |
| | | placeholder="时间" size="small" editable format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" style="width: 100%;" @change="save(item)" :disabled="state>1" type="datetime"> |
| | | </el-date-picker> |
| | | </td> |
| | | <td colspan="1"> |
| | | <el-input v-model="m.temperature" placeholder="温度" size="small" @change ="a=>handleReplace(m,'℃','temperature',item)" :disabled="state>1"></el-input> |
| | |
| | | <td colspan="2"> |
| | | <el-button icon="el-icon-minus" circle size="mini" type="danger" |
| | | @click="deleteList(item.list,i,item)" :disabled="state>1" style="margin: 5px;"></el-button> |
| | | <el-button icon="el-icon-plus" circle size="mini" type="primary" @click="addList(item.list,i)" :disabled="state>1" style="margin: 5px;"></el-button> |
| | | <el-button icon="el-icon-plus" circle size="mini" type="primary" @click="addList(item.list,i,'out')" :disabled="state>1" style="margin: 5px;"></el-button> |
| | | </td> |
| | | </tr> |
| | | </template> |
| | |
| | | if(!item.insProductResult){ |
| | | // 初始化 |
| | | this.$set(item,'list',[]) |
| | | this.$set(item,'list0',[]) |
| | | item.list.push({}) |
| | | item.list0.push({}) |
| | | item.list.forEach(m=>{ |
| | | this.$set(m,'time','') |
| | | this.$set(m,'temperature','') |
| | |
| | | this.$set(m,'temperature',m.temperature) |
| | | this.$set(m,'humidity',m.humidity) |
| | | }) |
| | | this.$set(item,'equipValue',item.insProductResult.equipValue) |
| | | this.$set(item,'equipName',item.insProductResult.equipName) |
| | | if(item.insProductResult.comValue){ |
| | | this.$set(item,'list0',JSON.parse(item.insProductResult.comValue)) |
| | | item.list0.forEach((m,i)=>{ |
| | | this.$set(m,'value',m.value) |
| | | }) |
| | | }else{ |
| | | this.$set(item,'list0',[]) |
| | | item.list0.push({}) |
| | | } |
| | | this.$set(item,'equipValue',item.insProductResult.equipValue?JSON.parse(item.insProductResult.equipValue)[0].v:'') |
| | | this.$set(item,'equipName',item.insProductResult.equipName?JSON.parse(item.insProductResult.equipName)[0].v:'') |
| | | this.$set(item,'beforeCheck',item.insProductResult.beforeCheck) |
| | | this.$set(item,'afterCheck',item.insProductResult.afterCheck) |
| | | } |
| | |
| | | }) |
| | | } |
| | | }, |
| | | addList(arr,i){ |
| | | arr.splice(i+1,0,{ |
| | | time:'', |
| | | temperature:'', |
| | | humidity:'' |
| | | }) |
| | | addList(arr,i,type){ |
| | | if(type=='out'){ |
| | | arr.splice(i+1,0,{ |
| | | value:'', |
| | | }) |
| | | }else{ |
| | | arr.splice(i+1,0,{ |
| | | time:'', |
| | | temperature:'', |
| | | humidity:'' |
| | | }) |
| | | } |
| | | }, |
| | | async methodFocus(item){ |
| | | this.equipOptions = await this.getEquipOptions(item) |
| | |
| | | this.$axios.post(this.$api.insOrderPlan.saveInsContext3, { |
| | | insProductId:item.id, |
| | | insValue:JSON.stringify(item.list), |
| | | comValue:JSON.stringify(item.list0), |
| | | equipValue:item.equipValue, |
| | | equipName:item.equipName, |
| | | num:this.num, |