|
@@ -0,0 +1,205 @@
|
|
|
+import { BasicColumn, FormSchema } from '@/components/Table';
|
|
|
+import { useI18n } from '@/hooks/web/useI18n';
|
|
|
+import { formatToDateTime } from '@/utils/dateUtil';
|
|
|
+
|
|
|
+const { t } = useI18n();
|
|
|
+
|
|
|
+export const columns: BasicColumn[] = [
|
|
|
+ {
|
|
|
+ title: t('wechat.employee.title'),
|
|
|
+ dataIndex: 'title',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: t('wechat.employee.avatar'),
|
|
|
+ dataIndex: 'avatar',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: t('wechat.employee.tags'),
|
|
|
+ dataIndex: 'tags',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: t('wechat.employee.hireCount'),
|
|
|
+ dataIndex: 'hireCount',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: t('wechat.employee.serviceCount'),
|
|
|
+ dataIndex: 'serviceCount',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: t('wechat.employee.achievementCount'),
|
|
|
+ dataIndex: 'achievementCount',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: t('wechat.employee.intro'),
|
|
|
+ dataIndex: 'intro',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: t('wechat.employee.estimate'),
|
|
|
+ dataIndex: 'estimate',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: t('wechat.employee.skill'),
|
|
|
+ dataIndex: 'skill',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: t('wechat.employee.abilityType'),
|
|
|
+ dataIndex: 'abilityType',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: t('wechat.employee.scene'),
|
|
|
+ dataIndex: 'scene',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: t('wechat.employee.switchIn'),
|
|
|
+ dataIndex: 'switchIn',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: t('wechat.employee.tutorial'),
|
|
|
+ dataIndex: 'tutorial',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: t('wechat.employee.videoUrl'),
|
|
|
+ dataIndex: 'videoUrl',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: t('wechat.employee.workExperience'),
|
|
|
+ dataIndex: 'workExperience',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: t('common.createTime'),
|
|
|
+ dataIndex: 'createdAt',
|
|
|
+ width: 70,
|
|
|
+ customRender: ({ record }) => {
|
|
|
+ return formatToDateTime(record.createdAt);
|
|
|
+ },
|
|
|
+ },
|
|
|
+];
|
|
|
+
|
|
|
+export const searchFormSchema: FormSchema[] = [
|
|
|
+ {
|
|
|
+ field: 'title',
|
|
|
+ label: t('wechat.employee.title'),
|
|
|
+ component: 'Input',
|
|
|
+ colProps: { span: 8 },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'tags',
|
|
|
+ label: t('wechat.employee.tags'),
|
|
|
+ component: 'Input',
|
|
|
+ colProps: { span: 8 },
|
|
|
+ },
|
|
|
+];
|
|
|
+
|
|
|
+export const formSchema: FormSchema[] = [
|
|
|
+ {
|
|
|
+ field: 'id',
|
|
|
+ label: 'ID',
|
|
|
+ component: 'Input',
|
|
|
+ show: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'title',
|
|
|
+ label: t('wechat.employee.title'),
|
|
|
+ component: 'Input',
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'avatar',
|
|
|
+ label: t('wechat.employee.avatar'),
|
|
|
+ component: 'Input',
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'tags',
|
|
|
+ label: t('wechat.employee.tags'),
|
|
|
+ component: 'Input',
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'hireCount',
|
|
|
+ label: t('wechat.employee.hireCount'),
|
|
|
+ component: 'InputNumber',
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'serviceCount',
|
|
|
+ label: t('wechat.employee.serviceCount'),
|
|
|
+ component: 'InputNumber',
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'achievementCount',
|
|
|
+ label: t('wechat.employee.achievementCount'),
|
|
|
+ component: 'InputNumber',
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'intro',
|
|
|
+ label: t('wechat.employee.intro'),
|
|
|
+ component: 'Input',
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'estimate',
|
|
|
+ label: t('wechat.employee.estimate'),
|
|
|
+ component: 'Input',
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'skill',
|
|
|
+ label: t('wechat.employee.skill'),
|
|
|
+ component: 'Input',
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'abilityType',
|
|
|
+ label: t('wechat.employee.abilityType'),
|
|
|
+ component: 'Input',
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'scene',
|
|
|
+ label: t('wechat.employee.scene'),
|
|
|
+ component: 'Input',
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'switchIn',
|
|
|
+ label: t('wechat.employee.switchIn'),
|
|
|
+ component: 'Input',
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'tutorial',
|
|
|
+ label: t('wechat.employee.tutorial'),
|
|
|
+ component: 'Input',
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'videoUrl',
|
|
|
+ label: t('wechat.employee.videoUrl'),
|
|
|
+ component: 'Input',
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'workExperience',
|
|
|
+ label: t('wechat.employee.workExperience'),
|
|
|
+ component: 'Input',
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+];
|