|
@@ -36,6 +36,17 @@
|
|
<p class="inquire-button-one" @click="planButton(2)"
|
|
<p class="inquire-button-one" @click="planButton(2)"
|
|
style="font-size:14px;margin-left:20px;width:100px;" v-if="planList[0]">选择计划</p>
|
|
style="font-size:14px;margin-left:20px;width:100px;" v-if="planList[0]">选择计划</p>
|
|
</div>
|
|
</div>
|
|
|
|
+ <el-form-item label="检查类型" prop="checkCategory" >
|
|
|
|
+ <el-select :disabled="planType==2" v-model="addForm.checkCategory" @change="checkCategoryChange" placeholder="请选择检查类型"
|
|
|
|
+ style="width: 500px;height: 40px;">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in inspectCategoryList"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
<div style="display: flex" v-if="planType == 2">
|
|
<div style="display: flex" v-if="planType == 2">
|
|
<el-form-item label="计划" prop="id">
|
|
<el-form-item label="计划" prop="id">
|
|
<el-select v-model="addForm.id" placeholder="请选择计划"
|
|
<el-select v-model="addForm.id" placeholder="请选择计划"
|
|
@@ -51,18 +62,18 @@
|
|
<p class="inquire-button-one" @click="planButton(1)"
|
|
<p class="inquire-button-one" @click="planButton(1)"
|
|
style="font-size:14px;margin-left:20px;width:100px;">自定义输入</p>
|
|
style="font-size:14px;margin-left:20px;width:100px;">自定义输入</p>
|
|
</div>
|
|
</div>
|
|
- <el-form-item label="检查结果" prop="checkResult">
|
|
|
|
- <el-select v-model="addForm.checkResult" @change="checkResultChange" placeholder="请选择检查结果" style="width: 500px">
|
|
|
|
- <el-option :key="0" label="不符合" :value="0"></el-option>
|
|
|
|
- <el-option :key="1" label="符合" :value="1"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="整改通知" prop="rectifyNotice" v-if="addForm.checkResult === 0">
|
|
|
|
- <el-radio-group v-model="addForm.rectifyNotice" style="margin-top:5px;">
|
|
|
|
- <el-radio :label="1">整改告知书</el-radio>
|
|
|
|
- <el-radio :label="2">整改通知书</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
|
|
+ <el-form-item label="整改期限" prop="rectifyDeadline" v-if="addForm.checkResult === 0 || addForm.checkCategory==2">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ style="width: 500px"
|
|
|
|
+ v-model="addForm.rectifyDeadline"
|
|
|
|
+ type="date"
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
+ :picker-options="pickerOptions"
|
|
|
|
+ :clearable="false"
|
|
|
|
+ placeholder="请选择整改期限">
|
|
|
|
+ </el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
<div class="top-form-right-box">
|
|
<div class="top-form-right-box">
|
|
<el-form-item label="学院" prop="deptId">
|
|
<el-form-item label="学院" prop="deptId">
|
|
@@ -76,8 +87,8 @@
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="检查类型" prop="checkType">
|
|
|
|
- <el-select v-model="addForm.checkType" placeholder="请选择检查类型"
|
|
|
|
|
|
+ <el-form-item label="检查组织" prop="checkType">
|
|
|
|
+ <el-select v-model="addForm.checkType" placeholder="请选择检查组织"
|
|
disabled style="width: 500px">
|
|
disabled style="width: 500px">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in checkTypeList"
|
|
v-for="item in checkTypeList"
|
|
@@ -102,20 +113,23 @@
|
|
end-placeholder="结束日期"
|
|
end-placeholder="结束日期"
|
|
></el-date-picker>
|
|
></el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="整改期限" prop="rectifyDeadline" v-if="addForm.checkResult === 0">
|
|
|
|
- <el-date-picker
|
|
|
|
- style="width: 500px"
|
|
|
|
- v-model="addForm.rectifyDeadline"
|
|
|
|
- type="date"
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
- :picker-options="pickerOptions"
|
|
|
|
- :clearable="false"
|
|
|
|
- placeholder="请选择整改期限">
|
|
|
|
- </el-date-picker>
|
|
|
|
|
|
+ <el-form-item label="检查结果" prop="checkResult" v-if="addForm.checkCategory==1">
|
|
|
|
+ <el-select v-model="addForm.checkResult" @change="checkResultChange" placeholder="请选择检查结果" style="width: 500px">
|
|
|
|
+ <el-option :key="0" label="不符合" :value="0"></el-option>
|
|
|
|
+ <el-option :key="1" label="符合" :value="1"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="整改通知" prop="rectifyNotice" v-if="addForm.checkResult === 0 || addForm.checkCategory==2">
|
|
|
|
+ <el-radio-group v-model="addForm.rectifyNotice" style="margin-top:5px;">
|
|
|
|
+ <el-radio :label="1">整改告知书</el-radio>
|
|
|
|
+ <el-radio :label="2">整改通知书</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="bottom-form-box" v-if="addForm.checkResult === 0">
|
|
|
|
|
|
+ <!--综合检查-->
|
|
|
|
+ <div class="bottom-form-box" v-if="addForm.checkResult === 0 && addForm.checkCategory==1">
|
|
<div class="bottom-form-title-box">
|
|
<div class="bottom-form-title-box">
|
|
<p>不符合项</p>
|
|
<p>不符合项</p>
|
|
<p>隐患数:{{addForm.checkHazardDtoList.length}}</p>
|
|
<p>隐患数:{{addForm.checkHazardDtoList.length}}</p>
|
|
@@ -125,7 +139,7 @@
|
|
<p class="for-title-p">第{{index+1}}隐患项</p>
|
|
<p class="for-title-p">第{{index+1}}隐患项</p>
|
|
<div class="for-del-box">
|
|
<div class="for-del-box">
|
|
<p class="el-icon-delete"></p>
|
|
<p class="el-icon-delete"></p>
|
|
- <p @click="delCheckHazardDtoList(index)">删除此项</p>
|
|
|
|
|
|
+ <p @click="delCheckHazardDtoList(index,'',1)">删除此项</p>
|
|
</div>
|
|
</div>
|
|
<div class="for-button-box" @click="dataLookButton(item)">
|
|
<div class="for-button-box" @click="dataLookButton(item)">
|
|
<p :class="item.lookType?'el-icon-arrow-up':'el-icon-arrow-down'"></p>
|
|
<p :class="item.lookType?'el-icon-arrow-up':'el-icon-arrow-down'"></p>
|
|
@@ -142,7 +156,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="检查项目" :prop="'checkHazardDtoList.'+index+'.hazardCheckPro'" :rules="rules.hazardCheckPro" label-width="123px">
|
|
<el-form-item label="检查项目" :prop="'checkHazardDtoList.'+index+'.hazardCheckPro'" :rules="rules.hazardCheckPro" label-width="123px">
|
|
<el-cascader
|
|
<el-cascader
|
|
- @change="(val)=>cascaderChange(val,index)"
|
|
|
|
|
|
+ @change="(val)=>cascaderChange(val,'',index)"
|
|
v-model="item.hazardCheckPro"
|
|
v-model="item.hazardCheckPro"
|
|
style="width: 898px"
|
|
style="width: 898px"
|
|
placeholder="请选择检查项"
|
|
placeholder="请选择检查项"
|
|
@@ -206,6 +220,112 @@
|
|
</div>
|
|
</div>
|
|
<p class="add-bottom-button" @click="addObject">+新增隐患检查项</p>
|
|
<p class="add-bottom-button" @click="addObject">+新增隐患检查项</p>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!--专项检查-->
|
|
|
|
+ <div class="bottom-form-box" v-if="addForm.checkCategory==2 && pageType==1">
|
|
|
|
+ <div class="bottom-form-title-box">
|
|
|
|
+ <p>检查项</p>
|
|
|
|
+ <p>检查项:{{addForm.checkHazardInfoVoList.length}}</p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="dept-table-max-box">
|
|
|
|
+ <div class="device-tip">请选择以下实验室内设备开始检查</div>
|
|
|
|
+ <el-table border :data="deviceTableList" @selection-change="deviceChange" :row-key="getRowKeys" height="350">
|
|
|
|
+ <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
|
|
|
|
+ <el-table-column label="名称" align="center" prop="chName" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="型号" align="center" prop="code" show-overflow-tooltip />
|
|
|
|
+ <el-table-column label="类型" align="center" prop="hazardTypeModeName" show-overflow-tooltip/>
|
|
|
|
+ </el-table>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="start_btn" @click="handleClick('startBtn')">开始检查</div>
|
|
|
|
+ </div>
|
|
|
|
+ <!--专项检查项-->
|
|
|
|
+ <div class="bottom-form-box" v-if="addForm.checkCategory==2 && pageType==2">
|
|
|
|
+ <div class="bottom-form-title-box">
|
|
|
|
+ <p>检查项</p>
|
|
|
|
+ <p>检查项:{{addForm.checkHazardInfoVoList.length}}</p>
|
|
|
|
+ </div>
|
|
|
|
+ <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">
|
|
|
|
+ <p class="for-title-p">{{index+1}}、【{{item.hazardName}}-{{item.code}}】专项检查</p>
|
|
|
|
+ <div class="for-del-box" v-if="planType==1">
|
|
|
|
+ <p class="el-icon-delete"></p>
|
|
|
|
+ <p @click="delCheckHazardDtoList(index,'',2)">删除此项</p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="for-button-box" @click="dataLookButton(item)">
|
|
|
|
+ <p :class="item.lookType?'el-icon-arrow-up':'el-icon-arrow-down'"></p>
|
|
|
|
+ <p>{{item.lookType?'收起':'展开'}}</p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="for-big-box-special" v-if="item.lookType" v-for="(item2,index2) in item.checkHazardDtoList">
|
|
|
|
+ <div class="for-big-box-special-l">{{index+1}}.{{index2+1}}</div>
|
|
|
|
+ <div class="for-big-box 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>
|
|
|
|
+ <i class="el-icon-delete" v-if="planType==1" @click="delCheckHazardDtoList(index,index2,3)" style="color: #0183FA;margin-left: 20px;cursor: pointer;"></i>
|
|
|
|
+ <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="隐患描述" 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>
|
|
|
|
+ <p class="add-bottom-button" v-if="planType == 1" @click="addObjectTow(item)">+新增隐患检查项</p>
|
|
|
|
+ </div>
|
|
|
|
+ <p class="add-bottom-button" v-if="planType == 1" @click="addObjectDevice()">+新增检查项</p>
|
|
|
|
+ </div>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
<div class="bottom-button-max-box" v-hasPermi="['safety:checkManage_4:edit']">
|
|
<div class="bottom-button-max-box" v-hasPermi="['safety:checkManage_4:edit']">
|
|
@@ -215,6 +335,20 @@
|
|
<p class="null-p"></p>
|
|
<p class="null-p"></p>
|
|
</div>
|
|
</div>
|
|
<lookImgDialog ref="lookImgDialog"></lookImgDialog>
|
|
<lookImgDialog ref="lookImgDialog"></lookImgDialog>
|
|
|
|
+ <!--设备弹窗-->
|
|
|
|
+ <el-dialog title="检查项" v-if="dialogVisible" :visible.sync="dialogVisible" width="730px" :append-to-body="false" :modal-append-to-body="false" :close-on-click-modal="false">
|
|
|
|
+ <div style="margin-bottom:20px ">请选择以下实验室内设备开始检查</div>
|
|
|
|
+ <el-table ref="deviceTable" border :data="deviceTableList" @selection-change="deviceChange" :row-key="getRowKeys" height="350">
|
|
|
|
+ <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
|
|
|
|
+ <el-table-column label="名称" align="center" prop="chName" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="型号" align="center" prop="code" show-overflow-tooltip />
|
|
|
|
+ <el-table-column label="类型" align="center" prop="hazardTypeModeName" show-overflow-tooltip/>
|
|
|
|
+ </el-table>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="handleClick('startBtn')">确 定</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -223,8 +357,18 @@
|
|
import lookImgDialog from '@/components/lookImgDialog/lookImgDialog.vue'
|
|
import lookImgDialog from '@/components/lookImgDialog/lookImgDialog.vue'
|
|
import { listDepartments } from "@/api/system/dept";
|
|
import { listDepartments } from "@/api/system/dept";
|
|
import { buildFloorGetlist } from "@/api/laboratory/building";
|
|
import { buildFloorGetlist } from "@/api/laboratory/building";
|
|
- import { buildBySubList,getCheckPlanBySubId,findCheckManage,checkOptionList,
|
|
|
|
- checkManageUpdate,checkManageAdd,countHazardNum,getGentle } from "@/api/safetyCheck/index";
|
|
|
|
|
|
+ import {
|
|
|
|
+ buildBySubList,
|
|
|
|
+ getCheckPlanBySubId,
|
|
|
|
+ findCheckManage,
|
|
|
|
+ checkOptionList,
|
|
|
|
+ checkManageUpdate,
|
|
|
|
+ checkManageAdd,
|
|
|
|
+ countHazardNum,
|
|
|
|
+ getGentle,
|
|
|
|
+ getHazardInfoBySubId,
|
|
|
|
+ getHazardInfo, getHazardInfoByJoinIds
|
|
|
|
+ } from '@/api/safetyCheck/index'
|
|
export default {
|
|
export default {
|
|
name: 'index',
|
|
name: 'index',
|
|
components: {
|
|
components: {
|
|
@@ -243,7 +387,7 @@
|
|
return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择今天的
|
|
return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择今天的
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- //检查类型
|
|
|
|
|
|
+ //检查组织
|
|
checkTypeList:[{ key:1, label:"校院巡查", },{ key:2, label:"实验室自查", }],
|
|
checkTypeList:[{ key:1, label:"校院巡查", },{ key:2, label:"实验室自查", }],
|
|
//学院列表
|
|
//学院列表
|
|
deptSelectList:[],
|
|
deptSelectList:[],
|
|
@@ -262,15 +406,24 @@
|
|
title:"",
|
|
title:"",
|
|
checkResult:"",
|
|
checkResult:"",
|
|
rectifyNotice:"",
|
|
rectifyNotice:"",
|
|
|
|
+ checkCategory:'1',
|
|
checkType:2,
|
|
checkType:2,
|
|
dateRange:[],
|
|
dateRange:[],
|
|
rectifyDeadline:"",
|
|
rectifyDeadline:"",
|
|
|
|
+ //综合检查
|
|
checkHazardDtoList:[],
|
|
checkHazardDtoList:[],
|
|
|
|
+ //专项检查
|
|
|
|
+ checkHazardInfoVoList:[],
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+
|
|
//检查项出现次数
|
|
//检查项出现次数
|
|
hazardCheckCount:0,
|
|
hazardCheckCount:0,
|
|
//上传用名称保存
|
|
//上传用名称保存
|
|
upDataName:"",
|
|
upDataName:"",
|
|
|
|
+ deviceTableList:[],
|
|
|
|
+ //检查类型
|
|
|
|
+ inspectCategoryList:[{id:'1',name:'综合检查'},{id:'2',name:'专项检查'}],
|
|
// 表单校验
|
|
// 表单校验
|
|
rules: {
|
|
rules: {
|
|
subId: [
|
|
subId: [
|
|
@@ -283,6 +436,9 @@
|
|
{ required: true, message: "请选择学院", trigger: "blur" },
|
|
{ required: true, message: "请选择学院", trigger: "blur" },
|
|
],
|
|
],
|
|
checkType: [
|
|
checkType: [
|
|
|
|
+ { required: true, message: "请选择检查组织", trigger: "blur" },
|
|
|
|
+ ],
|
|
|
|
+ checkCategory: [
|
|
{ required: true, message: "请选择检查类型", trigger: "blur" },
|
|
{ required: true, message: "请选择检查类型", trigger: "blur" },
|
|
],
|
|
],
|
|
dateRange: [
|
|
dateRange: [
|
|
@@ -325,6 +481,11 @@
|
|
adminGentle:false,
|
|
adminGentle:false,
|
|
applyGentle:false,
|
|
applyGentle:false,
|
|
myApplyGentle:false,
|
|
myApplyGentle:false,
|
|
|
|
+ /* ==专项检查== */
|
|
|
|
+ dialogVisible:false,
|
|
|
|
+ pageType:0,
|
|
|
|
+ multipleSelection:[],
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created(){
|
|
created(){
|
|
@@ -337,6 +498,34 @@
|
|
this.buildFloorGetlist();
|
|
this.buildFloorGetlist();
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
|
|
+ getRowKeys(row) {
|
|
|
|
+ return row.joinHazardId
|
|
|
|
+ },
|
|
|
|
+ //选中设备
|
|
|
|
+ deviceChange(val){
|
|
|
|
+ console.log('1',val)
|
|
|
|
+ this.multipleSelection=val
|
|
|
|
+ },
|
|
|
|
+ handleClick(doType){
|
|
|
|
+ let self=this;
|
|
|
|
+ if(doType=='startBtn'){//开始检查
|
|
|
|
+ let joinHazardIds=[];
|
|
|
|
+ if(this.multipleSelection[0]){
|
|
|
|
+ this.checkOptionList();
|
|
|
|
+ this.dialogVisible=false;
|
|
|
|
+ for(let i=0;i<this.multipleSelection.length;i++){
|
|
|
|
+ joinHazardIds.push(this.multipleSelection[i].joinHazardId)
|
|
|
|
+ }
|
|
|
|
+ this.getHazardInfoByJoinIds(this.addForm.subId,joinHazardIds.join(','))
|
|
|
|
+ }else{
|
|
|
|
+ this.msgError('请先选择实验室内设备!')
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 取消按钮
|
|
|
|
+ cancel() {
|
|
|
|
+ this.dialogVisible = false;
|
|
|
|
+ },
|
|
//获取权限范围
|
|
//获取权限范围
|
|
getGentle(){
|
|
getGentle(){
|
|
getGentle().then(response => {
|
|
getGentle().then(response => {
|
|
@@ -358,24 +547,77 @@
|
|
if(this.planType == 1){
|
|
if(this.planType == 1){
|
|
//新计划
|
|
//新计划
|
|
let obj = JSON.parse(JSON.stringify(this.addForm));
|
|
let obj = JSON.parse(JSON.stringify(this.addForm));
|
|
- if(obj.checkResult === 0){
|
|
|
|
- if(!obj.checkHazardDtoList[0]){
|
|
|
|
- this.msgError('请添加隐患检查项')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- for(let i=0;i<obj.checkHazardDtoList.length;i++){
|
|
|
|
- delete obj.checkHazardDtoList[i].lookType
|
|
|
|
- }
|
|
|
|
- obj.dangerNum = obj.checkHazardDtoList.length
|
|
|
|
- }else{
|
|
|
|
- obj.checkHazardDtoList = [];
|
|
|
|
- }
|
|
|
|
obj.manageStatus = type
|
|
obj.manageStatus = type
|
|
obj.cycleStartTime = obj.dateRange[0]
|
|
obj.cycleStartTime = obj.dateRange[0]
|
|
obj.cycleEndTime = obj.dateRange[1]
|
|
obj.cycleEndTime = obj.dateRange[1]
|
|
obj.subIds = obj.subId;
|
|
obj.subIds = obj.subId;
|
|
delete obj.subId;
|
|
delete obj.subId;
|
|
delete obj.dateRange
|
|
delete obj.dateRange
|
|
|
|
+ if(this.addForm.checkCategory==1){//综合检查
|
|
|
|
+ if(obj.checkResult === 0){
|
|
|
|
+ if(!obj.checkHazardDtoList[0]){
|
|
|
|
+ this.msgError('请添加隐患检查项')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ for(let i=0;i<obj.checkHazardDtoList.length;i++){
|
|
|
|
+ obj.checkHazardDtoList[i].checkCategory=this.addForm.checkCategory;
|
|
|
|
+ delete obj.checkHazardDtoList[i].lookType
|
|
|
|
+ }
|
|
|
|
+ obj.dangerNum = obj.checkHazardDtoList.length
|
|
|
|
+ }else{
|
|
|
|
+ obj.checkHazardDtoList = [];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }else if(this.addForm.checkCategory==2){//专项检查
|
|
|
|
+ if(!obj.checkHazardInfoVoList[0]){
|
|
|
|
+ this.msgError('请添加隐患检查项')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(!obj.checkHazardInfoVoList[0].checkHazardDtoList[0]){
|
|
|
|
+ this.msgError('请添加隐患检查项')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ let list=[]
|
|
|
|
+ let checkFlagList=[];
|
|
|
|
+ for(let i=0;i<this.addForm.checkHazardInfoVoList.length;i++){
|
|
|
|
+ for(let b=0;b<this.addForm.checkHazardInfoVoList[i].checkHazardDtoList.length;b++){
|
|
|
|
+ checkFlagList.push(this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag)
|
|
|
|
+ let obj={
|
|
|
|
+ checkFlag:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag,
|
|
|
|
+ checkCategory:this.addForm.checkCategory,
|
|
|
|
+ hazardCheckCode:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckCode,
|
|
|
|
+ hazardCheckName:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckName,
|
|
|
|
+ hazardCheckPro:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckPro,
|
|
|
|
+ hazardDescribe:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardDescribe,
|
|
|
|
+ hazardLevel:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardLevel,
|
|
|
|
+ uploadDtoList:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].uploadDtoList,
|
|
|
|
+ code:this.addForm.checkHazardInfoVoList[i].code,
|
|
|
|
+ hazardId:this.addForm.checkHazardInfoVoList[i].hazardId,
|
|
|
|
+ hazardName:this.addForm.checkHazardInfoVoList[i].hazardName,
|
|
|
|
+ hazardTypeMode:this.addForm.checkHazardInfoVoList[i].hazardTypeMode,
|
|
|
|
+ hazardTypeModeName:this.addForm.checkHazardInfoVoList[i].hazardTypeModeName,
|
|
|
|
+ joinHazardId:this.addForm.checkHazardInfoVoList[i].joinHazardId,
|
|
|
|
+ }
|
|
|
|
+ list.push(obj)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.multipleSelection[0]){
|
|
|
|
+ let hazardIds=[];
|
|
|
|
+ let joinHazardIds=[];
|
|
|
|
+ for(let i=0;i<this.multipleSelection.length;i++){
|
|
|
|
+ hazardIds.push(this.multipleSelection[i].hazardId)
|
|
|
|
+ joinHazardIds.push(this.multipleSelection[i].joinHazardId)
|
|
|
|
+ }
|
|
|
|
+ obj.hazardIds=hazardIds.join(',')
|
|
|
|
+ obj.joinHazardIds=joinHazardIds.join(',')
|
|
|
|
+ }
|
|
|
|
+ if(checkFlagList.every(item=>{return item==1})){//符合
|
|
|
|
+ obj.checkResult=1;
|
|
|
|
+ }else{//不符合
|
|
|
|
+ obj.checkResult=0;
|
|
|
|
+ }
|
|
|
|
+ obj.checkHazardDtoList=list;
|
|
|
|
+ }
|
|
checkManageAdd(obj).then(response => {
|
|
checkManageAdd(obj).then(response => {
|
|
this.msgSuccess(response.msg);
|
|
this.msgSuccess(response.msg);
|
|
this.initializationAddData();
|
|
this.initializationAddData();
|
|
@@ -383,22 +625,64 @@
|
|
}if(this.planType == 2){
|
|
}if(this.planType == 2){
|
|
//已有计划修改
|
|
//已有计划修改
|
|
let obj = JSON.parse(JSON.stringify(this.addForm));
|
|
let obj = JSON.parse(JSON.stringify(this.addForm));
|
|
- if(obj.checkResult === 0){
|
|
|
|
- if(!obj.checkHazardDtoList[0]){
|
|
|
|
|
|
+ obj.manageStatus = type
|
|
|
|
+ obj.cycleStartTime = obj.dateRange[0]
|
|
|
|
+ obj.cycleEndTime = obj.dateRange[1]
|
|
|
|
+ delete obj.dateRange
|
|
|
|
+ if(this.addForm.checkCategory==1){//综合检查
|
|
|
|
+ if(obj.checkResult === 0){
|
|
|
|
+ if(!obj.checkHazardDtoList[0]){
|
|
|
|
+ this.msgError('请添加隐患检查项')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ for(let i=0;i<obj.checkHazardDtoList.length;i++){
|
|
|
|
+ obj.checkHazardDtoList[i].checkCategory=this.addForm.checkCategory;
|
|
|
|
+ delete obj.checkHazardDtoList[i].lookType
|
|
|
|
+ }
|
|
|
|
+ obj.dangerNum = obj.checkHazardDtoList.length
|
|
|
|
+ }else{
|
|
|
|
+ obj.checkHazardDtoList = [];
|
|
|
|
+ }
|
|
|
|
+ }else if(this.addForm.checkCategory==2){//专项检查
|
|
|
|
+ if(!obj.checkHazardInfoVoList[0]){
|
|
|
|
+ this.msgError('请添加隐患检查项')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(!obj.checkHazardInfoVoList[0].checkHazardDtoList[0]){
|
|
this.msgError('请添加隐患检查项')
|
|
this.msgError('请添加隐患检查项')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- for(let i=0;i<obj.checkHazardDtoList.length;i++){
|
|
|
|
- delete obj.checkHazardDtoList[i].lookType
|
|
|
|
|
|
+ let list=[]
|
|
|
|
+ let checkFlagList=[];
|
|
|
|
+ for(let i=0;i<this.addForm.checkHazardInfoVoList.length;i++){
|
|
|
|
+ for(let b=0;b<this.addForm.checkHazardInfoVoList[i].checkHazardDtoList.length;b++){
|
|
|
|
+ checkFlagList.push(this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag)
|
|
|
|
+ let obj={
|
|
|
|
+ checkFlag:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag,
|
|
|
|
+ checkCategory:this.addForm.checkCategory,
|
|
|
|
+ hazardCheckCode:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckCode,
|
|
|
|
+ hazardCheckName:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckName,
|
|
|
|
+ hazardCheckPro:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckPro,
|
|
|
|
+ hazardDescribe:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardDescribe,
|
|
|
|
+ hazardLevel:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardLevel,
|
|
|
|
+ uploadDtoList:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].uploadDtoList,
|
|
|
|
+ code:this.addForm.checkHazardInfoVoList[i].code,
|
|
|
|
+ hazardId:this.addForm.checkHazardInfoVoList[i].hazardId,
|
|
|
|
+ hazardName:this.addForm.checkHazardInfoVoList[i].hazardName,
|
|
|
|
+ hazardTypeMode:this.addForm.checkHazardInfoVoList[i].hazardTypeMode,
|
|
|
|
+ hazardTypeModeName:this.addForm.checkHazardInfoVoList[i].hazardTypeModeName,
|
|
|
|
+ joinHazardId:this.addForm.checkHazardInfoVoList[i].joinHazardId,
|
|
|
|
+ }
|
|
|
|
+ list.push(obj)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- obj.dangerNum = obj.checkHazardDtoList.length
|
|
|
|
- }else{
|
|
|
|
- obj.checkHazardDtoList = [];
|
|
|
|
|
|
+ if(checkFlagList.every(item=>{return item==1})){//符合
|
|
|
|
+ obj.checkResult=1;
|
|
|
|
+ }else{//不符合
|
|
|
|
+ obj.checkResult=0;
|
|
|
|
+ }
|
|
|
|
+ obj.checkHazardDtoList=list;
|
|
}
|
|
}
|
|
- obj.manageStatus = type
|
|
|
|
- obj.cycleStartTime = obj.dateRange[0]
|
|
|
|
- obj.cycleEndTime = obj.dateRange[1]
|
|
|
|
- delete obj.dateRange
|
|
|
|
checkManageUpdate(obj).then(response => {
|
|
checkManageUpdate(obj).then(response => {
|
|
this.msgSuccess(response.msg);
|
|
this.msgSuccess(response.msg);
|
|
this.initializationAddData();
|
|
this.initializationAddData();
|
|
@@ -440,6 +724,46 @@
|
|
this.addForm.checkHazardDtoList.push(obj);
|
|
this.addForm.checkHazardDtoList.push(obj);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ //新增隐患项
|
|
|
|
+ addObjectTow(item){
|
|
|
|
+ if(item.checkHazardDtoList.length<10){
|
|
|
|
+ let obj = {
|
|
|
|
+ checkFlag:0,
|
|
|
|
+ hazardCheckCode:'',
|
|
|
|
+ hazardCheckName:'',
|
|
|
|
+ hazardCheckPoint:'',
|
|
|
|
+ hazardCheckPro:'',
|
|
|
|
+ hazardDescribe:'',
|
|
|
|
+ hazardLevel:'',
|
|
|
|
+ lookType:true,
|
|
|
|
+ uploadDtoList:[],
|
|
|
|
+ };
|
|
|
|
+ item.checkHazardDtoList.push(obj);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //新增检查项
|
|
|
|
+ addObjectDevice(item){
|
|
|
|
+ let self=this;
|
|
|
|
+ this.dialogVisible=true;
|
|
|
|
+ let list=JSON.parse(JSON.stringify(self.multipleSelection))
|
|
|
|
+ setTimeout(function(){
|
|
|
|
+ self.$refs.deviceTable.clearSelection();
|
|
|
|
+ if(list[0]){
|
|
|
|
+ self.deviceTableList.forEach(row => {
|
|
|
|
+ list.forEach(function(item) {
|
|
|
|
+ if(row.joinHazardId==item.joinHazardId){
|
|
|
|
+ self.$refs.deviceTable.toggleRowSelection(row,true);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ });
|
|
|
|
+ }else{
|
|
|
|
+ if(self.$refs.deviceTable){
|
|
|
|
+ self.$refs.deviceTable.clearSelection();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },100);
|
|
|
|
+
|
|
|
|
+ },
|
|
//查看图片
|
|
//查看图片
|
|
lookImg(list,index){
|
|
lookImg(list,index){
|
|
for(let i=0;i<list.length;i++){
|
|
for(let i=0;i<list.length;i++){
|
|
@@ -501,14 +825,19 @@
|
|
//联级选择器数据处理
|
|
//联级选择器数据处理
|
|
getCascaderData(list){
|
|
getCascaderData(list){
|
|
let self = this;
|
|
let self = this;
|
|
- for(let i=0;i<list.length;i++){
|
|
|
|
- list[i].labelName = list[i].code? list[i].code +' '+ list[i].name:list[i].name
|
|
|
|
- if(list[i].level == 0 || list[i].level == 1 || list[i].level == 2){
|
|
|
|
- if(list[i].children){
|
|
|
|
- if(list[i].children[0]){
|
|
|
|
- self.getCascaderData(list[i].children)
|
|
|
|
- if(list[i].children){
|
|
|
|
- if(!list[i].children[0]){
|
|
|
|
|
|
+ if(this.addForm.checkCategory==1){//综合检查
|
|
|
|
+ for(let i=0;i<list.length;i++){
|
|
|
|
+ list[i].labelName = list[i].code? list[i].code +' '+ list[i].name:list[i].name
|
|
|
|
+ if(list[i].level == 0 || list[i].level == 1 || list[i].level == 2){
|
|
|
|
+ if(list[i].children){
|
|
|
|
+ if(list[i].children[0]){
|
|
|
|
+ self.getCascaderData(list[i].children)
|
|
|
|
+ if(list[i].children){
|
|
|
|
+ if(!list[i].children[0]){
|
|
|
|
+ list.splice(i,1)
|
|
|
|
+ i--
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
list.splice(i,1)
|
|
list.splice(i,1)
|
|
i--
|
|
i--
|
|
}
|
|
}
|
|
@@ -521,13 +850,51 @@
|
|
i--
|
|
i--
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
- list.splice(i,1)
|
|
|
|
- i--
|
|
|
|
|
|
+ if(list[i].level == 3){
|
|
|
|
+ if(list[i].children[0]){
|
|
|
|
+ let mainPoint=[]
|
|
|
|
+ for(let b=0;b<list[i].children.length;b++){
|
|
|
|
+ mainPoint.push(list[i].children[b].name)
|
|
|
|
+ list[i].mainPoint=mainPoint.join(',')
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ list[i].mainPoint='';
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ delete list[i].children
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else if(this.addForm.checkCategory==2){//专项检查
|
|
|
|
+ for(let i=0;i<list.length;i++){
|
|
|
|
+ list[i].labelName = list[i].code? list[i].code +' '+ list[i].name:list[i].name
|
|
|
|
+ if(list[i].level == 0 || list[i].level == 1 || list[i].level == 2 || list[i].level == 3){
|
|
|
|
+ if(list[i].children){
|
|
|
|
+ if(list[i].children[0]){
|
|
|
|
+ self.getCascaderData(list[i].children)
|
|
|
|
+ if(list[i].children){
|
|
|
|
+ if(!list[i].children[0]){
|
|
|
|
+ list.splice(i,1)
|
|
|
|
+ i--
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ list.splice(i,1)
|
|
|
|
+ i--
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ list.splice(i,1)
|
|
|
|
+ i--
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ list.splice(i,1)
|
|
|
|
+ i--
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ delete list[i].children
|
|
}
|
|
}
|
|
- }else{
|
|
|
|
- delete list[i].children
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
},
|
|
},
|
|
//获取学院列表
|
|
//获取学院列表
|
|
listDepartments(){
|
|
listDepartments(){
|
|
@@ -574,6 +941,7 @@
|
|
this.$set(this.addForm,'deptId',self.subSelectList[i].deptId);
|
|
this.$set(this.addForm,'deptId',self.subSelectList[i].deptId);
|
|
this.$set(this.addForm,'buildId',self.subSelectList[i].buildId);
|
|
this.$set(this.addForm,'buildId',self.subSelectList[i].buildId);
|
|
this.getCheckPlanBySubId(val);
|
|
this.getCheckPlanBySubId(val);
|
|
|
|
+ this.getHazardInfoBySubId(val);
|
|
return
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -603,6 +971,49 @@
|
|
this.$set(this,'planList',list);
|
|
this.$set(this,'planList',list);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ //根据实验室ID查询实验室设备
|
|
|
|
+ getHazardInfoBySubId(id){
|
|
|
|
+ getHazardInfoBySubId({subId:id}).then(response => {
|
|
|
|
+ this.deviceTableList=response.data;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //根据设备id生成检查项
|
|
|
|
+ getHazardInfoByJoinIds(id,joinHazardIds){
|
|
|
|
+ getHazardInfoByJoinIds({joinHazardIds:joinHazardIds}).then(response => {
|
|
|
|
+ if(response.data[0]){
|
|
|
|
+ let dataList=JSON.parse(JSON.stringify(response.data))
|
|
|
|
+ for(let i=0;i<dataList.length;i++){
|
|
|
|
+ dataList[i].lookType=true;
|
|
|
|
+ for(let b=0;b<dataList[i].checkHazardDtoList.length;b++){
|
|
|
|
+ //把最外层的code填充到内层
|
|
|
|
+ dataList[i].checkHazardDtoList[b].hazardCheckCode=dataList[i].code
|
|
|
|
+ }
|
|
|
|
+ //判断新旧数据是否相等,如果相等旧数据填充新数据
|
|
|
|
+ console.log(this.addForm.checkHazardInfoVoList)
|
|
|
|
+ if(this.addForm.checkHazardInfoVoList[0]){
|
|
|
|
+ for(let k=0;k<this.addForm.checkHazardInfoVoList.length;k++){
|
|
|
|
+ if(dataList[i].joinHazardId==this.addForm.checkHazardInfoVoList[k].joinHazardId){
|
|
|
|
+ dataList[i]=this.addForm.checkHazardInfoVoList[k]
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.$set(this.addForm,'checkHazardInfoVoList',dataList);
|
|
|
|
+ this.pageType=2;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //专项检查选中
|
|
|
|
+ checkCategoryChange(){
|
|
|
|
+ console.log(this.addForm.checkCategory)
|
|
|
|
+ if(this.addForm.checkCategory==1){
|
|
|
|
+ this.pageType=0;
|
|
|
|
+ }else if(this.addForm.checkCategory==2){
|
|
|
|
+ this.pageType=1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
//计划列表选中
|
|
//计划列表选中
|
|
planChange(val){
|
|
planChange(val){
|
|
let self = this;
|
|
let self = this;
|
|
@@ -623,7 +1034,10 @@
|
|
key:2,
|
|
key:2,
|
|
label:"实验室自查",
|
|
label:"实验室自查",
|
|
}]);
|
|
}]);
|
|
|
|
+ this.pageType=1;
|
|
|
|
+ this.addForm.checkHazardInfoVoList=[];
|
|
}else if(type == 2){
|
|
}else if(type == 2){
|
|
|
|
+ this.pageType=0;
|
|
this.$set(this.addForm,'checkType',null);
|
|
this.$set(this.addForm,'checkType',null);
|
|
this.$set(this,'checkTypeList',[{ key:1, label:"校院巡查", },{ key:2, label:"实验室自查", }]);
|
|
this.$set(this,'checkTypeList',[{ key:1, label:"校院巡查", },{ key:2, label:"实验室自查", }]);
|
|
}
|
|
}
|
|
@@ -631,12 +1045,28 @@
|
|
//查询详情
|
|
//查询详情
|
|
findCheckManage(id){
|
|
findCheckManage(id){
|
|
findCheckManage({id:id}).then(response => {
|
|
findCheckManage({id:id}).then(response => {
|
|
- response.data.checkResult = response.data.checkResult === 0 || response.data.checkResult === 1?response.data.checkResult:"";
|
|
|
|
- response.data.rectifyNotice = response.data.rectifyNotice?response.data.rectifyNotice:"";
|
|
|
|
- response.data.rectifyDeadline = response.data.rectifyDeadline?response.data.rectifyDeadline:"";
|
|
|
|
- response.data.dateRange = [response.data.cycleStartTime,response.data.cycleEndTime];
|
|
|
|
- for(let i=0;i<response.data.checkHazardDtoList.length;i++){
|
|
|
|
- response.data.checkHazardDtoList[i].lookType = true;
|
|
|
|
|
|
+ if(response.data.checkCategory==1){//综合检查
|
|
|
|
+ response.data.checkResult = response.data.checkResult === 0 || response.data.checkResult === 1?response.data.checkResult:"";
|
|
|
|
+ response.data.rectifyNotice = response.data.rectifyNotice?response.data.rectifyNotice:"";
|
|
|
|
+ response.data.rectifyDeadline = response.data.rectifyDeadline?response.data.rectifyDeadline:"";
|
|
|
|
+ response.data.dateRange = [response.data.cycleStartTime,response.data.cycleEndTime];
|
|
|
|
+ for(let i=0;i<response.data.checkHazardDtoList.length;i++){
|
|
|
|
+ response.data.checkHazardDtoList[i].lookType = true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }else if(response.data.checkCategory==2){//专项检查
|
|
|
|
+ response.data.rectifyNotice = response.data.rectifyNotice?response.data.rectifyNotice:"";
|
|
|
|
+ response.data.rectifyDeadline = response.data.rectifyDeadline?response.data.rectifyDeadline:"";
|
|
|
|
+ response.data.dateRange = [response.data.cycleStartTime,response.data.cycleEndTime];
|
|
|
|
+ if(response.data.checkHazardInfoVoList[0]){
|
|
|
|
+ response.data.checkHazardInfoVoList.forEach(function(item) {
|
|
|
|
+ item.lookType = true;
|
|
|
|
+ item.checkHazardDtoList.forEach(function(item2) {
|
|
|
|
+ item2.hazardCheckCode=item2.code
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ this.pageType=2
|
|
}
|
|
}
|
|
this.buildBySubList(response.data.buildId,1);
|
|
this.buildBySubList(response.data.buildId,1);
|
|
this.$set(this,'addForm',{
|
|
this.$set(this,'addForm',{
|
|
@@ -649,10 +1079,15 @@
|
|
rectifyNotice:response.data.rectifyNotice,
|
|
rectifyNotice:response.data.rectifyNotice,
|
|
deptId:response.data.deptId,
|
|
deptId:response.data.deptId,
|
|
checkType:response.data.checkType,
|
|
checkType:response.data.checkType,
|
|
|
|
+ checkCategory:response.data.checkCategory+'',
|
|
dateRange:response.data.dateRange,
|
|
dateRange:response.data.dateRange,
|
|
rectifyDeadline:response.data.rectifyDeadline,
|
|
rectifyDeadline:response.data.rectifyDeadline,
|
|
checkHazardDtoList:response.data.checkHazardDtoList,
|
|
checkHazardDtoList:response.data.checkHazardDtoList,
|
|
|
|
+ checkHazardInfoVoList:response.data.checkHazardInfoVoList,
|
|
|
|
+
|
|
});
|
|
});
|
|
|
|
+ this.checkOptionList();//获取检查项
|
|
|
|
+
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//初始化数据
|
|
//初始化数据
|
|
@@ -688,32 +1123,61 @@
|
|
this.$set(this,'planList',[]);
|
|
this.$set(this,'planList',[]);
|
|
},
|
|
},
|
|
//删除检查项
|
|
//删除检查项
|
|
- delCheckHazardDtoList(index){
|
|
|
|
|
|
+ delCheckHazardDtoList(index,index2,type){//type 1综合检查 2专项检查设备项 3专项检查检查项
|
|
|
|
+
|
|
let self = this;
|
|
let self = this;
|
|
this.$confirm('是否确认删除?', "警告", {
|
|
this.$confirm('是否确认删除?', "警告", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning"
|
|
type: "warning"
|
|
}).then(function() {
|
|
}).then(function() {
|
|
- self.addForm.checkHazardDtoList.splice(index,1);
|
|
|
|
|
|
+ if(self.addForm.checkCategory==1){//综合检查
|
|
|
|
+ self.addForm.checkHazardDtoList.splice(index,1);
|
|
|
|
+ }else if(self.addForm.checkCategory==2){//专项检查
|
|
|
|
+ if(type==2){//检查设备
|
|
|
|
+ self.addForm.checkHazardInfoVoList.splice(index,1);
|
|
|
|
+ }else if(type==3){//检查项
|
|
|
|
+ self.addForm.checkHazardInfoVoList[index].checkHazardDtoList.splice(index2,1);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
}).then(() => {
|
|
}).then(() => {
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
},
|
|
},
|
|
//检查项选中
|
|
//检查项选中
|
|
- cascaderChange(val,index){
|
|
|
|
|
|
+ cascaderChange(val,item,index){
|
|
let obj = this.getCascaderDataQuery(val,this.options);
|
|
let obj = this.getCascaderDataQuery(val,this.options);
|
|
- if(!obj){
|
|
|
|
- this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckPro','');
|
|
|
|
- this.msgError('未找到相关项目')
|
|
|
|
- return
|
|
|
|
|
|
+
|
|
|
|
+ if(this.addForm.checkCategory==1){//综合检查
|
|
|
|
+ if(!obj){
|
|
|
|
+ this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckPro','');
|
|
|
|
+ this.msgError('未找到相关项目')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ console.log(obj)
|
|
|
|
+ this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckCode',obj.code);
|
|
|
|
+ this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckName',obj.name);
|
|
|
|
+ this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckPoint',obj.mainPoint);
|
|
|
|
+ countHazardNum({subId:this.addForm.subId, hazardCheckPro:val}).then( response => {
|
|
|
|
+ this.$set(this,'hazardCheckCount',response.data);
|
|
|
|
+ })
|
|
|
|
+ }else if(this.addForm.checkCategory==2){//专项检查
|
|
|
|
+ if(!obj){
|
|
|
|
+ this.$set(this.addForm.checkHazardInfoVoList[index],'hazardCheckPro','');
|
|
|
|
+ this.msgError('未找到相关项目')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ console.log(obj)
|
|
|
|
+ item.hazardCheckCode=obj.code;
|
|
|
|
+ item.hazardCheckName=obj.name;
|
|
|
|
+ countHazardNum({subId:this.addForm.subId, hazardCheckPro:val}).then( response => {
|
|
|
|
+ this.$set(this,'hazardCheckCount',response.data);
|
|
|
|
+ })
|
|
}
|
|
}
|
|
- this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckCode',obj.code);
|
|
|
|
- this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckName',obj.name);
|
|
|
|
- this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckPoint',obj.mainPoint);
|
|
|
|
- countHazardNum({subId:this.addForm.subId, hazardCheckPro:val}).then( response => {
|
|
|
|
- this.$set(this,'hazardCheckCount',response.data);
|
|
|
|
- })
|
|
|
|
},
|
|
},
|
|
|
|
+ /*==========专项检查==========*/
|
|
|
|
+
|
|
//联级选择器数据查询
|
|
//联级选择器数据查询
|
|
getCascaderDataQuery(text,list){
|
|
getCascaderDataQuery(text,list){
|
|
let self = this;
|
|
let self = this;
|
|
@@ -749,6 +1213,32 @@
|
|
::v-deep .el-range-editor--small .el-range-separator{
|
|
::v-deep .el-range-editor--small .el-range-separator{
|
|
line-height:32px;
|
|
line-height:32px;
|
|
}
|
|
}
|
|
|
|
+ .dept-table-max-box{
|
|
|
|
+ padding: 0 20px;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ .device-tip{
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-family: Microsoft YaHei-Regular, Microsoft YaHei;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #333333;
|
|
|
|
+ line-height: 16px;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .start_btn{
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-family: Microsoft YaHei-Regular, Microsoft YaHei;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #0183FA;
|
|
|
|
+ line-height: 40px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ width: 500px;
|
|
|
|
+ height: 40px;
|
|
|
|
+ border-radius: 4px 4px 4px 4px;
|
|
|
|
+ opacity: 1;
|
|
|
|
+ border: 1px dotted #0183FA;
|
|
|
|
+ margin:40px auto;
|
|
|
|
+ }
|
|
.title-max-box{
|
|
.title-max-box{
|
|
position: relative;
|
|
position: relative;
|
|
height:90px;
|
|
height:90px;
|
|
@@ -909,6 +1399,32 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ /*专项检查*/
|
|
|
|
+ .for-max-big-box-special{
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ .for-big-box-special{
|
|
|
|
+ border-bottom: 1px dotted #D8D8D8;
|
|
|
|
+ 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{
|
|
|
|
+ border-bottom: none;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
.bottom-button-max-box{
|
|
.bottom-button-max-box{
|
|
height:80px;
|
|
height:80px;
|
|
display: flex;
|
|
display: flex;
|