| | |
| | | <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" |
| | | ></CompanyDesc> |
| | | </ContentView> |
| | | <ProTabs |
| | | v-model="tab" |
| | |
| | | fullHeight |
| | | > |
| | | <ProTabPane :title="`任务`" pane-key="1"> |
| | | <CompanyTaskList /> |
| | | <CompanyTaskList :enterpriseId="enterpriseId" /> |
| | | </ProTabPane> |
| | | <ProTabPane :title="`企业信息`" pane-key="2"> |
| | | <CompanyInfo /> |
| | | <CompanyInfo :enterpriseId="enterpriseId" /> |
| | | </ProTabPane> |
| | | </ProTabs> |
| | | </LoadingLayout> |
| | |
| | | |
| | | <script setup lang="ts"> |
| | | import Taro from '@tarojs/taro'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import * as flexWorkerServices from '@12333/services/api/FlexWorker'; |
| | | 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: ['flexWorkerServices/getOrdeForDetail', companyId], |
| | | queryFn: async () => { |
| | | return await flexWorkerServices.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> |