dark
3 months ago
31 changed files with 6206 additions and 5027 deletions
-
2.env.proxy.local
-
5src/global.d.ts
-
4src/layout/ListPageLayout.tsx
-
8src/layout/style.ts
-
0src/pages/db/vod/components/Edit.tsx
-
0src/pages/db/vod/components/context.ts
-
0src/pages/db/vod/components/form/PrimaryFacts.tsx
-
0src/pages/db/vod/components/style.ts
-
288src/pages/db/vod/index.tsx
-
2src/pages/db/vod/style.ts
-
86src/pages/x-form/hooks/useApi.tsx
-
301src/pages/x-form/index.tsx
-
14src/pages/x-form/style.ts
-
32src/request-base-url-interceptors.ts
-
254src/request.ts
-
4src/service/base.ts
-
13src/service/db/vod.ts
-
10src/service/x-form/model.ts
-
90src/store/db/vod.ts
-
124src/store/x-form/model.ts
-
42src/types/db/vod.d.ts
-
61src/types/x-form/model.d.ts
-
14src/utils/index.ts
-
82vite.config.ts
-
777yarn.lock
@ -1 +1 @@ |
|||
API_URL=http://47.113.117.106:8000 |
|||
API_URL=http://47.113.117.106:10000 |
@ -1,7 +1,7 @@ |
|||
import { createStyles } from '@/theme' |
|||
|
|||
export const useStyle = createStyles(({ token, css, cx, prefixCls }, props: any) => { |
|||
const prefix = `${prefixCls}-${token?.proPrefix}-movie-list-page` |
|||
const prefix = `${prefixCls}-${token?.proPrefix}-vod-list-page` |
|||
|
|||
const container = css`
|
|||
.ant-table-cell { |
@ -0,0 +1,86 @@ |
|||
import { useNavigate } from '@tanstack/react-router' |
|||
import { useAtom } from 'jotai/index' |
|||
import { apiAtom } from '@/store/x-form/model.ts' |
|||
import { useEffect, useRef, useState } from 'react' |
|||
import { Input, message, Modal } from 'antd' |
|||
import { Route } from '@/pages/x-form' |
|||
|
|||
export const useApi = () => { |
|||
|
|||
const nav = useNavigate() |
|||
const [ api, setApi ] = useAtom(apiAtom) |
|||
const { api: apiParam } = Route.useSearch() |
|||
const [ innerApi, setInnerApi ] = useState('') |
|||
const [ open, setOpen ] = useState(false) |
|||
const apiRef = useRef<string>() |
|||
|
|||
useEffect(() => { |
|||
|
|||
if (!apiParam && api) { |
|||
apiRef.current = api |
|||
nav({ |
|||
to: '/x-form', |
|||
search: { |
|||
api |
|||
} |
|||
}) |
|||
return |
|||
} |
|||
|
|||
if (apiParam && !api) { |
|||
apiRef.current = apiParam |
|||
setApi(apiParam) |
|||
return |
|||
} |
|||
|
|||
//延时弹出
|
|||
setTimeout(() => { |
|||
if (!apiRef.current) { |
|||
setOpen(true) |
|||
} |
|||
}, 2000) |
|||
|
|||
}, [ api, apiParam ]) |
|||
|
|||
|
|||
const holderElement = ( |
|||
<> |
|||
<Modal |
|||
title={'请指定 api 参数'} |
|||
closable={false} |
|||
open={open} |
|||
maskClosable={false} |
|||
afterOpenChange={setOpen} |
|||
onCancel={() => { |
|||
setOpen(false) |
|||
}} |
|||
onOk={() => { |
|||
if (!innerApi) { |
|||
message.destroy() |
|||
message.error('请填写 api 参数') |
|||
return |
|||
} |
|||
setOpen(false) |
|||
setApi(innerApi) |
|||
nav({ |
|||
to: '/x-form', |
|||
search: { |
|||
api: innerApi |
|||
} |
|||
}) |
|||
}} |
|||
> |
|||
<Input value={innerApi} onChange={e => { |
|||
setInnerApi(e.target.value) |
|||
}}/> |
|||
</Modal> |
|||
</> |
|||
) |
|||
return { |
|||
holderElement, |
|||
updateApi: setOpen, |
|||
setApi, |
|||
api, |
|||
} as const |
|||
|
|||
} |
@ -0,0 +1,301 @@ |
|||
import { createFileRoute } from '@tanstack/react-router' |
|||
import ListPageLayout from '@/layout/ListPageLayout.tsx' |
|||
import { useApi } from './hooks/useApi.tsx' |
|||
import { Badge, Button, Divider, Form, Popconfirm, Space, Tabs, Tag, Tooltip } from 'antd' |
|||
import { EditOutlined, FilterOutlined } from '@ant-design/icons' |
|||
import { BetaSchemaForm, ProColumns, ProFormColumnsType, ProTable } from '@ant-design/pro-components' |
|||
import { useEffect, useMemo, useState } from 'react' |
|||
import { useAtomValue } from 'jotai' |
|||
import { |
|||
deleteModelAtom, modelAtom, |
|||
modelCURDAtom, |
|||
modelsAtom, |
|||
modelSearchAtom, |
|||
saveOrUpdateModelAtom |
|||
} from '@/store/x-form/model.ts' |
|||
import { useAtom } from 'jotai/index' |
|||
import { getValueCount, unSetColumnRules } from '@/utils' |
|||
import { useStyle } from './style.ts' |
|||
import Action from '@/components/action/Action.tsx' |
|||
|
|||
const XForm = () => { |
|||
|
|||
const { styles, cx } = useStyle() |
|||
const { holderElement, updateApi, api } = useApi() |
|||
|
|||
const [ form ] = Form.useForm() |
|||
const [ filterForm ] = Form.useForm() |
|||
const [ model, setModel ] = useAtom(modelAtom) |
|||
const { mutate: saveOrUpdate, isPending: isSubmitting, isSuccess } = useAtomValue(saveOrUpdateModelAtom) |
|||
const [ search, setSearch ] = useAtom(modelSearchAtom) |
|||
const { data, isFetching, isLoading, refetch } = useAtomValue(modelsAtom) |
|||
const { mutate: deleteModel, isPending: isDeleting } = useAtomValue(deleteModelAtom) |
|||
const { data: curdModal, isLoading: curdLoading } = useAtomValue(modelCURDAtom) |
|||
const [ open, setOpen ] = useState(false) |
|||
const [ openFilter, setFilterOpen ] = useState(false) |
|||
const [ searchKey, setSearchKey ] = useState(search?.key) |
|||
|
|||
const columns = useMemo(() => { |
|||
return (curdModal?.column?.map((item) => { |
|||
return { |
|||
title: item.label, |
|||
dataIndex: item.prop, |
|||
key: item.prop, |
|||
valueType: item.type, |
|||
hideInSearch: !item.search, |
|||
hideInTable: item.hide, |
|||
|
|||
} as ProColumns<any> |
|||
}) || []).concat([ |
|||
{ |
|||
title: 'ID', |
|||
dataIndex: 'id', |
|||
hideInTable: true, |
|||
hideInSearch: true, |
|||
formItemProps: { hidden: true } |
|||
}, |
|||
{ |
|||
title: '操作', |
|||
key: 'option', |
|||
valueType: 'option', |
|||
fixed: 'right', |
|||
render: (_, record) => [ |
|||
<Action key="edit" |
|||
as={'a'} |
|||
onClick={() => { |
|||
form.setFieldsValue(record) |
|||
setOpen(true) |
|||
}}>{'编辑'}</Action>, |
|||
<Popconfirm |
|||
key={'del_confirm'} |
|||
disabled={isDeleting} |
|||
onConfirm={() => { |
|||
deleteModel([ record.id ]) |
|||
}} |
|||
title={'确定要删除吗?'}> |
|||
<a key="del"> |
|||
删除 |
|||
</a> |
|||
</Popconfirm> |
|||
] |
|||
} |
|||
]) |
|||
}, [ curdModal?.column, deleteModel, form, isDeleting, setOpen ]) |
|||
|
|||
useEffect(() => { |
|||
|
|||
setSearchKey(search?.key) |
|||
filterForm.setFieldsValue(search) |
|||
|
|||
}, [ search ]) |
|||
|
|||
useEffect(() => { |
|||
if (isSuccess) { |
|||
setOpen(false) |
|||
} |
|||
}, [ isSuccess ]) |
|||
|
|||
return ( |
|||
<> |
|||
{holderElement} |
|||
<ListPageLayout |
|||
className={styles.container} |
|||
title={<> |
|||
<Tag color={'green'} style={{ marginBlockEnd: 0 }}>API</Tag> |
|||
<span>{api} <EditOutlined |
|||
style={{ color: '#666', cursor: 'pointer', fontSize: 16 }} |
|||
onClick={() => { |
|||
updateApi(true) |
|||
}}/></span> |
|||
</>}> |
|||
|
|||
<ProTable |
|||
rowKey="id" |
|||
headerTitle={api} |
|||
toolbar={{ |
|||
search: { |
|||
loading: isFetching && !!search?.key, |
|||
onSearch: (value: string) => { |
|||
setSearch(prev => ({ |
|||
...prev, |
|||
title: value |
|||
})) |
|||
}, |
|||
allowClear: true, |
|||
onChange: (e) => { |
|||
setSearchKey(e.target?.value) |
|||
}, |
|||
value: searchKey, |
|||
placeholder: '输入关键字搜索', |
|||
}, |
|||
actions: [ |
|||
<Tooltip key={'filter'} title={'高级查询'}> |
|||
<Badge count={getValueCount(search)}> |
|||
<Button |
|||
onClick={() => { |
|||
setFilterOpen(true) |
|||
}} |
|||
icon={<FilterOutlined/>} shape={'circle'} size={'small'}/> |
|||
</Badge> |
|||
</Tooltip>, |
|||
<Divider type={'vertical'} key={'divider'}/>, |
|||
<Button key={'add'} |
|||
onClick={() => { |
|||
form.resetFields() |
|||
form.setFieldsValue({ |
|||
id: 0, |
|||
}) |
|||
setOpen(true) |
|||
}} |
|||
type={'primary'}>{'添加'}</Button> |
|||
] |
|||
}} |
|||
scroll={{ |
|||
// x: 3500,
|
|||
y: 'calc(100vh - 290px)' |
|||
}} |
|||
search={false} |
|||
onRow={(record) => { |
|||
return { |
|||
className: cx({ |
|||
// 'ant-table-row-selected': currentMovie?.id === record.id
|
|||
}), |
|||
onClick: () => { |
|||
setModel(record) |
|||
} |
|||
} |
|||
}} |
|||
dateFormatter="string" |
|||
loading={isLoading || isFetching || curdLoading} |
|||
dataSource={data?.rows ?? []} |
|||
columns={columns} |
|||
options={{ |
|||
reload: () => { |
|||
refetch() |
|||
}, |
|||
}} |
|||
pagination={{ |
|||
total: data?.total, |
|||
pageSize: search.pageSize, |
|||
current: search.page, |
|||
onShowSizeChange: (current: number, size: number) => { |
|||
setSearch({ |
|||
...search, |
|||
pageSize: size, |
|||
page: current |
|||
}) |
|||
}, |
|||
onChange: (current, pageSize) => { |
|||
setSearch(prev => { |
|||
return { |
|||
...prev, |
|||
page: current, |
|||
pageSize: pageSize, |
|||
} |
|||
}) |
|||
}, |
|||
}} |
|||
/> |
|||
|
|||
<BetaSchemaForm |
|||
grid={true} |
|||
shouldUpdate={false} |
|||
width={1000} |
|||
form={form} |
|||
layout={'vertical'} |
|||
scrollToFirstError={true} |
|||
title={form.getFieldValue('id') !== 0 ? '编辑' : '添加'} |
|||
layoutType={'DrawerForm'} |
|||
open={open} |
|||
drawerProps={{ |
|||
maskClosable: false, |
|||
}} |
|||
onOpenChange={(open) => { |
|||
setOpen(open) |
|||
}} |
|||
loading={isSubmitting} |
|||
|
|||
onFinish={async (values) => { |
|||
saveOrUpdate(values) |
|||
}} |
|||
columns={columns as ProFormColumnsType[]}/> |
|||
<BetaSchemaForm |
|||
title={'高级查询'} |
|||
grid={true} |
|||
shouldUpdate={false} |
|||
width={500} |
|||
form={filterForm} |
|||
open={openFilter} |
|||
onOpenChange={open => { |
|||
setFilterOpen(open) |
|||
}} |
|||
layout={'vertical'} |
|||
scrollToFirstError={true} |
|||
layoutType={'DrawerForm'} |
|||
drawerProps={{ |
|||
maskClosable: false, |
|||
mask: false, |
|||
}} |
|||
submitter={{ |
|||
searchConfig: { |
|||
resetText: '清空', |
|||
submitText: '查询', |
|||
}, |
|||
onReset: () => { |
|||
filterForm.resetFields() |
|||
}, |
|||
render: (props,) => { |
|||
return ( |
|||
<div style={{ textAlign: 'right' }}> |
|||
<Space> |
|||
<Button onClick={() => { |
|||
props.reset() |
|||
|
|||
}}>{props.searchConfig?.resetText}</Button> |
|||
<Button type="primary" |
|||
onClick={() => { |
|||
props.submit() |
|||
}} |
|||
>{props.searchConfig?.submitText}</Button> |
|||
</Space> |
|||
</div> |
|||
) |
|||
}, |
|||
|
|||
}} |
|||
|
|||
|
|||
onFinish={async (values) => { |
|||
//处理,变成数组
|
|||
Object.keys(values).forEach(key => { |
|||
if (typeof values[key] === 'string' && values[key].includes(',')) { |
|||
values[key] = values[key].split(',') |
|||
} |
|||
}) |
|||
|
|||
setSearch(values) |
|||
|
|||
}} |
|||
columns={unSetColumnRules(columns.filter(item => !item.hideInSearch) as ProFormColumnsType[])}/> |
|||
|
|||
</ListPageLayout> |
|||
</> |
|||
) |
|||
} |
|||
|
|||
type XFormRouteSearch = { |
|||
api: string |
|||
} |
|||
|
|||
// @ts-ignore fix route id
|
|||
export const Route = createFileRoute('x-form')({ |
|||
validateSearch: (search: Record<string, unknown>): XFormRouteSearch => { |
|||
// validate and parse the search params into a typed state
|
|||
// console.log(search.id)
|
|||
return { |
|||
api: (search.api ?? '') as string |
|||
} as XFormRouteSearch |
|||
}, |
|||
}) |
|||
|
|||
export default XForm |
@ -0,0 +1,14 @@ |
|||
|
|||
import { createStyles } from '@/theme' |
|||
|
|||
export const useStyle = createStyles(({ token, css, cx, prefixCls }, props: any) => { |
|||
const prefix = `${prefixCls}-${token?.proPrefix}-x-form-page` |
|||
|
|||
const container = css`
|
|||
|
|||
`
|
|||
|
|||
return { |
|||
container: cx(prefix, props?.className, container), |
|||
} |
|||
}) |
@ -0,0 +1,32 @@ |
|||
import { AxiosInstance } from 'axios' |
|||
|
|||
|
|||
const baseURLMap = { |
|||
package: 'http://154.88.7.8:45321/api/v1', |
|||
movie: 'http://47.113.117.106:10000/api/v1', |
|||
default: 'http://127.0.0.1:8686/api/v1', |
|||
} |
|||
|
|||
/** |
|||
* 拦截url,适应不同的baseURL |
|||
* @param axiosInstance |
|||
*/ |
|||
export const requestBaseUrlInterceptors = (axiosInstance: AxiosInstance) => { |
|||
|
|||
//拦截url,适应不同的baseURL
|
|||
axiosInstance.interceptors.request.use((config) => { |
|||
const { url } = config |
|||
//取url的第1个/后的字符串
|
|||
const key = url?.split('/')[1] |
|||
const baseURL = baseURLMap[key!] |
|||
if (baseURL) { |
|||
config.baseURL = baseURL |
|||
} else { |
|||
config.baseURL = baseURLMap['default'] |
|||
} |
|||
return config |
|||
}, (error) => { |
|||
// console.log('error', error)
|
|||
return Promise.reject(error) |
|||
}) |
|||
} |
@ -0,0 +1,13 @@ |
|||
import { createCURD } from '@/service/base.ts' |
|||
import { DB } from '@/types/db/vod' |
|||
import { IPageResult } from '@/global' |
|||
import request from '@/request.ts' |
|||
|
|||
const vod = { |
|||
...createCURD<any, DB.IVod>('/movie/vod'), |
|||
list: (params: any) => { |
|||
return request.post<IPageResult<DB.IVod>>(`/movie/vod/get_vod_list`, { ...params }) |
|||
} |
|||
} |
|||
|
|||
export default vod |
@ -0,0 +1,10 @@ |
|||
import { createCURD } from '@/service/base.ts' |
|||
import { XForm } from '@/types/x-form/model' |
|||
|
|||
const model = (api: string) => { |
|||
return { |
|||
...createCURD<any, XForm.IModel>(api), |
|||
} |
|||
} |
|||
|
|||
export { model } |
@ -0,0 +1,90 @@ |
|||
import { atom } from 'jotai' |
|||
import { IApiResult, IPage } from '@/global' |
|||
import { atomWithMutation, atomWithQuery, queryClientAtom } from 'jotai-tanstack-query' |
|||
import { message } from 'antd' |
|||
import { t } from 'i18next' |
|||
import { DB } from '@/types/db/vod' |
|||
import dBServ from '@/service/db/vod' |
|||
|
|||
type SearchParams = IPage & { |
|||
key?: string |
|||
|
|||
[key: string]: any |
|||
} |
|||
|
|||
export const vodIdAtom = atom(0) |
|||
|
|||
export const vodIdsAtom = atom<number[]>([]) |
|||
|
|||
export const vodAtom = atom<DB.IVod>(undefined as unknown as DB.IVod ) |
|||
|
|||
export const vodSearchAtom = atom<SearchParams>({ |
|||
key: '', |
|||
pageSize: 10, |
|||
page: 1, |
|||
} as SearchParams) |
|||
|
|||
export const vodPageAtom = atom<IPage>({ |
|||
pageSize: 10, |
|||
page: 1, |
|||
}) |
|||
|
|||
export const vodsAtom = atomWithQuery((get) => { |
|||
return { |
|||
queryKey: [ 'vods', get(vodSearchAtom) ], |
|||
queryFn: async ({ queryKey: [ , params ] }) => { |
|||
return await dBServ.list(params as SearchParams) |
|||
}, |
|||
select: res => { |
|||
const data = res.data |
|||
data.rows = data.rows?.map(row => { |
|||
return { |
|||
...row, |
|||
//status: convertToBool(row.status)
|
|||
} |
|||
}) |
|||
return data |
|||
} |
|||
} |
|||
}) |
|||
|
|||
//saveOrUpdateAtom
|
|||
export const saveOrUpdateVodAtom = atomWithMutation<IApiResult, DB.IVod>((get) => { |
|||
|
|||
return { |
|||
mutationKey: [ 'updateVod' ], |
|||
mutationFn: async (data) => { |
|||
//data.status = data.status ? '1' : '0'
|
|||
if (data.id === 0) { |
|||
return await dBServ.add(data) |
|||
} |
|||
return await dBServ.update(data) |
|||
}, |
|||
onSuccess: (res) => { |
|||
const isAdd = !!res.data?.id |
|||
message.success(t(isAdd ? 'message.saveSuccess' : 'message.editSuccess', '保存成功')) |
|||
|
|||
//更新列表
|
|||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|||
// @ts-ignore fix
|
|||
get(queryClientAtom).invalidateQueries({ queryKey: [ 'vods', get(vodSearchAtom) ] }) |
|||
|
|||
return res |
|||
} |
|||
} |
|||
}) |
|||
|
|||
export const deleteVodAtom = atomWithMutation((get) => { |
|||
return { |
|||
mutationKey: [ 'deleteVod' ], |
|||
mutationFn: async (ids: number[]) => { |
|||
return await dBServ.batchDelete(ids ?? get(vodIdsAtom)) |
|||
}, |
|||
onSuccess: (res) => { |
|||
message.success('message.deleteSuccess') |
|||
//更新列表
|
|||
get(queryClientAtom).invalidateQueries({ queryKey: [ 'vods', get(vodSearchAtom) ] }) |
|||
return res |
|||
} |
|||
} |
|||
}) |
@ -0,0 +1,124 @@ |
|||
import { atom } from 'jotai' |
|||
import { IApiResult, IError, IPage } from '@/global' |
|||
import { atomWithMutation, atomWithQuery, queryClientAtom } from 'jotai-tanstack-query' |
|||
import { message } from 'antd' |
|||
import { t } from 'i18next' |
|||
import { XForm } from '@/types/x-form/model' |
|||
import * as modelServ from '@/service/x-form/model' |
|||
import { atomWithStorage } from 'jotai/utils' |
|||
|
|||
type SearchParams = IPage & { |
|||
key?: string |
|||
api: string |
|||
} |
|||
|
|||
|
|||
export const apiAtom = atomWithStorage('api', '') |
|||
|
|||
export const modelIdAtom = atom(0) |
|||
|
|||
export const modelIdsAtom = atom<number[]>([]) |
|||
|
|||
export const modelAtom = atom<XForm.IModel>(undefined as unknown as XForm.IModel) |
|||
|
|||
export const modelSearchAtom = atom<SearchParams>({ |
|||
key: '', |
|||
pageSize: 10, |
|||
page: 1, |
|||
} as SearchParams) |
|||
|
|||
export const modelPageAtom = atom<IPage>({ |
|||
pageSize: 10, |
|||
page: 1, |
|||
}) |
|||
|
|||
export const modelCURDAtom = atomWithQuery((get) => { |
|||
const api = get(apiAtom) |
|||
return { |
|||
enabled: !!api, |
|||
queryKey: [ 'modelCURD', get(modelSearchAtom) ], |
|||
queryFn: async ({ queryKey: [ , params ] }) => { |
|||
// if (!api) {
|
|||
// return Promise.reject({
|
|||
// code: 400,
|
|||
// message: 'api 不能为空'
|
|||
// })
|
|||
// }
|
|||
return await modelServ.model(api).curd(params as SearchParams) |
|||
}, |
|||
select: res => { |
|||
return res.data.data |
|||
} |
|||
} |
|||
}) |
|||
|
|||
export const modelsAtom = atomWithQuery((get) => { |
|||
const api = get(apiAtom) |
|||
const curd = get(modelCURDAtom) |
|||
|
|||
return { |
|||
enabled: curd.isSuccess && !!api, |
|||
queryKey: [ 'models', get(modelSearchAtom) ], |
|||
queryFn: async ({ queryKey: [ , params ] }) => { |
|||
return await modelServ.model(api).list(params as SearchParams) |
|||
}, |
|||
select: res => { |
|||
const data = res.data |
|||
data.rows = data.rows?.map(row => { |
|||
return { |
|||
...row, |
|||
//status: convertToBool(row.status)
|
|||
} |
|||
}) |
|||
return data |
|||
} |
|||
} |
|||
}) |
|||
|
|||
//saveOrUpdateAtom
|
|||
export const saveOrUpdateModelAtom = atomWithMutation<IApiResult, XForm.IModel>((get) => { |
|||
|
|||
return { |
|||
mutationKey: [ 'updateModel' ], |
|||
mutationFn: async (data) => { |
|||
const api = get(apiAtom) |
|||
if (!api) { |
|||
return Promise.reject('api 不能为空') |
|||
} |
|||
if (data.id === 0) { |
|||
return await modelServ.model(api).add(data) |
|||
} |
|||
return await modelServ.model(api).update(data) |
|||
}, |
|||
onSuccess: (res) => { |
|||
const isAdd = !!res.data?.id |
|||
message.success(t(isAdd ? 'message.saveSuccess' : 'message.editSuccess', '保存成功')) |
|||
|
|||
//更新列表
|
|||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|||
// @ts-ignore fix
|
|||
get(queryClientAtom).invalidateQueries({ queryKey: [ 'models', get(modelSearchAtom) ] }) |
|||
|
|||
return res |
|||
} |
|||
} |
|||
}) |
|||
|
|||
export const deleteModelAtom = atomWithMutation((get) => { |
|||
return { |
|||
mutationKey: [ 'deleteModel' ], |
|||
mutationFn: async (ids: number[]) => { |
|||
const api = get(apiAtom) |
|||
if (!api) { |
|||
return Promise.reject('api 不能为空') |
|||
} |
|||
return await modelServ.model(api).batchDelete(ids ?? get(modelIdsAtom)) |
|||
}, |
|||
onSuccess: (res) => { |
|||
message.success('message.deleteSuccess') |
|||
//更新列表
|
|||
get(queryClientAtom).invalidateQueries({ queryKey: [ 'models', get(modelSearchAtom) ] }) |
|||
return res |
|||
} |
|||
} |
|||
}) |
@ -0,0 +1,42 @@ |
|||
export namespace DB { |
|||
export interface IVod { |
|||
id: number; |
|||
title: string; |
|||
title_sub: string; |
|||
letter: string; |
|||
tag: Json; |
|||
status: string; |
|||
category: string; |
|||
pic: string; |
|||
role: Json; |
|||
remarks: string; |
|||
pubdate: string; |
|||
total: number; |
|||
serial: string; |
|||
duration: string; |
|||
area: string; |
|||
lang: string; |
|||
source_url: string; |
|||
year: number; |
|||
douban_score: number; |
|||
douban_id: number; |
|||
imdb_score: number; |
|||
imdb_id: number; |
|||
content: string; |
|||
videostatus: number; |
|||
adultstatus: number; |
|||
typestatus: number; |
|||
homepage: string; |
|||
budgetstatus: string; |
|||
revenuestatus: string; |
|||
facebook_id: string; |
|||
instagram_id: string; |
|||
twitter_id: string; |
|||
wikidata_id: string; |
|||
freebase_id: string; |
|||
tv_rage_id: string; |
|||
ver: string; |
|||
created_at: string; |
|||
updated_at: string; |
|||
} |
|||
} |
@ -0,0 +1,61 @@ |
|||
export namespace XForm { |
|||
export interface IModel { |
|||
id: number; |
|||
created_at: string; |
|||
updated_at: string; |
|||
|
|||
[key: string]: any; |
|||
} |
|||
|
|||
export interface IModelCURD { |
|||
|
|||
height: string; |
|||
calcHeight: number; |
|||
dialogType: string; |
|||
column: IColumn[]; |
|||
searchMenuSpan: number; |
|||
searchIndex: number; |
|||
searchIcon: boolean; |
|||
|
|||
[key: string]: any; |
|||
} |
|||
|
|||
export interface IColumn { |
|||
label: string; |
|||
prop: string; |
|||
search: boolean; |
|||
type: string; |
|||
span: number; |
|||
hide: boolean; |
|||
rules: IRules[]; |
|||
value: any; |
|||
colorFormat: string; |
|||
showAlpha: any; |
|||
dicUrl: string; |
|||
props: IProps; |
|||
button: boolean; |
|||
multiple: boolean; |
|||
checkStrictly: boolean; |
|||
dicMethod: string; |
|||
|
|||
[key: string]: any; |
|||
} |
|||
|
|||
export interface IRules { |
|||
required: boolean; |
|||
message: string; |
|||
trigger: string; |
|||
|
|||
[key: string]: any; |
|||
} |
|||
|
|||
export interface IProps { |
|||
label: string; |
|||
value: string; |
|||
res: string; |
|||
|
|||
[key: string]: any; |
|||
} |
|||
|
|||
} |
|||
|
777
yarn.lock
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue