fix: 冲突解决以及BUG修改

This commit is contained in:
kun 2024-05-11 11:17:19 +08:00
commit 41d148a0d3
6 changed files with 1337 additions and 12 deletions

View File

@ -51,3 +51,13 @@ export const getStageOption = (params: {}) => {
export const getParentChildTaskListApi = (params: {}) => { export const getParentChildTaskListApi = (params: {}) => {
return http.post(BASEURL + `/xmgl/taskProgress/getParentChildList`, params); return http.post(BASEURL + `/xmgl/taskProgress/getParentChildList`, params);
}; };
// 隐患统计智能分析
export const getSelectQualityStatisticsNumApi = (params: {}) => {
return http.post(BASEURL + `/xmgl/xzSecurityQualityInspectionRecord/selectQualityStatisticsNum`, params);
};
export const getCountDangerLevelApi = (params: {}) => {
return http.post(BASEURL + `/xmgl/xzSecurityQualityInspectionRecord/countDangerLevel`, params);
};

View File

@ -9,7 +9,7 @@
<centerBottom class="centerBottom"></centerBottom> <centerBottom class="centerBottom"></centerBottom>
</div> </div>
<div class="right"> <div class="right">
<rightAll class="rightAll"></rightAll> <rightAll class="rightAll" @openDialog="openPeopleCountDialog"></rightAll>
</div> </div>
<dataDialog ref="partyBuildRef"></dataDialog> <dataDialog ref="partyBuildRef"></dataDialog>
</div> </div>

View File

@ -11,7 +11,7 @@
<div class="centerBottom"> <div class="centerBottom">
<div class="leftTop"> <div class="leftTop">
<div class="header"> <div class="header">
<div class="hLeft" @click="openDialogData({index: 7, title: '人员履职情况分析(整改人)'})">人员履职情况分析</div> <div class="hLeft" @click="openDialogData({index: 8, title: '人员履职情况分析(整改人)'})">人员履职情况分析</div>
<div class="hRight"> <div class="hRight">
<el-date-picker <el-date-picker
style="width: 85%" style="width: 85%"

View File

@ -61,12 +61,14 @@ import Card from "@/components/card.vue";
import { onMounted, ref } from "vue"; import { onMounted, ref } from "vue";
import { GlobalStore } from "@/stores"; import { GlobalStore } from "@/stores";
const store = GlobalStore(); const store = GlobalStore();
import { getProjectInspectRecordCountApi } from "@/api/modules/projectOverview"; import { getProjectInspectRecordCountApi, getSelectQualityStatisticsNumApi, getCountDangerLevelApi } from "@/api/modules/projectOverview";
import { selectQualityStatisticsApi } from "@/api/modules/projectOverview"; import { selectQualityStatisticsApi } from "@/api/modules/projectOverview";
import * as echarts from "echarts"; import * as echarts from "echarts";
const echartsTest = ref(); const echartsTest = ref();
let questionTotal = ref(0 as any); let questionTotal = ref(0 as any);
const emits = defineEmits(["openDialog"])
let dateRange = ref([] as any); let dateRange = ref([] as any);
let majorDangerCount = ref(20 as any); let majorDangerCount = ref(20 as any);
@ -150,6 +152,7 @@ function Pie() {
function drawEchart() { function drawEchart() {
echartsTest.value = echarts.init(document.getElementById("echartsSafe")); echartsTest.value = echarts.init(document.getElementById("echartsSafe"));
let option = { let option = {
animation: false, //
tooltip: { tooltip: {
trigger: "item" trigger: "item"
}, },
@ -174,7 +177,7 @@ function drawEchart() {
} }
}, },
legend: { legend: {
selectedMode: false, // selectedMode: true, //
icon: "rect", icon: "rect",
type: "plain", type: "plain",
orient: "vertical", orient: "vertical",
@ -364,18 +367,49 @@ function drawEchart() {
console.log(echartsTest) console.log(echartsTest)
echartsTest.value.resize(); echartsTest.value.resize();
}) })
console.log(echartsTest.value);
//
echartsTest.value.on('legendselectchanged', (params:any) => {
console.log(emits);
echartsTest.value.setOption({
legend:{selected:{[params.name]: true}}
})
emits("openDialog",{
index:7,
title:params.name,
})
})
} }
const getSafeInfo = async () => { const getSafeInfo = async () => {
const res: any = await getProjectInspectRecordCountApi({ projectSn: store.sn }); // const res: any = await getProjectInspectRecordCountApi({ projectSn: store.sn });
// console.log("", res); // console.log("", res);
// safeData.value = res.result; // safeData.value = res.result;
dataList.value[0].value = res.result.rectificationNum; // dataList.value[0].value = res.result.rectificationNum;
dataList.value[1].value = res.result.totalNum - res.result.rectificationNum; // dataList.value[1].value = res.result.totalNum - res.result.rectificationNum;
questionTotal.value = res.result.totalNum;
const res: any = await getCountDangerLevelApi({ projectSn: store.sn,isOverdueRectification:true, });
dataList.value = res.result.data.map((item:any,index:number) => {
return {
...item,
value: item.count,
show: true,
itemStyle: {
normal: {
color: index == 0 ? "#EC6266" : '#6375C7',
borderWidth: 20
}
}
};
});
questionTotal.value = res.result.count;
drawEchart(); drawEchart();
}; };
let dataList2 = ref([ let dataList2 = ref([
{ {
value: 30, value: 30,
@ -624,16 +658,44 @@ function drawEchart2() {
} }
const qualityInfo = async () => { const qualityInfo = async () => {
const res: any = await selectQualityStatisticsApi({ projectSn: store.sn }); // const res: any = await selectQualityStatisticsApi({ projectSn: store.sn });
dataList2.value[0].value = res.result.total.rectificationNum; // dataList2.value[0].value = res.result.total.rectificationNum;
dataList2.value[1].value = res.result.total.totalNum - res.result.total.rectificationNum; // dataList2.value[1].value = res.result.total.totalNum - res.result.total.rectificationNum;
questionTotal.value = res.result.total.totalNum; // questionTotal.value = res.result.total.totalNum;
const res: any = await getCountDangerLevelApi({ projectSn: store.sn,isNotQualified:true, });
dataList2.value = res.result.data.map((item:any,index:number) => {
return {
...item,
value: item.count,
show: true,
itemStyle: {
normal: {
color: index == 0 ? "#038cf5" : '#01d6f4',
borderWidth: 20
}
}
};
});
questionTotal.value = res.result.count;
drawEchart2(); drawEchart2();
}; };
const getSelectQualityStatisticsNum= async () => {
const res: any = await getSelectQualityStatisticsNumApi({ projectSn: store.sn, });
console.log(res);
overdueMajorDangerCount.value = res.result.overdueRectificationNum;
overdueMajorDangerRate.value = res.result.overdueRectificationNumRatio;
majorDangerCount.value = res.result.notCloseNum;
// majorDangerRate.value = res.result.overdueRectificationNumRatio;
}
onMounted(async () => { onMounted(async () => {
await getSafeInfo(); await getSafeInfo();
await qualityInfo(); await qualityInfo();
await getSelectQualityStatisticsNum();
}); });
</script> </script>

View File

@ -29,6 +29,9 @@
<aiAlarm ref="historyAlarmList" tip="安全教育"></aiAlarm> <aiAlarm ref="historyAlarmList" tip="安全教育"></aiAlarm>
</div> </div>
<div class="political-outlook" v-if="showIndex == 7"> <div class="political-outlook" v-if="showIndex == 7">
<majorHidder ref="historyAlarmList" tip="重大隐患未销项目"></majorHidder>
</div>
<div class="political-outlook" v-if="showIndex == 8">
<safeEducationDialog ref="historyAlarmList" tip="安全教育"></safeEducationDialog> <safeEducationDialog ref="historyAlarmList" tip="安全教育"></safeEducationDialog>
</div> </div>
</div> </div>
@ -44,6 +47,8 @@ import riskCount from "./risk-count.vue";
import safeHidden from "./safe-hidden.vue"; import safeHidden from "./safe-hidden.vue";
import aiAlarm from "./ai-alarm.vue"; import aiAlarm from "./ai-alarm.vue";
import safeEducationDialog from "./safe-education-dialog.vue"; import safeEducationDialog from "./safe-education-dialog.vue";
import majorHidder from "./major-hidder.vue";
import { GlobalStore } from "@/stores"; import { GlobalStore } from "@/stores";
let showDialog = ref(false as any); let showDialog = ref(false as any);
const showIndex = ref(0); const showIndex = ref(0);

File diff suppressed because it is too large Load Diff