<template>
  <div class="app-container part-container">
    <div class="view-content"><skeleton style="margin-left:16px;" v-if="isSkeleton"></skeleton><Infoheader v-else :companyId="companyId" :companyInfo="companyInfo" :statistic="statistic" /></div><!-- 企业信息 -->
    <!-- <div class="view-content"><Operations :companyId="companyId" :financial="financial" /></div>公司经营 -->
    <!-- <div class="view-content"><Bidding :companyId="companyId" /></div>招标偏好、业务往来 -->
    <!-- <div class="view-content"><Busclue :companyId="companyId" :statistic="statistic" /></div>商机线索 -->
    <!-- <div class="view-content"><Finance :companyId="companyId" /></div>财务数据 -->
    <div class="view-content"><Relationship :companyId="companyId" :financial="financial" /></div><!--关系企业-->
    <div class="view-content"><Senior :companyId="companyId" /></div><!--高管-->
    <div class="view-content"><Risk :companyId="companyId" :statistic="statistic" /></div><!--风险概览-->
    <div class="view-content"><Tender :companyId="companyId" /></div><!--招标公告、企业动态-->
  </div>
</template>

<script>
import { statistic } from '@/api/detail/party-a/overview'
import { financial } from '@/api/detail/party-a/financial'
import Infoheader from "./component/infoheader"
import Operations from "./component/operations"
import Bidding from "./component/bidding"
import Busclue from './component/busclue'
import Finance from './component/finance'
import Relationship from './component/relationship'
import Senior from './component/senior'
import Risk from './component/risk'
import skeleton from '@/views/project/projectList/component/skeleton'
import Tender from "./component/tender"
export default {
  name: 'Overview',
  props: ['companyId', 'companyInfo','isSkeleton'],
  components: {
    Infoheader,
    Operations,
    Bidding,
    Busclue,
    Relationship,
    Senior,
    Risk,
    Finance,
    skeleton,
    Tender
  },
  data() {
    return {
      isShow: false,
      statistic: {},
      financial: {}
    }
  },
  created() {
    this.handleQuery()
  },
  methods: {
    async handleQuery() {
      let [statis, financ] = await Promise.all([
        statistic({companyId: this.companyId}),
        financial({cid: this.companyId})
      ])
      if(statis.code==200){
        this.statistic = statis.data
      }
      if(financ.code==200){
        this.financial = financ.data
      }
      this.isShow = true
    }
  }
}
</script>

<style lang="scss" scoped>
  .part-container{
    margin: 0;
    padding: 0;
    .view-content{
      margin-top: 12px;
    }
  }
</style>
