From 09d08d49aeb115292d28033a40900d70b284cc9b Mon Sep 17 00:00:00 2001 From: jiayu Date: Mon, 30 Sep 2024 09:20:59 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=99=BA=E8=83=BD=E8=AE=BE=E5=A4=87=20?= =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E4=BA=BA=E5=91=98=E6=B7=BB=E5=8A=A0=E5=B9=BF?= =?UTF-8?q?=E6=92=AD=E5=8A=9F=E8=83=BD=EF=BC=88=E8=81=8A=E5=A4=A9=E6=A1=86?= =?UTF-8?q?=EF=BC=89=EF=BC=9B2.=E9=A6=96=E9=A1=B5=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E6=A6=82=E5=86=B5=E6=8E=A5=E5=8F=A3=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/labor.ts | 4 + src/api/modules/smartSafeHat.ts | 12 + src/assets/images/broadcast.png | Bin 0 -> 493 bytes .../projectOverview/leftCenter.vue | 56 ++- .../smartSafeHat/index.vue | 387 +++++++++++++++++- 5 files changed, 429 insertions(+), 30 deletions(-) create mode 100644 src/assets/images/broadcast.png diff --git a/src/api/modules/labor.ts b/src/api/modules/labor.ts index b2b3d44..d0080ba 100644 --- a/src/api/modules/labor.ts +++ b/src/api/modules/labor.ts @@ -29,6 +29,10 @@ export const getCompanyDataList = (params: {}) => { export const getPersonTypeAndEduStatisticsApi = (params: {}) => { return http.post(BASEURL + `/xmgl/workerInfo/selectPersonTypeAndEduStatistics`, params, { headers: { noLoading: true } }); }; +//查询人员人数-新 +export const getWorkerByNatureApi = (params: {}) => { + return http.post(BASEURL + `/xmgl/workerInfo/getWorkerByNature`, params, { headers: { noLoading: true } }); +}; //查询今日作业人员趋势 export const getQueryTodayAttendanceTrendApi = (params: {}) => { return http.get(BASEURL + `/xmgl/workerAttendance/queryTodayAttendanceTrend`, params, { headers: { noLoading: true } }); diff --git a/src/api/modules/smartSafeHat.ts b/src/api/modules/smartSafeHat.ts index 470feed..e49a7c0 100644 --- a/src/api/modules/smartSafeHat.ts +++ b/src/api/modules/smartSafeHat.ts @@ -92,3 +92,15 @@ export const addSafeHatPositionFence = (params: {}) => { export const getSafeyHatSessionApi = (params: {}) => { return http.post(BASEURL + `/xmgl/projectApi/getSafeyHatSession`, params); }; + +// 查询历史记录 +export const getTaskMessageRecordApi = (params: {}) => { + return http.post(BASEURL + `/xmgl/task/messageRecord`, params, { + headers: { noLoading: true } + }); +}; + +// 文字转语音并发送 +export const getTaskTextToAudioApi = (params: {}) => { + return http.post(BASEURL + `/xmgl/task/textToAudio`, params); +}; diff --git a/src/assets/images/broadcast.png b/src/assets/images/broadcast.png new file mode 100644 index 0000000000000000000000000000000000000000..f1c76fd77b11bb75489c3aa1cfca9ed28bde4312 GIT binary patch literal 493 zcmVW4GMEnutJ4=Q%^b zRHY3yni#{MHl69b`SQOv^8of*3*nn;j>wqm-X$V9-CXkGN5JRy%=A$i0+F?XaNg-2 zrP{$51~DXEp4nb&No=%%N)clfi0fFwUevjT3Z4*PMWk+Qi}U8m%%FtMX0C1qwa3>c z5E@HYze;F}HbZv65v(b>7OoSEa*;@TrudA%fDx63*lFteeBc9Xa3GM+&T@S#2#!_b zIQsiwrn0AB0sF+CgY(dXmQAn(FcGmxoJzt&QCu}EB;4ucwM_6wsACRl1wm;M(L=wG zI_(#{+>PFG#*}ye&qSD{OycOV@4pPP!ID2NXQ+9VW-HqatsG0)AEGD*N9MwHZPTMS^8b jIY3n&n5bzL{
-
管理人员
+
人员数量
+
+
+
+
{{ item.name }}
+
+ {{ item.num }} +
+
+
+
@@ -68,7 +78,7 @@ import Card from "@/components/card.vue"; import { GlobalStore } from "@/stores"; import { COMPANY } from "@/config/config"; import { ref, onMounted, watch } from "vue"; -import { getPersonTypeAndEduStatisticsApi } from "@/api/modules/labor"; +import { getPersonTypeAndEduStatisticsApi, getWorkerByNatureApi } from "@/api/modules/labor"; const store = GlobalStore(); // ts type Props = { @@ -84,6 +94,8 @@ const statisticsCount = ref({ presencecount: {} } as any); +const personalList = ref([]); + watch( () => props.statisticsCount, newVal => { @@ -99,15 +111,21 @@ const attendancePerson = ref(0) const toaltPerson = ref(0) //获取人员数据 const getPersonList = async () => { - const res = await getPersonTypeAndEduStatisticsApi({ + // const res = await getPersonTypeAndEduStatisticsApi({ + // projectSn: store.sn + // }); + // if (res.result) { + // console.log("+++++++++++++++++++++++++++++++++") + // console.log(res) + // presencePerson.value = res.result.personType.presencePerson; + // attendancePerson.value = res.result.personType.attendancePerson; + // toaltPerson.value = res.result.personType.toaltPerson; + // } + const res = await getWorkerByNatureApi({ projectSn: store.sn }); if (res.result) { - console.log("+++++++++++++++++++++++++++++++++") - console.log(res) - presencePerson.value = res.result.personType.presencePerson; - attendancePerson.value = res.result.personType.attendancePerson; - toaltPerson.value = res.result.personType.toaltPerson; + personalList.value = res.result || []; } }; onMounted( async () => { @@ -175,15 +193,22 @@ onMounted( async () => { height: 100%; width: 70%; position: relative; + display: flex; .penName { background: rgba(39, 88, 192, 0.6); - margin: 5% 5%; + margin: 6% 5%; + width: 90%; + position: absolute; + z-index: 0; } .penN { height: 10px; background: url("@/assets/images/comprehensiveManage/project8.png") no-repeat; background-size: 100% 100%; - margin: 13% 5%; + margin: 0 5%; + margin-top: 24%; + width: 90%; + position: absolute; } .numData1 { left: 5%; @@ -198,15 +223,18 @@ onMounted( async () => { top: -10%; } .numData { - position: absolute; + // position: absolute; height: 60%; - width: 30%; + // width: 30%; + flex: 1; display: flex; flex-direction: column; align-items: center; .text { - margin-top: 18%; + margin-top: 15%; + color: #fff; font-size: 16px; + z-index: 1; } .num { font-size: 20px; diff --git a/src/views/sevenLargeScreen/digitalConstruction/smartSafeHat/index.vue b/src/views/sevenLargeScreen/digitalConstruction/smartSafeHat/index.vue index 4df18c3..3490c60 100644 --- a/src/views/sevenLargeScreen/digitalConstruction/smartSafeHat/index.vue +++ b/src/views/sevenLargeScreen/digitalConstruction/smartSafeHat/index.vue @@ -60,16 +60,25 @@ label: 'name' }" show-checkbox - check-on-click-node default-expand-all node-key="devSn" ref="tree" > + @@ -93,7 +102,7 @@ 人员名称 - +
- + +