From 4de0aac0632f6e7ea1e0606c25abe1c7985c0d8d Mon Sep 17 00:00:00 2001 From: st52 Date: Wed, 22 May 2024 15:43:52 +0800 Subject: [PATCH] =?UTF-8?q?=20=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/icon/picker/IconList.tsx | 1 + src/pages/cms/collect/index.tsx | 122 +++++++++++++++++--------------- src/pages/videos/list/index.tsx | 77 +++++++++++++------- 3 files changed, 117 insertions(+), 83 deletions(-) diff --git a/src/components/icon/picker/IconList.tsx b/src/components/icon/picker/IconList.tsx index 090ab9a..75d3d70 100644 --- a/src/components/icon/picker/IconList.tsx +++ b/src/components/icon/picker/IconList.tsx @@ -37,4 +37,5 @@ const IconList: FC = () => { ) } +// eslint-disable-next-line react-refresh/only-export-components export default memo(IconList) \ No newline at end of file diff --git a/src/pages/cms/collect/index.tsx b/src/pages/cms/collect/index.tsx index 9f2fdb8..cad0353 100644 --- a/src/pages/cms/collect/index.tsx +++ b/src/pages/cms/collect/index.tsx @@ -50,9 +50,42 @@ const Collect = () => { { required: true, message: t(`${i18nPrefix}.columns.name`, '站点名称') } ] }, - }, { + 'title': t(`${i18nPrefix}.columns.weights`, '权重'), + 'dataIndex': 'weights', + valueType: 'digit', + onHeaderCell: () => ({ + width: 80, + }), + }, + { + 'title': t(`${i18nPrefix}.columns.site_auth`, '搜片认证站点'), + 'dataIndex': 'site_auth', + valueType: 'switch', + onHeaderCell: () => ({ + width: 100, + }), + render: (_dom, record) => { + return + } + }, + { + 'title': t(`${i18nPrefix}.columns.site_cooperation`, '搜片合作优质站点'), + 'dataIndex': 'site_cooperation', + valueType: 'switch', + onHeaderCell: () => ({ + width: 130, + }), + colProps: { + span: 8 + }, + render: (_dom, record) => { + return + } + }, + + { 'title': t(`${i18nPrefix}.columns.icon_cdn`, '站点图标'), 'dataIndex': 'icon_cdn', onHeaderCell: () => ({ @@ -71,11 +104,11 @@ const Collect = () => { ellipsis: true, copyable: true, }, - { - 'title': t(`${i18nPrefix}.columns.param`, '参数'), - 'dataIndex': 'param', - hideInTable: true, - }, + // { + // 'title': t(`${i18nPrefix}.columns.param`, '参数'), + // 'dataIndex': 'param', + // hideInTable: true, + // }, { 'title': t(`${i18nPrefix}.columns.type_id`, '类型'), 'dataIndex': 'type_id', @@ -90,21 +123,21 @@ const Collect = () => { options: types } }, - { - 'title': t(`${i18nPrefix}.columns.opt`, '操作方式'), - 'dataIndex': 'opt', - hideInTable: true, - }, - { - 'title': t(`${i18nPrefix}.columns.filter`, '过滤模式'), - 'dataIndex': 'filter', - hideInTable: true, - }, - { - 'title': t(`${i18nPrefix}.columns.filter_form`, '过滤表单'), - 'dataIndex': 'filter_form', - hideInTable: true, - }, + // { + // 'title': t(`${i18nPrefix}.columns.opt`, '操作方式'), + // 'dataIndex': 'opt', + // hideInTable: true, + // }, + // { + // 'title': t(`${i18nPrefix}.columns.filter`, '过滤模式'), + // 'dataIndex': 'filter', + // hideInTable: true, + // }, + // { + // 'title': t(`${i18nPrefix}.columns.filter_form`, '过滤表单'), + // 'dataIndex': 'filter_form', + // hideInTable: true, + // }, { 'title': t(`${i18nPrefix}.columns.sync_pic`, '同步图片'), 'dataIndex': 'sync_pic', @@ -120,19 +153,11 @@ const Collect = () => { } }, - { - 'title': t(`${i18nPrefix}.columns.class`, '扩展分类'), - 'dataIndex': 'class', - valueType: 'textarea', - }, - { - 'title': t(`${i18nPrefix}.columns.weights`, '权重'), - 'dataIndex': 'weights', - valueType: 'digit', - onHeaderCell: () => ({ - width: 80, - }), - }, + // { + // 'title': t(`${i18nPrefix}.columns.class`, '扩展分类'), + // 'dataIndex': 'class', + // valueType: 'textarea', + // }, { 'title': t(`${i18nPrefix}.columns.status`, '启用'), 'dataIndex': 'status', @@ -162,34 +187,15 @@ const Collect = () => { ellipsis: true, }, { - 'title': t(`${i18nPrefix}.columns.site_auth`, '搜片认证站点'), - 'dataIndex': 'site_auth', - valueType: 'switch', - onHeaderCell: () => ({ - width: 100, - }), - render: (_dom, record) => { - return - } - }, - { - 'title': t(`${i18nPrefix}.columns.site_cooperation`, '搜片合作优质站点'), - 'dataIndex': 'site_cooperation', - valueType: 'switch', - onHeaderCell: () => ({ - width: 130, - }), - render: (_dom, record) => { - return - } - }, - { 'title': t(`${i18nPrefix}.columns.categories_rules`, '站点采集规则'), 'dataIndex': 'categories_rules', valueType: 'textarea', onHeaderCell: () => ({ width: 200, }), + colProps: { + span: 8 + }, ellipsis: true, }, { @@ -285,13 +291,13 @@ const Collect = () => { /> { } }, colProps: { - span: 8 + span: 16 } }, { @@ -91,20 +91,18 @@ const Video = () => { colProps: { span: 8 } - }, - { - 'title': t(`${i18nPrefix}.columns.source_url`, 'SourceUrl'), - 'dataIndex': 'source_url', - ellipsis: true, - copyable: true, - onHeaderCell: () => { - return { - width: 200, - } - }, - }, - + // { + // 'title': t(`${i18nPrefix}.columns.source_url`, 'SourceUrl'), + // 'dataIndex': 'source_url', + // ellipsis: true, + // copyable: true, + // onHeaderCell: () => { + // return { + // width: 200, + // } + // }, + // }, { 'title': t(`${i18nPrefix}.columns.year`, 'Year'), 'dataIndex': 'year', @@ -129,7 +127,35 @@ const Video = () => { 'dataIndex': 'class_name', colProps: { - span: 4 + span: 12 + }, + }, + { + 'title': t(`${i18nPrefix}.columns.douban_id`, 'DouBanId'), + 'dataIndex': 'douban_id', + colProps: { + span: 6 + }, + }, + { + 'title': t(`${i18nPrefix}.columns.imdb_id`, 'ImdbId'), + 'dataIndex': 'imdb_id', + colProps: { + span: 6 + }, + }, + { + 'title': t(`${i18nPrefix}.columns.rt_id`, 'RtId'), + 'dataIndex': 'rt_id', + colProps: { + span: 6 + }, + }, + { + 'title': t(`${i18nPrefix}.columns.mal_id`, 'MalId'), + 'dataIndex': 'mal_id', + colProps: { + span: 6 }, }, { @@ -138,7 +164,7 @@ const Video = () => { hideInSearch: true, hideInTable: true, colProps: { - span: 4 + span: 24 }, renderFormItem: (_schema, _config, form) => { return { 'dataIndex': 'director' }, { + 'title': t(`${i18nPrefix}.columns.writer`, 'Writer'), + 'dataIndex': 'writer' + }, + { 'title': t(`${i18nPrefix}.columns.content`, 'Content'), 'dataIndex': 'content', valueType: 'textarea', @@ -181,15 +211,12 @@ const Video = () => { width: 200, }), }, - { - 'title': t(`${i18nPrefix}.columns.writer`, 'Writer'), - 'dataIndex': 'writer' - }, - { - 'title': t(`${i18nPrefix}.columns.remarks`, 'Remarks'), - 'dataIndex': 'remarks' - }, - + // { + // 'title': t(`${i18nPrefix}.columns.remarks`, 'Remarks'), + // valueType: 'textarea', + // ellipsis: true, + // 'dataIndex': 'remarks' + // }, { 'title': t(`${i18nPrefix}.columns.tag`, 'Tag'), 'dataIndex': 'tag',