├── .env ├── .eslintrc.json ├── .gitignore ├── README.md ├── next.config.mjs ├── package-lock.json ├── package.json ├── postcss.config.js ├── public ├── config.js ├── next.svg └── vercel.svg ├── src ├── app │ ├── data │ │ ├── page.tsx │ │ └── useSchemas.ts │ ├── demo │ │ └── page.tsx │ ├── favicon.ico │ ├── globals.css │ ├── layout.tsx │ ├── login │ │ └── page.tsx │ ├── page.tsx │ ├── trade │ │ ├── TagsDialog.tsx │ │ ├── analysis │ │ │ ├── NewsAnalysises.tsx │ │ │ ├── NewsAnalysisesRealTime.tsx │ │ │ └── NewsAnalysisesStats.tsx │ │ ├── page.tsx │ │ ├── stock-detail │ │ │ ├── Events.tsx │ │ │ ├── News.tsx │ │ │ ├── SelectTagTypeDialog.tsx │ │ │ ├── StockChart.tsx │ │ │ ├── StockChartKline.tsx │ │ │ ├── StockChartTs.tsx │ │ │ ├── StockDetail.tsx │ │ │ └── TagUpdateDialog.tsx │ │ ├── stock-list │ │ │ ├── Blink.tsx │ │ │ ├── BuyDialog.tsx │ │ │ ├── SellDialog.tsx │ │ │ ├── SortCell.tsx │ │ │ └── StockList.tsx │ │ └── useData.tsx │ └── workspace │ │ ├── page.tsx │ │ ├── stock │ │ ├── CandlestickChart.tsx │ │ ├── page.tsx │ │ └── useData.tsx │ │ ├── stock_tag │ │ ├── TagInfoDialog.tsx │ │ ├── page.tsx │ │ └── useData.ts │ │ └── useData.ts ├── components │ ├── Dialog │ │ ├── Confirm.tsx │ │ ├── Info.tsx │ │ ├── index.ts │ │ ├── useConfirmDialog.tsx │ │ └── useDialog.tsx │ ├── Loading │ │ └── index.tsx │ ├── ThemeRegistry │ │ ├── EmotionCache.tsx │ │ ├── ThemeRegistry.tsx │ │ └── theme.ts │ └── layout │ │ ├── ConditionalLayout.tsx │ │ └── Header.tsx ├── hooks │ └── useAuth.ts ├── interfaces │ └── index.ts ├── services │ ├── http.ts │ └── index.ts └── utils │ └── index.ts ├── tailwind.config.ts ├── tsconfig.json ├── typings.d.ts └── yarn.lock /.env: -------------------------------------------------------------------------------- 1 | # NEXT_PUBLIC_SERVER = http://10.1.16.108:8090 -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). 2 | 3 | ## Environmental requirement 4 | 5 | - nodejs v18.17.0+ 6 | 7 | ## Getting Started 8 | 9 | First, run the development server: 10 | 11 | ```bash 12 | npm run dev 13 | # or 14 | yarn dev 15 | # or 16 | pnpm dev 17 | # or 18 | bun dev 19 | ``` 20 | 21 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 22 | 23 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. 24 | 25 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. 26 | -------------------------------------------------------------------------------- /next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | output: 'export', 4 | webpack: (config) => { 5 | return config; 6 | }, 7 | }; 8 | 9 | export default nextConfig; 10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zvt-ui", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@emotion/react": "^11.11.4", 13 | "@emotion/styled": "^11.11.0", 14 | "@fontsource/inter": "^5.0.17", 15 | "@mui/icons-material": "^5.15.14", 16 | "@mui/joy": "^5.0.0-beta.32", 17 | "ahooks": "^3.7.11", 18 | "axios": "^1.6.8", 19 | "classnames": "^2.5.1", 20 | "dayjs": "^1.11.11", 21 | "echarts": "^5.5.0", 22 | "echarts-for-react": "^3.0.2", 23 | "framer-motion": "^11.2.10", 24 | "klinecharts": "^9.8.10", 25 | "next": "14.1.4", 26 | "qs": "^6.12.0", 27 | "react": "^18", 28 | "react-dom": "^18", 29 | "react-icons": "^5.0.1", 30 | "tslib": "^2.6.2" 31 | }, 32 | "devDependencies": { 33 | "@types/node": "^20", 34 | "@types/qs": "^6.9.14", 35 | "@types/react": "^18", 36 | "@types/react-dom": "^18", 37 | "autoprefixer": "^10.0.1", 38 | "eslint": "^8", 39 | "eslint-config-next": "14.1.4", 40 | "postcss": "^8", 41 | "tailwindcss": "^3.3.0", 42 | "typescript": "^5" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /public/config.js: -------------------------------------------------------------------------------- 1 | window.SERVER_HOST = ''; 2 | -------------------------------------------------------------------------------- /public/next.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/data/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { Skeleton, Table, Card, Select, Option, Stack, Button } from '@mui/joy'; 4 | import useSchemas from './useSchemas'; 5 | import Loading from '@/components/Loading'; 6 | 7 | export default function Data() { 8 | const { providers, schemas, datas, loading, changeProvider, changeSchema } = 9 | useSchemas(); 10 | 11 | const columns = Object.keys(datas?.[0] || {}); 12 | 13 | return ( 14 |
15 |
16 | 17 | 30 | 43 | 44 |
45 | 46 | 47 | {columns.length === 0 && ( 48 |
暂无数据
49 | )} 50 | 51 | 52 | {columns.map((col) => ( 53 | 54 | ))} 55 | 56 | 57 | {datas.map((row, index) => { 58 | return ( 59 | 60 | {columns.map((col, cIndex) => ( 61 | 62 | ))} 63 | 64 | ); 65 | })} 66 | 67 |
{col}
{row[col]}
68 |
69 |
70 |
71 | ); 72 | } 73 | -------------------------------------------------------------------------------- /src/app/data/useSchemas.ts: -------------------------------------------------------------------------------- 1 | import { useAsyncEffect, useSetState } from 'ahooks'; 2 | import { useEffect, useState } from 'react'; 3 | import services from '@/services'; 4 | 5 | export default function useSchemas() { 6 | const [loading, setLoading] = useState(false); 7 | const [providers, setProviders] = useSetState({ 8 | data: [], 9 | current: '', 10 | }); 11 | const [schemas, setSchemas] = useSetState({ 12 | data: [], 13 | current: '', 14 | }); 15 | 16 | const [datas, setDatas] = useState[]>([]); 17 | 18 | const updateDatas = async (provider: string, schema: string) => { 19 | const data = await services.getQueryData({ provider, schema }); 20 | setDatas(data); 21 | }; 22 | 23 | const updateSchemas = async (provider: string) => { 24 | const data = await services.getSchemas({ provider }); 25 | const currentSchema = data?.[0]; 26 | setSchemas({ 27 | data: data, 28 | current: currentSchema, 29 | }); 30 | updateDatas(provider, currentSchema); 31 | }; 32 | 33 | useAsyncEffect(async () => { 34 | setLoading(true); 35 | const data = await services.getProviders(); 36 | const currentProvider = data?.[0]; 37 | updateSchemas(currentProvider); 38 | setProviders({ 39 | data: data, 40 | current: currentProvider, 41 | }); 42 | setLoading(false); 43 | }, []); 44 | 45 | return { 46 | loading, 47 | providers, 48 | schemas, 49 | datas, 50 | changeProvider: async (provider: string) => { 51 | setLoading(true); 52 | setProviders({ current: provider }); 53 | await updateSchemas(provider); 54 | setLoading(false); 55 | }, 56 | changeSchema: (schema: string) => { 57 | setLoading(true); 58 | setSchemas({ current: schema }); 59 | updateDatas(providers.current, schema); 60 | setLoading(false); 61 | }, 62 | }; 63 | } 64 | -------------------------------------------------------------------------------- /src/app/demo/page.tsx: -------------------------------------------------------------------------------- 1 | import Image from "next/image"; 2 | 3 | export default function Home() { 4 | return ( 5 |
6 |
7 |

8 | Get started by editing  9 | src/app/page.tsx 10 |

11 |
12 | 18 | By{" "} 19 | Vercel Logo 27 | 28 |
29 |
30 | 31 |
32 | Next.js Logo 40 |
41 | 42 |
43 | 49 |

50 | Docs{" "} 51 | 52 | -> 53 | 54 |

55 |

56 | Find in-depth information about Next.js features and API. 57 |

58 |
59 | 60 | 66 |

67 | Learn{" "} 68 | 69 | -> 70 | 71 |

72 |

73 | Learn about Next.js in an interactive course with quizzes! 74 |

75 |
76 | 77 | 83 |

84 | Templates{" "} 85 | 86 | -> 87 | 88 |

89 |

90 | Explore starter templates for Next.js. 91 |

92 |
93 | 94 | 100 |

101 | Deploy{" "} 102 | 103 | -> 104 | 105 |

106 |

107 | Instantly deploy your Next.js site to a shareable URL with Vercel. 108 |

109 |
110 |
111 |
112 | ); 113 | } 114 | -------------------------------------------------------------------------------- /src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zvtvz/zvt_ui/14555986781baa91ac67b9e18ba8ad653e8ecc0c/src/app/favicon.ico -------------------------------------------------------------------------------- /src/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --foreground-rgb: 0, 0, 0; 7 | --background-start-rgb: 214, 219, 220; 8 | --background-end-rgb: 255, 255, 255; 9 | } 10 | 11 | @media (prefers-color-scheme: dark) { 12 | :root { 13 | --foreground-rgb: 255, 255, 255; 14 | --background-start-rgb: 0, 0, 0; 15 | --background-end-rgb: 0, 0, 0; 16 | } 17 | } 18 | 19 | body { 20 | color: rgb(var(--foreground-rgb)); 21 | background-color: #f8f8f8 !important; 22 | font-size: 14px; 23 | /* background: radial-gradient( 24 | farthest-corner circle at 0% 0%, 25 | #f3f6f9 0%, 26 | #ebf5ff 100% 27 | ); */ 28 | } 29 | 30 | @layer utilities { 31 | .text-balance { 32 | text-wrap: balance; 33 | } 34 | } 35 | 36 | li::marker { 37 | margin-inline-end: 6px !important; 38 | } 39 | 40 | .text-right > input { 41 | text-align: right; 42 | } 43 | 44 | .header { 45 | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.08); 46 | } 47 | 48 | .joy-pvuyop-JoyCard-root { 49 | background-color: #fff !important; 50 | } 51 | 52 | .w-container { 53 | max-width: 1600px; 54 | min-width: 1366px; 55 | } 56 | -------------------------------------------------------------------------------- /src/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata, Viewport } from 'next'; 2 | import Script from 'next/script'; 3 | 4 | import ThemeRegistry from '@/components/ThemeRegistry/ThemeRegistry'; 5 | import ConditionalLayout from '@/components/layout/ConditionalLayout'; 6 | 7 | import './globals.css'; 8 | 9 | export const metadata: Metadata = { 10 | title: 'zvt-ui', 11 | description: 'Generated by create next app', 12 | }; 13 | 14 | export const viewport: Viewport = { 15 | width: 'device-width', 16 | initialScale: 1, 17 | }; 18 | 19 | export default function RootLayout({ 20 | children, 21 | }: Readonly<{ 22 | children: React.ReactNode; 23 | }>) { 24 | return ( 25 | 26 | 27 | 28 |