修改右侧

This commit is contained in:
Vce 2024-05-11 11:10:48 +08:00
parent 2f5c27657a
commit 1e0d3bfa3a
5 changed files with 1332 additions and 15 deletions

View File

@ -51,3 +51,13 @@ export const getStageOption = (params: {}) => {
export const getParentChildTaskListApi = (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>
</div>
<div class="right">
<rightAll class="rightAll"></rightAll>
<rightAll class="rightAll" @openDialog="openPeopleCountDialog"></rightAll>
</div>
<dataDialog ref="partyBuildRef"></dataDialog>
</div>

View File

@ -61,12 +61,14 @@ import Card from "@/components/card.vue";
import { onMounted, ref } from "vue";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
import { getProjectInspectRecordCountApi } from "@/api/modules/projectOverview";
import { getProjectInspectRecordCountApi, getSelectQualityStatisticsNumApi, getCountDangerLevelApi } from "@/api/modules/projectOverview";
import { selectQualityStatisticsApi } from "@/api/modules/projectOverview";
import * as echarts from "echarts";
const echartsTest = ref();
let questionTotal = ref(0 as any);
const emits = defineEmits(["openDialog"])
let dateRange = ref([] as any);
let majorDangerCount = ref(20 as any);
@ -150,6 +152,7 @@ function Pie() {
function drawEchart() {
echartsTest.value = echarts.init(document.getElementById("echartsSafe"));
let option = {
animation: false, //
tooltip: {
trigger: "item"
},
@ -366,24 +369,47 @@ function drawEchart() {
})
console.log(echartsTest.value);
// let chart = echarts.init(document.getElementById('main'), null)
// //
// echartsTest.value.on('legendselectchanged', params => {
// console.log(echartsTest);
//
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 res: any = await getProjectInspectRecordCountApi({ projectSn: store.sn });
// const res: any = await getProjectInspectRecordCountApi({ projectSn: store.sn });
// console.log("", res);
// safeData.value = res.result;
dataList.value[0].value = res.result.rectificationNum;
dataList.value[1].value = res.result.totalNum - res.result.rectificationNum;
questionTotal.value = res.result.totalNum;
// dataList.value[0].value = res.result.rectificationNum;
// dataList.value[1].value = res.result.totalNum - res.result.rectificationNum;
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();
};
let dataList2 = ref([
{
value: 30,
@ -632,16 +658,44 @@ function drawEchart2() {
}
const qualityInfo = async () => {
const res: any = await selectQualityStatisticsApi({ projectSn: store.sn });
dataList2.value[0].value = res.result.total.rectificationNum;
dataList2.value[1].value = res.result.total.totalNum - res.result.total.rectificationNum;
questionTotal.value = res.result.total.totalNum;
// const res: any = await selectQualityStatisticsApi({ projectSn: store.sn });
// dataList2.value[0].value = res.result.total.rectificationNum;
// dataList2.value[1].value = res.result.total.totalNum - res.result.total.rectificationNum;
// 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();
};
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 () => {
await getSafeInfo();
await qualityInfo();
await getSelectQualityStatisticsNum();
});
</script>

View File

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

File diff suppressed because it is too large Load Diff