| | |
| | | prop="value" |
| | | label="识别符值"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.value" placeholder="请输入" size="small"></el-input> |
| | | <el-input v-model="scope.row.value" placeholder="请输入" @input="inputValueHandler(scope.row,scope.$index)" size="small"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | sampleSelectionList: [],//样品表格选中数据 |
| | | editTable:[], |
| | | template: null, |
| | | templates: [], |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | //特殊值填写处理 |
| | | inputValueHandler(row,index){ |
| | | if(row){ |
| | | const nextIndex = index+1 |
| | | for (let i = nextIndex; i < this.editTable.length; i++) { |
| | | const element = this.editTable[i]; |
| | | if(element.model==row.model){ |
| | | this.editTable[i].value = row.value |
| | | }else{ |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | }, |
| | | spliceData () { |
| | | if (!this.circulateForm.entrustNum || !this.circulateForm.entrustTime || !this.circulateForm.entrustPoint || this.opticalProjectList.length === 0 || this.temperatureData.length === 0) { |
| | | this.$message.error('请填写完整数据') |
| | |
| | | }) |
| | | }, |
| | | getProNum() { |
| | | this.sampleList.forEach((m, i) => { |
| | | Vue.set(this.sampleList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length) |
| | | this.sampleSelectionList.forEach((m, i) => { |
| | | Vue.set(this.sampleSelectionList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length) |
| | | }) |
| | | this.$refs.sampleTable.doLayout() |
| | | }, |
| | |
| | | val.forEach(a => { |
| | | this.sampleIds.push(a.id) |
| | | }) |
| | | this.sampleSelectionList = val |
| | | }, |
| | | delSample() { |
| | | this.sampleIds.forEach(a => { |
| | |
| | | this.sampleId = row.id |
| | | if (this.active !== 1) { |
| | | this.sampleIds = [] |
| | | this.sampleIds.push(row.id) |
| | | this.sampleSelectionList.forEach(ele=>{ |
| | | if(ele.id == row.id){ |
| | | this.sampleIds.push(row.id) |
| | | } |
| | | }) |
| | | } |
| | | this.productList = row.insProduct |
| | | this.productList0 = JSON.parse(JSON.stringify(this.productList)) |