2 Commits 50f6c889ad ... 51fedbc264

Author SHA1 Message Date
  East 51fedbc264 Merge branch 'master' of http://192.168.1.7:3000/xsh1997/hyyfScreen 3 years ago
  East eadeb3f148 2022-01-06 3 years ago

+ 5 - 2
src/views/Production/Production.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-10-21 17:51:22
- * @LastEditTime: 2022-01-05 18:13:08
+ * @LastEditTime: 2022-01-06 10:08:05
  * @LastEditors: Please set LastEditors
  * @Description: 生产经营页面
  * @FilePath: \hyyfScreen\src\views\Production\Production.vue
@@ -141,7 +141,10 @@
                   "
                   class="num-common"
                 >
-                  {{ indicatorsData[indicatorIndex].titleNum }}
+                  {{
+                    indicatorsData[indicatorIndex].titleNum +
+                      (indicatorsData[indicatorIndex].percent ? "%" : "")
+                  }}
                 </span>
                 <span
                   :class="

+ 1 - 1
src/views/Production/board/IndicatorChart.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-11-22 15:10:07
- * @LastEditTime: 2022-01-05 14:40:38
+ * @LastEditTime: 2022-01-06 10:07:04
  * @LastEditors: Please set LastEditors
  * @Description: 指标图
  * @FilePath: \hyyfScreen\src\views\Production\board\IndicatorChart.vue

+ 6 - 2
src/views/Production/board/IndicatorItem.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-11-22 14:25:49
- * @LastEditTime: 2022-01-05 15:35:59
+ * @LastEditTime: 2022-01-06 10:07:24
  * @LastEditors: Please set LastEditors
  * @Description: 重点指标的 item
  * @FilePath: \hyyfScreen\src\views\Production\board\IndicatorItem.vue
@@ -20,7 +20,7 @@
       ></indicator-chart>
     </div>
     <div class="right">
-      <h3>{{ titleNum }}</h3>
+      <h3>{{ titleNum + (percent ? "%" : "") }}</h3>
       <span class="num-common" :class="ifPositive ? 'positive' : 'negative'">
         {{ subtitleNum }}
       </span>
@@ -59,6 +59,10 @@ export default {
       type: Object,
       required: true,
     },
+    percent: {
+      type: Boolean,
+      required: true,
+    },
   },
   components: {
     IndicatorChart,

+ 10 - 2
src/views/Production/board/IndicatorOneChart.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-11-22 17:00:48
- * @LastEditTime: 2022-01-05 15:39:43
+ * @LastEditTime: 2022-01-06 10:16:20
  * @LastEditors: Please set LastEditors
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: \hyyfScreen\src\views\Production\board\IndicatorOneChart.vue
@@ -23,6 +23,10 @@ export default {
       type: Object,
       required: true,
     },
+    percent: {
+      type: Boolean,
+      required: true,
+    },
   },
   data() {
     return {
@@ -31,7 +35,6 @@ export default {
   },
   methods: {
     init() {
-      console.log(123);
       let color1 = "rgba(0, 255, 0, 0.7)";
       let color2 = "rgba(64, 218, 26, 0.5)";
       let color3 = "rgba(88, 165, 69, 0.3)";
@@ -85,6 +88,11 @@ export default {
               width: 1,
             },
           },
+          axisLabel: {
+            show: true,
+            interval: "auto",
+            formatter: "{value}" + (this.percent ? "%" : ""),
+          },
         },
         series: [
           {