From 5d2dc5c4bfc4e96298c6463c02203102a0797f22 Mon Sep 17 00:00:00 2001 From: jxjgmj <1351094127@qq.com> Date: Thu, 16 Jun 2022 14:33:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5=E5=8F=8A?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=A0=B8=E9=85=B8=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i18n/langs/cn/laborManage/personManage.js | 7 +- src/util/nowDate/index.js | 3 +- .../attendanceManage/attendanceManage.vue | 62 +++ .../projectFront/laborManage/overview.vue | 372 +++++++++++++----- 4 files changed, 354 insertions(+), 90 deletions(-) diff --git a/src/assets/i18n/langs/cn/laborManage/personManage.js b/src/assets/i18n/langs/cn/laborManage/personManage.js index 59812369..f9433410 100644 --- a/src/assets/i18n/langs/cn/laborManage/personManage.js +++ b/src/assets/i18n/langs/cn/laborManage/personManage.js @@ -822,7 +822,7 @@ export default { bluetooth: '蓝牙', entranceGuardPhotos: '门禁照片', attendanceRules: '考勤规则', - + //LED大屏显示器--------- 新增LED @@ -996,6 +996,11 @@ export default { out: '出', peopleIdNo: 'I深建人员序列号', inOutTime: '出入时间', + healthCodeStatus:"健康码状态", + nucleicAcidTime:"核酸时间", + nucleicAcidResults:"核酸结果", + vaccinationTime:"疫苗接种时间", + vaccinationFrequency:"疫苗接种次数", diff --git a/src/util/nowDate/index.js b/src/util/nowDate/index.js index 6e5d0267..16996624 100644 --- a/src/util/nowDate/index.js +++ b/src/util/nowDate/index.js @@ -39,4 +39,5 @@ export function getNowTime() { let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds() dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss return dateTime -} \ No newline at end of file +} + diff --git a/src/views/projectFront/laborManage/attendanceManage/attendanceManage.vue b/src/views/projectFront/laborManage/attendanceManage/attendanceManage.vue index bb816bb1..4a870dfb 100644 --- a/src/views/projectFront/laborManage/attendanceManage/attendanceManage.vue +++ b/src/views/projectFront/laborManage/attendanceManage/attendanceManage.vue @@ -268,6 +268,51 @@ {{scope.row.temperature?scope.row.temperature:'--'}} + + + + + + + + + + + + + + + + + + +

- {{ $t("message.laborMange.workersOnSite") }}:{{ statictisData.presencePerson.totalPerson }}{{ $t("message.laborMange.person") }} + >{{ $t('message.laborMange.person') }}

- {{ $t("message.laborMange.peopleWhoPunchInToday") }}:{{ statictisData.todayNum }}{{ $t("message.laborMange.person") }} + >{{ $t('message.laborMange.person') }}

{{ - $t("message.laborMange.peopleWhoClockedInYesterday") + $t('message.laborMange.peopleWhoClockedInYesterday') }}:{{ statictisData.yesterdayNum }}{{ $t("message.laborMange.person") }} + >{{ $t('message.laborMange.person') }}

@@ -86,47 +86,64 @@ +
- {{ currentPersonDetail.workerName}} - - 无码 + {{ currentPersonDetail.workerName }} + + 无码 - - 红码 + + 红码 - - 黄码 + + 黄码 - - 绿码 + + 绿码 - + {{ currentPersonDetail.passType == 1 - ? $t("message.laborMange.enter") - : $t("message.laborMange.leave") + ? $t('message.laborMange.enter') + : $t('message.laborMange.leave') }}
-

体温:{{currentPersonDetail.temperature}}°

+

体温:{{ currentPersonDetail.temperature }}°

- {{ $t("message.laborMange.inOutTime") }}:{{ + {{ $t('message.laborMange.inOutTime') }}:{{ currentPersonDetail.createTime }}

- {{ $t("message.laborMange.team") }}:{{ + {{ $t('message.laborMange.team') }}:{{ currentPersonDetail.teamName }}

- {{ $t("message.laborMange.section") }}:{{ + {{ $t('message.laborMange.section') }}:{{ currentPersonDetail.departmentName }}

- {{ $t("message.laborMange.companies") }}:{{ + {{ $t('message.laborMange.companies') }}:{{ currentPersonDetail.enterpriseName }}

@@ -144,8 +161,8 @@ />
- {{ $t("message.laborMange.up") }}
{{ - $t("message.laborMange.shift") + {{ $t('message.laborMange.up') }}
{{ + $t('message.laborMange.shift') }}
@@ -154,41 +171,96 @@ v-for="(item, index) in inList" :key="index" > - -
-

{{ item.workerName }}

-

- {{ - item.departmentName ? item.departmentName : item.teamName - }} -

-

{{ item.createTime.split(" ")[1] }}

-

体温:{{item.temperature}}°

-

- +

+ +
+

{{ item.workerName }}

+

+ {{ + item.departmentName + ? item.departmentName + : item.teamName + }} +

+

{{ item.createTime.split(' ')[1] }}

+

体温:{{ item.temperature }}°

+

+ 无码 - - + + 红码 - - + + 黄码 - - + + 绿码 - -

+
+

+
- {{ $t("message.laborMange.down") }}
{{ - $t("message.laborMange.shift") + {{ $t('message.laborMange.down') }}
{{ + $t('message.laborMange.shift') }}
@@ -197,33 +269,88 @@ v-for="(item, index) in outList" :key="index" > - -
-

{{ item.workerName }}

-

- {{ - item.departmentName ? item.departmentName : item.teamName - }} -

-

{{ item.createTime.split(" ")[1] }}

-

体温:{{item.temperature}}°

-

- +

+ +
+

{{ item.workerName }}

+

+ {{ + item.departmentName + ? item.departmentName + : item.teamName + }} +

+

{{ item.createTime.split(' ')[1] }}

+

体温:{{ item.temperature }}°

+

+ 无码 - - + + 红码 - - + + 黄码 - - + + 绿码 - -

+
+

+
@@ -240,7 +367,7 @@ class="blockLine-bottom" />
- {{ $t("message.laborMange.enterprisesEnteringMarket") }} + {{ $t('message.laborMange.enterprisesEnteringMarket') }}
{{ data.name }}{{ $t("message.laborMange.today") }}:{{ + >{{ $t('message.laborMange.today') }}:{{ data.todayNum }}{{ $t("message.laborMange.yesterday") }}:{{ + >{{ $t('message.laborMange.yesterday') }}:{{ data.yesterdayNum }} @@ -271,13 +398,13 @@

- {{ $t("message.laborMange.total") }}{{ $t('message.laborMange.total') }}{{ $t("message.laborMange.today") }}:{{ + >{{ $t('message.laborMange.today') }}:{{ item.totaltodayNum }}{{ $t("message.laborMange.yesterday") }}:{{ + >{{ $t('message.laborMange.yesterday') }}:{{ item.totalyesterdayNum }} @@ -291,7 +418,7 @@ v-if="statictisData.list.length == 0" > -

{{ $t("message.laborMange.noData") }}

+

{{ $t('message.laborMange.noData') }}

@@ -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) => { @@ -469,8 +646,8 @@ export default { ajax.open( "get", url + - "?key=a3217cf9335d333c307abee2fce600b5&extensions=base&output=json&city=" + - this.$store.state.currentProDetail.cityCode + "?key=a3217cf9335d333c307abee2fce600b5&extensions=base&output=json&city=" + + this.$store.state.currentProDetail.cityCode ); //步骤三:发送请求 ajax.send(); @@ -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;