懒羊羊
2023-12-12 776fbe36aec576c164c9edfe6be13d833eaef7b9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<template>
  <div id="bottomRight">
    <div class="bg-color-black">
      <div class="d-flex pt-2 pl-2">
        <span>
          <icon name="chart-area" style="background-color: #ffffff" class="text-icon"></icon>
        </span>
        <div class="d-flex">
          <span class="fs-xl text mx-2">末工件节拍平均图</span>
          <div class="decoration2">
            <dv-decoration-2 :reverse="true" style="width:5px;height:6rem;" />
          </div>
        </div>
      </div>
      <div>
        <BottomRightChart />
<!--        <div id="chart" style="height: 500px;"></div>-->
      </div>
    </div>
  </div>
</template>
 
<script>
import BottomRightChart from "@/components/echart/bottom/bottomRightChart";
export default {
  components: {
    BottomRightChart
  },
  data () {
    return {
      xList:[],
      yList:[],
    }
  },
  mounted () {
    // this.$http.get('http://192.168.0.248:8083/passingStationCollection/bottomRightChart1')
    //     .then((response)=>{
    //       this.xList = response.data.data.xList;
    //       this.yList = response.data.data.yList;
    //       var chartDom = document.getElementById('chart');
    //       var myChart = echarts.init(chartDom);
    //       // 指定图表的配置项和数据
    //       var option;
    //       option = {
    //         title: {
    //           text: '单位:秒',
    //           textStyle: {
    //             fontSize: 14, // 标题大小
    //             color: '#2B6CB3'
    //           },
    //           // left: 'center', // 标题位置
    //         },
    //         grid: {//设置图表四周留白间距
    //           top: '10%',
    //           right: '6%',
    //           bottom: '12%',
    //           left: '6%'
    //         },
    //         xAxis: {
    //           show: true,
    //           type: 'category',
    //           boundaryGap: false,//设置x轴两边的留白
    //           axisTick: { //x轴刻度尺
    //             show: false
    //           },
    //           axisLine: {//x轴线条颜色
    //             lineStyle: {
    //               color: '#2B6CB3'
    //             }
    //           },
    //
    //           // data: ['9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00']
    //           data: response.data.data.xList
    //
    //         },
    //         yAxis: {
    //           type: 'value',
    //           max: 100,//最大刻度值
    //           interval: 20,//刻度值间隔值
    //           splitLine: {//网格线
    //             show: true, //关闭网格线
    //             // 或者
    //             lineStyle: {
    //               type: 'solid',    //设置网格线类型 dotted:虚线   solid:实线
    //               color: '#2B6CB3'  //网格线颜色
    //             },
    //           },
    //           axisLine: {//y轴线条颜色
    //             show: false,
    //             // lineStyle: {
    //             //     color: '#999'
    //             // }
    //           },
    //           axisLabel: {
    //             textStyle: {
    //               color: '#2B6CB3' // 设置文字颜色
    //             }
    //           }
    //         },
    //         series: [{
    //           // data: [1, 10, 100, 20, 15, 90, 23, 10, 20, 40],
    //           data: response.data.data.yList,
    //           type: 'line',
    //           // smooth: true,//面积图改成弧形状
    //           lineStyle: {
    //             width: 1,//外边线宽度
    //             color: '#00F9DF'//外边线颜色
    //           },
    //           // showSymbol: false,//去除面积图节点圆
    //           areaStyle: {//区域填充渐变颜色
    //             color: {
    //               type: 'linear',
    //               x: 0,
    //               y: 0,
    //               x2: 0,
    //               y2: 1,
    //               colorStops: [{
    //                 offset: 0, color: 'rgba(0,249,223,1)' // 0% 处的颜色
    //               }, {
    //                 offset: 1, color: 'rgba(0,135,185,0.11)' // 100% 处的颜色
    //               }],
    //               global: false // 缺省为 false
    //             }
    //           }
    //         }]
    //       };
    //       // 使用刚指定的配置项和数据显示图表
    //       myChart.setOption(option)
    // })
  }
};
</script>
 
<style lang="scss" class>
$box-height: 520px;
$box-width: 100%;
#bottomRight {
  padding: 14px 16px;
  height: $box-height;
  width: $box-width;
  border-radius: 5px;
  .bg-color-black {
    height: $box-height - 30px;
    border-radius: 10px;
  }
  .text {
    color: #c3cbde;
    font-size: 16px;
    margin-top: -1px;
  }
  //下滑线动态
  .decoration2 {
    position: absolute;
    right: 0.125rem;
  }
  .chart-box {
    margin-top: 16px;
    width: 170px;
    height: 170px;
    .active-ring-name {
      padding-top: 10px;
    }
  }
}
</style>