isv-robot 2 years ago
parent
commit
dde23751e1
1 changed files with 5 additions and 4 deletions
  1. 5 4
      src/views/dashboard-screen/qb-dlsbxjdx/index.vue

+ 5 - 4
src/views/dashboard-screen/qb-dlsbxjdx/index.vue

@@ -43,7 +43,7 @@ export default {
           const keyMap = {
           const keyMap = {
             [res?.info.series[0].name]: res.info.series[0].data[index],
             [res?.info.series[0].name]: res.info.series[0].data[index],
             [res?.info.series[1].name]: res.info.series[1].data[index],
             [res?.info.series[1].name]: res.info.series[1].data[index],
-            per: (res.info.series[1].data[index] * 100 / res.info.series[0].data[index]).toFixed(0)
+            per: res.info.series[0].data[index] <= 0 ? 0 : (res.info.series[1].data[index] * 100 / res.info.series[0].data[index]).toFixed(0)
           }
           }
 
 
           this.arrMap[key] = keyMap
           this.arrMap[key] = keyMap
@@ -52,8 +52,8 @@ export default {
       window['max'] = maxs.reverse()
       window['max'] = maxs.reverse()
       window['values'] = values.reverse()
       window['values'] = values.reverse()
 
 
-      const cubeW = 6;
-      const cubeH = 12;
+      const cubeW = 6
+      const cubeH = 12
       const CubeLeft = echarts.graphic.extendShape({
       const CubeLeft = echarts.graphic.extendShape({
         shape: {
         shape: {
           x: 0,
           x: 0,
@@ -310,7 +310,8 @@ export default {
 
 
               normal: {
               normal: {
                 show: true,
                 show: true,
-                position: ['80%', '-125%'],
+                offset: [this.EchartfontSize(80), 0],
+                position: ['50%', '-120%'],
                 formatter: (e) => {
                 formatter: (e) => {
                   const ret = `${values[e.dataIndex]}/${maxs[e.dataIndex]}`
                   const ret = `${values[e.dataIndex]}/${maxs[e.dataIndex]}`
                   return ret
                   return ret