Browse Source

2024-11-03 大屏显示修改

luguang 3 weeks ago
parent
commit
c269bfb372
2 changed files with 20 additions and 14 deletions
  1. 13 7
      src/components/echart/centerRight/centerRightChart/chart.vue
  2. 7 7
      src/views/index.vue

+ 13 - 7
src/components/echart/centerRight/centerRightChart/chart.vue

@@ -45,7 +45,7 @@ export default {
           },
           },
           legend: {
           legend: {
             right: 20,
             right: 20,
-            data: ['昨日产量', '临时库存']
+            data: ['昨日产量(箱)', '临时库存(箱)']
           },
           },
 
 
           grid: {
           grid: {
@@ -79,7 +79,7 @@ export default {
           ],
           ],
           series: [
           series: [
             {
             {
-              name: '昨日产量',
+              name: '昨日产量(箱)',
               type: 'bar',
               type: 'bar',
               barWidth: '30%',
               barWidth: '30%',
               itemStyle: {
               itemStyle: {
@@ -95,7 +95,10 @@ export default {
                 }
                 }
               },
               },
               label: {
               label: {
-                formatter: '{c} 箱',
+                formatter:function(params){
+                  return params.value + ' 箱\n' + params.name + ' 枚'
+                },
+                // formatter: '{c} 箱 \n {a} 枚',
                 textStyle: {
                 textStyle: {
                   // 文本样式
                   // 文本样式
                   color: '#83bff6', // 文本颜色
                   color: '#83bff6', // 文本颜色
@@ -104,10 +107,10 @@ export default {
                 show: true, // 显示数值
                 show: true, // 显示数值
                 position: 'right' // 数值显示的位置
                 position: 'right' // 数值显示的位置
               },
               },
-              data: this.info.production
+              data: this.info.production1
             },
             },
             {
             {
-              name: '临时库存',
+              name: '临时库存(箱)',
               type: 'bar',
               type: 'bar',
               barWidth: '30%',
               barWidth: '30%',
               itemStyle: {
               itemStyle: {
@@ -123,7 +126,10 @@ export default {
                 }
                 }
               },
               },
               label: {
               label: {
-                formatter: '{c} 箱',
+                formatter:function(params){
+                  return params.value + ' 箱\n' + params.name + ' 枚'
+                },
+                // formatter: '{c} 箱',
                 textStyle: {
                 textStyle: {
                   // 文本样式
                   // 文本样式
                   color: '#14D7C7', // 文本颜色
                   color: '#14D7C7', // 文本颜色
@@ -137,7 +143,7 @@ export default {
                 color: 'none'
                 color: 'none'
                 // borderRadius: [20, 20, 20, 20],
                 // borderRadius: [20, 20, 20, 20],
               },
               },
-              data: newData.inventory
+              data: newData.inventory1
             }
             }
           ]
           ]
         }
         }

+ 7 - 7
src/views/index.vue

@@ -26,7 +26,7 @@
         <!-- 第二行-->
         <!-- 第二行-->
         <div class="wrapperTop">
         <div class="wrapperTop">
           <swiper
           <swiper
-            v-if="showTop"
+
             class="swiper-containewTop"
             class="swiper-containewTop"
             ref="mySwiperTop"
             ref="mySwiperTop"
             :options="swiperOptionsTop"
             :options="swiperOptionsTop"
@@ -117,7 +117,7 @@ export default {
         loop: true,
         loop: true,
         // 循环时间(毫秒)
         // 循环时间(毫秒)
         autoplay: 0,
         autoplay: 0,
-        speed: 1000
+        // speed: 1000
       },
       },
       deptInfo: {
       deptInfo: {
         name: ['造币三部','造币二部','造币一部'],
         name: ['造币三部','造币二部','造币一部'],
@@ -163,7 +163,7 @@ export default {
   created() {
   created() {
     setTimeout(() => {
     setTimeout(() => {
       this.getTableData()
       this.getTableData()
-    }, 500)
+    }, 800)
   },
   },
   beforeDestroy() {},
   beforeDestroy() {},
   methods: {
   methods: {
@@ -194,7 +194,7 @@ export default {
         }
         }
         if (this.dayInfoList.length > 1) {
         if (this.dayInfoList.length > 1) {
           this.swiperOptionsTop = {
           this.swiperOptionsTop = {
-            direction: 'vertical',
+            // direction: 'vertical',
             // 循环不间断图片连在一起
             // 循环不间断图片连在一起
             loop: true,
             loop: true,
             // 循环时间(毫秒)
             // 循环时间(毫秒)
@@ -203,7 +203,7 @@ export default {
           }
           }
         } else {
         } else {
           this.swiperOptionsTop = {
           this.swiperOptionsTop = {
-            direction: 'vertical',
+            // direction: 'vertical',
             // 循环时间(毫秒)
             // 循环时间(毫秒)
             autoplay: 0,
             autoplay: 0,
           }
           }
@@ -213,8 +213,8 @@ export default {
         this.deptInfo = retObj.deptInfo
         this.deptInfo = retObj.deptInfo
         this.securitiesInfo = retObj.securitiesInfo
         this.securitiesInfo = retObj.securitiesInfo
         this.$nextTick(() => {
         this.$nextTick(() => {
-          this.$refs.center02.updateData()
-          this.$refs.center01.updateData()
+          // this.$refs.center02.updateData()
+          // this.$refs.center01.updateData()
         })
         })
       }
       }
       this.showTop = true
       this.showTop = true