fix:coding#803#857、38已下检测的项检测时候,缺陷项加可以全选的功能
This commit is contained in:
parent
7e7d417ced
commit
85d60f1a0f
|
@ -314,6 +314,16 @@
|
|||
style="width: 100%"
|
||||
@change="defectidsChange"
|
||||
>
|
||||
<template #header v-if="route_code=='zhongjian1'||route_code=='fenjian'||route_code=='zhongjian2'||route_code=='chengpingneiwaichujian'||route_code=='chengpneizhifujian'||route_code=='chengpingxinengjiance'||
|
||||
route_code=='chenpjianchicunjiance'||route_code=='chengpwaiguanfujianyi'||route_code=='chengpwaiguanfujianer'">
|
||||
<el-checkbox
|
||||
v-model="checkAll"
|
||||
:indeterminate="indeterminate"
|
||||
@change="handleCheckAll"
|
||||
>
|
||||
All
|
||||
</el-checkbox>
|
||||
</template>
|
||||
<el-option
|
||||
v-for="item in qct_defects"
|
||||
:key="item.defect"
|
||||
|
@ -457,6 +467,7 @@ export default {
|
|||
route_code:"",
|
||||
wprInputText:"",
|
||||
params: {mlogb:'',page:0},
|
||||
checkAll: false,
|
||||
hideAdd: true,
|
||||
visible: false,
|
||||
setVisible:false,
|
||||
|
@ -910,6 +921,24 @@ export default {
|
|||
that.defectlists.push(item);
|
||||
}
|
||||
})
|
||||
if(that.defectlists.length == that.qct_defects.length){
|
||||
that.checkAll = true;
|
||||
}else{
|
||||
that.checkAll = false;
|
||||
}
|
||||
},
|
||||
handleCheckAll(){
|
||||
let that = this;
|
||||
that.defectlists = [];
|
||||
that.form.defectids = [];
|
||||
if(that.checkAll){
|
||||
that.qct_defects.forEach(item => {
|
||||
item.canEdit = true;
|
||||
item.value=null;
|
||||
that.defectlists.push(item);
|
||||
that.form.defectids.push(item.defect);
|
||||
})
|
||||
}
|
||||
},
|
||||
check_start(){
|
||||
this.checkVisible=true;
|
||||
|
|
Loading…
Reference in New Issue