|
@@ -62,7 +62,7 @@
|
|
|
:close-on-click-modal="false">
|
|
|
<el-form ref="addDialogForm" :model="addDialogForm" :rules="rules" label-width="120px">
|
|
|
<el-form-item label="检查内容:" prop="checkLevel">
|
|
|
- <el-select v-model="addDialogForm.joinHazardReid" placeholder="请选择检查项" style="width:548px;">
|
|
|
+ <el-select v-model="addDialogForm.joinHazardReid" placeholder="请选择检查项" :disabled="isDetail" style="width:548px;">
|
|
|
<el-option
|
|
|
v-for="item in materialTypeList"
|
|
|
:key="item.id"
|
|
@@ -72,7 +72,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<div class="small_title">对应检查项目</div>
|
|
|
- <el-form-item label="检查类目" prop="joinCheckOpList">
|
|
|
+ <el-form-item label="检查类目" prop="joinCheckOpList" v-if="!isDetail">
|
|
|
<el-cascader
|
|
|
style="width:548px;"
|
|
|
v-model="addDialogForm.joinCheckOpList"
|
|
@@ -179,6 +179,7 @@ export default {
|
|
|
label: 'labelName'
|
|
|
},
|
|
|
cascaderCheckedData:[],//检查类目树回显
|
|
|
+ isDetail:false,
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -215,8 +216,8 @@ export default {
|
|
|
handleClick(index,row,doType){
|
|
|
let _this=this;
|
|
|
if(doType=='add'){//新增
|
|
|
+ this.isDetail=false;
|
|
|
this.$set(this,'addDialogType',true);
|
|
|
-
|
|
|
this.$set(this,'addDialogTitle','新增检查项');
|
|
|
this.$set(this,'addDialogForm',{
|
|
|
joinHazardReid:'',
|
|
@@ -228,8 +229,17 @@ export default {
|
|
|
this.$refs.tree.setCheckedKeys([]);
|
|
|
});
|
|
|
}else if(doType=='detail'){//详情
|
|
|
-
|
|
|
+ this.isDetail=true;
|
|
|
+ this.$set(this,'addDialogType',true);
|
|
|
+ this.$set(this,'addDialogTitle','编辑检查项');
|
|
|
+ this.getInfo(row.id)
|
|
|
+ this.inspectContentList(row.id)//检查内容
|
|
|
+ this.$nextTick(function () {
|
|
|
+ //Dom更新完毕
|
|
|
+ this.$refs.tree.setCheckedKeys([]);
|
|
|
+ });
|
|
|
}else if(doType=='edit'){//编辑
|
|
|
+ this.isDetail=false;
|
|
|
this.$set(this,'addDialogType',true);
|
|
|
this.$set(this,'addDialogTitle','编辑检查项');
|
|
|
this.getInfo(row.id)
|