|
@@ -242,9 +242,9 @@
|
|
<div class="bottom-form-box" v-if="addForm.checkCategory==2 && pageType==2">
|
|
<div class="bottom-form-box" v-if="addForm.checkCategory==2 && pageType==2">
|
|
<div class="bottom-form-title-box">
|
|
<div class="bottom-form-title-box">
|
|
<p>检查项</p>
|
|
<p>检查项</p>
|
|
- <p>检查项:{{addForm.specialCheckHazardDtoList.length}}</p>
|
|
|
|
|
|
+ <p>检查项:{{addForm.checkHazardInfoVoList.length}}</p>
|
|
</div>
|
|
</div>
|
|
- <div class="for-max-big-box for-max-big-box-special" v-for="(item,index) in addForm.specialCheckHazardDtoList" :key="index">
|
|
|
|
|
|
+ <div class="for-max-big-box for-max-big-box-special" v-for="(item,index) in addForm.checkHazardInfoVoList" :key="index">
|
|
<div class="for-title-box">
|
|
<div class="for-title-box">
|
|
<p class="for-title-p">{{index+1}}、【{{item.name}}】{{item.type}}</p>
|
|
<p class="for-title-p">{{index+1}}、【{{item.name}}】{{item.type}}</p>
|
|
<div class="for-del-box">
|
|
<div class="for-del-box">
|
|
@@ -256,68 +256,71 @@
|
|
<p>{{item.lookType?'收起':'展开'}}</p>
|
|
<p>{{item.lookType?'收起':'展开'}}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="for-big-box-special" v-for="(item2,index2) in item.subitem">
|
|
|
|
- <el-form-item label="检查项目" :prop="'specialCheckHazardDtoList.'+index+'.hazardCheckPro'" :rules="rules.hazardCheckPro" label-width="123px">
|
|
|
|
- <el-radio-group v-model="item2.checkResult" style="margin-right: 20px;">
|
|
|
|
- <el-radio :label="1">符合</el-radio>
|
|
|
|
- <el-radio :label="0">不符合</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- <el-cascader
|
|
|
|
- @change="(val)=>cascaderChange(val,item2,index2)"
|
|
|
|
- v-model="item2.hazardCheckPro"
|
|
|
|
- style="width: 730px"
|
|
|
|
- placeholder="请选择检查项"
|
|
|
|
- :options="options"
|
|
|
|
- :props="{ checkStrictly: false, value: 'id', label: 'labelName',emitPath:false }"
|
|
|
|
- filterable>
|
|
|
|
- <template slot-scope="{data}">
|
|
|
|
- <el-tooltip :content="data.labelName" v-if="data.labelName.length>22">
|
|
|
|
- <p style="max-width:300px;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;">{{data.labelName}}</p>
|
|
|
|
- </el-tooltip>
|
|
|
|
- <p v-else style="max-width:300px;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;">{{data.labelName}}</p>
|
|
|
|
- </template>
|
|
|
|
- </el-cascader>
|
|
|
|
- <p class="hazard-check-count-p" v-if="hazardCheckCount>0">此检查项在当前实验室累计出现 <span>{{hazardCheckCount}}</span> 次隐患</p>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item v-if="item2.checkResult==0" label="隐患等级" :prop="'specialCheckHazardDtoList.'+index+'.hazardLevel'" :rules="rules.hazardLevel" label-width="123px">
|
|
|
|
- <el-select v-model="item2.hazardLevel" clearable placeholder="请选择隐患等级" style="width: 408px">
|
|
|
|
- <el-option :key="2" label="一般隐患" :value="2"></el-option>
|
|
|
|
- <el-option :key="1" label="重大隐患" :value="1"></el-option>
|
|
|
|
- <el-option :key="3" label="管理问题" :value="3"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item v-if="item2.checkResult==0" label="隐患描述" :prop="'specialCheckHazardDtoList.'+index+'.hazardDescribe'" :rules="rules.hazardDescribe" label-width="123px">
|
|
|
|
- <el-input
|
|
|
|
- style="width: 898px"
|
|
|
|
- type="textarea"
|
|
|
|
- :autosize="{ minRows: 4, maxRows: 4}"
|
|
|
|
- placeholder="请输入隐患描述"
|
|
|
|
- resize="none"
|
|
|
|
- maxlength="100"
|
|
|
|
- show-word-limit
|
|
|
|
- v-model="item2.hazardDescribe">
|
|
|
|
- </el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item v-if="item2.checkResult==0" label="隐患照片" :prop="'specialCheckHazardDtoList.'+index+'.uploadDtoList'" :rules="rules.uploadDtoList" label-width="123px">
|
|
|
|
- <div class="for-img-box" v-for="(img,imgIndex) in item2.uploadDtoList" :key="imgIndex">
|
|
|
|
- <img class="for-img" :src="img.fileUrl" @click="lookImg(item2.uploadDtoList,imgIndex)">
|
|
|
|
- <p class="for-del-button el-icon-circle-close" @click="delImg(index,imgIndex)"></p>
|
|
|
|
- </div>
|
|
|
|
- <el-upload
|
|
|
|
- v-if="item2.uploadDtoList.length<5"
|
|
|
|
- style="display: inline-block;overflow: hidden"
|
|
|
|
- class="avatar-uploader"
|
|
|
|
- :action="uploadImgUrl"
|
|
|
|
- :show-file-list="false"
|
|
|
|
- :on-success="(res)=>handleAvatarSuccess(res,item2)"
|
|
|
|
- :headers="headers"
|
|
|
|
- :before-upload="(res)=>beforeAvatarUpload(res,item2)">
|
|
|
|
- <p class="el-icon-plus up-img-p" style="display: inline-block"></p>
|
|
|
|
- </el-upload>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item v-if="item2.checkResult==0" label="" label-width="123px" style="margin-bottom:40px;color:#999;">
|
|
|
|
- <p>支持jpg/png/bmp/gif格式,且不超过2M,最多上传5张</p>
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <div class="for-big-box-special" v-for="(item2,index2) in item.checkHazardDtoList">
|
|
|
|
+ <div class="for-big-box-special-l">{{index+1}}.{{index2+1}}</div>
|
|
|
|
+ <div class="for-big-box-special-r">
|
|
|
|
+ <el-form-item label="检查项目" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.hazardCheckPro'" :rules="rules.hazardCheckPro" label-width="123px">
|
|
|
|
+ <el-radio-group v-model="item2.checkFlag" style="margin-right: 20px;">
|
|
|
|
+ <el-radio :label="1">符合</el-radio>
|
|
|
|
+ <el-radio :label="0">不符合</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ <el-cascader
|
|
|
|
+ @change="(val)=>cascaderChange(val,item2,index2)"
|
|
|
|
+ v-model="item2.hazardCheckPro"
|
|
|
|
+ style="width: 730px"
|
|
|
|
+ placeholder="请选择检查项"
|
|
|
|
+ :options="options"
|
|
|
|
+ :props="{ checkStrictly: false, value: 'id', label: 'labelName',emitPath:false }"
|
|
|
|
+ filterable>
|
|
|
|
+ <template slot-scope="{data}">
|
|
|
|
+ <el-tooltip :content="data.labelName" v-if="data.labelName.length>22">
|
|
|
|
+ <p style="max-width:300px;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;">{{data.labelName}}</p>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ <p v-else style="max-width:300px;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;">{{data.labelName}}</p>
|
|
|
|
+ </template>
|
|
|
|
+ </el-cascader>
|
|
|
|
+ <p class="hazard-check-count-p" v-if="hazardCheckCount>0">此检查项在当前实验室累计出现 <span>{{hazardCheckCount}}</span> 次隐患</p>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item v-if="item2.checkFlag==0" label="隐患等级" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.hazardLevel'" :rules="rules.hazardLevel" label-width="123px">
|
|
|
|
+ <el-select v-model="item2.hazardLevel" clearable placeholder="请选择隐患等级" style="width: 408px">
|
|
|
|
+ <el-option :key="2" label="一般隐患" :value="2"></el-option>
|
|
|
|
+ <el-option :key="1" label="重大隐患" :value="1"></el-option>
|
|
|
|
+ <el-option :key="3" label="管理问题" :value="3"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item v-if="item2.checkFlag==0" label="隐患描述" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.hazardDescribe'" :rules="rules.hazardDescribe" label-width="123px">
|
|
|
|
+ <el-input
|
|
|
|
+ style="width: 898px"
|
|
|
|
+ type="textarea"
|
|
|
|
+ :autosize="{ minRows: 4, maxRows: 4}"
|
|
|
|
+ placeholder="请输入隐患描述"
|
|
|
|
+ resize="none"
|
|
|
|
+ maxlength="100"
|
|
|
|
+ show-word-limit
|
|
|
|
+ v-model="item2.hazardDescribe">
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item v-if="item2.checkFlag==0" label="隐患照片" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.uploadDtoList'" :rules="rules.uploadDtoList" label-width="123px">
|
|
|
|
+ <div class="for-img-box" v-for="(img,imgIndex) in item2.uploadDtoList" :key="imgIndex">
|
|
|
|
+ <img class="for-img" :src="img.fileUrl" @click="lookImg(item2.uploadDtoList,imgIndex)">
|
|
|
|
+ <p class="for-del-button el-icon-circle-close" @click="delImg(index,imgIndex)"></p>
|
|
|
|
+ </div>
|
|
|
|
+ <el-upload
|
|
|
|
+ v-if="item2.uploadDtoList.length<5"
|
|
|
|
+ style="display: inline-block;overflow: hidden"
|
|
|
|
+ class="avatar-uploader"
|
|
|
|
+ :action="uploadImgUrl"
|
|
|
|
+ :show-file-list="false"
|
|
|
|
+ :on-success="(res)=>handleAvatarSuccess(res,item2)"
|
|
|
|
+ :headers="headers"
|
|
|
|
+ :before-upload="(res)=>beforeAvatarUpload(res,item2)">
|
|
|
|
+ <p class="el-icon-plus up-img-p" style="display: inline-block"></p>
|
|
|
|
+ </el-upload>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item v-if="item2.checkFlag==0" label="" label-width="123px" style="margin-bottom:40px;color:#999;">
|
|
|
|
+ <p>支持jpg/png/bmp/gif格式,且不超过2M,最多上传5张</p>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<p class="add-bottom-button" @click="addObjectTow(item)">+新增隐患检查项</p>
|
|
<p class="add-bottom-button" @click="addObjectTow(item)">+新增隐患检查项</p>
|
|
</div>
|
|
</div>
|
|
@@ -401,13 +404,13 @@
|
|
//综合检查
|
|
//综合检查
|
|
checkHazardDtoList:[],
|
|
checkHazardDtoList:[],
|
|
//专项检查
|
|
//专项检查
|
|
- specialCheckHazardDtoList:[
|
|
|
|
|
|
+ checkHazardInfoVoList:[
|
|
{
|
|
{
|
|
name:'烘箱-001',
|
|
name:'烘箱-001',
|
|
type:'专项检查',
|
|
type:'专项检查',
|
|
- subitem:[
|
|
|
|
|
|
+ checkHazardDtoList:[
|
|
{
|
|
{
|
|
- checkResult:0,
|
|
|
|
|
|
+ checkFlag:0,
|
|
hazardCheckCode:'',
|
|
hazardCheckCode:'',
|
|
hazardCheckName:'',
|
|
hazardCheckName:'',
|
|
hazardCheckPoint:'',
|
|
hazardCheckPoint:'',
|
|
@@ -417,7 +420,7 @@
|
|
lookType:true,
|
|
lookType:true,
|
|
uploadDtoList:[],
|
|
uploadDtoList:[],
|
|
},{
|
|
},{
|
|
- checkResult:0,
|
|
|
|
|
|
+ checkFlag:0,
|
|
hazardCheckCode:'',
|
|
hazardCheckCode:'',
|
|
hazardCheckName:'',
|
|
hazardCheckName:'',
|
|
hazardCheckPoint:'',
|
|
hazardCheckPoint:'',
|
|
@@ -530,13 +533,13 @@
|
|
this.pageType=2;
|
|
this.pageType=2;
|
|
this.checkOptionList();
|
|
this.checkOptionList();
|
|
this.dialogVisible=false;
|
|
this.dialogVisible=false;
|
|
- if(this.addForm.specialCheckHazardDtoList.length<10){
|
|
|
|
|
|
+ if(this.addForm.checkHazardInfoVoList.length<10){
|
|
let obj = {
|
|
let obj = {
|
|
name:'烘箱-001',
|
|
name:'烘箱-001',
|
|
type:'专项检查',
|
|
type:'专项检查',
|
|
- subitem:[]
|
|
|
|
|
|
+ checkHazardDtoList:[]
|
|
};
|
|
};
|
|
- this.addForm.specialCheckHazardDtoList.push(obj);
|
|
|
|
|
|
+ this.addForm.checkHazardInfoVoList.push(obj);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -649,9 +652,9 @@
|
|
},
|
|
},
|
|
//新增隐患项
|
|
//新增隐患项
|
|
addObjectTow(item){
|
|
addObjectTow(item){
|
|
- if(item.subitem.length<10){
|
|
|
|
|
|
+ if(item.checkHazardDtoList.length<10){
|
|
let obj = {
|
|
let obj = {
|
|
- checkResult:0,
|
|
|
|
|
|
+ checkFlag:0,
|
|
hazardCheckCode:'',
|
|
hazardCheckCode:'',
|
|
hazardCheckName:'',
|
|
hazardCheckName:'',
|
|
hazardCheckPoint:'',
|
|
hazardCheckPoint:'',
|
|
@@ -661,7 +664,7 @@
|
|
lookType:true,
|
|
lookType:true,
|
|
uploadDtoList:[],
|
|
uploadDtoList:[],
|
|
};
|
|
};
|
|
- item.subitem.push(obj);
|
|
|
|
|
|
+ item.checkHazardDtoList.push(obj);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//新增检查项
|
|
//新增检查项
|
|
@@ -983,7 +986,7 @@
|
|
})
|
|
})
|
|
}else if(this.addForm.checkCategory==2){//专项检查
|
|
}else if(this.addForm.checkCategory==2){//专项检查
|
|
if(!obj){
|
|
if(!obj){
|
|
- this.$set(this.addForm.specialCheckHazardDtoList[index],'hazardCheckPro','');
|
|
|
|
|
|
+ this.$set(this.addForm.checkHazardInfoVoList[index],'hazardCheckPro','');
|
|
this.msgError('未找到相关项目')
|
|
this.msgError('未找到相关项目')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -1223,6 +1226,21 @@
|
|
.for-big-box-special{
|
|
.for-big-box-special{
|
|
border-bottom: 1px dotted #D8D8D8;
|
|
border-bottom: 1px dotted #D8D8D8;
|
|
margin:30px;
|
|
margin:30px;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
+ .for-big-box-special-l{
|
|
|
|
+ width: 30px;
|
|
|
|
+ height: 30px;
|
|
|
|
+ background: #0183FA;
|
|
|
|
+ border-radius: 6px 6px 6px 6px;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-family: Microsoft YaHei-Regular, Microsoft YaHei;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #FFFFFF;
|
|
|
|
+ line-height: 30px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
|
|
+ .for-big-box-special-r{}
|
|
}
|
|
}
|
|
.for-big-box-special:last-of-type{
|
|
.for-big-box-special:last-of-type{
|
|
border-bottom: none;
|
|
border-bottom: none;
|