├── types
└── cache
│ ├── cache.json
│ └── mock
│ └── mock.cache.js
├── public
├── CNAME
├── favicon.ico
├── jetbrains.png
├── assets
│ └── images
│ │ └── bg.png
└── icons
│ ├── icon-128x128.png
│ ├── icon-192x192.png
│ └── icon-512x512.png
├── src
├── pages
│ ├── AI
│ │ ├── Knowledge
│ │ │ ├── componets
│ │ │ │ └── KnowledgeModal
│ │ │ │ │ ├── styles.less
│ │ │ │ │ └── service.ts
│ │ │ └── service.ts
│ │ ├── Doc
│ │ │ ├── styles.less
│ │ │ ├── componets
│ │ │ │ └── Slice
│ │ │ │ │ ├── styles.less
│ │ │ │ │ └── service.ts
│ │ │ └── service.ts
│ │ ├── Chat
│ │ │ ├── typings.d.ts
│ │ │ └── service.ts
│ │ ├── Mcp
│ │ │ └── service.ts
│ │ └── Model
│ │ │ ├── staffStatusSwitch
│ │ │ └── Index.tsx
│ │ │ └── service.ts
│ ├── Human
│ │ ├── Staff
│ │ │ ├── components
│ │ │ │ ├── importStaff
│ │ │ │ │ └── index.less
│ │ │ │ ├── dpetSearch
│ │ │ │ │ └── Index.tsx
│ │ │ │ └── staffStatusSwitch
│ │ │ │ │ └── Index.tsx
│ │ │ ├── typings.d.ts
│ │ │ └── service.ts
│ │ ├── Dept
│ │ │ ├── typings.d.ts
│ │ │ └── service.ts
│ │ ├── Role
│ │ │ ├── typings.d.ts
│ │ │ ├── components
│ │ │ │ └── Switch.tsx
│ │ │ └── service.ts
│ │ └── Post
│ │ │ ├── typings.d.ts
│ │ │ └── service.ts
│ ├── System
│ │ ├── Dfs
│ │ │ ├── components
│ │ │ │ └── importDFS
│ │ │ │ │ ├── index.less
│ │ │ │ │ └── service.ts
│ │ │ ├── typings.d.ts
│ │ │ └── service.ts
│ │ ├── Dictionaries
│ │ │ ├── components
│ │ │ │ └── drawerInfo
│ │ │ │ │ ├── components
│ │ │ │ │ └── selectType
│ │ │ │ │ │ ├── service.ts
│ │ │ │ │ │ └── Index.tsx
│ │ │ │ │ ├── typings.d.ts
│ │ │ │ │ └── service.ts
│ │ │ ├── typings.d.ts
│ │ │ └── service.ts
│ │ ├── Menu
│ │ │ ├── typings.d.ts
│ │ │ └── service.ts
│ │ ├── Token
│ │ │ ├── typings.d.ts
│ │ │ └── service.ts
│ │ ├── Client
│ │ │ ├── typings.d.ts
│ │ │ └── service.ts
│ │ └── I18n
│ │ │ └── service.ts
│ ├── Tool
│ │ └── Code
│ │ │ ├── Gen
│ │ │ ├── components
│ │ │ │ ├── PreviewCode
│ │ │ │ │ ├── styles.less
│ │ │ │ │ └── service.ts
│ │ │ │ ├── EditCode
│ │ │ │ │ ├── TagList.tsx
│ │ │ │ │ ├── typings.d.ts
│ │ │ │ │ ├── service.ts
│ │ │ │ │ └── TemplateGroupSearch
│ │ │ │ │ │ └── index.tsx
│ │ │ │ └── DrawerInfo
│ │ │ │ │ ├── typings.d.ts
│ │ │ │ │ ├── service.ts
│ │ │ │ │ └── DsConfSearch
│ │ │ │ │ └── index.tsx
│ │ │ ├── typings.d.ts
│ │ │ └── service.ts
│ │ │ ├── DsConf
│ │ │ └── service.ts
│ │ │ └── Metadata
│ │ │ ├── Type
│ │ │ └── service.ts
│ │ │ ├── Template
│ │ │ └── service.ts
│ │ │ └── TemplateGroup
│ │ │ ├── TemplateSearch
│ │ │ └── index.tsx
│ │ │ └── service.ts
│ ├── Monitor
│ │ ├── Redis
│ │ │ ├── components
│ │ │ │ ├── styles.less
│ │ │ │ ├── CommandStatsChart.tsx
│ │ │ │ └── KeyChart.tsx
│ │ │ └── service.ts
│ │ └── Job
│ │ │ ├── typings.d.ts
│ │ │ ├── components
│ │ │ ├── jobStatusSwitch
│ │ │ │ └── index.tsx
│ │ │ └── details
│ │ │ │ └── index.tsx
│ │ │ └── service.ts
│ ├── Login
│ │ ├── componets
│ │ │ └── oauth2
│ │ │ │ ├── service.ts
│ │ │ │ └── github
│ │ │ │ └── index.tsx
│ │ ├── service.ts
│ │ └── OAuth2
│ │ │ └── index.tsx
│ ├── Index
│ │ └── components
│ │ │ ├── styles.less
│ │ │ └── BarChart.tsx
│ ├── 404.tsx
│ ├── Account
│ │ └── Settings
│ │ │ ├── styles.less
│ │ │ ├── typings.d.ts
│ │ │ ├── service.ts
│ │ │ └── components
│ │ │ ├── RestPassword.tsx
│ │ │ └── UserInfo.tsx
│ └── Log
│ │ ├── Job
│ │ ├── typings.d.ts
│ │ └── service.ts
│ │ ├── Operation
│ │ ├── typings.d.ts
│ │ └── service.ts
│ │ └── Login
│ │ ├── typings.d.ts
│ │ └── service.ts
├── hooks
│ └── index.ts
├── loading.less
├── locales
│ ├── zh-CN
│ │ ├── component.ts
│ │ ├── pwa.ts
│ │ ├── globalHeader.ts
│ │ ├── settingDrawer.ts
│ │ ├── menu.ts
│ │ └── settings.ts
│ ├── zh-TW
│ │ ├── component.ts
│ │ ├── pwa.ts
│ │ ├── globalHeader.ts
│ │ ├── settingDrawer.ts
│ │ ├── menu.ts
│ │ └── settings.ts
│ ├── fa-IR
│ │ ├── component.ts
│ │ ├── pwa.ts
│ │ ├── globalHeader.ts
│ │ ├── settingDrawer.ts
│ │ ├── menu.ts
│ │ └── settings.ts
│ ├── ja-JP
│ │ ├── component.ts
│ │ ├── pwa.ts
│ │ ├── globalHeader.ts
│ │ ├── settingDrawer.ts
│ │ ├── menu.ts
│ │ └── settings.ts
│ ├── bn-BD
│ │ ├── component.ts
│ │ ├── pwa.ts
│ │ ├── globalHeader.ts
│ │ ├── settingDrawer.ts
│ │ └── menu.ts
│ ├── en-US
│ │ ├── component.ts
│ │ ├── pwa.ts
│ │ ├── globalHeader.ts
│ │ ├── settingDrawer.ts
│ │ └── menu.ts
│ ├── id-ID
│ │ ├── component.ts
│ │ ├── pwa.ts
│ │ ├── globalHeader.ts
│ │ ├── settingDrawer.ts
│ │ └── menu.ts
│ ├── pt-BR
│ │ ├── component.ts
│ │ ├── pwa.ts
│ │ ├── globalHeader.ts
│ │ ├── settingDrawer.ts
│ │ └── menu.ts
│ ├── pt-BR.ts
│ ├── fa-IR.ts
│ ├── id-ID.ts
│ ├── bn-BD.ts
│ ├── zh-TW.ts
│ ├── ja-JP.ts
│ ├── zh-CN.ts
│ └── en-US.ts
├── services
│ ├── ant-design-pro
│ │ ├── index.ts
│ │ ├── login.ts
│ │ └── api.ts
│ └── swagger
│ │ ├── index.ts
│ │ ├── store.ts
│ │ ├── typings.d.ts
│ │ └── user.ts
├── loading.tsx
├── access.ts
├── components
│ ├── TwelveT
│ │ ├── Dictionaries
│ │ │ ├── DictionariesRadio
│ │ │ │ ├── service.ts
│ │ │ │ └── index.tsx
│ │ │ ├── DictionariesCheckbox
│ │ │ │ ├── service.ts
│ │ │ │ └── index.tsx
│ │ │ └── DictionariesSelect
│ │ │ │ ├── service.ts
│ │ │ │ └── index.tsx
│ │ ├── Upload
│ │ │ └── data.d.ts
│ │ └── DatePicker
│ │ │ └── index.tsx
│ ├── index.ts
│ ├── RightContent
│ │ └── index.tsx
│ ├── HeaderDropdown
│ │ └── index.tsx
│ └── Footer
│ │ └── index.tsx
├── manifest.json
├── typings.d.ts
├── global.less
├── setting.tsx
├── service-worker.js
└── global.tsx
├── .idea
└── icon.png
├── .eslintignore
├── .husky
├── pre-commit
└── commit-msg
├── bin
├── run-web.bat
├── build.bat
└── package.bat
├── .env
├── .eslintrc.js
├── jsconfig.json
├── .editorconfig
├── .prettierignore
├── .prettierrc.js
├── jest.config.ts
├── .gitignore
├── .github
└── workflows
│ └── test.yml
├── config
├── defaultSettings.ts
└── proxy.ts
├── tsconfig.json
├── Jenkinsfile
└── tests
└── setupTests.jsx
/types/cache/cache.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/types/cache/mock/mock.cache.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/CNAME:
--------------------------------------------------------------------------------
1 | preview.pro.ant.design
--------------------------------------------------------------------------------
/src/pages/AI/Knowledge/componets/KnowledgeModal/styles.less:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/hooks/index.ts:
--------------------------------------------------------------------------------
1 | export {default as useWebSocket} from './websocket';
2 |
--------------------------------------------------------------------------------
/.idea/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twelvet-s/twelvet-ui/HEAD/.idea/icon.png
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twelvet-s/twelvet-ui/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/public/jetbrains.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twelvet-s/twelvet-ui/HEAD/public/jetbrains.png
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | /lambda/
2 | /scripts
3 | /config
4 | .history
5 | public
6 | dist
7 | .umi
8 | mock
9 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | npx --no-install lint-staged
5 |
--------------------------------------------------------------------------------
/public/assets/images/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twelvet-s/twelvet-ui/HEAD/public/assets/images/bg.png
--------------------------------------------------------------------------------
/public/icons/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twelvet-s/twelvet-ui/HEAD/public/icons/icon-128x128.png
--------------------------------------------------------------------------------
/public/icons/icon-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twelvet-s/twelvet-ui/HEAD/public/icons/icon-192x192.png
--------------------------------------------------------------------------------
/public/icons/icon-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/twelvet-s/twelvet-ui/HEAD/public/icons/icon-512x512.png
--------------------------------------------------------------------------------
/src/pages/AI/Doc/styles.less:
--------------------------------------------------------------------------------
1 | .color-red {
2 | color: rgb(245, 108, 108);
3 | }
4 |
5 | .color-blue {
6 | color: #2E5CF6
7 | }
8 |
--------------------------------------------------------------------------------
/src/pages/Human/Staff/components/importStaff/index.less:
--------------------------------------------------------------------------------
1 | .clickColor {
2 | color: #1890ff;
3 | }
4 |
5 | .tip {
6 | color: #ff0000
7 | }
8 |
--------------------------------------------------------------------------------
/src/pages/System/Dfs/components/importDFS/index.less:
--------------------------------------------------------------------------------
1 | .clickColor {
2 | color: #1890ff;
3 | }
4 |
5 | .tip {
6 | color: #ff0000
7 | }
8 |
--------------------------------------------------------------------------------
/src/loading.less:
--------------------------------------------------------------------------------
1 | .spin-container {
2 | display: flex;
3 | justify-content: center;
4 | align-items: center;
5 | height: 100vh;
6 | }
7 |
--------------------------------------------------------------------------------
/bin/run-web.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | echo.
3 | echo [info] TwelveT UI is run
4 | echo.
5 |
6 | %~d0
7 | cd %~dp0
8 |
9 | cd ..
10 | yarn start
11 |
12 | pause
--------------------------------------------------------------------------------
/.env:
--------------------------------------------------------------------------------
1 | # 默认 Umi 开发服务器自带 compress 压缩中间件,这会使开发时 SSE 数据的传输 无法流式获取 https://umijs.org/docs/guides/env-variables#umi_dev_server_compress
2 | # UMI_DEV_SERVER_COMPRESS=none
3 |
--------------------------------------------------------------------------------
/bin/build.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | echo.
3 | echo [info] TwelveT UI is build
4 | echo.
5 |
6 | %~d0
7 | cd %~dp0
8 |
9 | cd ..
10 | yarn build:prod
11 |
12 | pause
--------------------------------------------------------------------------------
/src/pages/Tool/Code/Gen/components/PreviewCode/styles.less:
--------------------------------------------------------------------------------
1 | .preCode {
2 | white-space: pre;
3 | background-color: #f6f8fa;
4 | font-size: 14px;
5 | }
6 |
--------------------------------------------------------------------------------
/.husky/commit-msg:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | # Export Git hook params
5 | export GIT_PARAMS=$*
6 |
7 | npx --no-install fabric verify-commit
8 |
--------------------------------------------------------------------------------
/src/locales/zh-CN/component.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.tagSelect.expand': '展开',
3 | 'component.tagSelect.collapse': '收起',
4 | 'component.tagSelect.all': '全部',
5 | };
6 |
--------------------------------------------------------------------------------
/src/locales/zh-TW/component.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.tagSelect.expand': '展開',
3 | 'component.tagSelect.collapse': '收起',
4 | 'component.tagSelect.all': '全部',
5 | };
6 |
--------------------------------------------------------------------------------
/src/locales/fa-IR/component.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.tagSelect.expand': 'باز',
3 | 'component.tagSelect.collapse': 'بسته ',
4 | 'component.tagSelect.all': 'همه',
5 | };
6 |
--------------------------------------------------------------------------------
/src/locales/ja-JP/component.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.tagSelect.expand': '展開',
3 | 'component.tagSelect.collapse': '折りたたむ',
4 | 'component.tagSelect.all': 'すべて',
5 | };
6 |
--------------------------------------------------------------------------------
/src/locales/bn-BD/component.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.tagSelect.expand': 'বিস্তৃত',
3 | 'component.tagSelect.collapse': 'সঙ্কুচিত',
4 | 'component.tagSelect.all': 'সব',
5 | };
6 |
--------------------------------------------------------------------------------
/src/locales/en-US/component.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.tagSelect.expand': 'Expand',
3 | 'component.tagSelect.collapse': 'Collapse',
4 | 'component.tagSelect.all': 'All',
5 | };
6 |
--------------------------------------------------------------------------------
/src/locales/id-ID/component.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.tagSelect.expand': 'Perluas',
3 | 'component.tagSelect.collapse': 'Lipat',
4 | 'component.tagSelect.all': 'Semua',
5 | };
6 |
--------------------------------------------------------------------------------
/src/locales/pt-BR/component.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.tagSelect.expand': 'Expandir',
3 | 'component.tagSelect.collapse': 'Diminuir',
4 | 'component.tagSelect.all': 'Todas',
5 | };
6 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | extends: [require.resolve('@umijs/lint/dist/config/eslint')],
3 | globals: {
4 | page: true,
5 | REACT_APP_ENV: true,
6 | },
7 | };
8 |
--------------------------------------------------------------------------------
/bin/package.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | echo.
3 | echo [info] TwelveT UI is being install
4 | echo.
5 |
6 | %~d0
7 | cd %~dp0
8 |
9 | cd ..
10 | yarn --registry=https://registry.npmmirror.com
11 |
12 | pause
--------------------------------------------------------------------------------
/src/locales/zh-CN/pwa.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.pwa.offline': '当前处于离线状态',
3 | 'app.pwa.serviceworker.updated': '有新内容',
4 | 'app.pwa.serviceworker.updated.hint': '请点击“刷新”按钮或者手动刷新页面',
5 | 'app.pwa.serviceworker.updated.ok': '刷新',
6 | };
7 |
--------------------------------------------------------------------------------
/src/locales/zh-TW/pwa.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.pwa.offline': '當前處於離線狀態',
3 | 'app.pwa.serviceworker.updated': '有新內容',
4 | 'app.pwa.serviceworker.updated.hint': '請點擊“刷新”按鈕或者手動刷新頁面',
5 | 'app.pwa.serviceworker.updated.ok': '刷新',
6 | };
7 |
--------------------------------------------------------------------------------
/src/services/ant-design-pro/index.ts:
--------------------------------------------------------------------------------
1 | // @ts-ignore
2 | /* eslint-disable */
3 | // API 更新时间:
4 | // API 唯一标识:
5 | import * as api from './api';
6 | import * as login from './login';
7 |
8 | export default {
9 | api,
10 | login,
11 | };
12 |
--------------------------------------------------------------------------------
/src/pages/Monitor/Redis/components/styles.less:
--------------------------------------------------------------------------------
1 | .lineChart {
2 | width: 100%;
3 | height: 550px;
4 | background-color: #fff;
5 | }
6 |
7 | .commandStatsChart {
8 | width: 100%;
9 | height: 300px;
10 | background-color: #fff;
11 | }
12 |
--------------------------------------------------------------------------------
/src/locales/ja-JP/pwa.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.pwa.offline': 'あなたは今オフラインです',
3 | 'app.pwa.serviceworker.updated': '新しいコンテンツが利用可能です',
4 | 'app.pwa.serviceworker.updated.hint':
5 | '現在のページをリロードするには、「更新」ボタンを押してください',
6 | 'app.pwa.serviceworker.updated.ok': 'リフレッシュ',
7 | };
8 |
--------------------------------------------------------------------------------
/src/services/swagger/index.ts:
--------------------------------------------------------------------------------
1 | // @ts-ignore
2 | /* eslint-disable */
3 | // API 更新时间:
4 | // API 唯一标识:
5 | import * as pet from './pet';
6 | import * as store from './store';
7 | import * as user from './user';
8 |
9 | export default {
10 | pet,
11 | store,
12 | user,
13 | };
14 |
--------------------------------------------------------------------------------
/src/locales/en-US/pwa.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.pwa.offline': 'You are offline now',
3 | 'app.pwa.serviceworker.updated': 'New content is available',
4 | 'app.pwa.serviceworker.updated.hint': 'Please press the "Refresh" button to reload current page',
5 | 'app.pwa.serviceworker.updated.ok': 'Refresh',
6 | };
7 |
--------------------------------------------------------------------------------
/src/locales/bn-BD/pwa.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.pwa.offline': 'আপনি এখন অফলাইন',
3 | 'app.pwa.serviceworker.updated': 'নতুন সামগ্রী উপলব্ধ',
4 | 'app.pwa.serviceworker.updated.hint':
5 | 'বর্তমান পৃষ্ঠাটি পুনরায় লোড করতে দয়া করে "রিফ্রেশ" বোতাম টিপুন',
6 | 'app.pwa.serviceworker.updated.ok': 'রিফ্রেশ',
7 | };
8 |
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "jsx": "react-jsx",
4 | "emitDecoratorMetadata": true,
5 | "experimentalDecorators": true,
6 | "baseUrl": ".",
7 | "paths": {
8 | "@/*": [
9 | "./src/*"
10 | ]
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/loading.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | import { Spin } from "antd"
4 | import './loading.less'
5 |
6 | const Loading: React.FC = () => {
7 | return (
8 |
9 |
10 |
11 | )
12 | }
13 |
14 | export default Loading
15 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 4
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
15 | [Makefile]
16 | indent_style = space
17 |
--------------------------------------------------------------------------------
/src/pages/Monitor/Redis/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 |
3 | // 请求的控制器名称
4 | const controller = "/system/monitor";
5 |
6 | /**
7 | * 获取redis信息
8 | * @returns redis信息
9 | */
10 | export async function query() {
11 | return request(`${controller}/redis`, {
12 | method: 'GET',
13 | });
14 | }
15 |
--------------------------------------------------------------------------------
/src/pages/System/Dfs/components/importDFS/service.ts:
--------------------------------------------------------------------------------
1 | import {upload} from '@/utils/twelvet'
2 |
3 | // 请求的控制器名称
4 | const controller = "/dfs"
5 |
6 | /**
7 | * 上传数据
8 | * @param formData
9 | */
10 | export async function uploadFile(formData: FormData) {
11 | return upload(`${controller}/batchUpload`, formData);
12 | }
13 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | **/*.svg
2 | .umi
3 | .umi-production
4 | /dist
5 | .dockerignore
6 | .DS_Store
7 | .eslintignore
8 | *.png
9 | *.toml
10 | docker
11 | .editorconfig
12 | Dockerfile*
13 | .gitignore
14 | .prettierignore
15 | LICENSE
16 | .eslintcache
17 | *.lock
18 | yarn-error.log
19 | .history
20 | CNAME
21 | /build
22 | /public
23 |
--------------------------------------------------------------------------------
/src/locales/fa-IR/pwa.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.pwa.offline': 'شما اکنون آفلاین هستید',
3 | 'app.pwa.serviceworker.updated': 'مطالب جدید در دسترس است',
4 | 'app.pwa.serviceworker.updated.hint':
5 | 'لطفاً برای بارگیری مجدد صفحه فعلی ، دکمه "تازه سازی" را فشار دهید',
6 | 'app.pwa.serviceworker.updated.ok': 'تازه سازی',
7 | };
8 |
--------------------------------------------------------------------------------
/src/locales/id-ID/pwa.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.pwa.offline': 'Koneksi anda terputus',
3 | 'app.pwa.serviceworker.updated': 'Konten baru sudah tersedia',
4 | 'app.pwa.serviceworker.updated.hint':
5 | 'Silahkan klik tombol "Refresh" untuk memuat ulang halaman ini',
6 | 'app.pwa.serviceworker.updated.ok': 'Memuat ulang',
7 | };
8 |
--------------------------------------------------------------------------------
/src/access.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * @see https://umijs.org/zh-CN/plugins/plugin-access
3 | * */
4 | export default function access(initialState: { currentUser?: API.CurrentUser } | undefined) {
5 | const {currentUser} = initialState ?? {};
6 | return {
7 | canAdmin: currentUser && currentUser.user.access === 'admin',
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/src/locales/pt-BR/pwa.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.pwa.offline': 'Você está offline agora',
3 | 'app.pwa.serviceworker.updated': 'Novo conteúdo está disponível',
4 | 'app.pwa.serviceworker.updated.hint':
5 | 'Por favor, pressione o botão "Atualizar" para recarregar a página atual',
6 | 'app.pwa.serviceworker.updated.ok': 'Atualizar',
7 | };
8 |
--------------------------------------------------------------------------------
/src/pages/Tool/Code/Gen/components/PreviewCode/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 |
3 | // 请求的控制器名称
4 | const controller = "/gen";
5 |
6 | /**
7 | * 获取数据信息
8 | * @param tableId
9 | */
10 | export async function getInfo(tableId: number) {
11 | return request(`${controller}/preview/${tableId}`, {
12 | method: 'GET',
13 | });
14 | }
15 |
--------------------------------------------------------------------------------
/src/pages/System/Dictionaries/components/drawerInfo/components/selectType/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 |
3 | // 请求的控制器名称
4 | const controller = "/system/dictionaries/type";
5 |
6 | /**
7 | * 获取指定字典信息
8 | */
9 | export async function optionSelect() {
10 | return request(`${controller}/optionSelect`, {
11 | method: 'GET'
12 | });
13 | }
14 |
--------------------------------------------------------------------------------
/src/pages/Login/componets/oauth2/service.ts:
--------------------------------------------------------------------------------
1 | import { request } from '@umijs/max';
2 |
3 | // 请求的控制器名称
4 | const controller = '/auth';
5 |
6 |
7 | /**
8 | * 获取GitHub第三方授权登录
9 | * @returns 登录地址
10 | */
11 | export async function getAuthorize(oauthCode: string) {
12 | return request(`${controller}/login/oauth2/${oauthCode}`, {
13 | method: 'GET',
14 | });
15 | }
16 |
--------------------------------------------------------------------------------
/src/pages/Index/components/styles.less:
--------------------------------------------------------------------------------
1 | .lineChart {
2 | width: 100%;
3 | height: 350px;
4 | background-color: #fff;
5 | }
6 |
7 | .barChart {
8 | width: 100%;
9 | height: 300px;
10 | background-color: #fff;
11 | }
12 |
13 | .topSpace {
14 | margin-top: 20px;
15 | }
16 |
17 | .historyOl ol {
18 | margin-left: 30px;
19 | list-style: decimal;
20 | }
21 |
--------------------------------------------------------------------------------
/src/components/TwelveT/Dictionaries/DictionariesRadio/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 |
3 | // 请求的控制器名称
4 | const controller = "/system/dictionaries/data/type";
5 |
6 | /**
7 | * 根据字典获取信息
8 | * @param type
9 | */
10 | export async function getDictionariesType(type: string) {
11 | return request(`${controller}/${type}`, {
12 | method: 'GET'
13 | });
14 | }
15 |
--------------------------------------------------------------------------------
/src/components/TwelveT/Dictionaries/DictionariesCheckbox/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 |
3 | // 请求的控制器名称
4 | const controller = "/system/dictionaries/data/type";
5 |
6 | /**
7 | * 根据字典获取信息
8 | * @param type
9 | */
10 | export async function getDictionariesType(type: string) {
11 | return request(`${controller}/${type}`, {
12 | method: 'GET'
13 | });
14 | }
15 |
--------------------------------------------------------------------------------
/src/components/TwelveT/Dictionaries/DictionariesSelect/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 |
3 | // 请求的控制器名称
4 | const controller = "/system/dictionaries/data/type";
5 |
6 | /**
7 | * 根据字典获取信息
8 | * @param type
9 | */
10 | export async function getDictionariesType(type: string) {
11 | return request(`${controller}/${type}`, {
12 | method: 'GET'
13 | });
14 | }
15 |
--------------------------------------------------------------------------------
/src/components/index.ts:
--------------------------------------------------------------------------------
1 | export {default as Upload} from './TwelveT/Upload';
2 | export {default as DictionariesCheckbox} from './TwelveT/Dictionaries/DictionariesCheckbox';
3 | export {default as DictionariesSelect} from './TwelveT/Dictionaries/DictionariesSelect';
4 | export {default as DictionariesRadio} from './TwelveT/Dictionaries/DictionariesRadio';
5 | export {default as DatePicker} from './TwelveT/DatePicker';
6 |
--------------------------------------------------------------------------------
/src/components/TwelveT/Upload/data.d.ts:
--------------------------------------------------------------------------------
1 | export interface UploadType {
2 | onChange?: any
3 | images?: string[]
4 | name?: string
5 | title?: any
6 | maxCount: number
7 | action: string
8 | listType?: 'picture-card' | 'picture'
9 | // 是否需要图片剪裁
10 | imgCrop?: boolean
11 | // 支持上传的文件
12 | accept?: string
13 | // 文件地址
14 | value?: string
15 | success?: () => void
16 | }
--------------------------------------------------------------------------------
/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | singleQuote: true,
3 | trailingComma: 'all',
4 | printWidth: 100,
5 | proseWrap: 'never',
6 | endOfLine: 'lf',
7 | overrides: [
8 | {
9 | files: '.prettierrc',
10 | options: {
11 | parser: 'json',
12 | },
13 | },
14 | {
15 | files: 'document.ejs',
16 | options: {
17 | parser: 'html',
18 | },
19 | },
20 | ],
21 | };
22 |
--------------------------------------------------------------------------------
/src/pages/Human/Dept/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace HumanDept {
2 |
3 | /**
4 | * 搜索参数
5 | */
6 | type PageParams = {
7 | current: number;
8 | pageSize: number;
9 | deptName: string;
10 | status: string;
11 | };
12 |
13 | /**
14 | * 响应参数
15 | */
16 | type PageListItem = {
17 | deptId: number;
18 | deptName: string;
19 | orderNum: string;
20 | status: string;
21 | createTime: Date;
22 | };
23 | }
24 |
--------------------------------------------------------------------------------
/src/pages/404.tsx:
--------------------------------------------------------------------------------
1 | import {history} from '@umijs/max';
2 | import {Button, Result} from 'antd';
3 | import React from 'react';
4 |
5 | const NoFoundPage: React.FC = () => (
6 | history.push('/')}>
12 | Back Home
13 |
14 | }
15 | />
16 | );
17 |
18 | export default NoFoundPage;
19 |
--------------------------------------------------------------------------------
/src/pages/Account/Settings/styles.less:
--------------------------------------------------------------------------------
1 | .list-group-striped > .list-group-item {
2 | border-left: 0;
3 | border-right: 0;
4 | border-radius: 0;
5 | padding-left: 0;
6 | padding-right: 0;
7 | }
8 |
9 | .list-group {
10 | padding-left: 0px;
11 | list-style: none;
12 | }
13 |
14 | .list-group-item {
15 | margin-bottom: -1px;
16 | padding: 11px 0px;
17 | font-size: 13px;
18 | }
19 |
20 | .pull-right {
21 | float: right !important;
22 | }
23 |
24 | .text-center {
25 | text-align: center
26 | }
27 |
--------------------------------------------------------------------------------
/src/pages/Tool/Code/Gen/components/EditCode/TagList.tsx:
--------------------------------------------------------------------------------
1 | import {Space} from "antd";
2 | import React from "react";
3 |
4 | const TagList: React.FC<{
5 | value?: {
6 | key: string;
7 | label: string;
8 | }[];
9 | onChange?: (
10 | value: {
11 | key: string;
12 | label: string;
13 | }[],
14 | ) => void;
15 | }> = ({value}) => {
16 |
17 | return (
18 |
19 | {value}
20 |
21 | );
22 | };
23 |
24 | export default TagList;
25 |
--------------------------------------------------------------------------------
/src/services/ant-design-pro/login.ts:
--------------------------------------------------------------------------------
1 | // @ts-ignore
2 | /* eslint-disable */
3 | import {request} from '@umijs/max';
4 |
5 | /** 发送验证码 POST /api/login/captcha */
6 | export async function getFakeCaptcha(
7 | params: {
8 | // query
9 | /** 手机号 */
10 | phone?: string;
11 | },
12 | options?: { [key: string]: any },
13 | ) {
14 | return request('/api/login/captcha', {
15 | method: 'GET',
16 | params: {
17 | ...params,
18 | },
19 | ...(options || {}),
20 | });
21 | }
22 |
--------------------------------------------------------------------------------
/src/pages/System/Menu/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace SystemMenu {
2 |
3 | /**
4 | * 搜索参数
5 | */
6 | type PageParams = {
7 | current: number;
8 | pageSize: number;
9 | menuName: string;
10 | status: string;
11 | };
12 |
13 | /**
14 | * 响应参数
15 | */
16 | type PageListItem = {
17 | menuName: string;
18 | menuType: string;
19 | icon: string;
20 | orderNum: string;
21 | perms: string;
22 | component: string;
23 | status: string;
24 | createTime: Date;
25 | };
26 | }
27 |
--------------------------------------------------------------------------------
/src/pages/System/Token/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace SystemToken {
2 | /**
3 | * 状态参数
4 | */
5 | type State = {
6 | pageSize: number;
7 | };
8 |
9 | /**
10 | * 搜索参数
11 | */
12 | type PageParams = {
13 | current: number;
14 | pageSize: number;
15 | username: string;
16 | };
17 |
18 | /**
19 | * 响应参数
20 | */
21 | type PageListItem = {
22 | username: string;
23 | clientId: string;
24 | accessToken: string;
25 | issuedAt: string;
26 | expiresAt: string;
27 | };
28 | }
29 |
--------------------------------------------------------------------------------
/src/components/TwelveT/DatePicker/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { DatePicker as DatePickerAntd } from 'antd';
3 | import type { DatePickerProps } from 'antd/es/date-picker';
4 | import moment from 'moment';
5 |
6 | const DatePicker: React.FC = (props: any) => {
7 | const { value, defaultValue, ...rest } = props;
8 | const dateValue = value && moment(value);
9 | const defaultDateValue = defaultValue && moment(defaultValue);
10 | return ;
11 | };
12 | export default DatePicker;
13 |
--------------------------------------------------------------------------------
/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Ant Design Pro",
3 | "short_name": "Ant Design Pro",
4 | "display": "standalone",
5 | "start_url": "./?utm_source=homescreen",
6 | "theme_color": "#002140",
7 | "background_color": "#001529",
8 | "icons": [
9 | {
10 | "src": "icons/icon-192x192.png",
11 | "sizes": "192x192"
12 | },
13 | {
14 | "src": "icons/icon-128x128.png",
15 | "sizes": "128x128"
16 | },
17 | {
18 | "src": "icons/icon-512x512.png",
19 | "sizes": "512x512"
20 | }
21 | ]
22 | }
23 |
--------------------------------------------------------------------------------
/src/pages/System/Client/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace SystemClient {
2 | /**
3 | * 状态参数
4 | */
5 | type State = {
6 | pageSize: number;
7 | };
8 |
9 | /**
10 | * 搜索参数
11 | */
12 | type PageParams = {
13 | current: number;
14 | pageSize: number;
15 | clientId: string;
16 | };
17 |
18 | /**
19 | * 响应参数
20 | */
21 | type PageListItem = {
22 | clientId: number;
23 | scope: string;
24 | authorizedGrantTypes: string;
25 | accessTokenValidity: string;
26 | refreshTokenValidity: string;
27 | };
28 | }
29 |
--------------------------------------------------------------------------------
/src/pages/Tool/Code/Gen/components/EditCode/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace ToolGenEditCode {
2 | /**
3 | * 状态参数
4 | */
5 | type State = {
6 | pageSize: number;
7 | };
8 |
9 | /**
10 | * 搜索参数
11 | */
12 | type PageParams = {
13 | tableName: string;
14 | tableComment: string;
15 | current: number;
16 | pageSize: number;
17 | };
18 |
19 | /**
20 | * 响应参数
21 | */
22 | type PageListItem = {
23 | tableName: string;
24 | tableComment: string;
25 | createTime: Date;
26 | updateTime: Date;
27 | };
28 | }
29 |
--------------------------------------------------------------------------------
/src/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare module 'slash2';
2 | declare module '*.css';
3 | declare module '*.less';
4 | declare module '*.scss';
5 | declare module '*.sass';
6 | declare module '*.svg';
7 | declare module '*.png';
8 | declare module '*.jpg';
9 | declare module '*.jpeg';
10 | declare module '*.gif';
11 | declare module '*.bmp';
12 | declare module '*.tiff';
13 | declare module 'omit.js';
14 | declare module 'numeral';
15 | declare module '@antv/data-set';
16 | declare module 'mockjs';
17 | declare module 'react-fittext';
18 | declare module 'bizcharts-plugin-slider';
19 |
20 | declare const REACT_APP_ENV: 'test' | 'dev' | 'pre' | false;
21 |
--------------------------------------------------------------------------------
/src/pages/System/Token/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 |
3 | // 请求的控制器名称
4 | const controller = "/system";
5 |
6 | /**
7 | * 获取分页 Data
8 | * @param params 搜索参数
9 | */
10 | export async function pageQuery(params: Record) {
11 | return request(`${controller}/token/pageQuery`, {
12 | method: 'GET',
13 | params: {
14 | ...params
15 | },
16 | });
17 | }
18 |
19 | /**
20 | * 删除数据
21 | * @param tokenId
22 | */
23 | export async function remove(tokenId: string) {
24 | return request(`${controller}/token/${tokenId}`, {
25 | method: 'DELETE',
26 | });
27 | }
28 |
--------------------------------------------------------------------------------
/src/pages/Human/Staff/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace HumanStaff {
2 |
3 | /**
4 | * 搜索参数
5 | */
6 | type PageParams = {
7 | current: number;
8 | pageSize: number;
9 | username: string;
10 | phonenumber: string;
11 | status: string;
12 | };
13 |
14 | /**
15 | * 响应参数
16 | */
17 | type PageListItem = {
18 | userId: number;
19 | username: string;
20 | nickName: string;
21 | dept: {
22 | deptName: string
23 | };
24 | phonenumber: string;
25 | status: string;
26 | createTime: Date;
27 | };
28 | }
29 |
--------------------------------------------------------------------------------
/src/pages/Tool/Code/Gen/components/DrawerInfo/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace ToolGenDrawerInfo {
2 | /**
3 | * 状态参数
4 | */
5 | type State = {
6 | pageSize: number;
7 | };
8 |
9 | /**
10 | * 搜索参数
11 | */
12 | type PageParams = {
13 | dsName: string;
14 | tableName: string;
15 | tableComment: string;
16 | current: number;
17 | pageSize: number;
18 | };
19 |
20 | /**
21 | * 响应参数
22 | */
23 | type PageListItem = {
24 | tableName: string;
25 | tableComment: string;
26 | createTime: Date;
27 | updateTime: Date;
28 | };
29 | }
30 |
--------------------------------------------------------------------------------
/src/pages/Tool/Code/Gen/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace ToolGen {
2 | /**
3 | * 状态参数
4 | */
5 | type State = {
6 | pageSize: number;
7 | };
8 |
9 | /**
10 | * 搜索参数
11 | */
12 | type PageParams = {
13 | current: number;
14 | pageSize: number;
15 | tableName: string;
16 | tableComment: string;
17 | };
18 |
19 | /**
20 | * 响应参数
21 | */
22 | type PageListItem = {
23 | tableId: number;
24 | tableName: string;
25 | tableComment: string;
26 | className: string;
27 | createTime: Date;
28 | updateTime: Date;
29 | };
30 | }
31 |
--------------------------------------------------------------------------------
/src/pages/Human/Role/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace HumanRole {
2 | /**
3 | * 状态参数
4 | */
5 | type State = {
6 | pageSize: number;
7 | };
8 |
9 | /**
10 | * 搜索参数
11 | */
12 | type PageParams = {
13 | current: number;
14 | pageSize: number;
15 | roleName: string;
16 | roleKey: string;
17 | status: string;
18 | };
19 |
20 | /**
21 | * 响应参数
22 | */
23 | type PageListItem = {
24 | roleId: number;
25 | roleName: string;
26 | roleKey: string;
27 | roleSort: number;
28 | status: string;
29 | createTime: Date;
30 | };
31 | }
32 |
--------------------------------------------------------------------------------
/src/pages/Log/Job/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace LogJob {
2 | /**
3 | * 状态参数
4 | */
5 | type State = {
6 | pageSize: number;
7 | };
8 |
9 | /**
10 | * 搜索参数
11 | */
12 | type PageParams = {
13 | current: number;
14 | pageSize: number;
15 | jobName: string;
16 | jobGroup: string;
17 | status: string;
18 | };
19 |
20 | /**
21 | * 响应参数
22 | */
23 | type PageListItem = {
24 | jobName: string;
25 | jobGroup: string;
26 | invokeTarget: string;
27 | jobMessage: string;
28 | status: string;
29 | createTime: date;
30 | };
31 | }
32 |
--------------------------------------------------------------------------------
/src/pages/Human/Post/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace HumanPost {
2 | /**
3 | * 状态参数
4 | */
5 | type State = {
6 | pageSize: number;
7 | };
8 |
9 | /**
10 | * 搜索参数
11 | */
12 | type PageParams = {
13 | current?: number;
14 | pageSize?: number;
15 | postCode: string;
16 | postName: string;
17 | status: string;
18 | };
19 |
20 | /**
21 | * 响应参数
22 | */
23 | type PageListItem = {
24 | postId: number;
25 | postCode: string;
26 | postName: string;
27 | postSort: number;
28 | status: string;
29 | createTime: Date;
30 | };
31 | }
32 |
--------------------------------------------------------------------------------
/src/pages/Account/Settings/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace LogJob {
2 | /**
3 | * 状态参数
4 | */
5 | type State = {
6 | pageSize: number;
7 | };
8 |
9 | /**
10 | * 搜索参数
11 | */
12 | type PageParams = {
13 | current: number;
14 | pageSize: number;
15 | jobName: string;
16 | jobGroup: string;
17 | status: string;
18 | };
19 |
20 | /**
21 | * 响应参数
22 | */
23 | type PageListItem = {
24 | jobName: string;
25 | jobGroup: string;
26 | invokeTarget: string;
27 | jobMessage: string;
28 | status: string;
29 | createTime: date;
30 | };
31 | }
32 |
--------------------------------------------------------------------------------
/src/pages/Monitor/Job/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace MonitorJob {
2 | /**
3 | * 状态参数
4 | */
5 | type State = {
6 | pageSize: number;
7 | };
8 |
9 | /**
10 | * 搜索参数
11 | */
12 | type PageParams = {
13 | current: number;
14 | pageSize: number;
15 | jobName: string;
16 | jobGroup: string;
17 | status: string;
18 | };
19 |
20 | /**
21 | * 响应参数
22 | */
23 | type PageListItem = {
24 | jobId: number;
25 | jobName: string;
26 | jobGroup: string;
27 | invokeTarget: string;
28 | cronExpression: string;
29 | status: string;
30 | };
31 | }
32 |
--------------------------------------------------------------------------------
/src/pages/System/Dfs/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace SystemDfs {
2 | /**
3 | * 状态参数
4 | */
5 | type State = {
6 | pageSize: number;
7 | };
8 |
9 | /**
10 | * 搜索参数
11 | */
12 | type PageParams = {
13 | current: number;
14 | pageSize: number;
15 | originalFileName: string;
16 | };
17 |
18 | /**
19 | * 响应参数
20 | */
21 | type PageListItem = {
22 | fileId: number;
23 | path: string;
24 | spaceName: string;
25 | fileName: string;
26 | originalFileName: string;
27 | type: string;
28 | size: string;
29 | createTime: Date;
30 | };
31 | }
32 |
--------------------------------------------------------------------------------
/jest.config.ts:
--------------------------------------------------------------------------------
1 | import {configUmiAlias, createConfig} from '@umijs/max/test';
2 |
3 | export default async () => {
4 | const config = await configUmiAlias({
5 | ...createConfig({
6 | target: 'browser',
7 | }),
8 | });
9 |
10 | console.log();
11 | return {
12 | ...config,
13 | testEnvironmentOptions: {
14 | ...(config?.testEnvironmentOptions || {}),
15 | url: 'http://localhost:8000',
16 | },
17 | setupFiles: [...(config.setupFiles || []), './tests/setupTests.jsx'],
18 | globals: {
19 | ...config.globals,
20 | localStorage: null,
21 | },
22 | };
23 | };
24 |
--------------------------------------------------------------------------------
/src/pages/System/Dictionaries/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace SystemDictionaries {
2 | /**
3 | * 状态参数
4 | */
5 | type State = {
6 | pageSize: number;
7 | };
8 |
9 | /**
10 | * 搜索参数
11 | */
12 | type PageParams = {
13 | current: number;
14 | pageSize: number;
15 | dictName: string;
16 | dictType: string;
17 | status: string;
18 | };
19 |
20 | /**
21 | * 响应参数
22 | */
23 | type PageListItem = {
24 | dictId: number;
25 | dictName: string;
26 | dictType: string;
27 | status: string;
28 | remark: string;
29 | createTime: Date;
30 | };
31 | }
32 |
--------------------------------------------------------------------------------
/src/pages/System/Dictionaries/components/drawerInfo/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace SystemDictionariesDrawerinfo {
2 | /**
3 | * 状态参数
4 | */
5 | type State = {
6 | pageSize: number;
7 | };
8 |
9 | /**
10 | * 搜索参数
11 | */
12 | type PageParams = {
13 | current: number;
14 | pageSize: number;
15 | status: string;
16 | };
17 |
18 | /**
19 | * 响应参数
20 | */
21 | type PageListItem = {
22 | dictCode: string;
23 | dictName: string;
24 | dictValue: string;
25 | dictSort: number;
26 | status: string;
27 | remark: string;
28 | createTime: Date;
29 | };
30 | }
31 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | **/node_modules
5 | # roadhog-api-doc ignore
6 | /src/utils/request-temp.js
7 | _roadhog-api-doc
8 |
9 | # production
10 | /dist
11 | /.vscode
12 | .mfsu-production
13 |
14 | # misc
15 | .DS_Store
16 | npm-debug.log*
17 | yarn-error.log
18 |
19 | /coverage
20 | .idea
21 | yarn.lock
22 | package-lock.json
23 | pnpm-lock.yaml
24 | *bak
25 | .vscode
26 | .yarn
27 | .yarnrc
28 |
29 | # visual studio code
30 | .history
31 | *.log
32 | functions/*
33 | .temp/**
34 |
35 | # umi
36 | .umi
37 | .umi-production
38 |
39 | # screenshot
40 | screenshot
41 | .firebase
42 | .eslintcache
43 |
44 | build
45 |
--------------------------------------------------------------------------------
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | on:
4 | workflow_dispatch:
5 | push:
6 | branches: ['master']
7 |
8 | jobs:
9 | build:
10 | runs-on: ubuntu-latest
11 |
12 | strategy:
13 | matrix:
14 | node-version: [22.x]
15 |
16 | steps:
17 | - uses: actions/checkout@v3
18 |
19 | - name: Use Node.js ${{ matrix.node-version }}
20 | uses: actions/setup-node@v3
21 | with:
22 | node-version: ${{ matrix.node-version }}
23 | distribution: zulu
24 |
25 | - name: Build
26 | run: |
27 | yarn
28 | yarn build
29 |
--------------------------------------------------------------------------------
/config/defaultSettings.ts:
--------------------------------------------------------------------------------
1 | import {Settings as LayoutSettings} from '@ant-design/pro-components';
2 |
3 | const Settings: LayoutSettings & {
4 | pwa?: boolean;
5 | logo?: string;
6 | } = {
7 | navTheme: 'light',
8 | layout: 'mix',
9 | contentWidth: 'Fluid',
10 | fixedHeader: false,
11 | fixSiderbar: true,
12 | colorWeak: false,
13 | title: 'TwelveT',
14 | pwa: false,
15 | splitMenus: false,
16 | logo: "/logo.svg",
17 | iconfontUrl: "/assets/js/icon.js",
18 | token: {
19 | // 参见ts声明,demo 见文档,通过token 修改样式
20 | //https://procomponents.ant.design/components/layout#%E9%80%9A%E8%BF%87-token-%E4%BF%AE%E6%94%B9%E6%A0%B7%E5%BC%8F
21 | },
22 | };
23 |
24 | export default Settings;
25 |
--------------------------------------------------------------------------------
/src/pages/Tool/Code/Gen/components/DrawerInfo/service.ts:
--------------------------------------------------------------------------------
1 | import { request } from '@umijs/max';
2 | import type { Key } from 'antd/lib/table/interface';
3 |
4 | // 请求的控制器名称
5 | const controller = '/gen';
6 |
7 | /**
8 | * 获取分页 Data
9 | * @param params 搜索参数
10 | */
11 | export async function pageQuery(params: Record) {
12 | return request(`${controller}/db/list`, {
13 | method: 'GET',
14 | params: {
15 | ...params,
16 | },
17 | });
18 | }
19 |
20 | /**
21 | * 导入数据 Data
22 | * @param selectedRowKeys
23 | */
24 | export async function importTable(dsName: string, selectedRowKeys: Key[]) {
25 | return request(`${controller}/importTable/${dsName}?tables=${selectedRowKeys}`, {
26 | method: 'POST',
27 | });
28 | }
29 |
--------------------------------------------------------------------------------
/src/pages/Log/Operation/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace LogOperation {
2 | /**
3 | * 状态参数
4 | */
5 | type State = {
6 | pageSize: number;
7 | exportExcelLoading: boolean;
8 | deleteLoading: boolean;
9 | };
10 |
11 | /**
12 | * 搜索参数
13 | */
14 | type PageParams = {
15 | current: number;
16 | pageSize: number;
17 | service: string;
18 | operName: string;
19 | dateTime: date;
20 | };
21 |
22 | /**
23 | * 响应参数
24 | */
25 | type PageListItem = {
26 | service: string;
27 | requestMethod: string;
28 | businessType: string;
29 | operName: string;
30 | operIp: string;
31 | status: string;
32 | dateTime: date;
33 | };
34 | }
35 |
--------------------------------------------------------------------------------
/src/locales/zh-CN/globalHeader.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.globalHeader.search': '站内搜索',
3 | 'component.globalHeader.search.example1': '搜索提示一',
4 | 'component.globalHeader.search.example2': '搜索提示二',
5 | 'component.globalHeader.search.example3': '搜索提示三',
6 | 'component.globalHeader.help': '使用文档',
7 | 'component.globalHeader.notification': '通知',
8 | 'component.globalHeader.notification.empty': '你已查看所有通知',
9 | 'component.globalHeader.message': '消息',
10 | 'component.globalHeader.message.empty': '您已读完所有消息',
11 | 'component.globalHeader.event': '待办',
12 | 'component.globalHeader.event.empty': '你已完成所有待办',
13 | 'component.noticeIcon.clear': '清空',
14 | 'component.noticeIcon.cleared': '清空了',
15 | 'component.noticeIcon.empty': '暂无数据',
16 | 'component.noticeIcon.view-more': '查看更多',
17 | };
18 |
--------------------------------------------------------------------------------
/src/locales/zh-TW/globalHeader.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.globalHeader.search': '站內搜索',
3 | 'component.globalHeader.search.example1': '搜索提示壹',
4 | 'component.globalHeader.search.example2': '搜索提示二',
5 | 'component.globalHeader.search.example3': '搜索提示三',
6 | 'component.globalHeader.help': '使用手冊',
7 | 'component.globalHeader.notification': '通知',
8 | 'component.globalHeader.notification.empty': '妳已查看所有通知',
9 | 'component.globalHeader.message': '消息',
10 | 'component.globalHeader.message.empty': '您已讀完所有消息',
11 | 'component.globalHeader.event': '待辦',
12 | 'component.globalHeader.event.empty': '妳已完成所有待辦',
13 | 'component.noticeIcon.clear': '清空',
14 | 'component.noticeIcon.cleared': '清空了',
15 | 'component.noticeIcon.empty': '暫無資料',
16 | 'component.noticeIcon.view-more': '查看更多',
17 | };
18 |
--------------------------------------------------------------------------------
/src/pages/Log/Login/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace LogLogin {
2 | /**
3 | * 状态参数
4 | */
5 | type State = {
6 | pageSize: number
7 | exportExcelLoading: boolean
8 | deleteLoading: boolean
9 | }
10 |
11 | /**
12 | * 搜索参数
13 | */
14 | type PageParams = {
15 | infoId: number
16 | userName: string
17 | ipaddr: string
18 | status: string
19 | beginTime: string
20 | endTime: string
21 | current: number
22 | pageSize: number
23 | }
24 |
25 | /**
26 | * 响应参数
27 | */
28 | type PageListItem = {
29 | infoId: number
30 | userName: string
31 | ipaddr: string
32 | status: string
33 | msg: string
34 | accessTime: Date
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/pages/AI/Doc/componets/Slice/styles.less:
--------------------------------------------------------------------------------
1 | .table-ctn {
2 | .ant-table-tbody {
3 | display: flex;
4 | // 允许换行
5 | flex-wrap: wrap;
6 |
7 | .row-ctn {
8 | width: 33.33%;
9 |
10 | .ant-table-cell {
11 | display: inline-block;
12 | width: 100%;
13 | border-bottom: none;
14 |
15 | .row {
16 | width: 100%;
17 | height: 600px;
18 |
19 | .row-info {
20 | width: 100%;
21 | height: 450px;
22 | white-space: normal; /* 允许正常换行 */
23 | overflow-y: scroll;
24 | }
25 | }
26 | }
27 | }
28 | }
29 | }
30 |
31 |
32 |
--------------------------------------------------------------------------------
/src/locales/ja-JP/globalHeader.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.globalHeader.search': '検索',
3 | 'component.globalHeader.search.example1': '検索例1',
4 | 'component.globalHeader.search.example2': '検索例2',
5 | 'component.globalHeader.search.example3': '検索例3',
6 | 'component.globalHeader.help': 'ヘルプ',
7 | 'component.globalHeader.notification': '通知',
8 | 'component.globalHeader.notification.empty': 'すべての通知を表示しました。',
9 | 'component.globalHeader.message': 'メッセージ',
10 | 'component.globalHeader.message.empty': 'すべてのメッセージを表示しました。',
11 | 'component.globalHeader.event': 'イベント',
12 | 'component.globalHeader.event.empty': 'すべてのイベントを表示しました。',
13 | 'component.noticeIcon.clear': 'クリア',
14 | 'component.noticeIcon.cleared': 'クリア済み',
15 | 'component.noticeIcon.empty': '通知なし',
16 | 'component.noticeIcon.view-more': 'もっと見る',
17 | };
18 |
--------------------------------------------------------------------------------
/src/locales/pt-BR.ts:
--------------------------------------------------------------------------------
1 | import component from './pt-BR/component';
2 | import globalHeader from './pt-BR/globalHeader';
3 | import menu from './pt-BR/menu';
4 | import pages from './pt-BR/pages';
5 | import pwa from './pt-BR/pwa';
6 | import settingDrawer from './pt-BR/settingDrawer';
7 | import settings from './pt-BR/settings';
8 |
9 | export default {
10 | 'navBar.lang': 'Idiomas',
11 | 'layout.user.link.help': 'ajuda',
12 | 'layout.user.link.privacy': 'política de privacidade',
13 | 'layout.user.link.terms': 'termos de serviços',
14 | 'app.preview.down.block': 'Download this page to your local project',
15 | 'app.development.documentation': 'Documento de Desenvolvimento',
16 | ...globalHeader,
17 | ...menu,
18 | ...settingDrawer,
19 | ...settings,
20 | ...pwa,
21 | ...component,
22 | ...pages,
23 | };
24 |
--------------------------------------------------------------------------------
/src/pages/System/Dfs/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 | import {download} from '@/utils/twelvet'
3 |
4 | // 请求的控制器名称
5 | const controller = "/dfs";
6 |
7 | /**
8 | * 获取分页 Data
9 | * @param params 搜索参数
10 | */
11 | export async function pageQuery(params: Record) {
12 | return request(`${controller}/pageQuery`, {
13 | method: 'GET',
14 | params: {
15 | ...params
16 | },
17 | });
18 | }
19 |
20 | /**
21 | * 删除数据
22 | * @param fileIds
23 | */
24 | export async function remove(fileIds: string) {
25 | return request(`${controller}/${fileIds}`, {
26 | method: 'DELETE',
27 | });
28 | }
29 |
30 | /**
31 | * 下载文件
32 | * @param fileId 文件id
33 | */
34 | export async function downloadFile(fileId: string) {
35 | return download(`${controller}/download/${fileId}`);
36 | }
37 |
--------------------------------------------------------------------------------
/src/components/RightContent/index.tsx:
--------------------------------------------------------------------------------
1 | import { QuestionCircleOutlined } from '@ant-design/icons';
2 | import { SelectLang as UmiSelectLang } from '@umijs/max';
3 | import React from 'react';
4 |
5 | export type SiderTheme = 'light' | 'dark';
6 |
7 | export const SelectLang = () => {
8 | return (
9 |
14 | );
15 | };
16 |
17 | export const Question = () => {
18 | return (
19 | {
25 | window.open('https://github.com/twelvet-projects/twelvet/issues');
26 | }}
27 | >
28 |
29 |
30 | );
31 | };
32 |
--------------------------------------------------------------------------------
/src/pages/Log/Login/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 | import {download} from '@/utils/twelvet'
3 |
4 | // 请求的控制器名称
5 | const controller = "/system/loginInfo";
6 |
7 | /**
8 | * 获取分页 Data
9 | * @param params 搜索参数
10 | */
11 | export async function pageQuery(params: Record) {
12 | return request(`${controller}/pageQuery`, {
13 | method: 'GET',
14 | params: {
15 | ...params
16 | },
17 | });
18 | }
19 |
20 | /**
21 | * 删除数据
22 | * @param infoIds
23 | */
24 | export async function remove(infoIds: string) {
25 | return request(`${controller}/${infoIds}`, {
26 | method: 'DELETE',
27 | });
28 | }
29 |
30 | /**
31 | * 导出Excel
32 | * @param params
33 | */
34 | export async function exportExcel(params?: Record) {
35 | download(`${controller}/export`, params);
36 | }
37 |
--------------------------------------------------------------------------------
/src/pages/AI/Doc/componets/Slice/service.ts:
--------------------------------------------------------------------------------
1 | import { request } from '@umijs/max';
2 |
3 | // 请求的控制器名称
4 | const controller = '/ai/slice';
5 |
6 | /**
7 | * 查询AI知识库文档分片列表
8 | * @param query 查询参数
9 | */
10 | export async function pageQuerySlice(query: { [key: string]: any }) {
11 | return request(`${controller}/pageQuery`, {
12 | method: `get`,
13 | params: query,
14 | });
15 | }
16 |
17 | /**
18 | * 查询AI知识库文档分片详细
19 | * @param sliceId
20 | */
21 | export async function getSlice(sliceId: number) {
22 | return request(`${controller}/${sliceId}`, {
23 | method: `get`,
24 | });
25 | }
26 |
27 | /**
28 | * 修改AI知识库文档分片
29 | * @param data 数据参数
30 | */
31 | export async function updateSlice(data: { [key: string]: any }) {
32 | return request(`${controller}`, {
33 | method: `put`,
34 | data: data,
35 | });
36 | }
37 |
--------------------------------------------------------------------------------
/src/pages/AI/Knowledge/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 | import {download} from '@/utils/twelvet'
3 |
4 | // 请求的控制器名称
5 | const controller = "/ai/knowledge";
6 |
7 | /**
8 | * 查询AI知识库列表
9 | * @param query 查询参数
10 | */
11 | export async function pageQueryKnowledge(query: { [key: string]: any }) {
12 | return request(`${controller}/pageQuery`, {
13 | method: `get`,
14 | params: query
15 | })
16 | }
17 |
18 | /**
19 | * 删除AI知识库
20 | * @param knowledgeId
21 | */
22 | export async function delKnowledge(knowledgeId: string | number) {
23 | return request(`${controller}/${knowledgeId}`, {
24 | method: `delete`
25 | })
26 | }
27 |
28 | /**
29 | * 导出数据
30 | * @param params
31 | */
32 | export async function exportKnowledge(params?: { [key: string]: any }) {
33 | return download(`${controller}/export`, params);
34 | }
35 |
--------------------------------------------------------------------------------
/src/pages/AI/Knowledge/componets/KnowledgeModal/service.ts:
--------------------------------------------------------------------------------
1 | import { request } from '@umijs/max';
2 |
3 | // 请求的控制器名称
4 | const controller = '/ai/knowledge';
5 |
6 | /**
7 | * 查询AI知识库详细
8 | * @param knowledgeId
9 | */
10 | export async function getKnowledge(knowledgeId: number) {
11 | return request(`${controller}/${knowledgeId}`, {
12 | method: `get`,
13 | });
14 | }
15 |
16 | /**
17 | * 新增AI知识库
18 | * @param data 数据参数
19 | */
20 | export async function addKnowledge(data: { [key: string]: any }) {
21 | return request(`${controller}`, {
22 | method: `post`,
23 | data: data,
24 | });
25 | }
26 |
27 | /**
28 | * 修改AI知识库
29 | * @param data 数据参数
30 | */
31 | export async function updateKnowledge(data: { [key: string]: any }) {
32 | return request(`${controller}`, {
33 | method: `put`,
34 | data: data,
35 | });
36 | }
37 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "esnext",
4 | "module": "esnext",
5 | "moduleResolution": "node",
6 | "importHelpers": true,
7 | "jsx": "preserve",
8 | "esModuleInterop": true,
9 | "sourceMap": true,
10 | "baseUrl": "./",
11 | "skipLibCheck": true,
12 | "experimentalDecorators": true,
13 | "strict": true,
14 | "resolveJsonModule": true,
15 | "allowSyntheticDefaultImports": true,
16 | "paths": {
17 | "@/*": [
18 | "./src/*"
19 | ],
20 | "@@/*": [
21 | "./src/.umi/*"
22 | ],
23 | "@@test/*": [
24 | "./src/.umi-test/*"
25 | ]
26 | }
27 | },
28 | "include": [
29 | "./**/*.d.ts",
30 | "./**/*.ts",
31 | "./**/*.tsx"
32 | ]
33 | }
34 |
--------------------------------------------------------------------------------
/src/locales/en-US/globalHeader.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.globalHeader.search': 'Search',
3 | 'component.globalHeader.search.example1': 'Search example 1',
4 | 'component.globalHeader.search.example2': 'Search example 2',
5 | 'component.globalHeader.search.example3': 'Search example 3',
6 | 'component.globalHeader.help': 'Help',
7 | 'component.globalHeader.notification': 'Notification',
8 | 'component.globalHeader.notification.empty': 'You have viewed all notifications.',
9 | 'component.globalHeader.message': 'Message',
10 | 'component.globalHeader.message.empty': 'You have viewed all messsages.',
11 | 'component.globalHeader.event': 'Event',
12 | 'component.globalHeader.event.empty': 'You have viewed all events.',
13 | 'component.noticeIcon.clear': 'Clear',
14 | 'component.noticeIcon.cleared': 'Cleared',
15 | 'component.noticeIcon.empty': 'No notifications',
16 | 'component.noticeIcon.view-more': 'View more',
17 | };
18 |
--------------------------------------------------------------------------------
/src/locales/bn-BD/globalHeader.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.globalHeader.search': 'অনুসন্ধান করুন',
3 | 'component.globalHeader.search.example1': 'অনুসন্ধান উদাহরণ ১',
4 | 'component.globalHeader.search.example2': 'অনুসন্ধান উদাহরণ ২',
5 | 'component.globalHeader.search.example3': 'অনুসন্ধান উদাহরণ ৩',
6 | 'component.globalHeader.help': 'সহায়তা',
7 | 'component.globalHeader.notification': 'বিজ্ঞপ্তি',
8 | 'component.globalHeader.notification.empty': 'আপনি সমস্ত বিজ্ঞপ্তি দেখেছেন।',
9 | 'component.globalHeader.message': 'বার্তা',
10 | 'component.globalHeader.message.empty': 'আপনি সমস্ত বার্তা দেখেছেন।',
11 | 'component.globalHeader.event': 'ঘটনা',
12 | 'component.globalHeader.event.empty': 'আপনি সমস্ত ইভেন্ট দেখেছেন।',
13 | 'component.noticeIcon.clear': 'সাফ',
14 | 'component.noticeIcon.cleared': 'সাফ করা হয়েছে',
15 | 'component.noticeIcon.empty': 'বিজ্ঞপ্তি নেই',
16 | 'component.noticeIcon.view-more': 'আরো দেখুন',
17 | };
18 |
--------------------------------------------------------------------------------
/src/locales/fa-IR.ts:
--------------------------------------------------------------------------------
1 | import component from './fa-IR/component';
2 | import globalHeader from './fa-IR/globalHeader';
3 | import menu from './fa-IR/menu';
4 | import pages from './fa-IR/pages';
5 | import pwa from './fa-IR/pwa';
6 | import settingDrawer from './fa-IR/settingDrawer';
7 | import settings from './fa-IR/settings';
8 |
9 | export default {
10 | 'navBar.lang': 'زبان ها ',
11 | 'layout.user.link.help': 'کمک',
12 | 'layout.user.link.privacy': 'حریم خصوصی',
13 | 'layout.user.link.terms': 'مقررات',
14 | 'app.preview.down.block': 'این صفحه را در پروژه محلی خود بارگیری کنید',
15 | 'app.welcome.link.fetch-blocks': 'دریافت تمام بلوک',
16 | 'app.welcome.link.block-list': 'به سرعت صفحات استاندارد مبتنی بر توسعه "بلوک" را بسازید',
17 | 'app.development.documentation': 'سند توسعه',
18 | ...globalHeader,
19 | ...menu,
20 | ...settingDrawer,
21 | ...settings,
22 | ...pwa,
23 | ...component,
24 | ...pages,
25 | };
26 |
--------------------------------------------------------------------------------
/src/locales/fa-IR/globalHeader.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.globalHeader.search': 'جستجو ',
3 | 'component.globalHeader.search.example1': 'مثال 1 را جستجو کنید',
4 | 'component.globalHeader.search.example2': 'مثال 2 را جستجو کنید',
5 | 'component.globalHeader.search.example3': 'مثال 3 را جستجو کنید',
6 | 'component.globalHeader.help': 'کمک',
7 | 'component.globalHeader.notification': 'اعلان',
8 | 'component.globalHeader.notification.empty': 'شما همه اعلان ها را مشاهده کرده اید.',
9 | 'component.globalHeader.message': 'پیام',
10 | 'component.globalHeader.message.empty': 'شما همه پیام ها را مشاهده کرده اید.',
11 | 'component.globalHeader.event': 'رویداد',
12 | 'component.globalHeader.event.empty': 'شما همه رویدادها را مشاهده کرده اید.',
13 | 'component.noticeIcon.clear': 'پاک کردن',
14 | 'component.noticeIcon.cleared': 'پاک شد',
15 | 'component.noticeIcon.empty': 'بدون اعلان',
16 | 'component.noticeIcon.view-more': 'نمایش بیشتر',
17 | };
18 |
--------------------------------------------------------------------------------
/src/locales/pt-BR/globalHeader.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.globalHeader.search': 'Busca',
3 | 'component.globalHeader.search.example1': 'Exemplo de busca 1',
4 | 'component.globalHeader.search.example2': 'Exemplo de busca 2',
5 | 'component.globalHeader.search.example3': 'Exemplo de busca 3',
6 | 'component.globalHeader.help': 'Ajuda',
7 | 'component.globalHeader.notification': 'Notificação',
8 | 'component.globalHeader.notification.empty': 'Você visualizou todas as notificações.',
9 | 'component.globalHeader.message': 'Mensagem',
10 | 'component.globalHeader.message.empty': 'Você visualizou todas as mensagens.',
11 | 'component.globalHeader.event': 'Evento',
12 | 'component.globalHeader.event.empty': 'Você visualizou todos os eventos.',
13 | 'component.noticeIcon.clear': 'Limpar',
14 | 'component.noticeIcon.cleared': 'Limpo',
15 | 'component.noticeIcon.empty': 'Sem notificações',
16 | 'component.noticeIcon.view-more': 'Veja mais',
17 | };
18 |
--------------------------------------------------------------------------------
/src/locales/id-ID/globalHeader.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.globalHeader.search': 'Pencarian',
3 | 'component.globalHeader.search.example1': 'Contoh 1 Pencarian',
4 | 'component.globalHeader.search.example2': 'Contoh 2 Pencarian',
5 | 'component.globalHeader.search.example3': 'Contoh 3 Pencarian',
6 | 'component.globalHeader.help': 'Bantuan',
7 | 'component.globalHeader.notification': 'Notifikasi',
8 | 'component.globalHeader.notification.empty': 'Anda telah membaca semua notifikasi',
9 | 'component.globalHeader.message': 'Pesan',
10 | 'component.globalHeader.message.empty': 'Anda telah membaca semua pesan.',
11 | 'component.globalHeader.event': 'Acara',
12 | 'component.globalHeader.event.empty': 'Anda telah melihat semua acara.',
13 | 'component.noticeIcon.clear': 'Kosongkan',
14 | 'component.noticeIcon.cleared': 'Berhasil dikosongkan',
15 | 'component.noticeIcon.empty': 'Tidak ada pemberitahuan',
16 | 'component.noticeIcon.view-more': 'Melihat lebih',
17 | };
18 |
--------------------------------------------------------------------------------
/src/locales/id-ID.ts:
--------------------------------------------------------------------------------
1 | import component from './id-ID/component';
2 | import globalHeader from './id-ID/globalHeader';
3 | import menu from './id-ID/menu';
4 | import pages from './id-ID/pages';
5 | import pwa from './id-ID/pwa';
6 | import settingDrawer from './id-ID/settingDrawer';
7 | import settings from './id-ID/settings';
8 |
9 | export default {
10 | 'navbar.lang': 'Bahasa',
11 | 'layout.user.link.help': 'Bantuan',
12 | 'layout.user.link.privacy': 'Privasi',
13 | 'layout.user.link.terms': 'Ketentuan',
14 | 'app.preview.down.block': 'Unduh halaman ini dalam projek lokal anda',
15 | 'app.welcome.link.fetch-blocks': 'Dapatkan semua blok',
16 | 'app.welcome.link.block-list': 'Buat standar dengan cepat, halaman-halaman berdasarkan pengembangan `block`',
17 | 'app.development.documentation': 'Dokumen Pengembangan',
18 | ...globalHeader,
19 | ...menu,
20 | ...settingDrawer,
21 | ...settings,
22 | ...pwa,
23 | ...component,
24 | ...pages,
25 | };
26 |
--------------------------------------------------------------------------------
/src/locales/bn-BD.ts:
--------------------------------------------------------------------------------
1 | import component from './bn-BD/component';
2 | import globalHeader from './bn-BD/globalHeader';
3 | import menu from './bn-BD/menu';
4 | import pages from './bn-BD/pages';
5 | import pwa from './bn-BD/pwa';
6 | import settingDrawer from './bn-BD/settingDrawer';
7 | import settings from './bn-BD/settings';
8 |
9 | export default {
10 | 'navBar.lang': 'ভাষা',
11 | 'layout.user.link.help': 'সহায়তা',
12 | 'layout.user.link.privacy': 'গোপনীয়তা',
13 | 'layout.user.link.terms': 'শর্তাদি',
14 | 'app.preview.down.block': 'আপনার স্থানীয় প্রকল্পে এই পৃষ্ঠাটি ডাউনলোড করুন',
15 | 'app.welcome.link.fetch-blocks': 'সমস্ত ব্লক পান',
16 | 'app.welcome.link.block-list': '`block` ডেভেলপমেন্ট এর উপর ভিত্তি করে দ্রুত স্ট্যান্ডার্ড, পৃষ্ঠাসমূহ তৈরি করুন।',
17 | 'app.development.documentation': 'ডডেভেলপমেন্ট ডকুমেন্ট',
18 | ...globalHeader,
19 | ...menu,
20 | ...settingDrawer,
21 | ...settings,
22 | ...pwa,
23 | ...component,
24 | ...pages,
25 | };
26 |
--------------------------------------------------------------------------------
/src/components/HeaderDropdown/index.tsx:
--------------------------------------------------------------------------------
1 | import { Dropdown } from 'antd';
2 | import type { DropDownProps } from 'antd/es/dropdown';
3 | import React from 'react';
4 | import { createStyles } from 'antd-style';
5 | import classNames from 'classnames';
6 |
7 | const useStyles = createStyles(({ token }) => {
8 | return {
9 | dropdown: {
10 | [`@media screen and (max-width: ${token.screenXS}px)`]: {
11 | width: '100%',
12 | },
13 | },
14 | };
15 | });
16 |
17 | export type HeaderDropdownProps = {
18 | overlayClassName?: string;
19 | placement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight' | 'bottomCenter';
20 | } & Omit;
21 |
22 | const HeaderDropdown: React.FC = ({ overlayClassName: cls, ...restProps }) => {
23 | const { styles } = useStyles();
24 | return ;
25 | };
26 |
27 | export default HeaderDropdown;
28 |
--------------------------------------------------------------------------------
/src/pages/Account/Settings/service.ts:
--------------------------------------------------------------------------------
1 | import TWT from '@/setting';
2 | import {request} from '@umijs/max'
3 |
4 | // 请求的控制器名称
5 | const controller = `/system`;
6 |
7 | // 更新用户头像API
8 | export const updateAvatar = `${TWT.action}system/user/profile/avatar`;
9 |
10 | /**
11 | * 查询用户个人信息
12 | * @returns
13 | */
14 | export function getUserProfile() {
15 | return request(`${controller}/user/profile`, {
16 | method: 'get'
17 | })
18 | }
19 |
20 | /**
21 | * 修改用户个人信息
22 | * @param data 修改内容
23 | * @returns
24 | */
25 | export function updateUserProfile(params: Record) {
26 | return request(`${controller}/user/profile`, {
27 | method: 'put',
28 | data: {
29 | ...params
30 | }
31 | })
32 | }
33 |
34 | /**
35 | * 用户密码重置
36 | * @param data 账号密码
37 | * @returns
38 | */
39 | export function updateUserPwd(params: Record) {
40 | return request(`${controller}/user/profile/updatePwd`, {
41 | method: 'put',
42 | data: {
43 | ...params
44 | }
45 | })
46 | }
47 |
--------------------------------------------------------------------------------
/src/pages/AI/Chat/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace AIChat {
2 | /**
3 | * 聊天消息配置
4 | */
5 | type ChatOptionsType = {
6 | // 使用的知识库
7 | knowledgeId?: number;
8 | // 聊天类型
9 | chatType: 'TEXT' | 'IMAGES';
10 | // 是否关联上下文
11 | carryContextFlag: boolean;
12 | // 是否开启联网
13 | internetFlag: boolean;
14 | // 是否自动语音播报
15 | voicePlayFlag: boolean;
16 | };
17 |
18 | /**
19 | * 知识库数据
20 | */
21 | type KnowledgeDataType = {
22 | [key: number]: {
23 | chatDataList: {
24 | // 消息唯一ID
25 | msgId?: string;
26 | // 消息归属
27 | role: string;
28 | // 消息内容
29 | content?: string;
30 | // 发送时间
31 | sendTime?: string;
32 | // 是否处理完成
33 | okFlag: boolean;
34 | // 是否正在进行语音播报 wait: 等等执行播放,transition: 转换语音中,playing: 播放中
35 | voicePlay: 'wait' | 'transition' | 'playing';
36 | }[];
37 | };
38 | };
39 | }
40 |
--------------------------------------------------------------------------------
/src/pages/Log/Operation/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 | import {download} from '@/utils/twelvet'
3 |
4 | // 请求的控制器名称
5 | const controller = "/system/operationLog";
6 |
7 | /**
8 | * 获取字典信息
9 | * @param params 搜索参数
10 | */
11 | export async function getDictionariesType() {
12 | return request(`/system/dictionaries/data/type/sys_oper_type`, {
13 | method: 'GET'
14 | });
15 | }
16 |
17 | /**
18 | * 获取分页 Data
19 | * @param params 搜索参数
20 | */
21 | export async function pageQuery(params: Record) {
22 | return request(`${controller}/pageQuery`, {
23 | method: 'GET',
24 | params: {
25 | ...params
26 | },
27 | });
28 | }
29 |
30 | /**
31 | * 删除数据
32 | * @param params 删除id [1,2,3]
33 | */
34 | export async function remove(infoIds: string) {
35 | return request(`${controller}/${infoIds}`, {
36 | method: 'DELETE',
37 | });
38 | }
39 |
40 | /**
41 | * 导出Excel
42 | * @param params
43 | */
44 | export async function exportExcel(params?: Record) {
45 | return download(`${controller}/export`, params);
46 | }
47 |
--------------------------------------------------------------------------------
/src/pages/Log/Job/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 | import {download} from '@/utils/twelvet'
3 |
4 | // 请求的控制器名称
5 | const controller = "/job/log";
6 |
7 | /**
8 | * 获取分页 Data
9 | * @param params 搜索参数
10 | */
11 | export async function pageQuery(params: Record) {
12 | return request(`${controller}/pageQuery`, {
13 | method: 'GET',
14 | params: {
15 | ...params
16 | },
17 | });
18 | }
19 |
20 | /**
21 | * 删除数据
22 | * @param jobLogIds
23 | */
24 | export async function remove(jobLogIds: string) {
25 | return request(`${controller}/${jobLogIds}`, {
26 | method: 'DELETE',
27 | });
28 | }
29 |
30 | /**
31 | * 导出Excel
32 | * @param params
33 | */
34 | export async function exportExcel(params?: Record) {
35 | return download(`${controller}/export`, params);
36 | }
37 |
38 | /**
39 | * 更改状态
40 | * @param params
41 | */
42 | export async function changeStatus(params?: Record) {
43 | return request(`${controller}/changeStatus`, {
44 | method: 'PUT',
45 | data: {
46 | ...params
47 | }
48 | })
49 | }
50 |
--------------------------------------------------------------------------------
/src/pages/Human/Staff/components/dpetSearch/Index.tsx:
--------------------------------------------------------------------------------
1 | import React, {useState, useEffect} from 'react'
2 | import {TreeSelect} from 'antd'
3 | import {treeSelect} from '../../service'
4 | import {system} from '@/utils/twelvet'
5 |
6 | const DeptSearch: React.FC = props => {
7 |
8 | // 部门数据
9 | const [depts, setDepts] = useState[]>([{}])
10 |
11 | const makeDept = async () => {
12 | try {
13 | const {data} = await treeSelect()
14 |
15 | setDepts(data)
16 |
17 | } catch (e) {
18 | system.error(e)
19 | }
20 | }
21 |
22 | useEffect(() => {
23 | makeDept()
24 | }, [])
25 |
26 | return (
27 | <>
28 |
39 | >
40 | )
41 | }
42 |
43 | export default DeptSearch
44 |
--------------------------------------------------------------------------------
/src/pages/Tool/Code/Gen/components/EditCode/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 |
3 | // 请求的控制器名称
4 | const controller = "/gen";
5 |
6 | /**
7 | * 获取数据信息
8 | * @param tableId 搜索参数
9 | */
10 | export async function getInfo(tableId: number) {
11 | return request(`${controller}/${tableId}`, {
12 | method: 'GET',
13 | });
14 | }
15 |
16 | /**
17 | * 获取所有菜单
18 | * @returns
19 | */
20 | export async function getMenus() {
21 | return request(`/system/menu/list`, {
22 | method: 'GET',
23 | });
24 | }
25 |
26 | /**
27 | * 获取字典数据
28 | * @returns
29 | */
30 | export async function getOptionSelect() {
31 | return request(`/system/dictionaries/type/optionSelect`, {
32 | method: 'GET',
33 | });
34 | }
35 |
36 | /**
37 | * 获取字典数据
38 | * @returns
39 | */
40 | export async function selectGenGroupAll() {
41 | return request(`${controller}/selectGenGroupAll`, {
42 | method: 'GET',
43 | });
44 | }
45 |
46 | /**
47 | * 保存数据
48 | * @returns
49 | */
50 | export async function putGen(params: {}) {
51 | return request(`${controller}`, {
52 | method: 'PUT',
53 | data: params
54 | });
55 | }
56 |
--------------------------------------------------------------------------------
/src/global.less:
--------------------------------------------------------------------------------
1 | html,
2 | body,
3 | #root {
4 | height: 100%;
5 | margin: 0;
6 | padding: 0;
7 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
8 | 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
9 | 'Noto Color Emoji';
10 | }
11 |
12 | .colorWeak {
13 | filter: invert(80%);
14 | }
15 |
16 | .ant-layout {
17 | min-height: 100vh;
18 | }
19 |
20 | .ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
21 | left: unset;
22 | }
23 |
24 | canvas {
25 | display: block;
26 | }
27 |
28 | body {
29 | text-rendering: optimizeLegibility;
30 | -webkit-font-smoothing: antialiased;
31 | -moz-osx-font-smoothing: grayscale;
32 | }
33 |
34 | ul,
35 | ol {
36 | list-style: none;
37 | }
38 |
39 | @media (max-width: 768px) {
40 | .ant-table {
41 | width: 100%;
42 | overflow-x: auto;
43 |
44 | &-thead > tr,
45 | &-tbody > tr {
46 | > th,
47 | > td {
48 | white-space: pre;
49 |
50 | > span {
51 | display: block;
52 | }
53 | }
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/locales/zh-CN/settingDrawer.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.setting.pagestyle': '整体风格设置',
3 | 'app.setting.pagestyle.dark': '暗色菜单风格',
4 | 'app.setting.pagestyle.light': '亮色菜单风格',
5 | 'app.setting.content-width': '内容区域宽度',
6 | 'app.setting.content-width.fixed': '定宽',
7 | 'app.setting.content-width.fluid': '流式',
8 | 'app.setting.themecolor': '主题色',
9 | 'app.setting.themecolor.dust': '薄暮',
10 | 'app.setting.themecolor.volcano': '火山',
11 | 'app.setting.themecolor.sunset': '日暮',
12 | 'app.setting.themecolor.cyan': '明青',
13 | 'app.setting.themecolor.green': '极光绿',
14 | 'app.setting.themecolor.daybreak': '拂晓蓝(默认)',
15 | 'app.setting.themecolor.geekblue': '极客蓝',
16 | 'app.setting.themecolor.purple': '酱紫',
17 | 'app.setting.navigationmode': '导航模式',
18 | 'app.setting.sidemenu': '侧边菜单布局',
19 | 'app.setting.topmenu': '顶部菜单布局',
20 | 'app.setting.fixedheader': '固定 Header',
21 | 'app.setting.fixedsidebar': '固定侧边菜单',
22 | 'app.setting.fixedsidebar.hint': '侧边菜单布局时可配置',
23 | 'app.setting.hideheader': '下滑时隐藏 Header',
24 | 'app.setting.hideheader.hint': '固定 Header 时可配置',
25 | 'app.setting.othersettings': '其他设置',
26 | 'app.setting.weakmode': '色弱模式',
27 | 'app.setting.copy': '拷贝设置',
28 | 'app.setting.copyinfo': '拷贝成功,请到 config/defaultSettings.js 中替换默认配置',
29 | 'app.setting.production.hint':
30 | '配置栏只在开发环境用于预览,生产环境不会展现,请拷贝后手动修改配置文件',
31 | };
32 |
--------------------------------------------------------------------------------
/src/locales/zh-TW/settingDrawer.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.setting.pagestyle': '整體風格設置',
3 | 'app.setting.pagestyle.dark': '暗色菜單風格',
4 | 'app.setting.pagestyle.light': '亮色菜單風格',
5 | 'app.setting.content-width': '內容區域寬度',
6 | 'app.setting.content-width.fixed': '定寬',
7 | 'app.setting.content-width.fluid': '流式',
8 | 'app.setting.themecolor': '主題色',
9 | 'app.setting.themecolor.dust': '薄暮',
10 | 'app.setting.themecolor.volcano': '火山',
11 | 'app.setting.themecolor.sunset': '日暮',
12 | 'app.setting.themecolor.cyan': '明青',
13 | 'app.setting.themecolor.green': '極光綠',
14 | 'app.setting.themecolor.daybreak': '拂曉藍(默認)',
15 | 'app.setting.themecolor.geekblue': '極客藍',
16 | 'app.setting.themecolor.purple': '醬紫',
17 | 'app.setting.navigationmode': '導航模式',
18 | 'app.setting.sidemenu': '側邊菜單布局',
19 | 'app.setting.topmenu': '頂部菜單布局',
20 | 'app.setting.fixedheader': '固定 Header',
21 | 'app.setting.fixedsidebar': '固定側邊菜單',
22 | 'app.setting.fixedsidebar.hint': '側邊菜單布局時可配置',
23 | 'app.setting.hideheader': '下滑時隱藏 Header',
24 | 'app.setting.hideheader.hint': '固定 Header 時可配置',
25 | 'app.setting.othersettings': '其他設置',
26 | 'app.setting.weakmode': '色弱模式',
27 | 'app.setting.copy': '拷貝設置',
28 | 'app.setting.copyinfo': '拷貝成功,請到 config/defaultSettings.js 中替換默認配置',
29 | 'app.setting.production.hint':
30 | '配置欄只在開發環境用於預覽,生產環境不會展現,請拷貝後手動修改配置文件',
31 | };
32 |
--------------------------------------------------------------------------------
/src/locales/zh-TW.ts:
--------------------------------------------------------------------------------
1 | import component from './zh-TW/component';
2 | import globalHeader from './zh-TW/globalHeader';
3 | import menu from './zh-TW/menu';
4 | import pages from './zh-TW/pages';
5 | import pwa from './zh-TW/pwa';
6 | import settingDrawer from './zh-TW/settingDrawer';
7 | import settings from './zh-TW/settings';
8 |
9 | export default {
10 | 'navBar.lang': '語言',
11 | 'layout.user.link.help': '幫助',
12 | 'layout.user.link.privacy': '隱私',
13 | 'layout.user.link.terms': '條款',
14 | 'app.preview.down.block': '下載此頁面到本地項目',
15 |
16 | 'app.development.documentation': '開發文檔',
17 | 'system.check': '查看',
18 | 'system.add': '新增',
19 | 'system.update': '修改',
20 | 'system.delete': '刪除',
21 | 'system.delete.batch': '批量刪除',
22 | 'system.preview': '預覽',
23 | 'system.details': '詳細信息',
24 | 'system.sync': '同步',
25 | 'system.export': '導出數據',
26 | 'system.import': '導入數據',
27 | 'system.rest.password': '重置密碼',
28 | 'system.data.management': '數據管理',
29 | 'system.upload': '上傳文件',
30 | 'system.forceful.retreat': '強退',
31 | 'system.execute': '執行',
32 | 'system.log': '日誌',
33 | 'system.init.i18n': '初始化國際化數據',
34 |
35 | 'system.gen.code': '生成代碼',
36 | ...pages,
37 | ...globalHeader,
38 | ...menu,
39 | ...settingDrawer,
40 | ...settings,
41 | ...pwa,
42 | ...component,
43 | };
44 |
--------------------------------------------------------------------------------
/src/pages/Tool/Code/Gen/service.ts:
--------------------------------------------------------------------------------
1 | import { request } from '@umijs/max';
2 | import { download } from '@/utils/twelvet';
3 |
4 | // 请求的控制器名称
5 | const controller = '/gen';
6 |
7 | /**
8 | * 获取分页 Data
9 | * @param params 搜索参数
10 | */
11 | export async function pageQuery(params: Record) {
12 | return request(`${controller}/pageQuery`, {
13 | method: 'GET',
14 | params: {
15 | ...params,
16 | },
17 | });
18 | }
19 |
20 | /**
21 | * 删除表数据
22 | * @param tableIds
23 | */
24 | export async function remove(tableIds: (string | number)[]) {
25 | return request(`${controller}/${tableIds}`, {
26 | method: 'DELETE',
27 | });
28 | }
29 |
30 | /**
31 | * 同步表结构
32 | * @param tableId 表ID
33 | */
34 | export async function synchDb(tableId: number) {
35 | return request(`${controller}/synchDb/${tableId}`, {
36 | method: 'POST',
37 | });
38 | }
39 |
40 | /**
41 | * 生成代码
42 | * @param tableNames 表名称
43 | */
44 | export async function batchGenCode(tableids: number[]) {
45 | return download(`${controller}/batchGenCode?tableIds=${tableids}`);
46 | }
47 |
48 | /**
49 | * 查询数据源列表
50 | * @param query 查询参数
51 | */
52 | export function listConf(query: { [key: string]: any }) {
53 | return request(`/gen/dsConf/listQuery`, {
54 | method: `get`,
55 | params: query,
56 | });
57 | }
58 |
--------------------------------------------------------------------------------
/config/proxy.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * @name 代理的配置
3 | * @see 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
4 | * -------------------------------
5 | * The agent cannot take effect in the production environment
6 | * so there is no configuration of the production environment
7 | * For details, please see
8 | * https://pro.ant.design/docs/deploy
9 | *
10 | * @doc https://umijs.org/docs/guides/proxy
11 | */
12 | export default {
13 | dev: {
14 | // localhost:8000/api/** -> https://preview.pro.ant.design/api/**
15 | '/api/': {
16 | // 要代理的地址
17 | //target: 'http://cloud.twelvet.cn/api',
18 | target: 'http://localhost:8080',
19 | // 配置了这个可以从 http 代理到 https
20 | // 依赖 origin 的功能可能需要这个,比如 cookie
21 | changeOrigin: true,
22 | pathRewrite: {
23 | '^/api': '',
24 | },
25 | },
26 | },
27 | /**
28 | * @name 详细的代理配置
29 | * @doc https://github.com/chimurai/http-proxy-middleware
30 | */
31 | test: {
32 | '/api/': {
33 | target: 'https://proapi.azurewebsites.net',
34 | changeOrigin: true,
35 | pathRewrite: {'^': ''},
36 | },
37 | },
38 | pre: {
39 | '/api/': {
40 | target: 'your pre url',
41 | changeOrigin: true,
42 | pathRewrite: {'^': ''},
43 | },
44 | },
45 | };
46 |
--------------------------------------------------------------------------------
/src/pages/Human/Dept/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 |
3 | // 请求的控制器名称
4 | const controller = "/system/dept";
5 |
6 | /**
7 | * 新增部门
8 | * @param params 搜索参数
9 | */
10 | export async function insert(params: Record) {
11 | return request(`${controller}`, {
12 | method: 'POST',
13 | data: {
14 | ...params
15 | },
16 | });
17 | }
18 |
19 | /**
20 | * 删除部门
21 | * @param menuId 部门ID
22 | */
23 | export async function remove(menuId: number) {
24 | return request(`${controller}/${menuId}`, {
25 | method: 'DELETE',
26 | });
27 | }
28 |
29 | /**
30 | * 修改部门
31 | * @param params 搜索参数
32 | */
33 | export async function update(params: Record) {
34 | return request(`${controller}`, {
35 | method: 'PUT',
36 | data: {
37 | ...params
38 | },
39 | });
40 | }
41 |
42 | /**
43 | * 获取部门List Data
44 | * @param params 搜索参数
45 | */
46 | export async function list(params: Record) {
47 | return request(`${controller}/list`, {
48 | method: 'GET',
49 | params: {
50 | ...params
51 | },
52 | });
53 | }
54 |
55 | /**
56 | * 根据部门ID获取信息
57 | * @param menuId 部门ID
58 | */
59 | export async function getInfo(menuId: number) {
60 | return request(`${controller}/${menuId}`, {
61 | method: 'GET',
62 | });
63 | }
64 |
--------------------------------------------------------------------------------
/src/pages/System/Menu/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 |
3 | // 请求的控制器名称
4 | const controller = "/system/menu";
5 |
6 | /**
7 | * 新增菜单
8 | * @param params 搜索参数
9 | */
10 | export async function insert(params: Record) {
11 | return request(`${controller}`, {
12 | method: 'POST',
13 | data: {
14 | ...params
15 | },
16 | });
17 | }
18 |
19 | /**
20 | * 删除菜单
21 | * @param menuId 菜单ID
22 | */
23 | export async function remove(menuId: number) {
24 | return request(`${controller}/${menuId}`, {
25 | method: 'DELETE',
26 | });
27 | }
28 |
29 | /**
30 | * 修改菜单
31 | * @param params 搜索参数
32 | */
33 | export async function update(params: Record) {
34 | return request(`${controller}`, {
35 | method: 'PUT',
36 | data: {
37 | ...params
38 | },
39 | });
40 | }
41 |
42 | /**
43 | * 获取菜单List Data
44 | * @param params 搜索参数
45 | */
46 | export async function list(params: Record) {
47 | return request(`${controller}/list`, {
48 | method: 'GET',
49 | params: {
50 | ...params
51 | },
52 | });
53 | }
54 |
55 | /**
56 | * 根据菜单ID获取信息
57 | * @param menuId 菜单ID
58 | */
59 | export async function getInfo(menuId: number) {
60 | return request(`${controller}/${menuId}`, {
61 | method: 'GET',
62 | });
63 | }
64 |
--------------------------------------------------------------------------------
/src/components/Footer/index.tsx:
--------------------------------------------------------------------------------
1 | import { GithubOutlined } from '@ant-design/icons';
2 | import { DefaultFooter } from '@ant-design/pro-components';
3 | import React from 'react';
4 | import { useIntl } from '@umijs/max';
5 |
6 | const Footer: React.FC = () => {
7 | const currentYear = new Date().getFullYear();
8 |
9 | return (
10 | ,
25 | href: 'https://github.com/twelvet-projects/twelvet',
26 | blankTarget: true,
27 | },
28 | {
29 | key: useIntl().formatMessage({ id: 'app.development.documentation' }),
30 | title: useIntl().formatMessage({ id: 'app.development.documentation' }),
31 | href: 'https://doc.twelvet.cn/',
32 | blankTarget: true,
33 | },
34 | ]}
35 | />
36 | );
37 | };
38 |
39 | export default Footer;
40 |
--------------------------------------------------------------------------------
/src/pages/System/Client/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 |
3 | // 请求的控制器名称
4 | const controller = "/system/client";
5 |
6 | /**
7 | * 新增终端
8 | * @param params 搜索参数
9 | */
10 | export async function insert(params: Record) {
11 | return request(`${controller}`, {
12 | method: 'POST',
13 | data: {
14 | ...params
15 | },
16 | });
17 | }
18 |
19 | /**
20 | * 删除
21 | * @param clinets
22 | */
23 | export async function remove(clinets: (string | number)[] | string) {
24 | return request(`${controller}/${clinets}`, {
25 | method: 'DELETE',
26 | });
27 | }
28 |
29 | /**
30 | * 修改菜单
31 | * @param params 搜索参数
32 | */
33 | export async function update(params: Record) {
34 | return request(`${controller}`, {
35 | method: 'PUT',
36 | data: {
37 | ...params
38 | },
39 | });
40 | }
41 |
42 | /**
43 | * 获取分页 Data
44 | * @param params 搜索参数
45 | */
46 | export async function pageQuery(params: Record) {
47 | return request(`${controller}/pageQuery`, {
48 | method: 'GET',
49 | params: {
50 | ...params
51 | },
52 | });
53 | }
54 |
55 | /**
56 | * 获取指定终端信息
57 | * @param clinet
58 | */
59 | export async function getByClientId(clinet: number) {
60 | return request(`${controller}/${clinet}`, {
61 | method: 'GET'
62 | });
63 | }
64 |
--------------------------------------------------------------------------------
/src/locales/ja-JP/settingDrawer.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.setting.pagestyle': 'ページスタイル設定',
3 | 'app.setting.pagestyle.dark': 'ダークスタイル',
4 | 'app.setting.pagestyle.light': 'ライトスタイル',
5 | 'app.setting.content-width': 'コンテンツの幅',
6 | 'app.setting.content-width.fixed': '固定',
7 | 'app.setting.content-width.fluid': '流体',
8 | 'app.setting.themecolor': 'テーマカラー',
9 | 'app.setting.themecolor.dust': 'ダストレッド',
10 | 'app.setting.themecolor.volcano': 'ボルケ-ノ',
11 | 'app.setting.themecolor.sunset': 'サンセットオレンジ',
12 | 'app.setting.themecolor.cyan': 'シアン',
13 | 'app.setting.themecolor.green': 'ポーラーグリーン',
14 | 'app.setting.themecolor.daybreak': '夜明けの青(デフォルト)',
15 | 'app.setting.themecolor.geekblue': 'ギーク ブルー',
16 | 'app.setting.themecolor.purple': 'ゴールデンパープル',
17 | 'app.setting.navigationmode': 'ナビゲーションモード',
18 | 'app.setting.sidemenu': 'サイドメニューのレイアウト',
19 | 'app.setting.topmenu': 'トップメニューのレイアウト',
20 | 'app.setting.fixedheader': '固定ヘッダー',
21 | 'app.setting.fixedsidebar': '固定サイドバー',
22 | 'app.setting.fixedsidebar.hint': 'サイドメニューのレイアウトで動作します',
23 | 'app.setting.hideheader': 'スクロール時の非表示ヘッダー',
24 | 'app.setting.hideheader.hint': '非表示ヘッダーが有効になっている場合に機能します',
25 | 'app.setting.othersettings': 'その他の設定',
26 | 'app.setting.weakmode': 'ウィークモード',
27 | 'app.setting.copy': 'コピー設定',
28 | 'app.setting.copyinfo':
29 | 'コピーが成功しました。src/models/setting.jsのdefaultSettingsを置き換えてください',
30 | 'app.setting.production.hint': '設定パネルは開発環境でのみ表示されます。手動で変更してください',
31 | };
32 |
--------------------------------------------------------------------------------
/src/pages/System/Dictionaries/components/drawerInfo/components/selectType/Index.tsx:
--------------------------------------------------------------------------------
1 | import React, {useEffect, useState} from 'react'
2 | import {Select} from 'antd'
3 | import {optionSelect} from './service'
4 | import {system} from '@/utils/twelvet'
5 |
6 | /**
7 | * 字典模块数据管理类型选择器
8 | */
9 | const DrawerInfo: React.FC = (props) => {
10 |
11 | const {Option} = Select
12 |
13 | const [treeData, setTreeData] = useState([])
14 |
15 | const makeTree = async () => {
16 | try {
17 | const {data} = await optionSelect()
18 |
19 | // 制作数据
20 | const tree: React.ReactNode[] = []
21 | data.forEach((item: {
22 | dictId: number
23 | dictType: string
24 | dictName: string
25 | }) => {
26 | tree.push(
27 |
28 | )
29 | })
30 |
31 | setTreeData(tree)
32 |
33 | } catch (e) {
34 | system.error(e)
35 | }
36 | }
37 |
38 | useEffect(() => {
39 | makeTree()
40 | }, [])
41 |
42 | return (
43 |
51 | )
52 |
53 | }
54 |
55 | export default DrawerInfo
56 |
--------------------------------------------------------------------------------
/src/locales/ja-JP.ts:
--------------------------------------------------------------------------------
1 | import component from './ja-JP/component';
2 | import globalHeader from './ja-JP/globalHeader';
3 | import menu from './ja-JP/menu';
4 | import pages from './ja-JP/pages';
5 | import pwa from './ja-JP/pwa';
6 | import settingDrawer from './ja-JP/settingDrawer';
7 | import settings from './ja-JP/settings';
8 |
9 | export default {
10 | 'navBar.lang': '言語',
11 | 'layout.user.link.help': 'ヘルプ',
12 | 'layout.user.link.privacy': 'プライバシー',
13 | 'layout.user.link.terms': '利用規約',
14 | 'app.preview.down.block': 'このページをローカルプロジェクトにダウンロードしてください',
15 | 'app.welcome.link.fetch-blocks': '',
16 | 'app.welcome.link.block-list': '',
17 |
18 | 'app.development.documentation': '開発ドキュメント',
19 | 'system.check': 'チェック',
20 | 'system.add': '追加',
21 | 'system.update': '更新',
22 | 'system.delete': '削除',
23 | 'system.delete.batch': '一括削除',
24 | 'system.preview': 'プレビュー',
25 | 'system.details': '詳細',
26 | 'system.sync': '同期',
27 | 'system.export': 'データのエクスポート',
28 | 'system.import': 'データのインポート',
29 | 'system.rest.password': 'パスワードのリセット',
30 | 'system.data.management': 'データ管理',
31 | 'system.upload': 'ファイルのアップロード',
32 | 'system.forceful.retreat': '強制退去',
33 | 'system.execute': '実行',
34 | 'system.log': 'ログ#ログ#',
35 |
36 | 'system.gen.code': 'コード生成',
37 | ...globalHeader,
38 | ...menu,
39 | ...settingDrawer,
40 | ...settings,
41 | ...pwa,
42 | ...component,
43 | ...pages,
44 | };
45 |
--------------------------------------------------------------------------------
/src/locales/zh-CN.ts:
--------------------------------------------------------------------------------
1 | import component from './zh-CN/component';
2 | import globalHeader from './zh-CN/globalHeader';
3 | import menu from './zh-CN/menu';
4 | import pages from './zh-CN/pages';
5 | import pwa from './zh-CN/pwa';
6 | import settingDrawer from './zh-CN/settingDrawer';
7 | import settings from './zh-CN/settings';
8 |
9 | export default {
10 | 'navBar.lang': '语言',
11 | 'layout.user.link.help': '帮助',
12 | 'layout.user.link.privacy': '隐私',
13 | 'layout.user.link.terms': '条款',
14 | 'app.preview.down.block': '下载此页面到本地项目',
15 | 'app.welcome.link.fetch-blocks': '获取全部区块',
16 | 'app.welcome.link.block-list': '基于 block 开发,快速构建标准页面',
17 |
18 | 'app.development.documentation': '开发文档',
19 | 'system.check': '查看',
20 | 'system.add': '新增',
21 | 'system.update': '修改',
22 | 'system.delete': '删除',
23 | 'system.delete.batch': '批量删除',
24 | 'system.preview': '预览',
25 | 'system.details': '详情',
26 | 'system.sync': '同步',
27 | 'system.export': '导出数据',
28 | 'system.import': '导入数据',
29 | 'system.rest.password': '重置密码',
30 | 'system.data.management': '数据管理',
31 | 'system.upload': '上传文件',
32 | 'system.forceful.retreat': '强退',
33 | 'system.execute': '执行',
34 | 'system.log': '日志',
35 | 'system.init.i18n': '初始化国际化数据',
36 |
37 | 'system.gen.code': '生成代码',
38 | ...pages,
39 | ...globalHeader,
40 | ...menu,
41 | ...settingDrawer,
42 | ...settings,
43 | ...pwa,
44 | ...component,
45 | };
46 |
--------------------------------------------------------------------------------
/src/pages/Login/componets/oauth2/github/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { GithubOutlined } from '@ant-design/icons';
3 | import { createStyles } from 'antd-style';
4 | import { getAuthorize } from '@/pages/Login/componets/oauth2/service';
5 | import { message } from 'antd';
6 |
7 | const useStyles = createStyles(({ token }) => {
8 | return {
9 | action: {
10 | marginLeft: '8px',
11 | color: 'rgba(0, 0, 0, 0.2)',
12 | fontSize: '24px',
13 | verticalAlign: 'middle',
14 | cursor: 'pointer',
15 | transition: 'color 0.3s',
16 | '&:hover': {
17 | color: token.colorPrimaryActive,
18 | },
19 | },
20 | };
21 | });
22 |
23 | const OAuth2LoginGitHub: React.FC = () => {
24 | const { styles } = useStyles();
25 |
26 | /**
27 | * 获取授权登录地址
28 | */
29 | const doGetGitHubAuthorize = async () => {
30 | const { code, msg, data } = await getAuthorize('github');
31 | if (code !== 200) {
32 | message.error(msg);
33 | return;
34 | }
35 | // 跳转进行登录
36 | window.location.href = data;
37 | };
38 |
39 | return (
40 |
46 | );
47 | };
48 |
49 | export default OAuth2LoginGitHub;
50 |
--------------------------------------------------------------------------------
/src/pages/Tool/Code/Gen/components/EditCode/TemplateGroupSearch/index.tsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from 'react'
2 | import { Select } from 'antd'
3 | import { selectGenGroupAll } from '../service'
4 | import { system } from '@/utils/twelvet'
5 |
6 | const TemplateGroupSearch: React.FC<{
7 | onChange?: (value: any, option: any | any[]) => void
8 | }> = props => {
9 |
10 | const [treeData, setTreeData] = useState([])
11 |
12 | const { Option } = Select
13 |
14 | const makeDsConf = async () => {
15 | try {
16 | const { data } = await selectGenGroupAll()
17 |
18 | // 制作数据
19 | const tree: any = []
20 |
21 | data.map((item: {
22 | id: number
23 | groupName: string
24 | }) => {
25 | tree.push(
26 |
27 | )
28 | return false
29 | })
30 |
31 | setTreeData(tree)
32 |
33 | } catch (e) {
34 | system.error(e)
35 | }
36 | }
37 |
38 | useEffect(() => {
39 | makeDsConf()
40 | }, [])
41 |
42 | return (
43 |
51 | )
52 | }
53 |
54 | export default TemplateGroupSearch
55 |
--------------------------------------------------------------------------------
/src/pages/Tool/Code/DsConf/service.ts:
--------------------------------------------------------------------------------
1 | import { request } from '@umijs/max';
2 | import { download } from '@/utils/twelvet';
3 |
4 | // 请求的控制器名称
5 | const controller = '/gen/dsConf';
6 |
7 | /**
8 | * 查询数据源列表
9 | * @param query 查询参数
10 | */
11 | export function pageQueryConf(query: { [key: string]: any }) {
12 | return request(`${controller}/pageQuery`, {
13 | method: `get`,
14 | params: query,
15 | });
16 | }
17 |
18 | /**
19 | * 查询数据源详细
20 | * @param 主键
21 | */
22 | export function getConf(id: string | number) {
23 | return request(`${controller}/${id}`, {
24 | method: `get`,
25 | });
26 | }
27 |
28 | /**
29 | * 新增数据源
30 | * @param data 数据参数
31 | */
32 | export function addConf(data: { [key: string]: any }) {
33 | return request(`${controller}`, {
34 | method: `post`,
35 | data: data,
36 | });
37 | }
38 |
39 | /**
40 | * 修改数据源
41 | * @param data 数据参数
42 | */
43 | export function updateConf(data: { [key: string]: any }) {
44 | return request(`${controller}`, {
45 | method: `put`,
46 | data: data,
47 | });
48 | }
49 |
50 | /**
51 | * 删除数据源
52 | * @param 主键
53 | */
54 | export function delConf(id: string | number) {
55 | return request(`${controller}/${id}`, {
56 | method: `delete`,
57 | });
58 | }
59 |
60 | /**
61 | * 导出数据
62 | * @param params
63 | */
64 | export async function exportConf(params?: { [key: string]: any }) {
65 | return download(`${controller}/export`, params);
66 | }
67 |
--------------------------------------------------------------------------------
/src/pages/Tool/Code/Metadata/Type/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 | import {download} from '@/utils/twelvet'
3 |
4 | // 请求的控制器名称
5 | const controller = "/gen/type";
6 |
7 | /**
8 | * 查询字段类型管理列表
9 | * @param query 查询参数
10 | */
11 | export function pageQueryType(query: { [key: string]: any }) {
12 | return request(`${controller}/pageQuery`, {
13 | method: `get`,
14 | params: query
15 | })
16 | }
17 |
18 | /**
19 | * 查询字段类型管理详细
20 | * @param 主键
21 | */
22 | export function getType(id: string | number) {
23 | return request(`${controller}/${id}`, {
24 | method: `get`
25 | })
26 | }
27 |
28 | /**
29 | * 新增字段类型管理
30 | * @param data 数据参数
31 | */
32 | export function addType(data: { [key: string]: any }) {
33 | return request(`${controller}`, {
34 | method: `post`,
35 | data: data
36 | })
37 | }
38 |
39 | /**
40 | * 修改字段类型管理
41 | * @param data 数据参数
42 | */
43 | export function updateType(data: { [key: string]: any }) {
44 | return request(`${controller}`, {
45 | method: `put`,
46 | data: data
47 | })
48 | }
49 |
50 | /**
51 | * 删除字段类型管理
52 | * @param 主键
53 | */
54 | export function delType(id: string | number) {
55 | return request(`${controller}/${id}`, {
56 | method: `delete`
57 | })
58 | }
59 |
60 | /**
61 | * 导出数据
62 | * @param params
63 | */
64 | export async function exportType(params?: { [key: string]: any }) {
65 | return download(`${controller}/export`, params);
66 | }
67 |
--------------------------------------------------------------------------------
/src/pages/AI/Mcp/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 | import {download} from '@/utils/twelvet'
3 |
4 | // 请求的控制器名称
5 | const controller = "/ai/mcp";
6 |
7 | /**
8 | * 查询AI MCP服务列表
9 | * @param query 查询参数
10 | */
11 | export async function pageQueryMcp(query: { [key: string]: any }) {
12 | return request(`${controller}/pageQuery`, {
13 | method: `get`,
14 | params: query
15 | })
16 | }
17 |
18 | /**
19 | * 查询AI MCP服务详细
20 | * @param mcpId
21 | */
22 | export async function getMcp(mcpId: string | number) {
23 | return request(`${controller}/${mcpId}`, {
24 | method: `get`
25 | })
26 | }
27 |
28 | /**
29 | * 新增AI MCP服务
30 | * @param data 数据参数
31 | */
32 | export async function addMcp(data: { [key: string]: any }) {
33 | return request(`${controller}`, {
34 | method: `post`,
35 | data: data
36 | })
37 | }
38 |
39 | /**
40 | * 修改AI MCP服务
41 | * @param data 数据参数
42 | */
43 | export async function updateMcp(data: { [key: string]: any }) {
44 | return request(`${controller}`, {
45 | method: `put`,
46 | data: data
47 | })
48 | }
49 |
50 | /**
51 | * 删除AI MCP服务
52 | * @param 主键
53 | */
54 | export async function delMcp(mcpId: string | number) {
55 | return request(`${controller}/${mcpId}`, {
56 | method: `delete`
57 | })
58 | }
59 |
60 | /**
61 | * 导出数据
62 | * @param params
63 | */
64 | export async function exportMcp(params?: { [key: string]: any }) {
65 | return download(`${controller}/export`, params);
66 | }
67 |
--------------------------------------------------------------------------------
/src/pages/Human/Role/components/Switch.tsx:
--------------------------------------------------------------------------------
1 | import React, {useEffect, useState} from 'react'
2 | import {message, Switch} from 'antd'
3 | import {system} from '@/utils/twelvet'
4 | import {changeStatus} from './../service'
5 |
6 | /**
7 | * 状态组件操作
8 | * @param props row 参数
9 | */
10 | const RoleSwitch: React.FC<{
11 | row: Record
12 | }> = (props) => {
13 |
14 | const [loading, setLoading] = useState(false)
15 | const [checked, setChecked] = useState(props.row.status)
16 |
17 | useEffect(() => {
18 | setChecked(props.row.status)
19 | }, [props.row.status])
20 |
21 | const toggle = async () => {
22 | try {
23 | setLoading(true);
24 | const params: { roleId: number, status: string } = {roleId: 0, status: "0"}
25 | params.roleId = props.row.roleId;
26 | params.status = checked === '1' ? '0' : '1'
27 | const {msg} = await changeStatus(params);
28 |
29 | if (checked === '1') {
30 | setChecked('0')
31 | } else {
32 | setChecked('1')
33 | }
34 |
35 | message.success(msg);
36 | } catch (e) {
37 | system.log(e)
38 | } finally {
39 | setLoading(false);
40 | }
41 | };
42 |
43 | return (
44 |
49 | )
50 | }
51 |
52 | export default RoleSwitch
53 |
--------------------------------------------------------------------------------
/src/pages/Tool/Code/Metadata/Template/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 | import {download} from '@/utils/twelvet'
3 |
4 | // 请求的控制器名称
5 | const controller = "/gen/template";
6 |
7 | /**
8 | * 查询代码生成业务模板列表
9 | * @param query 查询参数
10 | */
11 | export function pageQueryTemplate(query: { [key: string]: any }) {
12 | return request(`${controller}/pageQuery`, {
13 | method: `get`,
14 | params: query
15 | })
16 | }
17 |
18 | /**
19 | * 查询代码生成业务模板详细
20 | * @param 主键
21 | */
22 | export function getTemplate(id: string | number) {
23 | return request(`${controller}/${id}`, {
24 | method: `get`
25 | })
26 | }
27 |
28 | /**
29 | * 新增代码生成业务模板
30 | * @param data 数据参数
31 | */
32 | export function addTemplate(data: { [key: string]: any }) {
33 | return request(`${controller}`, {
34 | method: `post`,
35 | data: data
36 | })
37 | }
38 |
39 | /**
40 | * 修改代码生成业务模板
41 | * @param data 数据参数
42 | */
43 | export function updateTemplate(data: { [key: string]: any }) {
44 | return request(`${controller}`, {
45 | method: `put`,
46 | data: data
47 | })
48 | }
49 |
50 | /**
51 | * 删除代码生成业务模板
52 | * @param 主键
53 | */
54 | export function delTemplate(id: string | number) {
55 | return request(`${controller}/${id}`, {
56 | method: `delete`
57 | })
58 | }
59 |
60 | /**
61 | * 导出数据
62 | * @param params
63 | */
64 | export async function exportTemplate(params?: { [key: string]: any }) {
65 | return download(`${controller}/export`, params);
66 | }
67 |
--------------------------------------------------------------------------------
/src/components/TwelveT/Dictionaries/DictionariesCheckbox/index.tsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from 'react'
2 | import { Checkbox } from 'antd'
3 | import { getDictionariesType } from './service'
4 | import { system } from '@/utils/twelvet'
5 | import { CheckboxValueType } from 'antd/es/checkbox/Group'
6 |
7 | /**
8 | * 字典模块数据管理类型选择器
9 | */
10 | const DictionariesCheckbox: React.FC<{
11 | type: string
12 | onChange?: (checkedValue: Array) => void
13 | }> = (props) => {
14 |
15 | const [treeData, setTreeData] = useState([])
16 |
17 | const { type } = props
18 |
19 | const makeTree = async () => {
20 | try {
21 | const { data } = await getDictionariesType(type)
22 |
23 | // 制作数据
24 | const tree: any = []
25 | data.map((item: {
26 | dictCode: number
27 | dictValue: string
28 | dictLabel: string
29 | }) => {
30 | tree.push(
31 | { label: item.dictLabel, value: item.dictValue }
32 | )
33 | return false
34 | })
35 |
36 | setTreeData(tree)
37 |
38 | } catch (e) {
39 | system.error(e)
40 | }
41 | }
42 |
43 | useEffect(() => {
44 | makeTree()
45 | }, [])
46 |
47 | return (
48 |
52 | )
53 |
54 | }
55 |
56 | export default DictionariesCheckbox
57 |
--------------------------------------------------------------------------------
/src/pages/Tool/Code/Metadata/TemplateGroup/TemplateSearch/index.tsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from 'react'
2 | import { Select } from 'antd'
3 | import { listQueryTemplate } from '../service'
4 | import { system } from '@/utils/twelvet'
5 |
6 | const TemplateSearch: React.FC<{
7 | onChange?: (value: any, option: any | any[]) => void
8 | }> = props => {
9 |
10 | const [treeData, setTreeData] = useState([])
11 |
12 | const { Option } = Select
13 |
14 | const makeDsConf = async () => {
15 | try {
16 | const { data } = await listQueryTemplate()
17 |
18 | // 制作数据
19 | const tree: any = []
20 |
21 | data.map((item: {
22 | id: number
23 | templateName: string
24 | }) => {
25 | tree.push(
26 |
27 | )
28 | return false
29 | })
30 |
31 | setTreeData(tree)
32 |
33 | } catch (e) {
34 | system.error(e)
35 | }
36 | }
37 |
38 | useEffect(() => {
39 | makeDsConf()
40 | }, [])
41 |
42 | return (
43 |
53 | )
54 | }
55 |
56 | export default TemplateSearch
57 |
--------------------------------------------------------------------------------
/src/setting.tsx:
--------------------------------------------------------------------------------
1 | const {NODE_ENV} = process.env;
2 |
3 | const isDev: boolean = NODE_ENV === 'development';
4 |
5 | const REQUEST_URI = isDev ? 'http://localhost:8080' : 'https://api.twelvet.cn'
6 | /**
7 | * proTable默认配置
8 | */
9 | export const proTableConfigs = {
10 | // 支持横向超出自适应
11 | scroll: {
12 | x: 'auto',
13 | },
14 | // 分页设置
15 | // pagination: {
16 | // // 是否允许每页大小更改
17 | // showSizeChanger: true,
18 | // // 每页显示条数
19 | // pageSize: 10,
20 | // },
21 | // 处理返回数据
22 | // postData: (data: any[]) => {
23 | // if (data instanceof Array) {
24 | // return data
25 | // }
26 | // const { records, total } = data
27 | // console.log(records)
28 | // return records
29 | // },
30 | // 展开子列表设置
31 | expandable: {
32 | // 展开列名称
33 | childrenColumnName: 'children',
34 | // 展开缩进px
35 | indentSize: 15,
36 | defaultExpandAllRows: false,
37 | },
38 | };
39 |
40 | const TWT: any = {
41 | // 请求API
42 | requestUri: REQUEST_URI,
43 | // OAuth2
44 | accessToken: 'TWT_access_token',
45 | refreshToken: 'TWT_refresh_token',
46 | // 权限cookie
47 | preAuthorize: 'TWT_pre_authorize',
48 | // 是否dev模式
49 | isDev,
50 | action: `${REQUEST_URI}/`,
51 | uploadUrl: `${REQUEST_URI}/dfs/commonUpload`,
52 | static: 'https://static.twelvet.cn',
53 | // 忽略无需登录的路径
54 | authIgnore: [
55 | '/login/oauth2/github',
56 | // TODO 调试使用,后续移除
57 | '/ai/flow'
58 | ]
59 | };
60 |
61 | export default TWT;
62 |
--------------------------------------------------------------------------------
/src/pages/Monitor/Job/components/jobStatusSwitch/index.tsx:
--------------------------------------------------------------------------------
1 | import React, {useEffect, useState} from 'react'
2 | import {message, Switch} from 'antd'
3 | import {system} from '@/utils/twelvet'
4 | import {changeStatus} from './../../service'
5 |
6 | /**
7 | * 状态组件操作
8 | * @param props row 参数
9 | */
10 | const JobStatus: React.FC<{
11 | row: Record
12 | }> = (props) => {
13 |
14 | const [loading, setLoading] = useState(false)
15 | const [checked, setChecked] = useState(props.row.status)
16 |
17 | useEffect(() => {
18 | setChecked(props.row.status)
19 | }, [props.row.status])
20 |
21 | const toggle = async () => {
22 | try {
23 | setLoading(true)
24 | const params: Record = {}
25 | params.jobId = props.row.jobId
26 | params.status = checked === '1' ? '0' : '1'
27 | const {code, msg} = await changeStatus(params)
28 |
29 | if (code !== 200) {
30 | return message.error(msg)
31 | }
32 |
33 | if (checked === '1') {
34 | setChecked('0')
35 | } else {
36 | setChecked('1')
37 | }
38 |
39 | return message.success(msg)
40 | } catch (e) {
41 | system.log(e)
42 | } finally {
43 | setLoading(false)
44 | }
45 | }
46 |
47 | return (
48 |
53 | )
54 | }
55 |
56 | export default JobStatus
57 |
--------------------------------------------------------------------------------
/src/pages/Tool/Code/Gen/components/DrawerInfo/DsConfSearch/index.tsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from 'react'
2 | import { Select } from 'antd'
3 | import { listConf } from '../../../service'
4 | import { system } from '@/utils/twelvet'
5 |
6 | const DsConfSearch: React.FC<{
7 | onChange?: (value: any, option: any | any[]) => void
8 | }> = props => {
9 |
10 | const [treeData, setTreeData] = useState([])
11 |
12 | const { Option } = Select
13 |
14 | const makeDsConf = async () => {
15 | try {
16 | const { data } = await listConf({})
17 |
18 | // 制作数据
19 | const tree: any = [
20 |
21 | ]
22 |
23 | data.map((item: {
24 | id: number
25 | name: string
26 | }) => {
27 | tree.push(
28 |
29 | )
30 | return false
31 | })
32 |
33 | setTreeData(tree)
34 |
35 | } catch (e) {
36 | system.error(e)
37 | }
38 | }
39 |
40 | useEffect(() => {
41 | makeDsConf()
42 | }, [])
43 |
44 | return (
45 |
55 | )
56 | }
57 |
58 | export default DsConfSearch
59 |
--------------------------------------------------------------------------------
/src/locales/fa-IR/settingDrawer.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.setting.pagestyle': 'تنظیم نوع صفحه',
3 | 'app.setting.pagestyle.dark': 'سبک تیره',
4 | 'app.setting.pagestyle.light': 'سبک سبک',
5 | 'app.setting.content-width': 'عرض محتوا',
6 | 'app.setting.content-width.fixed': 'ثابت',
7 | 'app.setting.content-width.fluid': 'شناور',
8 | 'app.setting.themecolor': 'رنگ تم',
9 | 'app.setting.themecolor.dust': 'گرد و غبار قرمز',
10 | 'app.setting.themecolor.volcano': 'آتشفشان',
11 | 'app.setting.themecolor.sunset': 'غروب نارنجی',
12 | 'app.setting.themecolor.cyan': 'فیروزه ای',
13 | 'app.setting.themecolor.green': 'سبز قطبی',
14 | 'app.setting.themecolor.daybreak': 'آبی روشن(پیشفرض)',
15 | 'app.setting.themecolor.geekblue': 'چسب گیک',
16 | 'app.setting.themecolor.purple': 'بنفش طلایی',
17 | 'app.setting.navigationmode': 'حالت پیمایش',
18 | 'app.setting.sidemenu': 'طرح منوی کناری',
19 | 'app.setting.topmenu': 'طرح منوی بالایی',
20 | 'app.setting.fixedheader': 'سرصفحه ثابت',
21 | 'app.setting.fixedsidebar': 'نوار کناری ثابت',
22 | 'app.setting.fixedsidebar.hint': 'کار بر روی منوی کناری',
23 | 'app.setting.hideheader': 'هدر پنهان هنگام پیمایش',
24 | 'app.setting.hideheader.hint': 'وقتی Hidden Header فعال باشد کار می کند',
25 | 'app.setting.othersettings': 'تنظیمات دیگر',
26 | 'app.setting.weakmode': 'حالت ضعیف',
27 | 'app.setting.copy': 'تنظیمات کپی',
28 | 'app.setting.copyinfo':
29 | 'موفقیت در کپی کردن , لطفا defaultSettings را در src / models / setting.js جایگزین کنید',
30 | 'app.setting.production.hint':
31 | 'صفحه تنظیم فقط در محیط توسعه نمایش داده می شود ، لطفاً دستی تغییر دهید',
32 | };
33 |
--------------------------------------------------------------------------------
/src/pages/AI/Model/staffStatusSwitch/Index.tsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from 'react';
2 | import { message, Switch } from 'antd';
3 | import { system } from '@/utils/twelvet';
4 | import { changeStatus } from '../service';
5 |
6 | /**
7 | * 状态组件操作
8 | * @param props row 参数
9 | */
10 | const StatusSwitch: React.FC<{
11 | row: Record;
12 | }> = (props) => {
13 | const [loading, setLoading] = useState(false);
14 | const [checked, setChecked] = useState(props.row.defaultFlag);
15 |
16 | useEffect(() => {
17 | setChecked(props.row.defaultFlag);
18 | }, [props.row.defaultFlag]);
19 |
20 | const toggle = async () => {
21 | try {
22 | setLoading(true);
23 | const params: { modelId: number; defaultFlag: boolean } = {
24 | modelId: 0,
25 | defaultFlag: false,
26 | };
27 | params.modelId = props.row.modelId;
28 | params.defaultFlag = !checked;
29 | const { code, msg } = await changeStatus(params);
30 |
31 | if (code !== 200) {
32 | return message.error(msg);
33 | }
34 |
35 | if (checked) {
36 | setChecked(false);
37 | } else {
38 | setChecked(true);
39 | }
40 |
41 | return message.success(msg);
42 | } catch (e) {
43 | system.log(e);
44 | } finally {
45 | setLoading(false);
46 | }
47 | };
48 |
49 | return ;
50 | };
51 |
52 | export default StatusSwitch;
53 |
--------------------------------------------------------------------------------
/src/pages/Human/Post/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 | import {download} from '@/utils/twelvet'
3 |
4 | // 请求的控制器名称
5 | const controller = "/system/post";
6 |
7 | /**
8 | * 新增岗位
9 | * @param params 搜索参数
10 | */
11 | export async function insert(params: Record) {
12 | return request(`${controller}`, {
13 | method: 'POST',
14 | data: {
15 | ...params
16 | },
17 | });
18 | }
19 |
20 | /**
21 | * 删除
22 | * @param postIds
23 | */
24 | export async function remove(postIds: (string | number)[] | string) {
25 | return request(`${controller}/${postIds}`, {
26 | method: 'DELETE',
27 | });
28 | }
29 |
30 | /**
31 | * 修改菜单
32 | * @param params 搜索参数
33 | */
34 | export async function update(params: Record) {
35 | return request(`${controller}`, {
36 | method: 'PUT',
37 | data: {
38 | ...params
39 | },
40 | });
41 | }
42 |
43 | /**
44 | * 获取分页 Data
45 | * @param params 搜索参数
46 | */
47 | export async function pageQuery(params: Record) {
48 | return request(`${controller}/pageQuery`, {
49 | method: 'GET',
50 | params: {
51 | ...params
52 | },
53 | });
54 | }
55 |
56 | /**
57 | * 获取指定岗位信息
58 | * @param postId
59 | */
60 | export async function getByPostId(postId: number) {
61 | return request(`${controller}/${postId}`, {
62 | method: 'GET'
63 | });
64 | }
65 |
66 | /**
67 | * 导出Excel
68 | * @param params
69 | */
70 | export async function exportExcel(params?: Record) {
71 | return download(`${controller}/export`, params);
72 | }
73 |
--------------------------------------------------------------------------------
/src/locales/bn-BD/settingDrawer.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.setting.pagestyle': 'পৃষ্ঠা স্টাইল সেটিং',
3 | 'app.setting.pagestyle.dark': 'ডার্ক স্টাইল',
4 | 'app.setting.pagestyle.light': 'লাইট স্টাইল',
5 | 'app.setting.content-width': 'সামগ্রীর প্রস্থ',
6 | 'app.setting.content-width.fixed': 'স্থির',
7 | 'app.setting.content-width.fluid': 'প্রবাহী',
8 | 'app.setting.themecolor': 'থিম রঙ',
9 | 'app.setting.themecolor.dust': 'ডাস্ট রেড',
10 | 'app.setting.themecolor.volcano': 'আগ্নেয়গিরি',
11 | 'app.setting.themecolor.sunset': 'সানসেট কমলা',
12 | 'app.setting.themecolor.cyan': 'সবুজাভ নীল',
13 | 'app.setting.themecolor.green': 'পোলার সবুজ',
14 | 'app.setting.themecolor.daybreak': 'দিবস ব্রেক ব্লু (ডিফল্ট)',
15 | 'app.setting.themecolor.geekblue': 'গিক আঠালো',
16 | 'app.setting.themecolor.purple': 'গোল্ডেন বেগুনি',
17 | 'app.setting.navigationmode': 'নেভিগেশন মোড',
18 | 'app.setting.sidemenu': 'সাইড মেনু লেআউট',
19 | 'app.setting.topmenu': 'টপ মেনু লেআউট',
20 | 'app.setting.fixedheader': 'স্থির হেডার',
21 | 'app.setting.fixedsidebar': 'স্থির সাইডবার',
22 | 'app.setting.fixedsidebar.hint': 'সাইড মেনু বিন্যাসে কাজ করে',
23 | 'app.setting.hideheader': 'স্ক্রোল করার সময় হেডার লুকানো',
24 | 'app.setting.hideheader.hint': 'লুকানো হেডার সক্ষম থাকলে কাজ করে',
25 | 'app.setting.othersettings': 'অন্যান্য সেটিংস্',
26 | 'app.setting.weakmode': 'দুর্বল মোড',
27 | 'app.setting.copy': 'সেটিং কপি করুন',
28 | 'app.setting.copyinfo': 'সাফল্যের অনুলিপি করুন - প্রতিস্থাপন করুন: src/models/setting.js',
29 | 'app.setting.production.hint':
30 | 'কেবল বিকাশের পরিবেশে প্যানেল শো সেট করা হচ্ছে, দয়া করে ম্যানুয়ালি সংশোধন করুন',
31 | };
32 |
--------------------------------------------------------------------------------
/src/locales/en-US/settingDrawer.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.setting.pagestyle': 'Page style setting',
3 | 'app.setting.pagestyle.dark': 'Dark style',
4 | 'app.setting.pagestyle.light': 'Light style',
5 | 'app.setting.content-width': 'Content Width',
6 | 'app.setting.content-width.fixed': 'Fixed',
7 | 'app.setting.content-width.fluid': 'Fluid',
8 | 'app.setting.themecolor': 'Theme Color',
9 | 'app.setting.themecolor.dust': 'Dust Red',
10 | 'app.setting.themecolor.volcano': 'Volcano',
11 | 'app.setting.themecolor.sunset': 'Sunset Orange',
12 | 'app.setting.themecolor.cyan': 'Cyan',
13 | 'app.setting.themecolor.green': 'Polar Green',
14 | 'app.setting.themecolor.daybreak': 'Daybreak Blue (default)',
15 | 'app.setting.themecolor.geekblue': 'Geek Glue',
16 | 'app.setting.themecolor.purple': 'Golden Purple',
17 | 'app.setting.navigationmode': 'Navigation Mode',
18 | 'app.setting.sidemenu': 'Side Menu Layout',
19 | 'app.setting.topmenu': 'Top Menu Layout',
20 | 'app.setting.fixedheader': 'Fixed Header',
21 | 'app.setting.fixedsidebar': 'Fixed Sidebar',
22 | 'app.setting.fixedsidebar.hint': 'Works on Side Menu Layout',
23 | 'app.setting.hideheader': 'Hidden Header when scrolling',
24 | 'app.setting.hideheader.hint': 'Works when Hidden Header is enabled',
25 | 'app.setting.othersettings': 'Other Settings',
26 | 'app.setting.weakmode': 'Color Blind Friendly Mode',
27 | 'app.setting.copy': 'Copy Setting',
28 | 'app.setting.copyinfo': 'copy success, please replace defaultSettings in src/models/setting.js',
29 | 'app.setting.production.hint':
30 | 'Setting panel shows in development environment only, please manually modify',
31 | };
32 |
--------------------------------------------------------------------------------
/src/components/TwelveT/Dictionaries/DictionariesRadio/index.tsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from 'react'
2 | import { CheckboxOptionType, message, Radio, RadioChangeEvent } from 'antd'
3 | import { getDictionariesType } from './service'
4 | import { system } from '@/utils/twelvet'
5 |
6 | /**
7 | * 字典模块数据管理类型选择器
8 | */
9 | const DictionariesRadio: React.FC<{
10 | type: string
11 | onChange?: (e: RadioChangeEvent) => void
12 | }> = (props) => {
13 |
14 | const [treeData, setTreeData] = useState>([])
15 |
16 | const { type } = props
17 |
18 | const makeTree = async () => {
19 | try {
20 | const { code, msg, data } = await getDictionariesType(type)
21 | if (code !== 200) {
22 | return message.error(msg)
23 | }
24 |
25 | // 制作数据
26 | let tree: Array = []
27 | data.map((item: {
28 | dictCode: number
29 | dictValue: string
30 | dictLabel: string
31 | }) => {
32 | tree.push(
33 | { label: item.dictLabel, value: item.dictValue }
34 | )
35 | return false
36 | })
37 |
38 | setTreeData(tree)
39 |
40 | } catch (e) {
41 | system.error(e)
42 | }
43 | }
44 |
45 | useEffect(() => {
46 | makeTree()
47 | }, [])
48 |
49 |
50 | return (
51 |
55 | )
56 |
57 | }
58 |
59 | export default DictionariesRadio
60 |
--------------------------------------------------------------------------------
/src/pages/Human/Staff/components/staffStatusSwitch/Index.tsx:
--------------------------------------------------------------------------------
1 | import React, {useEffect, useState} from 'react'
2 | import {message, Switch} from 'antd'
3 | import {system} from '@/utils/twelvet'
4 | import {changeStatus} from './../../service'
5 |
6 | /**
7 | * 状态组件操作
8 | * @param props row 参数
9 | */
10 | const StaffStatusSwitch: React.FC<{
11 | row: Record
12 | }> = (props) => {
13 |
14 | const [loading, setLoading] = useState(false)
15 | const [checked, setChecked] = useState(props.row.status)
16 |
17 | useEffect(() => {
18 | setChecked(props.row.status)
19 | }, [props.row.status])
20 |
21 | const toggle = async () => {
22 | try {
23 | setLoading(true);
24 | const params: { userId: number, status: string } = {userId: 0, status: "0"}
25 | params.userId = props.row.userId;
26 | params.status = checked === '1' ? '0' : '1'
27 | const {code, msg} = await changeStatus(params);
28 |
29 | if (code !== 200) {
30 | return message.error(msg);
31 | }
32 |
33 | if (checked === '1') {
34 | setChecked('0')
35 | } else {
36 | setChecked('1')
37 | }
38 |
39 | return message.success(msg);
40 | } catch (e) {
41 | system.log(e)
42 | } finally {
43 | setLoading(false);
44 | }
45 | };
46 |
47 | return (
48 |
53 | )
54 | }
55 |
56 | export default StaffStatusSwitch
57 |
--------------------------------------------------------------------------------
/src/pages/System/I18n/service.ts:
--------------------------------------------------------------------------------
1 | import { request } from '@umijs/max';
2 | import { download } from '@/utils/twelvet';
3 |
4 | // 请求的控制器名称
5 | const controller = '/system/i18n';
6 |
7 | /**
8 | * 初始化国际化数据
9 | */
10 | export function initI18n() {
11 | return request(`${controller}/init`, {
12 | method: `post`,
13 | });
14 | }
15 |
16 | /**
17 | * 查询国际化列表
18 | * @param query 查询参数
19 | */
20 | export function pageQueryI18n(query: { [key: string]: any }) {
21 | return request(`${controller}/pageQuery`, {
22 | method: `get`,
23 | params: query,
24 | });
25 | }
26 |
27 | /**
28 | * 查询国际化详细
29 | * @param i18nId
30 | */
31 | export function getI18n(i18nId: string | number) {
32 | return request(`${controller}/${i18nId}`, {
33 | method: `get`,
34 | });
35 | }
36 |
37 | /**
38 | * 新增国际化
39 | * @param data 数据参数
40 | */
41 | export function addI18n(data: { [key: string]: any }) {
42 | return request(`${controller}`, {
43 | method: `post`,
44 | data: data,
45 | });
46 | }
47 |
48 | /**
49 | * 修改国际化
50 | * @param data 数据参数
51 | */
52 | export function updateI18n(data: { [key: string]: any }) {
53 | return request(`${controller}`, {
54 | method: `put`,
55 | data: data,
56 | });
57 | }
58 |
59 | /**
60 | * 删除国际化
61 | * @param 主键
62 | */
63 | export function delI18n(i18nId: string | number) {
64 | return request(`${controller}/${i18nId}`, {
65 | method: `delete`,
66 | });
67 | }
68 |
69 | /**
70 | * 导出数据
71 | * @param params
72 | */
73 | export async function exportI18n(params?: { [key: string]: any }) {
74 | return download(`${controller}/export`, params);
75 | }
76 |
--------------------------------------------------------------------------------
/src/components/TwelveT/Dictionaries/DictionariesSelect/index.tsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from 'react';
2 | import { message, Select } from 'antd';
3 | import { getDictionariesType } from './service';
4 | import { system } from '@/utils/twelvet';
5 |
6 | /**
7 | * 字典模块数据管理类型选择器
8 | */
9 | const DictionariesSelect: React.FC<{
10 | type: string;
11 | mode?: 'multiple' | 'tags' | undefined;
12 | onChange?: (value: any) => void;
13 | }> = (props) => {
14 | const { Option } = Select;
15 |
16 | const [treeData, setTreeData] = useState([]);
17 |
18 | const { type, mode } = props;
19 |
20 | const makeTree = async () => {
21 | try {
22 | const { code, msg, data } = await getDictionariesType(type);
23 | if (code !== 200) {
24 | return message.error(msg);
25 | }
26 |
27 | // 制作数据
28 | const tree: any = [];
29 | data.map((item: { dictCode: number; dictValue: string; dictLabel: string }) => {
30 | tree.push(
31 | ,
34 | );
35 | return false;
36 | });
37 |
38 | setTreeData(tree);
39 | } catch (e) {
40 | system.error(e);
41 | }
42 | };
43 |
44 | useEffect(() => {
45 | makeTree();
46 | }, []);
47 |
48 | return (
49 |
52 | );
53 | };
54 |
55 | export default DictionariesSelect;
56 |
--------------------------------------------------------------------------------
/src/pages/System/Dictionaries/components/drawerInfo/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 | import {download} from '@/utils/twelvet'
3 |
4 | // 请求的控制器名称
5 | const controller = "/system/dictionaries/data";
6 |
7 | /**
8 | * 新增字典
9 | * @param params 搜索参数
10 | */
11 | export async function insert(params: Record) {
12 | return request(`${controller}`, {
13 | method: 'POST',
14 | data: {
15 | ...params
16 | },
17 | });
18 | }
19 |
20 | /**
21 | * 删除
22 | * @param postIds
23 | */
24 | export async function remove(postIds: (string | number)[] | string) {
25 | return request(`${controller}/${postIds}`, {
26 | method: 'DELETE',
27 | });
28 | }
29 |
30 | /**
31 | * 修改菜单
32 | * @param params 搜索参数
33 | */
34 | export async function update(params: Record) {
35 | return request(`${controller}`, {
36 | method: 'PUT',
37 | data: {
38 | ...params
39 | },
40 | });
41 | }
42 |
43 | /**
44 | * 获取分页 Data
45 | * @param params 搜索参数
46 | */
47 | export async function pageQuery(params: Record) {
48 | return request(`${controller}/pageQuery`, {
49 | method: 'GET',
50 | params: {
51 | ...params
52 | },
53 | });
54 | }
55 |
56 | /**
57 | * 获取指定字典信息
58 | * @param postId
59 | */
60 | export async function getBydictCode(postId: number) {
61 | return request(`${controller}/${postId}`, {
62 | method: 'GET'
63 | });
64 | }
65 |
66 | /**
67 | * 导出Excel
68 | * @param params
69 | */
70 | export async function exportExcel(params?: Record) {
71 | return download(`${controller}/export`, params);
72 | }
73 |
--------------------------------------------------------------------------------
/src/locales/en-US.ts:
--------------------------------------------------------------------------------
1 | import component from './en-US/component';
2 | import globalHeader from './en-US/globalHeader';
3 | import menu from './en-US/menu';
4 | import pages from './en-US/pages';
5 | import pwa from './en-US/pwa';
6 | import settingDrawer from './en-US/settingDrawer';
7 | import settings from './en-US/settings';
8 |
9 | export default {
10 | 'navBar.lang': 'Languages',
11 | 'layout.user.link.help': 'Help',
12 | 'layout.user.link.privacy': 'Privacy',
13 | 'layout.user.link.terms': 'Terms',
14 | 'app.preview.down.block': 'Download this page to your local project',
15 | 'app.welcome.link.fetch-blocks': 'Get all block',
16 | 'app.welcome.link.block-list': 'Quickly build standard, pages based on `block` development',
17 |
18 | 'app.development.documentation': 'Development Documentation',
19 | 'system.check': 'Check',
20 | 'system.add': 'Add',
21 | 'system.update': 'Update',
22 | 'system.delete': 'Delete',
23 | 'system.delete.batch': 'Batch Delete',
24 | 'system.preview': 'Preview',
25 | 'system.details': 'Details',
26 | 'system.sync': 'Sync',
27 | 'system.export': 'Export Data',
28 | 'system.import': 'Import Data',
29 | 'system.rest.password': 'Reset Password',
30 | 'system.data.management': 'Data Management',
31 | 'system.upload': 'Upload File',
32 | 'system.forceful.retreat': 'Forceful Retreat',
33 | 'system.execute': 'Execute',
34 | 'system.log': 'Log',
35 | 'system.init.i18n': 'Initialize I18n data',
36 |
37 | 'system.gen.code': 'Generate Code',
38 | ...globalHeader,
39 | ...menu,
40 | ...settingDrawer,
41 | ...settings,
42 | ...pwa,
43 | ...component,
44 | ...pages,
45 | };
46 |
--------------------------------------------------------------------------------
/src/locales/id-ID/settingDrawer.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.setting.pagestyle': 'Pengaturan style Halaman',
3 | 'app.setting.pagestyle.dark': 'Style Gelap',
4 | 'app.setting.pagestyle.light': 'Style Cerah',
5 | 'app.setting.content-width': 'Lebar Konten',
6 | 'app.setting.content-width.fixed': 'Tetap',
7 | 'app.setting.content-width.fluid': 'Fluid',
8 | 'app.setting.themecolor': 'Theme Color',
9 | 'app.setting.themecolor.dust': 'Dust Red',
10 | 'app.setting.themecolor.volcano': 'Volcano',
11 | 'app.setting.themecolor.sunset': 'Sunset Orange',
12 | 'app.setting.themecolor.cyan': 'Cyan',
13 | 'app.setting.themecolor.green': 'Polar Green',
14 | 'app.setting.themecolor.daybreak': 'Daybreak Blue (bawaan)',
15 | 'app.setting.themecolor.geekblue': 'Geek Glue',
16 | 'app.setting.themecolor.purple': 'Golden Purple',
17 | 'app.setting.navigationmode': 'Mode Navigasi',
18 | 'app.setting.sidemenu': 'Susunan Menu Samping',
19 | 'app.setting.topmenu': 'Susunan Menu Atas',
20 | 'app.setting.fixedheader': 'Header Tetap',
21 | 'app.setting.fixedsidebar': 'Sidebar Tetap',
22 | 'app.setting.fixedsidebar.hint': 'Berjalan pada Susunan Menu Samping',
23 | 'app.setting.hideheader': 'Sembunyikan Header ketika gulir ke bawah',
24 | 'app.setting.hideheader.hint': 'Bekerja ketika Header tersembunyi dimunculkan',
25 | 'app.setting.othersettings': 'Pengaturan Lainnya',
26 | 'app.setting.weakmode': 'Mode Lemah',
27 | 'app.setting.copy': 'Salin Pengaturan',
28 | 'app.setting.copyinfo':
29 | 'Berhasil disalin, tolong ubah defaultSettings pada src/models/setting.js',
30 | 'app.setting.production.hint':
31 | 'Panel pengaturan hanya muncul pada lingkungan pengembangan, silahkan modifikasi secara menual',
32 | };
33 |
--------------------------------------------------------------------------------
/src/pages/Tool/Code/Metadata/TemplateGroup/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 | import {download} from '@/utils/twelvet'
3 |
4 | // 请求的控制器名称
5 | const controller = "/gen/templateGroup";
6 |
7 | /**
8 | * 查询模板分组列表
9 | * @param query 查询参数
10 | */
11 | export function pageQueryGroup(query: { [key: string]: any }) {
12 | return request(`${controller}/pageQuery`, {
13 | method: `get`,
14 | params: query
15 | })
16 | }
17 |
18 | /**
19 | * 查询模板分组详细
20 | * @param 主键
21 | */
22 | export function getGroup(id: string | number) {
23 | return request(`${controller}/${id}`, {
24 | method: `get`
25 | })
26 | }
27 |
28 | /**
29 | * 新增模板分组
30 | * @param data 数据参数
31 | */
32 | export function addGroup(data: { [key: string]: any }) {
33 | return request(`${controller}`, {
34 | method: `post`,
35 | data: data
36 | })
37 | }
38 |
39 | /**
40 | * 修改模板分组
41 | * @param data 数据参数
42 | */
43 | export function updateGroup(data: { [key: string]: any }) {
44 | return request(`${controller}`, {
45 | method: `put`,
46 | data: data
47 | })
48 | }
49 |
50 | /**
51 | * 删除模板分组
52 | * @param 主键
53 | */
54 | export function delGroup(id: string | number) {
55 | return request(`${controller}/${id}`, {
56 | method: `delete`
57 | })
58 | }
59 |
60 | /**
61 | * 导出数据
62 | * @param params
63 | */
64 | export async function exportGroup(params?: { [key: string]: any }) {
65 | return download(`${controller}/export`, params);
66 | }
67 |
68 |
69 | /**
70 | * 查询模板列表
71 | * @param query 查询参数
72 | */
73 | export function listQueryTemplate() {
74 | return request(`${controller}/queryTemplateList`, {
75 | method: `get`
76 | })
77 | }
--------------------------------------------------------------------------------
/src/pages/Account/Settings/components/RestPassword.tsx:
--------------------------------------------------------------------------------
1 | import React, {} from 'react'
2 |
3 | import {ProForm, ProFormText} from '@ant-design/pro-components'
4 | import {Form, message} from 'antd'
5 | import {updateUserPwd} from '../service'
6 | import {system} from '@/utils/twelvet'
7 |
8 | /**
9 | * 用户资料设置
10 | */
11 | const RestPassword: React.FC = () => {
12 |
13 | const [form] = Form.useForm();
14 |
15 | /**
16 | * 修改信息
17 | * @param data 修改数据
18 | */
19 | const save = async (data: {
20 | oldPassword: string;
21 | newPassword: string;
22 | confirmPassword: string;
23 | }) => {
24 |
25 | try {
26 |
27 | if (data.newPassword !== data.confirmPassword) {
28 | return message.error("确认密码不一致,请重新输入");
29 | }
30 |
31 | const {code, msg} = await updateUserPwd(data)
32 |
33 | if (code !== 200) {
34 | return message.error(msg);
35 | }
36 |
37 | message.success(msg);
38 | } catch (e) {
39 | system.error(e);
40 | }
41 | }
42 |
43 | return (
44 |
45 |
47 |
49 |
51 |
52 | )
53 |
54 | }
55 |
56 | export default RestPassword
57 |
--------------------------------------------------------------------------------
/src/locales/pt-BR/settingDrawer.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.setting.pagestyle': 'Configuração de estilo da página',
3 | 'app.setting.pagestyle.dark': 'Dark style',
4 | 'app.setting.pagestyle.light': 'Light style',
5 | 'app.setting.content-width': 'Largura do conteúdo',
6 | 'app.setting.content-width.fixed': 'Fixo',
7 | 'app.setting.content-width.fluid': 'Fluido',
8 | 'app.setting.themecolor': 'Cor do Tema',
9 | 'app.setting.themecolor.dust': 'Dust Red',
10 | 'app.setting.themecolor.volcano': 'Volcano',
11 | 'app.setting.themecolor.sunset': 'Sunset Orange',
12 | 'app.setting.themecolor.cyan': 'Cyan',
13 | 'app.setting.themecolor.green': 'Polar Green',
14 | 'app.setting.themecolor.daybreak': 'Daybreak Blue (default)',
15 | 'app.setting.themecolor.geekblue': 'Geek Glue',
16 | 'app.setting.themecolor.purple': 'Golden Purple',
17 | 'app.setting.navigationmode': 'Modo de Navegação',
18 | 'app.setting.sidemenu': 'Layout do Menu Lateral',
19 | 'app.setting.topmenu': 'Layout do Menu Superior',
20 | 'app.setting.fixedheader': 'Cabeçalho fixo',
21 | 'app.setting.fixedsidebar': 'Barra lateral fixa',
22 | 'app.setting.fixedsidebar.hint': 'Funciona no layout do menu lateral',
23 | 'app.setting.hideheader': 'Esconder o cabeçalho quando rolar',
24 | 'app.setting.hideheader.hint': 'Funciona quando o esconder cabeçalho está abilitado',
25 | 'app.setting.othersettings': 'Outras configurações',
26 | 'app.setting.weakmode': 'Weak Mode',
27 | 'app.setting.copy': 'Copiar Configuração',
28 | 'app.setting.copyinfo':
29 | 'copiado com sucesso, por favor trocar o defaultSettings em src/models/setting.js',
30 | 'app.setting.production.hint':
31 | 'O painel de configuração apenas é exibido no ambiente de desenvolvimento, por favor modifique manualmente o',
32 | };
33 |
--------------------------------------------------------------------------------
/Jenkinsfile:
--------------------------------------------------------------------------------
1 | pipeline {
2 | agent any
3 | tools {
4 | nodejs 'nodejs'
5 | }
6 | parameters {
7 | choice(
8 | description: '是否安装依赖?',
9 | name: 'isInstall',
10 | choices: ['false', 'true']
11 | )
12 | }
13 |
14 | stages {
15 | stage('install twelvet-react-ui') {
16 | when {
17 | expression { isInstall ==~ /(true)/ }
18 | }
19 | steps {
20 | sh 'node -v'
21 | sh 'rm -rf node_modules'
22 | sh 'rm -rf yarn.lock'
23 | sh 'yarn'
24 | }
25 | }
26 | stage('Build prod') {
27 | when {
28 | beforeAgent true
29 | branch 'master*'
30 | }
31 | steps {
32 | sh 'rm -rf dist'
33 | sh 'yarn build'
34 | dir('dist') {
35 | sh(script: 'tar cvzf twelvet-react-ui.tar.gz .', returnStatus: true)
36 | archiveArtifacts artifacts: '**/*.tar.gz', fingerprint: true
37 | }
38 | }
39 | }
40 | }
41 | }
42 |
43 | node {
44 | if (env.BRANCH_NAME.contains('master')) {
45 | def remote = [:]
46 | remote.name = 'twelvet'
47 | remote.host = env.REMOTE_HOST
48 | remote.port = 22
49 | withCredentials([usernamePassword(credentialsId: 'twelvet', passwordVariable: 'password', usernameVariable: 'userName')]) {
50 | remote.user = userName
51 | remote.password = password
52 | remote.allowAnyHosts = true
53 | stage('push to twelvet-react-ui') {
54 | sshPut remote: remote, from: 'dist/twelvet-react-ui.tar.gz', into: '/twelvet/docker/nginx/html/.'
55 | sshCommand remote: remote, command: 'tar xvzf /twelvet/docker/nginx/html/twelvet-react-ui.tar.gz -C /twelvet/docker/nginx/html/'
56 | sshCommand remote: remote, command: 'rm -rf /twelvet/docker/nginx/html/twelvet-react-ui.tar.gz'
57 | }
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/src/pages/AI/Model/service.ts:
--------------------------------------------------------------------------------
1 | import { request } from '@umijs/max';
2 | import { download } from '@/utils/twelvet';
3 |
4 | // 请求的控制器名称
5 | const controller = '/ai/model';
6 |
7 | /**
8 | * 查询AI大模型列表
9 | * @param query 查询参数
10 | */
11 | export async function pageQueryModel(query: { [key: string]: any }) {
12 | return request(`${controller}/pageQuery`, {
13 | method: `get`,
14 | params: query,
15 | });
16 | }
17 |
18 | /**
19 | * 查询AI大模型详细
20 | * @param modelId
21 | */
22 | export async function getModel(modelId: string | number) {
23 | return request(`${controller}/${modelId}`, {
24 | method: `get`,
25 | });
26 | }
27 |
28 | /**
29 | * 新增AI大模型
30 | * @param data 数据参数
31 | */
32 | export async function addModel(data: { [key: string]: any }) {
33 | return request(`${controller}`, {
34 | method: `post`,
35 | data: data,
36 | });
37 | }
38 |
39 | /**
40 | * 修改AI大模型
41 | * @param data 数据参数
42 | */
43 | export async function updateModel(data: { [key: string]: any }) {
44 | return request(`${controller}`, {
45 | method: `put`,
46 | data: data,
47 | });
48 | }
49 |
50 | /**
51 | * 删除AI大模型
52 | * @param modelId
53 | */
54 | export async function delModel(modelId: string | number) {
55 | return request(`${controller}/${modelId}`, {
56 | method: `delete`,
57 | });
58 | }
59 |
60 | /**
61 | * 导出数据
62 | * @param params
63 | */
64 | export async function exportModel(params?: { [key: string]: any }) {
65 | return download(`${controller}/export`, params);
66 | }
67 |
68 | /**
69 | *
70 | * @param params
71 | */
72 | export async function changeStatus(params: Record) {
73 | return request(`${controller}/changeStatus`, {
74 | method: 'PUT',
75 | data: {
76 | ...params,
77 | },
78 | });
79 | }
80 |
--------------------------------------------------------------------------------
/src/pages/System/Dictionaries/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 | import {download} from '@/utils/twelvet'
3 |
4 | // 请求的控制器名称
5 | const controller = "/system/dictionaries/type";
6 |
7 | /**
8 | * 新增字典
9 | * @param params 搜索参数
10 | */
11 | export async function insert(params: Record) {
12 | return request(`${controller}`, {
13 | method: 'POST',
14 | data: {
15 | ...params
16 | },
17 | });
18 | }
19 |
20 | /**
21 | * 删除
22 | * @param postIds
23 | */
24 | export async function remove(postIds: (string | number)[] | string) {
25 | return request(`${controller}/${postIds}`, {
26 | method: 'DELETE',
27 | });
28 | }
29 |
30 | /**
31 | * 修改菜单
32 | * @param params 搜索参数
33 | */
34 | export async function update(params: Record) {
35 | return request(`${controller}`, {
36 | method: 'PUT',
37 | data: {
38 | ...params
39 | },
40 | });
41 | }
42 |
43 | /**
44 | * 获取分页 Data
45 | * @param params 搜索参数
46 | */
47 | export async function pageQuery(params: Record) {
48 | return request(`${controller}/pageQuery`, {
49 | method: 'GET',
50 | params: {
51 | ...params
52 | },
53 | });
54 | }
55 |
56 | /**
57 | * 获取指定字典信息
58 | * @param postId
59 | */
60 | export async function getBydictId(postId: number) {
61 | return request(`${controller}/${postId}`, {
62 | method: 'GET'
63 | });
64 | }
65 |
66 | /**
67 | * 获取指定字典信息
68 | */
69 | export async function clearCache() {
70 | return request(`${controller}/clearCache`, {
71 | method: 'DELETE'
72 | });
73 | }
74 |
75 | /**
76 | * 导出Excel
77 | * @param params
78 | */
79 | export async function exportExcel(params?: Record) {
80 | return download(`${controller}/export`, params);
81 | }
82 |
--------------------------------------------------------------------------------
/src/locales/zh-CN/menu.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'menu.welcome': '欢迎',
3 | 'menu.more-blocks': '更多区块',
4 | 'menu.home': '首页',
5 | 'menu.admin': '管理页',
6 | 'menu.admin.sub-page': '二级管理页',
7 | 'menu.login': '登录',
8 | 'menu.register': '注册',
9 | 'menu.register-result': '注册结果',
10 | 'menu.dashboard': 'Dashboard',
11 | 'menu.dashboard.analysis': '分析页',
12 | 'menu.dashboard.monitor': '监控页',
13 | 'menu.dashboard.workplace': '工作台',
14 | 'menu.exception.403': '403',
15 | 'menu.exception.404': '404',
16 | 'menu.exception.500': '500',
17 | 'menu.form': '表单页',
18 | 'menu.form.basic-form': '基础表单',
19 | 'menu.form.step-form': '分步表单',
20 | 'menu.form.step-form.info': '分步表单(填写转账信息)',
21 | 'menu.form.step-form.confirm': '分步表单(确认转账信息)',
22 | 'menu.form.step-form.result': '分步表单(完成)',
23 | 'menu.form.advanced-form': '高级表单',
24 | 'menu.list': '列表页',
25 | 'menu.list.table-list': '查询表格',
26 | 'menu.list.basic-list': '标准列表',
27 | 'menu.list.card-list': '卡片列表',
28 | 'menu.list.search-list': '搜索列表',
29 | 'menu.list.search-list.articles': '搜索列表(文章)',
30 | 'menu.list.search-list.projects': '搜索列表(项目)',
31 | 'menu.list.search-list.applications': '搜索列表(应用)',
32 | 'menu.profile': '详情页',
33 | 'menu.profile.basic': '基础详情页',
34 | 'menu.profile.advanced': '高级详情页',
35 | 'menu.result': '结果页',
36 | 'menu.result.success': '成功页',
37 | 'menu.result.fail': '失败页',
38 | 'menu.exception': '异常页',
39 | 'menu.exception.not-permission': '403',
40 | 'menu.exception.not-find': '404',
41 | 'menu.exception.server-error': '500',
42 | 'menu.exception.trigger': '触发错误',
43 | 'menu.account': '个人页',
44 | 'menu.account.center': '个人中心',
45 | 'menu.account.settings': '个人设置',
46 | 'menu.account.trigger': '触发报错',
47 | 'menu.account.logout': '退出登录',
48 | 'menu.editor': '图形编辑器',
49 | 'menu.editor.flow': '流程编辑器',
50 | 'menu.editor.mind': '脑图编辑器',
51 | 'menu.editor.koni': '拓扑编辑器',
52 | };
53 |
--------------------------------------------------------------------------------
/src/locales/zh-TW/menu.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'menu.welcome': '歡迎',
3 | 'menu.more-blocks': '更多區塊',
4 | 'menu.home': '首頁',
5 | 'menu.admin': '权限',
6 | 'menu.admin.sub-page': '二级管理页',
7 | 'menu.login': '登錄',
8 | 'menu.register': '註冊',
9 | 'menu.register-result': '註冊結果',
10 | 'menu.dashboard': 'Dashboard',
11 | 'menu.dashboard.analysis': '分析頁',
12 | 'menu.dashboard.monitor': '監控頁',
13 | 'menu.dashboard.workplace': '工作臺',
14 | 'menu.exception.403': '403',
15 | 'menu.exception.404': '404',
16 | 'menu.exception.500': '500',
17 | 'menu.form': '表單頁',
18 | 'menu.form.basic-form': '基礎表單',
19 | 'menu.form.step-form': '分步表單',
20 | 'menu.form.step-form.info': '分步表單(填寫轉賬信息)',
21 | 'menu.form.step-form.confirm': '分步表單(確認轉賬信息)',
22 | 'menu.form.step-form.result': '分步表單(完成)',
23 | 'menu.form.advanced-form': '高級表單',
24 | 'menu.list': '列表頁',
25 | 'menu.list.table-list': '查詢表格',
26 | 'menu.list.basic-list': '標淮列表',
27 | 'menu.list.card-list': '卡片列表',
28 | 'menu.list.search-list': '搜索列表',
29 | 'menu.list.search-list.articles': '搜索列表(文章)',
30 | 'menu.list.search-list.projects': '搜索列表(項目)',
31 | 'menu.list.search-list.applications': '搜索列表(應用)',
32 | 'menu.profile': '詳情頁',
33 | 'menu.profile.basic': '基礎詳情頁',
34 | 'menu.profile.advanced': '高級詳情頁',
35 | 'menu.result': '結果頁',
36 | 'menu.result.success': '成功頁',
37 | 'menu.result.fail': '失敗頁',
38 | 'menu.exception': '异常页',
39 | 'menu.exception.not-permission': '403',
40 | 'menu.exception.not-find': '404',
41 | 'menu.exception.server-error': '500',
42 | 'menu.exception.trigger': '触发错误',
43 | 'menu.account': '個人頁',
44 | 'menu.account.center': '個人中心',
45 | 'menu.account.settings': '個人設置',
46 | 'menu.account.trigger': '觸發報錯',
47 | 'menu.account.logout': '退出登錄',
48 | 'menu.editor': '圖形編輯器',
49 | 'menu.editor.flow': '流程編輯器',
50 | 'menu.editor.mind': '腦圖編輯器',
51 | 'menu.editor.koni': '拓撲編輯器',
52 | };
53 |
--------------------------------------------------------------------------------
/src/pages/Monitor/Redis/components/CommandStatsChart.tsx:
--------------------------------------------------------------------------------
1 | import { useEffect } from 'react'
2 | import * as echarts from 'echarts'
3 | import styles from './styles.less'
4 | import React from 'react'
5 | import { Card } from 'antd'
6 |
7 | /**
8 | * 扇形图
9 | */
10 | const CommandStatsChart: React.FC<{ commandStats: {} | undefined }> = (props) => {
11 |
12 | let commandStatsChart: HTMLDivElement;
13 |
14 | const { commandStats } = props
15 |
16 | // 第一次渲染时执行
17 | useEffect(() => {
18 | // 获取echarts实例
19 | const instance: any = echarts.init(commandStatsChart)
20 | // 开启自适应
21 | window.addEventListener('resize', instance.resize)
22 |
23 | // 设置参数
24 | instance.setOption({
25 | tooltip: {
26 | trigger: 'item',
27 | formatter: '{a}
{b} : {c} ({d}%)'
28 | },
29 | legend: {
30 | left: 'center',
31 | bottom: '10',
32 | },
33 | series: [
34 | {
35 | name: '命令统计',
36 | type: 'pie',
37 | roseType: 'radius',
38 | radius: [15, 95],
39 | center: ['50%', '38%'],
40 | data: commandStats,
41 | animationEasing: 'cubicInOut',
42 | animationDuration: 2600
43 | }
44 | ]
45 | })
46 |
47 | // 关闭监听
48 | return () => {
49 | window.removeEventListener('resize', instance.resize)
50 | }
51 |
52 | }, [commandStats])
53 |
54 | return (
55 |
56 | commandStatsChart = ref}
58 | className={styles.commandStatsChart}
59 | />
60 |
61 |
62 | )
63 |
64 | }
65 |
66 | export default CommandStatsChart
67 |
--------------------------------------------------------------------------------
/src/services/swagger/store.ts:
--------------------------------------------------------------------------------
1 | // @ts-ignore
2 | /* eslint-disable */
3 | import {request} from '@umijs/max';
4 |
5 | /** Returns pet inventories by status Returns a map of status codes to quantities GET /store/inventory */
6 | export async function getInventory(options?: { [key: string]: any }) {
7 | return request
>('/store/inventory', {
8 | method: 'GET',
9 | ...(options || {}),
10 | });
11 | }
12 |
13 | /** Place an order for a pet POST /store/order */
14 | export async function placeOrder(body: API.Order, options?: { [key: string]: any }) {
15 | return request('/store/order', {
16 | method: 'POST',
17 | data: body,
18 | ...(options || {}),
19 | });
20 | }
21 |
22 | /** Find purchase order by ID For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions GET /store/order/${param0} */
23 | export async function getOrderById(
24 | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
25 | params: API.getOrderByIdParams,
26 | options?: { [key: string]: any },
27 | ) {
28 | const {orderId: param0, ...queryParams} = params;
29 | return request(`/store/order/${param0}`, {
30 | method: 'GET',
31 | params: {...queryParams},
32 | ...(options || {}),
33 | });
34 | }
35 |
36 | /** Delete purchase order by ID For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors DELETE /store/order/${param0} */
37 | export async function deleteOrder(
38 | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
39 | params: API.deleteOrderParams,
40 | options?: { [key: string]: any },
41 | ) {
42 | const {orderId: param0, ...queryParams} = params;
43 | return request(`/store/order/${param0}`, {
44 | method: 'DELETE',
45 | params: {...queryParams},
46 | ...(options || {}),
47 | });
48 | }
49 |
--------------------------------------------------------------------------------
/tests/setupTests.jsx:
--------------------------------------------------------------------------------
1 | const localStorageMock = {
2 | getItem: jest.fn(),
3 | setItem: jest.fn(),
4 | removeItem: jest.fn(),
5 | clear: jest.fn(),
6 | };
7 |
8 | global.localStorage = localStorageMock;
9 |
10 | Object.defineProperty(URL, 'createObjectURL', {
11 | writable: true,
12 | value: jest.fn(),
13 | });
14 |
15 | class Worker {
16 | constructor(stringUrl) {
17 | this.url = stringUrl;
18 | this.onmessage = () => {};
19 | }
20 |
21 | postMessage(msg) {
22 | this.onmessage(msg);
23 | }
24 | }
25 |
26 | window.Worker = Worker;
27 |
28 | /* eslint-disable global-require */
29 | if (typeof window !== 'undefined') {
30 | // ref: https://github.com/ant-design/ant-design/issues/18774
31 | if (!window.matchMedia) {
32 | Object.defineProperty(global.window, 'matchMedia', {
33 | writable: true,
34 | configurable: true,
35 | value: jest.fn(() => ({
36 | matches: false,
37 | addListener: jest.fn(),
38 | removeListener: jest.fn(),
39 | })),
40 | });
41 | }
42 | if (!window.matchMedia) {
43 | Object.defineProperty(global.window, 'matchMedia', {
44 | writable: true,
45 | configurable: true,
46 | value: jest.fn((query) => ({
47 | matches: query.includes('max-width'),
48 | addListener: jest.fn(),
49 | removeListener: jest.fn(),
50 | })),
51 | });
52 | }
53 | }
54 | const errorLog = console.error;
55 | Object.defineProperty(global.window.console, 'error', {
56 | writable: true,
57 | configurable: true,
58 | value: (...rest) => {
59 | const logStr = rest.join('');
60 | if (logStr.includes(
61 | 'Warning: An update to %s inside a test was not wrapped in act(...)')) {
62 | return;
63 | }
64 | errorLog(...rest);
65 | },
66 | });
67 |
--------------------------------------------------------------------------------
/src/locales/ja-JP/menu.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'menu.welcome': 'ようこそ',
3 | 'menu.more-blocks': 'その他のブロック',
4 | 'menu.home': 'ホーム',
5 | 'menu.admin': '管理者',
6 | 'menu.admin.sub-page': 'サブページ',
7 | 'menu.login': 'ログイン',
8 | 'menu.register': '登録',
9 | 'menu.register-result': '登録結果',
10 | 'menu.dashboard': 'ダッシュボード',
11 | 'menu.dashboard.analysis': '分析',
12 | 'menu.dashboard.monitor': 'モニター',
13 | 'menu.dashboard.workplace': '職場',
14 | 'menu.exception.403': '403',
15 | 'menu.exception.404': '404',
16 | 'menu.exception.500': '500',
17 | 'menu.form': 'フォーム',
18 | 'menu.form.basic-form': '基本フォーム',
19 | 'menu.form.step-form': 'ステップフォーム',
20 | 'menu.form.step-form.info': 'ステップフォーム(転送情報の書き込み)',
21 | 'menu.form.step-form.confirm': 'ステップフォーム(転送情報の確認)',
22 | 'menu.form.step-form.result': 'ステップフォーム(完成)',
23 | 'menu.form.advanced-form': '高度なフォーム',
24 | 'menu.list': 'リスト',
25 | 'menu.list.table-list': '検索テーブル',
26 | 'menu.list.basic-list': '基本リスト',
27 | 'menu.list.card-list': 'カードリスト',
28 | 'menu.list.search-list': '検索リスト',
29 | 'menu.list.search-list.articles': '検索リスト(記事)',
30 | 'menu.list.search-list.projects': '検索リスト(プロジェクト)',
31 | 'menu.list.search-list.applications': '検索リスト(アプリ)',
32 | 'menu.profile': 'プロフィール',
33 | 'menu.profile.basic': '基本プロフィール',
34 | 'menu.profile.advanced': '高度なプロフィール',
35 | 'menu.result': '結果',
36 | 'menu.result.success': '成功',
37 | 'menu.result.fail': '失敗',
38 | 'menu.exception': '例外',
39 | 'menu.exception.not-permission': '403',
40 | 'menu.exception.not-find': '404',
41 | 'menu.exception.server-error': '500',
42 | 'menu.exception.trigger': 'トリガー',
43 | 'menu.account': 'アカウント',
44 | 'menu.account.center': 'アカウントセンター',
45 | 'menu.account.settings': 'アカウント設定',
46 | 'menu.account.trigger': 'トリガーエラー',
47 | 'menu.account.logout': 'ログアウト',
48 | 'menu.editor': 'グラフィックエディタ',
49 | 'menu.editor.flow': 'フローエディタ',
50 | 'menu.editor.mind': 'マインドエディター',
51 | 'menu.editor.koni': 'コニエディター',
52 | };
53 |
--------------------------------------------------------------------------------
/src/pages/AI/Doc/service.ts:
--------------------------------------------------------------------------------
1 | import { request } from '@umijs/max'
2 | import { download, upload } from '@/utils/twelvet';
3 |
4 | // 请求的控制器名称
5 | const controller = "/ai/doc";
6 |
7 | /**
8 | * 查询AI知识库文档列表
9 | * @param query 查询参数
10 | */
11 | export async function pageQueryDoc(query: { [key: string]: any }) {
12 | return request(`${controller}/pageQuery`, {
13 | method: `get`,
14 | params: query
15 | })
16 | }
17 |
18 | /**
19 | * 查询AI知识库文档详细
20 | * @param 主键
21 | */
22 | export async function getDoc(docId: string | number) {
23 | return request(`${controller}/${docId}`, {
24 | method: `get`
25 | })
26 | }
27 |
28 | /**
29 | * 新增AI知识库文档
30 | * @param data 数据参数
31 | */
32 | export async function addDoc(data: { [key: string]: any }) {
33 | return request(`${controller}`, {
34 | method: `post`,
35 | data: data
36 | })
37 | }
38 |
39 | /**
40 | * 修改AI知识库文档
41 | * @param data 数据参数
42 | */
43 | export async function updateDoc(data: { [key: string]: any }) {
44 | return request(`${controller}`, {
45 | method: `put`,
46 | data: data
47 | })
48 | }
49 |
50 | /**
51 | * 删除AI知识库文档
52 | * @param 主键
53 | */
54 | export async function delDoc(docId: string | number) {
55 | return request(`${controller}/${docId}`, {
56 | method: `delete`
57 | })
58 | }
59 |
60 | /**
61 | * 导出数据
62 | * @param params
63 | */
64 | export async function exportDoc(params?: { [key: string]: any }) {
65 | return download(`${controller}/export`, params);
66 | }
67 |
68 | /**
69 | * 查询AI知识库列表
70 | * @param query 查询参数
71 | */
72 | export async function listKnowledgeQueryDoc(query: { [key: string]: any }) {
73 | return request(`/ai/knowledge/list`, {
74 | method: `get`,
75 | params: query
76 | })
77 | }
78 |
79 | /**
80 | * 上传数据
81 | * @param formData
82 | */
83 | export async function batchUpload(formData: FormData) {
84 | return upload(`/dfs/batchUpload`, formData);
85 | }
86 |
--------------------------------------------------------------------------------
/src/locales/fa-IR/menu.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'menu.welcome': 'خوش آمدید',
3 | 'menu.more-blocks': 'بلوک های بیشتر',
4 | 'menu.home': 'خانه',
5 | 'menu.admin': 'مدیر',
6 | 'menu.admin.sub-page': 'زیر صفحه',
7 | 'menu.login': 'ورود',
8 | 'menu.register': 'ثبت نام',
9 | 'menu.register-result': 'ثبت نام نتیجه',
10 | 'menu.dashboard': 'داشبورد',
11 | 'menu.dashboard.analysis': 'تحلیل و بررسی',
12 | 'menu.dashboard.monitor': 'نظارت',
13 | 'menu.dashboard.workplace': 'محل کار',
14 | 'menu.exception.403': '403',
15 | 'menu.exception.404': '404',
16 | 'menu.exception.500': '500',
17 | 'menu.form': 'فرم',
18 | 'menu.form.basic-form': 'فرم اساسی',
19 | 'menu.form.step-form': 'فرم مرحله',
20 | 'menu.form.step-form.info': 'فرم مرحله (نوشتن اطلاعات انتقال)',
21 | 'menu.form.step-form.confirm': 'فرم مرحله (تأیید اطلاعات انتقال)',
22 | 'menu.form.step-form.result': 'فرم مرحله (تمام شده)',
23 | 'menu.form.advanced-form': 'فرم پیشرفته',
24 | 'menu.list': 'لیست',
25 | 'menu.list.table-list': 'جدول جستجو',
26 | 'menu.list.basic-list': 'لیست اصلی',
27 | 'menu.list.card-list': 'لیست کارت',
28 | 'menu.list.search-list': 'لیست جستجو',
29 | 'menu.list.search-list.articles': 'لیست جستجو (مقالات)',
30 | 'menu.list.search-list.projects': 'لیست جستجو (پروژه ها)',
31 | 'menu.list.search-list.applications': 'لیست جستجو (برنامه ها)',
32 | 'menu.profile': 'مشخصات',
33 | 'menu.profile.basic': 'مشخصات عمومی',
34 | 'menu.profile.advanced': 'مشخصات پیشرفته',
35 | 'menu.result': 'نتیجه',
36 | 'menu.result.success': 'موفق',
37 | 'menu.result.fail': 'ناموفق',
38 | 'menu.exception': 'استثنا',
39 | 'menu.exception.not-permission': '403',
40 | 'menu.exception.not-find': '404',
41 | 'menu.exception.server-error': '500',
42 | 'menu.exception.trigger': 'راه اندازی',
43 | 'menu.account': 'حساب',
44 | 'menu.account.center': 'مرکز حساب',
45 | 'menu.account.settings': 'تنظیمات حساب',
46 | 'menu.account.trigger': 'خطای راه اندازی',
47 | 'menu.account.logout': 'خروج',
48 | 'menu.editor': 'ویرایشگر گرافیک',
49 | 'menu.editor.flow': 'ویرایشگر جریان',
50 | 'menu.editor.mind': 'ویرایشگر ذهن',
51 | 'menu.editor.koni': 'ویرایشگر Koni',
52 | };
53 |
--------------------------------------------------------------------------------
/src/locales/en-US/menu.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'menu.welcome': 'Welcome',
3 | 'menu.more-blocks': 'More Blocks',
4 | 'menu.home': 'Home',
5 | 'menu.admin': 'Admin',
6 | 'menu.admin.sub-page': 'Sub-Page',
7 | 'menu.login': 'Login',
8 | 'menu.register': 'Register',
9 | 'menu.register-result': 'Register Result',
10 | 'menu.dashboard': 'Dashboard',
11 | 'menu.dashboard.analysis': 'Analysis',
12 | 'menu.dashboard.monitor': 'Monitor',
13 | 'menu.dashboard.workplace': 'Workplace',
14 | 'menu.exception.403': '403',
15 | 'menu.exception.404': '404',
16 | 'menu.exception.500': '500',
17 | 'menu.form': 'Form',
18 | 'menu.form.basic-form': 'Basic Form',
19 | 'menu.form.step-form': 'Step Form',
20 | 'menu.form.step-form.info': 'Step Form(write transfer information)',
21 | 'menu.form.step-form.confirm': 'Step Form(confirm transfer information)',
22 | 'menu.form.step-form.result': 'Step Form(finished)',
23 | 'menu.form.advanced-form': 'Advanced Form',
24 | 'menu.list': 'List',
25 | 'menu.list.table-list': 'Search Table',
26 | 'menu.list.basic-list': 'Basic List',
27 | 'menu.list.card-list': 'Card List',
28 | 'menu.list.search-list': 'Search List',
29 | 'menu.list.search-list.articles': 'Search List(articles)',
30 | 'menu.list.search-list.projects': 'Search List(projects)',
31 | 'menu.list.search-list.applications': 'Search List(applications)',
32 | 'menu.profile': 'Profile',
33 | 'menu.profile.basic': 'Basic Profile',
34 | 'menu.profile.advanced': 'Advanced Profile',
35 | 'menu.result': 'Result',
36 | 'menu.result.success': 'Success',
37 | 'menu.result.fail': 'Fail',
38 | 'menu.exception': 'Exception',
39 | 'menu.exception.not-permission': '403',
40 | 'menu.exception.not-find': '404',
41 | 'menu.exception.server-error': '500',
42 | 'menu.exception.trigger': 'Trigger',
43 | 'menu.account': 'Account',
44 | 'menu.account.center': 'Account Center',
45 | 'menu.account.settings': 'Account Settings',
46 | 'menu.account.trigger': 'Trigger Error',
47 | 'menu.account.logout': 'Logout',
48 | 'menu.editor': 'Graphic Editor',
49 | 'menu.editor.flow': 'Flow Editor',
50 | 'menu.editor.mind': 'Mind Editor',
51 | 'menu.editor.koni': 'Koni Editor',
52 | };
53 |
--------------------------------------------------------------------------------
/src/pages/Monitor/Job/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 | import {download} from '@/utils/twelvet'
3 |
4 | // 请求的控制器名称
5 | const controller = "/job/cron";
6 |
7 | /**
8 | * 获取分页 Data
9 | * @param params 搜索参数
10 | */
11 | export async function pageQuery(params: Record) {
12 | return request(`${controller}/pageQuery`, {
13 | method: 'GET',
14 | params: {
15 | ...params
16 | },
17 | });
18 | }
19 |
20 | /**
21 | * 根据ID获取任务信息
22 | * @param params 搜索参数
23 | */
24 | export async function run(params: Record) {
25 | return request(`${controller}/run`, {
26 | method: 'PUT',
27 | data: {
28 | ...params
29 | }
30 | });
31 | }
32 |
33 | /**
34 | * 根据ID获取任务信息
35 | * @param jobId
36 | */
37 | export async function getByJobId({jobId}: { jobId: number }) {
38 | return request(`${controller}/${jobId}`, {
39 | method: 'GET',
40 | });
41 | }
42 |
43 | /**
44 | * 删除数据
45 | * @param infoIds
46 | */
47 | export async function remove(infoIds: string) {
48 | return request(`${controller}/${infoIds}`, {
49 | method: 'DELETE',
50 | });
51 | }
52 |
53 | /**
54 | * 导出Excel
55 | * @param params
56 | */
57 | export async function exportExcel(params?: Record) {
58 | return download(`${controller}/export`, params);
59 | }
60 |
61 | /**
62 | * 更改状态
63 | * @param params
64 | */
65 | export async function changeStatus(params?: Record) {
66 | return request(`${controller}/changeStatus`, {
67 | method: 'PUT',
68 | data: {
69 | ...params
70 | }
71 | })
72 | }
73 |
74 | /**
75 | * 更改状态
76 | * @param params
77 | */
78 | export async function insert(params?: Record) {
79 | return request(`${controller}`, {
80 | method: 'POST',
81 | data: {
82 | ...params
83 | }
84 | })
85 | }
86 |
87 | /**
88 | * 更改状态
89 | * @param params
90 | */
91 | export async function update(params?: Record) {
92 | return request(`${controller}`, {
93 | method: 'PUT',
94 | data: {
95 | ...params
96 | }
97 | })
98 | }
99 |
--------------------------------------------------------------------------------
/src/locales/bn-BD/menu.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'menu.welcome': 'স্বাগতম',
3 | 'menu.more-blocks': 'আরও ব্লক',
4 | 'menu.home': 'নীড়',
5 | 'menu.admin': 'অ্যাডমিন',
6 | 'menu.admin.sub-page': 'উপ-পৃষ্ঠা',
7 | 'menu.login': 'প্রবেশ',
8 | 'menu.register': 'নিবন্ধন',
9 | 'menu.register-result': 'নিবন্ধনে ফলাফল',
10 | 'menu.dashboard': 'ড্যাশবোর্ড',
11 | 'menu.dashboard.analysis': 'বিশ্লেষণ',
12 | 'menu.dashboard.monitor': 'নিরীক্ষণ',
13 | 'menu.dashboard.workplace': 'কর্মক্ষেত্র',
14 | 'menu.exception.403': '403',
15 | 'menu.exception.404': '404',
16 | 'menu.exception.500': '500',
17 | 'menu.form': 'ফর্ম',
18 | 'menu.form.basic-form': 'বেসিক ফর্ম',
19 | 'menu.form.step-form': 'পদক্ষেপ ফর্ম',
20 | 'menu.form.step-form.info': 'পদক্ষেপ ফর্ম (স্থানান্তর তথ্য লিখুন)',
21 | 'menu.form.step-form.confirm': 'পদক্ষেপ ফর্ম (স্থানান্তর তথ্য নিশ্চিত করুন)',
22 | 'menu.form.step-form.result': 'পদক্ষেপ ফর্ম (সমাপ্ত)',
23 | 'menu.form.advanced-form': 'উন্নত ফর্ম',
24 | 'menu.list': 'তালিকা',
25 | 'menu.list.table-list': 'অনুসন্ধানের টেবিল',
26 | 'menu.list.basic-list': 'বেসিক তালিকা',
27 | 'menu.list.card-list': 'কার্ডের তালিকা',
28 | 'menu.list.search-list': 'অনুসন্ধানের তালিকা',
29 | 'menu.list.search-list.articles': 'অনুসন্ধানের তালিকা (নিবন্ধসমূহ)',
30 | 'menu.list.search-list.projects': 'অনুসন্ধানের তালিকা (প্রকল্পগুলি)',
31 | 'menu.list.search-list.applications': 'অনুসন্ধানের তালিকা (অ্যাপ্লিকেশন)',
32 | 'menu.profile': 'প্রোফাইল',
33 | 'menu.profile.basic': 'বেসিক প্রোফাইল',
34 | 'menu.profile.advanced': 'উন্নত প্রোফাইল',
35 | 'menu.result': 'ফলাফল',
36 | 'menu.result.success': 'সাফল্য',
37 | 'menu.result.fail': 'ব্যর্থ',
38 | 'menu.exception': 'ব্যতিক্রম',
39 | 'menu.exception.not-permission': '403',
40 | 'menu.exception.not-find': '404',
41 | 'menu.exception.server-error': '500',
42 | 'menu.exception.trigger': 'ট্রিগার',
43 | 'menu.account': 'হিসাব',
44 | 'menu.account.center': 'অ্যাকাউন্ট কেন্দ্র',
45 | 'menu.account.settings': 'অ্যাকাউন্ট সেটিংস',
46 | 'menu.account.trigger': 'ট্রিগার ত্রুটি',
47 | 'menu.account.logout': 'প্রস্থান',
48 | 'menu.editor': 'গ্রাফিক সম্পাদক',
49 | 'menu.editor.flow': 'ফ্লো এডিটর',
50 | 'menu.editor.mind': 'মাইন্ড এডিটর',
51 | 'menu.editor.koni': 'কোনি সম্পাদক',
52 | };
53 |
--------------------------------------------------------------------------------
/src/locales/id-ID/menu.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'menu.welcome': 'Selamat Datang',
3 | 'menu.more-blocks': 'Blocks Lainnya',
4 | 'menu.home': 'Halaman Awal',
5 | 'menu.admin': 'Admin',
6 | 'menu.admin.sub-page': 'Sub-Halaman',
7 | 'menu.login': 'Masuk',
8 | 'menu.register': 'Pendaftaran',
9 | 'menu.register-result': 'Hasil Pendaftaran',
10 | 'menu.dashboard': 'Dasbor',
11 | 'menu.dashboard.analysis': 'Analisis',
12 | 'menu.dashboard.monitor': 'Monitor',
13 | 'menu.dashboard.workplace': 'Workplace',
14 | 'menu.exception.403': '403',
15 | 'menu.exception.404': '404',
16 | 'menu.exception.500': '500',
17 | 'menu.form': 'Form',
18 | 'menu.form.basic-form': 'Form Dasar',
19 | 'menu.form.step-form': 'Form Bertahap',
20 | 'menu.form.step-form.info': 'Form Bertahap(menulis informasi yang dibagikan)',
21 | 'menu.form.step-form.confirm': 'Form Bertahap(konfirmasi informasi yang dibagikan)',
22 | 'menu.form.step-form.result': 'Form Bertahap(selesai)',
23 | 'menu.form.advanced-form': 'Form Lanjutan',
24 | 'menu.list': 'Daftar',
25 | 'menu.list.table-list': 'Tabel Pencarian',
26 | 'menu.list.basic-list': 'Daftar Dasar',
27 | 'menu.list.card-list': 'Daftar Kartu',
28 | 'menu.list.search-list': 'Daftar Pencarian',
29 | 'menu.list.search-list.articles': 'Daftar Pencarian(artikel)',
30 | 'menu.list.search-list.projects': 'Daftar Pencarian(projek)',
31 | 'menu.list.search-list.applications': 'Daftar Pencarian(aplikasi)',
32 | 'menu.profile': 'Profil',
33 | 'menu.profile.basic': 'Profil Dasar',
34 | 'menu.profile.advanced': 'Profile Lanjutan',
35 | 'menu.result': 'Hasil',
36 | 'menu.result.success': 'Sukses',
37 | 'menu.result.fail': 'Gagal',
38 | 'menu.exception': 'Pengecualian',
39 | 'menu.exception.not-permission': '403',
40 | 'menu.exception.not-find': '404',
41 | 'menu.exception.server-error': '500',
42 | 'menu.exception.trigger': 'Jalankan',
43 | 'menu.account': 'Akun',
44 | 'menu.account.center': 'Detail Akun',
45 | 'menu.account.settings': 'Pengaturan Akun',
46 | 'menu.account.trigger': 'Mengaktivasi Error',
47 | 'menu.account.logout': 'Keluar',
48 | 'menu.editor': 'Penyusun Grafis',
49 | 'menu.editor.flow': 'Penyusun Alur',
50 | 'menu.editor.mind': 'Penyusun Mind',
51 | 'menu.editor.koni': 'Penyusun Koni',
52 | };
53 |
--------------------------------------------------------------------------------
/src/locales/pt-BR/menu.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'menu.welcome': 'Welcome',
3 | 'menu.more-blocks': 'More Blocks',
4 | 'menu.home': 'Início',
5 | 'menu.admin': 'Admin',
6 | 'menu.admin.sub-page': 'Sub-Page',
7 | 'menu.login': 'Login',
8 | 'menu.register': 'Registro',
9 | 'menu.register-result': 'Resultado de registro',
10 | 'menu.dashboard': 'Dashboard',
11 | 'menu.dashboard.analysis': 'Análise',
12 | 'menu.dashboard.monitor': 'Monitor',
13 | 'menu.dashboard.workplace': 'Ambiente de Trabalho',
14 | 'menu.exception.403': '403',
15 | 'menu.exception.404': '404',
16 | 'menu.exception.500': '500',
17 | 'menu.form': 'Formulário',
18 | 'menu.form.basic-form': 'Formulário Básico',
19 | 'menu.form.step-form': 'Formulário Assistido',
20 | 'menu.form.step-form.info': 'Formulário Assistido(gravar informações de transferência)',
21 | 'menu.form.step-form.confirm': 'Formulário Assistido(confirmar informações de transferência)',
22 | 'menu.form.step-form.result': 'Formulário Assistido(finalizado)',
23 | 'menu.form.advanced-form': 'Formulário Avançado',
24 | 'menu.list': 'Lista',
25 | 'menu.list.table-list': 'Tabela de Busca',
26 | 'menu.list.basic-list': 'Lista Básica',
27 | 'menu.list.card-list': 'Lista de Card',
28 | 'menu.list.search-list': 'Lista de Busca',
29 | 'menu.list.search-list.articles': 'Lista de Busca(artigos)',
30 | 'menu.list.search-list.projects': 'Lista de Busca(projetos)',
31 | 'menu.list.search-list.applications': 'Lista de Busca(aplicações)',
32 | 'menu.profile': 'Perfil',
33 | 'menu.profile.basic': 'Perfil Básico',
34 | 'menu.profile.advanced': 'Perfil Avançado',
35 | 'menu.result': 'Resultado',
36 | 'menu.result.success': 'Sucesso',
37 | 'menu.result.fail': 'Falha',
38 | 'menu.exception': 'Exceção',
39 | 'menu.exception.not-permission': '403',
40 | 'menu.exception.not-find': '404',
41 | 'menu.exception.server-error': '500',
42 | 'menu.exception.trigger': 'Disparar',
43 | 'menu.account': 'Conta',
44 | 'menu.account.center': 'Central da Conta',
45 | 'menu.account.settings': 'Configurar Conta',
46 | 'menu.account.trigger': 'Disparar Erro',
47 | 'menu.account.logout': 'Sair',
48 | 'menu.editor': 'Graphic Editor',
49 | 'menu.editor.flow': 'Flow Editor',
50 | 'menu.editor.mind': 'Mind Editor',
51 | 'menu.editor.koni': 'Koni Editor',
52 | };
53 |
--------------------------------------------------------------------------------
/src/pages/Index/components/BarChart.tsx:
--------------------------------------------------------------------------------
1 | import {useEffect} from 'react'
2 | import * as echarts from 'echarts'
3 | import styles from './styles.less'
4 | import React from 'react'
5 | import {Card} from 'antd'
6 |
7 | /**
8 | * 扇形图
9 | */
10 | const BarChart: React.FC = () => {
11 |
12 | let barChart: HTMLDivElement;
13 |
14 | const config: Record = {
15 | tooltip: {
16 | trigger: 'item',
17 | formatter: '{a}
{b} : {c} ({d}%)'
18 | },
19 | legend: {
20 | left: 'center',
21 | bottom: '10',
22 | data: ['Industries', 'Technology', 'Forex', 'Gold', 'Forecasts']
23 | },
24 | series: [
25 | {
26 | name: 'WEEKLY WRITE ARTICLES',
27 | type: 'pie',
28 | roseType: 'radius',
29 | radius: [15, 95],
30 | center: ['50%', '38%'],
31 | data: [
32 | {value: 200, name: 'Industries'},
33 | {value: 240, name: 'Technology'},
34 | {value: 149, name: 'Forex'},
35 | {value: 60, name: 'Gold'},
36 | {value: 70, name: 'Forecasts'}
37 | ],
38 | animationEasing: 'cubicInOut',
39 | animationDuration: 2600
40 | }
41 | ]
42 |
43 | }
44 |
45 | // 第一次渲染时执行
46 | useEffect(() => {
47 | // 获取echarts实例
48 | let instance: any = echarts.init(barChart)
49 | // 开启自适应
50 | window.addEventListener('resize', instance.resize())
51 | // 设置参数
52 | instance.setOption(config)
53 | // if (instance) {
54 | // setTimeout(() => {
55 | // instance.resize()
56 | // }, 200)
57 | // }
58 | if (instance === undefined) {
59 | instance = echarts.init(barChart);
60 | } else {
61 | instance.resize()
62 | }
63 |
64 | }, [])
65 |
66 | return (
67 |
68 | barChart = ref}
70 | className={styles.barChart}
71 | >
72 |
73 |
74 |
75 | )
76 |
77 | }
78 |
79 | export default BarChart
80 |
--------------------------------------------------------------------------------
/src/service-worker.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-restricted-globals */
2 | /* eslint-disable no-underscore-dangle */
3 | /* globals workbox */
4 | workbox.core.setCacheNameDetails({
5 | prefix: 'antd-pro',
6 | suffix: 'v5',
7 | });
8 | // Control all opened tabs ASAP
9 | workbox.clientsClaim();
10 |
11 | /**
12 | * Use precaching list generated by workbox in build process.
13 | * https://developers.google.com/web/tools/workbox/reference-docs/latest/workbox.precaching
14 | */
15 | workbox.precaching.precacheAndRoute(self.__precacheManifest || []);
16 |
17 | /**
18 | * Register a navigation route.
19 | * https://developers.google.com/web/tools/workbox/modules/workbox-routing#how_to_register_a_navigation_route
20 | */
21 | workbox.routing.registerNavigationRoute('/index.html');
22 |
23 | /**
24 | * Use runtime cache:
25 | * https://developers.google.com/web/tools/workbox/reference-docs/latest/workbox.routing#.registerRoute
26 | *
27 | * Workbox provides all common caching strategies including CacheFirst, NetworkFirst etc.
28 | * https://developers.google.com/web/tools/workbox/reference-docs/latest/workbox.strategies
29 | */
30 |
31 | /** Handle API requests */
32 | workbox.routing.registerRoute(/\/api\//, workbox.strategies.networkFirst());
33 |
34 | /** Handle third party requests */
35 | workbox.routing.registerRoute(
36 | /^https:\/\/gw\.alipayobjects\.com\//,
37 | workbox.strategies.networkFirst(),
38 | );
39 | workbox.routing.registerRoute(
40 | /^https:\/\/cdnjs\.cloudflare\.com\//,
41 | workbox.strategies.networkFirst(),
42 | );
43 | workbox.routing.registerRoute(/\/color.less/,
44 | workbox.strategies.networkFirst());
45 |
46 | /** Response to client after skipping waiting with MessageChannel */
47 | addEventListener('message', (event) => {
48 | const replyPort = event.ports[0];
49 | const message = event.data;
50 | if (replyPort && message && message.type === 'skip-waiting') {
51 | event.waitUntil(
52 | self.skipWaiting().then(
53 | () => {
54 | replyPort.postMessage({
55 | error: null,
56 | });
57 | },
58 | (error) => {
59 | replyPort.postMessage({
60 | error,
61 | });
62 | },
63 | ),
64 | );
65 | }
66 | });
67 |
--------------------------------------------------------------------------------
/src/pages/Login/service.ts:
--------------------------------------------------------------------------------
1 | import TWT from '@/setting';
2 | import { request } from '@umijs/max';
3 |
4 | // 请求的控制器名称
5 | const controller = '/auth';
6 |
7 | // window.btoa('twelvet:123456') 提前加密,不要暴露
8 | const auth = `Basic dHdlbHZldDoxMjM0NTY=`;
9 |
10 | /**
11 | * 登录
12 | * @param params 登录参数
13 | * @returns
14 | */
15 | export async function login(params: Record) {
16 | return request(`${controller}/oauth2/token`, {
17 | method: 'POST',
18 | headers: {
19 | Authorization: auth,
20 | 'X-Requested-With': 'XMLHttpRequest',
21 | Accept: '*/*',
22 | },
23 | data: {
24 | ...params,
25 | },
26 | params: {
27 | ...params,
28 | grant_type: params.grantType,
29 | scope: 'server',
30 | },
31 | });
32 | }
33 |
34 | /**
35 | * 第三方授权登录
36 | * @param params 登录参数
37 | * @returns
38 | */
39 | export async function oauth2Login(params: Record) {
40 | return request(`${controller}/oauth2/token`, {
41 | method: 'POST',
42 | headers: {
43 | Authorization: auth,
44 | 'X-Requested-With': 'XMLHttpRequest',
45 | Accept: '*/*',
46 | },
47 | params: {
48 | ...params,
49 | scope: 'server',
50 | },
51 | });
52 | }
53 |
54 | /**
55 | * 获取当前用户登录信息
56 | * @returns
57 | */
58 | export async function getCurrentUser(): Promise {
59 | return request(`system/user/getInfo`, {
60 | method: 'GET',
61 | });
62 | }
63 |
64 | /**
65 | * 获取当前用户菜单路由
66 | * @returns
67 | */
68 | export async function getRouters(): Promise {
69 | return request(`system/menu/getRouters`, {
70 | method: 'GET',
71 | });
72 | }
73 |
74 | /**
75 | * 刷新令牌
76 | */
77 | export async function refreshToken() {
78 | const formData: any = {
79 | refresh_token: localStorage.getItem(TWT.refreshToken),
80 | grant_type: 'refresh_token',
81 | };
82 | return request(`${controller}/oauth2/token`, {
83 | method: 'POST',
84 | headers: {
85 | Authorization: auth,
86 | },
87 | // 将对象转换为查询字符串,表单请求
88 | data: Object.keys(formData)
89 | .map((k) => `${encodeURIComponent(k)}=${encodeURIComponent(formData[k])}`)
90 | .join('&'),
91 | });
92 | }
93 |
--------------------------------------------------------------------------------
/src/pages/Monitor/Redis/components/KeyChart.tsx:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from 'react';
2 | import * as echarts from 'echarts'
3 | import styles from './styles.less';
4 | import React from 'react';
5 | import { Card } from 'antd';
6 |
7 | /**
8 | * 折线图
9 | */
10 | const LineChart: React.FC<{ dbSize: number, time: string }> = props => {
11 |
12 | // 图表参数
13 | const { dbSize, time } = props
14 |
15 | const [timeData, setTimeData] = useState([])
16 | const [dbSizeData, setDbSizeData] = useState([])
17 |
18 | const config: Record = {
19 | series: [
20 | {
21 | name: 'Pressure',
22 | type: 'gauge',
23 | progress: {
24 | show: true
25 | },
26 | detail: {
27 | valueAnimation: true,
28 | formatter: '{value}'
29 | },
30 | data: [
31 |
32 | ]
33 | }
34 | ]
35 |
36 | }
37 |
38 | // 设置echarts属性
39 | const setEcharts = (instance: any | undefined = undefined) => {
40 | if (!dbSize) {
41 | return
42 | }
43 |
44 | const ctr = instance || lineChart
45 |
46 | config.series[0].data = [{
47 | value: dbSize,
48 | name: 'Key数量'
49 | }]
50 | // 设置数据
51 | ctr.setOption(config)
52 | ctr.hideLoading()
53 |
54 | }
55 |
56 | let lineChartRef: HTMLDivElement;
57 | const [lineChart, setLineChart] = useState()
58 |
59 | // 第一次渲染时执行
60 | useEffect(() => {
61 | // 获取echarts实例
62 | const instance: any = echarts.init(lineChartRef)
63 | instance.showLoading()
64 | // 设置参数
65 | setEcharts(instance)
66 | // 开启自适应
67 | window.addEventListener('resize', instance.resize)
68 |
69 | // 设置到state
70 | setLineChart(instance)
71 |
72 | }, [])
73 |
74 | // 依赖props更新
75 | useEffect(() => {
76 | if (!lineChart) {
77 | return
78 | }
79 | setEcharts()
80 | }, [props])
81 |
82 | return (
83 |
84 | {
86 | lineChartRef = ref
87 | }}
88 | className={styles.lineChart}
89 | />
90 |
91 | )
92 |
93 | }
94 |
95 | export default LineChart
96 |
--------------------------------------------------------------------------------
/src/services/ant-design-pro/api.ts:
--------------------------------------------------------------------------------
1 | // @ts-ignore
2 | /* eslint-disable */
3 | import {request} from '@umijs/max';
4 |
5 | /** 获取当前的用户 GET /api/currentUser */
6 | export async function currentUser(options?: { [key: string]: any }) {
7 | return request<{
8 | data: API.CurrentUser;
9 | }>('/api/currentUser', {
10 | method: 'GET',
11 | ...(options || {}),
12 | });
13 | }
14 |
15 | /** 退出登录接口 POST /api/login/outLogin */
16 | export async function outLogin(options?: { [key: string]: any }) {
17 | return request
>('/auth/token/logout', {
18 | method: 'DELETE',
19 | ...(options || {}),
20 | });
21 | }
22 |
23 | /** 登录接口 POST /api/login/Account */
24 | export async function login(body: API.LoginParams, options?: { [key: string]: any }) {
25 | return request('/api/login/Account', {
26 | method: 'POST',
27 | headers: {
28 | 'Content-Type': 'application/json',
29 | },
30 | data: body,
31 | ...(options || {}),
32 | });
33 | }
34 |
35 | /** 此处后端没有提供注释 GET /api/notices */
36 | export async function getNotices(options?: { [key: string]: any }) {
37 | return request('/api/notices', {
38 | method: 'GET',
39 | ...(options || {}),
40 | });
41 | }
42 |
43 | /** 获取规则列表 GET /api/rule */
44 | export async function rule(
45 | params: {
46 | // query
47 | /** 当前的页码 */
48 | current?: number;
49 | /** 页面的容量 */
50 | pageSize?: number;
51 | },
52 | options?: { [key: string]: any },
53 | ) {
54 | return request('/api/rule', {
55 | method: 'GET',
56 | params: {
57 | ...params,
58 | },
59 | ...(options || {}),
60 | });
61 | }
62 |
63 | /** 新建规则 PUT /api/rule */
64 | export async function updateRule(options?: { [key: string]: any }) {
65 | return request('/api/rule', {
66 | method: 'PUT',
67 | ...(options || {}),
68 | });
69 | }
70 |
71 | /** 新建规则 POST /api/rule */
72 | export async function addRule(options?: { [key: string]: any }) {
73 | return request('/api/rule', {
74 | method: 'POST',
75 | ...(options || {}),
76 | });
77 | }
78 |
79 | /** 删除规则 DELETE /api/rule */
80 | export async function removeRule(options?: { [key: string]: any }) {
81 | return request>('/api/rule', {
82 | method: 'DELETE',
83 | ...(options || {}),
84 | });
85 | }
86 |
--------------------------------------------------------------------------------
/src/pages/Login/OAuth2/index.tsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect } from 'react';
2 | import { message, Spin } from 'antd';
3 | import { useParams, useSearchParams } from '@@/exports';
4 | import { history, useIntl, useModel } from '@umijs/max';
5 | import { oauth2Login } from '../../Login/service';
6 | import { setAuthority } from '@/utils/twelvet';
7 | import { flushSync } from 'react-dom';
8 |
9 | /**
10 | * 第三方登录
11 | * @constructor
12 | */
13 | const OAuth2: React.FC = () => {
14 | // Query参数
15 | const [queryParams] = useSearchParams();
16 |
17 | // 路径参数
18 | const pathParams = useParams();
19 |
20 | const { initialState, setInitialState } = useModel('@@initialState');
21 |
22 | const intl = useIntl();
23 |
24 | const fetchUserInfo = async () => {
25 | const userInfo = await initialState?.fetchUserInfo?.();
26 | if (userInfo) {
27 | flushSync(() => {
28 | setInitialState((s) => ({
29 | ...s,
30 | // 用户信息
31 | currentUser: {
32 | user: userInfo.user,
33 | menus: userInfo.menus,
34 | permissions: userInfo.permissions,
35 | roles: userInfo.roles
36 | }
37 | }));
38 | })
39 | }
40 | };
41 |
42 | /**
43 | * 进行登录
44 | */
45 | const login = async () => {
46 | const code = queryParams.get('code');
47 | const state = queryParams.get('state');
48 | const oauth2 = pathParams['oauth2'];
49 |
50 | const data = await oauth2Login({
51 | code,
52 | state,
53 | grant_type: oauth2
54 | })
55 |
56 | if (data.code === 200) {
57 |
58 | setAuthority(data);
59 |
60 | // 进行获取账号信息
61 | await fetchUserInfo();
62 |
63 | const defaultloginSuccessMessage = intl.formatMessage({
64 | id: 'pages.login.success',
65 | defaultMessage: '登录成功!',
66 | });
67 |
68 |
69 | message.success(defaultloginSuccessMessage);
70 |
71 | /** 此方法会跳转到 redirect 参数所在的位置 */
72 | const urlParams = new URL(window.location.href).searchParams;
73 | history.push(urlParams.get('redirect') || '/');
74 | return;
75 | }
76 |
77 | message.error(data.msg);
78 | history.push('/login');
79 | };
80 |
81 | useEffect(() => {
82 | login().then();
83 | });
84 |
85 | return ;
86 | };
87 |
88 | export default OAuth2;
89 |
--------------------------------------------------------------------------------
/src/locales/zh-CN/settings.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.settings.menuMap.basic': '基本设置',
3 | 'app.settings.menuMap.security': '安全设置',
4 | 'app.settings.menuMap.binding': '账号绑定',
5 | 'app.settings.menuMap.notification': '新消息通知',
6 | 'app.settings.basic.avatar': '头像',
7 | 'app.settings.basic.change-avatar': '更换头像',
8 | 'app.settings.basic.email': '邮箱',
9 | 'app.settings.basic.email-message': '请输入您的邮箱!',
10 | 'app.settings.basic.nickname': '昵称',
11 | 'app.settings.basic.nickname-message': '请输入您的昵称!',
12 | 'app.settings.basic.profile': '个人简介',
13 | 'app.settings.basic.profile-message': '请输入个人简介!',
14 | 'app.settings.basic.profile-placeholder': '个人简介',
15 | 'app.settings.basic.country': '国家/地区',
16 | 'app.settings.basic.country-message': '请输入您的国家或地区!',
17 | 'app.settings.basic.geographic': '所在省市',
18 | 'app.settings.basic.geographic-message': '请输入您的所在省市!',
19 | 'app.settings.basic.address': '街道地址',
20 | 'app.settings.basic.address-message': '请输入您的街道地址!',
21 | 'app.settings.basic.phone': '联系电话',
22 | 'app.settings.basic.phone-message': '请输入您的联系电话!',
23 | 'app.settings.basic.update': '更新基本信息',
24 | 'app.settings.security.strong': '强',
25 | 'app.settings.security.medium': '中',
26 | 'app.settings.security.weak': '弱',
27 | 'app.settings.security.password': '账户密码',
28 | 'app.settings.security.password-description': '当前密码强度',
29 | 'app.settings.security.phone': '密保手机',
30 | 'app.settings.security.phone-description': '已绑定手机',
31 | 'app.settings.security.question': '密保问题',
32 | 'app.settings.security.question-description': '未设置密保问题,密保问题可有效保护账户安全',
33 | 'app.settings.security.email': '备用邮箱',
34 | 'app.settings.security.email-description': '已绑定邮箱',
35 | 'app.settings.security.mfa': 'MFA 设备',
36 | 'app.settings.security.mfa-description': '未绑定 MFA 设备,绑定后,可以进行二次确认',
37 | 'app.settings.security.modify': '修改',
38 | 'app.settings.security.set': '设置',
39 | 'app.settings.security.bind': '绑定',
40 | 'app.settings.binding.taobao': '绑定淘宝',
41 | 'app.settings.binding.taobao-description': '当前未绑定淘宝账号',
42 | 'app.settings.binding.alipay': '绑定支付宝',
43 | 'app.settings.binding.alipay-description': '当前未绑定支付宝账号',
44 | 'app.settings.binding.dingding': '绑定钉钉',
45 | 'app.settings.binding.dingding-description': '当前未绑定钉钉账号',
46 | 'app.settings.binding.bind': '绑定',
47 | 'app.settings.notification.password': '账户密码',
48 | 'app.settings.notification.password-description': '其他用户的消息将以站内信的形式通知',
49 | 'app.settings.notification.messages': '系统消息',
50 | 'app.settings.notification.messages-description': '系统消息将以站内信的形式通知',
51 | 'app.settings.notification.todo': '待办任务',
52 | 'app.settings.notification.todo-description': '待办任务将以站内信的形式通知',
53 | 'app.settings.open': '开',
54 | 'app.settings.close': '关',
55 | };
56 |
--------------------------------------------------------------------------------
/src/locales/zh-TW/settings.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.settings.menuMap.basic': '基本設置',
3 | 'app.settings.menuMap.security': '安全設置',
4 | 'app.settings.menuMap.binding': '賬號綁定',
5 | 'app.settings.menuMap.notification': '新消息通知',
6 | 'app.settings.basic.avatar': '頭像',
7 | 'app.settings.basic.change-avatar': '更換頭像',
8 | 'app.settings.basic.email': '郵箱',
9 | 'app.settings.basic.email-message': '請輸入您的郵箱!',
10 | 'app.settings.basic.nickname': '昵稱',
11 | 'app.settings.basic.nickname-message': '請輸入您的昵稱!',
12 | 'app.settings.basic.profile': '個人簡介',
13 | 'app.settings.basic.profile-message': '請輸入個人簡介!',
14 | 'app.settings.basic.profile-placeholder': '個人簡介',
15 | 'app.settings.basic.country': '國家/地區',
16 | 'app.settings.basic.country-message': '請輸入您的國家或地區!',
17 | 'app.settings.basic.geographic': '所在省市',
18 | 'app.settings.basic.geographic-message': '請輸入您的所在省市!',
19 | 'app.settings.basic.address': '街道地址',
20 | 'app.settings.basic.address-message': '請輸入您的街道地址!',
21 | 'app.settings.basic.phone': '聯系電話',
22 | 'app.settings.basic.phone-message': '請輸入您的聯系電話!',
23 | 'app.settings.basic.update': '更新基本信息',
24 | 'app.settings.security.strong': '強',
25 | 'app.settings.security.medium': '中',
26 | 'app.settings.security.weak': '弱',
27 | 'app.settings.security.password': '賬戶密碼',
28 | 'app.settings.security.password-description': '當前密碼強度',
29 | 'app.settings.security.phone': '密保手機',
30 | 'app.settings.security.phone-description': '已綁定手機',
31 | 'app.settings.security.question': '密保問題',
32 | 'app.settings.security.question-description': '未設置密保問題,密保問題可有效保護賬戶安全',
33 | 'app.settings.security.email': '備用郵箱',
34 | 'app.settings.security.email-description': '已綁定郵箱',
35 | 'app.settings.security.mfa': 'MFA 設備',
36 | 'app.settings.security.mfa-description': '未綁定 MFA 設備,綁定後,可以進行二次確認',
37 | 'app.settings.security.modify': '修改',
38 | 'app.settings.security.set': '設置',
39 | 'app.settings.security.bind': '綁定',
40 | 'app.settings.binding.taobao': '綁定淘寶',
41 | 'app.settings.binding.taobao-description': '當前未綁定淘寶賬號',
42 | 'app.settings.binding.alipay': '綁定支付寶',
43 | 'app.settings.binding.alipay-description': '當前未綁定支付寶賬號',
44 | 'app.settings.binding.dingding': '綁定釘釘',
45 | 'app.settings.binding.dingding-description': '當前未綁定釘釘賬號',
46 | 'app.settings.binding.bind': '綁定',
47 | 'app.settings.notification.password': '賬戶密碼',
48 | 'app.settings.notification.password-description': '其他用戶的消息將以站內信的形式通知',
49 | 'app.settings.notification.messages': '系統消息',
50 | 'app.settings.notification.messages-description': '系統消息將以站內信的形式通知',
51 | 'app.settings.notification.todo': '待辦任務',
52 | 'app.settings.notification.todo-description': '待辦任務將以站內信的形式通知',
53 | 'app.settings.open': '開',
54 | 'app.settings.close': '關',
55 | };
56 |
--------------------------------------------------------------------------------
/src/pages/AI/Chat/service.ts:
--------------------------------------------------------------------------------
1 | import { eventSource } from '@/utils/twelvet';
2 | import { request } from '@umijs/max';
3 |
4 | // 请求的控制器名称
5 | const controller = '/ai/chat';
6 |
7 | /**
8 | * 查询AI知识库列表
9 | * @param query 查询参数
10 | */
11 | export async function listKnowledgeQueryDoc(query: { [key: string]: any }) {
12 | return request(`/ai/knowledge/list`, {
13 | method: `get`,
14 | params: query,
15 | });
16 | }
17 |
18 | /**
19 | * 查询对应的AI知识库聊天历史记录
20 | * @param query 查询参数
21 | */
22 | export async function pageQueryDoc(query: { [key: string]: any }) {
23 | return request(`${controller}/history/page`, {
24 | method: `get`,
25 | params: query,
26 | });
27 | }
28 |
29 | /**
30 | * TTS
31 | * @param data 查询参数
32 | */
33 | export async function tts(data: { [key: string]: any }) {
34 | return request(`${controller}/tts`, {
35 | method: `post`,
36 | data: data,
37 | });
38 | }
39 |
40 | /**
41 | * 发送SSE请求数据
42 | * @param data 请求参数
43 | * @param handleMessage 接受处理
44 | * @param handleDone 结束处理
45 | * @param handleError 错误处理
46 | * @returns AbortController 用于控制停止请求
47 | */
48 | export const sendMessage = async (
49 | data: {
50 | knowledgeId: number;
51 | content: string;
52 | carryContextFlag: boolean;
53 | },
54 | handleMessage: (data: any) => void,
55 | handleDone: () => void,
56 | handleError?: () => void,
57 | ): Promise => {
58 | return eventSource(`${controller}`, data, handleMessage, handleDone, handleError);
59 | };
60 |
61 | // export const sendMessage = async (
62 | // message: any,
63 | // handleMessage: (data: any) => void,
64 | // handleDone: () => void
65 | // ): Promise => {
66 | //
67 | // const eventSourceUrl = `/ai/chat`
68 | //
69 | // const controller = new AbortController();
70 | //
71 | // request(eventSourceUrl, {
72 | // method: 'POST',
73 | // headers: {
74 | // responseType: 'stream',
75 | // accept: 'text/event-stream', // 设置响应类型为流
76 | // },
77 | // data: {
78 | // ...message
79 | // }
80 | // }).then(response => {
81 | // //console.log('===response=====', response)
82 | // response.body.on('data', (chunk) => {
83 | // console.log('Received chunk:', chunk.toString());
84 | // });
85 | //
86 | // response.data.on('end', () => {
87 | // console.log('Stream ended');
88 | // });
89 | //
90 | // response.data.on('error', (err) => {
91 | // console.error('Stream error:', err);
92 | // });
93 | // }).catch(e => {
94 | // console.log('发生错误', e)
95 | // })
96 | //
97 | //
98 | // }
99 |
--------------------------------------------------------------------------------
/src/pages/Human/Role/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 | import {download} from '@/utils/twelvet'
3 |
4 | // 请求的控制器名称
5 | const controller = "/system/role";
6 |
7 | /**
8 | * 新增角色
9 | * @param params 搜索参数
10 | */
11 | export async function insert(params: Record) {
12 | return request(`${controller}`, {
13 | method: 'POST',
14 | data: {
15 | ...params
16 | },
17 | });
18 | }
19 |
20 | /**
21 | * 删除
22 | * @param postIds
23 | */
24 | export async function remove(postIds: (string | number)[] | string) {
25 | return request(`${controller}/${postIds}`, {
26 | method: 'DELETE',
27 | });
28 | }
29 |
30 | /**
31 | * 修改菜单
32 | * @param params 搜索参数
33 | */
34 | export async function update(params: Record) {
35 | return request(`${controller}`, {
36 | method: 'PUT',
37 | data: {
38 | ...params
39 | },
40 | });
41 | }
42 |
43 | /**
44 | * 获取分页 Data
45 | * @param params 搜索参数
46 | */
47 | export async function pageQuery(params: Record) {
48 | return request(`${controller}/pageQuery`, {
49 | method: 'GET',
50 | params: {
51 | ...params
52 | },
53 | });
54 | }
55 |
56 | /**
57 | * 获取指定角色信息
58 | * @param postId
59 | */
60 | export async function getByroleId(postId: number) {
61 | return request(`${controller}/${postId}`, {
62 | method: 'GET'
63 | });
64 | }
65 |
66 | /**
67 | * 获取菜单树根据ID
68 | * @param postId
69 | */
70 | export async function roleMenuTreeSelectByMenuId(postId: number) {
71 | return request(`/system/menu/roleMenuTreeSelect/${postId}`, {
72 | method: 'GET'
73 | });
74 | }
75 |
76 | /**
77 | * 获取菜单树
78 | */
79 | export async function roleMenuTreeSelect() {
80 | return request(`/system/menu/treeSelect`, {
81 | method: 'GET'
82 | });
83 | }
84 |
85 | /**
86 | * 获取部门树ID
87 | * @param postId
88 | */
89 | export async function roleDeptTreeSelectByDeptId(postId: number) {
90 | return request(`/system/dept/roleDeptTreeSelect/${postId}`, {
91 | method: 'GET'
92 | });
93 | }
94 |
95 | /**
96 | * 获取部门树
97 | */
98 | export async function roleDeptTreeSelect() {
99 | return request(`/system/dept/treeSelect`, {
100 | method: 'GET'
101 | });
102 | }
103 |
104 | /**
105 | * 导出Excel
106 | * @param params
107 | */
108 | export async function exportExcel(params?: Record) {
109 | return download(`${controller}/export`, params);
110 | }
111 |
112 | /**
113 | * 更改状态
114 | * @param params
115 | */
116 | export async function changeStatus(params?: Record) {
117 | return request(`${controller}/changeStatus`, {
118 | method: 'PUT',
119 | data: {
120 | ...params
121 | }
122 | })
123 | }
124 |
--------------------------------------------------------------------------------
/src/locales/ja-JP/settings.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.settings.menuMap.basic': '基本設定',
3 | 'app.settings.menuMap.security': 'セキュリティ設定',
4 | 'app.settings.menuMap.binding': 'アカウントのバインド',
5 | 'app.settings.menuMap.notification': '新しいメッセージの通知',
6 | 'app.settings.basic.avatar': 'アバター',
7 | 'app.settings.basic.change-avatar': 'アバターを変更する',
8 | 'app.settings.basic.email': 'メール',
9 | 'app.settings.basic.email-message': 'メールアドレスを入力してください!',
10 | 'app.settings.basic.nickname': 'ニックネーム',
11 | 'app.settings.basic.nickname-message': 'ニックネームを入力してください!',
12 | 'app.settings.basic.profile': '個人プロフィール',
13 | 'app.settings.basic.profile-message': '個人プロフィールを入力してください!',
14 | 'app.settings.basic.profile-placeholder': '自己紹介',
15 | 'app.settings.basic.country': '国/地域',
16 | 'app.settings.basic.country-message': 'あなたの国を入力してください!',
17 | 'app.settings.basic.geographic': '州または市',
18 | 'app.settings.basic.geographic-message': '地理情報を入力してください!',
19 | 'app.settings.basic.address': '住所',
20 | 'app.settings.basic.address-message': '住所を入力してください!',
21 | 'app.settings.basic.phone': '電話番号',
22 | 'app.settings.basic.phone-message': '電話番号を入力してください!',
23 | 'app.settings.basic.update': '更新情報',
24 | 'app.settings.security.strong': '強い',
25 | 'app.settings.security.medium': 'ミディアム',
26 | 'app.settings.security.weak': '弱い',
27 | 'app.settings.security.password': 'アカウントパスワード',
28 | 'app.settings.security.password-description': '現在のパスワードの強度',
29 | 'app.settings.security.phone': 'セキュリティ電話番号',
30 | 'app.settings.security.phone-description': 'バインドされた電話番号',
31 | 'app.settings.security.question': '秘密の質問',
32 | 'app.settings.security.question-description':
33 | 'セキュリティの質問が設定されてません。セキュリティポリシーはアカウントのセキュリティを効果的に保護できます',
34 | 'app.settings.security.email': 'バックアップメール',
35 | 'app.settings.security.email-description': 'バインドされたメール',
36 | 'app.settings.security.mfa': '多要素認証デバイス',
37 | 'app.settings.security.mfa-description':
38 | 'バインドされていない多要素認証デバイスは、バインド後、2回確認できます',
39 | 'app.settings.security.modify': '変更する',
40 | 'app.settings.security.set': 'セットする',
41 | 'app.settings.security.bind': 'バインド',
42 | 'app.settings.binding.taobao': 'タオバオをバインドする',
43 | 'app.settings.binding.taobao-description': '現在バインドされていないタオバオアカウント',
44 | 'app.settings.binding.alipay': 'アリペイをバインドする',
45 | 'app.settings.binding.alipay-description': '現在バインドされていないアリペイアカウント',
46 | 'app.settings.binding.dingding': 'ディントークをバインドする',
47 | 'app.settings.binding.dingding-description': '現在バインドされていないディントークアカウント',
48 | 'app.settings.binding.bind': 'バインド',
49 | 'app.settings.notification.password': 'アカウントパスワード',
50 | 'app.settings.notification.password-description':
51 | '他のユーザーからのメッセージは、ステーションレターの形式で通知されます',
52 | 'app.settings.notification.messages': 'システムメッセージ',
53 | 'app.settings.notification.messages-description':
54 | 'システムメッセージは、ステーションレターの形式で通知されます',
55 | 'app.settings.notification.todo': 'To Do(用事) 通知',
56 | 'app.settings.notification.todo-description': 'To Doタスクは、内部レターの形式で通知されます',
57 | 'app.settings.open': '開く',
58 | 'app.settings.close': '閉じる',
59 | };
60 |
--------------------------------------------------------------------------------
/src/services/swagger/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace API {
2 | type ApiResponse = {
3 | code?: number;
4 | type?: string;
5 | message?: string;
6 | };
7 |
8 | type Category = {
9 | id?: number;
10 | name?: string;
11 | };
12 |
13 | type deleteOrderParams = {
14 | /** ID of the order that needs to be deleted */
15 | orderId: number;
16 | };
17 |
18 | type deletePetParams = {
19 | api_key?: string;
20 | /** Pet id to delete */
21 | petId: number;
22 | };
23 |
24 | type deleteUserParams = {
25 | /** The name that needs to be deleted */
26 | username: string;
27 | };
28 |
29 | type findPetsByStatusParams = {
30 | /** Status values that need to be considered for filter */
31 | status: ('available' | 'pending' | 'sold')[];
32 | };
33 |
34 | type findPetsByTagsParams = {
35 | /** Tags to filter by */
36 | tags: string[];
37 | };
38 |
39 | type getOrderByIdParams = {
40 | /** ID of pet that needs to be fetched */
41 | orderId: number;
42 | };
43 |
44 | type getPetByIdParams = {
45 | /** ID of pet to return */
46 | petId: number;
47 | };
48 |
49 | type getUserByNameParams = {
50 | /** The name that needs to be fetched. Use user1 for testing. */
51 | username: string;
52 | };
53 |
54 | type loginUserParams = {
55 | /** The user name for login */
56 | username: string;
57 | /** The password for login in clear text */
58 | password: string;
59 | };
60 |
61 | type Order = {
62 | id?: number;
63 | petId?: number;
64 | quantity?: number;
65 | shipDate?: string;
66 | /** Order Status */
67 | status?: 'placed' | 'approved' | 'delivered';
68 | complete?: boolean;
69 | };
70 |
71 | type Pet = {
72 | id?: number;
73 | category?: Category;
74 | name: string;
75 | photoUrls: string[];
76 | tags?: Tag[];
77 | /** pet status in the store */
78 | status?: 'available' | 'pending' | 'sold';
79 | };
80 |
81 | type Tag = {
82 | id?: number;
83 | name?: string;
84 | };
85 |
86 | type updatePetWithFormParams = {
87 | /** ID of pet that needs to be updated */
88 | petId: number;
89 | };
90 |
91 | type updateUserParams = {
92 | /** name that need to be updated */
93 | username: string;
94 | };
95 |
96 | type uploadFileParams = {
97 | /** ID of pet to update */
98 | petId: number;
99 | };
100 |
101 | type User = {
102 | id?: number;
103 | username?: string;
104 | firstName?: string;
105 | lastName?: string;
106 | email?: string;
107 | password?: string;
108 | phone?: string;
109 | /** User Status */
110 | userStatus?: number;
111 | };
112 | }
113 |
--------------------------------------------------------------------------------
/src/pages/Human/Staff/service.ts:
--------------------------------------------------------------------------------
1 | import {request} from '@umijs/max'
2 | import {download, upload} from '@/utils/twelvet'
3 |
4 | // 请求的控制器名称
5 | const controller = "/system/user";
6 |
7 | /**
8 | * 新增职员
9 | * @param params 搜索参数
10 | */
11 | export async function insert(params: Record) {
12 | return request(`${controller}`, {
13 | method: 'POST',
14 | data: {
15 | ...params
16 | },
17 | });
18 | }
19 |
20 | /**
21 | * 删除
22 | * @param userIds
23 | */
24 | export async function remove(userIds: (string | number)[] | string) {
25 | return request(`${controller}/${userIds}`, {
26 | method: 'DELETE',
27 | });
28 | }
29 |
30 | /**
31 | * 修改菜单
32 | * @param params 搜索参数
33 | */
34 | export async function update(params: Record) {
35 | return request(`${controller}`, {
36 | method: 'PUT',
37 | data: {
38 | ...params
39 | },
40 | });
41 | }
42 |
43 | /**
44 | * 修改密码
45 | * @param params 修改密码
46 | */
47 | export async function updatePassword(params: Record) {
48 | return request(`${controller}/resetPwd`, {
49 | method: 'PUT',
50 | data: {
51 | ...params
52 | },
53 | });
54 | }
55 |
56 | /**
57 | * 获取分页 Data
58 | * @param params 搜索参数
59 | */
60 | export async function pageQuery(params: Record) {
61 | return request(`${controller}/pageQuery`, {
62 | method: 'GET',
63 | params: {
64 | ...params
65 | },
66 | });
67 | }
68 |
69 | /**
70 | *
71 | * @param params
72 | */
73 | export async function changeStatus(params: Record) {
74 | return request(`${controller}/changeStatus`, {
75 | method: 'PUT',
76 | data: {
77 | ...params
78 | },
79 | });
80 | }
81 |
82 | /**
83 | * 获取指定职员信息
84 | * @param userId
85 | */
86 | export async function getByStaffId(userId: number) {
87 | return request(`${controller}/${userId}`, {
88 | method: 'GET'
89 | });
90 | }
91 |
92 | /**
93 | * 获取职员新增所属信息
94 | */
95 | export async function getByStaff() {
96 | return request(`${controller}/`, {
97 | method: 'GET'
98 | });
99 | }
100 |
101 | /**
102 | * 导出Excel
103 | * @param params
104 | */
105 | export async function exportExcel(params?: Record) {
106 | return download(`${controller}/export`, params);
107 | }
108 |
109 | /**
110 | * 获取部门树
111 | */
112 | export async function treeSelect() {
113 | return request(`/system/dept/treeSelect`, {
114 | method: 'GET'
115 | });
116 | }
117 |
118 | /**
119 | * 下载模板
120 | * @param params
121 | */
122 | export async function exportTemplate(params?: Record) {
123 | return download(`${controller}/exportTemplate`, params);
124 | }
125 |
126 | /**
127 | * 上传数据
128 | * @param formData
129 | */
130 | export async function importData(formData: FormData) {
131 | return upload(`${controller}/importData`, formData);
132 | }
133 |
--------------------------------------------------------------------------------
/src/global.tsx:
--------------------------------------------------------------------------------
1 | import {useIntl} from '@umijs/max';
2 | import {Button, message, notification} from 'antd';
3 | import defaultSettings from '../config/defaultSettings';
4 |
5 | const {pwa} = defaultSettings;
6 | const isHttps = document.location.protocol === 'https:';
7 |
8 | const clearCache = () => {
9 | // remove all caches
10 | if (window.caches) {
11 | caches
12 | .keys()
13 | .then((keys) => {
14 | keys.forEach((key) => {
15 | caches.delete(key);
16 | });
17 | })
18 | .catch((e) => console.log(e));
19 | }
20 | };
21 |
22 | // if pwa is true
23 | if (pwa) {
24 | // Notify user if offline now
25 | window.addEventListener('sw.offline', () => {
26 | message.warning(useIntl().formatMessage({id: 'app.pwa.offline'}));
27 | });
28 |
29 | // Pop up a prompt on the page asking the user if they want to use the latest version
30 | window.addEventListener('sw.updated', (event: Event) => {
31 | const e = event as CustomEvent;
32 | const reloadSW = async () => {
33 | // Check if there is sw whose state is waiting in ServiceWorkerRegistration
34 | // https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration
35 | const worker = e.detail && e.detail.waiting;
36 | if (!worker) {
37 | return true;
38 | }
39 | // Send skip-waiting event to waiting SW with MessageChannel
40 | await new Promise((resolve, reject) => {
41 | const channel = new MessageChannel();
42 | channel.port1.onmessage = (msgEvent) => {
43 | if (msgEvent.data.error) {
44 | reject(msgEvent.data.error);
45 | } else {
46 | resolve(msgEvent.data);
47 | }
48 | };
49 | worker.postMessage({type: 'skip-waiting'}, [channel.port2]);
50 | });
51 |
52 | clearCache();
53 | window.location.reload();
54 | return true;
55 | };
56 | const key = `open${Date.now()}`;
57 | const btn = (
58 |
67 | );
68 | notification.open({
69 | message: useIntl().formatMessage({id: 'app.pwa.serviceworker.updated'}),
70 | description: useIntl().formatMessage({id: 'app.pwa.serviceworker.updated.hint'}),
71 | btn,
72 | key,
73 | onClose: async () => null,
74 | });
75 | });
76 | } else if ('serviceWorker' in navigator && isHttps) {
77 | // unregister service worker
78 | const {serviceWorker} = navigator;
79 | if (serviceWorker.getRegistrations) {
80 | serviceWorker.getRegistrations().then((sws) => {
81 | sws.forEach((sw) => {
82 | sw.unregister();
83 | });
84 | });
85 | }
86 | serviceWorker.getRegistration().then((sw) => {
87 | if (sw) sw.unregister();
88 | });
89 |
90 | clearCache();
91 | }
92 |
--------------------------------------------------------------------------------
/src/pages/Account/Settings/components/UserInfo.tsx:
--------------------------------------------------------------------------------
1 | import React, {useEffect} from 'react'
2 |
3 | import {ProForm, ProFormRadio, ProFormText} from '@ant-design/pro-components'
4 | import {Form, message} from 'antd'
5 | import {updateUserProfile} from '../service'
6 | import {system} from '@/utils/twelvet'
7 | import {FormattedMessage} from '@umijs/max'
8 |
9 | /**
10 | * 用户资料设置
11 | */
12 | const UserInfo: React.FC<{
13 | user: {
14 | username: string;
15 | nickName: string;
16 | sex: string;
17 | }
18 | }> = (props) => {
19 |
20 | const [form] = Form.useForm();
21 |
22 | useEffect(() => {
23 | form.setFieldsValue(props.user)
24 | }, [props.user])
25 |
26 | /**
27 | * 修改信息
28 | * @param data 修改数据
29 | */
30 | const save = async (data: {
31 | nickName: string;
32 | phonenumber: string;
33 | email: string;
34 | sex: string;
35 | }) => {
36 |
37 | try {
38 | const {code, msg} = await updateUserProfile(data)
39 |
40 | if (code !== 200) {
41 | return message.error(msg);
42 | }
43 |
44 | message.success(msg);
45 | } catch (e) {
46 | system.error(e);
47 | }
48 | }
49 |
50 | return (
51 |
55 |
56 |
58 |
69 | ),
70 | },
71 | ]} name='phonenumber' label="手机号码" placeholder="手机号码"/>
72 |
79 |
98 |
99 | )
100 |
101 | }
102 |
103 | export default UserInfo
104 |
--------------------------------------------------------------------------------
/src/pages/Monitor/Job/components/details/index.tsx:
--------------------------------------------------------------------------------
1 | import React, {useState, useEffect} from 'react'
2 | import {Descriptions, message, Modal} from 'antd'
3 | import {system} from '@/utils/twelvet'
4 | import {getByJobId} from './../../service'
5 |
6 | /**
7 | * 状态组件操作
8 | * @param props row 参数
9 | */
10 | const Details: React.FC<{
11 | modelDetails: {
12 | vimodelDetails: boolean
13 | jobId: number
14 | }
15 | onCancel: () => void
16 | }> = (props) => {
17 |
18 | const [descriptions, setDescriptions] = useState>({})
19 |
20 | const getData = async (modelDetails: { jobId: number }) => {
21 | try {
22 | const {jobId} = modelDetails
23 |
24 | // ID为0将无需发生改变
25 | if (jobId === 0) {
26 | return false;
27 | }
28 |
29 | const {code, msg, data} = await getByJobId({jobId: jobId})
30 | if (code !== 200) {
31 | return message.error(msg)
32 | }
33 |
34 | setDescriptions(data)
35 | } catch (e) {
36 | system.error(e)
37 | }
38 | }
39 |
40 | useEffect(() => {
41 | getData(props.modelDetails)
42 | }, [props.modelDetails])
43 |
44 | return (
45 |
52 |
53 |
54 |
55 |
56 | {descriptions.jobGroup}
57 |
58 |
59 |
60 | {descriptions.jobName}
61 |
62 |
63 |
64 | {descriptions.createTime}
65 |
66 |
67 |
68 | {descriptions.cronExpression}
69 |
70 |
71 |
72 | {descriptions.nextValidTime}
73 |
74 |
75 |
76 | {descriptions.status === '0' && '正常'}
77 | {descriptions.status === '1' && '停止'}
78 |
79 |
80 |
81 | {descriptions.concurrent === "0" ? '允许' : '禁止'}
82 |
83 |
84 |
85 | {descriptions.misfirePolicy === '0' && '默认策略'}
86 | {descriptions.misfirePolicy === '1' && '立即执行'}
87 | {descriptions.misfirePolicy === '2' && '执行一次'}
88 | {descriptions.misfirePolicy === '3' && '放弃执行'}
89 |
90 |
91 |
92 | {descriptions.invokeTarget}
93 |
94 |
95 |
96 |
97 |
98 | )
99 | }
100 |
101 | export default Details
102 |
--------------------------------------------------------------------------------
/src/services/swagger/user.ts:
--------------------------------------------------------------------------------
1 | // @ts-ignore
2 | /* eslint-disable */
3 | import {request} from '@umijs/max';
4 |
5 | /** Create user This can only be done by the logged in user. POST /user */
6 | export async function createUser(body: API.User, options?: { [key: string]: any }) {
7 | return request('/user', {
8 | method: 'POST',
9 | data: body,
10 | ...(options || {}),
11 | });
12 | }
13 |
14 | /** Get user by user name GET /user/${param0} */
15 | export async function getUserByName(
16 | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
17 | params: API.getUserByNameParams,
18 | options?: { [key: string]: any },
19 | ) {
20 | const {username: param0, ...queryParams} = params;
21 | return request(`/user/${param0}`, {
22 | method: 'GET',
23 | params: {...queryParams},
24 | ...(options || {}),
25 | });
26 | }
27 |
28 | /** Updated user This can only be done by the logged in user. PUT /user/${param0} */
29 | export async function updateUser(
30 | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
31 | params: API.updateUserParams,
32 | body: API.User,
33 | options?: { [key: string]: any },
34 | ) {
35 | const {username: param0, ...queryParams} = params;
36 | return request(`/user/${param0}`, {
37 | method: 'PUT',
38 | params: {...queryParams},
39 | data: body,
40 | ...(options || {}),
41 | });
42 | }
43 |
44 | /** Delete user This can only be done by the logged in user. DELETE /user/${param0} */
45 | export async function deleteUser(
46 | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
47 | params: API.deleteUserParams,
48 | options?: { [key: string]: any },
49 | ) {
50 | const {username: param0, ...queryParams} = params;
51 | return request(`/user/${param0}`, {
52 | method: 'DELETE',
53 | params: {...queryParams},
54 | ...(options || {}),
55 | });
56 | }
57 |
58 | /** Creates list of users with given input array POST /user/createWithArray */
59 | export async function createUsersWithArrayInput(
60 | body: API.User[],
61 | options?: { [key: string]: any },
62 | ) {
63 | return request('/user/createWithArray', {
64 | method: 'POST',
65 | data: body,
66 | ...(options || {}),
67 | });
68 | }
69 |
70 | /** Creates list of users with given input array POST /user/createWithList */
71 | export async function createUsersWithListInput(body: API.User[], options?: { [key: string]: any }) {
72 | return request('/user/createWithList', {
73 | method: 'POST',
74 | data: body,
75 | ...(options || {}),
76 | });
77 | }
78 |
79 | /** Logs user into the system GET /login */
80 | export async function loginUser(
81 | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
82 | params: API.loginUserParams,
83 | options?: { [key: string]: any },
84 | ) {
85 | return request('/login', {
86 | method: 'GET',
87 | params: {
88 | ...params,
89 | },
90 | ...(options || {}),
91 | });
92 | }
93 |
94 | /** Logs out current logged in user session GET /user/logout */
95 | export async function logoutUser(options?: { [key: string]: any }) {
96 | return request('/user/logout', {
97 | method: 'GET',
98 | ...(options || {}),
99 | });
100 | }
101 |
--------------------------------------------------------------------------------
/src/locales/fa-IR/settings.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.settings.menuMap.basic': 'تنظیمات پایه ',
3 | 'app.settings.menuMap.security': 'تنظیمات امنیتی',
4 | 'app.settings.menuMap.binding': 'صحافی حساب',
5 | 'app.settings.menuMap.notification': 'اعلان پیام جدید',
6 | 'app.settings.basic.avatar': 'آواتار',
7 | 'app.settings.basic.change-avatar': 'آواتار را تغییر دهید',
8 | 'app.settings.basic.email': 'ایمیل',
9 | 'app.settings.basic.email-message': 'لطفا ایمیل خود را وارد کنید!',
10 | 'app.settings.basic.nickname': 'نام مستعار',
11 | 'app.settings.basic.nickname-message': 'لطفاً نام مستعار خود را وارد کنید!',
12 | 'app.settings.basic.profile': 'پروفایل شخصی',
13 | 'app.settings.basic.profile-message': 'لطفاً مشخصات شخصی خود را وارد کنید!',
14 | 'app.settings.basic.profile-placeholder': 'معرفی مختصر خودتان',
15 | 'app.settings.basic.country': 'کشور / منطقه',
16 | 'app.settings.basic.country-message': 'لطفاً کشور خود را وارد کنید!',
17 | 'app.settings.basic.geographic': 'استان یا شهر',
18 | 'app.settings.basic.geographic-message': 'لطفاً اطلاعات جغرافیایی خود را وارد کنید!',
19 | 'app.settings.basic.address': 'آدرس خیابان',
20 | 'app.settings.basic.address-message': 'لطفا آدرس خود را وارد کنید!',
21 | 'app.settings.basic.phone': 'شماره تلفن',
22 | 'app.settings.basic.phone-message': 'لطفاً تلفن خود را وارد کنید!',
23 | 'app.settings.basic.update': 'به روز رسانی اطلاعات',
24 | 'app.settings.security.strong': 'قوی',
25 | 'app.settings.security.medium': 'متوسط',
26 | 'app.settings.security.weak': 'ضعیف',
27 | 'app.settings.security.password': 'رمز عبور حساب کاربری',
28 | 'app.settings.security.password-description': 'قدرت رمز عبور فعلی',
29 | 'app.settings.security.phone': 'تلفن امنیتی',
30 | 'app.settings.security.phone-description': 'تلفن مقید',
31 | 'app.settings.security.question': 'سوال امنیتی',
32 | 'app.settings.security.question-description':
33 | 'سوال امنیتی تنظیم نشده است و سیاست امنیتی می تواند به طور موثر از امنیت حساب محافظت کند',
34 | 'app.settings.security.email': 'ایمیل پشتیبان',
35 | 'app.settings.security.email-description': 'ایمیل مقید',
36 | 'app.settings.security.mfa': 'دستگاه MFA',
37 | 'app.settings.security.mfa-description':
38 | 'دستگاه MFA بسته نشده ، پس از اتصال ، می تواند دو بار تأیید شود',
39 | 'app.settings.security.modify': 'تغییر',
40 | 'app.settings.security.set': 'تنظیم',
41 | 'app.settings.security.bind': 'بستن',
42 | 'app.settings.binding.taobao': 'اتصال Taobao',
43 | 'app.settings.binding.taobao-description': 'حساب Taobao در حال حاضر بسته نشده است',
44 | 'app.settings.binding.alipay': 'اتصال Alipay',
45 | 'app.settings.binding.alipay-description': 'حساب Alipay در حال حاضر بسته نشده است',
46 | 'app.settings.binding.dingding': 'اتصال DingTalk',
47 | 'app.settings.binding.dingding-description': 'حساب DingTalk در حال حاضر محدود نشده است',
48 | 'app.settings.binding.bind': 'بستن',
49 | 'app.settings.notification.password': 'رمز عبور حساب کاربری',
50 | 'app.settings.notification.password-description':
51 | 'پیام های سایر کاربران در قالب یک نامه ایستگاهی اعلام خواهد شد',
52 | 'app.settings.notification.messages': 'پیام های سیستم',
53 | 'app.settings.notification.messages-description':
54 | 'پیام های سیستم به صورت نامه ایستگاه مطلع می شوند',
55 | 'app.settings.notification.todo': 'اعلان کارها',
56 | 'app.settings.notification.todo-description':
57 | 'لیست کارها به صورت نامه ای از ایستگاه اطلاع داده می شود',
58 | 'app.settings.open': 'باز کن',
59 | 'app.settings.close': 'بستن',
60 | };
61 |
--------------------------------------------------------------------------------