diff --git a/src/components/home/ExecuteCraft/index.vue b/src/components/home/ExecuteCraft/index.vue index 489bcf2..fd146db 100644 --- a/src/components/home/ExecuteCraft/index.vue +++ b/src/components/home/ExecuteCraft/index.vue @@ -3,15 +3,12 @@ import { startCraft } from 'apis/crafts' import { getOreList } from 'apis/ore' import { FtMessage } from 'libs/message' import { useHomeStore } from 'stores/homeStore' -import { useSystemStore } from 'stores/systemStore' -import { computed, onMounted, ref } from 'vue' +import { onMounted, ref } from 'vue' const emits = defineEmits(['ok', 'cancel']) const homeStore = useHomeStore() -const systemStore = useSystemStore() - onMounted(() => { getOres() }) @@ -64,17 +61,17 @@ const cancel = () => { } // -const tubes = computed(() => { - return systemStore.systemStatus.trays?.find(item => item.heatModuleCode === homeStore.heatAreaList.find(item => item.selected)?.value)?.tubes -}) +// const tubes = computed(() => { +// return systemStore.systemStatus.trays?.find(item => item.heatModuleCode === homeStore.heatAreaList.find(item => item.selected)?.value)?.tubes +// }) const selectedColumns = ref(Array.from({ length: 5 }).fill(false)) const mousedownHandle = async (index: number) => { - if (!tubes.value?.find(item => item.columnNum === index)?.exists) { - FtMessage.error('该列没有试管') - return - } + // if (!tubes.value?.find(item => item.columnNum === index)?.exists) { + // FtMessage.error('该列没有试管') + // return + // } selectedColumns.value[index - 1] = !selectedColumns.value[index - 1] form.value.columns = selectedColumns.value.map((item, index) => { return item ? index + 1 : false @@ -114,7 +111,7 @@ const checkChange = () => { v-for="item in 5" :key="item" class="tube-line" - :class="{ 'tube-line-active': selectedColumns[item - 1], 'tube-line-disable': homeStore.heatAreaList.filter(item => item.selected).length && !tubes?.find(tu => tu.columnNum === item)?.exists }" + :class="{ 'tube-line-active': selectedColumns[item - 1] }" @click.prevent="() => mousedownHandle(item)" @touch.prevent="() => mousedownHandle(item)"