数据联调

This commit is contained in:
2024-08-07 14:18:37 +08:00
parent fc1218448d
commit 445256eb06
3 changed files with 376 additions and 1258 deletions

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0,user-scalable=no"> <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0,user-scalable=no">
<title>宁德华弘大屏监控</title> <title>车间物料监控</title>
</head> </head>
<body class="clearfix"> <body class="clearfix">
<div id="app"></div> <div id="app"></div>

File diff suppressed because it is too large Load Diff

View File

@@ -124,10 +124,7 @@
<li>设备</li> <li>设备</li>
<li>起点位置</li> <li>起点位置</li>
<li>终点位置</li> <li>终点位置</li>
<li>物料</li> <li>任务</li>
<li>物料名称</li>
<li>数量</li>
<li>重量</li>
<li>任务状态</li> <li>任务状态</li>
</ul> </ul>
<div class="scroll_container_1"> <div class="scroll_container_1">
@@ -142,10 +139,7 @@
</div> --> </div> -->
<div class="scroll-ul_1_div">{{e.start_point_code}}</div> <div class="scroll-ul_1_div">{{e.start_point_code}}</div>
<div class="scroll-ul_1_div">{{e.next_point_code}}</div> <div class="scroll-ul_1_div">{{e.next_point_code}}</div>
<div class="scroll-ul_1_div">{{e.next_point_code}}</div> <div class="scroll-ul_1_div">{{e.task_code}}</div>
<div class="scroll-ul_1_div">{{e.next_point_code}}</div>
<div class="scroll-ul_1_div">{{e.next_point_code}}</div>
<div class="scroll-ul_1_div">{{e.next_point_code}}</div>
<div class="scroll-ul_1_div">{{e.task_status}}</div> <div class="scroll-ul_1_div">{{e.task_status}}</div>
</li> </li>
</ul> </ul>
@@ -277,12 +271,10 @@ export default {
}, },
async _inventoryAnalysis () { async _inventoryAnalysis () {
let res = await inventoryAnalysis() let res = await inventoryAnalysis()
if (res.length) { clearInterval(this.chart1Timer)
clearInterval(this.chart1Timer) this.chart1Timer = null
this.chart1Timer = null this.materList = [...res]
this.materList = [...res] this.setEchart1()
this.setEchart1()
}
}, },
async _inventoryIOAnalysis () { async _inventoryIOAnalysis () {
let res = await inventoryIOAnalysis() let res = await inventoryIOAnalysis()
@@ -330,6 +322,9 @@ export default {
this.materList.map(e => { this.materList.map(e => {
total = total + Number(e.total_material_qty) total = total + Number(e.total_material_qty)
}, 0) }, 0)
if (!this.materList.length) {
total = '0'
}
let option = { let option = {
color: colors, color: colors,
grid: { grid: {
@@ -731,29 +726,29 @@ export default {
lineHeight: 12, lineHeight: 12,
// align: 'right', // align: 'right',
fontFamily: 'SourceHanSansCN-Regular', fontFamily: 'SourceHanSansCN-Regular',
margin: 10, margin: 10
formatter: (value) => { // formatter: (value) => {
let str = '' // let str = ''
let num = 5 // let num = 5
let valLength = value.length // let valLength = value.length
let rowNum = Math.ceil(valLength / num) // let rowNum = Math.ceil(valLength / num)
if (rowNum > 1) { // if (rowNum > 1) {
for (let i = 0; i < rowNum; i++) { // for (let i = 0; i < rowNum; i++) {
let temp = '' // let temp = ''
let start = i * num // let start = i * num
let end = start + num // let end = start + num
if (i === rowNum - 1) { // if (i === rowNum - 1) {
temp = value.substring(start, end) // temp = value.substring(start, end)
} else { // } else {
temp = value.substring(start, end) + '\n' // temp = value.substring(start, end) + '\n'
} // }
str += temp // str += temp
} // }
return str // return str
} else { // } else {
return value // return value
} // }
} // }
}, },
data: barName data: barName
}, },
@@ -1339,10 +1334,10 @@ export default {
.scroll_tab_1 .scroll_tab_1
width 100% width 100%
height 38px height 38px
background left center / auto 100% url('../../../images/table-bg_1.png') no-repeat background center / 100% 100% url('../../../images/table-bg_1.png') no-repeat
li li
float left float left
width 9% width 15%
font-size 16px; font-size 16px;
line-height 38px line-height 38px
color #AFBED8 color #AFBED8
@@ -1356,8 +1351,8 @@ export default {
padding 0 5px padding 0 5px
overflow hidden overflow hidden
box-sizing border-box box-sizing border-box
&:nth-child(1), &:nth-child(2) &:nth-child(1), &:nth-child(5)
width 18.5% width 20%
.state .state
display block display block
width 20px width 20px
@@ -1379,7 +1374,7 @@ export default {
background rgba(31,46,73,0.55) background rgba(31,46,73,0.55)
.scroll-ul_1_div .scroll-ul_1_div
float left float left
width 9% width 15%
height 39px height 39px
display flex display flex
flex-direction row flex-direction row
@@ -1392,13 +1387,13 @@ export default {
text-align center text-align center
font-family: 'SourceHanSansCN-Regular'; font-family: 'SourceHanSansCN-Regular';
font-style: italic; font-style: italic;
word-wrap break-word // word-wrap break-word
word-break break-all // word-break break-all
// white-space nowrap white-space nowrap
padding 0 5px padding 0 5px
overflow hidden overflow hidden
&:nth-child(1), &:nth-child(2) &:nth-child(1), &:nth-child(5)
width 18.5% width 20%
.state .state
display block display block
width 20px width 20px
@@ -1451,6 +1446,7 @@ export default {
color: #78B1DE; color: #78B1DE;
letter-spacing: 2px; letter-spacing: 2px;
text-align: center; text-align: center;
white-space nowrap
.agv_txt .agv_txt
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;