整合所以接口

This commit is contained in:
2024-09-03 19:48:44 +08:00
parent 12f01c0dc9
commit 4ba360f1ef
4 changed files with 676 additions and 732 deletions

View File

@@ -177,8 +177,8 @@
</template>
<script>
// import { inventoryAnalysis, inventoryIOAnalysis, historyInventoryIOAnalysis, todayProduceStatistic, todayLoadingAndUnloadingStatistics, todayTask, agvInfo, rgvInfo } from '@js/mork2.js'
import { inventoryAnalysis, inventoryIOAnalysis, historyInventoryIOAnalysis, todayProduceStatistic, todayLoadingAndUnloadingStatistics, todayTask, agvInfo, rgvInfo } from '@js/getData2.js'
// import { getAllBigScreen } from '@js/mork2.js'
import { getAllBigScreen } from '@js/getData2.js'
export default {
data () {
return {
@@ -248,63 +248,32 @@ export default {
this.$router.push('/setup')
},
refresh () {
this._inventoryAnalysis()
this._inventoryIOAnalysis()
this._historyInventoryIOAnalysis()
this._todayProduceStatistic()
this._todayLoadingAndUnloadingStatistics()
this._todayTask()
this._agvInfo()
this._rgvInfo()
this._getAllBigScreen()
this.timer = setInterval(() => {
this._inventoryAnalysis()
this._inventoryIOAnalysis()
this._historyInventoryIOAnalysis()
this._todayProduceStatistic()
this._todayLoadingAndUnloadingStatistics()
this._todayTask()
this._agvInfo()
this._rgvInfo()
this._getAllBigScreen()
}, this.interTime)
},
async _inventoryAnalysis () {
let res = await inventoryAnalysis()
async _getAllBigScreen () {
let res = await getAllBigScreen()
clearInterval(this.chart1Timer)
clearInterval(this.chart2Timer)
clearInterval(this.chart5Timer)
this.chart1Timer = null
this.materList = [...res]
this.chart2Timer = null
this.chart5Timer = null
this.materList = [...res.inventoryAnalysis]
this.curList = [...res.inventoryIOAnalysis]
this.historyList = [...res.historyInventoryIOAnalysis]
this.statisList = [...res.todayProduceStatistic]
this.loadList = [...res.todayLoadingAndUnloadingStatistics]
this.taskList = [...res.todayTask]
this.agvList = [...res.agvInfo]
this.rgvList = [...res.rgvInfo]
this.setEchart1()
},
async _inventoryIOAnalysis () {
let res = await inventoryIOAnalysis()
if (res.length) {
clearInterval(this.chart2Timer)
this.chart2Timer = null
this.curList = [...res]
this.setEchart2()
}
},
async _historyInventoryIOAnalysis () {
let res = await historyInventoryIOAnalysis()
if (res.length) {
this.historyList = [...res]
this.setEchart3()
}
},
async _todayProduceStatistic () {
let res = await todayProduceStatistic()
if (res.length) {
this.statisList = [...res]
this.setEchart4()
}
},
async _todayLoadingAndUnloadingStatistics () {
let res = await todayLoadingAndUnloadingStatistics()
if (res.length) {
clearInterval(this.chart5Timer)
this.chart5Timer = null
this.loadList = [...res]
this.setEchart5()
}
this.setEchart2()
this.setEchart3()
this.setEchart4()
this.setEchart5()
},
setEchart1 () {
let colors = ['#1980EA', '#67D470', '#B4C9EF', '#BCBF5C', '#EF5252', '#6d5edd', '#bf41bb']
@@ -1022,262 +991,11 @@ export default {
window.addEventListener('resize', () => {
echart.resize()
})
},
async _todayTask () {
let res = await todayTask()
if (res.length) {
this.taskList = [...res]
}
},
async _agvInfo () {
let res = await agvInfo()
if (res.length) {
this.agvList = [...res]
}
},
async _rgvInfo () {
let res = await rgvInfo()
if (res.length) {
this.rgvList = [...res]
}
}
}
}
</script>
<style lang="stylus" scoped>
.n_container
position relative
width 100%
height 100%
overflow hidden
.n_header
position absolute
left 0
top 0
width 100%
height 88px
background center / 100% url('../../../images/header_bg_s.png') no-repeat
.n_header_h1
width: 100%;
height: 100%;
padding-top 12px
h1
font-size: 22px;
font-weight: 700;
color: #fff;
line-height: 1;
text-align center;
letter-spacing 4px
.exit_btn
position absolute
left 3%
top 11%
z-index 100
height 16px
width 16px
line-height 16px
font-size 16px
color #AECAF5
text-align: center;
.n_body_container
width 100%
height 100%
padding 60px 10px 10px 10px
display: flex;
justify-content: space-between;
.n_left_wraper
width 24%
height 100%
.n_right_wraper
width 24%
height 100%
.n-center_wraper
width 50%
height 100%
.w_wraper
width 100%
height 100%
.item_wraper
width 100%
height calc((100% - 20px) / 3)
margin-bottom 10px
&:last-child
margin-bottom 0
.item_wraper_1
height calc((200% - 20px) / 3)
.title_wraper
width 100%
height 24px
background center / 100% 100% url('../../../images/bg-title_2_s.png') no-repeat
padding 2px 22px
p
font-size 12px
font-weight: 400;
color: #fff;
line-height 8px
.title_wraper_1
background-image url('../../../images/bg-title_1_s.png')
.content_wraper
width 100%
height calc(100% - 24px)
padding 8px
background-color rgba(30, 65, 126, 70%)
.content_wraper_2
padding 0
.pie_wraper
width 100%
height 100%
padding 1px 0 0 1px
background left center / 111px 111px url('../../../images/pie-bg_2_s.png') no-repeat
.pie_legend
width calc(100% - 200px)
height 100%
margin-left 200px
display flex
flex-direction row
justify-content space-between
align-items center
flex-wrap: wrap
.scroll_wrap
width 100%
height 100%
padding 5px 10px 2px 10px
.scroll_tab_1
width 100%
height 20px
background center / 100% 100% url('../../../images/table-bg_1.png') no-repeat
li
float left
width 15%
font-size 10px;
line-height 20px
color #AFBED8
text-align center
font-weight: bold;
font-style: italic;
word-wrap break-word
word-break break-all
white-space nowrap
padding 0 2px
overflow hidden
box-sizing border-box
&:nth-child(1), &:nth-child(5)
width 20%
.state
display block
width 20px
height 14px
.state_name
width calc(100% - 20px)
.scroll_container_1
width 100%
height calc(100% - 20px)
overflow hidden
.scroll-ul_1
li
width 100%
height 20px
border-bottom 1px solid rgba(122,159,224,0.17)
&:nth-child(even)
background rgba(31,46,73,0.7)
&:nth-child(odd)
background rgba(31,46,73,0.55)
.scroll-ul_1_div
float left
width 15%
height 20px
display flex
flex-direction row
justify-content center
align-items center
flex-wrap nowrap
font-size 8px
line-height 8px
color #B2BBD7
text-align center
// word-wrap break-word
// word-break break-all
white-space nowrap
padding 0 1px
overflow hidden
&:nth-child(1), &:nth-child(5)
width 20%
.state
display block
width 20px
height 14px
.state_name
width 100%
height 20px
.agv_wrap
display flex
justify-content space-between
width 100%
height 47%
padding-bottom 10px
.rgv_wrap
height 53%
padding-bottom 0
.agv_item
display: flex;
justify-content: space-between;
width 32%
padding 5px
border 1px solid #3AA2F2
border-radius 4px
box-shadow inset 0px 0px 3px 3px rgba(58, 162, 242, 40%)
.rgv_item
display: block
width 24%
.agv_left
width 33%
height 100%
padding-bottom 8px
.rgv_left
width 100%
height 20%
padding 0
display: flex;
justify-content: space-between;
align-items: center;
.agv_img
height calc(100% - 30px)
background center center / 80% auto url('../../../images/agv_s.png') no-repeat
.agv_info
width 64%
.p1
height 30px
font-size: 9px;
line-height 30px
color: #78B1DE;
text-align: center;
white-space nowrap
.agv_txt
display: flex;
justify-content: space-between;
align-items: center;
height 20%
background bottom center / 100% 3px url('../../../images/screen1/line_1.png') no-repeat
&:last-child
background none
.p2
font-size: 6px;
color: #84B0DA;
text-align: center;
font-weight: 700;
.p3
font-size: 8px;
color: #FFFFFF;
text-align: center;
font-weight: 700;
.rgv_img
width 50%
height 100%
background center center / 80% auto url('../../../images/rgv_s.png') no-repeat
margin-bottom 0
.rgv_info
height 80%
.rgv_txt
height 20%
@import './style.stylus'
</style>