Fixiaobai
2023-08-29 809f8b1279bf84f28bccabc4f95a8eba6c22a24d
src/views/chart/work/index.vue
@@ -90,23 +90,34 @@
        },
      }
    },
    mounted(){},
    mounted(){
      this.queryData();
    },
    methods: {
      async queryData(){
        let date = this.formInline.date;
        let date = [];
        let type;
        if(this.formInline.date == null || this.formInline.date == ""){
          let currentDate = new Date();
          let year = currentDate.getFullYear();
          let month = currentDate.getMonth() + 1;
          let day = currentDate.getDate();
          date.push(year +"-" + month + "-01");
          date.push(year +"-" + month + "-" + day);
          type = 0;
        }else{
          date = this.formInline.date;
          type = this.formInline.type;
        }
        let obj = {
          startTime : date[0],
          endTime : date[1],
          type : this.formInline.type
          type : type
        }
        const dutyMater = await getDutyMater(obj);
        const dutyTimely = await getDutyTimely(obj);
        const executeMater = await getExecuteMater(obj);
        const executeTimely = await getExecuteTimely(obj);
        console.log("dm",dutyMater.data);
        console.log("dt",dutyTimely.data);
        console.log("em",executeMater.data.length);
        console.log("et",executeTimely.data);
        this.initLeaderStatiChart("leaderStati",dutyMater.data);
        this.initLeaderTimelyChart("leaderTimely",dutyTimely.data);
        this.initTesterStatiChart("testerStati",executeMater.data);
@@ -315,6 +326,9 @@
              axisPointer: {
                type: 'shadow'
              },
              nameTextStyle:{
                padding:20
              }
            }
          ],
          yAxis: [
@@ -363,7 +377,7 @@
                  return value + ' %';
                }
              },
              data: [{value:20},{value:40}],
              data: data2,
              itemStyle: {
                color: '#d2eec5'
              }