isv-robot преди 2 години
родител
ревизия
7262f25100

+ 0 - 1
src/views/dashboard-screen/chart-map/chartMap.vue

@@ -8,7 +8,6 @@
 export default {
   name: 'ChartMap',
   created() {
-    window['is'] = this
     window['mapFrame'] = this.$refs.mapFrame
   }
 }

+ 1 - 1
src/views/dashboard-screen/index.vue

@@ -33,7 +33,7 @@
         <div class="o-item">
           <CardWrap>
 
-            <span slot="title">电力远动调试兑现情况</span>
+            <span slot="title" @click="openDrawer('电力远动调试本月兑现情况')">电力远动调试兑现情况</span>
             <div slot="content">
               <Dlydtssx/>
             </div>

+ 0 - 1
src/views/dashboard-screen/jryl/index.vue

@@ -17,7 +17,6 @@ export default {
     }
   },
   created() {
-    window['is'] = this
     this.getOption()
   },
 

+ 0 - 1
src/views/dashboard-screen/jxdxqk/index.vue

@@ -24,7 +24,6 @@ export default {
     }
   },
   created() {
-    window['is'] = this
     this.getOption()
   },
 

+ 38 - 12
src/views/dashboard-screen/qb-dlsbxjdx/index.vue

@@ -4,23 +4,25 @@
       <v-chart autoresize :option="option"/>
     </div>
     <div class="r-coner">
-      <div class="c-item">100%</div>
-      <div class="c-item">100%</div>
-      <div class="c-item">100%</div>
-      <div class="c-item">100%</div>
-      <div class="c-item">100%</div>
+      <div class="c-item">{{ arrMap['单元'].per }}%</div>
+      <div class="c-item">{{ arrMap['变电所'].per }}%</div>
+      <div class="c-item">{{ arrMap['配电所'].per }}%</div>
+      <div class="c-item">{{ arrMap['电源线'].per }}%</div>
+      <div class="c-item">{{ arrMap['箱变'].per }}%</div>
     </div>
   </div>
 </template>
 
 <script>
 import * as echarts from 'echarts'
+import {chartQbdlsbxjdx} from '@/api/dashboard-json'
 
 export default {
   name: 'QbDlsbxjdx',
   data() {
     return {
-      option: {}
+      option: {},
+      arrMap: {}
     }
   },
   created() {
@@ -28,13 +30,34 @@ export default {
   },
 
   methods: {
-    getOption() {
+    async getOption() {
+      window['tis'] = this
+      let keys = []
+      const maxs = []
+      const values = []
+      const res = await chartQbdlsbxjdx()
+      if (res?.code === 200) {
+        keys = res?.info.xaxis
+        res?.info.xaxis.forEach((key, index) => {
+          maxs.push(res.info.series[0].data[index])
+          values.push(res.info.series[1].data[index])
+          const keyMap = {
+            [res?.info.series[0].name]: res.info.series[0].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)
+          }
+
+          this.arrMap[key] = keyMap
+        })
+      }
+      window['max'] = maxs.reverse()
+      window['values'] = values.reverse()
       const CubeLeft = echarts.graphic.extendShape({
         shape: {
           x: 0,
           y: 0
         },
-        buildPath: function(ctx, shape) {
+        buildPath: (ctx, shape) => {
           const yAxisPoint = shape.yAxisPoint
           const c0 = [shape.x, shape.y]
           const c1 = [shape.x + 9, shape.y - 9]
@@ -73,8 +96,10 @@ export default {
       echarts.graphic.registerShape('CubeLeft', CubeLeft)
       echarts.graphic.registerShape('CubeRight', CubeRight)
       echarts.graphic.registerShape('CubeTop', CubeTop)
-      const MAX = [100, 220, 200, 150, 200]
-      const VALUE = [20, 10, 30, 50, 150]
+      // const MAX = [100, 220, 200, 150, 200]
+      const MAX = maxs
+      // const VALUE = [20, 10, 30, 50, 150]
+      const VALUE = values
       const NAMES = ['箱变', '电源线', '配电所', '变电所', '单元']
       this.option = {
         grid: {
@@ -279,9 +304,10 @@ export default {
 
             normal: {
               show: true,
-              position: ['90%', '-100%'],
+              position: ['80%', '-100%'],
               formatter: (e) => {
-                return e.value
+                const ret = `${values[e.dataIndex]}/${maxs[e.dataIndex]}`
+                return ret
               },
               fontSize: this.EchartfontSize(14),
               color: '#fff'

+ 0 - 1
src/views/dashboard-screen/screen/syjhdxqk/index.vue

@@ -66,7 +66,6 @@ export default {
         })
         this.arrMap = arrMap
       }
-      window['is'] = this
       const baseWidth = this.EchartfontSize(16)
       const offsetWidth = this.EchartfontSize(14)
       const triangleHeight = 8

+ 0 - 1
src/views/dashboard-screen/syjhdxqk/index.vue

@@ -66,7 +66,6 @@ export default {
         })
         this.arrMap = arrMap
       }
-      window['is'] = this
       const baseWidth = this.EchartfontSize(16)
       const offsetWidth = this.EchartfontSize(14)
       const triangleHeight = 8