|
@@ -17,8 +17,8 @@
|
|
|
<div class="value">运维部</div>
|
|
|
</div>
|
|
|
<div class="item">
|
|
|
- <div class="key">主营业务</div>
|
|
|
- <div class="value">人工智能技术服务</div>
|
|
|
+ <div class="key">设备位置</div>
|
|
|
+ <div class="value">1号楼-1F</div>
|
|
|
</div>
|
|
|
<div class="item">
|
|
|
<div class="key">生产厂家</div>
|
|
@@ -147,12 +147,57 @@
|
|
|
<div class="center">
|
|
|
<div class="center-top">
|
|
|
<box label="实时数据">
|
|
|
- <div ref="chart1" class="right-chart"></div>
|
|
|
+ <div class="device-data">
|
|
|
+ <div class="device-list">
|
|
|
+ <div class="device-item">
|
|
|
+ <span>设备状态</span>
|
|
|
+ <span class="color-green state">在线</span>
|
|
|
+ </div>
|
|
|
+ <div class="device-item">
|
|
|
+ <span>运行状态</span>
|
|
|
+ <span class="color-green state">开启</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="device-test">
|
|
|
+ <div class="test-item">
|
|
|
+ <div class="test-icon all"></div>
|
|
|
+ <div class="test-content">
|
|
|
+ <div class="name">传感器数量</div>
|
|
|
+ <div class="number">
|
|
|
+ <span class="const alibaba">3</span>
|
|
|
+ <span class="unit">个</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="test-item">
|
|
|
+ <div class="test-icon open"></div>
|
|
|
+ <div class="test-content">
|
|
|
+ <div class="name">开启数量</div>
|
|
|
+ <div class="number">
|
|
|
+ <span class="const alibaba">3</span>
|
|
|
+ <span class="unit">个</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="test-item">
|
|
|
+ <div class="test-icon fault"></div>
|
|
|
+ <div class="test-content">
|
|
|
+ <div class="name">故障数量</div>
|
|
|
+ <div class="number">
|
|
|
+ <span class="const alibaba">0</span>
|
|
|
+ <span class="unit">个</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</box>
|
|
|
</div>
|
|
|
<div class="center-bottom">
|
|
|
<box label="设备模型">
|
|
|
- <three-model url="https://file-node.oss-cn-shanghai.aliyuncs.com/youji/f1e6fc9ca6ed46e79ba18d0a3f1b73dc" :type="1">
|
|
|
+ <three-model
|
|
|
+ url="https://file-node.oss-cn-shanghai.aliyuncs.com/youji/f1e6fc9ca6ed46e79ba18d0a3f1b73dc"
|
|
|
+ :type="1">
|
|
|
</three-model>
|
|
|
</box>
|
|
|
</div>
|
|
@@ -245,10 +290,113 @@
|
|
|
created() {},
|
|
|
mounted() {
|
|
|
this.$nextTick(() => {
|
|
|
- this.init()
|
|
|
+ this.init();
|
|
|
+ this.chart(this.$refs.chart1, ['3:00', '6:00', '9:00', '12:00', '15:00', '18:00', '21:00',
|
|
|
+ '24:00'
|
|
|
+ ], [3, 4, 2, 5, 6, 4, 7, 3])
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ chart(elem, x, data) {
|
|
|
+ let chart = echarts.init(elem);
|
|
|
+ let option = {
|
|
|
+ tooltip: {
|
|
|
+ show: true,
|
|
|
+ trigger: 'axis',
|
|
|
+ formatter: function() {
|
|
|
+ return ''
|
|
|
+ },
|
|
|
+ backgroundColor: 'rgba(255,255,255,0)',
|
|
|
+ borderWidth: 0,
|
|
|
+ padding: 0,
|
|
|
+ axisPointer: {
|
|
|
+ lineStyle: {
|
|
|
+ type: 'solid',
|
|
|
+ color: '#4E5561',
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ left: '5',
|
|
|
+ top: '15',
|
|
|
+ right: '10',
|
|
|
+ bottom: '0',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ color: ['#d39524'],
|
|
|
+ xAxis: {
|
|
|
+ type: 'category',
|
|
|
+ data: x,
|
|
|
+ axisLabel: {
|
|
|
+ margin: 4,
|
|
|
+ color: '#D0DEEE',
|
|
|
+ fontSize: 10
|
|
|
+ },
|
|
|
+ boundaryGap: false,
|
|
|
+ axisLine: {
|
|
|
+ lineStyle: {
|
|
|
+ color: '#6C8097'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ axisTick: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'value',
|
|
|
+ axisLabel: {
|
|
|
+ margin: 10,
|
|
|
+ color: '#D0DEEE',
|
|
|
+ fontSize: 10
|
|
|
+ },
|
|
|
+ splitLine: {
|
|
|
+ show: true,
|
|
|
+ lineStyle: {
|
|
|
+ color: 'rgba(108,128,151,0.3)',
|
|
|
+ type: 'dashed'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: [{
|
|
|
+ data: data,
|
|
|
+ type: 'line',
|
|
|
+ symbolSize: 6,
|
|
|
+ areaStyle: {
|
|
|
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
|
|
+ offset: 0,
|
|
|
+ color: 'rgba(229,154,61,0.15)'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ offset: 1,
|
|
|
+ color: 'rgba(229,154,61,0)'
|
|
|
+ }
|
|
|
+ ])
|
|
|
+ },
|
|
|
+ z: 99
|
|
|
+ }, {
|
|
|
+ data: data,
|
|
|
+ type: 'line',
|
|
|
+ showSymbol: false,
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ color: '#D0DEEE'
|
|
|
+ },
|
|
|
+ areaStyle: {
|
|
|
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
|
|
+ offset: 0,
|
|
|
+ color: 'rgba(229,154,61,0.15)'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ offset: 1,
|
|
|
+ color: 'rgba(229,154,61,0)'
|
|
|
+ }
|
|
|
+ ])
|
|
|
+ },
|
|
|
+ z: 99
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ chart.setOption(option);
|
|
|
+ },
|
|
|
init() {
|
|
|
let myChart = echarts.init(this.$refs.chart2);
|
|
|
// option
|
|
@@ -269,7 +417,7 @@
|
|
|
},
|
|
|
textStyle: {
|
|
|
color: "rgba(255,255,255,.6)",
|
|
|
- fontSize: 12,
|
|
|
+ fontSize: 10,
|
|
|
},
|
|
|
},
|
|
|
axisLine: {
|
|
@@ -295,7 +443,7 @@
|
|
|
axisLabel: {
|
|
|
textStyle: {
|
|
|
color: "rgba(255,255,255,.6)",
|
|
|
- fontSize: 12,
|
|
|
+ fontSize: 10,
|
|
|
},
|
|
|
},
|
|
|
splitLine: {
|
|
@@ -523,40 +671,6 @@
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
- .test-item {
|
|
|
- width: 146px;
|
|
|
- height: 50px;
|
|
|
- font-size: 12px;
|
|
|
- background-size: 100% 100%;
|
|
|
- background-repeat: no-repeat;
|
|
|
- position: relative;
|
|
|
- background-image: url('../../../assets/img/device/2.png');
|
|
|
- position: relative;
|
|
|
-
|
|
|
- .label {
|
|
|
- position: absolute;
|
|
|
- left: 35px;
|
|
|
- top: 2px;
|
|
|
- color: RGBA(26, 236, 104, 0.7);
|
|
|
- }
|
|
|
-
|
|
|
- .value {
|
|
|
- position: absolute;
|
|
|
- top: 21px;
|
|
|
- left: 42px;
|
|
|
- font-size: 15px;
|
|
|
- color: #fff;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .alarm {
|
|
|
- background-image: url('../../../assets/img/device/4.png');
|
|
|
-
|
|
|
- .label {
|
|
|
- color: RGBA(254, 61, 52, 0.7);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
.record-item {
|
|
|
height: 30px;
|
|
|
display: flex;
|
|
@@ -597,6 +711,102 @@
|
|
|
padding: 10px 0;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
+
|
|
|
+ .device-data {
|
|
|
+ height: 140px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ }
|
|
|
+
|
|
|
+ .device-list {
|
|
|
+ margin-top: 15px;
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
+
|
|
|
+ .device-data .device-item {
|
|
|
+ flex: 1;
|
|
|
+ width: 0;
|
|
|
+ overflow: hidden;
|
|
|
+ padding: 0 16px;
|
|
|
+ height: 48px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin-right: 18px;
|
|
|
+ background: url(../../../assets/image/environment/device-bg.png) no-repeat;
|
|
|
+ background-size: contain;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .device-data .device-item:last-child {
|
|
|
+ margin-right: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .device-data .state {
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+
|
|
|
+ .device-data .device-test {
|
|
|
+ display: flex;
|
|
|
+ flex: 1;
|
|
|
+ height: 0;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .device-data .test-item {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ flex: 1;
|
|
|
+ width: 0;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+
|
|
|
+ .device-data .test-icon {
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-size: contain;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .device-data .all {
|
|
|
+ width: 46px;
|
|
|
+ height: 46px;
|
|
|
+ margin-right: 13px;
|
|
|
+ background-image: url(../../../assets/image/environment/all.png);
|
|
|
+ }
|
|
|
+
|
|
|
+ .device-data .open {
|
|
|
+ width: 52px;
|
|
|
+ height: 46px;
|
|
|
+ margin-right: 7px;
|
|
|
+ background-image: url(../../../assets/image/environment/open.png);
|
|
|
+ }
|
|
|
+
|
|
|
+ .device-data .fault {
|
|
|
+ width: 46px;
|
|
|
+ height: 46px;
|
|
|
+ margin-right: 13px;
|
|
|
+ background-image: url(../../../assets/image/environment/fault.png);
|
|
|
+ }
|
|
|
+
|
|
|
+ .device-data .number {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .device-data .name {
|
|
|
+ font-size: 12px;
|
|
|
+ margin-bottom: 2px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .device-data .const {
|
|
|
+ font-size: 20px;
|
|
|
+ margin-right: 4px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .device-data .unit {
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.center-bottom {
|