<template> 
 | 
  <LoadingLayout :loading="isLoading" :error="isError" :loadError="refetch"> 
 | 
    <ContentScrollView style="background-color: transparent"> 
 | 
      <Cell :title="detail.name" titleSize="large"> 
 | 
        <div class="taskDetail-time"> 
 | 
          {{ 
 | 
            `${dayjs(detail.beginTime).format('YYYY年MM月DD日')}至${dayjs(detail.endTime).format( 
 | 
              'YYYY年MM月DD日' 
 | 
            )}` 
 | 
          }} 
 | 
        </div> 
 | 
        <div class="task-card-welfare-wrapper"> 
 | 
          <div class="task-card-welfare-list"> 
 | 
            <div class="task-card-welfare-list-item"> 
 | 
              {{ EnumSettlementCycleText[detail.settlementCycle] }} 
 | 
            </div> 
 | 
          </div> 
 | 
          <TaskPrice 
 | 
            :value="toThousand(detail.serviceFee ?? 0)" 
 | 
            :unit="BillingMethodEnumUnit[detail.billingMethod]" 
 | 
          /> 
 | 
        </div> 
 | 
        <div class="taskDetail-address-wrapper"> 
 | 
          <div class="taskDetail-address-title-wrapper"> 
 | 
            <img :src="IconLocaltion" class="taskDetail-address-title-icon" /> 
 | 
            <div class="taskDetail-address-title">{{ detail?.addressName ?? '' }}</div> 
 | 
          </div> 
 | 
          <div class="taskDetail-address-info-wrapper"> 
 | 
            <div class="taskDetail-address-info">{{ detail?.addressDetail ?? '' }}</div> 
 | 
            <RectRight :size="8" class="taskDetail-address-info-icon" /> 
 | 
          </div> 
 | 
        </div> 
 | 
      </Cell> 
 | 
      <Cell :show-title="false"> 
 | 
        <CellChunk title="福利信息"> 
 | 
          <div class="taskDetail-welfare-list"> 
 | 
            <TaskDetailWelfareItem 
 | 
              v-for="benefit in detail.benefits" 
 | 
              :key="benefit.benefitCode" 
 | 
              :icon="setOSSLink(benefit.benefitField2)" 
 | 
              :text="benefit.benefitContent" 
 | 
            /> 
 | 
          </div> 
 | 
        </CellChunk> 
 | 
      </Cell> 
 | 
    </ContentScrollView> 
 | 
  </LoadingLayout> 
 | 
</template> 
 | 
  
 | 
<script setup lang="ts"> 
 | 
import { useQuery } from '@tanstack/vue-query'; 
 | 
import Taro from '@tarojs/taro'; 
 | 
import * as taskServices from '@12333/services/apiV2/task'; 
 | 
import IconLocaltion from '@/assets/flexJob/icon-localtion.png'; 
 | 
import { TaskPrice, TaskDetailWelfareItem } from '@12333/components'; 
 | 
import dayjs from 'dayjs'; 
 | 
import { setOSSLink, toThousand } from '@12333/utils'; 
 | 
import { RectRight } from '@nutui/icons-vue-taro'; 
 | 
import { BillingMethodEnumUnit, EnumSettlementCycleText } from '@12333/constants'; 
 | 
  
 | 
defineOptions({ 
 | 
  name: 'JobDetail', 
 | 
}); 
 | 
  
 | 
// type Props = {}; 
 | 
  
 | 
// const props = withDefaults(defineProps<Props>(), {}); 
 | 
const router = Taro.useRouter(); 
 | 
  
 | 
const id = router.params?.id; 
 | 
  
 | 
const { 
 | 
  isLoading, 
 | 
  isError, 
 | 
  data: detail, 
 | 
  refetch, 
 | 
} = useQuery({ 
 | 
  queryKey: ['taskServices/getTaskInfo', id], 
 | 
  queryFn: async () => { 
 | 
    return await taskServices.getTaskInfo( 
 | 
      { id: id }, 
 | 
      { 
 | 
        showLoading: false, 
 | 
      } 
 | 
    ); 
 | 
  }, 
 | 
  placeholderData: () => ({} as API.GetTaskInfoQueryResult), 
 | 
}); 
 | 
</script> 
 | 
  
 | 
<style lang="scss"> 
 | 
@import '@/styles/common.scss'; 
 | 
  
 | 
.jobApplicationDetail-page-wrapper { 
 | 
  .taskDetail-time { 
 | 
    font-size: 24px; 
 | 
    color: boleGetCssVar('text-color', 'regular'); 
 | 
    line-height: 36px; 
 | 
    margin-bottom: 16px; 
 | 
  } 
 | 
  
 | 
  .task-card-welfare-wrapper { 
 | 
    display: flex; 
 | 
    align-items: flex-start; 
 | 
    padding-bottom: 48px; 
 | 
    border-bottom: 1px solid #d9d9d9; 
 | 
    margin-bottom: 12px; 
 | 
  
 | 
    .task-card-welfare-list { 
 | 
      flex: 1; 
 | 
      display: flex; 
 | 
      min-width: 0; 
 | 
      flex-wrap: wrap; 
 | 
      min-height: 40px; 
 | 
      row-gap: 6px; 
 | 
      column-gap: 18px; 
 | 
      margin-right: 10px; 
 | 
  
 | 
      .task-card-welfare-list-item { 
 | 
        font-size: 24px; 
 | 
        color: #ff7d00; 
 | 
        line-height: 36px; 
 | 
      } 
 | 
    } 
 | 
  } 
 | 
  
 | 
  .taskDetail-address-wrapper { 
 | 
    padding: 28px 32px 14px; 
 | 
    background: #f9fbff; 
 | 
    border-radius: 8px; 
 | 
  
 | 
    .taskDetail-address-title-wrapper { 
 | 
      display: flex; 
 | 
      align-items: center; 
 | 
      margin-bottom: 22px; 
 | 
  
 | 
      .taskDetail-address-title-icon { 
 | 
        width: 40px; 
 | 
        height: 40px; 
 | 
        margin-right: 8px; 
 | 
      } 
 | 
  
 | 
      .taskDetail-address-title { 
 | 
        flex: 1; 
 | 
        min-width: 0; 
 | 
        @include ellipsis; 
 | 
        font-size: 28px; 
 | 
        color: boleGetCssVar('text-color', 'primary'); 
 | 
        line-height: 42px; 
 | 
      } 
 | 
    } 
 | 
  
 | 
    .taskDetail-address-info-wrapper { 
 | 
      display: flex; 
 | 
      align-items: center; 
 | 
  
 | 
      .taskDetail-address-info { 
 | 
        flex: 1; 
 | 
        min-width: 0; 
 | 
        @include ellipsis; 
 | 
        font-weight: 400; 
 | 
        font-size: 24px; 
 | 
        color: boleGetCssVar('text-color', 'regular'); 
 | 
        line-height: 36px; 
 | 
      } 
 | 
  
 | 
      .taskDetail-address-info-icon { 
 | 
        color: boleGetCssVar('text-color', 'secondary'); 
 | 
        margin-left: 10px; 
 | 
      } 
 | 
    } 
 | 
  } 
 | 
  
 | 
  .taskDetail-welfare-list { 
 | 
    display: flex; 
 | 
    flex-wrap: wrap; 
 | 
    row-gap: 24px; 
 | 
  } 
 | 
} 
 | 
</style> 
 |