<template>
  <div class="commonTitle">工序[{{ OptArrayLength }}]</div>
  <el-scrollbar class="barHeight">
    <div class="titleText notice" v-if="!selectedOderStatus">请选择订单</div>

    <Transition>
      <Steps v-if="selectedOderStatus" :opsArray="opsArray" />
    </Transition>

    <Empty v-if="selectedOderStatus && opsArray.length < 1" />
  </el-scrollbar>
</template>
<script lang="ts" setup>
import Steps from "@/views/process/components/steps.vue";
const selectedOderStatus = inject("selectedOderStatus");
//总的订单data
const ordersDataArray = inject("ordersDataArray");
//当前选择的订单index
const selectOrderIndex = inject("selectOrderIndex");

const opsArray = inject("opsArray");
// const setOptArray = () => {
//   if (selectOrderIndex.value > -1) {
//     opsArray.value = ordersDataArray.value[selectOrderIndex.value].ops;
//   } else {
//     opsArray.value = [];
//   }
// };
const OptArrayLength = computed(() => opsArray.value.length);
</script>

<style lang="scss" scoped>
.barHeight {
  height: calc(100vh - 170px);
}

.notice {
  width: 100%;
  height: calc(100vh - 170px);
  border-radius: 16px;
  background-color: white;
  text-align: center;
  padding: 60px;
  @include flex;
}
</style>
