flx:提交指挥部大屏风险开发
This commit is contained in:
parent
25dc5c976d
commit
d430f578c4
@ -146,3 +146,33 @@ export const configWeekVideoSaveApi = (params: {}, showLoading: boolean) => {
|
||||
export const configWeekVideoListApi = (params: {}, showLoading: boolean) => {
|
||||
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 } });
|
||||
};
|
||||
|
||||
@ -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 = "as"; //鞍山项目
|
||||
// export const COMPANY: string = "agjt"; //鞍钢集团
|
||||
export const COMPANY: string = "agjtLive"; //鞍钢集团现场大屏
|
||||
// export const COMPANY: string = "agjtCommand"; //鞍钢集团指挥部大屏
|
||||
// export const COMPANY: string = "agjtLive"; //鞍钢集团现场大屏
|
||||
export const COMPANY: string = "agjtCommand"; //鞍钢集团指挥部大屏
|
||||
// export const COMPANY: string = "agjtProjectKanban"; //鞍钢集团项目看板大屏
|
||||
// export const COMPANY: string = "agjtOverviewScreen"; //鞍钢集团项目总览
|
||||
// export const COMPANY: string = "cqna"; //重庆市南岸区
|
||||
|
||||
@ -25,8 +25,8 @@ export const staticRouter: RouteRecordRaw[] = [
|
||||
path: "/large",
|
||||
name: "大屏",
|
||||
// component: () => import("@/views/sevenLargeScreen/indexL.vue"), //七参数标准版
|
||||
// component: () => import("@/views/commandScreen/indexCommand.vue"), //指挥部大屏
|
||||
component: () => import("@/views/agjtLiveScreen/indexLive.vue"), //鞍钢现场大屏
|
||||
component: () => import("@/views/commandScreen/indexCommand.vue"), //指挥部大屏
|
||||
// component: () => import("@/views/agjtLiveScreen/indexLive.vue"), //鞍钢现场大屏
|
||||
// component: () => import("@/views/overviewScreen/indexCommand.vue"), //总览大屏
|
||||
// component: () => import("@/views/agjtProjectKanban/indexL.vue"), //鞍钢集团项目看板大屏
|
||||
// component: () => import("@/views/sevenLargeScreen/indexL_syhy.vue"), // 只有一级路由(盘锦、嘉兴、鄱湖美湾医疗项目需切换至该首页)
|
||||
|
||||
@ -160,6 +160,7 @@ import { getNoticeListApi } from "@/api/modules/projectOverview";
|
||||
import { Vue3SeamlessScroll } from "vue3-seamless-scroll";
|
||||
// import Card from "@/components/card.vue";
|
||||
import { ref, onMounted, reactive } from "vue";
|
||||
import { getRiskTrendByProjectApi, getRiskTrendByMainEnterpriseApi } from "@/api/modules/agjtCommandApi";
|
||||
import { getCountEmergencyTypedApi, getCountAlarmNumByEnterpriseApi } from "@/api/modules/projectOverview";
|
||||
import * as echarts from "echarts";
|
||||
import { GlobalStore } from "@/stores";
|
||||
@ -183,44 +184,123 @@ const randerInfo = reactive({
|
||||
radius: "63%",
|
||||
dataList: [
|
||||
{
|
||||
value: [4200, 3000, 20000, 35000, 50000],
|
||||
value: [0, 0, 0, 0, 0],
|
||||
name: "项目事故风险概率预测"
|
||||
// areaStyle: {}
|
||||
}
|
||||
],
|
||||
indicator: [
|
||||
{ name: "恶劣天气占比", max: 6500 },
|
||||
{ name: "人员风险概率", max: 16000 },
|
||||
{ name: "特殊作业风险概率", max: 30000 },
|
||||
{ name: "月度安全评分", max: 38000 },
|
||||
{ name: "隐患未整改占比", max: 52000 }
|
||||
{ name: "恶劣天气占比", max: 1 },
|
||||
{ name: "人员风险概率", max: 1 },
|
||||
{ name: "特殊作业风险概率", max: 1 },
|
||||
{ name: "月度安全评分", max: 1 },
|
||||
{ name: "隐患未整改占比", max: 1 }
|
||||
],
|
||||
titleInfo: {
|
||||
titleLeft: "未来三天事故风险概率预测",
|
||||
titleRight: "查看各企业应急事故风险概率预测",
|
||||
percentage: 80
|
||||
}
|
||||
},
|
||||
workerFlag: true,
|
||||
workerList: [] as any[]
|
||||
});
|
||||
//切换tab
|
||||
const handleTab = (val: number) => {
|
||||
activeIfo.activeIndex = val;
|
||||
if (activeIfo.activeIndex == 0) {
|
||||
if (activeIfo.activeIndex == 1) {
|
||||
activeIfo.activeIndex = val;
|
||||
getCountAlarmNumByEnterprise(false);
|
||||
} else if (activeIfo.activeIndex == 0) {
|
||||
getRiskTrendByProject(false, 1);
|
||||
}
|
||||
};
|
||||
const emits = defineEmits(["openDialog"]);
|
||||
|
||||
// 打开弹窗
|
||||
const openDialogData = () => {
|
||||
const openDialogData = async () => {
|
||||
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 = {
|
||||
index: 11,
|
||||
title: "总包单位应急事故概率分析",
|
||||
radarType: 2
|
||||
radarType: 2,
|
||||
randerList: resultList
|
||||
};
|
||||
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 res: any = await getNoticeListApi({ projectSn: store.sn, type: 10, pageNo: 1, pageSize: 99999, });
|
||||
// const res: any = await getNoticeListApi({ isBigScreen: 1, type: 32 }); // 公告
|
||||
@ -763,7 +843,9 @@ const getCountAlarmNumByEnterprise = async (showLoading: boolean) => {
|
||||
};
|
||||
const setIntervalFn = (showLoading: boolean) => {
|
||||
getNoticeList(showLoading);
|
||||
getCountAlarmNumByEnterprise(showLoading);
|
||||
if (activeIfo.activeIndex == 1) {
|
||||
getCountAlarmNumByEnterprise(showLoading);
|
||||
}
|
||||
getMessCountEchartType(showLoading);
|
||||
};
|
||||
onMounted(async () => {
|
||||
|
||||
@ -151,7 +151,9 @@ import {
|
||||
getPersonTypeAndEduStatisticsApi,
|
||||
queryAttendanceOfEachCompanyApi,
|
||||
getCountTaskProgressApi,
|
||||
queryCountEnterpriseApi
|
||||
queryCountEnterpriseApi,
|
||||
getWorkerRiskByProjectApi,
|
||||
getWorkerRiskByEnterpriseApi
|
||||
} from "@/api/modules/agjtCommandApi";
|
||||
import type { TabsPaneContext, ElMessageBox } from "element-plus";
|
||||
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
|
||||
@ -167,34 +169,78 @@ const randerInfo = reactive({
|
||||
radius: "65%",
|
||||
dataList: [
|
||||
{
|
||||
value: [4200, 3000, 20000, 35000, 50000, 18000],
|
||||
value: [0, 0, 0, 0, 0, 0],
|
||||
name: "项目人员风险"
|
||||
// areaStyle: {}
|
||||
}
|
||||
],
|
||||
indicator: [
|
||||
{ name: "高龄人员总数", max: 6500 },
|
||||
{ name: "人员总数", max: 16000 },
|
||||
{ name: "未闭合隐患", max: 30000 },
|
||||
{ name: "特殊工种人员", max: 38000 },
|
||||
{ name: "平均安全绩效评分", max: 52000 },
|
||||
{ name: "平均培训通过率", max: 25000 }
|
||||
{ name: "高龄人员总数", max: 1 },
|
||||
{ name: "人员总数", max: 1 },
|
||||
{ name: "未闭合隐患", max: 1 },
|
||||
{ name: "特殊工种人员", max: 1 },
|
||||
{ name: "平均安全绩效评分", max: 1 },
|
||||
{ name: "平均培训通过率", max: 1 }
|
||||
],
|
||||
titleInfo: {
|
||||
titleLeft: "未来三天人员风险概率预测",
|
||||
titleRight: "查看各企业人员风险概率预测",
|
||||
percentage: 1
|
||||
}
|
||||
},
|
||||
workerFlag: true,
|
||||
workerList: [] as any[]
|
||||
});
|
||||
const emits = defineEmits(["openDialog"]);
|
||||
|
||||
// 打开弹窗
|
||||
const openDialogData = () => {
|
||||
const openDialogData = async () => {
|
||||
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 = {
|
||||
index: 11,
|
||||
title: "总包单位人员风险概率分析",
|
||||
radarType: 1
|
||||
radarType: 1,
|
||||
randerList: resultList
|
||||
};
|
||||
emits("openDialog", resultInfo);
|
||||
};
|
||||
@ -253,18 +299,20 @@ const queryAttendanceOfEachCompany = async (showLoading: boolean) => {
|
||||
|
||||
//切换tab
|
||||
const handleTab = (val: number) => {
|
||||
activeIndex.value = val;
|
||||
if (isFlag.value && activeIndex.value == 0) {
|
||||
if (isFlag.value && activeIndex.value == 1) {
|
||||
activeIndex.value = val;
|
||||
queryAttendanceOfEachCompany(false);
|
||||
} else if (activeIndex.value == 0) {
|
||||
getWorkerRiskByProject(false, 1);
|
||||
}
|
||||
};
|
||||
|
||||
//绘画柱状图
|
||||
function drawBar() {
|
||||
type EChartsOption = echarts.EChartsOption;
|
||||
var chartDom = document.getElementById("bar")!;
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option: EChartsOption;
|
||||
let chartDom = document.getElementById("bar")!;
|
||||
let myChart = echarts.init(chartDom);
|
||||
let option: EChartsOption;
|
||||
|
||||
option = {
|
||||
xAxis: {
|
||||
@ -446,10 +494,42 @@ const queryCountEnterprise = async (showLoading: boolean) => {
|
||||
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) => {
|
||||
// drawBar()
|
||||
getPersonTypeAndEduStatistics(showLoading);
|
||||
queryAttendanceOfEachCompany(showLoading);
|
||||
if (activeIndex.value == 0) {
|
||||
queryAttendanceOfEachCompany(showLoading);
|
||||
}
|
||||
getCountTaskProgress(showLoading);
|
||||
queryCountEnterprise(showLoading);
|
||||
};
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
<p>暂无数据</p>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div> -->
|
||||
<div class="contentTop contentMiddle" style="height: 27%; margin-top: 10px">
|
||||
<leftBottom @openDialogData="openDialogData"></leftBottom>
|
||||
</div>
|
||||
@ -64,8 +64,8 @@
|
||||
<div class="cubeIcon"></div>
|
||||
<div class="cLeft title-tabs">
|
||||
<div
|
||||
:class="{ 'title-color': activeIfo.activeIndex == index }"
|
||||
v-for="(item, index) in activeIfo.activeTitleList"
|
||||
:class="{ 'title-color': activeInfo.activeIndex == index }"
|
||||
v-for="(item, index) in activeInfo.activeTitleList"
|
||||
:key="item.id"
|
||||
@click="handleTab(index, 1)"
|
||||
>
|
||||
@ -75,14 +75,14 @@
|
||||
</div>
|
||||
<div class="cbHeaderLine"></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 class="notoDta" v-if="riskList.length == 0">
|
||||
<img src="@/assets/images/noData.png" alt="" />
|
||||
<p>暂无数据</p>
|
||||
</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" />
|
||||
</div>
|
||||
</div>
|
||||
@ -92,8 +92,8 @@
|
||||
<div class="cubeIcon"></div>
|
||||
<div class="cLeft title-tabs">
|
||||
<div
|
||||
:class="{ 'title-color': activeIfo.activeIndex2 == index }"
|
||||
v-for="(item, index) in activeIfo.activeTitleList2"
|
||||
:class="{ 'title-color': activeInfo.activeIndex2 == index }"
|
||||
v-for="(item, index) in activeInfo.activeTitleList2"
|
||||
:key="item.id"
|
||||
@click="handleTab(index, 2)"
|
||||
>
|
||||
@ -103,15 +103,17 @@
|
||||
</div>
|
||||
<div class="cbHeaderLine"></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 class="notoDta" v-if="specialList.length == 0">
|
||||
<img src="@/assets/images/noData.png" alt="" />
|
||||
<p>暂无数据</p>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="activeIfo.activeIndex2 == 1" class="ctContent" style="height: 73%">
|
||||
<radarMapOption :randerInfo="randerInfo2" />
|
||||
<div v-else-if="activeInfo.activeIndex2 == 1" class="ctContent" style="height: 73%">
|
||||
<div class="right-dap" @click="onRightDap()"></div>
|
||||
<radarMapOption v-if="activeInfo.rightFlag" :randerInfo="randerInfo2" />
|
||||
<radarMapOption v-else :randerInfo="randerInfo2" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="contentBottom">
|
||||
@ -174,7 +176,7 @@
|
||||
</vue3-seamless-scroll>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -186,6 +188,7 @@ import radarMapOption from "@/views/commandScreen/components/radarMapOption.vue"
|
||||
import { onMounted, ref, watch, reactive } from "vue";
|
||||
import { GlobalStore } from "@/stores";
|
||||
import leftBottom from "@/views/commandScreen/components/leftBottom.vue";
|
||||
import { getSafetyRiskByProjectApi, getSafetyRiskByEnterpriseApi, getSpecialTrendApi } from "@/api/modules/agjtCommandApi";
|
||||
import {
|
||||
// getProjectInspectRecordCountApi,
|
||||
// selectQualityStatisticsApi
|
||||
@ -205,18 +208,58 @@ let questionTotal = ref(0 as any);
|
||||
const emits = defineEmits(["openDialog"]);
|
||||
|
||||
// 打开弹窗
|
||||
const openDialogData = () => {
|
||||
const openDialogData = async () => {
|
||||
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 = {
|
||||
index: 11,
|
||||
title: "总包单位安全隐患概率分析",
|
||||
radarType: 3
|
||||
radarType: 3,
|
||||
randerList: resultList
|
||||
};
|
||||
emits("openDialog", resultInfo);
|
||||
};
|
||||
|
||||
const activeIfo = reactive({
|
||||
activeIndex: 1,
|
||||
const activeInfo = reactive({
|
||||
activeIndex: 0,
|
||||
activeTitleList: [
|
||||
{
|
||||
id: 1,
|
||||
@ -231,7 +274,9 @@ const activeIfo = reactive({
|
||||
title: "特殊作业统计分析"
|
||||
},
|
||||
{ id: 2, title: "特殊作业风险预测趋势" }
|
||||
]
|
||||
],
|
||||
rightFlag: true,
|
||||
rightCount: 1
|
||||
});
|
||||
const randerInfo = reactive({
|
||||
id: "radarMap3",
|
||||
@ -240,22 +285,24 @@ const randerInfo = reactive({
|
||||
radius: "55%",
|
||||
dataList: [
|
||||
{
|
||||
value: [4200, 3000, 20000, 35000],
|
||||
value: [0, 0, 0, 0],
|
||||
name: "项目安全隐患风险概率预测"
|
||||
// areaStyle: {}
|
||||
}
|
||||
],
|
||||
indicator: [
|
||||
{ name: "隐患未闭合", max: 6500 },
|
||||
{ name: "平均安全绩效评分", max: 16000 },
|
||||
{ name: "重大、较大隐患", max: 30000 },
|
||||
{ name: "隐患超期整改", max: 38000 }
|
||||
{ name: "隐患未闭合", max: 1 },
|
||||
{ name: "平均安全绩效评分", max: 1 },
|
||||
{ name: "重大、较大隐患", max: 1 },
|
||||
{ name: "隐患超期整改", max: 1 }
|
||||
],
|
||||
titleInfo: {
|
||||
titleLeft: "未来三天安全隐患风险概率预测",
|
||||
titleRight: "查看各企业安全隐患风险概率预测",
|
||||
percentage: 80
|
||||
}
|
||||
},
|
||||
workerFlag: true,
|
||||
workerList: [] as any[]
|
||||
});
|
||||
const randerInfo2 = reactive({
|
||||
id: "radarMap4",
|
||||
@ -264,42 +311,103 @@ const randerInfo2 = reactive({
|
||||
radius: "55%",
|
||||
dataList: [
|
||||
{
|
||||
value: [4200, 3000, 20000, 35000, 6500, 6500, 18000, 18000],
|
||||
value: [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
name: "恶劣天气影响风险概率预测"
|
||||
// areaStyle: {}
|
||||
}
|
||||
],
|
||||
indicator: [
|
||||
{ name: "动火作业", max: 6500 },
|
||||
{ name: "高处作业", max: 16000 },
|
||||
{ name: "盲板抽堵作业", max: 30000 },
|
||||
{ name: "受限空间作业", max: 38000 },
|
||||
{ name: "断路作业", max: 6500 },
|
||||
{ name: "临时用电", max: 16000 },
|
||||
{ name: "吊装安全作业", max: 30000 },
|
||||
{ name: "动土作业", max: 38000 }
|
||||
{ name: "动火作业", max: 1 },
|
||||
{ name: "高处作业", max: 1 },
|
||||
{ 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: [] as any[]
|
||||
});
|
||||
//切换tab
|
||||
const handleTab = (val: number, type: number) => {
|
||||
if (type == 1) {
|
||||
activeIfo.activeIndex = val;
|
||||
if (activeIfo.activeIndex == 0) {
|
||||
if (activeInfo.activeIndex == 1) {
|
||||
activeInfo.activeIndex = val;
|
||||
getInspectionRiskChart(false);
|
||||
} else if (activeInfo.activeIndex == 0) {
|
||||
getSafetyRiskByProject(false, 1);
|
||||
}
|
||||
} else if (type == 2) {
|
||||
activeIfo.activeIndex2 = val;
|
||||
if (activeIfo.activeIndex2 == 0) {
|
||||
if (activeInfo.activeIndex2 == 1) {
|
||||
activeInfo.activeIndex2 = val;
|
||||
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 majorDangerCount = ref(0 as any);
|
||||
@ -1680,8 +1788,13 @@ const getCountAllSpecial = async (showLoading: boolean) => {
|
||||
};
|
||||
|
||||
const setIntervalFn = (showLoading: boolean) => {
|
||||
getInspectionRiskChart(showLoading);
|
||||
getCountAllSpecial(showLoading);
|
||||
if (activeInfo.activeIndex == 0) {
|
||||
getInspectionRiskChart(showLoading);
|
||||
}
|
||||
if (activeInfo.activeIndex2 == 0) {
|
||||
getCountAllSpecial(showLoading);
|
||||
}
|
||||
|
||||
getSafeInfo(showLoading);
|
||||
qualityInfo(showLoading);
|
||||
getSelectQualityStatisticsNum(showLoading);
|
||||
@ -1703,6 +1816,7 @@ onMounted(async () => {
|
||||
color: white;
|
||||
left: 42%;
|
||||
}
|
||||
|
||||
.safetext2 {
|
||||
position: absolute;
|
||||
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 {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@ -70,6 +70,30 @@ function radarMapEchart() {
|
||||
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 =
|
||||
props.randerInfo.isLegend == "right"
|
||||
@ -80,6 +104,7 @@ function radarMapEchart() {
|
||||
position: "inside"
|
||||
}
|
||||
: { top: "2%" };
|
||||
console.log(props.randerInfo.dataList);
|
||||
let option = {
|
||||
legend: {
|
||||
...isLegend,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="political-outlook">
|
||||
<el-scrollbar class="scrollbar" ref="refScrollbar">
|
||||
<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" />
|
||||
</div>
|
||||
</div>
|
||||
@ -12,58 +12,59 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import radarMapOption from "@/views/commandScreen/components/radarMapOption.vue";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { onMounted, ref } from "vue";
|
||||
// import { GlobalStore } from "@/stores";
|
||||
// const store = GlobalStore();
|
||||
const props = defineProps(["tip", "randerDetail"]);
|
||||
|
||||
const randerInfo = reactive({
|
||||
randerList: [] as any[],
|
||||
randerTitleList: ["未来三天人员风险概率预测", "未来三天事故风险概率预测", "未来三天安全隐患风险概率预测"],
|
||||
moreScroll: true
|
||||
});
|
||||
// const randerInfo = reactive({
|
||||
// randerList: [] as any[],
|
||||
// // randerTitleList: ["未来三天人员风险概率预测", "未来三天事故风险概率预测", "未来三天安全隐患风险概率预测"],
|
||||
// moreScroll: true
|
||||
// });
|
||||
const refScrollbar = ref(null as any); // 绑定到滚动的盒子上
|
||||
|
||||
onMounted(async () => {
|
||||
console.log(props.randerDetail);
|
||||
for (let index = 0; index < 4; index++) {
|
||||
randerInfo.randerList.push({
|
||||
id: `list${index}`,
|
||||
radius: "70%",
|
||||
isLegend: "top",
|
||||
radarCenter: ["50%", "60%"],
|
||||
dataList: [
|
||||
{
|
||||
value: [4200, 3000, 20000, 35000, 50000],
|
||||
name: "项目事故风险概率预测"
|
||||
// areaStyle: {}
|
||||
}
|
||||
],
|
||||
indicator: [
|
||||
{ name: "恶劣天气占比", max: 6500 },
|
||||
{ name: "人员风险概率", max: 16000 },
|
||||
{ name: "特殊作业风险概率", max: 30000 },
|
||||
{ name: "月度安全评分", max: 38000 },
|
||||
{ name: "隐患未整改占比", max: 52000 }
|
||||
],
|
||||
titleInfo: {
|
||||
titleLeft: randerInfo.randerTitleList[props.randerDetail.radarType - 1],
|
||||
// titleRight: "查看各企业应急事故风险概率预测",
|
||||
percentage: 80
|
||||
}
|
||||
});
|
||||
}
|
||||
// for (let index = 0; index < 4; index++) {
|
||||
// randerInfo.randerList.push({
|
||||
// id: `list${index}`,
|
||||
// radius: "70%",
|
||||
// isLegend: "top",
|
||||
// radarCenter: ["50%", "60%"],
|
||||
// dataList: [
|
||||
// {
|
||||
// value: [4200, 3000, 20000, 35000, 50000],
|
||||
// name: "项目事故风险概率预测"
|
||||
// // areaStyle: {}
|
||||
// }
|
||||
// ],
|
||||
// indicator: [
|
||||
// { name: "恶劣天气占比", max: 6500 },
|
||||
// { name: "人员风险概率", max: 16000 },
|
||||
// { name: "特殊作业风险概率", max: 30000 },
|
||||
// { name: "月度安全评分", max: 38000 },
|
||||
// { name: "隐患未整改占比", max: 52000 }
|
||||
// ],
|
||||
// titleInfo: {
|
||||
// titleLeft: randerInfo.randerTitleList[props.randerDetail.radarType - 1],
|
||||
// // titleRight: "查看各企业应急事故风险概率预测",
|
||||
// percentage: 80
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
refScrollbar.value.wrapRef.addEventListener("scroll", (e: any) => {
|
||||
const scrollTop = e.target.scrollTop;
|
||||
const scrollHeight = e.target.scrollHeight;
|
||||
const clientHeight = e.target.clientHeight;
|
||||
// 向上加载更多
|
||||
if (scrollTop >= scrollHeight - clientHeight - 1) {
|
||||
if (randerInfo.moreScroll) {
|
||||
// getMemberCountList("more");
|
||||
}
|
||||
}
|
||||
});
|
||||
// refScrollbar.value.wrapRef.addEventListener("scroll", (e: any) => {
|
||||
// const scrollTop = e.target.scrollTop;
|
||||
// const scrollHeight = e.target.scrollHeight;
|
||||
// const clientHeight = e.target.clientHeight;
|
||||
// // 向上加载更多
|
||||
// if (scrollTop >= scrollHeight - clientHeight - 1) {
|
||||
// if (randerInfo.moreScroll) {
|
||||
// // getMemberCountList("more");
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user