This commit is contained in:
2023-05-25 13:49:49 +08:00
parent 4f16dff32f
commit 351a1e2c65
5 changed files with 190 additions and 6 deletions

View File

@@ -294,6 +294,7 @@ export default {
float left
margin-top .39rem
width 10.4rem
margin-left .4rem
.check-box
width 1rem
.radio_checked
@@ -424,5 +425,5 @@ export default {
border-radius 10px
.setup_no
_font(.32rem, 1rem,#FD6A35,,)
margin-left .1rem
margin-left .4rem
</style>

View File

@@ -0,0 +1,174 @@
<template>
<section>
<div class="con1">
<button v-if="dataInfo.button_name" @click="clickSave">{{dataInfo.button_name}}</button>
</div>
<div class="con2">
<div class="infoli">
<img src="../../../images/aio/icon2.png">
<span class="title">设备信息</span>
<span class="txt">{{dataInfo.device_info}}</span>
</div>
<div class="infoli">
<img src="../../../images/aio/icon5.png">
<span class="title">当前任务</span>
<span class="txt">{{dataInfo.task_status}}</span>
</div>
<div class="infoli">
<img src="../../../images/aio/icon5.png">
<span class="title">任务状态</span>
<span class="txt">{{dataInfo.task_status}}</span>
</div>
<div class="infoli">
<img src="../../../images/aio/icon5.png">
<span class="title">任务数量</span>
<span class="txt">{{dataInfo.task_num}}</span>
</div>
<div class="infoli">
<img src="../../../images/aio/icon6.png">
<span class="title">当前速度</span>
<span class="txt">{{dataInfo.task_num}}</span>
</div>
<div class="infoli">
<img src="../../../images/aio/icon4.png">
<span class="title">AGV故障</span>
<span class="txt">{{dataInfo.agv_error}}</span>
</div>
</div>
</section>
</template>
<script>
import {queryHomePage, clickSave} from '@/config/getData.js'
import NavBar from '@components/NavBar.vue'
export default {
name: 'Home',
components: {
NavBar
},
data () {
return {
interTime: this.$store.getters.setTime,
timer: null,
dataInfo: {}
}
},
created () {
this.initData()
this.refresh()
},
beforeDestroy () {
clearInterval(this.timer)
},
methods: {
refresh () {
this.timer = setInterval(() => {
this.initData()
}, this.interTime)
},
async initData () {
let res = await queryHomePage()
if (res.code === '1') {
this.dataInfo = res.result
} else {
this.toast(res.desc)
}
},
async clickSave () {
if (!this.dataInfo.button_name) {
return
}
let res = await clickSave(this.dataInfo.button_code)
if (res.code === '1') {
this.toast(res.desc)
this.initData()
} else {
this.toast(res.desc)
}
}
}
}
</script>
<style lang="stylus" scoped>
@import '~@style/mixin'
.bgred
background #fa6400
.bggreen
background #54C0B3
.cred
color #fa6400
.cgreen
color #54C0B3
.con0
height 1rem
margin-top .26rem
margin-bottom .5rem
margin-left .4rem
.site_nav
_wh(2rem,1rem)
_bis('../../../images/aio/btn_dis.png',100%,100%)
margin-bottom .2rem
margin-right .3rem
&:nth-of-type(3)
margin-right 1.8rem
.site_nav_a
display block
_font(.32rem,1rem,,,center)
cursor pointer
color #ffffff
.active
_bis('../../../images/aio/btn_checked.png',100%,100%)
.white
color #464646
.con1
float left
position relative
width 4.62rem
height 4.62rem
background center / 100% 100% url(../../../images/aio/car2.png) no-repeat
margin-left .18rem
margin-right .35rem
margin-top 1rem
button
box-sizing border-box
width 3.7rem
height 1.08rem
border 8px solid #F1F1F5
border-radius 16px
font-size .3rem
background #ffffff
margin-top .1rem
margin-left .1rem
padding .03rem
.con2
float left
width 6.4rem
height 5.02rem
background center / 100% 100% url(../../../images/aio/bg2.png) no-repeat
padding-top .2rem
margin-top 1rem
.infoli
width 6rem
line-height 0.68rem
height 0.68rem
background #ffffff
margin 0 auto
// margin-bottom 2px
border-bottom 1px dotted #cccccc
img
float left
margin .22rem .15rem 0 .31rem
width .26rem
height .26rem
.title
float left
display inline-block
font-size .24rem
color #323232
.txt
float left
display inline-block
font-size .3rem
color #FA6400
</style>

View File

@@ -7,7 +7,7 @@
<div class="con">
<div class="box1">
<!-- <div class="point fl" v-for="e in dataList" :key="e.id">{{e.code}}</div> -->
<div class="point fl" v-for="e in dataList" :key="e.point_code" @click="toRadio(e)">{{e.code}}</div>
<div class="point fl" v-for="e in dataList" :key="e.point_code" @click="toRadio(e)">{{e.code_name}}</div>
</div>
<div class="box2">
<span class="span1">目标站点</span>

View File

@@ -31,6 +31,7 @@
<script>
import NavBar from '@components/NavBar.vue'
import SiteNav from '@components/SiteNav.vue'
import {queryTaskList} from '@/config/getData.js'
export default {
name: 'TaskList',
components: {
@@ -72,10 +73,18 @@ export default {
]
}
},
mounted () {
// init
created () {
this.initData()
},
methods: {
async initData () {
let res = await queryTaskList()
if (res.code === '1') {
this.dataList = res.result
} else {
this.toast(res.desc)
}
}
}
}
</script>
@@ -84,7 +93,7 @@ export default {
.con1
float left
margin-top .39rem
margin-left .1rem
margin-left .4rem
width 10.4rem
.last-td
width 4.4rem

View File

@@ -1,6 +1,6 @@
<template>
<div class="body-conatiner">
<iframe class="iframe" src="../static/HMI_JavaApp_FullScreen.html" frameborder="0"></iframe>
<iframe class="iframe" src="../static/Magic4/HMI_JavaApp_FullScreen.html" frameborder="0"></iframe>
<!-- <iframe class="iframe" src="http://127.0.0.1:5555/HMI_JavaApp_FullScreen.html" frameborder="0"></iframe> -->
</div>
</template>