diff --git a/src/pages/videos/list/index.tsx b/src/pages/videos/list/index.tsx index a60eb6f..cdf2247 100644 --- a/src/pages/videos/list/index.tsx +++ b/src/pages/videos/list/index.tsx @@ -1,5 +1,7 @@ import { useTranslation } from '@/i18n.ts' -import { Button, Form, Image, Popconfirm } from 'antd' +import { getToken } from '@/store/system.ts' +import { Button, DatePicker, Form, Image, Popconfirm } from 'antd' +import dayjs from 'dayjs' import { useAtom, useAtomValue, useSetAtom } from 'jotai' import { deleteVideoAtom, getTypeName, @@ -8,7 +10,14 @@ import { import { useEffect, useMemo, useState } from 'react' import Switch from '@/components/switch' import Action from '@/components/action/Action.tsx' -import { BetaSchemaForm, ProColumns, ProFormColumnsType, ProTable } from '@ant-design/pro-components' +import { + BetaSchemaForm, + ProColumns, + ProFormColumnsType, + ProFormDatePicker, + ProFormUploadButton, + ProTable +} from '@ant-design/pro-components' import ListPageLayout from '@/layout/ListPageLayout.tsx' import { categoryByIdAtom, categoryIdAtom } from '@/store/videos/category.ts' import TagPro from '@/components/tag-pro/TagPro.tsx' @@ -97,10 +106,58 @@ const Video = () => { }, { + 'title': t(`${i18nPrefix}.columns.year`, 'Year'), + 'dataIndex': 'year', + valueType: 'dateYear', + colProps: { + span: 4 + }, + render: (_dom, record) => { + return record.year + }, + renderFormItem: (_schema, config) => { + return + } + + }, + { 'title': t(`${i18nPrefix}.columns.category_id`, 'CategoryId'), 'dataIndex': 'class_name', + + colProps: { + span: 4 + }, }, { + 'title': t(`${i18nPrefix}.columns.img`, '封面'), + 'dataIndex': 'pic', + hideInSearch: true, + hideInTable: true, + colProps: { + span: 4 + }, + renderFormItem: (_schema, _config, form) => { + return + } + }, + + + { 'title': t(`${i18nPrefix}.columns.actor`, 'Actor'), 'dataIndex': 'actor', ellipsis: true, @@ -132,44 +189,7 @@ const Video = () => { 'title': t(`${i18nPrefix}.columns.remarks`, 'Remarks'), 'dataIndex': 'remarks' }, - { - 'title': t(`${i18nPrefix}.columns.pubdate`, 'Pubdate'), - 'dataIndex': 'pubdate', - valueType: 'dateTime', - colProps: { - span: 4 - } - }, - { - 'title': t(`${i18nPrefix}.columns.total`, 'Total'), - 'dataIndex': 'total', - valueType: 'digit', - colProps: { - span: 4 - } - }, - { - 'title': t(`${i18nPrefix}.columns.serial`, 'Serial'), - 'dataIndex': 'serial', - colProps: { - span: 4 - } - }, - { - 'title': t(`${i18nPrefix}.columns.duration`, 'Duration'), - 'dataIndex': 'duration', - colProps: { - span: 4 - } - }, - { - 'title': t(`${i18nPrefix}.columns.year`, 'Year'), - 'dataIndex': 'year', - valueType: 'dateYear', - colProps: { - span: 4 - } - }, + { 'title': t(`${i18nPrefix}.columns.tag`, 'Tag'), 'dataIndex': 'tag', @@ -181,7 +201,8 @@ const Video = () => { } }, renderFormItem: (schema, config) => { - return + return } }, { @@ -194,7 +215,8 @@ const Video = () => { } }, renderFormItem: (schema, config) => { - return + return } }, { @@ -207,24 +229,27 @@ const Video = () => { } }, renderFormItem: (schema, config) => { - return + return } }, - { + /*{ 'title': t(`${i18nPrefix}.columns.version`, 'Version'), 'dataIndex': 'version', renderFormItem: (schema, config) => { - return + return } }, { 'title': t(`${i18nPrefix}.columns.state`, 'State'), 'dataIndex': 'state', renderFormItem: (schema, config) => { - return + return } - }, + },*/ { 'title': t(`${i18nPrefix}.columns.douban_score`, 'DoubanScore'), 'dataIndex': 'douban_score', @@ -370,7 +395,7 @@ const Video = () => { }} loading={isSubmitting} onValuesChange={(values) => { - if(values.type_id) { + if (values.type_id) { setCategoryId(values.type_id) const typeName = getTypeName(values.type_id) form.setFieldsValue({