| | |
| | | </div> |
| | | <el-scrollbar always class="scroller"> |
| | | <div class="materials-b"> |
| | | <div v-for="item in outputMaterials" :key="item.materialId"> |
| | | <InputOutMaterialInfo :item="item" :background="item.background"></InputOutMaterialInfo> |
| | | <div v-for="item in props.materialList" :key="item.materialId"> |
| | | <InputOutMaterialInfo :material="item" @detail-click="onDetailClick"></InputOutMaterialInfo> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |
| | |
| | | <script setup lang="ts"> |
| | | import InputOutMaterialInfo from '@/views/dashboard/components/InputOutMaterialInfo.vue' |
| | | import BigButton from '@/views/dashboard/components/BigButton.vue' |
| | | import { toRefs } from 'vue' |
| | | const outputMaterials = [ |
| | | { |
| | | materialId: '1111', |
| | | materialName: '输入名称', |
| | | amount: 10, |
| | | unit: '个' |
| | | }, |
| | | { |
| | | materialId: '2222222222222222', |
| | | materialName: '输入名称2', |
| | | amount: 20, |
| | | unit: '个', |
| | | background: '#33ccff' |
| | | }, |
| | | { |
| | | materialId: '1111', |
| | | materialName: '输入名称', |
| | | amount: 10, |
| | | unit: '个' |
| | | }, |
| | | { |
| | | materialId: '2222222222222222', |
| | | materialName: '输入名称2', |
| | | amount: 20, |
| | | unit: '个', |
| | | background: '#33ccff' |
| | | }, |
| | | { |
| | | materialId: '1111', |
| | | materialName: '输入名称', |
| | | amount: 10, |
| | | unit: '个' |
| | | }, |
| | | { |
| | | materialId: '2222222222222222', |
| | | materialName: '输入名称2', |
| | | amount: 20, |
| | | unit: '个', |
| | | background: '#33ccff' |
| | | }, |
| | | { |
| | | materialId: '2222222222222222', |
| | | materialName: '输入名称2', |
| | | amount: 20, |
| | | unit: '个', |
| | | background: '#33ccff' |
| | | } |
| | | ] |
| | | import type { Material } from '@/api/task' |
| | | |
| | | const props = defineProps<{ |
| | | materialList?: Material[] |
| | | }>() |
| | | const emits = defineEmits<{ |
| | | detailClick: [material: Material] |
| | | }>() |
| | | |
| | | function onDetailClick(material: Material) { |
| | | emits('detailClick', material) |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |