jiangping
2025-05-21 964b21f45985c504b08340914eafc8e44e2e51ef
最新版本541200007
已修改3个文件
163 ■■■■ 文件已修改
admin/src/components/business/OperaInternalCompanyWindow.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/index.vue 155 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/views/EnergyConsum.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/business/OperaInternalCompanyWindow.vue
@@ -129,7 +129,8 @@
          this.api.create({
            parentId: this.form.parentId,
            name: this.form.name,
            type: this.form.type
            type: this.form.type,
            sortnum: this.form.sortnum
          })
            .then(() => {
              this.visible = false
@@ -147,7 +148,8 @@
            id: this.form.id,
            parentId: this.form.parentId,
            name: this.form.name,
            type: this.form.type
            type: this.form.type,
            sortnum: this.form.sortnum
          })
            .then(() => {
              this.visible = false
admin/src/views/index.vue
@@ -109,7 +109,8 @@
                  更多<i class="el-icon-arrow-right"></i>
                </div> -->
              </div>
              <div class="echart" id="echart2"></div>
              <template  v-if="tabPosition==='right'" >  <div class="echart" id="echart2"></div></template>
              <template  v-if="tabPosition==='top'" >  <div class="echart"  id="echart21"></div></template>
            </div>
          </div>
          <div class="df">
@@ -272,6 +273,7 @@
    changeType(e) {
      console.log(e)
      this.initEchart2()
      this.initEchart21()
    },
    getNoticeList(){
      syncHkNotice().then(res => {
@@ -395,6 +397,7 @@
      getWorkbenchData({ queryType: 2 }).then(res => {
        this.staticData = res || {}
        this.initEchart2()
        this.initEchart21()
        this.initEchart3()
        this.initEchart4()
      })
@@ -431,7 +434,7 @@
    },
    handleDetail (row) {
      if (row.type === 7) {
       this.handleTest(row);
        this.handleTest(row)
        return
      }
      if (row.objType === 2) {
@@ -510,35 +513,45 @@
    },
    initEchart2 () {
      console.log('initEchart2')
      if (!document.getElementById('echart2')) {
        return
      }
      const myChart = echarts.init(document.getElementById('echart2'))
      const that = this
      var ydata = that.staticData.internalList.map(i => i.num)
      let maxNum = 1
      ydata.forEach((item, index) => {
        maxNum = item > maxNum ? item : maxNum
      })
      myChart.setOption({
        dataZoom: [
          {
            type: 'slider', // 滑动条类型
            orient: 'vertical',
            left: 'left',
            showDetail: false,
            start: 0,       // 起始位置(百分比)
            end: 40,        // 结束位置(百分比),控制初始显示范围
            width: 4,
            dataBackground: {
              areaStyle: { opacity: 0 }, // 设置背景透明
              lineStyle: { opacity: 0 } // 设置背景透明
            },
            moveOnMouseWheel: true,
            }
            // moveOnMouseWheel: true,
          },
          {
            type: 'inside',     // 用于监听滚轮事件
            orient: 'vertical',
            start: 0,
            end: 40,
            showDetail: false,
            minSpan: 40,
            dataBackground: {
              areaStyle: { opacity: 0 } // 设置背景透明
            },
            maxSpan: 40,
            zoomLock: true,     // 锁定缩放(仅允许平移)
            moveOnMouseWheel: true, // 启用滚轮平移
            zoomLock: true // 锁定缩放(仅允许平移)
            // moveOnMouseWheel: true, // 启用滚轮平移
          }
        ],
        grid: {
@@ -556,7 +569,7 @@
        },
        xAxis: {
          type: 'value',
          position: 'bottom',
          position: 'top',
          splitLine: {
            show: true,
            lineStyle: {
@@ -566,8 +579,116 @@
          },
          axisLabel: {
            formatter: function(value) {
              const intValue = Math.round(value);
              return intValue > 0 ? intValue : '';
              const intValue = Math.round(value)
              return intValue > 0 ? intValue : ''
            }
          },
          minInterval: 1,
          min: 1
          // max: maxNum
        },
        yAxis: {
          type: 'category',
          inverse: true,
          data: that.staticData.internalList.map(i => i.name),
          axisLabel: {
            interval: 0
          }
        },
        series: [
          {
            data: ydata,
            type: 'bar',
            barWidth: 10,
            itemStyle: {
              normal: {
                color: new echarts.graphic.LinearGradient(
                  1, 0, 0, 0,
                  [
                    { offset: 0, color: '#56abf8' },
                    { offset: 1, color: '#407ff0' }
                  ]
                )
                // barBorderRadius: [0, 10, 10, 0]
              }
            }
          }
        ]
      })
      window.addEventListener('resize', function () { // 执行
        myChart.resize()
      })
    },
    initEchart21 () {
      console.log('initEchart21')
      if (!document.getElementById('echart21')) {
        return
      }
      const myChart = echarts.init(document.getElementById('echart21'))
      const that = this
      var le1 = that.staticData.internalList.length
      var le2 = that.staticData.lwList.length
      const end = Math.round(40 * ((le1>0&& le2>0?le1:1) / (le1>0&& le2>0?le2:1)))+10
      myChart.setOption({
        dataZoom: [
          {
            type: 'slider', // 滑动条类型
            orient: 'vertical',
            left: 'left',
            showDetail: false,
            start: 0, // 起始位置(百分比)
            end: end, // 结束位置(百分比),控制初始显示范围
            width: 4,
            dataBackground: {
              areaStyle: { opacity: 0 }, // 设置背景透明
              lineStyle: { opacity: 0 } // 设置背景透明
            },
            zoomLock: true, // 锁定缩放(仅允许平移)
            moveOnMouseWheel: true
          },
          {
            type: 'inside', // 用于监听滚轮事件
            orient: 'vertical',
            start: 0,
            end: end,
            showDetail: false,
            minSpan: end,
            dataBackground: {
              areaStyle: { opacity: 0 } // 设置背景透明
            },
            maxSpan: end,
            zoomLock: true, // 锁定缩放(仅允许平移)
            moveOnMouseWheel: true // 启用滚轮平移
          }
        ],
        grid: {
          top: '4%',
          left: '2%',
          right: '6%',
          bottom: '2%',
          containLabel: true
        },
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            type: 'line'
          }
        },
        xAxis: {
          type: 'value',
          position: 'top',
          splitLine: {
            show: true,
            lineStyle: {
              // 这里输入线条的样式
              color: 'rgba(255,255,255,0.14)'
            }
          },
          axisLabel: {
            formatter: function (value) {
              const intValue = Math.round(value)
              return intValue > 0 ? intValue : ''
            }
          },
          minInterval: 1,
@@ -575,11 +696,15 @@
        },
        yAxis: {
          type: 'category',
          data: that.tabPosition === 'top' ? that.staticData.lwList.map(i => i.name) : that.staticData.internalList.map(i => i.name)
          inverse: true,
          data:  that.staticData.lwList.map(i => i.name),
          axisLabel: {
            interval: 0
          }
        },
        series: [
          {
            data: that.tabPosition === 'top' ? that.staticData.lwList.map(i => i.num) : that.staticData.internalList.map(i => i.num),
            data: that.staticData.lwList.map(i => i.num),
            type: 'bar',
            barWidth: 10,
            itemStyle: {
@@ -636,8 +761,8 @@
          },
          axisLabel: {
            formatter: function(value) {
              const intValue = Math.round(value);
              return intValue > 0 ? intValue : '';
              const intValue = Math.round(value)
              return intValue > 0 ? intValue : ''
            }
          },
          minInterval: 1,
@@ -751,8 +876,8 @@
          },
          axisLabel: {
            formatter: function(value) {
              const intValue = Math.round(value);
              return intValue > 0 ? intValue : '';
              const intValue = Math.round(value)
              return intValue > 0 ? intValue : ''
            }
          },  
          minInterval: 1,
screen/src/views/EnergyConsum.vue
@@ -27,7 +27,7 @@
                <div class="name">本年累计循环烟箱</div>
                <div><span class="num" style="color: #68cfb2;" v-if="data1.smokeBoxTotal || data1.smokeBoxTotal == 0">{{
                  data1.smokeBoxTotal.toLocaleString()
                    }}</span><span>个</span></div>
                    }}</span><span>只</span></div>
              </div>
            </div>
          </div>