|
@@ -88,26 +88,26 @@
|
|
|
<div ref="statusChartRef" class="h-[320px]"></div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
-<!-- <el-col :span="7">-->
|
|
|
-<!-- <el-card class="chart-card" shadow="never">-->
|
|
|
-<!-- <template #header>-->
|
|
|
-<!-- <div class="flex items-center">-->
|
|
|
-<!-- <span class="text-base font-medium" style="color: #b6c8da">项目部设备数量统计</span>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </template>-->
|
|
|
-<!-- <div ref="topContainer" class="h-[320px]"></div>-->
|
|
|
-<!-- </el-card>-->
|
|
|
-<!-- </el-col>-->
|
|
|
<el-col :span="7">
|
|
|
<el-card class="chart-card" shadow="never">
|
|
|
<template #header>
|
|
|
<div class="flex items-center">
|
|
|
- <span class="text-base font-medium" style="color: #b6c8da">设备类别TOP5数量</span>
|
|
|
+ <span class="text-base font-medium" style="color: #b6c8da">项目部设备数量统计</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
<div ref="topContainer" class="h-[320px]"></div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
+<!-- <el-col :span="7">-->
|
|
|
+<!-- <el-card class="chart-card" shadow="never">-->
|
|
|
+<!-- <template #header>-->
|
|
|
+<!-- <div class="flex items-center">-->
|
|
|
+<!-- <span class="text-base font-medium" style="color: #b6c8da">设备类别TOP5数量</span>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- <div ref="topContainer" class="h-[320px]"></div>-->
|
|
|
+<!-- </el-card>-->
|
|
|
+<!-- </el-col>-->
|
|
|
<el-col :span="11">
|
|
|
<el-card class="chart-card" shadow="never">
|
|
|
<template #header>
|
|
@@ -337,10 +337,9 @@ const getStats = () => {
|
|
|
status.value = res
|
|
|
// initCharts()
|
|
|
})
|
|
|
- IotStatApi.getMaintenanceTodayStatus().then((res) => {
|
|
|
- todayStatus.value = res
|
|
|
- initTopChart()
|
|
|
- })
|
|
|
+ // IotStatApi.getMaintenanceTodayStatus().then((res) => {
|
|
|
+ // todayStatus.value = res
|
|
|
+ // })
|
|
|
|
|
|
IotStatApi.getDeviceStatusCount('ry').then((res) => {
|
|
|
typeData.value = res
|
|
@@ -376,10 +375,10 @@ const getStats = () => {
|
|
|
IotStatApi.getDeptStatistics(fillQueryParams).then((res) => {
|
|
|
fill.value = res.totalList[0] || []
|
|
|
})
|
|
|
- // IotStatApi.getProject('ry').then((res) => {
|
|
|
- // typeData.value = res;
|
|
|
- // initProjectCharts()
|
|
|
- // })
|
|
|
+ IotStatApi.getProject('ry').then((res) => {
|
|
|
+ typeData.value = res;
|
|
|
+ initProjectCharts()
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const initDrillingWorkloadChart = () => {
|
|
@@ -556,7 +555,7 @@ const initDeviceStatusCharts = () => {
|
|
|
|
|
|
// 自适应调整
|
|
|
const handleResize = () => {
|
|
|
- chartInstance?.resize()
|
|
|
+ topInstance?.resize()
|
|
|
}
|
|
|
|
|
|
const topContainer = ref(null)
|
|
@@ -672,21 +671,21 @@ const getTopOption = () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// 初始化图表
|
|
|
-const initTopChart = async () => {
|
|
|
- await IotStatApi.getDeviceTypeCount('ry').then((res) => {
|
|
|
- backendData.value = res
|
|
|
- })
|
|
|
- if (!topContainer.value) return
|
|
|
- topInstance = echarts.init(topContainer.value)
|
|
|
- updateTopChart()
|
|
|
-}
|
|
|
-
|
|
|
-// 更新图表
|
|
|
-const updateTopChart = () => {
|
|
|
- if (!topInstance) return
|
|
|
- topInstance.setOption(getTopOption())
|
|
|
-}
|
|
|
+// // 初始化图表
|
|
|
+// const initTopChart = async () => {
|
|
|
+// await IotStatApi.getDeviceTypeCount('ry').then((res) => {
|
|
|
+// backendData.value = res
|
|
|
+// })
|
|
|
+// if (!topContainer.value) return
|
|
|
+// topInstance = echarts.init(topContainer.value)
|
|
|
+// updateTopChart()
|
|
|
+// }
|
|
|
+//
|
|
|
+// // 更新图表
|
|
|
+// const updateTopChart = () => {
|
|
|
+// if (!topInstance) return
|
|
|
+// topInstance.setOption(getTopOption())
|
|
|
+// }
|
|
|
|
|
|
const initProjectCharts = () => {
|
|
|
const chart = echarts.init(topContainer.value);
|
|
@@ -1092,20 +1091,20 @@ onMounted(() => {
|
|
|
})
|
|
|
|
|
|
onBeforeUnmount(() => {
|
|
|
- chartInstance?.dispose()
|
|
|
- window.removeEventListener('resize', () => chartInstance?.resize())
|
|
|
- topInstance?.dispose()
|
|
|
- window.removeEventListener('resize', handleResize)
|
|
|
- qxInstance?.dispose()
|
|
|
- window.removeEventListener('resize', resizeQxChart)
|
|
|
- echarts.getInstanceByDom(repairWellChartRef.value)?.dispose()
|
|
|
- window.removeEventListener('resize', () =>
|
|
|
- echarts.getInstanceByDom(repairWellChartRef.value)?.resize()
|
|
|
- )
|
|
|
- echarts.getInstanceByDom(drillingWellChartRef.value)?.dispose()
|
|
|
- window.removeEventListener('resize', () =>
|
|
|
- echarts.getInstanceByDom(drillingWellChartRef.value)?.resize()
|
|
|
- )
|
|
|
+ // chartInstance?.dispose()
|
|
|
+ // window.removeEventListener('resize', () => chartInstance?.resize())
|
|
|
+ // topInstance?.dispose()
|
|
|
+ // window.removeEventListener('resize', handleResize)
|
|
|
+ // qxInstance?.dispose()
|
|
|
+ // window.removeEventListener('resize', resizeQxChart)
|
|
|
+ // repairWellChartRef.dispose()
|
|
|
+ // window.removeEventListener('resize', () =>
|
|
|
+ // echarts.getInstanceByDom(repairWellChartRef.value)?.resize()
|
|
|
+ // )
|
|
|
+ // echarts.getInstanceByDom(drillingWellChartRef.value)?.dispose()
|
|
|
+ // window.removeEventListener('resize', () =>
|
|
|
+ // echarts.getInstanceByDom(drillingWellChartRef.value)?.resize()
|
|
|
+ // )
|
|
|
})
|
|
|
</script>
|
|
|
|