<template>
  <div class="h-full flex p-3 flex-col businessDetail">
    <div class="w-full bg-white p-2 mb-2 shadow-md rounded-md flex items-center">
      <div class="icon mr-4">
        <el-link :underline="false" @click="backPath()">
          <el-icon class="el-icon--right"><icon-view /></el-icon> 返回客户列表
        </el-link>
      </div>
      <div class="mr-8">
        <el-select v-model="value" placeholder="请选择" style="width: 150px">
          <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
        </el-select>
      </div>
    </div>
    <!-- 内容 -->
    <div class="flex-1 flex flex-col overflow-y-auto overflow-x-hidden scroll-bar">
      <div class="w-full h-auto flex justify-between">
        <div class="bg-white shadow-md rounded-md" style="width: 46%;">
          <Information />
        </div>
        <div class="bg-white ml-2 shadow-md rounded-md flex-1">
          <Attachment />
        </div>
      </div>

      <div class="w-full h-auto flex justify-between mt-2">
        <div class="bg-white shadow-md rounded-md" style="width: 65%;">
          <RelatedTasks />
        </div>
        <div class="bg-white ml-2 shadow-md rounded-md flex-1">
          <OperationRecord />
        </div>
      </div>

      <div class="w-full h-auto flex justify-between mt-2">
        <div class="bg-white shadow-md rounded-md w-full">
          <RelatedContacts />
        </div>
      </div>

      <div class="w-full h-auto flex justify-between mt-2">
        <div class="bg-white shadow-md rounded-md w-full">
          <RelatedBusiness />
        </div>
      </div>

      <div class="w-full h-auto flex justify-between mt-2">
        <div class="bg-white shadow-md rounded-md w-full">
          <RelatedOrders />
        </div>
      </div>
    </div>
  </div>
</template>
  
<script lang="ts" setup>
import { ref, reactive, onMounted, inject } from "vue";
import type { FormInstance, FormRules } from 'element-plus'
import { backPath } from '@/utils/tools'
import { Edit, ArrowLeft as IconView } from '@element-plus/icons-vue'
import { stageStatus } from '../api'

import Information from '../component/information.vue'
import Attachment from '../component/attachment.vue'
import RelatedTasks from '../component/relatedTasks.vue';
import OperationRecord from '../component/operationRecord.vue';
import RelatedBusiness from '../component/relatedBusiness.vue';
import RelatedContacts from "../component/relatedContacts.vue";
import RelatedOrders from "../component/relatedOrders.vue"

const value = ref('')
const stageStatusVal = ref('')
const options = [
  {
    value: 'Option1',
    label: 'Option1',
  },
  {
    value: 'Option2',
    label: 'Option2',
  },
  {
    value: 'Option3',
    label: 'Option3',
  },
  {
    value: 'Option4',
    label: 'Option4',
  },
  {
    value: 'Option5',
    label: 'Option5',
  },
]


function handleScroll(event: any) { // 滚表横向滚动
  if (event.deltaY) {
    event.preventDefault();
    const element = event.currentTarget;
    element.scrollLeft += event.deltaY;
  }
}
</script>
  
<style lang="scss" scoped>
.businessDetail {
  .icon {
    .el-link {
      color: #0052CC;
    }
  }

  .text {
    .el-link {
      color: #fff;
      font-size: 14px;
    }
  }

  .backDarkBlue {
    background-color: #0052CC;
    color: #fff;
  }

  .backGray {
    background-color: #F4F5F7;
    color: #000;
  }

  .startStep {
    clip-path: polygon(0% 0%,
        90% 0%,
        100% 50%,
        90% 100%,
        0% 100%);
  }

  .nextStep {
    clip-path: polygon(0% 0%,
        90% 0%,
        100% 50%,
        90% 100%,
        0% 100%,
        10% 50%);
  }

  .endStep {

    clip-path: polygon(0% 0%,
        100% 0%,
        100% 100%,
        0% 100%,
        10% 50%);
  }

  .itemPing {
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .selectClas >>> .el-select__wrapper {
    background-color: none !important;
    box-shadow: none !important;
  }
}
</style>