|
|
@@ -8,70 +8,81 @@
|
|
|
<div class="other-people-title">
|
|
|
设备信息统计
|
|
|
</div>
|
|
|
- <div class="thisContent">
|
|
|
- <h5>设备运行时间 <s class="timeShow">{{timeShow}}</s></h5>
|
|
|
- <ul>
|
|
|
- <li>
|
|
|
- <div class="ringCircle">
|
|
|
- <Ring></Ring>
|
|
|
- </div>
|
|
|
- <em>{{info.state}}</em>
|
|
|
- <span>设备状态</span>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <div class="ringCircle">
|
|
|
- <Ring></Ring>
|
|
|
- </div>
|
|
|
- <em>{{info.warning}}台</em>
|
|
|
- <span>可疑事件数</span>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
+ <div class="timePart">
|
|
|
+ <div class="lt">
|
|
|
+ <h5>设备运行时间 <s>EQUIP ACTIVE TIME</s></h5>
|
|
|
+ <P>{{time}}</P>
|
|
|
+ <span><s>可疑事件 WARNING EVENT</s> <em>{{dangerItem}}</em></span>
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <em>STOP</em>
|
|
|
+ <i v-if="i == 1"></i>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <em>SLOW</em>
|
|
|
+ <i v-if="i == 2"></i>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <em>NORMAL</em>
|
|
|
+ <i v-if="i == 3"></i>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <em>RACING</em>
|
|
|
+ <i v-if="i == 4"></i>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="rt">
|
|
|
+ <div class="top">
|
|
|
+ <h5>在线</h5>
|
|
|
+ <s>ONLINE</s>
|
|
|
+ <i v-if="state"></i>
|
|
|
+ </div>
|
|
|
+ <div class="middle">
|
|
|
+ <span>设备运行状态</span>
|
|
|
+ <s>EQUIP ACTIVE STATE</s>
|
|
|
+ </div>
|
|
|
+ <div class="bottom">
|
|
|
+ <h5>离线</h5>
|
|
|
+ <s>OFFLINE</s>
|
|
|
+ <i v-if="!state"></i>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- // todo 接收main。vue 传入的参数并渲染 ,本身不请求Ajax
|
|
|
- import Ring from '@/components/Ring.vue'
|
|
|
+ // 数据获取ajax todo
|
|
|
export default {
|
|
|
- data(){
|
|
|
- return{
|
|
|
- timeShow: ' 00 : 00 : 00',
|
|
|
- info:{
|
|
|
- state:'在线',
|
|
|
- warning:72,
|
|
|
- }
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ i: 3,
|
|
|
+ state: true,
|
|
|
+ time: '00:00:00',
|
|
|
+ dangerItem: '46',
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- // this.timeRun();
|
|
|
- // this.timer = setInterval(() => {
|
|
|
- // this.timeRun();
|
|
|
- // }, 1000);
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ this.test();
|
|
|
+ }, 1000);
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
clearInterval(this.timer);
|
|
|
},
|
|
|
methods: {
|
|
|
- // 显示设备持续时间
|
|
|
- timeRun() {
|
|
|
- let seconds = this.seconds;
|
|
|
- let hour = parseInt(seconds / 3600);
|
|
|
- let r = parseInt(seconds % 3600);
|
|
|
- let m = parseInt(r / 60);
|
|
|
- let s = parseInt(r % 60);
|
|
|
- hour = hour > 9 ? hour : '0' + hour;
|
|
|
- m = m > 9 ? m : '0' + m;
|
|
|
- s = s > 9 ? s : '0' + s;
|
|
|
- let res = hour + " : " + m + " : " + s;
|
|
|
- this.timeShow = res;
|
|
|
- this.seconds += 1;
|
|
|
+ test: function () {
|
|
|
+ let house = new Date().getHours();
|
|
|
+ let min = new Date().getMinutes();
|
|
|
+ let sec = new Date().getSeconds();
|
|
|
+ this.time = house + ":" + min + ":" +sec;
|
|
|
+ this.dangerItem = Math.floor(Math.random()*10) * 2;
|
|
|
+ this.state = Math.floor(Math.random()*2) == 2;
|
|
|
+ this.i = Math.floor(Math.random()*3);
|
|
|
},
|
|
|
},
|
|
|
- components: {
|
|
|
- Ring
|
|
|
- }
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
@@ -83,12 +94,14 @@
|
|
|
display: block;
|
|
|
margin: 0 auto;
|
|
|
}
|
|
|
+
|
|
|
.equipinfo {
|
|
|
width: 100%;
|
|
|
overflow: hidden;
|
|
|
display: block;
|
|
|
margin: 0 auto;
|
|
|
}
|
|
|
+
|
|
|
.other-people {
|
|
|
width: 439px;
|
|
|
height: 422px;
|
|
|
@@ -96,82 +109,235 @@
|
|
|
overflow: hidden;
|
|
|
background: #000F2A;
|
|
|
}
|
|
|
+
|
|
|
.equipinfo .image-border2 {
|
|
|
right: 0;
|
|
|
}
|
|
|
+
|
|
|
.equipinfo .image-border4 {
|
|
|
right: 0;
|
|
|
}
|
|
|
- ul,li {
|
|
|
+
|
|
|
+ ul, li {
|
|
|
list-style: none;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
}
|
|
|
- .thisContent ul {
|
|
|
- width: 80%;
|
|
|
- height: 100%;
|
|
|
+
|
|
|
+ em, s, i {
|
|
|
+ font-style: normal;
|
|
|
+ text-decoration: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .timePart {
|
|
|
+ width: 385px;
|
|
|
+ height: 170px;
|
|
|
overflow: hidden;
|
|
|
display: block;
|
|
|
- padding: 0 13px;
|
|
|
margin: 0 auto;
|
|
|
- margin-top: 60px;
|
|
|
+ margin-top: 120px;
|
|
|
}
|
|
|
- .thisContent ul li {
|
|
|
- width: 120px;
|
|
|
- height: 110px;
|
|
|
+
|
|
|
+ .timePart .lt {
|
|
|
+ width: 240px;
|
|
|
+ overflow: hidden;
|
|
|
+
|
|
|
float: left;
|
|
|
- margin-right: 20px;
|
|
|
}
|
|
|
- .thisContent ul li:nth-child(2){
|
|
|
- margin-right: 0;
|
|
|
+
|
|
|
+ .timePart .rt {
|
|
|
+ width: 140px;
|
|
|
+ overflow: hidden;
|
|
|
+
|
|
|
float: right;
|
|
|
}
|
|
|
- .ringCircle {
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
+
|
|
|
+ .timePart .lt h5 {
|
|
|
+ width: 100%;
|
|
|
overflow: hidden;
|
|
|
- border-radius: 250px;
|
|
|
- border:10px solid rgba(37,146,226,0.6) ;
|
|
|
+ display: block;
|
|
|
+ margin: 0 auto;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: normal;
|
|
|
+ color: #005EA2;
|
|
|
+ text-align: left;
|
|
|
}
|
|
|
- .thisContent li em {
|
|
|
- position: relative;
|
|
|
+
|
|
|
+ .timePart .lt s {
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .timePart .lt p {
|
|
|
width: 100%;
|
|
|
overflow: hidden;
|
|
|
display: block;
|
|
|
margin: 0 auto;
|
|
|
- bottom: 75px;
|
|
|
- color: #67BFFF;
|
|
|
- font-size: 18px;
|
|
|
- text-align: center;
|
|
|
- font-style: normal;
|
|
|
+ font-size: 72px;
|
|
|
+ color: #005EA2;
|
|
|
+ text-align: left;
|
|
|
+ font-family: UniDreamLED;
|
|
|
+ letter-spacing:8px;
|
|
|
}
|
|
|
- .thisContent li span {
|
|
|
- position: relative;
|
|
|
- bottom: 20px;
|
|
|
- color: #67BFFF;
|
|
|
- font-size: 16px;
|
|
|
- text-align: center;
|
|
|
+
|
|
|
+ .timePart .lt span {
|
|
|
+ width: 100%;
|
|
|
+ overflow: hidden;
|
|
|
+ display: block;
|
|
|
+ margin: 0 auto;
|
|
|
+ font-size: 24px;
|
|
|
+ color: #005EA2;
|
|
|
+ text-align: right;
|
|
|
+
|
|
|
}
|
|
|
- .thisContent h5 {
|
|
|
- width: 320px;
|
|
|
- height: 43px;
|
|
|
- line-height: 43px;
|
|
|
+
|
|
|
+ .timePart .lt span em {
|
|
|
+ font-family: UniDreamLED;
|
|
|
+ }
|
|
|
+
|
|
|
+ .timePart .lt ul {
|
|
|
+ width: 100%;
|
|
|
+ overflow: hidden;
|
|
|
+ display: block;
|
|
|
+ margin: 0 auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .timePart .lt li {
|
|
|
+ width: 23%;
|
|
|
+ height: 25px;
|
|
|
+ background: #005EA2;
|
|
|
+ color: #fff;
|
|
|
text-align: center;
|
|
|
- color: #6DC1FF;
|
|
|
- font-size: 22px;
|
|
|
+ float: left;
|
|
|
+ margin-right: 6px;
|
|
|
+ font-size: 12px;
|
|
|
+ padding-top: 5px;
|
|
|
+ padding-bottom: 5px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .timePart .lt li:nth-child(4) {
|
|
|
+ margin-right: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .timePart .lt li i {
|
|
|
+ width: 90%;
|
|
|
+ overflow: hidden;
|
|
|
+ display: block;
|
|
|
+ margin: 0 auto;
|
|
|
+ margin-top: 5px;
|
|
|
+ height: 5px;
|
|
|
+ background: #fff;
|
|
|
+ }
|
|
|
+
|
|
|
+ .rt .top {
|
|
|
+ width: 100%;
|
|
|
+ height: 50px;
|
|
|
+ overflow: hidden;
|
|
|
+ display: block;
|
|
|
+ margin: 0 auto;
|
|
|
+ background: #005EA2;
|
|
|
+ color: #fff;
|
|
|
+ padding-top: 3px;
|
|
|
+ padding-bottom: 3px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .rt .top h5 {
|
|
|
+ width: 80px;
|
|
|
+ font-size: 24px;
|
|
|
margin: 0;
|
|
|
- margin-left: 41px;
|
|
|
- margin-top: 60px;
|
|
|
- margin-bottom: 19px;
|
|
|
- background: url("../assets/img/main/bigTitle.png") top center no-repeat;
|
|
|
- background-size: 100% 100%;
|
|
|
+ float: left;
|
|
|
+ text-align: left;
|
|
|
+ padding-left: 20px;
|
|
|
}
|
|
|
- .timeShow {
|
|
|
- text-decoration: none;
|
|
|
- line-height: 43px;
|
|
|
+
|
|
|
+ .rt .top s {
|
|
|
+ float: left;
|
|
|
+ font-size: 12px;
|
|
|
+ text-align: left;
|
|
|
+ padding-left: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .rt .top i {
|
|
|
+ position: relative;
|
|
|
+ top: -20px;
|
|
|
+ right: 10px;
|
|
|
+ float: right;
|
|
|
+ width: 15px;
|
|
|
+ height: 30px;
|
|
|
+ background: aliceblue;
|
|
|
+ }
|
|
|
+
|
|
|
+ .rt .middle {
|
|
|
+ width: 100%;
|
|
|
+ overflow: hidden;
|
|
|
+ display: block;
|
|
|
+ margin: 0 auto;
|
|
|
+ margin-top: 6px;
|
|
|
+ margin-bottom: 6px;
|
|
|
+ background: #005EA2;
|
|
|
+ color: #fff;
|
|
|
+ padding-top: 4px;
|
|
|
+ padding-bottom: 5px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .middle span {
|
|
|
+ width: 100%;
|
|
|
+ margin: 0 auto;
|
|
|
+ display: block;
|
|
|
+ font-size: 14px;
|
|
|
+ text-align: left;
|
|
|
+ padding-left: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .middle s {
|
|
|
+ width: 100%;
|
|
|
+ overflow: hidden;
|
|
|
+ display: block;
|
|
|
+ margin: 0 auto;
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .rt .bottom {
|
|
|
+ width: 100%;
|
|
|
+ height: 50px;
|
|
|
+ overflow: hidden;
|
|
|
+ display: block;
|
|
|
+ margin: 0 auto;
|
|
|
+ background: #005EA2;
|
|
|
+ color: #fff;
|
|
|
+ padding-top: 3px;
|
|
|
+ padding-bottom: 3px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .rt .bottom h5 {
|
|
|
+ width: 80px;
|
|
|
font-size: 24px;
|
|
|
- color: #6DC1FF;
|
|
|
- text-align: center;
|
|
|
- font-family: UnidreamLED;
|
|
|
+ margin: 0;
|
|
|
+ float: left;
|
|
|
+ text-align: left;
|
|
|
+ padding-left: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .rt .bottom s {
|
|
|
+ float: left;
|
|
|
+ font-size: 12px;
|
|
|
+ text-align: left;
|
|
|
+ padding-left: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .rt .bottom s {
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .rt .bottom i {
|
|
|
+ position: relative;
|
|
|
+ top: -20px;
|
|
|
+ right: 10px;
|
|
|
+ float: right;
|
|
|
+ width: 15px;
|
|
|
+ height: 30px;
|
|
|
+ background: linear-gradient(135deg,#fff 25%,#005EA2 0,
|
|
|
+ #005EA2 50%,#fff 0,
|
|
|
+ #fff 75%,#005EA2 0);
|
|
|
+ background-size: 12px 12px;
|
|
|
}
|
|
|
</style>
|