96 lines
2.4 KiB
Vue
96 lines
2.4 KiB
Vue
<!--
|
|
filename: MaterialCost.vue
|
|
author: liubin
|
|
date: 2023-12-06 09:09:27
|
|
description:
|
|
-->
|
|
|
|
<template>
|
|
<Container name="原料用量统计" size="middle" style="">
|
|
<div style="flex: 1; display: flex; gap: 8px;flex-direction: column;">
|
|
<div
|
|
class="absolute"
|
|
style="
|
|
flex:3;
|
|
padding: 12px 12px 0 12px;
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
grid-auto-rows: repeat(4, 1fr);
|
|
gap: 8px;
|
|
">
|
|
<ShadowRect v-for="(item, index) in materialMsg1" :key="index" :rounded="false">
|
|
<div
|
|
class="material"
|
|
style="
|
|
flex: 1;
|
|
padding-bottom: 3px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
align-items: center;
|
|
justify-content: center;
|
|
">
|
|
<span style="color: #0ee8e4; font-weight: 500; font-size: 32px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
|
|
{{item.materialUsed}}
|
|
</span>
|
|
<span style="color: #fff; font-size: 16px; letter-spacing: 1px">
|
|
- {{item.materialName}}/kg-
|
|
</span>
|
|
</div>
|
|
</ShadowRect>
|
|
</div>
|
|
<div style="flex:1;
|
|
padding: 0 12px 12px 12px;
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 8px;">
|
|
<ShadowRect v-for="(item, index) in materialMsg2" :key="index" :rounded="false">
|
|
<div
|
|
class="material"
|
|
style="
|
|
flex: 1;
|
|
padding-bottom: 3px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
align-items: center;
|
|
justify-content: center;
|
|
">
|
|
<span style="color: #0ee8e4; font-weight: 500; font-size: 32px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
|
|
{{item.materialUsed}}
|
|
</span>
|
|
<span style="color: #fff; font-size: 16px; letter-spacing: 1px">
|
|
- {{item.materialName}}/kg-
|
|
</span>
|
|
</div>
|
|
</ShadowRect>
|
|
</div>
|
|
</div>
|
|
|
|
</Container>
|
|
</template>
|
|
|
|
<script>
|
|
import Container from '../components/Container';
|
|
import ShadowRect from '../components/ShadowRect.vue';
|
|
export default {
|
|
name: 'MaterialCost',
|
|
components: { Container, ShadowRect },
|
|
props: {},
|
|
data() {
|
|
return {};
|
|
},
|
|
computed: {
|
|
materialMsg1() {
|
|
return this.$store.state.websocket.material.slice(0,9)
|
|
},
|
|
materialMsg2() {
|
|
return this.$store.state.websocket.material.slice(9)
|
|
}
|
|
},
|
|
methods: {},
|
|
};
|
|
</script>
|
|
|
|
<style scoped lang="scss"></style>
|