diff --git a/src/api/modules/projectOverview.ts b/src/api/modules/projectOverview.ts
index f142953..9a4a0f5 100644
--- a/src/api/modules/projectOverview.ts
+++ b/src/api/modules/projectOverview.ts
@@ -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);
+};
diff --git a/src/views/commandScreen/commandCenter/index.vue b/src/views/commandScreen/commandCenter/index.vue
index 2b9fbb3..58f43cf 100644
--- a/src/views/commandScreen/commandCenter/index.vue
+++ b/src/views/commandScreen/commandCenter/index.vue
@@ -9,7 +9,7 @@
-
+
diff --git a/src/views/commandScreen/commandCenter/rightAll.vue b/src/views/commandScreen/commandCenter/rightAll.vue
index cce56b1..233a186 100644
--- a/src/views/commandScreen/commandCenter/rightAll.vue
+++ b/src/views/commandScreen/commandCenter/rightAll.vue
@@ -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();
});
diff --git a/src/views/commandScreen/dialogCompnnents/data-dialog.vue b/src/views/commandScreen/dialogCompnnents/data-dialog.vue
index a7835ae..d2cf7db 100644
--- a/src/views/commandScreen/dialogCompnnents/data-dialog.vue
+++ b/src/views/commandScreen/dialogCompnnents/data-dialog.vue
@@ -28,6 +28,9 @@
+
+
+
@@ -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);
diff --git a/src/views/commandScreen/dialogCompnnents/major-hidder.vue b/src/views/commandScreen/dialogCompnnents/major-hidder.vue
new file mode 100644
index 0000000..4ca0aa3
--- /dev/null
+++ b/src/views/commandScreen/dialogCompnnents/major-hidder.vue
@@ -0,0 +1,1248 @@
+
+
+
+
+
+
序号
+
状态
+
隐患级别
+
隐患描述及要求
+
整改时限
+
检查人
+
检查时间
+
整改人
+
分包单位
+
操作
+
+
+
+
{{ index + 1 }}
+
{{ item.workerName }}
+
+
+
+
+
+
{{ item.phoneNumber }}
+
{{ item.personType == 1 ? item.teamName : item.personType == 2 ? item.departmentName : "" }}
+
+
{{ item.phoneNumber }}
+
+
+
+
+
+
+
+
+
+
+