diff --git a/src/pages/db/movie/components/Edit.tsx b/src/pages/db/movie/components/Edit.tsx index 8bd40f3..b89c3cd 100644 --- a/src/pages/db/movie/components/Edit.tsx +++ b/src/pages/db/movie/components/Edit.tsx @@ -1,9 +1,11 @@ import { useStyle } from './style' import { Avatar, Button, Form, Layout, Menu, Row, Space, Spin } from 'antd' import { t } from '@/i18n' -import { ReactNode, useCallback, useMemo, useState } from 'react' +import { ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react' import { FormInstance } from 'antd/lib' import { BetaSchemaForm, ProFormColumnsType, ProTable } from '@ant-design/pro-components' +import Switch from '@/components/switch' +import dayjs from 'dayjs' export interface IEditProps> { record: T @@ -26,6 +28,100 @@ const items = [ { label: t(`${i18nPrefix}.nav.videos`, '视频'), key: 'videos' }, ] +const detailData = { + 'adult': false, + 'backdrop_path': '/hZkgoQYus5vegHoetLkCJzb17zJ.jpg', + 'belongs_to_collection': null, + 'budget': 63000000, + 'genres': [ + { + 'id': 18, + 'name': 'Drama' + }, + { + 'id': 53, + 'name': 'Thriller' + }, + { + 'id': 35, + 'name': 'Comedy' + } + ], + 'homepage': 'http://www.foxmovies.com/movies/fight-club', + 'id': 550, + 'imdb_id': 'tt0137523', + 'original_language': 'en', + 'original_title': 'Fight Club', + 'overview': 'A ticking-time-bomb insomniac and a slippery soap salesman channel primal male aggression into a shocking new form of therapy. Their concept catches on, with underground "fight clubs" forming in every town, until an eccentric gets in the way and ignites an out-of-control spiral toward oblivion.', + 'popularity': 61.416, + 'poster_path': '/pB8BM7pdSp6B6Ih7QZ4DrQ3PmJK.jpg', + 'production_companies': [ + { + 'id': 508, + 'logo_path': '/7cxRWzi4LsVm4Utfpr1hfARNurT.png', + 'name': 'Regency Enterprises', + 'origin_country': 'US' + }, + { + 'id': 711, + 'logo_path': '/tEiIH5QesdheJmDAqQwvtN60727.png', + 'name': 'Fox 2000 Pictures', + 'origin_country': 'US' + }, + { + 'id': 20555, + 'logo_path': '/hD8yEGUBlHOcfHYbujp71vD8gZp.png', + 'name': 'Taurus Film', + 'origin_country': 'DE' + }, + { + 'id': 54051, + 'logo_path': null, + 'name': 'Atman Entertainment', + 'origin_country': '' + }, + { + 'id': 54052, + 'logo_path': null, + 'name': 'Knickerbocker Films', + 'origin_country': 'US' + }, + { + 'id': 4700, + 'logo_path': '/A32wmjrs9Psf4zw0uaixF0GXfxq.png', + 'name': 'The Linson Company', + 'origin_country': 'US' + }, + { + 'id': 25, + 'logo_path': '/qZCc1lty5FzX30aOCVRBLzaVmcp.png', + 'name': '20th Century Fox', + 'origin_country': 'US' + } + ], + 'production_countries': [ + { + 'iso_3166_1': 'US', + 'name': 'United States of America' + } + ], + 'release_date': '1999-10-15', + 'revenue': 100853753, + 'runtime': 139, + 'spoken_languages': [ + { + 'english_name': 'English', + 'iso_639_1': 'en', + 'name': 'English' + } + ], + 'status': 'Released', + 'tagline': 'Mischief. Mayhem. Soap.', + 'title': 'Fight Club', + 'video': false, + 'vote_average': 8.433, + 'vote_count': 26280 +} const titlesData = { 'id': 533535, 'titles': [ @@ -1937,9 +2033,1299 @@ const crewData = [ 'url': '/person/4858668-jessica-walker' } ] +const external_ids = { + 'imdb_id': 'tt6263850', + 'wikidata_id': 'Q102180106', + 'facebook_id': 'DeadpoolMovie', + 'instagram_id': 'deadpoolmovie', + 'twitter_id': 'deadpoolmovie' +} +const keywordsData = [ + { + 'id': 1701, + 'name': 'hero' + }, + { + 'id': 9715, + 'name': 'superhero' + }, + { + 'id': 2095, + 'name': 'anti hero' + }, + { + 'id': 1852, + 'name': 'mutant' + }, + { + 'id': 11687, + 'name': 'breaking the fourth wall' + }, + { + 'id': 180547, + 'name': 'marvel cinematic universe (mcu)' + }, + { + 'id': 234268, + 'name': 'mutants' + }, + { + 'id': 265979, + 'name': 'superhero teamup' + } +] +const releaseInformationData = [ + { + 'iso_3166_1': 'AE', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'AR', + 'release_dates': [ + { + 'certification': '+13', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'AT', + 'release_dates': [ + { + 'certification': '16', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'AU', + 'release_dates': [ + { + 'certification': 'MA 15+', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'AZ', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'BE', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'BG', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'BN', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'BR', + 'release_dates': [ + { + 'certification': '18', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'CA', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-26T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'CH', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'CN', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-26T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'CZ', + 'release_dates': [ + { + 'certification': '15+', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'DE', + 'release_dates': [ + { + 'certification': '16', + 'descriptors': [ + 'Violence', + 'Injury', + 'Language' + ], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'DK', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'DO', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'EC', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'EE', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'ES', + 'release_dates': [ + { + 'certification': '18', + 'descriptors': [], + 'iso_639_1': 'es', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'FI', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'FR', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-23T00:00:00.000Z', + 'type': 1 + }, + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'GB', + 'release_dates': [ + { + 'certification': '15', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'GR', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'HK', + 'release_dates': [ + { + 'certification': 'III', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'HU', + 'release_dates': [ + { + 'certification': '18', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'ID', + 'release_dates': [ + { + 'certification': '17+', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'IE', + 'release_dates': [ + { + 'certification': '16', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'IL', + 'release_dates': [ + { + 'certification': '16', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'IN', + 'release_dates': [ + { + 'certification': 'A', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-26T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'IS', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-26T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'IT', + 'release_dates': [ + { + 'certification': '6+', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'JP', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'KH', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'KR', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'KZ', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'LT', + 'release_dates': [ + { + 'certification': 'N-16', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'MA', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'MX', + 'release_dates': [ + { + 'certification': 'C', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'MY', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'NL', + 'release_dates': [ + { + 'certification': '16', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'NO', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'PH', + 'release_dates': [ + { + 'certification': 'R-16', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'PL', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-26T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'PR', + 'release_dates': [ + { + 'certification': 'R', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'PT', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'SE', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'SG', + 'release_dates': [ + { + 'certification': 'M18', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'SK', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'TH', + 'release_dates': [ + { + 'certification': '15', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'TR', + 'release_dates': [ + { + 'certification': '16+', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'TW', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'UA', + 'release_dates': [ + { + 'certification': '18+', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'US', + 'release_dates': [ + { + 'certification': 'R', + 'descriptors': [], + 'iso_639_1': '', + 'note': 'New York City, New York', + 'release_date': '2024-07-22T00:00:00.000Z', + 'type': 1 + }, + { + 'certification': 'R', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-26T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'VI', + 'release_dates': [ + { + 'certification': 'R', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-25T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'VN', + 'release_dates': [ + { + 'certification': '', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-26T00:00:00.000Z', + 'type': 3 + } + ] + }, + { + 'iso_3166_1': 'ZA', + 'release_dates': [ + { + 'certification': '16', + 'descriptors': [], + 'iso_639_1': '', + 'note': '', + 'release_date': '2024-07-24T00:00:00.000Z', + 'type': 3 + } + ] + } +] +const taglineData = [ + { primary: true, text: 'Mischief. Mayhem. Soap.' }, + {primary: false, text: "هيا معاً"}, +] +const videosData = [ + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Billion with a B", + "key": "PWdtBp5opqw", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-08-11T17:01:35.000Z", + "id": "66b9af137016621fb072d9a3" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Flame On", + "key": "YyVAwYCzuDk", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-08-10T16:00:34.000Z", + "id": "66b8433586cd6c9ecba7d971" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Portal", + "key": "YBYOuQJ5Wno", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-08-09T16:00:35.000Z", + "id": "66b84340664dbd1625aab629" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Smashing", + "key": "qhAB4Y1VrO8", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-08-08T20:00:30.000Z", + "id": "66b57d92cf10bee8a8c5e71b" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Crying", + "key": "BId1AMHzItQ", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-08-03T16:00:10.000Z", + "id": "66aeb0171b9fd9ffd700f0de" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Watch Deadpool & Wolverine again and again and again and again and again and again and again and aga", + "key": "XBLJ6XOCBdY", + "site": "YouTube", + "size": 1080, + "type": "Featurette", + "official": true, + "published_at": "2024-08-03T01:30:56.000Z", + "id": "66aeb0310fbfa33dc400f0ca" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Smash", + "key": "QQ_jvHQM53o", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-08-02T17:00:29.000Z", + "id": "66aeaffeca4548c3b0b2caa3" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Score", + "key": "G9BWRaXdA-M", + "site": "YouTube", + "size": 1080, + "type": "Behind the Scenes", + "official": true, + "published_at": "2024-08-01T16:00:13.000Z", + "id": "66abbc6431e9e123f0507b07" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Dogpool Blooper", + "key": "45LohjMTJOM", + "site": "YouTube", + "size": 720, + "type": "Bloopers", + "official": true, + "published_at": "2024-07-30T22:16:28.000Z", + "id": "66abbdba264b247a70f8e1a7" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Thank You, Ray Chan", + "key": "3yPfmJMzVVY", + "site": "YouTube", + "size": 1080, + "type": "Behind the Scenes", + "official": true, + "published_at": "2024-07-30T16:00:03.000Z", + "id": "66a9ca1a08dbe0dcbb02fd39" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Ultimate Deadpool & Wolverine Celebration of Life", + "key": "9Bo_GQtD7vo", + "site": "YouTube", + "size": 1080, + "type": "Featurette", + "official": true, + "published_at": "2024-07-27T19:30:00.000Z", + "id": "66abbd0176c8d5d7bdf513a5" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Deadpool & Wolverine & Walking4Hope", + "key": "XfD4F9E3yX0", + "site": "YouTube", + "size": 1080, + "type": "Featurette", + "official": true, + "published_at": "2024-07-26T18:59:58.000Z", + "id": "66abbda5b268a2bdb45c8452" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Legendary", + "key": "dIpNpMfGxK8", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-07-25T19:01:59.000Z", + "id": "66a2a42585b44ccacd0a0ead" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Go", + "key": "eoFCmgF8Cjs", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-07-25T15:00:42.000Z", + "id": "66a29d6043ee488ea1e7fda0" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Official IMAX® Interview", + "key": "xdUc7qURlk4", + "site": "YouTube", + "size": 1080, + "type": "Featurette", + "official": true, + "published_at": "2024-07-25T04:50:34.000Z", + "id": "66a542ab4df5b07f2eb14759" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Pray", + "key": "u06vqfLcBas", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-07-24T15:49:03.000Z", + "id": "66a17e8db27abfd91335fc19" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Gear Up", + "key": "ETuda6ZGQkU", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-07-22T15:00:11.000Z", + "id": "66a192eab0908f4b03c812ac" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "This Friday", + "key": "UffWG-yFGgw", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-07-21T16:00:32.000Z", + "id": "669d9b6c428a1d9907779e39" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Deadpool & Wolverine in the Studio", + "key": "8BjXzXq3O5A", + "site": "YouTube", + "size": 1080, + "type": "Featurette", + "official": false, + "published_at": "2024-07-19T19:24:38.000Z", + "id": "669d9b872bc6164f536c8ad7" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Final Trailer", + "key": "Idh8n5XuYIA", + "site": "YouTube", + "size": 1080, + "type": "Trailer", + "official": true, + "published_at": "2024-07-19T14:00:23.000Z", + "id": "669a8ad15777920d534e6606" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Everyone", + "key": "C2QCuBX_byg", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-07-16T15:00:11.000Z", + "id": "6696909663380e4993be74c6" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Can’t Unsee It", + "key": "eN2rNIgy9JQ", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-07-15T11:00:01.000Z", + "id": "66953dd30c4c61e4f0168724" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Pumped", + "key": "eS-MpmL6fPc", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-07-12T16:00:44.000Z", + "id": "669199858b0fa7f0d7f19d42" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Deadpool & Wolverine & The Bachelorette", + "key": "S2sBNY9Wg8o", + "site": "YouTube", + "size": 1080, + "type": "Featurette", + "official": true, + "published_at": "2024-07-09T16:54:39.000Z", + "id": "6691f42d96716b2eee6e37ec" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Purpose", + "key": "Up6hJCihbL8", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-07-09T16:00:32.000Z", + "id": "668d6b74c0ea0ce79071bb41" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "World Tour", + "key": "LYuc1wDC318", + "site": "YouTube", + "size": 1080, + "type": "Featurette", + "official": true, + "published_at": "2024-07-06T22:34:28.000Z", + "id": "668b842b9f3f305a639a0670" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Shanghai Fan Event", + "key": "qoAYNhOWol8", + "site": "YouTube", + "size": 1080, + "type": "Featurette", + "official": true, + "published_at": "2024-07-03T02:38:06.000Z", + "id": "6684da33f6813e41938f1e20" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "LFG", + "key": "pABY-rpsfH4", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-07-01T16:00:49.000Z", + "id": "6684da156e16130ed075ee02" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Nice", + "key": "r3LisZEIK34", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-06-28T13:12:08.000Z", + "id": "667ee0b24729acf6c9007431" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Best Friends Day", + "key": "pn5fdK61o9c", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-06-08T16:00:40.000Z", + "id": "66669a7829661fd491dda78a" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "The Deadpool And Wolverine popcorn bucket has arrived", + "key": "ewkLcCQ1O-0", + "site": "YouTube", + "size": 1080, + "type": "Featurette", + "official": true, + "published_at": "2024-05-30T17:27:52.000Z", + "id": "665d8f00e6b575c8da81b176" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Tickets On Sale", + "key": "Esc_qtkULBE", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-05-21T15:00:18.000Z", + "id": "664dba2682a2ffadf09ac25c" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Heineken Silver - World-Class Light Beer for World-Class Bubs", + "key": "NebqFm0PoVw", + "site": "YouTube", + "size": 1080, + "type": "Featurette", + "official": false, + "published_at": "2024-05-20T20:26:36.000Z", + "id": "665bac89d42cd806d247e63e" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Get Tickets Now", + "key": "YLswizPsdYk", + "site": "YouTube", + "size": 1080, + "type": "Featurette", + "official": true, + "published_at": "2024-05-20T15:00:05.000Z", + "id": "664dba3f0bbde63500fd129c" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Tickets On Sale Now", + "key": "2I5aSPn_eYQ", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-05-20T13:00:00.000Z", + "id": "664dba4b28cc6d3f18f275c1" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Disclaimers", + "key": "pCdR7mgWT4s", + "site": "YouTube", + "size": 1080, + "type": "Featurette", + "official": true, + "published_at": "2024-05-19T16:50:11.000Z", + "id": "664db928e9b4172c3413f88f" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Official Trailer", + "key": "73_1biulkYk", + "site": "YouTube", + "size": 1080, + "type": "Trailer", + "official": true, + "published_at": "2024-04-22T13:00:09.000Z", + "id": "662668b62dda890149e08b9b" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Trailer Tomorrow", + "key": "umxRwIKOPA4", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-04-21T18:55:37.000Z", + "id": "6625761707faa2018799f02a" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Official Teaser", + "key": "uJMCNJP2ipI", + "site": "YouTube", + "size": 1080, + "type": "Teaser", + "official": true, + "published_at": "2024-02-11T23:36:49.000Z", + "id": "65c95bb74350110162e86f46" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Deadpool Update, Part Hugh", + "key": "Szj1iqYanFM", + "site": "YouTube", + "size": 1080, + "type": "Featurette", + "official": true, + "published_at": "2022-09-28T12:41:05.000Z", + "id": "633552dcbbd0b0007a5756f3" + }, + { + "iso_639_1": "en", + "iso_3166_1": "US", + "name": "Deadpool Update", + "key": "Yd47Z8HYf0Y", + "site": "YouTube", + "size": 1080, + "type": "Featurette", + "official": true, + "published_at": "2022-09-27T21:00:53.000Z", + "id": "633546de528b2e007c0a4021" + } +] const Edit = >(props: IEditProps) => { + const formRef = useRef() const { styles } = useStyle() const [ activeKey, setActiveKey ] = useState('primary_facts') const [ spinning, setSpinning ] = useState(false) @@ -1953,7 +3339,7 @@ const Edit = >(props: IEditProps) => { valueType: 'group', ignoreFormItem: true, fieldProps: { - style:{ padding: 30 }, + style: { padding: 30 }, }, columns: [ { @@ -2216,17 +3602,449 @@ const Edit = >(props: IEditProps) => { } } ], - external_ids: [], - genres: [], - keywords: [], - production_information: [], - release_information: [], - taglines: [], - videos: [], + external_ids: [ + { + valueType: 'group', + ignoreFormItem: true, + fieldProps: { + style: { padding: 30 }, + }, + columns: [ + { + valueType: 'group', + title: t(`${i18nPrefix}.column.social`, '社交'), + columns: [ + { + dataIndex: 'facebook_id', + title: t(`${i18nPrefix}.column.facebook_id`, 'Facebook ID'), + colProps: { span: 8 }, + }, + { + dataIndex: 'instagram_id', + title: t(`${i18nPrefix}.column.instagram_id`, 'Instagram ID'), + colProps: { span: 8 }, + }, + { + dataIndex: 'twitter_id', + title: t(`${i18nPrefix}.column.twitter_id`, 'Twitter ID'), + colProps: { span: 8 }, + }, + ], + }, + //其它数据库:imdb_id,wikidata_id + { + valueType: 'group', + title: t(`${i18nPrefix}.column.other`, '其它数据库'), + columns: [ + { + dataIndex: 'imdb_id', + title: t(`${i18nPrefix}.column.imdb_id`, 'IMDB ID'), + colProps: { span: 8 }, + }, + { + dataIndex: 'wikidata_id', + title: t(`${i18nPrefix}.column.wikidata_id`, 'Wikidata ID'), + colProps: { span: 8 }, + }, + ] + }, + //存档数据库:Freebase ID,Freebase MID,TVRage ID + { + valueType: 'group', + title: t(`${i18nPrefix}.column.archive`, '存档数据库'), + columns: [ + { + dataIndex: 'freebase_id', + title: t(`${i18nPrefix}.column.freebase_id`, 'Freebase ID'), + colProps: { span: 8 }, + }, + { + dataIndex: 'freebase_mid', + title: t(`${i18nPrefix}.column.freebase_mid`, 'Freebase MID'), + colProps: { span: 8 }, + }, + { + dataIndex: 'tvrage_id', + title: t(`${i18nPrefix}.column.tvrage_id`, 'TVRage ID'), + colProps: { span: 8 }, + }, + ] + }, + ] + } + ], + genres: [ + { + valueType: 'group', + ignoreFormItem: true, + fieldProps: { + style: { padding: '0 24px' }, + }, + columns: [ + { + dataIndex: 'genres', + renderFormItem: (schema, config, form) => { + + return + + } + style={{ width: '100%' }} + columns={[ + { + dataIndex: 'name', + title: t(`${i18nPrefix}.column.name`, '类型'), + }, + { + dataIndex: 'action', + valueType: 'option', + render: (text, record, index, action) => { + return ( + {t('common.edit', '编辑')} + {t('common.delete', '删除')} + ) + } + } + ]} + scroll={{ + y: `calc(100vh - var(--heaer-height, 0) - var(--footer-height, 0) - 130px)`, + }} + /> + } + } + ] + } + ], + keywords: [ + { + ignoreFormItem: true, + renderFormItem: (schema, config, form) => { + return + + } + style={{ width: '100%' }} + columns={[ + { + dataIndex: 'name', + title: t(`${i18nPrefix}.column.name`, '关键词'), + }, + { + dataIndex: 'action', + valueType: 'option', + render: (text, record, index, action) => { + return ( + {t('common.edit', '编辑')} + {t('common.delete', '删除')} + ) + } + } + ]} + scroll={{ + y: `calc(100vh - var(--heaer-height, 0) - var(--footer-height, 0) - 130px)`, + }} + /> + } + } + ], + production_information: [ + { + valueType: 'group', + ignoreFormItem: true, + fieldProps: { + style: { padding: 30, paddingBottom: 0 }, + }, + columns: [ + { + dataIndex: 'production_countries', + title: t(`${i18nPrefix}.column.production_countries`, '制片国家或地区'), + valueType: 'select', + fieldProps: { + options: [ + { + 'key': 'US', + 'label': 'United States of America' + } + ] + } + }, + { + dataIndex: 'production_companies', + title: t(`${i18nPrefix}.column.production_companies`, '制片公司'), + //render proTable + renderFormItem: (schema, config, form) => { + + return + + } + style={{ width: '100%' }} + columns={[ + { + dataIndex: 'logo_path', + width: 120, + title: t(`${i18nPrefix}.column.logo_path`, 'Logo'), + render: (text, record) => { + return record.logo_path && + } + }, + { + dataIndex: 'name', + title: t(`${i18nPrefix}.column.name`, '出品公司'), + }, + { + dataIndex: 'action', + valueType: 'option', + render: (text, record, index, action) => { + return ( + {t('common.edit', '编辑')} + {t('common.delete', '删除')} + ) + } + } + ]} + scroll={{ + y: `calc(100vh - var(--heaer-height, 0) - var(--footer-height, 0) - 130px - 150px)`, + }} + /> + } + }, + ] + } + ], + release_information: [ + { + ignoreFormItem: true, + renderFormItem: (schema, config, form) => { + return + + } + style={{ width: '100%' }} + expandable={{ + childrenColumnName: 'release_dates', + defaultExpandAllRows: true, + }} + columnEmptyText={''} + rowKey={'iso_3166_1'} + columns={[ + { + dataIndex: 'iso_3166_1', + title: t(`${i18nPrefix}.column.iso_3166_1`, '国家或地区'), + }, + { + dataIndex: 'iso_639_1', + title: t(`${i18nPrefix}.column.iso_639_1`, '语言'), + }, + { + dataIndex: 'release_date', + title: t(`${i18nPrefix}.column.release_date`, '上映日期'), + render: (text, record: any) => { + return record.release_date?.split('T')?.[0] + } + }, + { + dataIndex: 'certification', + title: t(`${i18nPrefix}.column.certification`, '分级'), + }, + { + dataIndex: 'descriptors', + title: t(`${i18nPrefix}.column.descriptors`, '描述符'), + }, + { + dataIndex: 'type', + title: t(`${i18nPrefix}.column.type`, '类型'), + valueType: 'select', + fieldProps:{ + options:[ + { label: 'Premiere', value: 1 }, + { label: 'Theatrical (limited)', value: 2 }, + { label: 'Theatrical', value: 3 }, + { label: 'Digital', value: 4 }, + { label: 'Physical', value: 5 }, + { label: 'TV', value: 6 }, + ] + } + }, + { + dataIndex: 'note', + title: t(`${i18nPrefix}.column.note`, '备注'), + }, + + { + dataIndex: 'action', + valueType: 'option', + render: (text, record, index, action) => { + return ( + {t('common.edit', '编辑')} + {t('common.delete', '删除')} + ) + } + } + ]} + scroll={{ + y: `calc(100vh - var(--heaer-height, 0) - var(--footer-height, 0) - 130px)`, + }} + /> + } + } + ], + taglines: [ + { + ignoreFormItem: true, + renderFormItem: (schema, config, form) => { + return + + } + style={{ width: '100%' }} + columns={[ + { + dataIndex: 'text', + title: t(`${i18nPrefix}.column.text`, '标语'), + }, + { + dataIndex: 'primary', + title: t(`${i18nPrefix}.column.primary`, '主标语'), + valueType: 'select', + fieldProps: { + options: [ + { label: '是', value: true }, + { label: '否', value: false }, + ] + }, + render: (text, record) => { + return + } + }, + { + dataIndex: 'action', + valueType: 'option', + render: (text, record, index, action) => { + return ( + {t('common.edit', '编辑')} + {t('common.delete', '删除')} + ) + } + } + ]} + scroll={{ + y: `calc(100vh - var(--heaer-height, 0) - var(--footer-height, 0) - 130px)`, + }} + /> + } + } + ], + videos: [ + { + ignoreFormItem: true, + renderFormItem: (schema, config, form) => { + return + + } + style={{ width: '100%' }} + columns={[ + { + dataIndex: 'name', + title: t(`${i18nPrefix}.column.name`, '名称'), + }, + { + dataIndex: 'type', + title: t(`${i18nPrefix}.column.type`, '类型'), + }, + { + dataIndex: 'size', + title: t(`${i18nPrefix}.column.size`, '大小'), + }, + { + dataIndex: 'site', + title: t(`${i18nPrefix}.column.site`, '站点'), + }, + { + dataIndex: 'published_at', + title: t(`${i18nPrefix}.column.published_at`, '发布时间'), + render: (text, record) => { + return dayjs(record.published_at).format('YYYY-MM-DD HH:mm:ss') + } + }, + { + dataIndex: 'official', + title: t(`${i18nPrefix}.column.official`, '官方'), + valueType: 'select', + fieldProps: { + options: [ + { label: '是', value: true }, + { label: '否', value: false }, + ] + }, + render: (text, record) => { + return + } + }, + { + dataIndex: 'action', + valueType: 'option', + render: (text, record, index, action) => { + return ( + {t('common.edit', '编辑')} + {t('common.delete', '删除')} + ) + } + } + ]} + scroll={{ + y: `calc(100vh - var(--heaer-height, 0) - var(--footer-height, 0) - 130px)`, + }} + /> + } + } + ], } as Record }, []) + useEffect(() => { + if (formRef.current) { + + + formRef.current.setFieldsValue({ + ...detailData, + ...external_ids, + }) + } + }, [ formRef.current ]) + const renderFormColumns = () => { return columns[activeKey] || [] } @@ -2244,6 +4062,7 @@ const Edit = >(props: IEditProps) => {