From df06d5adebeedb5edca6264450671792ccbd9d4e Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: Mon, 26 Sep 2022 16:19:36 +0800
Subject: [PATCH] 修改
---
src/views/specialWorkSystem/workPlan/reserveSum/index.vue | 47 ++++++++++++++++++++++++++++++++++-------------
1 files changed, 34 insertions(+), 13 deletions(-)
diff --git a/src/views/specialWorkSystem/workPlan/reserveSum/index.vue b/src/views/specialWorkSystem/workPlan/reserveSum/index.vue
index 09fcc2d..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: ''
});
@@ -116,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') {
@@ -156,9 +155,31 @@
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