|
@@ -4,7 +4,7 @@
|
|
|
<div class="approval_handle-page" v-if="pageType == 1">
|
|
|
<el-form :model="queryParams" ref="queryForm" style="margin-top:20px;" :inline="true">
|
|
|
<el-form-item label="类型:" prop="checkLevel">
|
|
|
- <el-select v-model="queryParams.hazardType" placeholder="请选择检查项">
|
|
|
+ <el-select v-model="queryParams.hazardType" placeholder="请选择类型">
|
|
|
<el-option
|
|
|
v-for="item in dangerArr"
|
|
|
:key="item.dictValue"
|
|
@@ -166,10 +166,12 @@ export default {
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
joinCheckOpList: [
|
|
|
- { required: true, message: "请选择", trigger: "change" },
|
|
|
+ { required: true, message: "请选择", trigger: "blur" },
|
|
|
+ { required: true, message: "请选择", validator: this.spaceJudgment, trigger: "blur" }
|
|
|
],
|
|
|
joinHazardReid: [
|
|
|
- { required: true, message: "请输入检查项目内容", trigger: "change" }
|
|
|
+ { required: true, message: "请输入检查项目内容", trigger: "blur" },
|
|
|
+ { required: true, message: "请输入检查项目内容", validator: this.spaceJudgment, trigger: "blur" }
|
|
|
],
|
|
|
},
|
|
|
|
|
@@ -188,7 +190,6 @@ export default {
|
|
|
let _this=this;
|
|
|
if(doType=='add'){//新增
|
|
|
this.isDetail=false;
|
|
|
- this.resetForm('addDialogForm');
|
|
|
this.$set(this,'addDialogType',true);
|
|
|
this.$set(this,'addDialogTitle','新增检查项');
|
|
|
this.inspectContentList()//检查内容
|
|
@@ -198,7 +199,6 @@ export default {
|
|
|
});
|
|
|
}else if(doType=='detail'){//详情
|
|
|
this.isDetail=true;
|
|
|
- this.resetForm('addDialogForm')
|
|
|
this.$set(this,'addDialogType',true);
|
|
|
this.$set(this,'addDialogTitle','编辑检查项');
|
|
|
this.getInfo(row.id)
|
|
@@ -209,7 +209,6 @@ export default {
|
|
|
});
|
|
|
}else if(doType=='edit'){//编辑
|
|
|
this.isDetail=false;
|
|
|
- this.resetForm('addDialogForm')
|
|
|
this.$set(this,'addDialogType',true);
|
|
|
this.$set(this,'addDialogTitle','编辑检查项');
|
|
|
this.getInfo(row.id)
|
|
@@ -234,15 +233,10 @@ export default {
|
|
|
}).catch(() => {});
|
|
|
}
|
|
|
},
|
|
|
- resetForm(formName) {
|
|
|
- if (this.$refs[formName]!==undefined) {
|
|
|
- // 清除表单内容和清除表单验证消息
|
|
|
- this.$refs[formName].resetFields();
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
//添加页面关闭
|
|
|
addDialogOff(){
|
|
|
+ this.$set(this.addDialogForm,'joinCheckOpList',null);
|
|
|
+ this.$set(this.addDialogForm,'joinHazardReid','');
|
|
|
this.$set(this,'addDialogType',false);
|
|
|
},
|
|
|
//联级选中
|