This commit is contained in:
2023-10-20 17:31:19 +08:00
parent 1f8f22839d
commit 1ffb98419b
10 changed files with 273 additions and 264 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
src/images/new/btn-blue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
src/images/new/btn-red.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,174 +0,0 @@
<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

@@ -1,20 +1,22 @@
<template> <template>
<div class="main-container"> <div class="main-container">
<div class="box0">
<div class="title">故障信息</div>
</div>
<div class="tasklist"> <div class="tasklist">
<div class="con1 grid_wrapper"> <div class="con1 grid_wrapper">
<table> <table>
<tr> <tr class="t-head">
<!-- <th>当前状态</th> --> <th>序号</th>
<th>故障名称</th> <th>故障名称</th>
<th>故障类别</th> <th>故障类别</th>
<th>故障内容</th> <th>故障内容</th>
<th>处理办法</th> <th>处理办法</th>
</tr> </tr>
<tr v-for="(e,index) in dataList" :key="index"> <tr v-for="(e,index) in dataList" :key="index">
<!-- <td><span class="status-box" :class="{bgyellow:e.error_status ==='1',bgred:e.error_status ==='2',bggreen:e.error_status ==='0',}"></span></td> --> <td>{{index + 1}}</td>
<td>{{e.error_name}}</td> <td>{{e.error_name}}</td>
<td :class="{cyellow:e.errorcategory_name ==='一类',cred:e.errorcategory_name ==='二类'}">{{e.errorcategory_name}}</td> <td><span class="icon" :class="{bgyellow: e.errorcategory_name ==='一类', bgred: e.errorcategory_name ==='二类'}"></span>{{e.errorcategory_name}}</td>
<!-- <td>{{e.error_category}}<span class="status-box" :class="{bgyellow:e.error_status ==='1',bgred:e.error_status ==='2',bggreen:e.error_status ==='0',}"></span></td> -->
<td>{{e.error_content}}</td> <td>{{e.error_content}}</td>
<td>{{e.handing_method}}</td> <td>{{e.handing_method}}</td>
</tr> </tr>
@@ -30,6 +32,8 @@ export default {
name: 'ErrorManage', name: 'ErrorManage',
data () { data () {
return { return {
interTime: this.$store.getters.setTime,
timer: null,
pkId: '', pkId: '',
dataList: [] dataList: []
// dataList: [ // dataList: [
@@ -65,8 +69,17 @@ export default {
}, },
created () { created () {
this.initData() this.initData()
this.refresh()
},
beforeDestroy () {
clearInterval(this.timer)
}, },
methods: { methods: {
refresh () {
this.timer = setInterval(() => {
this.initData()
}, this.interTime)
},
async initData () { async initData () {
let res = await querryError() let res = await querryError()
if (res.code === '1') { if (res.code === '1') {
@@ -80,33 +93,60 @@ export default {
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
.icon
display inline-block
width 43px
height 43px
position relative
top 10px
.bgyellow .bgyellow
background #ECA800 background center / 100% 100% url(../../../images/new/icon-error1.png) no-repeat
.bgred .bgred
background #FA6400 background center / 100% 100% url(../../../images/new/icon-error2.png) no-repeat
.bggreen .t-head
background #00C852 height 80px
.cyellow line-height 80px
color #ECA800 background center / 100% 100% url(../../../images/new/bg-head-tb-in.png) no-repeat
.cred
color #FA6400
.cgreen
color #00C852
.main-container .main-container
margin 0 auto padding-left 67px
.box0
width 1785px
height 102px
background center / 100% 100% url(../../../images/new/bg-title-l.png) no-repeat
.title
font-size 36px
color #F6F9FE
padding-left 40px
padding-top 53px
.con1 .con1
width 1787px
height 819px
background center / 100% 100% url(../../../images/new/bg-con-l.png) no-repeat
float left float left
box-sizing border-box box-sizing border-box
width 100% padding 40px
padding .25rem
.last-td
width 4.4rem
text-align left
padding-left 0.5rem
box-sizing border-box
.status-box .status-box
display inline-block display inline-block
width .4rem width .4rem
height .4rem height .4rem
border-radius .2rem border-radius .2rem
.grid_wrapper table th
color #ffffff
font-size 30px
background rgba(31,46,73,0.5)
line-height 80px
border-right none
padding 0
padding-left 30px
text-align left
.grid_wrapper table td
color #ffffff
font-size 30px
background rgba(31,46,73,0.5)
line-height 80px
border-bottom 1px solid #20395D
border-right none
padding 0
padding-left 30px
text-align left
</style> </style>

View File

@@ -58,7 +58,7 @@ export default {
timer: null, timer: null,
// dataInfo: {} // dataInfo: {}
dataInfo: { dataInfo: {
device_info: 'NobleLiftPs10LMT_ HuaHai', device_info: 'NobleLiftPS10LMT_HuaHai',
task_name: '无', task_name: '无',
task_status: '有任务未执行', task_status: '有任务未执行',
task_num: '待执行', task_num: '待执行',
@@ -201,6 +201,7 @@ export default {
margin-left 54px margin-left 54px
width 330px width 330px
line-height 36px line-height 36px
word-wrap break-word
.infoli .infoli
width 542px width 542px
line-height 94px line-height 94px

View File

@@ -0,0 +1,97 @@
<template>
<div class="main-container">
<div class="clear">
<!-- <div class="fl left_side">
<site-nav default_active="1" active="1-2"></site-nav>
</div> -->
<div class="con1 grid_wrapper">
<table>
<tr>
<th>序号</th>
<th>任务号</th>
<th>出发起点</th>
<th>目标站点</th>
<th>任务状态</th>
<th>生成时间</th>
</tr>
<tr v-for="(e, index) in dataList" :key="e.task_id">
<td>{{index+1}}</td>
<td>{{e.task_num}}</td>
<td>{{e.next_point}}</td>
<td>{{e.target_point}}</td>
<td>{{e.task_status_name}}</td>
<td class="last-td">{{e.create_time}}</td>
</tr>
</table>
</div>
</div>
</div>
</template>
<script>
import {queryTaskList} from '@/config/getData.js'
export default {
name: 'TaskList',
data () {
return {
pkId: '',
dataList: []
// dataList: [
// {
// task_id: '1',
// task_no: '1001',
// next_point: '1001',
// status: '正在执行',
// time: '2021-07-14 12:00:00'
// },
// {
// task_id: '2',
// task_no: '1002',
// next_point: '1001',
// status: '未执行',
// time: '2021-07-15 12:00:00'
// },
// {
// task_id: '3',
// task_no: '1003',
// next_point: '1001',
// status: '未执行',
// time: '2021-07-18 12:00:00'
// },
// {
// task_id: '4',
// task_no: '1004',
// next_point: '1001',
// status: '未执行',
// time: '2021-09-10 12:00:00'
// }
// ]
}
},
created () {
this.initData()
},
methods: {
async initData () {
let res = await queryTaskList()
if (res.code === '1') {
this.dataList = res.result
} else {
this.toast(res.desc)
}
}
}
}
</script>
<style lang="stylus" scoped>
.con1
float left
width 100%
padding 0.25rem
.last-td
width 4.4rem
text-align left
padding-left 1.7rem
box-sizing border-box
</style>

View File

@@ -1,75 +1,45 @@
<template> <template>
<div class="main-container"> <div class="main-container">
<div class="clear"> <div class="box0">
<!-- <div class="fl left_side"> <div class="title">任务管理</div>
<site-nav default_active="1" active="1-2"></site-nav> </div>
</div> --> <div class="tasklist">
<div class="con1 grid_wrapper"> <div class="con1 grid_wrapper">
<table> <table>
<tr> <tr class="t-head">
<th>序号</th> <th>序号</th>
<th>任务号</th> <th>任务号</th>
<th>出发起点</th> <!-- <th>出发起点</th> -->
<th>目标站点</th> <th>目标站点</th>
<th>任务状态</th> <th>任务状态</th>
<th>生成时间</th> <th>生成时间</th>
</tr> </tr>
<tr v-for="(e, index) in dataList" :key="e.task_id"> <tr v-for="(e,index) in dataList" :key="index">
<td>{{index+1}}</td> <td>{{index+1}}</td>
<td>{{e.task_num}}</td> <td>{{e.task_num}}</td>
<td>{{e.next_point}}</td> <!-- <td>{{e.next_point}}</td> -->
<td>{{e.target_point}}</td> <td>{{e.target_point}}</td>
<td>{{e.task_status_name}}</td> <td><span class="icon" :class="{bgred: e.task_status_name ==='生成未执行', bgyellow: (e.task_status_name ==='执行中' || e.task_status_name ==='完成')}"></span>{{e.task_status_name}}</td>
<td class="last-td">{{e.create_time}}</td> <td>{{e.create_time}}</td>
</tr> </tr>
</table> </table>
<div class="subbar">
<button class="btn btn1" @click="toDel">任务取消</button>
<button class="btn btn2" @click="updateTask">任务提交</button>
</div> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
import SiteNav from '@components/SiteNav.vue' import {queryTaskList, updateTask} from '@/config/getData.js'
import {queryTaskList} from '@/config/getData.js'
export default { export default {
name: 'TaskList', name: 'TaskLists',
components: {
SiteNav
},
data () { data () {
return { return {
pkId: '', pkId: '',
dataList: [] dataList: []
// dataList: [
// {
// task_id: '1',
// task_no: '1001',
// next_point: '1001',
// status: '正在执行',
// time: '2021-07-14 12:00:00'
// },
// {
// task_id: '2',
// task_no: '1002',
// next_point: '1001',
// status: '未执行',
// time: '2021-07-15 12:00:00'
// },
// {
// task_id: '3',
// task_no: '1003',
// next_point: '1001',
// status: '未执行',
// time: '2021-07-18 12:00:00'
// },
// {
// task_id: '4',
// task_no: '1004',
// next_point: '1001',
// status: '未执行',
// time: '2021-09-10 12:00:00'
// }
// ]
} }
}, },
created () { created () {
@@ -83,19 +53,94 @@ export default {
} else { } else {
this.toast(res.desc) this.toast(res.desc)
} }
},
toDel () {
console.log(1)
},
async updateTask () {
let res = await updateTask(this.dataList)
if (res.code === '1') {
this.toast(res.desc)
this.pkId = ''
this.initData()
} else {
this.toast(res.desc)
}
} }
} }
} }
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
.icon
display inline-block
width 43px
height 43px
position relative
top 10px
.bgyellow
background center / 100% 100% url(../../../images/new/icon-error1.png) no-repeat
.bgred
background center / 100% 100% url(../../../images/new/icon-error2.png) no-repeat
.t-head
height 80px
line-height 80px
background center / 1499px 100% url(../../../images/new/bg-head-tb-in.png) no-repeat
.main-container
padding-left 41px
.box0
width 1580px
height 102px
background center / 100% 100% url(../../../images/new/bg-title-l.png) no-repeat
.title
font-size 36px
color #F6F9FE
padding-left 40px
padding-top 53px
.con1 .con1
width 1580px
height 819px
background center / 100% 100% url(../../../images/new/bg-con-l.png) no-repeat
float left float left
width 100%
padding 0.25rem
.last-td
width 4.4rem
text-align left
padding-left 1.7rem
box-sizing border-box box-sizing border-box
padding 40px
position relative
.status-box
display inline-block
width .4rem
height .4rem
border-radius .2rem
.grid_wrapper table th
color #ffffff
font-size 30px
background rgba(31,46,73,0.5)
line-height 80px
border-right none
padding 0
padding-left 30px
text-align left
.grid_wrapper table td
color #ffffff
font-size 30px
background rgba(31,46,73,0.5)
line-height 80px
border-bottom 1px solid #20395D
border-right none
padding 0
padding-left 30px
text-align left
.btn
width 335px
height 91px
font-size 36px
margin-left 167px
position absolute
bottom 28px
color #f6f9fe
.btn1
left 306px
background center / 100% 100% url(../../../images/new/btn-red.png) no-repeat
.btn2
left 668px
background center / 100% 100% url(../../../images/new/btn-blue.png) no-repeat
</style> </style>