| | |
| | | </el-row> |
| | | <el-row style="width:100%;"> |
| | | <el-col :span="24"> |
| | | <el-table border :data="inspectionItems" height="400" |
| | | <el-table border |
| | | :data="inspectionItems" |
| | | height="400" |
| | | :header-cell-style="{ textAlign: 'center', color: 'black', backgroundColor: '#fafafa' }" |
| | | :cell-style="{ textAlign: 'center' }" row-key="iid" default-expand-all style="width: 100%" |
| | | ref="table" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> |
| | | :cell-style="{ textAlign: 'center' }" |
| | | row-key="iid" |
| | | default-expand-all style="width: 100%" |
| | | ref="table" |
| | | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> |
| | | <el-table-column type="index" label="序号" width="60"></el-table-column> |
| | | <el-table-column label="项目" prop="father" width="240"></el-table-column> |
| | | <el-table-column prop="iname" label="指标" width="240"></el-table-column> |
| | |
| | | :label="item.code + '-' + item.name"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index" |
| | | label="检验描述" width="240" style="text-align: center;"> |
| | | <template slot-scope="scope"> |
| | | <el-col v-if="scope.row.itype === '1'"> |
| | | <el-tooltip v-if="scope.row.iname != null" :disabled="scope.row.eId != null" |
| | | class="item" effect="dark" content="请先选择设备!" placement="top-start"> |
| | | <el-input :disabled="scope.row.eId == null" |
| | | v-model="scope.row.inote" |
| | | @blur="changeState(scope.row, index)" placeholder="请输入检验描述"></el-input> |
| | | <span v-if="resultVal != null && processInspectVo.id != null" |
| | | v-text="scope.row.inote"></span> |
| | | </el-tooltip> |
| | | </el-col> |
| | | <el-col v-else> |
| | | <el-tooltip v-if="scope.row.iname != null" :disabled="scope.row.eId != null" |
| | | class="item" effect="dark" content="请先选择设备!" placement="top-start"> |
| | | <!-- <el-input :disabled="scope.row.eId == null" |
| | | v-model="scope.row.empiricalValueAddss[index]" |
| | | @blur="changeState(scope.row, index)" placeholder="请输入检测值"></el-input> --> |
| | | <el-select style="width: 100%;" @change="changeState(scope.row, index)" :disabled="scope.row.eId == null" v-model="scope.row.inote" placeholder="请选择"> |
| | | <el-option v-for="item in dataVal" :key="item.value" :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <span v-if="resultVal != null && processInspectVo.id != null" |
| | | v-text="scope.row.inote"></span> |
| | | </el-tooltip> |
| | | </el-col> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="结论" fixed="right" min-width="100"> |
| | |
| | | methods: { |
| | | submitSave() { |
| | | let pro = 0 |
| | | console.log(this.inspectionItems); |
| | | console.log(this.inspectionItems); |
| | | this.inspectionItems.forEach(item => { |
| | | if (item.children) { |
| | | let arr = item.children.filter(obj => { |
| | |
| | | arr = obj.inspectionValue.split(",") |
| | | } |
| | | obj.empiricalValueAddss = arr |
| | | if(obj.note){ |
| | | snote=obj.inote |
| | | } |
| | | if (arr.length > this.empiricalValueAdd) { |
| | | this.empiricalValueAdd = arr.length |
| | | } |
| | |
| | | } |
| | | }) |
| | | this.inspectionItems = result.children |
| | | console.log(this.inspectionItems); |
| | | this.inspectionResultForm = [{ |
| | | materialCode: result.materialCode, |
| | | material: result.material, |
| | |
| | | obj.children[index - 1].inspectionValue = null |
| | | obj.children[index - 1].iresult = null |
| | | obj.children[index - 1].empiricalValueAddss = [] |
| | | obj.children[index-1].inote='' |
| | | } |
| | | }) |
| | | }).catch(error => { |
| | |
| | | this.technologyList = sample.children |
| | | }, |
| | | changeState(row, index) { |
| | | console.log(row) |
| | | if (row.iid != null && row.iid != '') { |
| | | let str = "" |
| | | row.empiricalValueAddss.forEach(e => { |
| | | str += e + "," |
| | | }) |
| | | |
| | | // if (note === undefined || note === '' || note === null) { |
| | | // return |
| | | // } |
| | | console.log(str) |
| | | str = str.slice(0, -1); |
| | | if (str === undefined || str === '' || str === null) { |
| | | return |
| | | } |
| | | |
| | | |
| | | let obj = { |
| | | devideId: row.eId, |
| | | ppid: row.iid, |
| | | inspectionValue: str |
| | | inspectionValue: str, |
| | | note : row.inote |
| | | |
| | | } |
| | | console.log(obj) |
| | | updateProcessInsProduct(obj).then(res => { |
| | | if (res.data.code == 0) { |
| | | this.$message.success("更新成功") |
| | |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | |
| | | .finishedProduct-basic { |
| | | background-color: #fff; |
| | | height: 155px; |