jiangping
2025-04-17 974c9ded44fcee4638122570c6904d4e5e6c217b
代码初始化
已修改1个文件
32 ■■■■ 文件已修改
admin/src/views/index.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/index.vue
@@ -220,13 +220,13 @@
      var ydata = []
      ydata.push({ name: '符合项', type: 'line', unit: '项', color: '#f07e6f', data: this.staticData1.map(i => i.dcaYesTotal) })
      ydata.push({ name: '不符合项', type: 'line', unit: '项', color: '#8383ff', data: this.staticData1.map(i => i.dcaNoTotal) })
      ydata.push({ name: '上报次数', type: 'line', unit: '次', color: '#29aeff', data: this.staticData1.map(i => i.total) })
      ydata.push({ name: '上报次数', type: 'bar', unit: '次', color: '#29aeff', data: this.staticData1.map(i => i.total) })
      this.initEchartDataDo('月度统计','echart1', this.staticData1.map(i => i.dateStr), ydata)
    },
    initEchart11 () {
      var ydata = []
      ydata.push({ name: '符合项', type: 'bar', unit: '项', color: '#f07e6f', data: this.staticData11.map(i => i.dcaYesTotal) })
      ydata.push({ name: '不符合项', type: 'bar', unit: '项', color: '#8383ff', data: this.staticData11.map(i => i.dcaNoTotal) })
      ydata.push({ name: '符合项', type: 'line', unit: '项', color: '#f07e6f', data: this.staticData11.map(i => i.dcaYesTotal) })
      ydata.push({ name: '不符合项', type: 'line', unit: '项', color: '#8383ff', data: this.staticData11.map(i => i.dcaNoTotal) })
      ydata.push({ name: '上报次数', type: 'bar', unit: '次', color: '#29aeff', data: this.staticData11.map(i => i.total) })
      this.initEchartDataDo('季度统计','echart11', this.staticData11.map(i => i.dateStr), ydata)
    },
@@ -270,17 +270,32 @@
      const myChart = echarts.init(document.getElementById(id))
      myChart.setOption({
        title: {
          text: title || ''
          text:  (title || '') ,
          textStyle:{
            fontSize: 12,
            fontStyle: 'normal',
            fontWeight: 'bold'
          },
        },
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            type: 'shadow'
          }
          },
          textStyle:{
            fontSize: 10,
            fontStyle: 'normal',
            fontWeight: 'normal'
          },
        },
        legend:{
          orient: 'vertical',
          left: 'right'
          left: 'right',
          textStyle:{
            fontSize: 10,
            fontStyle: 'normal',
            fontWeight: 'normal'
          },
        },
        xAxis: {
          type: 'category',
@@ -290,6 +305,11 @@
        yAxis: {
          type: 'value',
          name: '',
          textStyle:{
            fontSize: 10,
            fontStyle: 'normal',
            fontWeight: 'normal'
          },
          nameTextStyle: {
            padding: [0, 0, 4, -30] // 四个数字分别为上右下左与原位置距离
          },