zouyu
2023-11-02 aec5b686e9745cd296341854d8d457f5bcd3e836
src/views/quality/processInspect/processInspect-form.vue
@@ -111,7 +111,7 @@
                                    <span v-if="resultVal != null && scope.row.iname != null" v-text="scope.row.ename"></span>
                                    <div v-else>
                                        <el-select style="width:100%" v-model="scope.row.eId" 
                                        v-if="scope.row.iname != null" filterable @change="updateDevice(scope.row)">
                                        v-if="scope.row.iname != null" filterable @change="updateDevice(scope.row,scope.$index)">
                                            <el-option v-for="(item,index) in deviceList" 
                                            :key="index" :value="item.id" :label="item.number +'-'+ item.name"></el-option>
                                        </el-select>
@@ -212,7 +212,7 @@
            this.processInspectVo.id = this.$route.query.id
            this.resultVal = this.$route.query.resultVal
            if(this.resultVal == null){
                let val = sessionStorage.getItem("process-resultVal");
                let val = sessionStorage.getItem("process-resultVal-"+this.processInspectVo.id);
                val == undefined ? this.resultVal=null : this.resultVal = val
            }
            this.init()
@@ -282,7 +282,7 @@
                })
                this.resultVal = resultVal
                this.inspectionResultForm[0].result = resultVal
                sessionStorage.setItem("process-resultVal",resultVal)
                sessionStorage.setItem("process-resultVal-"+this.processInspectVo.id,resultVal)
            },
            init(){
                let id = this.processInspectVo.id
@@ -332,8 +332,15 @@
                    this.deviceList = res.data.data
                })
            },
            updateDevice(row){
            updateDevice(row,index){
                updateDeviceBypppId({equiomentId:row.eId,ppid:row.iId}).then(res=>{
                    this.inspectionItems.forEach(obj=>{
                        if(obj.children){
                            obj.children[index-1].inspectionValue = ''
                            obj.children[index-1].iresult = null
                            obj.children[index-1].empiricalValueAddss = []
                        }
                    })
                }).catch(error=>{
                    console.log(error)
                })