415 lines
11 KiB
Vue
Raw Normal View History

2022-10-17 10:13:22 +08:00
<template>
<Card title="安全教育">
2022-10-17 10:13:22 +08:00
<div class="containerBox">
<!-- 入场三级交底 -->
<div class="centerLeft">
<div class="text">
入场<span
style="
width: 100px;
height: 100px;
border-bottom: 1px solid #f56c35;
padding: 0 0 5px 0;
"
>三级</span
>交底
</div>
<div class="textDivBox">
<div class="textDiv">
<span>{{ threeLevel.projectWorkerNumber||0}}</span>
<p>项目总人数</p>
</div>
<div class="textDiv">
<span>{{ threeLevel.projectTrainWorkerNumber||0}}</span>
<p>项目培训人数</p>
</div>
<div class="textDiv">
<span>{{ threeLevel.projectTrainRatio||0}}%</span>
<p>项目培训率</p>
</div>
2022-10-17 10:13:22 +08:00
</div>
<div class="tableDiv">
<div class="tableSon">
<div class="row">培训主题</div>
<div class="row">培训人</div>
<div class="row">培训课时(h)</div>
<div class="row">培训时间</div>
</div>
<div class="tbody">
<vue-scroll>
<div
class="row"
v-for="i in threeLevel.workerSafeEducationList"
:key="i.id"
>
<div class="td">{{ i.eduCourseName }}</div>
<div class="td">{{ i.eduTeacher }}</div>
<div class="td">
{{ i.eduClasshour != 0 ? i.eduClasshour / 60 : 0 }}
</div>
<div class="td">{{ i.eduTime }}</div>
2022-12-14 18:31:34 +08:00
</div>
<div
class="row"
v-if="threeLevel.workerSafeEducationList.length == 0"
>
<div
style=" font-size: 14px;
color: #999;
text-align: center;
width: 100%;
line-height: 300px;
"
>
暂无数据
</div>
</div>
</vue-scroll>
</div>
2022-10-17 10:13:22 +08:00
</div>
</div>
<!-- 每日班前喊话 -->
<div class="centerC">
<div class="text">
每日<span
style="width: 100px;
height: 100px;
border-bottom: 1px solid #f56c35;
padding: 0 0 5px 0;
"
>班前</span
>喊话
</div>
<div class="textDivBox">
<div class="textDiv">
<span>{{ shouting.allCount||0}}</span>
<p>今日班前喊话次数</p>
</div>
<div class="textDiv">
<span>{{ shouting.todayCount||0}}</span>
<p>班前喊话次数</p>
</div>
2022-10-17 10:13:22 +08:00
</div>
<div class="tableDiv">
<div class="tableSon">
<div class="row">时间</div>
<div class="row">负责人</div>
<div class="row">班组</div>
<div class="row">照片</div>
</div>
<div class="tbody">
<vue-scroll>
<div
class="row"
v-for="(item, index) in shouting.shoutInfoList"
:key="index"
>
<div class="td">{{ item.shoutTime }}</div>
<div class="td">{{ item.dutyUserName }}</div>
<div class="td">{{ item.teamName }}</div>
2022-12-21 09:38:25 +08:00
<div class="td"><img :src="$store.state.FILEURL+item.shoutImage" /></div>
2022-12-14 18:31:34 +08:00
</div>
<div class="row" v-if="shouting.shoutInfoList.length == 0">
<div
style="
font-size: 14px;
color: #999;
text-align: center;
width: 100%;
line-height: 300px;
"
>
暂无数据
</div>
</div>
</vue-scroll>
</div>
2022-10-17 10:13:22 +08:00
</div>
</div>
<!-- 安全交底 -->
<div class="centerRight">
<div class="text">
<!-- <div class="text">每日<span style="width:100px;height:100px;border-bottom:1px solid #F56C35;padding:0 0 5px 0">班前</span>喊话</div> -->
<span
style="width: 100px;
height: 100px;
border-bottom: 1px solid #f56c35;
padding: 0 0 5px 0;
"
>全交</span
>
</div>
<div class="textDivBox">
<div class="textDiv">
<span>{{ safetyDisclosure.trainNumber||0}}</span>
<p>培训次数</p>
</div>
<div class="textDiv">
<span>{{ safetyDisclosure.specialOperationsNumber||0}}</span>
<p>特种作业</p>
</div>
<div class="textDiv">
<span>{{ safetyDisclosure.disclosureInRainySeasonNumber||0}}</span>
<p>雨季交底</p>
</div>
<div class="textDiv">
<span>{{ safetyDisclosure.electricityDisclosureNumber||0}}</span>
<p>用电交底</p>
2022-10-17 10:13:22 +08:00
</div>
</div>
<div class="tableDiv">
<div class="tableSon">
<div class="row">交底主题</div>
<div class="row">类型</div>
<div class="row">负责人</div>
<div class="row">交底时间</div>
</div>
<div class="tbody">
<vue-scroll>
<div
class="row"
v-for="(item,index) in safetyDisclosureDate" :key="index"
>
<div class="td">{{ item.eduCourseName }}</div>
<div class="td">{{eduTypeList[item.eduType] }}</div>
<div class="td">{{ item.eduTeacher }}</div>
<div class="td">{{ item.eduTime }}</div>
2022-12-14 18:31:34 +08:00
</div>
<div
class="row"
v-if="safetyDisclosureDate.length == 0"
>
<div
style=" font-size: 14px;color: #999; text-align: center;
width: 100%;
line-height: 300px;
"
>
暂无数据
</div>
</div>
</vue-scroll>
2022-10-17 10:13:22 +08:00
</div>
</div>
</div>
</div>
</Card>
</template>
<script>
import Card from "../components/Card.vue";
import {
getThreeLevelDataByProjectSnApi,
getSecurityDataByProjectSnApi,
getTodayInfoByProjectSnApi,
} from "@/assets/js/api/zhongjianFourth";
2022-10-17 10:13:22 +08:00
export default {
components: {
Card,
},
2022-10-17 10:13:22 +08:00
data() {
return {
threeLevel: {
workerSafeEducationList: [],
},
safetyDisclosure: {},//安全交底
safetyDisclosureDate:[],//安全交底
shouting: {
shoutInfoList: [],
},
eduTypeList: {
1: "入场三级教育",
2: "定期安全教育",
3: "日常安全交底",
4: "VR安全教育",
5: "班前教育",
6: "日常教育(日常违规教育)",
7: "每日交底(方案交底)",
8: "每日交底(安全技术交底)",
9: "每日交底(大工程交底)",
10: "入职培训",
11:"入场三级交底",
12:"特种作业",
13:"雨季交底",
14:"用电交底",
},
projectSn:'',
};
2022-12-14 18:31:34 +08:00
},
// computed: {
// ...mapState(["projectSn"]),
// },
2022-12-14 18:31:34 +08:00
created() {
this.projectSn=this.$store.state.projectSn
2022-12-14 18:31:34 +08:00
this.getThreeLevelDataByProjectSn();
this.getSecurityDataByProjectSn();
this.getTodayInfoByProjectSn();
},
methods: {
// 进场三级交底
getThreeLevelDataByProjectSn() {
getThreeLevelDataByProjectSnApi({ projectSn: this.projectSn }).then(
(res) => {
console.log(res, "getThreeLevelDataByProjectSn----------进场三级交底-");
this.threeLevel = res.result;
}
);
2022-12-14 18:31:34 +08:00
},
//安全交底
getSecurityDataByProjectSn() {
getSecurityDataByProjectSnApi({ projectSn: this.projectSn }).then(
(res) => {
console.log(res, "getThreeLevelDataByProjectSn----------安全交底-");
this.safetyDisclosure = res.result;
this.safetyDisclosureDate=res.result.workerSafeEducationList
}
);
2022-12-14 18:31:34 +08:00
},
//班前喊话
getTodayInfoByProjectSn() {
getTodayInfoByProjectSnApi({ projectSn: this.projectSn }).then((res) => {
console.log(res, "getThreeLevelDataByProjectSn----------班前喊话-");
console.log(res, "getTodayInfoByProjectSnApi");
this.shouting = res.result;
});
2022-12-14 18:31:34 +08:00
},
},
};
2022-10-17 10:13:22 +08:00
</script>
<style lang="less" scoped>
.containerBox {
width: 100%;
height: 100%;
margin-top: 2%;
display: flex;
justify-content: space-between;
.centerLeft,
.centerC,
.centerRight {
width: 340px;
height: 95%;
.text {
2022-10-17 10:13:22 +08:00
text-align: center;
margin-bottom: 20px;
font-size: 14px;
.el-icon-minus {
2022-10-17 10:13:22 +08:00
}
}
.textDivBox {
width: 340px;
height: 8%;
display: flex;
justify-content: space-between;
.textDiv {
background: rgba(111, 202, 226, 0.65);
border-radius: 2px 2px 2px 2px;
opacity: 1;
font-size: 12px;
width: 100px;
height: 41px;
// background-color: #6fcae2;
div {
text-align: center;
}
span {
display: block;
text-align: center;
margin-top: 5px;
}
p {
text-align: center;
}
}
2022-10-17 10:13:22 +08:00
}
.tableDiv {
margin-top: 12px;
width: 100%;
height: calc(85%);
.tableSon {
width: 100%;
background: rgba(111, 202, 226, 0.3);
border-radius: 0px 0px 0px 0px;
opacity: 1;
height: 27px;
display: flex;
justify-content: space-around;
align-items: center;
color: #fff;
font-size: 12px;
// opacity: 0.2;
.row {
color: #fff !important;
}
2022-10-17 10:13:22 +08:00
}
.tbody {
2022-10-17 10:13:22 +08:00
width: 100%;
height: calc(100% - 60px);
font-size: 12px;
margin-right: 5px;
2022-10-17 10:13:22 +08:00
}
.tableSon .row,
.tbody .row {
display: flex;
2022-10-17 10:13:22 +08:00
text-align: center;
justify-content: left;
//height: 40px;
line-height: 38px;
.td {
color: #fff;
&:nth-child(1) {
flex: 1;
}
&:nth-child(2) {
flex: 1;
}
&:nth-child(3) {
flex: 1;
}
&:nth-child(4) {
flex: 1;
2022-12-21 09:38:25 +08:00
margin-right: 10px;
}
}
2022-10-17 10:13:22 +08:00
}
}
}
.centerC {
.textDiv {
flex: 1;
&:nth-child(2) {
margin-left: 20px;
}
}
img {
width: 48px;
height: 26px;
border-radius: 0px 0px 0px 0px;
opacity: 1;
margin-top: 5px;
}
2022-10-17 10:13:22 +08:00
}
.centerRight {
.textDivBox {
width: 360px;
height: 8%;
display: flex;
justify-content: space-between;
.textDiv {
margin-right: 20px;
font-size: 12px;
width: 100px;
height: 41px;
}
}
2022-10-17 10:13:22 +08:00
}
}
</style>