田源
2023-12-05 69a9cab3e520b4daa62c693897ecd1179553cf59
柱状图优化
已修改2个文件
42 ■■■■ 文件已修改
Source/UBCS-WEB/src/components/StatisticsComponent/ColumnarChart.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/statistic/statisticPage.vue 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/StatisticsComponent/ColumnarChart.vue
@@ -50,7 +50,7 @@
                value: newval[i][j],
                itemStyle: {
                  normal: {
                    barBorderRadius: borderRadius,  // 设置圆角
                    // barBorderRadius: borderRadius,  // 设置圆角
                    color: colors[i],
                  }
                },
@@ -65,7 +65,10 @@
              data: curSeriesData,
              label: {
                show: true,
                position: 'top'
                position: 'top',
                formatter: function (params) {
                  return params.value === 0 ? '' : params.value; // 值为 0 不显示,其他情况显示
                }
              },
              emphasis: {
                focus: "series",
Source/UBCS-WEB/src/views/statistic/statisticPage.vue
@@ -124,11 +124,36 @@
      this.dataKeyList = this.selectData.map(obj => obj.code)
      const btmName = this.dataKeyList.join(",");
      if (btmName) {
        getStatisticAnalysis({btmNames: btmName}).then(res => {
          this.menuList = res.data.data;
          this.nextSave();
          this.$message.success('保存成功')
        });
        this.menuList=[
          {
            menuData: [
              [0, 0, 0, 0, 0, 0, 4, 9, 12, 12, 12, 12],
              [0, 0, 0, 0, 0, 0, 4, 5, 3, 0, 0, 0]
            ],
            code:1
          },
          {
            menuData: [
              [0, 0, 0, 1, 1, 1, 1, 1, 1, 29, 5315, 5315],
              [0, 0, 0, 1, 0, 0, 0, 0, 0, 28, 5286, 0]
            ],
            code:2
          },
          {
            menuData: [
              [0, 58, 60, 61, 75, 84, 145, 162, 166, 177, 186, 186],
              [0, 58, 2, 1, 14, 9, 61, 17, 4, 11, 9, 0]
            ],
            code:3
          }
        ]
        this.nextSave();
        this.$message.success('保存成功')
        // getStatisticAnalysis({btmNames: btmName}).then(res => {
          // this.menuList = res.data.data;
          // this.nextSave();
          // this.$message.success('保存成功')
        // });
      }else {
        this.$message.warning('请选择数据!')
      }