Explorar o código

王子文 生产日报

wangggziwen %!s(int64=2) %!d(string=hai) anos
pai
achega
9ca7d88f53

+ 0 - 1
master/src/main/java/com/ruoyi/project/production/service/impl/TDailyProductionReportServiceImpl.java

@@ -7,7 +7,6 @@ import java.util.Date;
 import java.util.List;
 
 import com.ruoyi.project.production.controller.vo.AnalysisDataVO;
-import com.ruoyi.project.production.controller.vo.AnalysisQueryVO;
 import org.apache.poi.ss.usermodel.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;

+ 1 - 65
ui/src/views/production/daily/index.vue

@@ -4036,71 +4036,7 @@ export default {
       let startDate = new Date(this.analysisQueryParams.startDate);
       this.analysisQueryParams.endDate = endDate.getFullYear() + "-" + Number(endDate.getMonth() + 1) + "-" + endDate.getDate();
       this.analysisQueryParams.startDate = startDate.getFullYear() + "-" + Number(startDate.getMonth() + 1) + "-" + startDate.getDate();
-      getAnalysisData(this.analysisQueryParams).then(response => {
-        let data = response.data;
-        this.maxValue = 0;
-        this.minValue = data[0].valueData;
-        for (let i = 0; i < data.length; i++) {
-          if (data[i].valueData != null) {
-            if (data[i].valueData.toString().search("%") != -1) {
-              this.valueList[i] = data[i].valueData.substr(0, data[i].valueData.length - 1);
-            } else {
-              this.valueList[i] = data[i].valueData;
-            }
-            this.dateList[i] = data[i].dateData;
-            if (data[i].valueData > this.maxValue) {
-              this.maxValue = data[i].valueData;
-            }
-            if (data[i].valueData < this.minValue) {
-              this.minValue = data[i].valueData;
-            }
-          }
-        }
-        this.chart = this.echarts.init(document.getElementById("bottomRightChartDialog"));
-        let option = {
-          tooltip: {
-            trigger: "item"
-          },
-          grid: {
-            left: 90,
-            right: 80,
-          },
-          xAxis: {
-            data: this.dateList,
-            name: '日期'
-          },
-          yAxis: {
-            max: this.maxValue,
-            min: this.minValue,
-            min: function(value) {//取最小值向下取整为最小刻度
-              return Math.floor(value.min)
-            },
-            max: function(value) {//取最大值向上取整为最大刻度
-              return  Math.ceil(value.max)
-            },
-            scale: true,
-            type: 'value',
-            name: '值'
-          },
-          series: [
-            {
-              label: {
-                show: true,
-                position: 'top'
-              },
-              data: this.valueList,
-              type: 'line',
-              smooth: true,
-              symbolSize: 15,
-              color:"#1f9f90",
-              lineStyle: {
-                width: 6
-              }
-            }
-          ]
-        };
-        this.chart.setOption(option);
-      });
+      this.draw();
     },
     draw() {
       getAnalysisData(this.analysisQueryParams).then(response => {