Commit 194e2bf1 authored by liuyuping's avatar liuyuping

'2022-3-8'

parent 1c0a16be
......@@ -189,3 +189,34 @@ export function verifyDanger(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 = [
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'hdtype',
component: hdtype,
name: '企业安全管理问题库',
meta: { title: '企业安全管理问题库' },
hidden: true
},
{
path: 'securityCheck/hdtype',
component: hdtype,
name: '企业安全管理问题库',
meta: { title: '企业安全管理问题库' },
hidden: true
},
{
path: 'securityCheck',
component: securityCheckHome,
......
......@@ -60,7 +60,7 @@
prop="hdInspectExpert"
width="70"
/>
<el-table-column label="隐患名称" prop="hdName" width="360" />
<el-table-column label="发现问题" prop="hdName" width="360" />
<el-table-column label="隐患图片" width="80">
<template slot-scope="scope1">
<el-image
......@@ -80,18 +80,14 @@
</div>
</template>
</el-table-column>
<el-table-column label="隐患描述" width="140">
<el-table-column label="检查依据" width="140">
<template slot-scope="scope1">
<span>{{
scope1.row.hdDesc === "null" ? "" : scope1.row.hdDesc
scope1.row.basis === "null" ? "" : scope1.row.basis
}}</span>
</template>
</el-table-column>
<el-table-column
label="整改建议"
prop="hdRectificationSug"
width="220"
/>
<el-table-column label="整改建议" prop="suggestion" width="220" />
<!-- <el-table-column
label="隐患照片"
>
......@@ -209,7 +205,7 @@
:visible.sync="adddialogform"
: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-input v-model="formInfo.hdOrder" :disabled="true" />
</el-form-item>
......@@ -232,7 +228,21 @@
<el-option label="重大隐患" value="2" />
</el-select>
</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
v-model="curChosenSecCheckType"
placeholder="请选择安全检查类别"
......@@ -244,6 +254,8 @@
:label="item.name"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="安全检查内容">
<el-select
v-model="curChosenSecCheckContent"
placeholder="请选择检查内容"
......@@ -255,6 +267,8 @@
:label="item.name"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="发现问题">
<el-select v-model="formInfo.hdName" placeholder="检查内容">
<el-option
v-for="item in secCheckDiscover"
......@@ -267,11 +281,11 @@
<el-form-item label="备注">
<el-input v-model="formInfo.comment" placeholder="备注" />
</el-form-item>
<el-form-item label="隐患描述">
<el-input v-model="formInfo.hdDesc" type="textarea" />
<el-form-item label="检查依据">
<el-input v-model="formInfo.basis" type="textarea" />
</el-form-item>
<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 label="">
<img :src="uploadHdUrl" alt="暂未选择图片" style="width: 60%;" />
......@@ -354,7 +368,7 @@
:visible.sync="editdialogform"
: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-input v-model="formInfo.hdOrder" :disabled="true" />
</el-form-item>
......@@ -377,7 +391,21 @@
<el-option label="重大隐患" value="2" />
</el-select>
</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
v-model="curChosenSecCheckType"
placeholder="请选择安全检查类别"
......@@ -389,6 +417,8 @@
:label="item.name"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="安全检查内容">
<el-select
v-model="curChosenSecCheckContent"
placeholder="请选择检查内容"
......@@ -400,6 +430,8 @@
:label="item.name"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="发现问题">
<el-select v-model="formInfo.hdName" placeholder="检查内容">
<el-option
v-for="item in secCheckDiscover"
......@@ -412,11 +444,11 @@
<el-form-item label="备注">
<el-input v-model="formInfo.comment" />
</el-form-item>
<el-form-item label="隐患描述">
<el-input v-model="formInfo.hdDesc" type="textarea" />
<el-form-item label="检查依据">
<el-input v-model="formInfo.basis" type="textarea" />
</el-form-item>
<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 label="隐患图片">
<img
......@@ -553,6 +585,8 @@ import { parseTime } from "@/utils/index.js";
export default {
data() {
return {
// 当前选择得安全类别
curTotalType: "",
// 当前选择的安全检查类别
curChosenSecCheckType: "",
// 当前选择的安全检查内容
......@@ -561,6 +595,8 @@ export default {
curChosenSecCheckDiscover: "",
// 安全检查类别
secCheckType: [],
// 安全检查类别2
secCheckType2: [],
// 安全检查内容
secCheckContent: [],
// 发现问题
......@@ -658,6 +694,7 @@ export default {
"getEnterpriseSafetyInspectionContent getEnterpriseSafetyInspectionContent"
);
this.secCheckType = [...res.content];
this.secCheckType2 = [...res.content];
});
},
// 初始化所有隐患信息
......@@ -689,7 +726,6 @@ export default {
).then(res => {
// console.log(res, 'woqunimalegebi')
console.log(res, "什么鬼啊");
this.totalElement = res.totalElements;
replaceArray = [...res.content];
replaceArray = replaceArray.sort((a, b) => a.companyId - b.companyId);
for (let i = 0; i < replaceArray.length; i++) {
......@@ -1367,6 +1403,26 @@ export default {
this.secCheckDiscover = [...res.content];
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 @@
</el-table>
</div>-->
<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
prop="category"
label="类别"
width="180"
></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
prop="inspectionContent"
label="检查内容"
width="180"
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
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"
></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
prop="satisfaction"
label="是否符合"
width="140"
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>
<!--<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>
<script>
// 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 {
data() {
// 返回想要的数据
......@@ -118,7 +318,11 @@ export default {
// 当前展开的行
curExpandedRow: [],
// 当前企业的安全检查
securityCheck: []
securityCheck: [],
isShowSiteManage: false,
isShowSecurityData: false,
securityData: [],
siteManageData: []
};
},
mounted() {
......@@ -134,6 +338,12 @@ export default {
async getAllSecCheckItems() {
findMattsByEnterpriseId(this.companyId).then(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 {
// 写一个更新数组检查项的
updateCheckItem(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