Merge branch 'shenzhen-dev' of http://139.9.66.234:18023/yjlHub/zhgdlarge into bjxz-rain
This commit is contained in:
commit
7138d5d032
@ -32,6 +32,7 @@ type Props = {
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
statisticsCount: {}
|
||||
});
|
||||
const typeData = ref("");
|
||||
const showOne = ref(true);
|
||||
let dataList = ref([
|
||||
{
|
||||
@ -162,7 +163,8 @@ const drawOneEchart = () => {
|
||||
// 为饼图添加点击事件
|
||||
echartsOne.on("click", function (params:any) {
|
||||
// 控制台输出点击的数据的信息
|
||||
console.log(params);
|
||||
console.log(params,666);
|
||||
typeData.value = params.data;
|
||||
showOne.value = false;
|
||||
nextTick(() => {
|
||||
drawTwoEchart();
|
||||
@ -181,8 +183,8 @@ const drawTwoEchart = () => {
|
||||
trigger: "item"
|
||||
},
|
||||
title: {
|
||||
text: "9900",
|
||||
subtext: "待审批",
|
||||
text: typeData.value.value,
|
||||
subtext: typeData.value.name,
|
||||
x: "29%",
|
||||
y: "40%",
|
||||
textAlign: "center",
|
||||
|
||||
@ -2,25 +2,28 @@
|
||||
<div class="leftTop">
|
||||
<Card title="安全质量隐患报告">
|
||||
<div class="box-content">
|
||||
<el-scrollbar class="list-box">
|
||||
<el-scrollbar class="list-box" ref="refScrollbar">
|
||||
<div v-for="(item, index) in list" class="listStyle" :key="item.id">
|
||||
<div>外墙、顶板、底板出现贯通性裂缝</div>
|
||||
<div>{{ item.dangerItemContent }}</div>
|
||||
<div>
|
||||
<span>整改结果:</span>
|
||||
<span>已逾期</span>
|
||||
<span v-if="item.overTime" style="color: #e25f64">已逾期</span>
|
||||
<span v-else :style="{ color: item.status ? statusNameFilter(item.status).color : '' }">{{
|
||||
item.status ? statusNameFilter(item.status).name : ""
|
||||
}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<span>整改结果:</span>
|
||||
<span>已逾期</span>
|
||||
<span>整改人:</span>
|
||||
<span>{{ item.changeName || "" }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>整改结果:</span>
|
||||
<span>已逾期</span>
|
||||
<span>检查人:</span>
|
||||
<span>{{ item.inspectManName || "" }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>整改结果:</span>
|
||||
<span>已逾期</span>
|
||||
<span>检查日期:</span>
|
||||
<span>{{item.inspectTime || ""}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -32,18 +35,67 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { GlobalStore } from "@/stores";
|
||||
import { getCurrentDayAirQualityApi } from "@/api/modules/projectOverview";
|
||||
import { getXzSecurityQualitylnspectionRecordlistApi } from "@/api/modules/projectOverview";
|
||||
import { ref, onMounted, reactive } from "vue";
|
||||
import * as echarts from "echarts";
|
||||
import Card from "@/components/card.vue";
|
||||
const refScrollbar = ref(null as any); // 绑定到滚动的盒子上
|
||||
const store = GlobalStore();
|
||||
const list = ref([
|
||||
{ waterMeterName: 123, waterTonnage: 456 },
|
||||
{ waterMeterName: 123, waterTonnage: 456 },
|
||||
{ waterMeterName: 123, waterTonnage: 456 },
|
||||
{ waterMeterName: 123, waterTonnage: 456 }
|
||||
]) as any;
|
||||
onMounted(async () => {});
|
||||
const rectification = ref([
|
||||
{ id: 1, name: "无需整改", color: "#a1accb" },
|
||||
{ id: 2, name: "待整改", color: "#698ed2" },
|
||||
{ id: 3, name: "待复查", color: "#EEA959" },
|
||||
{ id: 4, name: "待核验", color: "#a1accb" },
|
||||
{ id: 5, name: "合格", color: "#82FBEA" }
|
||||
]);
|
||||
// 名称筛选
|
||||
const statusNameFilter = (status: any): any => {
|
||||
let findItem = rectification.value.find((item: any) => {
|
||||
return item.id == status;
|
||||
});
|
||||
return findItem;
|
||||
};
|
||||
const list = ref([]) as any;
|
||||
const pageNo = ref(1 as any);
|
||||
const moreScroll = ref(true as any);
|
||||
const getXzSecurityQualitylnspectionRecordlist = async (tip: any) => {
|
||||
const res: any = await getXzSecurityQualitylnspectionRecordlistApi({
|
||||
pageNo: tip == "search" ? 1 : pageNo.value,
|
||||
pageSize: 10,
|
||||
projectSn: store.sn
|
||||
});
|
||||
if (tip == "more") {
|
||||
const newResult = res.result.page.records.map((item: any) => {
|
||||
return {
|
||||
...item,
|
||||
whiteSpace: false
|
||||
};
|
||||
});
|
||||
list.value = list.value.concat(newResult);
|
||||
} else {
|
||||
list.value = res.result.page.records;
|
||||
}
|
||||
|
||||
if (res.result.page.pages == pageNo.value) {
|
||||
moreScroll.value = false;
|
||||
} else {
|
||||
pageNo.value = pageNo.value + 1;
|
||||
}
|
||||
};
|
||||
onMounted(async () => {
|
||||
await getXzSecurityQualitylnspectionRecordlist("search");
|
||||
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 (moreScroll.value) {
|
||||
getXzSecurityQualitylnspectionRecordlist("more");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -86,9 +138,6 @@ onMounted(async () => {});
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
margin-bottom: 5px;
|
||||
> span:nth-child(2) {
|
||||
color: #01e1ff;
|
||||
}
|
||||
}
|
||||
> div:nth-child(3) {
|
||||
display: flex;
|
||||
|
||||
@ -43,9 +43,13 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import Card from "@/components/card.vue";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { GlobalStore } from "@/stores";
|
||||
import * as echarts from "echarts";
|
||||
import {
|
||||
getCountDangerLevelApi,
|
||||
getInspectionSelectQualityApi
|
||||
} from "@/api/modules/projectOverview";
|
||||
const store = GlobalStore();
|
||||
const dateRange = ref([] as any);
|
||||
const echartsTest = ref();
|
||||
@ -53,6 +57,8 @@ const majorDangerCount = ref(0 as any);
|
||||
const majorDangerRate = ref(0 as any);
|
||||
const overdueMajorDangerCount = ref(0 as any);
|
||||
const overdueMajorDangerRate = ref(0 as any);
|
||||
const questionTotal = ref(0 as any);
|
||||
const classColorList = ref(["#EC6266", "#6375C7", "#038cf5", "#01d6f4"]);
|
||||
let dataList = ref([
|
||||
{
|
||||
enumType: "",
|
||||
@ -87,6 +93,149 @@ let dataList = ref([
|
||||
}
|
||||
}
|
||||
]);
|
||||
const qualityInfo = async (showLoading: boolean) => {
|
||||
// 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: 1,
|
||||
inspectStartTime: dateRange.value[0],
|
||||
inspectEndTime: dateRange.value[1]
|
||||
},
|
||||
showLoading
|
||||
);
|
||||
// dataList2.value = res.result.data.map((item: any, index: number) => {
|
||||
// return {
|
||||
// ...item,
|
||||
// value: item.count,
|
||||
// show: true,
|
||||
// itemStyle: {
|
||||
// normal: {
|
||||
// color: classColorList.value[index],
|
||||
// borderWidth: 20
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
// });
|
||||
// questionTotal.value = res.result.count;
|
||||
|
||||
const filterResult = res.result.data.find((item: any) => item.enumType == 1);
|
||||
majorDangerCount.value = filterResult.count;
|
||||
majorDangerRate.value = filterResult.percent;
|
||||
|
||||
// drawEchart2();
|
||||
};
|
||||
const getSafeInfo = async (showLoading: boolean) => {
|
||||
// const res: any = await getProjectInspectRecordCountApi({ projectSn: store.sn });
|
||||
// safeData.value = res.result;
|
||||
// dataList.value[0].value = res.result.rectificationNum;
|
||||
// dataList.value[1].value = res.result.totalNum - res.result.rectificationNum;
|
||||
const result: any = await getInspectionSelectQualityApi(
|
||||
{
|
||||
projectSn: store.sn,
|
||||
inspectStartTime: dateRange.value[0],
|
||||
inspectEndTime: dateRange.value[1]
|
||||
},
|
||||
showLoading
|
||||
);
|
||||
|
||||
dataList.value = [];
|
||||
for (let index = 0; index < 5; index++) {
|
||||
let obj = {
|
||||
enumType: "",
|
||||
value: 30,
|
||||
show: true,
|
||||
name: "重大隐患",
|
||||
greatFaultLevelNumJzrRate: "",
|
||||
rectificationNum: "",
|
||||
rectificationNumJzrRate: "",
|
||||
rectificationName: "",
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: classColorList.value[index],
|
||||
borderWidth: 20
|
||||
}
|
||||
}
|
||||
};
|
||||
if (index == 0) {
|
||||
obj.value = result.result.greatFaultLevelNum;
|
||||
obj.greatFaultLevelNumJzrRate = result.result.greatFaultLevelNumJzrRate;
|
||||
obj.rectificationNum = result.result.rectificationNum;
|
||||
obj.rectificationNumJzrRate = result.result.rectificationNumYesterday;
|
||||
obj.rectificationName = "未整改";
|
||||
} else if (index == 1) {
|
||||
obj.name = "较大隐患";
|
||||
obj.value = result.result.largerRiskNum;
|
||||
obj.greatFaultLevelNumJzrRate = result.result.largerRiskNumJzrRate;
|
||||
obj.rectificationNum = result.result.reviewNum;
|
||||
obj.rectificationNumJzrRate = result.result.reviewNumYesterday;
|
||||
obj.rectificationName = "未复查";
|
||||
} else if (index == 2) {
|
||||
obj.name = "一般隐患";
|
||||
obj.value = result.result.generalRiskNum;
|
||||
obj.greatFaultLevelNumJzrRate = result.result.generalRiskNumJzrRate;
|
||||
obj.rectificationNum = result.result.verificationNum;
|
||||
obj.rectificationNumJzrRate = result.result.verificationNumJzrRate;
|
||||
obj.rectificationName = "未核验";
|
||||
} else if (index == 3) {
|
||||
obj.name = "低隐患";
|
||||
obj.value = result.result.lowRiskNum;
|
||||
obj.greatFaultLevelNumJzrRate = result.result.lowRiskNumJzrRate;
|
||||
obj.rectificationNum = result.result.closeInspectionNum;
|
||||
obj.rectificationNumJzrRate = result.result.closeInspectionNumJzrRate;
|
||||
obj.rectificationName = "合格";
|
||||
} else if (index == 4) {
|
||||
obj.name = "无";
|
||||
obj.value = result.result.lowRiskNum;
|
||||
obj.greatFaultLevelNumJzrRate = result.result.lowRiskNumJzrRate;
|
||||
obj.rectificationNum = result.result.overdueNotCloseNum;
|
||||
obj.rectificationNumJzrRate = result.result.overdueNotCloseNumYesterday;
|
||||
obj.rectificationName = "超期未关闭";
|
||||
}
|
||||
|
||||
dataList.value.push(obj);
|
||||
}
|
||||
questionTotal.value = result.result.dangerNum;
|
||||
// overdueMajorDangerCount.value = result.result.overdueRectificationNum;
|
||||
// overdueMajorDangerRate.value = result.result.overdueRectificationNumRatio;
|
||||
// majorDangerCount.value = result.result.notCloseNum;
|
||||
// majorDangerRate.value = result.result.percent;
|
||||
|
||||
const res: any = await getCountDangerLevelApi(
|
||||
{
|
||||
projectSn: store.sn,
|
||||
isOverdueRectification: 1,
|
||||
inspectStartTime: dateRange.value[0],
|
||||
inspectEndTime: dateRange.value[1]
|
||||
},
|
||||
showLoading
|
||||
);
|
||||
// dataList.value = res.result.data.map((item: any, index: number) => {
|
||||
// return {
|
||||
// ...item,
|
||||
// value: item.count,
|
||||
// show: true,
|
||||
// itemStyle: {
|
||||
// normal: {
|
||||
// color: classColorList.value[index],
|
||||
// borderWidth: 20
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
// });
|
||||
// questionTotal.value = res.result.count;
|
||||
|
||||
const filterResult = res.result.data.find((item: any) => item.enumType == 1);
|
||||
|
||||
overdueMajorDangerCount.value = filterResult.count;
|
||||
overdueMajorDangerRate.value = filterResult.percent;
|
||||
|
||||
drawEchart();
|
||||
};
|
||||
const Pie = () => {
|
||||
let dataArr = [];
|
||||
for (var i = 0; i < 150; i++) {
|
||||
@ -127,7 +276,7 @@ const drawEchart = () => {
|
||||
// position: ['50%','50%']
|
||||
},
|
||||
title: {
|
||||
text: 100,
|
||||
text: questionTotal.value,
|
||||
subtext: "累计隐患总数",
|
||||
x: "17%",
|
||||
y: "36%",
|
||||
@ -224,7 +373,7 @@ const drawEchart = () => {
|
||||
left: "35%",
|
||||
top: "25%",
|
||||
align: "left",
|
||||
itemGap: 14,
|
||||
itemGap: 8.5,
|
||||
itemWidth: 8, // 设置宽度
|
||||
itemHeight: 7, // 设置高度
|
||||
symbolKeepAspect: false,
|
||||
@ -451,8 +600,28 @@ const drawEchart = () => {
|
||||
// });
|
||||
// });
|
||||
}
|
||||
watch(
|
||||
dateRange,
|
||||
() => {
|
||||
if (dateRange.value == null) {
|
||||
dateRange.value = [];
|
||||
}
|
||||
getSafeInfo(true);
|
||||
qualityInfo(true);
|
||||
// await getSelectQualityStatisticsNum();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
const setIntervalFn = (showLoading: boolean) => {
|
||||
getSafeInfo(showLoading);
|
||||
qualityInfo(showLoading);
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
drawEchart();
|
||||
setIntervalFn(false);
|
||||
setInterval(() => {
|
||||
setIntervalFn(true);
|
||||
}, 30000);
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -533,7 +702,7 @@ onMounted(async () => {
|
||||
}
|
||||
}
|
||||
.notoDta {
|
||||
top: 25%;
|
||||
top: 8%;
|
||||
width: 50%;
|
||||
// left: 40%;
|
||||
position: absolute;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user