驾驶舱
This commit is contained in:
@@ -2,17 +2,21 @@
|
||||
<div style="flex: 1;">
|
||||
<Container name="订单完成情况" size="small" style="">
|
||||
<div style="padding: 5px 10px;">
|
||||
<ScrollBoard :config = "config" width='575px' height='230px'/>
|
||||
<dv-scroll-board :config="config" style="width:575px;height:230px" ref='orderScrollBoard'/>
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Container from '../components/Container'
|
||||
import ScrollBoard from '../components/ScrollBoard'
|
||||
export default {
|
||||
name: 'OrderStatus',
|
||||
components: { Container, ScrollBoard },
|
||||
components: { Container },
|
||||
computed: {
|
||||
order() {
|
||||
return this.$store.state.websocket.order
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
config: {
|
||||
@@ -38,6 +42,20 @@ export default {
|
||||
rowNum: 6
|
||||
}
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
order: {
|
||||
handler(newVal, oldVal) {
|
||||
let outArr = this.order.map((item) => [
|
||||
item.startProduceTime,
|
||||
item.name,
|
||||
item.specifications,
|
||||
item.completeRate
|
||||
]);
|
||||
this.config.data = outArr
|
||||
this.$refs['orderScrollBoard'].updateRows(outArr)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user