wangzhe 8 tháng trước cách đây
mục cha
commit
d9eb6fa3f6
2 tập tin đã thay đổi với 61 bổ sung51 xóa
  1. 2 0
      screen-demo/src/main.js
  2. 59 51
      screen-demo/src/views/templateInstance.vue

+ 2 - 0
screen-demo/src/main.js

@@ -25,6 +25,8 @@ postMsgUtil.listen("checkCrossResult", function ({data}) {
   Vue.prototype.isCross = data !== 200
   localStorage.setItem('isCross', data !== 200)
 });
+
+
 new Vue({
   router,
   render: h => h(App),

+ 59 - 51
screen-demo/src/views/templateInstance.vue

@@ -67,7 +67,7 @@
       </div>
       <div class="container">
         <div style="height: 160px; overflow-y: auto;">
-          <div class="content red" v-for="item in timeX" :key="item">
+          <div class="content red" v-for="(item, index) in timeX" :key="item+index">
             <div class="icon"></div>
             {{item.name}}
             <span>{{ item.value }}</span>
@@ -388,10 +388,10 @@ export default {
           },
           axisLabel: {
             show: true,
-            textStyle: {
+            // textStyle: {
               color: "rgba(250,250,250,0.6)", //X轴文字颜色
               fontSize: 16,
-            },
+            // },
           },
           splitArea: {
             show: true,
@@ -423,10 +423,10 @@ export default {
             },
             axisLabel: {
               show: true,
-              textStyle: {
+              // textStyle: {
                 color: "rgba(250,250,250,0.6)",
                 fontSize: 16,
-              },
+              // },
             },
           },
           {
@@ -449,10 +449,10 @@ export default {
             axisLabel: {
               show: true,
               formatter: "{value} %", //右侧Y轴文字显示
-              textStyle: {
+              // textStyle: {
                 color: "rgba(250,250,250,0.6)",
                 fontSize: 16,
-              },
+              // },
             },
           },
         ],
@@ -498,7 +498,7 @@ export default {
             type: "bar",
             barWidth: 15, //增加柱子的宽度
             itemStyle: {
-              normal: {
+              // normal: {
                 color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                   {
                     offset: 0,
@@ -526,7 +526,7 @@ export default {
                 barMinHeight: 5, // 设置柱子最小高度
                 barWidth: "50%", // 设置柱子宽度
                 barShape: "diamond", // 设置柱状图顶部为菱形
-              },
+              // },
             },
             data: result.data.sourceList.map(o=>o.orderNum),
           },
@@ -677,9 +677,9 @@ export default {
             axisLabel: {
               show: true,
               align: "left",
-              textStyle: {
+              // textStyle: {
                 color: "#66cc00",
-              },
+              // },
               formatter: function (value, index) {
                 var num = "";
                 var str = "";
@@ -782,10 +782,10 @@ export default {
             axisLine: "none",
             show: true,
             axisLabel: {
-              textStyle: {
+              // textStyle: {
                 color: "#ffffff",
                 fontSize: "12",
-              },
+              // },
             },
             data: getValue,
           },
@@ -796,8 +796,9 @@ export default {
             type: "bar",
             zlevel: 1,
             itemStyle: {
-              normal: {
-                barBorderRadius: 5, // Adjusted to 5
+              // normal: {
+              //   barBorderRadius: 5, // Adjusted to 5
+              borderRadius: 5, // Adjusted to 5
                 color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                   {
                     offset: 0,
@@ -808,7 +809,7 @@ export default {
                     color: "rgb(46,200,207,1)",
                   },
                 ]),
-              },
+              // },
             },
             barWidth: 5, // Adjusted to 5
             data: getValue,
@@ -820,10 +821,11 @@ export default {
             barGap: "-50%", // Adjusted to "-50%"
             data: getMax,
             itemStyle: {
-              normal: {
+              // normal: {
                 color: "rgba(24,31,68,1)",
-                barBorderRadius: 5, // Adjusted to 5
-              },
+                // barBorderRadius: 5, // Adjusted to 5
+              borderRadius: 5, // Adjusted to 5
+              // },
             },
           },
         ],
@@ -890,8 +892,8 @@ export default {
               length: 0,
               length2: 20
             },
-            itemStyle: {
-              emphasis: {
+            emphasis: {
+              itemStyle: {
                 shadowBlur: 10,
                 shadowOffsetX: 0,
                 shadowColor: 'rgba(0, 0, 0, 0.5)'
@@ -954,9 +956,9 @@ export default {
             axisLabel: {
               show: true,
               align: "left",
-              textStyle: {
+              // textStyle: {
                 color: "#66cc00",
-              },
+              // },
               formatter: function (value, index) {
                 var num = "";
                 var str = "";
@@ -1059,10 +1061,10 @@ export default {
             axisLine: "none",
             show: true,
             axisLabel: {
-              textStyle: {
+              // textStyle: {
                 color: "#ffffff",
                 fontSize: "12",
-              },
+              // },
             },
             data: getValue,
           },
@@ -1073,8 +1075,9 @@ export default {
             type: "bar",
             zlevel: 1,
             itemStyle: {
-              normal: {
-                barBorderRadius: 5, // Adjusted to 5
+              // normal: {
+              //   barBorderRadius: 5, // Adjusted to 5
+              borderRadius: 5, // Adjusted to 5
                 color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                   {
                     offset: 0,
@@ -1085,7 +1088,7 @@ export default {
                     color: "rgb(46,200,207,1)",
                   },
                 ]),
-              },
+              // },
             },
             barWidth: 5, // Adjusted to 5
             data: getValue,
@@ -1097,10 +1100,11 @@ export default {
             barGap: "-50%", // Adjusted to "-50%"
             data: getMax,
             itemStyle: {
-              normal: {
+              // normal: {
                 color: "rgba(24,31,68,1)",
-                barBorderRadius: 5, // Adjusted to 5
-              },
+                // barBorderRadius: 5, // Adjusted to 5
+                borderRadius: 5, // Adjusted to 5
+              // },
             },
           },
         ],
@@ -1156,9 +1160,9 @@ export default {
             axisLabel: {
               show: true,
               align: "left",
-              textStyle: {
+              // textStyle: {
                 color: "#66cc00",
-              },
+              // },
               formatter: function (value, index) {
                 var num = "";
                 var str = "";
@@ -1261,10 +1265,10 @@ export default {
             axisLine: "none",
             show: true,
             axisLabel: {
-              textStyle: {
+              // textStyle: {
                 color: "#ffffff",
                 fontSize: "12",
-              },
+              // },
             },
             data: getValue,
           },
@@ -1275,8 +1279,9 @@ export default {
             type: "bar",
             zlevel: 1,
             itemStyle: {
-              normal: {
-                barBorderRadius: 5, // Adjusted to 5
+              // normal: {
+              //   barBorderRadius: 5, // Adjusted to 5
+              borderRadius: 5, // Adjusted to 5
                 color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                   {
                     offset: 0,
@@ -1287,7 +1292,7 @@ export default {
                     color: "rgb(46,200,207,1)",
                   },
                 ]),
-              },
+              // },
             },
             barWidth: 5, // Adjusted to 5
             data: getValue,
@@ -1299,10 +1304,11 @@ export default {
             barGap: "-50%", // Adjusted to "-50%"
             data: getMax,
             itemStyle: {
-              normal: {
+              // normal: {
                 color: "rgba(24,31,68,1)",
-                barBorderRadius: 5, // Adjusted to 5
-              },
+                // barBorderRadius: 5, // Adjusted to 5
+              borderRadius: 5, // Adjusted to 5
+              // },
             },
           },
         ],
@@ -1364,9 +1370,9 @@ export default {
             axisLabel: {
               show: true,
               align: "left",
-              textStyle: {
+              // textStyle: {
                 color: "#66cc00",
-              },
+              // },
               formatter: function (value, index) {
                 var num = "";
                 var str = "";
@@ -1469,10 +1475,10 @@ export default {
             axisLine: "none",
             show: true,
             axisLabel: {
-              textStyle: {
+              // textStyle: {
                 color: "#ffffff",
                 fontSize: "12",
-              },
+              // },
             },
             data: getValue,
           },
@@ -1483,8 +1489,9 @@ export default {
             type: "bar",
             zlevel: 1,
             itemStyle: {
-              normal: {
-                barBorderRadius: 5, // Adjusted to 5
+              // normal: {
+              //   barBorderRadius: 5, // Adjusted to 5
+              borderRadius: 5, // Adjusted to 5
                 color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                   {
                     offset: 0,
@@ -1495,7 +1502,7 @@ export default {
                     color: "rgb(46,200,207,1)",
                   },
                 ]),
-              },
+              // },
             },
             barWidth: 5, // Adjusted to 5
             data: getValue,
@@ -1507,10 +1514,11 @@ export default {
             barGap: "-50%", // Adjusted to "-50%"
             data: getMax,
             itemStyle: {
-              normal: {
+              // normal: {
                 color: "rgba(24,31,68,1)",
-                barBorderRadius: 5, // Adjusted to 5
-              },
+                // barBorderRadius: 5, // Adjusted to 5
+              borderRadius: 5, // Adjusted to 5
+              // },
             },
           },
         ],