/* * @Description: * @FilePath: \base-framework\apps\partner-portal-web\src\views\basic-information\constants.ts * @Author: freud * @Date: 2023-06-06 18:23:04 * @LastEditTime: 2023-11-03 10:11:41 * @LastEditors: freud * @Reference: */ import type { Cropper, DescItem } from '@eciol/ant-ui'; import { useI18n } from '@eciol/locale'; import { formatUtcDate } from '@eciol/shared'; import { genderMap } from '@/utils'; const { t } = useI18n(); export const basicInfoCardList = () => [ { icon: 'material-symbols:star', title: t('partnerPortal.basicInformation.partnerType'), field: 'oType', }, { icon: 'ion:time', title: t('partnerPortal.basicInformation.firstCoop'), field: 'firstCoop', }, { icon: 'material-symbols:output-sharp', title: t('partnerPortal.basicInformation.output'), field: 'dayCount', }, { icon: 'material-symbols:flag', title: t('partnerPortal.basicInformation.jasTotal'), field: 'totalJAS', }, ]; export const basicInfoSchema: () => DescItem[] = () => [ { field: 'motherL', label: t('partnerPortal.basicInformation.motherLang'), }, { field: 'email', label: t('partnerPortal.basicInformation.email'), }, { field: 'imAccount', label: t('partnerPortal.basicInformation.IM1'), }, { field: 'mobile', label: t('partnerPortal.basicInformation.mobile'), }, { field: 'sex', label: t('partnerPortal.basicInformation.sex'), render(val) { return genderMap()[val] ?? '--'; }, }, { field: 'birthday', label: t('partnerPortal.basicInformation.birthday'), render(val) { return formatUtcDate({ date: val }) ?? '--'; }, }, ]; export const monthList = () => { const { t } = useI18n(); return [ { label: t('partnerPortal.basicInformation.jan'), value: 0 }, { label: t('partnerPortal.basicInformation.feb'), value: 1 }, { label: t('partnerPortal.basicInformation.mar'), value: 2 }, { label: t('partnerPortal.basicInformation.apr'), value: 3 }, { label: t('partnerPortal.basicInformation.may'), value: 4 }, { label: t('partnerPortal.basicInformation.jun'), value: 5 }, { label: t('partnerPortal.basicInformation.jul'), value: 6 }, { label: t('partnerPortal.basicInformation.aug'), value: 7 }, { label: t('partnerPortal.basicInformation.sep'), value: 8 }, { label: t('partnerPortal.basicInformation.oct'), value: 9 }, { label: t('partnerPortal.basicInformation.nov'), value: 10 }, { label: t('partnerPortal.basicInformation.dec'), value: 11 }, ]; }; // 展示星期的工作状态 export const weekList = () => [ { label: t('partnerPortal.basicInformation.mon'), value: 1, isWorking: false }, { label: t('partnerPortal.basicInformation.tue'), value: 2, isWorking: false }, { label: t('partnerPortal.basicInformation.wed'), value: 3, isWorking: false }, { label: t('partnerPortal.basicInformation.tur'), value: 4, isWorking: false }, { label: t('partnerPortal.basicInformation.fri'), value: 5, isWorking: false }, { label: t('partnerPortal.basicInformation.sat'), value: 6, isWorking: false }, { label: t('partnerPortal.basicInformation.sun'), value: 0, isWorking: false }, { label: t('partnerPortal.basicInformation.legal'), value: 8, isWorking: false }, ]; export const top3ProgressList = [ { labelField: 'labelField', valueField: 'valueField', status: 'normal', percentField: 'rate', }, { labelField: 'labelField1', valueField: 'valueField1', status: 'success', percentField: 'rate', }, { labelField: 'labelField2', valueField: 'valueField2', status: 'exception', strokeColor: '#EFBD47', percentField: 'rate', }, ]; export const signtureCropperOption: Cropper.Options = { dragMode: 'none', aspectRatio: 300 / 130, cropBoxResizable: false, minCropBoxWidth: 300, }; export const avatarCropperOption: Cropper.Options = { dragMode: 'none', aspectRatio: 1, cropBoxResizable: false, minCropBoxWidth: 200, };