Commit 194e2bf1 authored by liuyuping's avatar liuyuping

'2022-3-8'

parent 1c0a16be
...@@ -189,3 +189,34 @@ export function verifyDanger(params) { ...@@ -189,3 +189,34 @@ export function verifyDanger(params) {
params params
}) })
} }
/**
* 上传不符合
* enterpriseId
* matterId
*/
export function postUnSatify(enterpriseId, matterId) {
return request({
url: 'api/enterpriseSafetyInconformity',
method: 'post',
data: {
enterpriseId,
matterId
}
})
}
/**
* 上传符合
* enterpriseId
* matterId
*/
export function deleteSatify(enterpriseId, matterId) {
return request({
url: 'api/enterpriseSafetyInconformity',
method: 'delete',
data: [{
enterpriseId,
matterId
}]
})
}
\ No newline at end of file
...@@ -264,6 +264,20 @@ export const constantRouterMap = [ ...@@ -264,6 +264,20 @@ export const constantRouterMap = [
hidden: true, hidden: true,
redirect: 'noredirect', redirect: 'noredirect',
children: [ children: [
{
path: 'hdtype',
component: hdtype,
name: '企业安全管理问题库',
meta: { title: '企业安全管理问题库' },
hidden: true
},
{
path: 'securityCheck/hdtype',
component: hdtype,
name: '企业安全管理问题库',
meta: { title: '企业安全管理问题库' },
hidden: true
},
{ {
path: 'securityCheck', path: 'securityCheck',
component: securityCheckHome, component: securityCheckHome,
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
prop="hdInspectExpert" prop="hdInspectExpert"
width="70" width="70"
/> />
<el-table-column label="隐患名称" prop="hdName" width="360" /> <el-table-column label="发现问题" prop="hdName" width="360" />
<el-table-column label="隐患图片" width="80"> <el-table-column label="隐患图片" width="80">
<template slot-scope="scope1"> <template slot-scope="scope1">
<el-image <el-image
...@@ -80,18 +80,14 @@ ...@@ -80,18 +80,14 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="隐患描述" width="140"> <el-table-column label="检查依据" width="140">
<template slot-scope="scope1"> <template slot-scope="scope1">
<span>{{ <span>{{
scope1.row.hdDesc === "null" ? "" : scope1.row.hdDesc scope1.row.basis === "null" ? "" : scope1.row.basis
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="整改建议" prop="suggestion" width="220" />
label="整改建议"
prop="hdRectificationSug"
width="220"
/>
<!-- <el-table-column <!-- <el-table-column
label="隐患照片" label="隐患照片"
> >
...@@ -209,7 +205,7 @@ ...@@ -209,7 +205,7 @@
:visible.sync="adddialogform" :visible.sync="adddialogform"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-form :model="formInfo" v-if="adddialogform"> <el-form :model="formInfo" v-if="adddialogform" label-width="120px">
<el-form-item label="序号"> <el-form-item label="序号">
<el-input v-model="formInfo.hdOrder" :disabled="true" /> <el-input v-model="formInfo.hdOrder" :disabled="true" />
</el-form-item> </el-form-item>
...@@ -232,7 +228,21 @@ ...@@ -232,7 +228,21 @@
<el-option label="重大隐患" value="2" /> <el-option label="重大隐患" value="2" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="发现问题"> <el-form-item label="安全类别">
<el-select v-model="curTotalType" placeholder="请选择安全类别">
<el-option
key="安全资料类"
value="安全资料类"
label="安全资料类"
></el-option>
<el-option
key="现场检查类"
value="现场检查类"
label="现场检查类"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="安全检查类别">
<el-select <el-select
v-model="curChosenSecCheckType" v-model="curChosenSecCheckType"
placeholder="请选择安全检查类别" placeholder="请选择安全检查类别"
...@@ -244,6 +254,8 @@ ...@@ -244,6 +254,8 @@
:label="item.name" :label="item.name"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item>
<el-form-item label="安全检查内容">
<el-select <el-select
v-model="curChosenSecCheckContent" v-model="curChosenSecCheckContent"
placeholder="请选择检查内容" placeholder="请选择检查内容"
...@@ -255,6 +267,8 @@ ...@@ -255,6 +267,8 @@
:label="item.name" :label="item.name"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item>
<el-form-item label="发现问题">
<el-select v-model="formInfo.hdName" placeholder="检查内容"> <el-select v-model="formInfo.hdName" placeholder="检查内容">
<el-option <el-option
v-for="item in secCheckDiscover" v-for="item in secCheckDiscover"
...@@ -267,11 +281,11 @@ ...@@ -267,11 +281,11 @@
<el-form-item label="备注"> <el-form-item label="备注">
<el-input v-model="formInfo.comment" placeholder="备注" /> <el-input v-model="formInfo.comment" placeholder="备注" />
</el-form-item> </el-form-item>
<el-form-item label="隐患描述"> <el-form-item label="检查依据">
<el-input v-model="formInfo.hdDesc" type="textarea" /> <el-input v-model="formInfo.basis" type="textarea" />
</el-form-item> </el-form-item>
<el-form-item label="整改建议"> <el-form-item label="整改建议">
<el-input v-model="formInfo.hdRectificationSug" type="textarea" /> <el-input v-model="formInfo.suggestion" type="textarea" />
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<img :src="uploadHdUrl" alt="暂未选择图片" style="width: 60%;" /> <img :src="uploadHdUrl" alt="暂未选择图片" style="width: 60%;" />
...@@ -354,7 +368,7 @@ ...@@ -354,7 +368,7 @@
:visible.sync="editdialogform" :visible.sync="editdialogform"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-form :model="formInfo" v-if="editdialogform"> <el-form :model="formInfo" v-if="editdialogform" label-width="120px">
<el-form-item label="序号"> <el-form-item label="序号">
<el-input v-model="formInfo.hdOrder" :disabled="true" /> <el-input v-model="formInfo.hdOrder" :disabled="true" />
</el-form-item> </el-form-item>
...@@ -377,7 +391,21 @@ ...@@ -377,7 +391,21 @@
<el-option label="重大隐患" value="2" /> <el-option label="重大隐患" value="2" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="发现问题"> <el-form-item label="安全类别">
<el-select v-model="curTotalType" placeholder="请选择安全类别">
<el-option
key="安全资料类"
value="安全资料类"
label="安全资料类"
></el-option>
<el-option
key="现场检查类"
value="现场检查类"
label="现场检查类"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="安全检查类别">
<el-select <el-select
v-model="curChosenSecCheckType" v-model="curChosenSecCheckType"
placeholder="请选择安全检查类别" placeholder="请选择安全检查类别"
...@@ -389,6 +417,8 @@ ...@@ -389,6 +417,8 @@
:label="item.name" :label="item.name"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item>
<el-form-item label="安全检查内容">
<el-select <el-select
v-model="curChosenSecCheckContent" v-model="curChosenSecCheckContent"
placeholder="请选择检查内容" placeholder="请选择检查内容"
...@@ -400,6 +430,8 @@ ...@@ -400,6 +430,8 @@
:label="item.name" :label="item.name"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item>
<el-form-item label="发现问题">
<el-select v-model="formInfo.hdName" placeholder="检查内容"> <el-select v-model="formInfo.hdName" placeholder="检查内容">
<el-option <el-option
v-for="item in secCheckDiscover" v-for="item in secCheckDiscover"
...@@ -412,11 +444,11 @@ ...@@ -412,11 +444,11 @@
<el-form-item label="备注"> <el-form-item label="备注">
<el-input v-model="formInfo.comment" /> <el-input v-model="formInfo.comment" />
</el-form-item> </el-form-item>
<el-form-item label="隐患描述"> <el-form-item label="检查依据">
<el-input v-model="formInfo.hdDesc" type="textarea" /> <el-input v-model="formInfo.basis" type="textarea" />
</el-form-item> </el-form-item>
<el-form-item label="整改建议"> <el-form-item label="整改建议">
<el-input v-model="formInfo.hdRectificationSug" type="textarea" /> <el-input v-model="formInfo.suggestion" type="textarea" />
</el-form-item> </el-form-item>
<el-form-item label="隐患图片"> <el-form-item label="隐患图片">
<img <img
...@@ -553,6 +585,8 @@ import { parseTime } from "@/utils/index.js"; ...@@ -553,6 +585,8 @@ import { parseTime } from "@/utils/index.js";
export default { export default {
data() { data() {
return { return {
// 当前选择得安全类别
curTotalType: "",
// 当前选择的安全检查类别 // 当前选择的安全检查类别
curChosenSecCheckType: "", curChosenSecCheckType: "",
// 当前选择的安全检查内容 // 当前选择的安全检查内容
...@@ -561,6 +595,8 @@ export default { ...@@ -561,6 +595,8 @@ export default {
curChosenSecCheckDiscover: "", curChosenSecCheckDiscover: "",
// 安全检查类别 // 安全检查类别
secCheckType: [], secCheckType: [],
// 安全检查类别2
secCheckType2: [],
// 安全检查内容 // 安全检查内容
secCheckContent: [], secCheckContent: [],
// 发现问题 // 发现问题
...@@ -658,6 +694,7 @@ export default { ...@@ -658,6 +694,7 @@ export default {
"getEnterpriseSafetyInspectionContent getEnterpriseSafetyInspectionContent" "getEnterpriseSafetyInspectionContent getEnterpriseSafetyInspectionContent"
); );
this.secCheckType = [...res.content]; this.secCheckType = [...res.content];
this.secCheckType2 = [...res.content];
}); });
}, },
// 初始化所有隐患信息 // 初始化所有隐患信息
...@@ -689,7 +726,6 @@ export default { ...@@ -689,7 +726,6 @@ export default {
).then(res => { ).then(res => {
// console.log(res, 'woqunimalegebi') // console.log(res, 'woqunimalegebi')
console.log(res, "什么鬼啊"); console.log(res, "什么鬼啊");
this.totalElement = res.totalElements;
replaceArray = [...res.content]; replaceArray = [...res.content];
replaceArray = replaceArray.sort((a, b) => a.companyId - b.companyId); replaceArray = replaceArray.sort((a, b) => a.companyId - b.companyId);
for (let i = 0; i < replaceArray.length; i++) { for (let i = 0; i < replaceArray.length; i++) {
...@@ -1367,6 +1403,26 @@ export default { ...@@ -1367,6 +1403,26 @@ export default {
this.secCheckDiscover = [...res.content]; this.secCheckDiscover = [...res.content];
console.log(res, "getEnterpriseSafetyMatter ,,,,,,,,,,,"); console.log(res, "getEnterpriseSafetyMatter ,,,,,,,,,,,");
}); });
},
curTotalType(newVal, oldVal) {
console.log(newVal, oldVal, "newVal oldVal newVal oldVal newVal oldVal");
console.log(this.secCheckType, "hehehehhehehe");
// this.secCheckType = this.secCheckType2.filter()
this.secCheckType = this.secCheckType2.filter(item => {
return item.type === newVal;
});
},
// secCheckDiscover(newVal, oldVal) {
// console.log(newVal, oldVal, "secCheckDiscover secCheckDiscover");
// // this.formInfo.hdDesc
// }
"formInfo.hdName"(newVal, oldVal) {
this.formInfo.hdDesc = this.secCheckDiscover.filter(
item => item.name === newVal
)[0].basis;
this.formInfo.hdRectificationSug = this.secCheckDiscover.filter(
item => item.name === newVal
)[0].suggestion;
} }
} }
}; };
......
...@@ -78,35 +78,235 @@ ...@@ -78,35 +78,235 @@
</el-table> </el-table>
</div>--> </div>-->
<div class="dec-total"> <div class="dec-total">
<el-table :data="securityCheck" border> <div
class="security-data"
@click.stop="isShowSecurityData = !isShowSecurityData"
>
<div
class="security-data-wrapper"
style="display: flex; align-items: center;cursor: pointer;"
>
<div class="triangle-wrapper">
<div v-if="isShowSecurityData">
<svg
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="3183"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="26"
height="26"
>
<path
d="M913.536524 551.447587H116.910163c-23.637854 0-42.977915-19.340062-42.977916-42.977916s19.340062-42.977915 42.977916-42.977915h796.626361c23.637854 0 42.977915 19.340062 42.977916 42.977915s-19.340062 42.977915-42.977916 42.977916z"
p-id="3184"
></path>
</svg>
</div>
<div v-else>
<svg
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
width="26"
height="26"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<path
d="M426.666667 426.666667H85.546667A85.418667 85.418667 0 0 0 0 512c0 47.445333 38.314667 85.333333 85.546667 85.333333H426.666667v341.12c0 47.274667 38.186667 85.546667 85.333333 85.546667 47.445333 0 85.333333-38.314667 85.333333-85.546667V597.333333h341.12A85.418667 85.418667 0 0 0 1024 512c0-47.445333-38.314667-85.333333-85.546667-85.333333H597.333333V85.546667A85.418667 85.418667 0 0 0 512 0c-47.445333 0-85.333333 38.314667-85.333333 85.546667V426.666667z"
fill="#2c2c2c"
></path>
</svg>
</div>
</div>
<div class="hd-type-name" style="margin-left: 20px;">
<span style="">安全类别: </span><span></span>
</div>
</div>
<el-table :data="securityData" border v-show="isShowSecurityData">
<el-table-column <el-table-column
prop="category" prop="category"
label="类别" label="类别"
width="180" width="180"
></el-table-column> ></el-table-column>
<el-table-column prop="type" label="类型" width="140"></el-table-column> <!--<el-table-column prop="type" label="类型" width="140"></el-table-column>-->
<el-table-column <el-table-column
prop="inspectionContent" prop="inspectionContent"
label="检查内容" label="检查内容"
width="180" width="340"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="matter" prop="matter"
label="发现问题" label="发现问题"
width="240"
></el-table-column>
<el-table-column
prop="basis"
label="检查依据"
width="380"
></el-table-column>
<el-table-column
prop="suggestion"
label="整改建议"
width="380"
></el-table-column>
<el-table-column label="是否符合" width="140">
<template slot-scope="scope">
<el-radio
v-model="scope.row.satisfaction"
label="符合"
@input="satisfy(scope.row)"
>符合</el-radio
>
<el-radio
v-model="scope.row.satisfaction"
label="不符合"
@input="unsatisfy(scope.row)"
>不符合</el-radio
>
<el-radio
v-model="scope.row.satisfaction"
label="空项"
@input="emptyItem(scope.row)"
>空项</el-radio
>
</template>
</el-table-column>
</el-table>
</div>
<div class="site-manage" @click.stop="isShowSiteManage = !isShowSiteManage">
<div
class="triangle-wrapper"
style="display: flex; align-items: center;cursor: pointer;"
>
<div v-if="isShowSiteManage">
<svg
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="3183"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="26"
height="26"
>
<path
d="M913.536524 551.447587H116.910163c-23.637854 0-42.977915-19.340062-42.977916-42.977916s19.340062-42.977915 42.977916-42.977915h796.626361c23.637854 0 42.977915 19.340062 42.977916 42.977915s-19.340062 42.977915-42.977916 42.977916z"
p-id="3184"
></path>
</svg>
</div>
<div v-else>
<svg
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
width="26"
height="26"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<path
d="M426.666667 426.666667H85.546667A85.418667 85.418667 0 0 0 0 512c0 47.445333 38.314667 85.333333 85.546667 85.333333H426.666667v341.12c0 47.274667 38.186667 85.546667 85.333333 85.546667 47.445333 0 85.333333-38.314667 85.333333-85.546667V597.333333h341.12A85.418667 85.418667 0 0 0 1024 512c0-47.445333-38.314667-85.333333-85.546667-85.333333H597.333333V85.546667A85.418667 85.418667 0 0 0 512 0c-47.445333 0-85.333333 38.314667-85.333333 85.546667V426.666667z"
fill="#2c2c2c"
></path>
</svg>
</div>
<div class="hd-type-name" style="margin-left: 20px;">
<span style="">现场管理: </span><span></span>
</div>
</div>
<el-table :data="siteManageData" border v-show="isShowSiteManage">
<el-table-column
prop="category"
label="类别"
width="180" width="180"
></el-table-column> ></el-table-column>
<!--<el-table-column prop="type" label="类型" width="140"></el-table-column>-->
<el-table-column
prop="inspectionContent"
label="检查内容"
width="340"
></el-table-column>
<el-table-column
prop="matter"
label="发现问题"
width="240"
></el-table-column>
<el-table-column
prop="basis"
label="检查依据"
width="380"
></el-table-column>
<el-table-column <el-table-column
prop="satisfaction" prop="suggestion"
label="是否符合" label="整改建议"
width="140" width="380"
></el-table-column> ></el-table-column>
<el-table-column label="是否符合" width="140">
<template slot-scope="scope">
<el-radio
v-model="scope.row.satisfaction"
label="符合"
@input="satisfy(scope.row)"
>符合</el-radio
>
<el-radio
v-model="scope.row.satisfaction"
label="不符合"
@input="unsatisfy(scope.row)"
>不符合</el-radio
>
<el-radio
v-model="scope.row.satisfaction"
label="空项"
@input="emptyItem(scope.row)"
>空项</el-radio
>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
<!--<el-table :data="securityCheck" border>
<el-table-column
prop="category"
label="类别"
width="180"
></el-table-column>
<el-table-column prop="type" label="类型" width="140"></el-table-column>
<el-table-column
prop="inspectionContent"
label="检查内容"
width="180"
></el-table-column>
<el-table-column
prop="matter"
label="发现问题"
width="180"
></el-table-column>
<el-table-column label="是否符合" width="140">
<template slot-scope="scope">
<el-radio
v-model="scope.row.satisfaction"
label="符合"
@input="satisfy(scope.row)"
>符合</el-radio
>
<el-radio
v-model="scope.row.satisfaction"
label="不符合"
@input="unsatisfy(scope.row)"
>不符合</el-radio
>
</template>
</el-table-column>
</el-table>-->
</div>
</template> </template>
<script> <script>
// import { adRiskStandingBook, deleteRiskStandingBook, editRiskStandingBook, getRiskStandingBook, getRiskStandingBookType } from '../../api/industry' // import { adRiskStandingBook, deleteRiskStandingBook, editRiskStandingBook, getRiskStandingBook, getRiskStandingBookType } from '../../api/industry'
import { findMattsByEnterpriseId } from "@/api/secFound.js"; import {
findMattsByEnterpriseId,
postUnSatify,
deleteSatify
} from "@/api/secFound.js";
export default { export default {
data() { data() {
// 返回想要的数据 // 返回想要的数据
...@@ -118,7 +318,11 @@ export default { ...@@ -118,7 +318,11 @@ export default {
// 当前展开的行 // 当前展开的行
curExpandedRow: [], curExpandedRow: [],
// 当前企业的安全检查 // 当前企业的安全检查
securityCheck: [] securityCheck: [],
isShowSiteManage: false,
isShowSecurityData: false,
securityData: [],
siteManageData: []
}; };
}, },
mounted() { mounted() {
...@@ -134,6 +338,12 @@ export default { ...@@ -134,6 +338,12 @@ export default {
async getAllSecCheckItems() { async getAllSecCheckItems() {
findMattsByEnterpriseId(this.companyId).then(res => { findMattsByEnterpriseId(this.companyId).then(res => {
this.securityCheck = [...res]; this.securityCheck = [...res];
this.securityData = this.securityCheck.filter(item => {
return item.type === "安全资料类";
});
this.siteManageData = this.securityCheck.filter(item => {
return item.type === "现场检查类";
});
}); });
}, },
// 初始化所有的安全检查项 // 初始化所有的安全检查项
...@@ -276,6 +486,35 @@ export default { ...@@ -276,6 +486,35 @@ export default {
// 写一个更新数组检查项的 // 写一个更新数组检查项的
updateCheckItem(row) { updateCheckItem(row) {
console.log(row); console.log(row);
},
satisfy(row) {
deleteSatify(this.companyId, row.matterId).then(
res => {
this.$message({
type: "success",
message: "修改成功"
});
},
() => {
this.$message.error("修改失败");
}
);
},
unsatisfy(row) {
postUnSatify(this.companyId, row.matterId).then(
res => {
this.$message({
type: "success",
message: "修改成功"
});
},
() => {
this.$message.error("修改失败");
}
);
},
emptyItem(row) {
console.log(row, "hehhe");
} }
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment