Merge branch 'master' into dev-xiaole

This commit is contained in:
骆乐 2022-06-16 18:15:10 +08:00
commit 4d92f4028a
4 changed files with 354 additions and 90 deletions

View File

@ -996,6 +996,11 @@ export default {
out: '出',
peopleIdNo: 'I深建人员序列号',
inOutTime: '出入时间',
healthCodeStatus:"健康码状态",
nucleicAcidTime:"核酸时间",
nucleicAcidResults:"核酸结果",
vaccinationTime:"疫苗接种时间",
vaccinationFrequency:"疫苗接种次数",

View File

@ -40,3 +40,4 @@ export function getNowTime() {
dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
return dateTime
}

View File

@ -268,6 +268,51 @@
{{scope.row.temperature?scope.row.temperature:'--'}}
</template>
</el-table-column>
<el-table-column
:label="$t('message.laborMange.healthCodeStatus')"
align="center"
>
<template slot-scope="scope">
{{healthCodelist[scope.row.healthCode]}}
</template>
</el-table-column>
<el-table-column
prop="nucleicAcidTime"
:label="$t('message.laborMange.nucleicAcidTime')"
align="center"
></el-table-column>
<el-table-column
:label="$t('message.laborMange.nucleicAcidResults')"
align="center"
>
<template slot-scope="scope">
{{nucleicAcidResultsList[scope.row.nucleicAcidResult]}}
</template>
</el-table-column>
<el-table-column
prop="vaccinateTime"
:label="$t('message.laborMange.vaccinationTime')"
align="center"
></el-table-column>
<el-table-column
:label="$t('message.laborMange.vaccinationFrequency')"
align="center"
>
<template slot-scope="scope">
{{vaccinationFrequencyltsList[scope.row.vaccinateState]}}
</template>
</el-table-column>
<el-table-column
prop="passType"
:label="
@ -412,6 +457,23 @@ export default {
},
data() {
return {
nucleicAcidResultsList:{
0:"未知",
1:"阴性",
2:"阳性"
},
healthCodelist:{
0:"无",
1:"红码",
2:"黄码",
3:"绿码"
},
vaccinationFrequencyltsList:{
0:"未接种",
1:"接种一针",
2:"接种两针",
3:"接种三针"
},
exportDialog:false,
exportDateArr:[],
inserviceTypeOptions:[{

View File

@ -36,22 +36,22 @@
/>
<div class="perNumInner">
<p>
{{ $t("message.laborMange.workersOnSite") }}<span
{{ $t('message.laborMange.workersOnSite') }}<span
class="num1"
>{{ statictisData.presencePerson.totalPerson }}</span
>{{ $t("message.laborMange.person") }}
>{{ $t('message.laborMange.person') }}
</p>
<p>
{{ $t("message.laborMange.peopleWhoPunchInToday") }}<span
{{ $t('message.laborMange.peopleWhoPunchInToday') }}<span
class="num1"
>{{ statictisData.todayNum }}</span
>{{ $t("message.laborMange.person") }}
>{{ $t('message.laborMange.person') }}
</p>
<p>
{{
$t("message.laborMange.peopleWhoClockedInYesterday")
$t('message.laborMange.peopleWhoClockedInYesterday')
}}<span class="num1">{{ statictisData.yesterdayNum }}</span
>{{ $t("message.laborMange.person") }}
>{{ $t('message.laborMange.person') }}
</p>
</div>
</div>
@ -86,47 +86,64 @@
<img src="@/assets/images/profile_photo.png" />
<img src="@/assets/images/profile_photo.png" />
</div>
<div class="personName">
<span>
{{ currentPersonDetail.workerName}}
<b class="codeResult" v-show="currentPersonDetail.codeState === 0" style="color: rgb(168, 168, 168);">
{{ currentPersonDetail.workerName }}
<b
class="codeResult"
v-show="currentPersonDetail.codeState === 0"
style="color: rgb(168, 168, 168)"
>
无码
</b>
<b class="codeResult" v-show="currentPersonDetail.codeState === 1" style="color: red;">
<b
class="codeResult"
v-show="currentPersonDetail.codeState === 1"
style="color: red"
>
红码
</b>
<b class="codeResult" v-show="currentPersonDetail.codeState === 2" style="color: yellow;">
<b
class="codeResult"
v-show="currentPersonDetail.codeState === 2"
style="color: yellow"
>
黄码
</b>
<b class="codeResult" v-show="currentPersonDetail.codeState === 3" style="color: green;">
<b
class="codeResult"
v-show="currentPersonDetail.codeState === 3"
style="color: green"
>
绿码
</b>
</span>
<span class="inoutType">{{
currentPersonDetail.passType == 1
? $t("message.laborMange.enter")
: $t("message.laborMange.leave")
? $t('message.laborMange.enter')
: $t('message.laborMange.leave')
}}</span>
</div>
<p>体温{{currentPersonDetail.temperature}}°</p>
<p>体温{{ currentPersonDetail.temperature }}°</p>
<p>
{{ $t("message.laborMange.inOutTime") }}{{
{{ $t('message.laborMange.inOutTime') }}{{
currentPersonDetail.createTime
}}
</p>
<p v-if="currentPersonDetail.teamName">
{{ $t("message.laborMange.team") }}{{
{{ $t('message.laborMange.team') }}{{
currentPersonDetail.teamName
}}
</p>
<p v-else>
{{ $t("message.laborMange.section") }}{{
{{ $t('message.laborMange.section') }}{{
currentPersonDetail.departmentName
}}
</p>
<p>
{{ $t("message.laborMange.companies") }}{{
{{ $t('message.laborMange.companies') }}{{
currentPersonDetail.enterpriseName
}}
</p>
@ -144,8 +161,8 @@
/>
<div class="inListBox itemList">
<div class="typeTxt">
{{ $t("message.laborMange.up") }}<br />{{
$t("message.laborMange.shift")
{{ $t('message.laborMange.up') }}<br />{{
$t('message.laborMange.shift')
}}
</div>
<div class="personInner">
@ -154,30 +171,84 @@
v-for="(item, index) in inList"
:key="index"
>
<div class="personBoxItem">
<div class="urseLogo">
<div class="stateLabel" v-if="item.nadTime&&item.workerClassify">
{{overtimeEve(item.nadTime,item.workerClassify)}}
</div>
<img
:src="$store.state.FILEURL + item.imageUrl"
:preview="$store.state.FILEURL + item.imageUrl"
/>
</div>
<div class="detail">
<p class="name">{{ item.workerName }}</p>
<p>
{{
item.departmentName ? item.departmentName : item.teamName
item.departmentName
? item.departmentName
: item.teamName
}}
</p>
<p>{{ item.createTime.split(" ")[1] }}</p>
<p>体温:{{item.temperature}}°</p>
<p>{{ item.createTime.split(' ')[1] }}</p>
<p>体温:{{ item.temperature }}°</p>
<p>
<b v-show="item.codeState == 0" style="color:rgb(168, 168, 168);width: 40px;height:25px;line-height: 25px;font-size: 20px;margin: 0;" class="codeResult">
<b
v-show="item.codeState == 0"
style="
color: rgb(168, 168, 168);
width: 40px;
height: 25px;
line-height: 25px;
font-size: 20px;
margin: 0;
"
class="codeResult"
>
无码
</b>
<b v-show="item.codeState == 1" style="color:red;width: 40px;height:25px;line-height: 25px;font-size: 20px;margin: 0;" class="codeResult">
<b
v-show="item.codeState == 1"
style="
color: red;
width: 40px;
height: 25px;
line-height: 25px;
font-size: 20px;
margin: 0;
"
class="codeResult"
>
红码
</b>
<b v-show="item.codeState == 2" style="color:yellow;width: 40px;height:25px;line-height: 25px;font-size: 20px;margin: 0;" class="codeResult">
<b
v-show="item.codeState == 2"
style="
color: yellow;
width: 40px;
height: 25px;
line-height: 25px;
font-size: 20px;
margin: 0;
"
class="codeResult"
>
黄码
</b>
<b v-show="item.codeState == 3" style="color:green;width: 40px;height:25px;line-height: 25px;font-size: 20px;margin: 0;" class="codeResult">
<b
v-show="item.codeState == 3"
style="
color: green;
width: 40px;
height: 25px;
line-height: 25px;
font-size: 20px;
margin: 0;
"
class="codeResult"
>
绿码
</b>
</p>
@ -185,10 +256,11 @@
</div>
</div>
</div>
</div>
<div class="outListBox itemList">
<div class="typeTxt">
{{ $t("message.laborMange.down") }}<br />{{
$t("message.laborMange.shift")
{{ $t('message.laborMange.down') }}<br />{{
$t('message.laborMange.shift')
}}
</div>
<div class="personInner">
@ -197,30 +269,84 @@
v-for="(item, index) in outList"
:key="index"
>
<div class="personBoxItem">
<div class="urseLogo">
<div class="stateLabel" v-if="item.nadTime&&item.workerClassify">
{{overtimeEve(item.nadTime,item.workerClassify)}}
</div>
<img
:src="$store.state.FILEURL + item.imageUrl"
:preview="$store.state.FILEURL + item.imageUrl"
/>
</div>
<div class="detail">
<p class="name">{{ item.workerName }}</p>
<p>
{{
item.departmentName ? item.departmentName : item.teamName
item.departmentName
? item.departmentName
: item.teamName
}}
</p>
<p>{{ item.createTime.split(" ")[1] }}</p>
<p>体温:{{item.temperature}}°</p>
<p>{{ item.createTime.split(' ')[1] }}</p>
<p>体温:{{ item.temperature }}°</p>
<p>
<b v-show="item.codeState == 0" style="color:rgb(168, 168, 168);width: 40px;height:25px;line-height: 25px;font-size: 20px;margin: 0;" class="codeResult">
<b
v-show="item.codeState == 0"
style="
color: rgb(168, 168, 168);
width: 40px;
height: 25px;
line-height: 25px;
font-size: 20px;
margin: 0;
"
class="codeResult"
>
无码
</b>
<b v-show="item.codeState == 1" style="color:red;width: 40px;height:25px;line-height: 25px;font-size: 20px;margin: 0;" class="codeResult">
<b
v-show="item.codeState == 1"
style="
color: red;
width: 40px;
height: 25px;
line-height: 25px;
font-size: 20px;
margin: 0;
"
class="codeResult"
>
红码
</b>
<b v-show="item.codeState == 2" style="color:yellow;width: 40px;height:25px;line-height: 25px;font-size: 20px;margin: 0;" class="codeResult">
<b
v-show="item.codeState == 2"
style="
color: yellow;
width: 40px;
height: 25px;
line-height: 25px;
font-size: 20px;
margin: 0;
"
class="codeResult"
>
黄码
</b>
<b v-show="item.codeState == 3" style="color:green;width: 40px;height:25px;line-height: 25px;font-size: 20px;margin: 0;" class="codeResult">
<b
v-show="item.codeState == 3"
style="
color: green;
width: 40px;
height: 25px;
line-height: 25px;
font-size: 20px;
margin: 0;
"
class="codeResult"
>
绿码
</b>
</p>
@ -230,6 +356,7 @@
</div>
</div>
</div>
</div>
<div class="right fullHeight">
<img
src="@/assets/images/inoutBigScreen/companyLine.png"
@ -240,7 +367,7 @@
class="blockLine-bottom"
/>
<div class="title">
{{ $t("message.laborMange.enterprisesEnteringMarket") }}
{{ $t('message.laborMange.enterprisesEnteringMarket') }}
</div>
<div
id="detetion-box2"
@ -259,11 +386,11 @@
<p v-for="(data, i) in item.list" :key="i + 'child'">
<span>{{ data.name }}</span
><span
>{{ $t("message.laborMange.today") }}{{
>{{ $t('message.laborMange.today') }}{{
data.todayNum
}}</span
><span
>{{ $t("message.laborMange.yesterday") }}{{
>{{ $t('message.laborMange.yesterday') }}{{
data.yesterdayNum
}}</span
>
@ -271,13 +398,13 @@
</div>
<div class="groupBox">
<p class="groupTotal">
<span>{{ $t("message.laborMange.total") }}</span
<span>{{ $t('message.laborMange.total') }}</span
><span
>{{ $t("message.laborMange.today") }}{{
>{{ $t('message.laborMange.today') }}{{
item.totaltodayNum
}}</span
><span
>{{ $t("message.laborMange.yesterday") }}{{
>{{ $t('message.laborMange.yesterday') }}{{
item.totalyesterdayNum
}}</span
>
@ -291,7 +418,7 @@
v-if="statictisData.list.length == 0"
>
<img src="@/assets/images/noData3.png" alt="" srcset="" />
<p>{{ $t("message.laborMange.noData") }}</p>
<p>{{ $t('message.laborMange.noData') }}</p>
</div>
</div>
</div>
@ -314,6 +441,7 @@ const options = {
password: "123456",
clean: true,
};
import tool from "@/util/nowDate/index";
var client2 = null;
export default {
// components:{vueSeamlessScroll},
@ -370,9 +498,10 @@ export default {
};
},
created() {
if(COMPANY == 'nanchang') {
document.title='疫情防控LED大屏';
if (COMPANY == 'nanchang') {
document.title = '疫情防控LED大屏';
}
},
mounted() {
this.getTime();
@ -392,8 +521,56 @@ export default {
if (client2) {
client2.unsubscribe(this.topicName + this.$store.state.projectSn);
}
},
filters:{
},
methods: {
overtimeEve(data, workerClass) {
// console.log(time,'=============')
if (data && workerClass) {
let timestamp = new Date().getTime();
let codeTime = new Date(data).getTime();
let timeDifference = Number(timestamp) - Number(codeTime);
if(isNaN(timeDifference)){
return "核酸超时"
}
let hour = Math.floor(timeDifference / 3600000);
let res='';
switch (workerClass) {
case 1:
if(hour>168){
res="核酸超时"
}else{
res=hour.toString()+'小时'
}
break;
case 2:
if(hour>24){
res="核酸超时"
}else{
res=hour.toString()+'小时'
}
break;
case 3:
if(hour>72){
res="核酸超时"
}else{
res=hour.toString()+'小时'
}
break;
default:
res=''
}
return res;
} else {
return ""
}
},
mqttMSG() {
// mqtt +"/#" +workerId
client2.on("connect", (e) => {
@ -613,7 +790,7 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
background: url("../../../assets/images/inoutBigScreen/headerBG.png")
background: url('../../../assets/images/inoutBigScreen/headerBG.png')
no-repeat 100% 100%;
.left {
flex: 1;
@ -669,7 +846,7 @@ export default {
justify-content: center;
border-radius: 34px;
// border-bottom: 1px dashed rgba(0, 236, 213, 1);
background: url("../../../assets/images/inoutBigScreen/numBG.png") no-repeat
background: url('../../../assets/images/inoutBigScreen/numBG.png') no-repeat
100% 100%;
}
}
@ -744,7 +921,6 @@ export default {
font-size: 35px;
text-align: center;
}
}
p {
color: #f2f2f2;
@ -814,6 +990,26 @@ export default {
white-space: nowrap;
}
.personBox {
.personBoxItem {
display: flex;
.urseLogo {
position: relative;
.stateLabel {
font-size: 14px;
position: absolute;
left: 10px;
top: 10px;
padding: 0 6px;
height: 24px;
line-height: 24px;
text-align: center;
background-color: #3662d6;
color: #fff;
}
}
}
display: inline-block;
// margin-right: 5px;
min-width: 240px;
@ -841,7 +1037,7 @@ export default {
}
}
}
.codeResult{
.codeResult {
font-weight: normal;
display: inline-block;
width: 60px;