73 lines
1.5 KiB
Vue
73 lines
1.5 KiB
Vue
<template>
|
|
<Container
|
|
name="原料用量统计"
|
|
size="middle"
|
|
style="">
|
|
<div style="flex: 1; display: flex; gap: 8px; flex-direction: column">
|
|
<div
|
|
class="absolute"
|
|
style="
|
|
flex: 2;
|
|
padding: 12px 12px 0 12px;
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
grid-auto-rows: repeat(4, 1fr);
|
|
gap: 8px;
|
|
">
|
|
<ShadowRect
|
|
v-for="(item, index) in materialMsg"
|
|
: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: {
|
|
materialMsg() {
|
|
return this.$store.state.websocket.material;
|
|
},
|
|
},
|
|
methods: {},
|
|
};
|
|
</script>
|
|
|
|
<style scoped lang="scss"></style>
|