From 16f25e4ae9a39923afffc20d82f742e924dd689a Mon Sep 17 00:00:00 2001
From: Admin <978517621@qq.com>
Date: Sat, 08 Oct 2022 14:55:29 +0800
Subject: [PATCH] Default Changelist
---
src/views/specialWorkSystem/workPlan/reserveSum/index.vue | 51 +++++++++++++++++++++++++++++++++++++--------------
1 files changed, 37 insertions(+), 14 deletions(-)
diff --git a/src/views/specialWorkSystem/workPlan/reserveSum/index.vue b/src/views/specialWorkSystem/workPlan/reserveSum/index.vue
index 283c33e..32f8d2b 100644
--- a/src/views/specialWorkSystem/workPlan/reserveSum/index.vue
+++ b/src/views/specialWorkSystem/workPlan/reserveSum/index.vue
@@ -42,15 +42,15 @@
// 定义接口来定义对象的类型
interface stateType {
tableData: [],
- departmentList: [],
- hotCount: [],
- confinedSpaceCount: [],
- liftingCount: [],
- groundBreakingCount: [],
- openCircuitCout: [],
- heightCount: [],
- temporaryPowerCount: [],
- blindPlatePluggingCount: [],
+ departmentList: Array<any>,
+ hotCount: Array<any>,
+ confinedSpaceCount: Array<any>,
+ liftingCount: Array<any>,
+ groundBreakingCount: Array<any>,
+ openCircuitCout: Array<any>,
+ heightCount: Array<any>,
+ temporaryPowerCount: Array<any>,
+ blindPlatePluggingCount: Array<any>,
searchDates: Array<any>,
startTime: String,
endTime: String
@@ -73,7 +73,7 @@
heightCount: [],
temporaryPowerCount: [],
blindPlatePluggingCount: [],
- searchDates: '',
+ searchDates: [],
startTime: '',
endTime: ''
});
@@ -107,6 +107,7 @@
},
},
]
+
// 页面载入时执行方法
onMounted(() => {
getListByPage()
@@ -115,7 +116,6 @@
// 获取列表
const getListByPage = async () => {
- console.log(state.searchDates)
const data = { startTime: state.searchDates[0], endTime: state.searchDates[1] };
let res = await workAppointApi().getAllRecords(data);
if (res.data.code === '200') {
@@ -134,7 +134,7 @@
}else{
ElMessage({
type: 'warning',
- message: '暂无数据'
+ message: '该时段暂无数据'
});
}
} else {
@@ -149,14 +149,37 @@
let dom = document.getElementById(chartName.value);
let myChart = echarts.init(dom);
+ type EChartsOption = echarts.EChartsOption
let option: EChartsOption;
option = {
tooltip: {
trigger: 'axis',
+ // axisPointer: {
+ // type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
+ // },
axisPointer: {
- type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
- }
+ type: "cross",
+ label: {
+ formatter: function (params) {
+ if (params.seriesData.length === 0) {
+ window.mouseCurValue = params.value;
+ }
+ }
+ }
+ },
+ formatter: function (params) {
+ let res = "", sum = 0;
+ for (let i = 0; i < params.length; i++) {
+ let series = params[i];
+ sum += Number(series.data);
+ if (sum >= window.mouseCurValue) {
+ res = series.axisValue + "<br/>" + series.marker + series.seriesName + ":" + series.data + "<br/>";
+ break;
+ }
+ }
+ return res;
+ },
},
legend: {},
grid: {
--
Gitblit v1.9.2