<template>
  <div class="mainContentBox">
    <el-row :gutter="20">
      <el-col :span="4" class="boxStyle">
        <!-- 侧边栏盒子 -->
        <Jiluxiang />
      </el-col>
      <el-col :span="8">
        <div class="grid-content ep-bg-purple">
          <Info />
        </div>
      </el-col>
      <el-col :span="12">
        <div class="grid-content ep-bg-purple">
          <Replacement />
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
import Jiluxiang from "@/views/repair/operation/components/Jiluxiang.vue";
import Replacement from "@/views/repair/operation/components/replacement.vue";
import { useRepairStore } from "@/store";
import { getItemInfo } from "@/api/repair/operation.ts";
import Info from "@/views/repair/components/info.vue";
//此页面这2个变量无使用逻辑 仅为解决警告
const ordersDataArray = ref({});
const selectOrderIndex = ref({});
const listData = ref([]);
const store = useRepairStore();
provide("ordersDataArray", ordersDataArray);
provide("selectOrderIndex", selectOrderIndex);
const getListInfo = async (id) => {
  const { data } = await getItemInfo(id);
  listData.value = data;
};
provide("listData", listData);
defineOptions({ name: "RepairOperation" });
onMounted(() => {
  getListInfo(store.scanInfo.id);
});
</script>

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

.scrollbar-demo-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  width: 135px;
  border-radius: 16px;
  text-align: center;
}

.typeContainer {
  width: 100%;
  height: 80px;
  overflow-x: auto;

  .svgIcon {
    @include flex;
  }
}

.routerView {
  display: flex;
  flex: 1;
  overflow-y: auto;
  width: 100%;
  height: calc(100vh - 184px);
}

.typeBox {
  height: 80px;
  width: 135px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  .name {
    height: 16px;
    font-weight: 500;
    font-size: $f20;
    line-height: 20px;
    text-align: center;
    font-style: normal;
    text-transform: none;
    margin-top: $p10;
  }
}

.typeBoxNormal {
  background: transparent;
  color: rgba(0, 0, 0, 0.9);
}

.typeBoxSelected {
  background: $select-hover;
  color: white;
}
</style>
