payne
2024-04-26 3946fe3c23ff022b7e1d27c2a29041496ef6d529
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
<template>
  <div class="top-middle-cmp">
    <div class="chart-name">
 
      <dv-decoration-3 style="width:200px;height:20px;" />
    </div>
    <dv-charts :option="option" />
  </div>
</template>
 
<script>
  export default {
    name: 'TopMiddleCmp',
    data() {
      return {
        option: {
          legend: {
            data: ['设备完好率'],
            textStyle: {
              fill: '#fff'
            }
          },
          xAxis: {
            data: [
              '10/01', '10/02', '10/03', '10/04', '10/05', '10/06',
              '10/07', '10/07', '10/08', '10/09', '10/10', '10/11',
              '10/12', '10/13', '10/14', '10/15'
            ],
            boundaryGap: false,
            axisLine: {
              style: {
                stroke: '#999'
              }
            },
            axisLabel: {
              style: {
                fill: '#999'
              }
            },
            axisTick: {
              show: false
            }
          },
          yAxis: {
            data: 'value',
            splitLine: {
              show: false
            },
            axisLine: {
              style: {
                stroke: '#999'
              }
            },
            axisLabel: {
              style: {
                fill: '#999'
              },
              formatter({
                value
              }) {
                return value.toFixed(2)
              }
            },
            axisTick: {
              show: false
            },
            min: 95,
            max: 100,
            interval: 1
          },
          series: [{
            data: [
              99.56, 99.66, 99.84, 99.22, 99.11, 99.45,
              99.44, 99.81, 99.84, 99.32, 99.14, 99.45,
              99.15, 99.45, 99.64, 99.89
            ],
            type: 'line',
            name: '设备完好率',
            smooth: true,
            lineArea: {
              show: true,
              gradient: ['rgba(55, 162, 218, 0.6)', 'rgba(55, 162, 218, 0)']
            }
            // linePoint: {
            //   radius: 4,
            //   style: {
            //     fill: '#00db95'
            //   }
            // }
          }]
        }
      }
    }
  }
</script>
 
<style lang="less">
  .top-middle-cmp {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background-color: rgba(6, 30, 93, 0.5);
 
    .chart-name {
      position: absolute;
      left: 10px;
      //text-align: right;
      font-size: 20px;
      top: 10px;
    }
  }
</style>