From cfd89da956c4fb5611906e194465e984a7efecf5 Mon Sep 17 00:00:00 2001 From: Vce Date: Wed, 19 Jun 2024 20:21:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=AE=8C=E6=88=90=E7=8E=B0=E5=9C=BA?= =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/agjtLiveApi.ts | 58 +++++++ .../liveScreen/centerBottomLeft.vue | 71 +++++++- .../liveScreen/centerBottomRight.vue | 67 ++++++-- .../agjtLiveScreen/liveScreen/centerTop.vue | 37 ++-- src/views/agjtLiveScreen/liveScreen/index.vue | 92 +++++++--- .../agjtLiveScreen/liveScreen/leftBottom.vue | 159 ++++++++---------- .../agjtLiveScreen/liveScreen/leftCenter.vue | 64 ++++++- .../agjtLiveScreen/liveScreen/leftTop.vue | 139 +++++---------- .../agjtLiveScreen/liveScreen/rightBottom.vue | 83 ++++++--- .../agjtLiveScreen/liveScreen/rightTop.vue | 90 ++++++++-- 10 files changed, 584 insertions(+), 276 deletions(-) create mode 100644 src/api/modules/agjtLiveApi.ts diff --git a/src/api/modules/agjtLiveApi.ts b/src/api/modules/agjtLiveApi.ts new file mode 100644 index 0000000..559f958 --- /dev/null +++ b/src/api/modules/agjtLiveApi.ts @@ -0,0 +1,58 @@ +// 鞍钢集团现场大屏API +import http from "@/api"; +const BASEURL = import.meta.env.VITE_API_URL; + +//获取企业Id的API +export const getEnterpriseIdApi = (params: {}, showLoading: boolean) => { + return http.post(BASEURL + `/xmgl/enterpriseInfo/getXzSupplierInfo`, { headers: { noLoading: showLoading } }); +}; + +//获取AI报警情况信息API +export const countTaskProgressApi = (params: {}, showLoading: boolean) => { + return http.post(BASEURL + `/xmgl/xzTaskProgress/countTaskProgress`, params, { headers: { noLoading: showLoading } }); +}; + +//获取企业信息API +export const getEnterpriseInfoByIdApi = (params: {}, showLoading: boolean) => { + return http.post(BASEURL + `/xmgl/enterpriseInfo/getEnterpriseInfoById`, params, { headers: { noLoading: showLoading } }); +}; + +//获取AI报警情况信息API +export const selectAIPageListApi = (params: {}, showLoading: boolean) => { + return http.post(BASEURL + `/xmgl/aiAnalyseHardWareAlarmRecord/selectPageList`, params, { headers: { noLoading: showLoading } }); +}; + +//安全教育视频API +export const configWeekVideoListApi = (params: {}, showLoading: boolean) => { + return http.get(BASEURL + `/xmgl/educationConfigWeekVideo/list`, params, { headers: { noLoading: showLoading } }); +}; + +//获取劳务实名制信息API---上 +export const selectPersonTypeAndEduStatisticsApi = (params: {}, showLoading: boolean) => { + return http.post(BASEURL + `/xmgl/workerInfo/selectPersonTypeAndEduStatistics`, params, { headers: { noLoading: showLoading } }); +}; + +//获取劳务实名制信息API---下 +export const selectWorkerTeamAndDepartmentStatisticsApi = (params: {}, showLoading: boolean) => { + return http.post(BASEURL + `/xmgl/workerInfo/selectWorkerTeamAndDepartmentStatistics`, params, { headers: { noLoading: showLoading } }); +}; + +//获取质量待办信息API +export const qualityPageApi = (params: {}, showLoading: boolean) => { + return http.post(BASEURL + `/xmgl/qualityInspectionRecord/page`, params, { headers: { noLoading: showLoading } }); +}; + +//获取安全待办信息API +export const securityPageApi = (params: {}, showLoading: boolean) => { + return http.post(BASEURL + `/xmgl/xzSecurityQualityInspectionRecord/page`, params, { headers: { noLoading: showLoading } }); +}; + +//获取应急记录信息API +export const emergencyPageApi = (params: {}, showLoading: boolean) => { + return http.get(BASEURL + `/xmgl/xzEmergencyRecord/page`, params, { headers: { noLoading: showLoading } }); +}; + +//获取应急记录信息API +export const getStatBySpecialApi = (params: {}, showLoading: boolean) => { + return http.get(BASEURL + `/xmgl/xzFlow/getStatBySpecial`, params, { headers: { noLoading: showLoading } }); +}; diff --git a/src/views/agjtLiveScreen/liveScreen/centerBottomLeft.vue b/src/views/agjtLiveScreen/liveScreen/centerBottomLeft.vue index 24aafe2..1a8ae94 100644 --- a/src/views/agjtLiveScreen/liveScreen/centerBottomLeft.vue +++ b/src/views/agjtLiveScreen/liveScreen/centerBottomLeft.vue @@ -6,31 +6,31 @@
今日出勤总人数
-
1024
+
{{lwInfo2.presencePersonTotal || 0}}
在册人数
-
512
+
{{lwInfo2.totalPerson || 0}}
-
+
-
+
-
1
-
钢筋工-张三
+
{{i + 1}}
+
{{item.teamName}}
-
20/40
+
{{item.attendancePersonTotal}}/{{item.totalPerson}}
- +
@@ -41,6 +41,59 @@ import Card from "@/components/card.vue"; import { ref, watch, onMounted } from "vue"; import { getStageOption } from "@/api/modules/projectOverview"; import { GlobalStore } from "@/stores"; +import { COMPANY } from "@/config/config"; +//引入现场大屏API +import { + getEnterpriseIdApi, + selectPersonTypeAndEduStatisticsApi, + selectWorkerTeamAndDepartmentStatisticsApi, + } from "@/api/modules/agjtLiveApi"; +const store = GlobalStore(); + +//获取劳务实名制信息 +const lwInfo1 = ref({} as any) +const lwInfo2 = ref({} as any) +async function getLwInfo() { + //获取企业Id + await getEnterpriseIdApi().then(res => { + // console.log("获取企业id",res.result.id) + selectPersonTypeAndEduStatisticsApi({ + enterpriseId: res.result.id, + // projectSn: store.sn, + projectSn: 'BD3137498CB84BF0969979E0342CDBCA' // yh001---ProjectSn + }).then(res1 => { + if(res1.success){ + if(res1.result){ + lwInfo1.value = res1.result.personType + } + } + }) + selectWorkerTeamAndDepartmentStatisticsApi({ + // projectSn: store.sn, + projectSn: 'BD3137498CB84BF0969979E0342CDBCA' // yh001---ProjectSn + }).then(res2 => { + if(res2.success){ + if(res2.result){ + lwInfo2.value = res2.result + } + } + }) + }); +}; + +//父组件调用需要无感刷新的方法 +const centerBottomLeftMethod = async () => { + getLwInfo() +} + +//将方法暴露给父组件 +defineExpose({ + centerBottomLeftMethod +}) + +onMounted( async () => { + getLwInfo() +}); diff --git a/src/views/agjtLiveScreen/liveScreen/centerBottomRight.vue b/src/views/agjtLiveScreen/liveScreen/centerBottomRight.vue index 89d962c..ba9686d 100644 --- a/src/views/agjtLiveScreen/liveScreen/centerBottomRight.vue +++ b/src/views/agjtLiveScreen/liveScreen/centerBottomRight.vue @@ -1,26 +1,29 @@ @@ -30,6 +33,50 @@ import Card from "@/components/card.vue"; import { ref, watch, onMounted } from "vue"; import { getStageOption } from "@/api/modules/projectOverview"; import { GlobalStore } from "@/stores"; +import { COMPANY } from "@/config/config"; +//引入现场大屏API +import { + getEnterpriseIdApi, + qualityPageApi, + } from "@/api/modules/agjtLiveApi"; +const store = GlobalStore(); + +//获取质量待办信息 +const qualityData = ref([] as any) +async function getQualityData() { + + //获取企业Id + await getEnterpriseIdApi().then(res => { + if(res.success){ + qualityPageApi({ + page: 1, + pageSize: 9999, + status: 60, + // enterpriseId: res.result.id, + // projectSn: store.sn, + projectSn: 'BD3137498CB84BF0969979E0342CDBCA', // yh001---ProjectSn + }).then(res2 => { + if(res2.success){ + qualityData.value = res2.result.page.records + } + }); + } + }); +}; + + +//父组件调用需要无感刷新的方法 +const centerBottomRightMethod = async () => { + +} +//将方法暴露给父组件 +defineExpose({ + centerBottomRightMethod +}) + +onMounted( async () => { + getQualityData() +}); diff --git a/src/views/agjtLiveScreen/liveScreen/centerTop.vue b/src/views/agjtLiveScreen/liveScreen/centerTop.vue index fb6d4e2..024b745 100644 --- a/src/views/agjtLiveScreen/liveScreen/centerTop.vue +++ b/src/views/agjtLiveScreen/liveScreen/centerTop.vue @@ -30,11 +30,13 @@ import Card from "@/components/card.vue"; import { ref, onMounted, watch } from "vue"; import { GlobalStore } from "@/stores"; import { ElMessage } from "element-plus"; -import { selectLiveVideoListApi } from "@/api/modules/video"; +// import { selectLiveVideoListApi } from "@/api/modules/video"; import ckplayerComp from "./ckplayerComp.vue"; import { COMPANY } from "@/config/config"; import setVideoDialog from "@/components/setVideoDialog.vue"; -import { configWeekVideoListApi } from "@/api/modules/agjtCommandApi"; +// import { configWeekVideoListApi } from "@/api/modules/agjtCommandApi"; +//引入现场大屏API +import { configWeekVideoListApi } from "@/api/modules/agjtLiveApi"; import moment from "moment"; const store = GlobalStore(); const videoList = ref([] as any); @@ -85,20 +87,17 @@ const configWeekVideoListFn = async (showLoading: boolean) => { showLoading ); if (res.result) { - console.log("===================") - console.log(res) - console.log("===================") // 星期参数 const today = moment().format("d"); - const weekParamsKey = ["sun", "mon", "tues", "wed", "thur", "fri", "sat"]; + // const weekParamsKey = ["sun", "mon", "tues", "wed", "thur", "fri", "sat"]; // projectData.value.videoUrl = res.result[0][weekParamsKey[+today]]; - if(today == 0) projectData.value.videoUrl = res.result[0].sun - if(today == 1) projectData.value.videoUrl = res.result[0].mon - if(today == 2) projectData.value.videoUrl = res.result[0].tues - if(today == 3) projectData.value.videoUrl = res.result[0].wed - if(today == 4) projectData.value.videoUrl = res.result[0].thur - if(today == 5) projectData.value.videoUrl = res.result[0].fri - if(today == 6) projectData.value.videoUrl = res.result[0].sat + if(res.result.length != 0 && today == 0) projectData.value.videoUrl = res.result[0].sun + if(res.result.length != 0 && today == 1) projectData.value.videoUrl = res.result[0].mon + if(res.result.length != 0 && today == 2) projectData.value.videoUrl = res.result[0].tues + if(res.result.length != 0 && today == 3) projectData.value.videoUrl = res.result[0].wed + if(res.result.length != 0 && today == 4) projectData.value.videoUrl = res.result[0].thur + if(res.result.length != 0 && today == 5) projectData.value.videoUrl = res.result[0].fri + if(res.result.length != 0 && today == 6) projectData.value.videoUrl = res.result[0].sat } }; // const getVideoList = async () => { @@ -121,10 +120,20 @@ const configWeekVideoListFn = async (showLoading: boolean) => { // }, 2000); // } // }; + +//测试方法,对接口时改成相应的方法注释 +const centerTopMethod = async () => { + console.log("centerTopMethod") +} +//将方法暴露给父组件 +defineExpose({ + centerTopMethod +}) + onMounted(async () => { // if (COMPANY !== "agjt") showVideo.value = 2; // await getVideoList(); - await configWeekVideoListFn(true); + await configWeekVideoListFn(true); }); diff --git a/src/views/agjtLiveScreen/liveScreen/index.vue b/src/views/agjtLiveScreen/liveScreen/index.vue index d7630dd..ebfaa36 100644 --- a/src/views/agjtLiveScreen/liveScreen/index.vue +++ b/src/views/agjtLiveScreen/liveScreen/index.vue @@ -1,15 +1,20 @@