|  |  |  | 
|---|
|  |  |  | <PageLayoutWithBg class="companyDetail-page-wrapper" title="公司详情" :need-auth="false"> | 
|---|
|  |  |  | <LoadingLayout :loading="isLoading" :error="isError" :loadError="refetch"> | 
|---|
|  |  |  | <ContentView> | 
|---|
|  |  |  | <CompanyDesc style="background-color: #fff" :showArrow="false"></CompanyDesc> | 
|---|
|  |  |  | <CompanyDesc | 
|---|
|  |  |  | style="background-color: #fff" | 
|---|
|  |  |  | :showArrow="false" | 
|---|
|  |  |  | :enterpriseName="enterpriseDetail?.enterpriseName ?? ''" | 
|---|
|  |  |  | :taskCount="enterpriseDetail?.taskCount ?? 0" | 
|---|
|  |  |  | :isReal="enterpriseDetail?.isReal ?? false" | 
|---|
|  |  |  | ></CompanyDesc> | 
|---|
|  |  |  | </ContentView> | 
|---|
|  |  |  | <ProTabs | 
|---|
|  |  |  | v-model="tab" | 
|---|
|  |  |  | name="companyDetail-tab" | 
|---|
|  |  |  | :showSmile="false" | 
|---|
|  |  |  | class="companyDetail-tabs" | 
|---|
|  |  |  | isTransparent | 
|---|
|  |  |  | title-gutter="8" | 
|---|
|  |  |  | fullHeight | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <ProTabPane :title="`任务`" pane-key="1"> | 
|---|
|  |  |  | <CompanyTaskList /> | 
|---|
|  |  |  | </ProTabPane> | 
|---|
|  |  |  | <ProTabPane :title="`企业信息`" pane-key="2"> | 
|---|
|  |  |  | <CompanyInfo /> | 
|---|
|  |  |  | </ProTabPane> | 
|---|
|  |  |  | </ProTabs> | 
|---|
|  |  |  | <div style="flex: 1; min-height: 0"> | 
|---|
|  |  |  | <ProTabs | 
|---|
|  |  |  | v-model="tab" | 
|---|
|  |  |  | name="companyDetail-tab" | 
|---|
|  |  |  | :showSmile="false" | 
|---|
|  |  |  | class="companyDetail-tabs" | 
|---|
|  |  |  | isTransparent | 
|---|
|  |  |  | title-gutter="8" | 
|---|
|  |  |  | fullHeight | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <ProTabPane :title="`任务`" pane-key="1"> | 
|---|
|  |  |  | <CompanyTaskList :enterpriseId="enterpriseId" /> | 
|---|
|  |  |  | </ProTabPane> | 
|---|
|  |  |  | <ProTabPane :title="`企业信息`" pane-key="2"> | 
|---|
|  |  |  | <CompanyInfo :enterpriseId="enterpriseId" /> | 
|---|
|  |  |  | </ProTabPane> | 
|---|
|  |  |  | </ProTabs> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </LoadingLayout> | 
|---|
|  |  |  | </PageLayoutWithBg> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script setup lang="ts"> | 
|---|
|  |  |  | import Taro from '@tarojs/taro'; | 
|---|
|  |  |  | import { useQuery } from '@tanstack/vue-query'; | 
|---|
|  |  |  | import * as orderServices from '@12333/services/api/Order'; | 
|---|
|  |  |  | import CompanyDesc from '../components/CompanyDesc.vue'; | 
|---|
|  |  |  | import CompanyTaskList from '../components/CompanyTaskList.vue'; | 
|---|
|  |  |  | import CompanyInfo from '../components/CompanyInfo.vue'; | 
|---|
|  |  |  | import { ProTabs, ProTabPane } from '@12333/components'; | 
|---|
|  |  |  | import { useEnterpriseDetail } from '@12333/hooks'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | defineOptions({ | 
|---|
|  |  |  | name: 'companyDetail', | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const router = Taro.useRouter(); | 
|---|
|  |  |  | const companyId = router.params?.id ?? ''; | 
|---|
|  |  |  | const enterpriseId = router.params?.id ?? ''; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const tab = ref('1'); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const { | 
|---|
|  |  |  | isLoading, | 
|---|
|  |  |  | isError, | 
|---|
|  |  |  | data: detail, | 
|---|
|  |  |  | refetch, | 
|---|
|  |  |  | } = useQuery({ | 
|---|
|  |  |  | queryKey: ['orderServices/getOrdeForDetail', companyId], | 
|---|
|  |  |  | queryFn: async () => { | 
|---|
|  |  |  | return await orderServices.getOrdeForDetail( | 
|---|
|  |  |  | { id: companyId }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | showLoading: false, | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | placeholderData: () => ({} as API.OrderInfoDto), | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | const { isLoading, isError, enterpriseDetail, refetch } = useEnterpriseDetail({ id: enterpriseId }); | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <style lang="scss"> | 
|---|
|  |  |  | @import '@/styles/common.scss'; | 
|---|
|  |  |  | </style> | 
|---|