Your Name
2022-09-28 0dac7ba33f77342d2a9a1392c820d10d3b72d76c
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: {