flx:提交指挥部大屏风险开发

This commit is contained in:
X_Rian 2024-06-19 19:36:55 +08:00
parent 25dc5c976d
commit d430f578c4
8 changed files with 459 additions and 116 deletions

View File

@ -146,3 +146,33 @@ export const configWeekVideoSaveApi = (params: {}, showLoading: boolean) => {
export const configWeekVideoListApi = (params: {}, showLoading: boolean) => { export const configWeekVideoListApi = (params: {}, showLoading: boolean) => {
return http.get(BASEURL + `/xmgl/educationConfigWeekVideo/list`, params, { headers: { noLoading: showLoading } }); return http.get(BASEURL + `/xmgl/educationConfigWeekVideo/list`, params, { headers: { noLoading: showLoading } });
}; };
// 人员风险趋势
export const getWorkerRiskByProjectApi = (params: {}, showLoading: boolean) => {
return http.get(BASEURL + `/xmgl/xzRiskPrediction/getWorkerRiskByProject`, params, { headers: { noLoading: showLoading } });
};
// 人员风险趋势(总包)
export const getWorkerRiskByEnterpriseApi = (params: {}, showLoading: boolean) => {
return http.get(BASEURL + `/xmgl/xzRiskPrediction/getWorkerRiskByEnterprise`, params, { headers: { noLoading: showLoading } });
};
// 隐患风险预测趋势
export const getSafetyRiskByProjectApi = (params: {}, showLoading: boolean) => {
return http.get(BASEURL + `/xmgl/xzRiskPrediction/getSafetyRiskByProject`, params, { headers: { noLoading: showLoading } });
};
// 隐患风险预测趋势(总包)
export const getSafetyRiskByEnterpriseApi = (params: {}, showLoading: boolean) => {
return http.get(BASEURL + `/xmgl/xzRiskPrediction/getSafetyRiskByEnterprise`, params, { headers: { noLoading: showLoading } });
};
// 特殊作业风险预测趋势
export const getSpecialTrendApi = (params: {}, showLoading: boolean) => {
return http.post(BASEURL + `/xmgl/xzRiskPrediction/getSpecialTrend`, params, { headers: { noLoading: showLoading } });
};
// 事故风险预测趋势
export const getRiskTrendByProjectApi = (params: {}, showLoading: boolean) => {
return http.post(BASEURL + `/xmgl/xzRiskPrediction/riskTrendByProject`, params, { headers: { noLoading: showLoading } });
};
// 事故风险预测趋势(总包)
export const getRiskTrendByMainEnterpriseApi = (params: {}, showLoading: boolean) => {
return http.post(BASEURL + `/xmgl/xzRiskPrediction/riskTrendByMainEnterprise`, params, { headers: { noLoading: showLoading } });
};

View File

@ -28,8 +28,8 @@ export const BASE_IMAGE_URL = import.meta.env.VITE_BASE_IMAGE_URL;
// export const COMPANY: string = "zsbf"; //中水北方 // export const COMPANY: string = "zsbf"; //中水北方
// export const COMPANY: string = "as"; //鞍山项目 // export const COMPANY: string = "as"; //鞍山项目
// export const COMPANY: string = "agjt"; //鞍钢集团 // export const COMPANY: string = "agjt"; //鞍钢集团
export const COMPANY: string = "agjtLive"; //鞍钢集团现场大屏 // export const COMPANY: string = "agjtLive"; //鞍钢集团现场大屏
// export const COMPANY: string = "agjtCommand"; //鞍钢集团指挥部大屏 export const COMPANY: string = "agjtCommand"; //鞍钢集团指挥部大屏
// export const COMPANY: string = "agjtProjectKanban"; //鞍钢集团项目看板大屏 // export const COMPANY: string = "agjtProjectKanban"; //鞍钢集团项目看板大屏
// export const COMPANY: string = "agjtOverviewScreen"; //鞍钢集团项目总览 // export const COMPANY: string = "agjtOverviewScreen"; //鞍钢集团项目总览
// export const COMPANY: string = "cqna"; //重庆市南岸区 // export const COMPANY: string = "cqna"; //重庆市南岸区

View File

@ -25,8 +25,8 @@ export const staticRouter: RouteRecordRaw[] = [
path: "/large", path: "/large",
name: "大屏", name: "大屏",
// component: () => import("@/views/sevenLargeScreen/indexL.vue"), //七参数标准版 // component: () => import("@/views/sevenLargeScreen/indexL.vue"), //七参数标准版
// component: () => import("@/views/commandScreen/indexCommand.vue"), //指挥部大屏 component: () => import("@/views/commandScreen/indexCommand.vue"), //指挥部大屏
component: () => import("@/views/agjtLiveScreen/indexLive.vue"), //鞍钢现场大屏 // component: () => import("@/views/agjtLiveScreen/indexLive.vue"), //鞍钢现场大屏
// component: () => import("@/views/overviewScreen/indexCommand.vue"), //总览大屏 // component: () => import("@/views/overviewScreen/indexCommand.vue"), //总览大屏
// component: () => import("@/views/agjtProjectKanban/indexL.vue"), //鞍钢集团项目看板大屏 // component: () => import("@/views/agjtProjectKanban/indexL.vue"), //鞍钢集团项目看板大屏
// component: () => import("@/views/sevenLargeScreen/indexL_syhy.vue"), // 只有一级路由(盘锦、嘉兴、鄱湖美湾医疗项目需切换至该首页) // component: () => import("@/views/sevenLargeScreen/indexL_syhy.vue"), // 只有一级路由(盘锦、嘉兴、鄱湖美湾医疗项目需切换至该首页)

View File

@ -160,6 +160,7 @@ import { getNoticeListApi } from "@/api/modules/projectOverview";
import { Vue3SeamlessScroll } from "vue3-seamless-scroll"; import { Vue3SeamlessScroll } from "vue3-seamless-scroll";
// import Card from "@/components/card.vue"; // import Card from "@/components/card.vue";
import { ref, onMounted, reactive } from "vue"; import { ref, onMounted, reactive } from "vue";
import { getRiskTrendByProjectApi, getRiskTrendByMainEnterpriseApi } from "@/api/modules/agjtCommandApi";
import { getCountEmergencyTypedApi, getCountAlarmNumByEnterpriseApi } from "@/api/modules/projectOverview"; import { getCountEmergencyTypedApi, getCountAlarmNumByEnterpriseApi } from "@/api/modules/projectOverview";
import * as echarts from "echarts"; import * as echarts from "echarts";
import { GlobalStore } from "@/stores"; import { GlobalStore } from "@/stores";
@ -183,44 +184,123 @@ const randerInfo = reactive({
radius: "63%", radius: "63%",
dataList: [ dataList: [
{ {
value: [4200, 3000, 20000, 35000, 50000], value: [0, 0, 0, 0, 0],
name: "项目事故风险概率预测" name: "项目事故风险概率预测"
// areaStyle: {} // areaStyle: {}
} }
], ],
indicator: [ indicator: [
{ name: "恶劣天气占比", max: 6500 }, { name: "恶劣天气占比", max: 1 },
{ name: "人员风险概率", max: 16000 }, { name: "人员风险概率", max: 1 },
{ name: "特殊作业风险概率", max: 30000 }, { name: "特殊作业风险概率", max: 1 },
{ name: "月度安全评分", max: 38000 }, { name: "月度安全评分", max: 1 },
{ name: "隐患未整改占比", max: 52000 } { name: "隐患未整改占比", max: 1 }
], ],
titleInfo: { titleInfo: {
titleLeft: "未来三天事故风险概率预测", titleLeft: "未来三天事故风险概率预测",
titleRight: "查看各企业应急事故风险概率预测", titleRight: "查看各企业应急事故风险概率预测",
percentage: 80 percentage: 80
} },
workerFlag: true,
workerList: [] as any[]
}); });
//tab //tab
const handleTab = (val: number) => { const handleTab = (val: number) => {
activeIfo.activeIndex = val; if (activeIfo.activeIndex == 1) {
if (activeIfo.activeIndex == 0) { activeIfo.activeIndex = val;
getCountAlarmNumByEnterprise(false); getCountAlarmNumByEnterprise(false);
} else if (activeIfo.activeIndex == 0) {
getRiskTrendByProject(false, 1);
} }
}; };
const emits = defineEmits(["openDialog"]); const emits = defineEmits(["openDialog"]);
// //
const openDialogData = () => { const openDialogData = async () => {
console.log("我打开了!!!!!!!!!!11"); console.log("我打开了!!!!!!!!!!11");
//
const res: any = await getRiskTrendByMainEnterpriseApi(
{
projectSn: store.sn
},
false
);
const resultList = [] as any[];
if (res.result) {
console.log("事故风险预测趋势", res.result);
res.result.forEach((item: any, index: number) => {
resultList.push({
id: `list${index}`,
radius: "70%",
isLegend: "top",
radarCenter: ["50%", "60%"],
dataList: [
{
value: [
item.severeWeatherRate,
item.totalPersonnelRiskRate,
item.totalSpecialOperationsRiskRate,
item.monthlySafetyScoreRate,
item.unclosedHiddenDangersRate
],
name: item.enterpriseName
// areaStyle: {}
}
],
indicator: [
{ name: "恶劣天气占比", max: 1 },
{ name: "人员风险概率", max: 1 },
{ name: "特殊作业风险概率", max: 1 },
{ name: "月度安全评分", max: 1 },
{ name: "隐患未整改占比", max: 1 }
],
titleInfo: {
titleLeft: "未来三天事故风险概率预测",
// titleRight: "",
percentage: 80
},
workerFlag: true,
workerList: [
item.severeWeatherRate,
item.totalPersonnelRiskRate,
item.totalSpecialOperationsRiskRate,
item.monthlySafetyScoreRate,
item.unclosedHiddenDangersRate
]
});
});
}
const resultInfo = { const resultInfo = {
index: 11, index: 11,
title: "总包单位应急事故概率分析", title: "总包单位应急事故概率分析",
radarType: 2 radarType: 2,
randerList: resultList
}; };
emits("openDialog", resultInfo); emits("openDialog", resultInfo);
}; };
//
const getRiskTrendByProject = async (showLoading: boolean, val: number) => {
const res: any = await getRiskTrendByProjectApi(
{
projectSn: store.sn
},
showLoading
);
if (res.result) {
console.log("事故风险预测趋势", res.result);
randerInfo.dataList[0].value = [
res.result.severeWeatherRate,
res.result.totalPersonnelRiskRate,
res.result.totalSpecialOperationsRiskRate,
res.result.monthlySafetyScoreRate,
res.result.unclosedHiddenDangersRate
];
randerInfo.workerList = randerInfo.dataList[0].value;
}
activeIfo.activeIndex = val;
};
const getNoticeList = async (showLoading: boolean) => { const getNoticeList = async (showLoading: boolean) => {
// const res: any = await getNoticeListApi({ projectSn: store.sn, type: 10, pageNo: 1, pageSize: 99999, }); // const res: any = await getNoticeListApi({ projectSn: store.sn, type: 10, pageNo: 1, pageSize: 99999, });
// const res: any = await getNoticeListApi({ isBigScreen: 1, type: 32 }); // // const res: any = await getNoticeListApi({ isBigScreen: 1, type: 32 }); //
@ -763,7 +843,9 @@ const getCountAlarmNumByEnterprise = async (showLoading: boolean) => {
}; };
const setIntervalFn = (showLoading: boolean) => { const setIntervalFn = (showLoading: boolean) => {
getNoticeList(showLoading); getNoticeList(showLoading);
getCountAlarmNumByEnterprise(showLoading); if (activeIfo.activeIndex == 1) {
getCountAlarmNumByEnterprise(showLoading);
}
getMessCountEchartType(showLoading); getMessCountEchartType(showLoading);
}; };
onMounted(async () => { onMounted(async () => {

View File

@ -151,7 +151,9 @@ import {
getPersonTypeAndEduStatisticsApi, getPersonTypeAndEduStatisticsApi,
queryAttendanceOfEachCompanyApi, queryAttendanceOfEachCompanyApi,
getCountTaskProgressApi, getCountTaskProgressApi,
queryCountEnterpriseApi queryCountEnterpriseApi,
getWorkerRiskByProjectApi,
getWorkerRiskByEnterpriseApi
} from "@/api/modules/agjtCommandApi"; } from "@/api/modules/agjtCommandApi";
import type { TabsPaneContext, ElMessageBox } from "element-plus"; import type { TabsPaneContext, ElMessageBox } from "element-plus";
import * as ElementPlusIconsVue from "@element-plus/icons-vue"; import * as ElementPlusIconsVue from "@element-plus/icons-vue";
@ -167,34 +169,78 @@ const randerInfo = reactive({
radius: "65%", radius: "65%",
dataList: [ dataList: [
{ {
value: [4200, 3000, 20000, 35000, 50000, 18000], value: [0, 0, 0, 0, 0, 0],
name: "项目人员风险" name: "项目人员风险"
// areaStyle: {} // areaStyle: {}
} }
], ],
indicator: [ indicator: [
{ name: "高龄人员总数", max: 6500 }, { name: "高龄人员总数", max: 1 },
{ name: "人员总数", max: 16000 }, { name: "人员总数", max: 1 },
{ name: "未闭合隐患", max: 30000 }, { name: "未闭合隐患", max: 1 },
{ name: "特殊工种人员", max: 38000 }, { name: "特殊工种人员", max: 1 },
{ name: "平均安全绩效评分", max: 52000 }, { name: "平均安全绩效评分", max: 1 },
{ name: "平均培训通过率", max: 25000 } { name: "平均培训通过率", max: 1 }
], ],
titleInfo: { titleInfo: {
titleLeft: "未来三天人员风险概率预测", titleLeft: "未来三天人员风险概率预测",
titleRight: "查看各企业人员风险概率预测", titleRight: "查看各企业人员风险概率预测",
percentage: 1 percentage: 1
} },
workerFlag: true,
workerList: [] as any[]
}); });
const emits = defineEmits(["openDialog"]); const emits = defineEmits(["openDialog"]);
// //
const openDialogData = () => { const openDialogData = async () => {
console.log("我打开了!!!!!!!!!!11"); console.log("我打开了!!!!!!!!!!11");
//
const res: any = await getWorkerRiskByEnterpriseApi(
{
projectSn: store.sn
},
false
);
const resultList = [] as any[];
if (res.result) {
console.log("人员风险趋势", res.result);
res.result.forEach((item: any, index: number) => {
resultList.push({
id: `list${index}`,
radius: "70%",
isLegend: "top",
radarCenter: ["50%", "60%"],
dataList: [
{
value: [item.age, 1, item.safe, item.workerType, item.security, item.exam],
name: item.enterpriseName
// areaStyle: {}
}
],
indicator: [
{ name: "高龄人员总数", max: 1 },
{ name: "人员总数", max: 1 },
{ name: "未闭合隐患", max: 1 },
{ name: "特殊工种人员", max: 1 },
{ name: "平均安全绩效评分", max: 1 },
{ name: "平均培训通过率", max: 1 }
],
titleInfo: {
titleLeft: "未来三天人员风险概率预测",
// titleRight: "",
percentage: 80
},
workerFlag: true,
workerList: [item.age, item.total, item.safe, item.workerType, item.security, item.exam]
});
});
}
const resultInfo = { const resultInfo = {
index: 11, index: 11,
title: "总包单位人员风险概率分析", title: "总包单位人员风险概率分析",
radarType: 1 radarType: 1,
randerList: resultList
}; };
emits("openDialog", resultInfo); emits("openDialog", resultInfo);
}; };
@ -253,18 +299,20 @@ const queryAttendanceOfEachCompany = async (showLoading: boolean) => {
//tab //tab
const handleTab = (val: number) => { const handleTab = (val: number) => {
activeIndex.value = val; if (isFlag.value && activeIndex.value == 1) {
if (isFlag.value && activeIndex.value == 0) { activeIndex.value = val;
queryAttendanceOfEachCompany(false); queryAttendanceOfEachCompany(false);
} else if (activeIndex.value == 0) {
getWorkerRiskByProject(false, 1);
} }
}; };
// //
function drawBar() { function drawBar() {
type EChartsOption = echarts.EChartsOption; type EChartsOption = echarts.EChartsOption;
var chartDom = document.getElementById("bar")!; let chartDom = document.getElementById("bar")!;
var myChart = echarts.init(chartDom); let myChart = echarts.init(chartDom);
var option: EChartsOption; let option: EChartsOption;
option = { option = {
xAxis: { xAxis: {
@ -446,10 +494,42 @@ const queryCountEnterprise = async (showLoading: boolean) => {
processList.value = res.result; processList.value = res.result;
} }
}; };
//
const getWorkerRiskByProject = async (showLoading: boolean, val: number) => {
const res: any = await getWorkerRiskByProjectApi(
{
projectSn: store.sn
},
showLoading
);
if (res.result) {
console.log("人员风险趋势", res.result);
randerInfo.dataList[0].value = [
res.result.age,
1,
res.result.safe,
res.result.workerType,
res.result.security,
res.result.exam
];
randerInfo.workerList = [
res.result.age,
res.result.total,
res.result.safe,
res.result.workerType,
res.result.security,
res.result.exam
];
}
activeIndex.value = val;
};
const setIntervalFn = (showLoading: boolean) => { const setIntervalFn = (showLoading: boolean) => {
// drawBar() // drawBar()
getPersonTypeAndEduStatistics(showLoading); getPersonTypeAndEduStatistics(showLoading);
queryAttendanceOfEachCompany(showLoading); if (activeIndex.value == 0) {
queryAttendanceOfEachCompany(showLoading);
}
getCountTaskProgress(showLoading); getCountTaskProgress(showLoading);
queryCountEnterprise(showLoading); queryCountEnterprise(showLoading);
}; };

View File

@ -54,7 +54,7 @@
<p>暂无数据</p> <p>暂无数据</p>
</div> </div>
</div> </div>
</div> --> </div> -->
<div class="contentTop contentMiddle" style="height: 27%; margin-top: 10px"> <div class="contentTop contentMiddle" style="height: 27%; margin-top: 10px">
<leftBottom @openDialogData="openDialogData"></leftBottom> <leftBottom @openDialogData="openDialogData"></leftBottom>
</div> </div>
@ -64,8 +64,8 @@
<div class="cubeIcon"></div> <div class="cubeIcon"></div>
<div class="cLeft title-tabs"> <div class="cLeft title-tabs">
<div <div
:class="{ 'title-color': activeIfo.activeIndex == index }" :class="{ 'title-color': activeInfo.activeIndex == index }"
v-for="(item, index) in activeIfo.activeTitleList" v-for="(item, index) in activeInfo.activeTitleList"
:key="item.id" :key="item.id"
@click="handleTab(index, 1)" @click="handleTab(index, 1)"
> >
@ -75,14 +75,14 @@
</div> </div>
<div class="cbHeaderLine"></div> <div class="cbHeaderLine"></div>
</div> </div>
<div v-if="activeIfo.activeIndex == 0" class="ctContent cbContent" style="margin-top: 1%; height: 78%"> <div v-if="activeInfo.activeIndex == 0" class="ctContent cbContent" style="margin-top: 1%; height: 78%">
<div id="eacherRisk" style="width: 100%; height: 100%"></div> <div id="eacherRisk" style="width: 100%; height: 100%"></div>
<div class="notoDta" v-if="riskList.length == 0"> <div class="notoDta" v-if="riskList.length == 0">
<img src="@/assets/images/noData.png" alt="" /> <img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p> <p>暂无数据</p>
</div> </div>
</div> </div>
<div v-else-if="activeIfo.activeIndex == 1" class="ctContent cbContent" style="height: 78%"> <div v-else-if="activeInfo.activeIndex == 1" class="ctContent cbContent" style="height: 78%">
<radarMapOption @openRadarDialog="openDialogData" :randerInfo="randerInfo" /> <radarMapOption @openRadarDialog="openDialogData" :randerInfo="randerInfo" />
</div> </div>
</div> </div>
@ -92,8 +92,8 @@
<div class="cubeIcon"></div> <div class="cubeIcon"></div>
<div class="cLeft title-tabs"> <div class="cLeft title-tabs">
<div <div
:class="{ 'title-color': activeIfo.activeIndex2 == index }" :class="{ 'title-color': activeInfo.activeIndex2 == index }"
v-for="(item, index) in activeIfo.activeTitleList2" v-for="(item, index) in activeInfo.activeTitleList2"
:key="item.id" :key="item.id"
@click="handleTab(index, 2)" @click="handleTab(index, 2)"
> >
@ -103,15 +103,17 @@
</div> </div>
<div class="cbHeaderLine"></div> <div class="cbHeaderLine"></div>
</div> </div>
<div v-if="activeIfo.activeIndex2 == 0" class="ctContent" style="margin-top: 1%; height: 73%"> <div v-if="activeInfo.activeIndex2 == 0" class="ctContent" style="margin-top: 1%; height: 73%">
<div id="eacherSpecial" style="width: 100%; height: 100%"></div> <div id="eacherSpecial" style="width: 100%; height: 100%"></div>
<div class="notoDta" v-if="specialList.length == 0"> <div class="notoDta" v-if="specialList.length == 0">
<img src="@/assets/images/noData.png" alt="" /> <img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p> <p>暂无数据</p>
</div> </div>
</div> </div>
<div v-else-if="activeIfo.activeIndex2 == 1" class="ctContent" style="height: 73%"> <div v-else-if="activeInfo.activeIndex2 == 1" class="ctContent" style="height: 73%">
<radarMapOption :randerInfo="randerInfo2" /> <div class="right-dap" @click="onRightDap()"></div>
<radarMapOption v-if="activeInfo.rightFlag" :randerInfo="randerInfo2" />
<radarMapOption v-else :randerInfo="randerInfo2" />
</div> </div>
</div> </div>
<!-- <div class="contentBottom"> <!-- <div class="contentBottom">
@ -174,7 +176,7 @@
</vue3-seamless-scroll> </vue3-seamless-scroll>
</div> </div>
</div> </div>
</div> --> </div> -->
</div> </div>
</div> </div>
</template> </template>
@ -186,6 +188,7 @@ import radarMapOption from "@/views/commandScreen/components/radarMapOption.vue"
import { onMounted, ref, watch, reactive } from "vue"; import { onMounted, ref, watch, reactive } from "vue";
import { GlobalStore } from "@/stores"; import { GlobalStore } from "@/stores";
import leftBottom from "@/views/commandScreen/components/leftBottom.vue"; import leftBottom from "@/views/commandScreen/components/leftBottom.vue";
import { getSafetyRiskByProjectApi, getSafetyRiskByEnterpriseApi, getSpecialTrendApi } from "@/api/modules/agjtCommandApi";
import { import {
// getProjectInspectRecordCountApi, // getProjectInspectRecordCountApi,
// selectQualityStatisticsApi // selectQualityStatisticsApi
@ -205,18 +208,58 @@ let questionTotal = ref(0 as any);
const emits = defineEmits(["openDialog"]); const emits = defineEmits(["openDialog"]);
// //
const openDialogData = () => { const openDialogData = async () => {
console.log("我打开了!!!!!!!!!!11"); console.log("我打开了!!!!!!!!!!11");
//
const res: any = await getSafetyRiskByEnterpriseApi(
{
projectSn: store.sn
},
false
);
const resultList = [] as any[];
if (res.result) {
console.log("隐患风险预测趋势", res.result);
res.result.forEach((item: any, index: number) => {
resultList.push({
id: `list${index}`,
radius: "70%",
isLegend: "top",
radarCenter: ["50%", "60%"],
dataList: [
{
value: [item.security, item.safe, item.levelRisk, item.limitTime],
name: item.enterpriseName
// areaStyle: {}
}
],
indicator: [
{ name: "隐患未闭合", max: 1 },
{ name: "平均安全绩效评分", max: 1 },
{ name: "重大、较大隐患", max: 1 },
{ name: "隐患超期整改", max: 1 }
],
titleInfo: {
titleLeft: "未来三天安全隐患风险概率预测",
// titleRight: "",
percentage: 80
},
workerFlag: true,
workerList: [item.security, item.safe, item.levelRisk, item.limitTime]
});
});
}
const resultInfo = { const resultInfo = {
index: 11, index: 11,
title: "总包单位安全隐患概率分析", title: "总包单位安全隐患概率分析",
radarType: 3 radarType: 3,
randerList: resultList
}; };
emits("openDialog", resultInfo); emits("openDialog", resultInfo);
}; };
const activeIfo = reactive({ const activeInfo = reactive({
activeIndex: 1, activeIndex: 0,
activeTitleList: [ activeTitleList: [
{ {
id: 1, id: 1,
@ -231,7 +274,9 @@ const activeIfo = reactive({
title: "特殊作业统计分析" title: "特殊作业统计分析"
}, },
{ id: 2, title: "特殊作业风险预测趋势" } { id: 2, title: "特殊作业风险预测趋势" }
] ],
rightFlag: true,
rightCount: 1
}); });
const randerInfo = reactive({ const randerInfo = reactive({
id: "radarMap3", id: "radarMap3",
@ -240,22 +285,24 @@ const randerInfo = reactive({
radius: "55%", radius: "55%",
dataList: [ dataList: [
{ {
value: [4200, 3000, 20000, 35000], value: [0, 0, 0, 0],
name: "项目安全隐患风险概率预测" name: "项目安全隐患风险概率预测"
// areaStyle: {} // areaStyle: {}
} }
], ],
indicator: [ indicator: [
{ name: "隐患未闭合", max: 6500 }, { name: "隐患未闭合", max: 1 },
{ name: "平均安全绩效评分", max: 16000 }, { name: "平均安全绩效评分", max: 1 },
{ name: "重大、较大隐患", max: 30000 }, { name: "重大、较大隐患", max: 1 },
{ name: "隐患超期整改", max: 38000 } { name: "隐患超期整改", max: 1 }
], ],
titleInfo: { titleInfo: {
titleLeft: "未来三天安全隐患风险概率预测", titleLeft: "未来三天安全隐患风险概率预测",
titleRight: "查看各企业安全隐患风险概率预测", titleRight: "查看各企业安全隐患风险概率预测",
percentage: 80 percentage: 80
} },
workerFlag: true,
workerList: [] as any[]
}); });
const randerInfo2 = reactive({ const randerInfo2 = reactive({
id: "radarMap4", id: "radarMap4",
@ -264,42 +311,103 @@ const randerInfo2 = reactive({
radius: "55%", radius: "55%",
dataList: [ dataList: [
{ {
value: [4200, 3000, 20000, 35000, 6500, 6500, 18000, 18000], value: [0, 0, 0, 0, 0, 0, 0, 0],
name: "恶劣天气影响风险概率预测" name: "恶劣天气影响风险概率预测"
// areaStyle: {} // areaStyle: {}
} }
], ],
indicator: [ indicator: [
{ name: "动火作业", max: 6500 }, { name: "动火作业", max: 1 },
{ name: "高处作业", max: 16000 }, { name: "高处作业", max: 1 },
{ name: "盲板抽堵作业", max: 30000 }, { name: "盲板抽堵作业", max: 1 },
{ name: "受限空间作业", max: 38000 }, { name: "受限空间作业", max: 1 },
{ name: "断路作业", max: 6500 }, { name: "断路作业", max: 1 },
{ name: "临时用电", max: 16000 }, { name: "临时用电", max: 1 },
{ name: "吊装安全作业", max: 30000 }, { name: "吊装安全作业", max: 1 },
{ name: "动土作业", max: 38000 } { name: "动土作业", max: 1 }
], ],
titleInfo: { titleInfo: {
titleLeft: "未来三天特殊作业风险概率预测", titleLeft: "未来三天特殊作业风险概率预测",
// titleRight: "", // titleRight: "",
percentage: 80 percentage: 80
} },
workerFlag: true,
workerList: [] as any[]
}); });
//tab //tab
const handleTab = (val: number, type: number) => { const handleTab = (val: number, type: number) => {
if (type == 1) { if (type == 1) {
activeIfo.activeIndex = val; if (activeInfo.activeIndex == 1) {
if (activeIfo.activeIndex == 0) { activeInfo.activeIndex = val;
getInspectionRiskChart(false); getInspectionRiskChart(false);
} else if (activeInfo.activeIndex == 0) {
getSafetyRiskByProject(false, 1);
} }
} else if (type == 2) { } else if (type == 2) {
activeIfo.activeIndex2 = val; if (activeInfo.activeIndex2 == 1) {
if (activeIfo.activeIndex2 == 0) { activeInfo.activeIndex2 = val;
getCountAllSpecial(false); getCountAllSpecial(false);
} else if (activeInfo.activeIndex2 == 0) {
getSpecialTrend(false, 1);
} }
} }
}; };
//
const getSafetyRiskByProject = async (showLoading: boolean, val: number) => {
const res: any = await getSafetyRiskByProjectApi(
{
projectSn: store.sn
},
showLoading
);
if (res.result) {
console.log("隐患风险预测趋势", res.result);
randerInfo.dataList[0].value = [res.result.security, res.result.safe, res.result.levelRisk, res.result.limitTime];
randerInfo.workerList = [res.result.security, res.result.safe, res.result.levelRisk, res.result.limitTime];
}
activeInfo.activeIndex = val;
};
const onRightDap = () => {
activeInfo.rightCount = activeInfo.rightCount == 1 ? 2 : 1;
getSpecialTrend(false, 1, true);
};
//
const getSpecialTrend = async (showLoading: boolean, val: number, isRight?: boolean) => {
const res: any = await getSpecialTrendApi(
{
projectSn: store.sn,
type: activeInfo.rightCount
},
showLoading
);
if (res.result) {
console.log(activeInfo.rightCount);
console.log("特殊作业风险预测趋势", res.result);
randerInfo2.dataList = [
{
name: activeInfo.rightCount == 1 ? "恶劣天气影响风险概率预测" : "隐患未消项影响风险概率预测",
value: [
res.result.specialOperationFireSafety,
res.result.highJobSafe,
res.result.blindPlatePlugSafe,
res.result.limitSpaceSafe,
res.result.openCircuitSafe,
res.result.temporaryElectricitySafe,
res.result.hoistSafetyWork,
res.result.groundSafet
]
}
];
randerInfo2.workerList = randerInfo2.dataList[0].value;
}
activeInfo.activeIndex2 = val;
if (isRight) {
activeInfo.rightFlag = !activeInfo.rightFlag;
}
};
let dateRange = ref([] as any); let dateRange = ref([] as any);
let majorDangerCount = ref(0 as any); let majorDangerCount = ref(0 as any);
@ -1680,8 +1788,13 @@ const getCountAllSpecial = async (showLoading: boolean) => {
}; };
const setIntervalFn = (showLoading: boolean) => { const setIntervalFn = (showLoading: boolean) => {
getInspectionRiskChart(showLoading); if (activeInfo.activeIndex == 0) {
getCountAllSpecial(showLoading); getInspectionRiskChart(showLoading);
}
if (activeInfo.activeIndex2 == 0) {
getCountAllSpecial(showLoading);
}
getSafeInfo(showLoading); getSafeInfo(showLoading);
qualityInfo(showLoading); qualityInfo(showLoading);
getSelectQualityStatisticsNum(showLoading); getSelectQualityStatisticsNum(showLoading);
@ -1703,6 +1816,7 @@ onMounted(async () => {
color: white; color: white;
left: 42%; left: 42%;
} }
.safetext2 { .safetext2 {
position: absolute; position: absolute;
top: 6%; top: 6%;
@ -2075,6 +2189,17 @@ onMounted(async () => {
} }
} }
.right-dap {
width: 30px;
height: 30px;
background-image: url(@/assets/images/right-dap.png);
background-repeat: no-repeat;
background-size: 100% 100%;
position: absolute;
top: 50px;
right: 25px;
cursor: pointer;
}
::v-deep .el-input__inner { ::v-deep .el-input__inner {
color: #fff; color: #fff;
} }

View File

@ -70,6 +70,30 @@ function radarMapEchart() {
return textHTML; return textHTML;
} }
} }
: props.randerInfo.workerFlag
? {
extraCssText: "white-space:pre-wrap;box-shadow: 0px 4px 4px 0px rgba(0,0,0,0.25);",
formatter: function (params: any) {
// const obj = safeList[params.dataIndex];
const textHTML = params.value
.map((item: any, index: number) => {
let htmlobj = "";
if (index == 0) {
htmlobj = "<div>" + params.name + "</div>";
}
const itemUp =
props.randerInfo.workerList[index] > 1
? props.randerInfo.workerList[index]
: props.randerInfo.workerList[index] * 100 + "%";
htmlobj = "<div>" + props.randerInfo.indicator[index].name + "" + itemUp + "</div>";
return htmlobj;
})
.join("");
console.log(11111111, textHTML);
return textHTML;
}
}
: {}; : {};
let isLegend = let isLegend =
props.randerInfo.isLegend == "right" props.randerInfo.isLegend == "right"
@ -80,6 +104,7 @@ function radarMapEchart() {
position: "inside" position: "inside"
} }
: { top: "2%" }; : { top: "2%" };
console.log(props.randerInfo.dataList);
let option = { let option = {
legend: { legend: {
...isLegend, ...isLegend,

View File

@ -2,7 +2,7 @@
<div class="political-outlook"> <div class="political-outlook">
<el-scrollbar class="scrollbar" ref="refScrollbar"> <el-scrollbar class="scrollbar" ref="refScrollbar">
<div class="radar-map_list"> <div class="radar-map_list">
<div class="map-list" v-for="item in randerInfo.randerList" :key="item.id"> <div class="map-list" v-for="item in randerDetail.randerList" :key="item.id">
<radarMapOption :randerInfo="item" /> <radarMapOption :randerInfo="item" />
</div> </div>
</div> </div>
@ -12,58 +12,59 @@
<script lang="ts" setup> <script lang="ts" setup>
import radarMapOption from "@/views/commandScreen/components/radarMapOption.vue"; import radarMapOption from "@/views/commandScreen/components/radarMapOption.vue";
import { onMounted, reactive, ref } from "vue"; import { onMounted, ref } from "vue";
// import { GlobalStore } from "@/stores"; // import { GlobalStore } from "@/stores";
// const store = GlobalStore(); // const store = GlobalStore();
const props = defineProps(["tip", "randerDetail"]); const props = defineProps(["tip", "randerDetail"]);
const randerInfo = reactive({ // const randerInfo = reactive({
randerList: [] as any[], // randerList: [] as any[],
randerTitleList: ["未来三天人员风险概率预测", "未来三天事故风险概率预测", "未来三天安全隐患风险概率预测"], // // randerTitleList: ["", "", ""],
moreScroll: true // moreScroll: true
}); // });
const refScrollbar = ref(null as any); // const refScrollbar = ref(null as any); //
onMounted(async () => { onMounted(async () => {
console.log(props.randerDetail); console.log(props.randerDetail);
for (let index = 0; index < 4; index++) { // for (let index = 0; index < 4; index++) {
randerInfo.randerList.push({ // randerInfo.randerList.push({
id: `list${index}`, // id: `list${index}`,
radius: "70%", // radius: "70%",
isLegend: "top", // isLegend: "top",
radarCenter: ["50%", "60%"], // radarCenter: ["50%", "60%"],
dataList: [ // dataList: [
{ // {
value: [4200, 3000, 20000, 35000, 50000], // value: [4200, 3000, 20000, 35000, 50000],
name: "项目事故风险概率预测" // name: ""
// areaStyle: {} // // areaStyle: {}
} // }
], // ],
indicator: [ // indicator: [
{ name: "恶劣天气占比", max: 6500 }, // { name: "", max: 6500 },
{ name: "人员风险概率", max: 16000 }, // { name: "", max: 16000 },
{ name: "特殊作业风险概率", max: 30000 }, // { name: "", max: 30000 },
{ name: "月度安全评分", max: 38000 }, // { name: "", max: 38000 },
{ name: "隐患未整改占比", max: 52000 } // { name: "", max: 52000 }
], // ],
titleInfo: { // titleInfo: {
titleLeft: randerInfo.randerTitleList[props.randerDetail.radarType - 1], // titleLeft: randerInfo.randerTitleList[props.randerDetail.radarType - 1],
// titleRight: "", // // titleRight: "",
percentage: 80 // percentage: 80
} // }
}); // });
} // }
refScrollbar.value.wrapRef.addEventListener("scroll", (e: any) => { // refScrollbar.value.wrapRef.addEventListener("scroll", (e: any) => {
const scrollTop = e.target.scrollTop; // const scrollTop = e.target.scrollTop;
const scrollHeight = e.target.scrollHeight; // const scrollHeight = e.target.scrollHeight;
const clientHeight = e.target.clientHeight; // const clientHeight = e.target.clientHeight;
// // //
if (scrollTop >= scrollHeight - clientHeight - 1) { // if (scrollTop >= scrollHeight - clientHeight - 1) {
if (randerInfo.moreScroll) { // if (randerInfo.moreScroll) {
// getMemberCountList("more"); // // getMemberCountList("more");
} // }
} // }
}); // });
}); });
</script> </script>