第一次
16
.editorconfig
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# http://editorconfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[Makefile]
|
||||||
|
indent_style = tab
|
||||||
8
.eslintignore
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
/lambda/
|
||||||
|
/scripts
|
||||||
|
/config
|
||||||
|
.history
|
||||||
|
public
|
||||||
|
dist
|
||||||
|
.umi
|
||||||
|
mock
|
||||||
7
.eslintrc.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
module.exports = {
|
||||||
|
extends: [require.resolve('@umijs/lint/dist/config/eslint')],
|
||||||
|
globals: {
|
||||||
|
page: true,
|
||||||
|
REACT_APP_ENV: true,
|
||||||
|
},
|
||||||
|
};
|
||||||
41
.gitignore
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
**/node_modules
|
||||||
|
# roadhog-api-doc ignore
|
||||||
|
/src/utils/request-temp.js
|
||||||
|
_roadhog-api-doc
|
||||||
|
|
||||||
|
# production
|
||||||
|
/dist
|
||||||
|
|
||||||
|
# misc
|
||||||
|
.DS_Store
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-error.log
|
||||||
|
|
||||||
|
/coverage
|
||||||
|
.idea
|
||||||
|
yarn.lock
|
||||||
|
package-lock.json
|
||||||
|
*bak
|
||||||
|
.vscode
|
||||||
|
|
||||||
|
|
||||||
|
# visual studio code
|
||||||
|
.history
|
||||||
|
*.log
|
||||||
|
functions/*
|
||||||
|
.temp/**
|
||||||
|
|
||||||
|
# umi
|
||||||
|
.umi
|
||||||
|
.umi-production
|
||||||
|
.umi-test
|
||||||
|
|
||||||
|
# screenshot
|
||||||
|
screenshot
|
||||||
|
.firebase
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
build
|
||||||
22
.prettierignore
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
**/*.svg
|
||||||
|
.umi
|
||||||
|
.umi-production
|
||||||
|
/dist
|
||||||
|
.dockerignore
|
||||||
|
.DS_Store
|
||||||
|
.eslintignore
|
||||||
|
*.png
|
||||||
|
*.toml
|
||||||
|
docker
|
||||||
|
.editorconfig
|
||||||
|
Dockerfile*
|
||||||
|
.gitignore
|
||||||
|
.prettierignore
|
||||||
|
LICENSE
|
||||||
|
.eslintcache
|
||||||
|
*.lock
|
||||||
|
yarn-error.log
|
||||||
|
.history
|
||||||
|
CNAME
|
||||||
|
/build
|
||||||
|
/public
|
||||||
26
.prettierrc.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
module.exports = {
|
||||||
|
singleQuote: true,
|
||||||
|
trailingComma: 'all',
|
||||||
|
printWidth: 100,
|
||||||
|
proseWrap: 'never',
|
||||||
|
endOfLine: 'lf',
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: '.prettierrc',
|
||||||
|
options: {
|
||||||
|
parser: 'json',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: 'document.ejs',
|
||||||
|
options: {
|
||||||
|
parser: 'html',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
plugins: [
|
||||||
|
'prettier-plugin-organize-imports',
|
||||||
|
'prettier-plugin-packagejson',
|
||||||
|
'prettier-plugin-two-style-order',
|
||||||
|
],
|
||||||
|
};
|
||||||
161
config/config.ts
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
// https://umijs.org/config/
|
||||||
|
import { defineConfig } from '@umijs/max';
|
||||||
|
import { join } from 'path';
|
||||||
|
import defaultSettings from './defaultSettings';
|
||||||
|
import proxy from './proxy';
|
||||||
|
|
||||||
|
import routes from './routes';
|
||||||
|
|
||||||
|
const { REACT_APP_ENV = 'dev' } = process.env;
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
/**
|
||||||
|
* @name 开启 hash 模式
|
||||||
|
* @description 让 build 之后的产物包含 hash 后缀。通常用于增量发布和避免浏览器加载缓存。
|
||||||
|
* @doc https://umijs.org/docs/api/config#hash
|
||||||
|
*/
|
||||||
|
hash: true,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name 兼容性设置
|
||||||
|
* @description 设置 ie11 不一定完美兼容,需要检查自己使用的所有依赖
|
||||||
|
* @doc https://umijs.org/docs/api/config#targets
|
||||||
|
*/
|
||||||
|
// targets: {
|
||||||
|
// ie: 11,
|
||||||
|
// },
|
||||||
|
/**
|
||||||
|
* @name 路由的配置,不在路由中引入的文件不会编译
|
||||||
|
* @description 只支持 path,component,routes,redirect,wrappers,title 的配置
|
||||||
|
* @doc https://umijs.org/docs/guides/routes
|
||||||
|
*/
|
||||||
|
// umi routes: https://umijs.org/docs/routing
|
||||||
|
// routes,
|
||||||
|
/**
|
||||||
|
* @name 主题的配置
|
||||||
|
* @description 虽然叫主题,但是其实只是 less 的变量设置
|
||||||
|
* @doc antd的主题设置 https://ant.design/docs/react/customize-theme-cn
|
||||||
|
* @doc umi 的theme 配置 https://umijs.org/docs/api/config#theme
|
||||||
|
*/
|
||||||
|
theme: {
|
||||||
|
// 如果不想要 configProvide 动态设置主题需要把这个设置为 default
|
||||||
|
// 只有设置为 variable, 才能使用 configProvide 动态设置主色调
|
||||||
|
'root-entry-name': 'variable',
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @name moment 的国际化配置
|
||||||
|
* @description 如果对国际化没有要求,打开之后能减少js的包大小
|
||||||
|
* @doc https://umijs.org/docs/api/config#ignoremomentlocale
|
||||||
|
*/
|
||||||
|
ignoreMomentLocale: true,
|
||||||
|
/**
|
||||||
|
* @name 代理配置
|
||||||
|
* @description 可以让你的本地服务器代理到你的服务器上,这样你就可以访问服务器的数据了
|
||||||
|
* @see 要注意以下 代理只能在本地开发时使用,build 之后就无法使用了。
|
||||||
|
* @doc 代理介绍 https://umijs.org/docs/guides/proxy
|
||||||
|
* @doc 代理配置 https://umijs.org/docs/api/config#proxy
|
||||||
|
*/
|
||||||
|
proxy: proxy[REACT_APP_ENV as keyof typeof proxy],
|
||||||
|
/**
|
||||||
|
* @name 快速热更新配置
|
||||||
|
* @description 一个不错的热更新组件,更新时可以保留 state
|
||||||
|
*/
|
||||||
|
fastRefresh: true,
|
||||||
|
//============== 以下都是max的插件配置 ===============
|
||||||
|
/**
|
||||||
|
* @name 数据流插件
|
||||||
|
* @@doc https://umijs.org/docs/max/data-flow
|
||||||
|
*/
|
||||||
|
model: {},
|
||||||
|
/**
|
||||||
|
* 一个全局的初始数据流,可以用它在插件之间共享数据
|
||||||
|
* @description 可以用来存放一些全局的数据,比如用户信息,或者一些全局的状态,全局初始状态在整个 Umi 项目的最开始创建。
|
||||||
|
* @doc https://umijs.org/docs/max/data-flow#%E5%85%A8%E5%B1%80%E5%88%9D%E5%A7%8B%E7%8A%B6%E6%80%81
|
||||||
|
*/
|
||||||
|
initialState: {},
|
||||||
|
/**
|
||||||
|
* @name layout 插件
|
||||||
|
* @doc https://umijs.org/docs/max/layout-menu
|
||||||
|
*/
|
||||||
|
title: '云充电管理后台',
|
||||||
|
layout: {
|
||||||
|
locale: false,
|
||||||
|
...defaultSettings,
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @name moment2dayjs 插件
|
||||||
|
* @description 将项目中的 moment 替换为 dayjs
|
||||||
|
* @doc https://umijs.org/docs/max/moment2dayjs
|
||||||
|
*/
|
||||||
|
moment2dayjs: {
|
||||||
|
preset: 'antd',
|
||||||
|
plugins: ['duration'],
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @name 国际化插件
|
||||||
|
* @doc https://umijs.org/docs/max/i18n
|
||||||
|
*/
|
||||||
|
locale: {
|
||||||
|
// default zh-CN
|
||||||
|
default: 'zh-CN',
|
||||||
|
antd: true,
|
||||||
|
// default true, when it is true, will use `navigator.language` overwrite default
|
||||||
|
baseNavigator: true,
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @name antd 插件
|
||||||
|
* @description 内置了 babel import 插件
|
||||||
|
* @doc https://umijs.org/docs/max/antd#antd
|
||||||
|
*/
|
||||||
|
antd: {},
|
||||||
|
/**
|
||||||
|
* @name 网络请求配置
|
||||||
|
* @description 它基于 axios 和 ahooks 的 useRequest 提供了一套统一的网络请求和错误处理方案。
|
||||||
|
* @doc https://umijs.org/docs/max/request
|
||||||
|
*/
|
||||||
|
request: {},
|
||||||
|
/**
|
||||||
|
* @name 权限插件
|
||||||
|
* @description 基于 initialState 的权限插件,必须先打开 initialState
|
||||||
|
* @doc https://umijs.org/docs/max/access
|
||||||
|
*/
|
||||||
|
access: {},
|
||||||
|
/**
|
||||||
|
* @name <head> 中额外的 script
|
||||||
|
* @description 配置 <head> 中额外的 script
|
||||||
|
*/
|
||||||
|
headScripts: [
|
||||||
|
// 解决首次加载时白屏的问题
|
||||||
|
{ src: '/scripts/loading.js', async: true },
|
||||||
|
],
|
||||||
|
//================ pro 插件配置 =================
|
||||||
|
presets: ['umi-presets-pro'],
|
||||||
|
/**
|
||||||
|
* @name openAPI 插件的配置
|
||||||
|
* @description 基于 openapi 的规范生成serve 和mock,能减少很多样板代码
|
||||||
|
* @doc https://pro.ant.design/zh-cn/docs/openapi/
|
||||||
|
*/
|
||||||
|
openAPI: [
|
||||||
|
{
|
||||||
|
requestLibPath: "import { request } from '@umijs/max'",
|
||||||
|
// 或者使用在线的版本
|
||||||
|
// schemaPath: "https://gw.alipayobjects.com/os/antfincdn/M%24jrzTTYJN/oneapi.json"
|
||||||
|
schemaPath: join(__dirname, 'oneapi.json'),
|
||||||
|
mock: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
requestLibPath: "import { request } from '@umijs/max'",
|
||||||
|
schemaPath: 'https://gw.alipayobjects.com/os/antfincdn/CA1dOm%2631B/openapi.json',
|
||||||
|
projectName: 'swagger',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
mock: {
|
||||||
|
include: ['mock/**/*', 'src/pages/**/_mock.ts'],
|
||||||
|
},
|
||||||
|
mfsu: {
|
||||||
|
strategy: 'normal',
|
||||||
|
},
|
||||||
|
esbuildMinifyIIFE: true,
|
||||||
|
requestRecord: {},
|
||||||
|
tailwindcss: {},
|
||||||
|
});
|
||||||
29
config/defaultSettings.ts
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
import { ProLayoutProps } from '@ant-design/pro-components';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name
|
||||||
|
*/
|
||||||
|
const Settings: ProLayoutProps & {
|
||||||
|
pwa?: boolean;
|
||||||
|
logo?: string;
|
||||||
|
} = {
|
||||||
|
navTheme: 'light',
|
||||||
|
// 拂晓蓝
|
||||||
|
colorPrimary: '#1890ff',
|
||||||
|
layout: 'mix',
|
||||||
|
contentWidth: 'Fluid',
|
||||||
|
fixedHeader: false,
|
||||||
|
fixSiderbar: true,
|
||||||
|
colorWeak: false,
|
||||||
|
title: '云充电管理后台',
|
||||||
|
pwa: true,
|
||||||
|
logo: false,
|
||||||
|
iconfontUrl: '',
|
||||||
|
token: {
|
||||||
|
// 参见ts声明,demo 见文档,通过token 修改样式
|
||||||
|
//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
|
||||||
|
},
|
||||||
|
tailwindcss: {},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Settings;
|
||||||
593
config/oneapi.json
Normal file
@@ -0,0 +1,593 @@
|
|||||||
|
{
|
||||||
|
"openapi": "3.0.1",
|
||||||
|
"info": {
|
||||||
|
"title": "Ant Design Pro",
|
||||||
|
"version": "1.0.0"
|
||||||
|
},
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"url": "http://localhost:8000/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://localhost:8000/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"paths": {
|
||||||
|
"/api/currentUser": {
|
||||||
|
"get": {
|
||||||
|
"tags": ["api"],
|
||||||
|
"description": "获取当前的用户",
|
||||||
|
"operationId": "currentUser",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Success",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/CurrentUser"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Error",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ErrorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x-swagger-router-controller": "api"
|
||||||
|
},
|
||||||
|
"/api/login/captcha": {
|
||||||
|
"post": {
|
||||||
|
"description": "发送验证码",
|
||||||
|
"operationId": "getFakeCaptcha",
|
||||||
|
"tags": ["login"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "phone",
|
||||||
|
"in": "query",
|
||||||
|
"description": "手机号",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Success",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/FakeCaptcha"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/login/outLogin": {
|
||||||
|
"post": {
|
||||||
|
"description": "登录接口",
|
||||||
|
"operationId": "outLogin",
|
||||||
|
"tags": ["login"],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Success",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Error",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ErrorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x-swagger-router-controller": "api"
|
||||||
|
},
|
||||||
|
"/api/login/account": {
|
||||||
|
"post": {
|
||||||
|
"tags": ["login"],
|
||||||
|
"description": "登录接口",
|
||||||
|
"operationId": "login",
|
||||||
|
"requestBody": {
|
||||||
|
"description": "登录系统",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/LoginParams"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Success",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/LoginResult"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Error",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ErrorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x-codegen-request-body-name": "body"
|
||||||
|
},
|
||||||
|
"x-swagger-router-controller": "api"
|
||||||
|
},
|
||||||
|
"/api/notices": {
|
||||||
|
"summary": "getNotices",
|
||||||
|
"description": "NoticeIconItem",
|
||||||
|
"get": {
|
||||||
|
"tags": ["api"],
|
||||||
|
"operationId": "getNotices",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Success",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/NoticeIconList"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/rule": {
|
||||||
|
"get": {
|
||||||
|
"tags": ["rule"],
|
||||||
|
"description": "获取规则列表",
|
||||||
|
"operationId": "rule",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "current",
|
||||||
|
"in": "query",
|
||||||
|
"description": "当前的页码",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pageSize",
|
||||||
|
"in": "query",
|
||||||
|
"description": "页面的容量",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Success",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/RuleList"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Error",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ErrorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"tags": ["rule"],
|
||||||
|
"description": "新建规则",
|
||||||
|
"operationId": "addRule",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Success",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/RuleListItem"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Error",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ErrorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"tags": ["rule"],
|
||||||
|
"description": "新建规则",
|
||||||
|
"operationId": "updateRule",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Success",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/RuleListItem"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Error",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ErrorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"tags": ["rule"],
|
||||||
|
"description": "删除规则",
|
||||||
|
"operationId": "removeRule",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Success",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Error",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ErrorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x-swagger-router-controller": "api"
|
||||||
|
},
|
||||||
|
"/swagger": {
|
||||||
|
"x-swagger-pipe": "swagger_raw"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"components": {
|
||||||
|
"schemas": {
|
||||||
|
"CurrentUser": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"avatar": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"userid": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"signature": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"group": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tags": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"key": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"label": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notifyCount": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int32"
|
||||||
|
},
|
||||||
|
"unreadCount": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int32"
|
||||||
|
},
|
||||||
|
"country": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"access": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"geographic": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"province": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"label": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"key": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"city": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"label": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"key": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"address": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"phone": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"LoginResult": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"status": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"currentAuthority": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PageParams": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"current": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"pageSize": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"RuleListItem": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"key": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int32"
|
||||||
|
},
|
||||||
|
"disabled": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"href": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"avatar": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"owner": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"desc": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"callNo": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int32"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int32"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "datetime"
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "datetime"
|
||||||
|
},
|
||||||
|
"progress": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int32"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"RuleList": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/RuleListItem"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"total": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "列表的内容总数",
|
||||||
|
"format": "int32"
|
||||||
|
},
|
||||||
|
"success": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"FakeCaptcha": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"code": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int32"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"LoginParams": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"username": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"autoLogin": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ErrorResponse": {
|
||||||
|
"required": ["errorCode"],
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"errorCode": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "业务约定的错误码"
|
||||||
|
},
|
||||||
|
"errorMessage": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "业务上的错误信息"
|
||||||
|
},
|
||||||
|
"success": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "业务上的请求是否成功"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"NoticeIconList": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/NoticeIconItem"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"total": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "列表的内容总数",
|
||||||
|
"format": "int32"
|
||||||
|
},
|
||||||
|
"success": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"NoticeIconItemType": {
|
||||||
|
"title": "NoticeIconItemType",
|
||||||
|
"description": "已读未读列表的枚举",
|
||||||
|
"type": "string",
|
||||||
|
"properties": {},
|
||||||
|
"enum": ["notification", "message", "event"]
|
||||||
|
},
|
||||||
|
"NoticeIconItem": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "any"
|
||||||
|
},
|
||||||
|
"key": { "type": "string" },
|
||||||
|
"read": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"avatar": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"datetime": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"extensions": {
|
||||||
|
"x-is-enum": true
|
||||||
|
},
|
||||||
|
"$ref": "#/components/schemas/NoticeIconItemType"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
53
config/proxy.ts
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/**
|
||||||
|
* @name 代理的配置
|
||||||
|
* @see 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
|
||||||
|
* -------------------------------
|
||||||
|
* The agent cannot take effect in the production environment
|
||||||
|
* so there is no configuration of the production environment
|
||||||
|
* For details, please see
|
||||||
|
* https://pro.ant.design/docs/deploy
|
||||||
|
*
|
||||||
|
* @doc https://umijs.org/docs/guides/proxy
|
||||||
|
*/
|
||||||
|
export default {
|
||||||
|
// 如果需要自定义本地开发服务器 请取消注释按需调整
|
||||||
|
// dev: {
|
||||||
|
// // localhost:8000/api/** -> https://preview.pro.ant.design/api/**
|
||||||
|
// '/api/': {
|
||||||
|
// // 要代理的地址
|
||||||
|
// target: 'https://preview.pro.ant.design',
|
||||||
|
// // 配置了这个可以从 http 代理到 https
|
||||||
|
// // 依赖 origin 的功能可能需要这个,比如 cookie
|
||||||
|
// changeOrigin: true,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name 详细的代理配置
|
||||||
|
* @doc https://github.com/chimurai/http-proxy-middleware
|
||||||
|
*/
|
||||||
|
test: {
|
||||||
|
// localhost:8000/api/** -> https://preview.pro.ant.design/api/**
|
||||||
|
'/admin/': {
|
||||||
|
// target: 'https://proapi.azurewebsites.net',
|
||||||
|
// target: 'http://192.168.1.32:6001',
|
||||||
|
target: 'http://192.168.1.32:9091',
|
||||||
|
changeOrigin: true,
|
||||||
|
pathRewrite: { '^/admin': '/api' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dev: {
|
||||||
|
'/admin/': {
|
||||||
|
target: 'http://192.168.1.32:1002',
|
||||||
|
changeOrigin: true,
|
||||||
|
pathRewrite: { '^/admin': '/api' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pre: {
|
||||||
|
'/admin/': {
|
||||||
|
target: 'https://iuser.zhongshuai2023.com',
|
||||||
|
changeOrigin: true,
|
||||||
|
pathRewrite: { '^/admin': '/api' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
37
config/routes.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import { layout } from "@/app";
|
||||||
|
import { MenuDataItem } from '@ant-design/pro-components'
|
||||||
|
/**
|
||||||
|
* @name umi 的路由配置
|
||||||
|
* @description 只支持 path,component,routes,redirect,wrappers,name,icon 的配置
|
||||||
|
* @param path path 只支持两种占位符配置,第一种是动态参数 :id 的形式,第二种是 * 通配符,通配符只能出现路由字符串的最后。
|
||||||
|
* @param component 配置 location 和 path 匹配后用于渲染的 React 组件路径。可以是绝对路径,也可以是相对路径,如果是相对路径,会从 src/pages 开始找起。
|
||||||
|
* @param routes 配置子路由,通常在需要为多个路径增加 layout 组件时使用。
|
||||||
|
* @param redirect 配置路由跳转
|
||||||
|
* @param wrappers 配置路由组件的包装组件,通过包装组件可以为当前的路由组件组合进更多的功能。 比如,可以用于路由级别的权限校验
|
||||||
|
* @param name 配置路由的标题,默认读取国际化文件 menu.ts 中 menu.xxxx 的值,如配置 name 为 login,则读取 menu.ts 中 menu.login 的取值作为标题
|
||||||
|
* @param icon 配置路由的图标,取值参考 https://ant.design/components/icon-cn, 注意去除风格后缀和大小写,如想要配置图标为 <StepBackwardOutlined /> 则取值应为 stepBackward 或 StepBackward,如想要配置图标为 <UserOutlined /> 则取值应为 user 或者 User
|
||||||
|
* @doc https://umijs.org/docs/guides/routes
|
||||||
|
*/
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
path: '/user/login',
|
||||||
|
redirect: '/user/login',
|
||||||
|
headerRender: false,
|
||||||
|
// 不展示页脚
|
||||||
|
footerRender: false,
|
||||||
|
// 不展示菜单
|
||||||
|
menuRender: false,
|
||||||
|
// 不展示菜单顶栏
|
||||||
|
menuHeaderRender: false,
|
||||||
|
// 隐藏子菜单
|
||||||
|
hideChildrenInMenu: true,
|
||||||
|
// 隐藏自己和子菜单
|
||||||
|
hideInMenu: true,
|
||||||
|
// 在面包屑中隐藏
|
||||||
|
hideInBreadcrumb: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/',
|
||||||
|
redirect: '/404',
|
||||||
|
},
|
||||||
|
];
|
||||||
1
dist/1411.867e45ca.async.js
vendored
Normal file
1
dist/2284.dd92c41b.chunk.css
vendored
Normal file
581
dist/2284.ee505d0a.async.js
vendored
Normal file
81
dist/2901.e8cca09c.async.js
vendored
Normal file
40
dist/2911.4bdb898c.async.js
vendored
Normal file
56
dist/449.5332a375.async.js
vendored
Normal file
27
dist/4587.ddfce86d.async.js
vendored
Normal file
1
dist/4974.a79f4396.async.js
vendored
Normal file
60
dist/6030.76a4da21.async.js
vendored
Normal file
1
dist/6276.f338284a.async.js
vendored
Normal file
80
dist/8383.8257ce37.async.js
vendored
Normal file
8
dist/9910.c8239399.async.js
vendored
Normal file
1
dist/CNAME
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
preview.pro.ant.design
|
||||||
BIN
dist/favicon.ico
vendored
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
dist/icons/icon-128x128.png
vendored
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
dist/icons/icon-192x192.png
vendored
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/icon-512x512.png
vendored
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
13
dist/index.html
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE html><html><head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<title>云充电管理后台</title>
|
||||||
|
<link rel="stylesheet" href="/umi.77a65f21.css">
|
||||||
|
<script async="" src="/scripts/loading.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="root"></div>
|
||||||
|
<script src="/umi.de8ce8ab.js"></script>
|
||||||
|
|
||||||
|
</body></html>
|
||||||
1
dist/logo.svg
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200" version="1.1" viewBox="0 0 200 200"><title>Group 28 Copy 5</title><desc>Created with Sketch.</desc><defs><linearGradient id="linearGradient-1" x1="62.102%" x2="108.197%" y1="0%" y2="37.864%"><stop offset="0%" stop-color="#4285EB"/><stop offset="100%" stop-color="#2EC7FF"/></linearGradient><linearGradient id="linearGradient-2" x1="69.644%" x2="54.043%" y1="0%" y2="108.457%"><stop offset="0%" stop-color="#29CDFF"/><stop offset="37.86%" stop-color="#148EFF"/><stop offset="100%" stop-color="#0A60FF"/></linearGradient><linearGradient id="linearGradient-3" x1="69.691%" x2="16.723%" y1="-12.974%" y2="117.391%"><stop offset="0%" stop-color="#FA816E"/><stop offset="41.473%" stop-color="#F74A5C"/><stop offset="100%" stop-color="#F51D2C"/></linearGradient><linearGradient id="linearGradient-4" x1="68.128%" x2="30.44%" y1="-35.691%" y2="114.943%"><stop offset="0%" stop-color="#FA8E7D"/><stop offset="51.264%" stop-color="#F74A5C"/><stop offset="100%" stop-color="#F51D2C"/></linearGradient></defs><g id="Page-1" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="logo" transform="translate(-20.000000, -20.000000)"><g id="Group-28-Copy-5" transform="translate(20.000000, 20.000000)"><g id="Group-27-Copy-3"><g id="Group-25" fill-rule="nonzero"><g id="2"><path id="Shape" fill="url(#linearGradient-1)" d="M91.5880863,4.17652823 L4.17996544,91.5127728 C-0.519240605,96.2081146 -0.519240605,103.791885 4.17996544,108.487227 L91.5880863,195.823472 C96.2872923,200.518814 103.877304,200.518814 108.57651,195.823472 L145.225487,159.204632 C149.433969,154.999611 149.433969,148.181924 145.225487,143.976903 C141.017005,139.771881 134.193707,139.771881 129.985225,143.976903 L102.20193,171.737352 C101.032305,172.906015 99.2571609,172.906015 98.0875359,171.737352 L28.285908,101.993122 C27.1162831,100.824459 27.1162831,99.050775 28.285908,97.8821118 L98.0875359,28.1378823 C99.2571609,26.9692191 101.032305,26.9692191 102.20193,28.1378823 L129.985225,55.8983314 C134.193707,60.1033528 141.017005,60.1033528 145.225487,55.8983314 C149.433969,51.69331 149.433969,44.8756232 145.225487,40.6706018 L108.58055,4.05574592 C103.862049,-0.537986846 96.2692618,-0.500797906 91.5880863,4.17652823 Z"/><path id="Shape" fill="url(#linearGradient-2)" d="M91.5880863,4.17652823 L4.17996544,91.5127728 C-0.519240605,96.2081146 -0.519240605,103.791885 4.17996544,108.487227 L91.5880863,195.823472 C96.2872923,200.518814 103.877304,200.518814 108.57651,195.823472 L145.225487,159.204632 C149.433969,154.999611 149.433969,148.181924 145.225487,143.976903 C141.017005,139.771881 134.193707,139.771881 129.985225,143.976903 L102.20193,171.737352 C101.032305,172.906015 99.2571609,172.906015 98.0875359,171.737352 L28.285908,101.993122 C27.1162831,100.824459 27.1162831,99.050775 28.285908,97.8821118 L98.0875359,28.1378823 C100.999864,25.6271836 105.751642,20.541824 112.729652,19.3524487 C117.915585,18.4685261 123.585219,20.4140239 129.738554,25.1889424 C125.624663,21.0784292 118.571995,14.0340304 108.58055,4.05574592 C103.862049,-0.537986846 96.2692618,-0.500797906 91.5880863,4.17652823 Z"/></g><path id="Shape" fill="url(#linearGradient-3)" d="M153.685633,135.854579 C157.894115,140.0596 164.717412,140.0596 168.925894,135.854579 L195.959977,108.842726 C200.659183,104.147384 200.659183,96.5636133 195.960527,91.8688194 L168.690777,64.7181159 C164.472332,60.5180858 157.646868,60.5241425 153.435895,64.7316526 C149.227413,68.936674 149.227413,75.7543607 153.435895,79.9593821 L171.854035,98.3623765 C173.02366,99.5310396 173.02366,101.304724 171.854035,102.473387 L153.685633,120.626849 C149.47715,124.83187 149.47715,131.649557 153.685633,135.854579 Z"/></g><ellipse id="Combined-Shape" cx="100.519" cy="100.437" fill="url(#linearGradient-4)" rx="23.6" ry="23.581"/></g></g></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 3.8 KiB |
5
dist/pro_icon.svg
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<svg width="42" height="42" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g>
|
||||||
|
<path fill="#070707" d="m6.717392,13.773912l5.6,0c2.8,0 4.7,1.9 4.7,4.7c0,2.8 -2,4.7 -4.9,4.7l-2.5,0l0,4.3l-2.9,0l0,-13.7zm2.9,2.2l0,4.9l1.9,0c1.6,0 2.6,-0.9 2.6,-2.4c0,-1.6 -0.9,-2.4 -2.6,-2.4l-1.9,0l0,-0.1zm8.9,11.5l2.7,0l0,-5.7c0,-1.4 0.8,-2.3 2.2,-2.3c0.4,0 0.8,0.1 1,0.2l0,-2.4c-0.2,-0.1 -0.5,-0.1 -0.8,-0.1c-1.2,0 -2.1,0.7 -2.4,2l-0.1,0l0,-1.9l-2.7,0l0,10.2l0.1,0zm11.7,0.1c-3.1,0 -5,-2 -5,-5.3c0,-3.3 2,-5.3 5,-5.3s5,2 5,5.3c0,3.4 -1.9,5.3 -5,5.3zm0,-2.1c1.4,0 2.2,-1.1 2.2,-3.2c0,-2 -0.8,-3.2 -2.2,-3.2c-1.4,0 -2.2,1.2 -2.2,3.2c0,2.1 0.8,3.2 2.2,3.2z" class="st0" id="Ant-Design-Pro"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 677 B |
202
dist/scripts/loading.js
vendored
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
/**
|
||||||
|
* loading 占位
|
||||||
|
* 解决首次加载时白屏的问题
|
||||||
|
*/
|
||||||
|
(function () {
|
||||||
|
const _root = document.querySelector('#root');
|
||||||
|
if (_root && _root.innerHTML === '') {
|
||||||
|
_root.innerHTML = `
|
||||||
|
<style>
|
||||||
|
html,
|
||||||
|
body,
|
||||||
|
#root {
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#root {
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 100% auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-title {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-sub-title {
|
||||||
|
margin-top: 20px;
|
||||||
|
font-size: 1rem;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-loading-warp {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 26px;
|
||||||
|
}
|
||||||
|
.ant-spin {
|
||||||
|
position: absolute;
|
||||||
|
display: none;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
color: rgba(0, 0, 0, 0.65);
|
||||||
|
color: #1890ff;
|
||||||
|
font-size: 14px;
|
||||||
|
font-variant: tabular-nums;
|
||||||
|
line-height: 1.5;
|
||||||
|
text-align: center;
|
||||||
|
list-style: none;
|
||||||
|
opacity: 0;
|
||||||
|
-webkit-transition: -webkit-transform 0.3s
|
||||||
|
cubic-bezier(0.78, 0.14, 0.15, 0.86);
|
||||||
|
transition: -webkit-transform 0.3s
|
||||||
|
cubic-bezier(0.78, 0.14, 0.15, 0.86);
|
||||||
|
transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
|
||||||
|
transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86),
|
||||||
|
-webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
|
||||||
|
-webkit-font-feature-settings: "tnum";
|
||||||
|
font-feature-settings: "tnum";
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-spin-spinning {
|
||||||
|
position: static;
|
||||||
|
display: inline-block;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-spin-dot {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-spin-dot-item {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
width: 9px;
|
||||||
|
height: 9px;
|
||||||
|
background-color: #1890ff;
|
||||||
|
border-radius: 100%;
|
||||||
|
-webkit-transform: scale(0.75);
|
||||||
|
-ms-transform: scale(0.75);
|
||||||
|
transform: scale(0.75);
|
||||||
|
-webkit-transform-origin: 50% 50%;
|
||||||
|
-ms-transform-origin: 50% 50%;
|
||||||
|
transform-origin: 50% 50%;
|
||||||
|
opacity: 0.3;
|
||||||
|
-webkit-animation: antspinmove 1s infinite linear alternate;
|
||||||
|
animation: antSpinMove 1s infinite linear alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-spin-dot-item:nth-child(1) {
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-spin-dot-item:nth-child(2) {
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
-webkit-animation-delay: 0.4s;
|
||||||
|
animation-delay: 0.4s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-spin-dot-item:nth-child(3) {
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
-webkit-animation-delay: 0.8s;
|
||||||
|
animation-delay: 0.8s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-spin-dot-item:nth-child(4) {
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
-webkit-animation-delay: 1.2s;
|
||||||
|
animation-delay: 1.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-spin-dot-spin {
|
||||||
|
-webkit-transform: rotate(45deg);
|
||||||
|
-ms-transform: rotate(45deg);
|
||||||
|
transform: rotate(45deg);
|
||||||
|
-webkit-animation: antrotate 1.2s infinite linear;
|
||||||
|
animation: antRotate 1.2s infinite linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-spin-lg .ant-spin-dot {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
font-size: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-spin-lg .ant-spin-dot i {
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
||||||
|
.ant-spin-blur {
|
||||||
|
background: #fff;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes antSpinMove {
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes antSpinMove {
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes antRotate {
|
||||||
|
to {
|
||||||
|
-webkit-transform: rotate(405deg);
|
||||||
|
transform: rotate(405deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes antRotate {
|
||||||
|
to {
|
||||||
|
-webkit-transform: rotate(405deg);
|
||||||
|
transform: rotate(405deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div style="
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
min-height: 362px;
|
||||||
|
">
|
||||||
|
<div class="page-loading-warp">
|
||||||
|
<div class="ant-spin ant-spin-lg ant-spin-spinning">
|
||||||
|
<span class="ant-spin-dot ant-spin-dot-spin">
|
||||||
|
<i class="ant-spin-dot-item"></i>
|
||||||
|
<i class="ant-spin-dot-item"></i>
|
||||||
|
<i class="ant-spin-dot-item"></i>
|
||||||
|
<i class="ant-spin-dot-item"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="loading-title">
|
||||||
|
正在加载资源
|
||||||
|
</div>
|
||||||
|
<div class="loading-sub-title">
|
||||||
|
初次加载资源可能需要较多时间 请耐心等待
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
})();
|
||||||
1
dist/src__pages__404.f65a06f8.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[4650],{77372:function(o,s,t){t.r(s);var n=t(7485),u=t(84974),_=t(50159),E=t(50959),a=t(11527),e=function(){return(0,a.jsx)(u.ZP,{status:"404",title:"404",subTitle:(0,n.useIntl)().formatMessage({id:"pages.404.subTitle"}),extra:(0,a.jsx)(_.ZP,{type:"primary",onClick:function(){return n.history.push("/")},children:(0,n.useIntl)().formatMessage({id:"pages.404.buttonText"})})})};s.default=e}}]);
|
||||||
10
dist/src__pages__Admin.3d9dd6b3.async.js
vendored
Normal file
10
dist/src__pages__Welcome.522f55aa.async.js
vendored
Normal file
1
dist/src__pages__config__agreement__edit.f43b6288.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6387],{35748:function(F,m,e){var E=e(35361),a=e(56929),M=e(50959),c=e(20734),f=e(11527),p=["fieldProps","min","proFieldProps","max"],D=function(t,C){var g=t.fieldProps,A=t.min,P=t.proFieldProps,x=t.max,i=(0,a.Z)(t,p);return(0,f.jsx)(c.Z,(0,E.Z)({valueType:"digit",fieldProps:(0,E.Z)({min:A,max:x},g),ref:C,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:P},i))},l=M.forwardRef(D);m.Z=l},53271:function(F,m,e){e.r(m);var E=e(90228),a=e.n(E),M=e(87999),c=e.n(M),f=e(48305),p=e.n(f),D=e(50959),l=e(49547),R=e(35748),t=e(19014),C=e(50925),g=e(94675),A=e(2733),P=e(17885),x=e(66001),i=e.n(x),z=e(8776),n=e(11527),U=function(d){var W=(0,D.useState)(i().createEditorState("")),j=p()(W,2),v=j[0],O=j[1],B=C.Z.useForm(),L=p()(B,1),u=L[0],T=d.values;(0,D.useEffect)(function(){O(i().createEditorState(T.protocolContent?T.protocolContent:"")),u.resetFields(),u.setFieldsValue(T)},[u,d]);var K=function(){u.submit()},y=function(){d.onCancel()},S=function(){var _=c()(a()().mark(function r(o){var s;return a()().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:s=JSON.parse(JSON.stringify(o)),s.protocolContent=v.toHTML(),d.onSubmit(s);case 3:case"end":return h.stop()}},r)}));return function(o){return _.apply(this,arguments)}}(),Z=["undo","redo","separator","font-size","line-height","letter-spacing","separator","text-color","bold","italic","underline","strike-through","separator","superscript","subscript","remove-styles","emoji","separator","text-indent","text-align","separator","headings","list-ul","list-ol","blockquote","code","separator","link","separator","hr","separator","clear"],G=function(){var _=c()(a()().mark(function r(o){var s,b;return a()().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:s=[".mp4",".mkv",".avi",".mov",".wmv",".flv",".webm",".m4v",".3gp",".3g2"],b=o.toLowerCase(),s.some(function($){return b.endsWith($)})?O(P.ContentUtils.insertMedias(v,[{type:"VIDEO",url:o}])):O(P.ContentUtils.insertMedias(v,[{type:"IMAGE",url:o}]));case 3:case"end":return I.stop()}},r)}));return function(o){return _.apply(this,arguments)}}(),N=["separator",{key:"FilesManagerImage",title:"\u4E0A\u4F20\u56FE\u7247/\u89C6\u9891",html:null,text:(0,n.jsx)(A.Z,{fileType:"image",mode:"",imagesShow:!1,onChange:G,count:1}),onClick:function(){console.log("Hello World!")}}];return(0,n.jsx)(g.Z,{width:1200,title:"\u534F\u8BAE\u5185\u5BB9",open:d.open,forceRender:!0,destroyOnClose:!0,onOk:K,onCancel:y,children:(0,n.jsxs)(l.A,{form:u,submitter:!1,layout:"horizontal",onFinish:S,children:[(0,n.jsx)(R.Z,{name:"id",label:"ID",disabled:!0,hidden:!0}),(0,n.jsx)(t.Z,{width:300,name:"protocolName",label:"\u534F\u8BAE\u540D\u79F0",placeholder:"\u534F\u8BAE\u540D\u79F0",rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}]}),(0,n.jsx)(l.A.Group,{children:(0,n.jsx)(l.A.Item,{name:"protocolContent",children:(0,n.jsx)("div",{className:"border-solid border-2 border-indigo-600",children:(0,n.jsx)(i(),{value:v,controls:Z,extendControls:N,onChange:function(r){O(r)}})})})})]})})};m.default=U}}]);
|
||||||
1
dist/src__pages__config__agreement__index.e7cdd715.async.js
vendored
Normal file
1
dist/src__pages__config__banner__edit.113d87b6.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9532],{35748:function(A,o,e){var l=e(35361),d=e(56929),t=e(50959),a=e(20734),s=e(11527),i=["fieldProps","min","proFieldProps","max"],u=function(r,m){var E=r.fieldProps,P=r.min,h=r.proFieldProps,M=r.max,C=(0,d.Z)(r,i);return(0,s.jsx)(a.Z,(0,l.Z)({valueType:"digit",fieldProps:(0,l.Z)({min:P,max:M},E),ref:m,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:h},C))},_=t.forwardRef(u);o.Z=_},92323:function(A,o,e){var l=e(35361),d=e(56929),t=e(50959),a=e(20734),s=e(11527),i=["fieldProps","unCheckedChildren","checkedChildren","proFieldProps"],u=t.forwardRef(function(_,p){var r=_.fieldProps,m=_.unCheckedChildren,E=_.checkedChildren,P=_.proFieldProps,h=(0,d.Z)(_,i);return(0,s.jsx)(a.Z,(0,l.Z)({valueType:"switch",fieldProps:(0,l.Z)({unCheckedChildren:m,checkedChildren:E},r),ref:p,valuePropName:"checked",proFieldProps:P,filedConfig:{valuePropName:"checked",ignoreWidth:!0,customLightMode:!0}},h))});o.Z=u},33245:function(A,o,e){e.r(o);var l=e(90228),d=e.n(l),t=e(87999),a=e.n(t),s=e(48305),i=e.n(s),u=e(50959),_=e(49547),p=e(35748),r=e(19014),m=e(92323),E=e(50925),P=e(94675),h=e(3598),M=e(7485),C=e(2733),n=e(11527),R=function(D){var T=E.Z.useForm(),x=i()(T,1),c=x[0],O=D.values;(0,u.useEffect)(function(){console.log(O,"values"),c.resetFields(),c.setFieldsValue(O)},[c,D]);var L=(0,M.useIntl)(),I=function(){c.submit()},U=function(){D.onCancel()},W=function(){var v=a()(d()().mark(function F(j){return d()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:D.onSubmit(j);case 1:case"end":return f.stop()}},F)}));return function(j){return v.apply(this,arguments)}}();return(0,n.jsx)(P.Z,{width:640,title:"\u8F6E\u64AD\u56FE",open:D.open,forceRender:!0,destroyOnClose:!0,onOk:I,onCancel:U,children:(0,n.jsxs)(_.A,{form:c,submitter:!1,layout:"horizontal",onFinish:W,children:[(0,n.jsx)(p.Z,{name:"id",label:"ID",disabled:!0,hidden:!0}),(0,n.jsx)(_.A.Group,{children:(0,n.jsx)(r.Z,{name:"title",label:"\u6807\u9898",placeholder:"\u8BF7\u8F93\u5165\u6807\u9898"})}),(0,n.jsxs)(_.A.Group,{children:[(0,n.jsx)(_.A.Item,{label:"\u6392\u5E8F",name:"sortOrder",children:(0,n.jsx)(h.Z,{style:{width:200}})}),(0,n.jsx)(r.Z,{name:"jumpUrl",label:"\u8DF3\u8F6C\u5730\u5740",placeholder:"\u8BF7\u8F93\u5165\u8DF3\u8F6C\u5730\u5740"}),(0,n.jsx)(m.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],checkedChildren:"\u542F\u7528",unCheckedChildren:"\u7981\u7528",name:"status",label:"\u662F\u5426\u542F\u7528",fieldProps:{defaultChecked:!0}})]}),(0,n.jsx)(_.A.Group,{children:(0,n.jsx)(_.A.Item,{label:"\u56FE\u7247",name:"imageUrl",children:(0,n.jsx)(C.Z,{fileType:"image",defaultValue:O==null?void 0:O.imageUrl,count:1,mode:""})})})]})})};o.default=R}}]);
|
||||||
1
dist/src__pages__config__banner__index.e0331437.async.js
vendored
Normal file
10
dist/src__pages__config__config__index.a8d055b0.async.js
vendored
Normal file
1
dist/src__pages__facility__serviceCharge__index.7c458627.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5351],{986:function(L,d,e){e.r(d),e.d(d,{default:function(){return C}});var h=e(90228),s=e.n(h),g=e(87999),c=e.n(g),p=e(7485);function y(l){return i.apply(this,arguments)}function i(){return i=c()(s()().mark(function l(o){return s()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,p.request)("/adminn/device/amount/page",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},data:o||{}}));case 1:case"end":return a.stop()}},l)})),i.apply(this,arguments)}var T=e(50959),x=e(16030),R=e(78383),u=e(11527),j=function(){var o=(0,T.useRef)(),v=[{title:"ID",dataIndex:"id",valueType:"text",search:!1},{title:"\u670D\u52A1\u8D39\u91D1\u989D",dataIndex:"amout",valueType:"text",search:!1},{title:"\u670D\u52A1\u8D39\u4EA7\u751F\u65E5\u671F",dataIndex:"incomeDay",valueType:"dateRange",search:{transform:function(r){return{incomeDayBegin:r[0],incomeDayEnd:r[1]}}}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createTime",valueType:"text",search:!1}];return(0,u.jsx)(x._z,{children:(0,u.jsx)("div",{style:{width:"100%",float:"right"},children:(0,u.jsx)(R.Z,{actionRef:o,rowKey:"id",search:{labelWidth:120},request:function(){var a=c()(s()().mark(function r(f,I,P){var m,t;return s()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,y(f);case 2:return m=n.sent,t=m.data,n.abrupt("return",{data:(t==null?void 0:t.records)||[],total:t==null?void 0:t.total});case 5:case"end":return n.stop()}},r)}));return function(r,f,I){return a.apply(this,arguments)}}(),columns:v},"logList")})})},C=j}}]);
|
||||||
1
dist/src__pages__finance__earnings__index.b4d49dc9.async.js
vendored
Normal file
1
dist/src__pages__finance__integral__index.5fc09362.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2722],{15643:function(T,o,e){e.r(o);var c=e(90228),t=e.n(c),h=e(87999),l=e.n(h),d=e(19869),E=e(50959),i=e(16030),f=e(78383),a=e(11527),D=function(){var _=(0,E.useRef)(),r=[{title:"ID",dataIndex:"id",valueType:"text",search:!1},{title:"\u7528\u6237ID",dataIndex:"userId",valueType:"text",search:!1},{title:"\u94B1\u5305",dataIndex:"points2",valueType:"text",search:!1},{title:"\u4FEE\u6539\u65F6\u95F4",dataIndex:"updateTime",valueType:"text",search:!1},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createTime",valueType:"text",search:!1}];return(0,a.jsx)(i._z,{children:(0,a.jsx)("div",{style:{width:"100%",float:"right"},children:(0,a.jsx)(f.Z,{actionRef:_,rowKey:"id",search:{labelWidth:120},request:function(){var p=l()(t()().mark(function n(P,g,O){var v,s;return t()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,(0,d.xY)(P);case 2:return v=u.sent,s=v.data,u.abrupt("return",{data:(s==null?void 0:s.records)||[],total:s==null?void 0:s.total});case 5:case"end":return u.stop()}},n)}));return function(n,P,g){return p.apply(this,arguments)}}(),columns:r},"logList")})})};o.default=D},19869:function(T,o,e){e.d(o,{I7:function(){return D},eq:function(){return f},xY:function(){return E}});var c=e(90228),t=e.n(c),h=e(87999),l=e.n(h),d=e(7485);function E(_){return i.apply(this,arguments)}function i(){return i=l()(t()().mark(function _(r){return t()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,d.request)("/admin/userspoints/page",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},data:r||{}}));case 1:case"end":return n.stop()}},_)})),i.apply(this,arguments)}function f(_){return a.apply(this,arguments)}function a(){return a=l()(t()().mark(function _(r){return t()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,d.request)("/admin/userspoints/extract/page",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},data:r||{}}));case 1:case"end":return n.stop()}},_)})),a.apply(this,arguments)}function D(_){return m.apply(this,arguments)}function m(){return m=l()(t()().mark(function _(r){return t()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,d.request)("/admin/userspoints/record/page",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},data:r||{}}));case 1:case"end":return n.stop()}},_)})),m.apply(this,arguments)}}}]);
|
||||||
1
dist/src__pages__finance__variation__index.86d3f9cf.async.js
vendored
Normal file
1
dist/src__pages__finance__withdraw__components__TempFormModal.f31e6721.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5829],{85751:function(h,d,_){_.r(d);var p=_(26068),l=_.n(p),M=_(15558),P=_.n(M),c=_(48305),u=_.n(c),j=_(94675),A=_(953),r=_(50159),m=_(50959),v=_(75201),b=_(59806),n=_(11527);d.default=function(a){var C=a.modalOpenState,U=a.onModalOpenState,B=a.onSubmit,x=(0,m.useState)([]),i=u()(x,2),e=i[0],E=i[1],f=(0,m.useState)(!1),D=u()(f,2),R=D[0],T=D[1],L={onRemove:function(t){var o=e.indexOf(t),s=e.slice();s.splice(o,1),E(s)},beforeUpload:function(t){return E([].concat(P()(e),[t])),!1},fileList:e};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(j.Z,{title:"\u5BFC\u5165\u63D0\u73B0\u7ED3\u679C",open:C,onOk:B,footer:function(t,o){var s=o.OkBtn,S=o.CancelBtn;return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(s,{})})},children:(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)(A.Z,l()(l()({className:"mr-6"},L),{},{children:(0,n.jsx)(r.ZP,{icon:(0,n.jsx)(v.Z,{}),children:"\u9009\u62E9\u6587\u4EF6"})})),(0,n.jsx)(r.ZP,{icon:(0,n.jsx)(b.Z,{}),children:"\u4E0B\u8F7D\u6A21\u677F"})]})})})}}}]);
|
||||||
1
dist/src__pages__finance__withdraw__index.b716663c.async.js
vendored
Normal file
1
dist/src__pages__goodsSetMeal__$id__create.e126e229.async.js
vendored
Normal file
1
dist/src__pages__goodsSetMeal__$id__update.27b6e8f8.async.js
vendored
Normal file
1
dist/src__pages__goodsSetMeal__index.d718f2e8.async.js
vendored
Normal file
1
dist/src__pages__goods__$id__create.a0d5b94c.async.js
vendored
Normal file
1
dist/src__pages__goods__$id__update.4bd37760.async.js
vendored
Normal file
1
dist/src__pages__goods__index.bd311f3e.async.js
vendored
Normal file
1
dist/src__pages__note__cate__edit.866678ae.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[3342],{35748:function(R,t,_){var a=_(35361),s=_(56929),d=_(50959),m=_(20734),i=_(11527),u=["fieldProps","min","proFieldProps","max"],E=function(n,P){var D=n.fieldProps,O=n.min,M=n.proFieldProps,e=n.max,v=(0,s.Z)(n,u);return(0,i.jsx)(m.Z,(0,a.Z)({valueType:"digit",fieldProps:(0,a.Z)({min:O,max:e},D),ref:P,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:M},v))},o=d.forwardRef(E);t.Z=o},20859:function(R,t,_){_.r(t);var a=_(90228),s=_.n(a),d=_(87999),m=_.n(d),i=_(48305),u=_.n(i),E=_(50959),o=_(49547),c=_(35748),n=_(19014),P=_(50925),D=_(94675),O=_(3598),M=_(7485),e=_(11527),v=function(r){var j=P.Z.useForm(),F=u()(j,1),l=F[0],A=r.values;(0,E.useEffect)(function(){console.log(A,"values"),l.resetFields(),l.setFieldsValue(A)},[l,r]);var B=(0,M.useIntl)(),T=function(){l.submit()},I=function(){r.onCancel()},x=function(){var p=m()(s()().mark(function f(C){return s()().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:r.onSubmit(C);case 1:case"end":return h.stop()}},f)}));return function(C){return p.apply(this,arguments)}}();return(0,e.jsx)(D.Z,{width:640,title:"\u8F6E\u64AD\u56FE",open:r.open,forceRender:!0,destroyOnClose:!0,onOk:T,onCancel:I,children:(0,e.jsxs)(o.A,{form:l,submitter:!1,layout:"horizontal",onFinish:x,children:[(0,e.jsx)(c.Z,{name:"id",label:"ID",disabled:!0,hidden:!0}),(0,e.jsx)(o.A.Group,{children:(0,e.jsx)(n.Z,{name:"name",label:"\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"})}),(0,e.jsx)(o.A.Group,{children:(0,e.jsx)(o.A.Item,{label:"\u6392\u5E8F",name:"sort",children:(0,e.jsx)(O.Z,{style:{width:200}})})})]})})};t.default=v}}]);
|
||||||
1
dist/src__pages__note__cate__index.01c3b570.async.js
vendored
Normal file
1
dist/src__pages__note__note__edit.145fe92f.async.js
vendored
Normal file
1
dist/src__pages__note__note__index.c35b60b0.async.js
vendored
Normal file
1
dist/src__pages__order__index.37a49989.async.js
vendored
Normal file
1
dist/src__pages__payment__index.8fd12029.async.js
vendored
Normal file
1
dist/src__pages__system__log__index.f12e38f4.async.js
vendored
Normal file
1
dist/src__pages__system__menu__edit.bc36c2fa.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8776],{71041:function(o,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};e.default=a},28842:function(o,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z"}}]},name:"arrow-right",theme:"outlined"};e.default=a},99247:function(o,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;function a(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}},37504:function(o,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;function a(s,h){if(!s)return!1;if(s.contains)return s.contains(h);for(var v=h;v;){if(v===s)return!0;v=v.parentNode}return!1}},87214:function(o,e,a){"use strict";var s=a(7613).default;Object.defineProperty(e,"__esModule",{value:!0}),e.clearContainerCache=N,e.injectCSS=g,e.removeCSS=k,e.updateCSS=R;var h=s(a(99247)),v=s(a(37504)),w="data-rc-order",M="data-rc-priority",C="rc-util-key",f=new Map;function b(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=n.mark;return t?t.startsWith("data-")?t:"data-".concat(t):C}function O(n){if(n.attachTo)return n.attachTo;var t=document.querySelector("head");return t||document.body}function l(n){return n==="queue"?"prependQueue":n?"prepend":"append"}function u(n){return Array.from((f.get(n)||n).children).filter(function(t){return t.tagName==="STYLE"})}function g(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,h.default)())return null;var r=t.csp,d=t.prepend,c=t.priority,m=c===void 0?0:c,_=l(d),p=_==="prependQueue",i=document.createElement("style");i.setAttribute(w,_),p&&m&&i.setAttribute(M,"".concat(m)),r!=null&&r.nonce&&(i.nonce=r==null?void 0:r.nonce),i.innerHTML=n;var y=O(t),E=y.firstChild;if(d){if(p){var P=u(y).filter(function(A){if(!["prepend","prependQueue"].includes(A.getAttribute(w)))return!1;var D=Number(A.getAttribute(M)||0);return m>=D});if(P.length)return y.insertBefore(i,P[P.length-1].nextSibling),i}y.insertBefore(i,E)}else y.appendChild(i);return i}function S(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=O(t);return u(r).find(function(d){return d.getAttribute(b(t))===n})}function k(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=S(n,t);if(r){var d=O(t);d.removeChild(r)}}function L(n,t){var r=f.get(n);if(!r||!(0,v.default)(document,r)){var d=g("",t),c=d.parentNode;f.set(n,c),n.removeChild(d)}}function N(){f.clear()}function R(n,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d=O(r);L(d,r);var c=S(t,r);if(c){var m,_;if((m=r.csp)!==null&&m!==void 0&&m.nonce&&c.nonce!==((_=r.csp)===null||_===void 0?void 0:_.nonce)){var p;c.nonce=(p=r.csp)===null||p===void 0?void 0:p.nonce}return c.innerHTML!==n&&(c.innerHTML=n),c}var i=g(n,r);return i.setAttribute(b(r),t),i}},93878:function(o,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.call=C,e.default=void 0,e.note=w,e.noteOnce=b,e.preMessage=void 0,e.resetWarned=M,e.warning=v,e.warningOnce=f;var a={},s=[],h=e.preMessage=function(u){s.push(u)};function v(l,u){if(!1)var g}function w(l,u){if(!1)var g}function M(){a={}}function C(l,u,g){!u&&!a[g]&&(l(!1,g),a[g]=!0)}function f(l,u){C(v,l,u)}function b(l,u){C(w,l,u)}f.preMessage=h,f.resetWarned=M,f.noteOnce=b;var O=e.default=f},7613:function(o){function e(a){return a&&a.__esModule?a:{default:a}}o.exports=e,o.exports.__esModule=!0,o.exports.default=o.exports}}]);
|
||||||
1
dist/src__pages__system__menu__edit.e6c21101.chunk.css
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.iconPicSearcher___hJg4D{display:inline-block;margin:0 8px}.iconPicSearcher___hJg4D .icon-pic-btn___L4v1S{color:#00000073;cursor:pointer;transition:all .3s}.iconPicSearcher___hJg4D .icon-pic-btn___L4v1S:hover{color:#000000d9}.icon-pic-preview___ilSDh{width:30px;height:30px;margin-top:10px;padding:8px;text-align:center;border:1px solid #d9d9d9;border-radius:4px}.icon-pic-preview___ilSDh>img{max-width:50px;max-height:50px}.icon-pic-search-result___gIGCh{min-height:50px;padding:0 10px}.icon-pic-search-result___gIGCh>.result-tip___LzRmi{padding:10px 0;color:#00000073}.icon-pic-search-result___gIGCh>table{width:100%}.icon-pic-search-result___gIGCh>table .col-icon___BSYZg{width:80px;padding:10px 0}.icon-pic-search-result___gIGCh>table .col-icon___BSYZg>.anticon___qL_hm{font-size:30px}.icon-pic-search-result___gIGCh>table .col-icon___BSYZg>.anticon___qL_hm :hover{color:#40a9ff}ul.anticonsList___HMi_c{margin:2px 0;overflow:hidden;direction:ltr;list-style:none}ul.anticonsList___HMi_c li{position:relative;float:left;width:48px;height:48px;margin:3px 0;padding:2px 0 0;overflow:hidden;color:#555;text-align:center;list-style:none;background-color:inherit;border-radius:4px;cursor:pointer;transition:color .3s ease-in-out,background-color .3s ease-in-out}.rtl___Ezi11 ul.anticonsList___HMi_c li{margin:3px 0;padding:2px 0 0}ul.anticonsList___HMi_c li .anticon___qL_hm{margin:4px 0 2px;font-size:24px;transition:transform .3s ease-in-out;will-change:transform}ul.anticonsList___HMi_c li .anticonClass___Ei9dm{display:block;font-family:Lucida Console,Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;white-space:nowrap;text-align:center;transform:scale(.83)}ul.anticonsList___HMi_c li .anticonClass___Ei9dm .ant-badge___Zv5ig{transition:color .3s ease-in-out}ul.anticonsList___HMi_c li:hover{color:#fff;background-color:#1890ff}ul.anticonsList___HMi_c li:hover .anticon___qL_hm{transform:scale(1.4)}ul.anticonsList___HMi_c li:hover .ant-badge___Zv5ig{color:#fff}ul.anticonsList___HMi_c li.TwoTone___EPyBa:hover{background-color:#8ecafe}ul.anticonsList___HMi_c li.copied___NGd_a:hover{color:#fff3}ul.anticonsList___HMi_c li.copied___NGd_a:after{top:-2px;opacity:1}.copied-code___wW8vD{padding:2px 4px;font-size:12px;background:#f5f5f5;border-radius:2px}.iconPicSearcher{display:inline-block;margin:0 8px}.iconPicSearcher .icon-pic-btn{color:#00000073;cursor:pointer;transition:all .3s}.iconPicSearcher .icon-pic-btn:hover{color:#000000d9}.icon-pic-preview{width:30px;height:30px;margin-top:10px;padding:8px;text-align:center;border:1px solid #d9d9d9;border-radius:4px}.icon-pic-preview>img{max-width:50px;max-height:50px}.icon-pic-search-result{min-height:50px;padding:0 10px}.icon-pic-search-result>.result-tip{padding:10px 0;color:#00000073}.icon-pic-search-result>table{width:100%}.icon-pic-search-result>table .col-icon{width:80px;padding:10px 0}.icon-pic-search-result>table .col-icon>.anticon{font-size:30px}.icon-pic-search-result>table .col-icon>.anticon :hover{color:#40a9ff}ul.anticonsList{margin:2px 0;overflow:hidden;direction:ltr;list-style:none}ul.anticonsList li{position:relative;float:left;width:48px;height:48px;margin:3px 0;padding:2px 0 0;overflow:hidden;color:#555;text-align:center;list-style:none;background-color:inherit;border-radius:4px;cursor:pointer;transition:color .3s ease-in-out,background-color .3s ease-in-out}.rtl ul.anticonsList li{margin:3px 0;padding:2px 0 0}ul.anticonsList li .anticon{margin:4px 0 2px;font-size:24px;transition:transform .3s ease-in-out;will-change:transform}ul.anticonsList li .anticonClass{display:block;font-family:Lucida Console,Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;white-space:nowrap;text-align:center;transform:scale(.83)}ul.anticonsList li .anticonClass .ant-badge{transition:color .3s ease-in-out}ul.anticonsList li:hover{color:#fff;background-color:#1890ff}ul.anticonsList li:hover .anticon{transform:scale(1.4)}ul.anticonsList li:hover .ant-badge{color:#fff}ul.anticonsList li.TwoTone:hover{background-color:#8ecafe}ul.anticonsList li.copied:hover{color:#fff3}ul.anticonsList li.copied:after{top:-2px;opacity:1}.copied-code{padding:2px 4px;font-size:12px;background:#f5f5f5;border-radius:2px}
|
||||||
1
dist/src__pages__system__menu__index.80222ed3.async.js
vendored
Normal file
1
dist/src__pages__system__menu__index.e6c21101.chunk.css
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.iconPicSearcher___hJg4D{display:inline-block;margin:0 8px}.iconPicSearcher___hJg4D .icon-pic-btn___L4v1S{color:#00000073;cursor:pointer;transition:all .3s}.iconPicSearcher___hJg4D .icon-pic-btn___L4v1S:hover{color:#000000d9}.icon-pic-preview___ilSDh{width:30px;height:30px;margin-top:10px;padding:8px;text-align:center;border:1px solid #d9d9d9;border-radius:4px}.icon-pic-preview___ilSDh>img{max-width:50px;max-height:50px}.icon-pic-search-result___gIGCh{min-height:50px;padding:0 10px}.icon-pic-search-result___gIGCh>.result-tip___LzRmi{padding:10px 0;color:#00000073}.icon-pic-search-result___gIGCh>table{width:100%}.icon-pic-search-result___gIGCh>table .col-icon___BSYZg{width:80px;padding:10px 0}.icon-pic-search-result___gIGCh>table .col-icon___BSYZg>.anticon___qL_hm{font-size:30px}.icon-pic-search-result___gIGCh>table .col-icon___BSYZg>.anticon___qL_hm :hover{color:#40a9ff}ul.anticonsList___HMi_c{margin:2px 0;overflow:hidden;direction:ltr;list-style:none}ul.anticonsList___HMi_c li{position:relative;float:left;width:48px;height:48px;margin:3px 0;padding:2px 0 0;overflow:hidden;color:#555;text-align:center;list-style:none;background-color:inherit;border-radius:4px;cursor:pointer;transition:color .3s ease-in-out,background-color .3s ease-in-out}.rtl___Ezi11 ul.anticonsList___HMi_c li{margin:3px 0;padding:2px 0 0}ul.anticonsList___HMi_c li .anticon___qL_hm{margin:4px 0 2px;font-size:24px;transition:transform .3s ease-in-out;will-change:transform}ul.anticonsList___HMi_c li .anticonClass___Ei9dm{display:block;font-family:Lucida Console,Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;white-space:nowrap;text-align:center;transform:scale(.83)}ul.anticonsList___HMi_c li .anticonClass___Ei9dm .ant-badge___Zv5ig{transition:color .3s ease-in-out}ul.anticonsList___HMi_c li:hover{color:#fff;background-color:#1890ff}ul.anticonsList___HMi_c li:hover .anticon___qL_hm{transform:scale(1.4)}ul.anticonsList___HMi_c li:hover .ant-badge___Zv5ig{color:#fff}ul.anticonsList___HMi_c li.TwoTone___EPyBa:hover{background-color:#8ecafe}ul.anticonsList___HMi_c li.copied___NGd_a:hover{color:#fff3}ul.anticonsList___HMi_c li.copied___NGd_a:after{top:-2px;opacity:1}.copied-code___wW8vD{padding:2px 4px;font-size:12px;background:#f5f5f5;border-radius:2px}.iconPicSearcher{display:inline-block;margin:0 8px}.iconPicSearcher .icon-pic-btn{color:#00000073;cursor:pointer;transition:all .3s}.iconPicSearcher .icon-pic-btn:hover{color:#000000d9}.icon-pic-preview{width:30px;height:30px;margin-top:10px;padding:8px;text-align:center;border:1px solid #d9d9d9;border-radius:4px}.icon-pic-preview>img{max-width:50px;max-height:50px}.icon-pic-search-result{min-height:50px;padding:0 10px}.icon-pic-search-result>.result-tip{padding:10px 0;color:#00000073}.icon-pic-search-result>table{width:100%}.icon-pic-search-result>table .col-icon{width:80px;padding:10px 0}.icon-pic-search-result>table .col-icon>.anticon{font-size:30px}.icon-pic-search-result>table .col-icon>.anticon :hover{color:#40a9ff}ul.anticonsList{margin:2px 0;overflow:hidden;direction:ltr;list-style:none}ul.anticonsList li{position:relative;float:left;width:48px;height:48px;margin:3px 0;padding:2px 0 0;overflow:hidden;color:#555;text-align:center;list-style:none;background-color:inherit;border-radius:4px;cursor:pointer;transition:color .3s ease-in-out,background-color .3s ease-in-out}.rtl ul.anticonsList li{margin:3px 0;padding:2px 0 0}ul.anticonsList li .anticon{margin:4px 0 2px;font-size:24px;transition:transform .3s ease-in-out;will-change:transform}ul.anticonsList li .anticonClass{display:block;font-family:Lucida Console,Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;white-space:nowrap;text-align:center;transform:scale(.83)}ul.anticonsList li .anticonClass .ant-badge{transition:color .3s ease-in-out}ul.anticonsList li:hover{color:#fff;background-color:#1890ff}ul.anticonsList li:hover .anticon{transform:scale(1.4)}ul.anticonsList li:hover .ant-badge{color:#fff}ul.anticonsList li.TwoTone:hover{background-color:#8ecafe}ul.anticonsList li.copied:hover{color:#fff3}ul.anticonsList li.copied:after{top:-2px;opacity:1}.copied-code{padding:2px 4px;font-size:12px;background:#f5f5f5;border-radius:2px}
|
||||||
1
dist/src__pages__system__role__edit.14f923e0.async.js
vendored
Normal file
1
dist/src__pages__system__role__index.697ff83d.async.js
vendored
Normal file
1
dist/src__pages__system__user__edit.40192523.async.js
vendored
Normal file
1
dist/src__pages__system__user__index.b57a3980.async.js
vendored
Normal file
1
dist/src__pages__user__grade__index.a1c8e241.async.js
vendored
Normal file
1
dist/src__pages__user__login__index.13f5e071.chunk.css
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.ant-pro-layout-content{padding:0;padding-block:0!important;padding-inline:0!important;height:100vh!important}
|
||||||
1
dist/src__pages__user__login__index.175dbb02.async.js
vendored
Normal file
1
dist/src__pages__user__login__login.test.f48da20e.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8009],{76793:function(k,E,t){"use strict";t.r(E);var S=t(90228),u=t.n(S),D=t(87999),g=t.n(D),$=t(48305),F=t.n($),v=t(50959),h=t(7485),I=t(9772),K=t(85385),O=t(83098),X=t(89937),z=t(89350),H=t(542),J=t(45443),m=t(11527),G="/",L=!1;function A(a){var r=(0,O.gD)(),e=(0,v.useState)(void 0),s=F()(e,2),l=s[0],i=s[1];if((0,v.useEffect)(function(){var p=function(){var o=g()(u()().mark(function d(){var y,T,P,C,R,M,j,w;return u()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,(0,X.s)(r);case 2:return y=f.sent,T=y.routes,P=y.routeComponents,f.next=7,r.applyPlugins({key:"patchRoutes",type:h.ApplyPluginsType.event,args:{routes:T,routeComponents:P}});case 7:return C=r.applyPlugins({key:"modifyContextOpts",type:h.ApplyPluginsType.modify,initialValue:{}}),R=C.basename||"/",M=(0,K.f)({type:"memory",basename:R}),j={routes:T,routeComponents:P,pluginManager:r,rootElement:C.rootElement||document.getElementById("root"),publicPath:G,runtimePublicPath:L,history:M,basename:R,components:!0},w=r.applyPlugins({key:"modifyClientRenderOpts",type:h.ApplyPluginsType.modify,initialValue:j}),f.abrupt("return",w);case 13:case"end":return f.stop()}},d)}));return function(){return o.apply(this,arguments)}}();p().then(function(o){if(i(o),a.location){var d;o==null||(d=o.history)===null||d===void 0||d.push(a.location)}a.historyRef&&(a.historyRef.current=o==null?void 0:o.history)})},[]),l===void 0)return(0,m.jsx)("div",{id:"loading"});var n=(0,I.p6)(l);return(0,m.jsx)(v.Fragment,{children:(0,m.jsx)(n,{})})}var c=t(66303),V=t(84898),Y=t(32699),b=t(80209),N="/",U=function(r){var e=(0,Y.merge)({port:7e3,scene:"default"},r),s=e.port,l=e.scene;return new Promise(function(i,n){var p=(0,V.fork)((0,b.join)(N,"./startMock.js"),[],{env:{scene:l,port:String(s)}});p.on("exit",function(o){o!==0&&n(new Error("Mock server exited with code ".concat(o)))}),i({close:function(){p.kill()}})})},B=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:100;return new Promise(function(e){setTimeout(function(){e(!0)},r)})},x;describe("Login Page",function(){beforeAll(g()(u()().mark(function a(){return u()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U({port:8e3,scene:"login"});case 2:x=e.sent;case 3:case"end":return e.stop()}},a)}))),afterAll(function(){var a;(a=x)===null||a===void 0||a.close()}),it("should show login form",g()(u()().mark(function a(){var r,e,s;return u()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return e=v.createRef(),s=(0,c.sY)((0,m.jsx)(A,{historyRef:e,location:{pathname:"/user/login"}})),i.next=4,s.findAllByText("Ant Design");case 4:(0,c.TK)(function(){var n;(n=e.current)===null||n===void 0||n.push("/user/login")}),expect((r=s.baseElement)===null||r===void 0||(r=r.querySelector(".ant-pro-form-login-desc"))===null||r===void 0?void 0:r.textContent).toBe("Ant Design is the most influential web design specification in Xihu district"),expect(s.asFragment()).toMatchSnapshot(),s.unmount();case 8:case"end":return i.stop()}},a)}))),it("should login success",g()(u()().mark(function a(){var r,e,s,l;return u()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=v.createRef(),e=(0,c.sY)((0,m.jsx)(A,{historyRef:r,location:{pathname:"/user/login"}})),n.next=4,e.findAllByText("Ant Design");case 4:return n.next=6,e.findByPlaceholderText("Username: admin or user");case 6:return s=n.sent,(0,c.TK)(function(){c.BX.change(s,{target:{value:"admin"}})}),n.next=10,e.findByPlaceholderText("Password: ant.design");case 10:return l=n.sent,(0,c.TK)(function(){c.BX.change(l,{target:{value:"ant.design"}})}),n.next=14,e.findByText("Login");case 14:return n.next=16,n.sent.click();case 16:return n.next=18,B(5e3);case 18:return n.next=20,e.findAllByText("Ant Design Pro");case 20:return expect(e.asFragment()).toMatchSnapshot(),n.next=23,B(2e3);case 23:e.unmount();case 24:case"end":return n.stop()}},a)})))})},65660:function(){},84898:function(){}}]);
|
||||||
1
dist/src__pages__user__register-result__index.6cf5ebb8.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5106,2727],{27483:function(i,s,u){u.r(s);var n=u(48305),a=u.n(n),l=u(7485),r=u(50159),E=u(84974),P=u(50959),d=u(43329),e=u(11527),o=function(){var m=(0,d.default)(),t=m.styles,D=(0,l.useSearchParams)(),c=a()(D,1),_=c[0],A=(0,e.jsxs)("div",{className:t.actions,children:[(0,e.jsx)("a",{href:"",children:(0,e.jsx)(r.ZP,{size:"large",type:"primary",children:(0,e.jsx)("span",{children:"\u67E5\u770B\u90AE\u7BB1"})})}),(0,e.jsx)(l.Link,{to:"/",children:(0,e.jsx)(r.ZP,{size:"large",children:"\u8FD4\u56DE\u9996\u9875"})})]}),F=(_==null?void 0:_.get("account"))||"AntDesign@example.com";return(0,e.jsx)(E.ZP,{className:t.registerResult,status:"success",title:(0,e.jsx)("div",{className:t.title,children:(0,e.jsxs)("span",{children:["\u4F60\u7684\u8D26\u6237\uFF1A",F," \u6CE8\u518C\u6210\u529F"]})}),subTitle:"\u6FC0\u6D3B\u90AE\u4EF6\u5DF2\u53D1\u9001\u5230\u4F60\u7684\u90AE\u7BB1\u4E2D\uFF0C\u90AE\u4EF6\u6709\u6548\u671F\u4E3A24\u5C0F\u65F6\u3002\u8BF7\u53CA\u65F6\u767B\u5F55\u90AE\u7BB1\uFF0C\u70B9\u51FB\u90AE\u4EF6\u4E2D\u7684\u94FE\u63A5\u6FC0\u6D3B\u5E10\u6237\u3002",extra:A})};s.default=o},43329:function(i,s,u){u.r(s);var n=u(13179),a=(0,n.kc)(function(){return{registerResult:{width:"800px",minHeight:"400px",margin:"auto",padding:"80px",background:"none"},anticon:{fontSize:"64px"},title:{marginTop:"32px",fontSize:"20px",lineHeight:"28px"},actions:{marginTop:"40px","a + a":{marginLeft:"8px"}}}});s.default=a}}]);
|
||||||
1
dist/src__pages__user__register-result__style.style.8978797b.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2727],{43329:function(a,n,t){t.r(n);var e=t(13179),i=(0,e.kc)(function(){return{registerResult:{width:"800px",minHeight:"400px",margin:"auto",padding:"80px",background:"none"},anticon:{fontSize:"64px"},title:{marginTop:"32px",fontSize:"20px",lineHeight:"28px"},actions:{marginTop:"40px","a + a":{marginLeft:"8px"}}}});n.default=i}}]);
|
||||||
1
dist/src__pages__user__register___mock.ea66fc46.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[344],{16799:function(n,e,t){t.r(e),e.default={"POST /api/register":function(i,u){u.send({data:{status:"ok",currentAuthority:"user"}})}}}}]);
|
||||||
1
dist/src__pages__user__register__index.2197cc65.async.js
vendored
Normal file
1
dist/src__pages__user__register__service.7461f739.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[207],{48980:function(i,r,_){_.r(r),_.d(r,{fakeRegister:function(){return o}});var u=_(90228),t=_.n(u),a=_(87999),d=_.n(a),m=_(7485);function o(s){return n.apply(this,arguments)}function n(){return n=d()(t()().mark(function s(l){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,m.request)("/api/register",{method:"POST",data:l}));case 1:case"end":return e.stop()}},s)})),n.apply(this,arguments)}}}]);
|
||||||
1
dist/src__pages__user__register__style.style.cba1b658.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7015],{84526:function(a,n,r){r.r(n);var t=r(13179),s=(0,t.kc)(function(e){var o=e.token;return{main:{width:"368px",margin:"0 auto",h3:{marginBottom:"20px",fontSize:"16px"}},password:{marginBottom:"24px",".ant-form-item-explain":{display:"none"}},getCaptcha:{display:"block",width:"100%"},footer:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},submit:{width:"50%"},success:{transition:"color 0.3s",color:o.colorSuccess},warning:{transition:"color 0.3s",color:o.colorWarning},error:{transition:"color 0.3s",color:o.colorError},"progress-pass > .progress":{".ant-progress-bg":{backgroundColor:o.colorWarning}}}});n.default=s}}]);
|
||||||
1
dist/src__pages__user__user__components__LevelFormModal.bba273ad.async.js
vendored
Normal file
1
dist/src__pages__user__user__components__TempFormModal.1dd1b0d7.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8280],{20902:function(B,t,e){var d=e(35361),o=e(56929),i=e(50959),m=e(20734),E=e(11527),a=["fieldProps","proFieldProps"],r=function(_,p){var u=_.fieldProps,n=_.proFieldProps,D=(0,o.Z)(_,a);return(0,E.jsx)(m.Z,(0,d.Z)({ref:p,valueType:"textarea",fieldProps:u,proFieldProps:n},D))};t.Z=i.forwardRef(r)},79669:function(B,t,e){e.r(t);var d=e(90228),o=e.n(d),i=e(87999),m=e.n(i),E=e(5e4),a=e(49547),r=e(19014),A=e(20902),_=e(40676),p=e(50959),u=e(11527);t.default=function(n){var D=n.values,h=n.modalOpenState,O=n.onModalOpenState,v=n.onSubmit,c=(0,p.useRef)();return(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)(E.Y,{title:"\u6295\u8D44\u4EBA-\u8F6C\u6302",formRef:c,submitter:{searchConfig:{resetText:"\u91CD\u7F6E"},resetButtonProps:{onClick:function(){var s;(s=c.current)===null||s===void 0||s.resetFields()}}},initialValues:D,onFinish:function(){var F=m()(o()().mark(function s(M){var P;return o()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,v(M);case 2:(P=c.current)===null||P===void 0||P.resetFields();case 3:case"end":return l.stop()}},s)}));return function(s){return F.apply(this,arguments)}}(),open:h,onOpenChange:O,children:[(0,u.jsxs)("div",{className:"text-red-600 ",children:[(0,u.jsx)("div",{children:"A\uFF1A\u9700\u8981\u8F6C\u6302\u7684\u6295\u8D44\u4EBA"}),(0,u.jsx)("div",{children:"B\uFF1A\u8F6C\u6302\u8BE5\u6295\u8D44\u4EBA\u540D\u4E0B"}),(0,u.jsx)("div",{children:"\u8BE5\u64CD\u4F5C\u628AA\u8F6C\u6302\u5230B\u540D\u4E0B"})]}),(0,u.jsx)(_.Z,{children:"A\uFF1A\u9700\u8981\u8F6C\u6302\u7684\u6295\u8D44\u4EBA"}),(0,u.jsxs)(a.A.Group,{children:[(0,u.jsx)(r.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],width:"md",name:"userNameSource",label:"\u7528\u6237\u540D(A)",placeholder:"\u8BF7\u8F93\u5165"}),(0,u.jsx)(r.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],width:"md",name:"phoneSource",label:"\u624B\u673A\u53F7(A)",placeholder:"\u8BF7\u8F93\u5165"})]}),(0,u.jsx)(_.Z,{children:"B\uFF1A\u628AA\u8F6C\u6302\u8BE5\u6295\u8D44\u4EBA\u540D\u4E0B"}),(0,u.jsxs)(a.A.Group,{children:[(0,u.jsx)(r.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],width:"md",name:"userNameTarget",label:"\u7528\u6237\u540D(B)",placeholder:"\u8BF7\u8F93\u5165"}),(0,u.jsx)(r.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],width:"md",name:"phoneTarget",label:"\u624B\u673A\u53F7(B)",placeholder:"\u8BF7\u8F93\u5165"})]}),(0,u.jsx)(A.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],width:"md",name:"remark",label:"\u5907\u6CE8",placeholder:"\u8BF7\u8F93\u5165"})]})})}}}]);
|
||||||
1
dist/src__pages__user__user__edit.4c12e6d3.async.js
vendored
Normal file
1
dist/src__pages__user__user__index.9e3faa72.async.js
vendored
Normal file
1
dist/t__plugin-layout__Layout.10dd31a5.async.js
vendored
Normal file
1
dist/t__plugin-layout__Layout.6cae69f5.chunk.css
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
@media screen and (max-width: 480px){.umi-plugin-layout-container{width:100%!important}.umi-plugin-layout-container>*{border-radius:0!important}}.umi-plugin-layout-menu .anticon{margin-right:8px}.umi-plugin-layout-menu .ant-dropdown-menu-item{min-width:160px}.umi-plugin-layout-right{display:flex!important;float:right;height:100%;margin-left:auto;overflow:hidden}.umi-plugin-layout-right .umi-plugin-layout-action{display:flex;align-items:center;height:100%;padding:0 12px;cursor:pointer;transition:all .3s}.umi-plugin-layout-right .umi-plugin-layout-action>i{color:#ffffffd9;vertical-align:middle}.umi-plugin-layout-right .umi-plugin-layout-action:hover,.umi-plugin-layout-right .umi-plugin-layout-action.opened{background:rgba(0,0,0,.025)}.umi-plugin-layout-right .umi-plugin-layout-search{padding:0 12px}.umi-plugin-layout-right .umi-plugin-layout-search:hover{background:transparent}.umi-plugin-layout-name{margin-left:8px}.umi-plugin-layout-name.umi-plugin-layout-hide-avatar-img{margin-left:0}
|
||||||
1
dist/umi.77a65f21.css
vendored
Normal file
578
dist/umi.de8ce8ab.js
vendored
Normal file
23
jest.config.ts
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import { configUmiAlias, createConfig } from '@umijs/max/test';
|
||||||
|
|
||||||
|
export default async () => {
|
||||||
|
const config = await configUmiAlias({
|
||||||
|
...createConfig({
|
||||||
|
target: 'browser',
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
console.log(JSON.stringify(config));
|
||||||
|
|
||||||
|
return {
|
||||||
|
...config,
|
||||||
|
testEnvironmentOptions: {
|
||||||
|
...(config?.testEnvironmentOptions || {}),
|
||||||
|
url: 'http://localhost:8000',
|
||||||
|
},
|
||||||
|
setupFiles: [...(config.setupFiles || []), './tests/setupTests.jsx'],
|
||||||
|
globals: {
|
||||||
|
...config.globals,
|
||||||
|
localStorage: null,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
11
jsconfig.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"jsx": "react-jsx",
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["./src/*"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
210
mock/analysis.mock.ts
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
import dayjs from 'dayjs';
|
||||||
|
import type { Request, Response } from 'express';
|
||||||
|
import type { AnalysisData, DataItem, RadarData } from './data';
|
||||||
|
|
||||||
|
// mock data
|
||||||
|
const visitData: DataItem[] = [];
|
||||||
|
const beginDay = new Date().getTime();
|
||||||
|
|
||||||
|
const fakeY = [7, 5, 4, 2, 4, 7, 5, 6, 5, 9, 6, 3, 1, 5, 3, 6, 5];
|
||||||
|
for (let i = 0; i < fakeY.length; i += 1) {
|
||||||
|
visitData.push({
|
||||||
|
x: dayjs(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format('YYYY-MM-DD'),
|
||||||
|
y: fakeY[i],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const visitData2 = [];
|
||||||
|
const fakeY2 = [1, 6, 4, 8, 3, 7, 2];
|
||||||
|
for (let i = 0; i < fakeY2.length; i += 1) {
|
||||||
|
visitData2.push({
|
||||||
|
x: dayjs(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format('YYYY-MM-DD'),
|
||||||
|
y: fakeY2[i],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const salesData = [];
|
||||||
|
for (let i = 0; i < 12; i += 1) {
|
||||||
|
salesData.push({
|
||||||
|
x: `${i + 1}月`,
|
||||||
|
y: Math.floor(Math.random() * 1000) + 200,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const searchData = [];
|
||||||
|
for (let i = 0; i < 50; i += 1) {
|
||||||
|
searchData.push({
|
||||||
|
index: i + 1,
|
||||||
|
keyword: `搜索关键词-${i}`,
|
||||||
|
count: Math.floor(Math.random() * 1000),
|
||||||
|
range: Math.floor(Math.random() * 100),
|
||||||
|
status: Math.floor((Math.random() * 10) % 2),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const salesTypeData = [
|
||||||
|
{
|
||||||
|
x: '家用电器',
|
||||||
|
y: 4544,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '食用酒水',
|
||||||
|
y: 3321,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '个护健康',
|
||||||
|
y: 3113,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '服饰箱包',
|
||||||
|
y: 2341,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '母婴产品',
|
||||||
|
y: 1231,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '其他',
|
||||||
|
y: 1231,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const salesTypeDataOnline = [
|
||||||
|
{
|
||||||
|
x: '家用电器',
|
||||||
|
y: 244,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '食用酒水',
|
||||||
|
y: 321,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '个护健康',
|
||||||
|
y: 311,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '服饰箱包',
|
||||||
|
y: 41,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '母婴产品',
|
||||||
|
y: 121,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '其他',
|
||||||
|
y: 111,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const salesTypeDataOffline = [
|
||||||
|
{
|
||||||
|
x: '家用电器',
|
||||||
|
y: 99,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '食用酒水',
|
||||||
|
y: 188,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '个护健康',
|
||||||
|
y: 344,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '服饰箱包',
|
||||||
|
y: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '其他',
|
||||||
|
y: 65,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const offlineData = [];
|
||||||
|
for (let i = 0; i < 10; i += 1) {
|
||||||
|
offlineData.push({
|
||||||
|
name: `Stores ${i}`,
|
||||||
|
cvr: Math.ceil(Math.random() * 9) / 10,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const offlineChartData = [];
|
||||||
|
for (let i = 0; i < 20; i += 1) {
|
||||||
|
const date = dayjs(new Date().getTime() + 1000 * 60 * 30 * i).format('HH:mm');
|
||||||
|
offlineChartData.push({
|
||||||
|
date,
|
||||||
|
type: '客流量',
|
||||||
|
value: Math.floor(Math.random() * 100) + 10,
|
||||||
|
});
|
||||||
|
offlineChartData.push({
|
||||||
|
date,
|
||||||
|
type: '支付笔数',
|
||||||
|
value: Math.floor(Math.random() * 100) + 10,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const radarOriginData = [
|
||||||
|
{
|
||||||
|
name: '个人',
|
||||||
|
ref: 10,
|
||||||
|
koubei: 8,
|
||||||
|
output: 4,
|
||||||
|
contribute: 5,
|
||||||
|
hot: 7,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '团队',
|
||||||
|
ref: 3,
|
||||||
|
koubei: 9,
|
||||||
|
output: 6,
|
||||||
|
contribute: 3,
|
||||||
|
hot: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '部门',
|
||||||
|
ref: 4,
|
||||||
|
koubei: 1,
|
||||||
|
output: 6,
|
||||||
|
contribute: 5,
|
||||||
|
hot: 7,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const radarData: RadarData[] = [];
|
||||||
|
const radarTitleMap = {
|
||||||
|
ref: '引用',
|
||||||
|
koubei: '口碑',
|
||||||
|
output: '产量',
|
||||||
|
contribute: '贡献',
|
||||||
|
hot: '热度',
|
||||||
|
};
|
||||||
|
radarOriginData.forEach((item) => {
|
||||||
|
Object.keys(item).forEach((key) => {
|
||||||
|
if (key !== 'name') {
|
||||||
|
radarData.push({
|
||||||
|
name: item.name,
|
||||||
|
label: radarTitleMap[key as 'ref'],
|
||||||
|
value: item[key as 'ref'],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
const getFakeChartData: AnalysisData = {
|
||||||
|
visitData,
|
||||||
|
visitData2,
|
||||||
|
salesData,
|
||||||
|
searchData,
|
||||||
|
offlineData,
|
||||||
|
offlineChartData,
|
||||||
|
salesTypeData,
|
||||||
|
salesTypeDataOnline,
|
||||||
|
salesTypeDataOffline,
|
||||||
|
radarData,
|
||||||
|
};
|
||||||
|
|
||||||
|
const fakeChartData = (_: Request, res: Response) => {
|
||||||
|
return res.json({
|
||||||
|
data: getFakeChartData,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
'GET /api/fake_analysis_chart_data': fakeChartData,
|
||||||
|
};
|
||||||
176
mock/listTableList.ts
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
import dayjs from 'dayjs';
|
||||||
|
import { Request, Response } from 'express';
|
||||||
|
import { parse } from 'url';
|
||||||
|
|
||||||
|
// mock tableListDataSource
|
||||||
|
const genList = (current: number, pageSize: number) => {
|
||||||
|
const tableListDataSource: API.RuleListItem[] = [];
|
||||||
|
|
||||||
|
for (let i = 0; i < pageSize; i += 1) {
|
||||||
|
const index = (current - 1) * 10 + i;
|
||||||
|
tableListDataSource.push({
|
||||||
|
key: index,
|
||||||
|
disabled: i % 6 === 0,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: [
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||||
|
][i % 2],
|
||||||
|
name: `TradeCode ${index}`,
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: Math.floor(Math.random() * 1000),
|
||||||
|
status: Math.floor(Math.random() * 10) % 4,
|
||||||
|
updatedAt: dayjs().format('YYYY-MM-DD'),
|
||||||
|
createdAt: dayjs().format('YYYY-MM-DD'),
|
||||||
|
progress: Math.ceil(Math.random() * 100),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
tableListDataSource.reverse();
|
||||||
|
return tableListDataSource;
|
||||||
|
};
|
||||||
|
|
||||||
|
let tableListDataSource = genList(1, 100);
|
||||||
|
|
||||||
|
function getRule(req: Request, res: Response, u: string) {
|
||||||
|
let realUrl = u;
|
||||||
|
if (!realUrl || Object.prototype.toString.call(realUrl) !== '[object String]') {
|
||||||
|
realUrl = req.url;
|
||||||
|
}
|
||||||
|
const { current = 1, pageSize = 10 } = req.query;
|
||||||
|
const params = parse(realUrl, true).query as unknown as API.PageParams &
|
||||||
|
API.RuleListItem & {
|
||||||
|
sorter: any;
|
||||||
|
filter: any;
|
||||||
|
};
|
||||||
|
|
||||||
|
let dataSource = [...tableListDataSource].slice(
|
||||||
|
((current as number) - 1) * (pageSize as number),
|
||||||
|
(current as number) * (pageSize as number),
|
||||||
|
);
|
||||||
|
if (params.sorter) {
|
||||||
|
const sorter = JSON.parse(params.sorter);
|
||||||
|
dataSource = dataSource.sort((prev, next) => {
|
||||||
|
let sortNumber = 0;
|
||||||
|
(Object.keys(sorter) as Array<keyof API.RuleListItem>).forEach((key) => {
|
||||||
|
let nextSort = next?.[key] as number;
|
||||||
|
let preSort = prev?.[key] as number;
|
||||||
|
if (sorter[key] === 'descend') {
|
||||||
|
if (preSort - nextSort > 0) {
|
||||||
|
sortNumber += -1;
|
||||||
|
} else {
|
||||||
|
sortNumber += 1;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (preSort - nextSort > 0) {
|
||||||
|
sortNumber += 1;
|
||||||
|
} else {
|
||||||
|
sortNumber += -1;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return sortNumber;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (params.filter) {
|
||||||
|
const filter = JSON.parse(params.filter as any) as {
|
||||||
|
[key: string]: string[];
|
||||||
|
};
|
||||||
|
if (Object.keys(filter).length > 0) {
|
||||||
|
dataSource = dataSource.filter((item) => {
|
||||||
|
return (Object.keys(filter) as Array<keyof API.RuleListItem>).some((key) => {
|
||||||
|
if (!filter[key]) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (filter[key].includes(`${item[key]}`)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.name) {
|
||||||
|
dataSource = dataSource.filter((data) => data?.name?.includes(params.name || ''));
|
||||||
|
}
|
||||||
|
const result = {
|
||||||
|
data: dataSource,
|
||||||
|
total: tableListDataSource.length,
|
||||||
|
success: true,
|
||||||
|
pageSize,
|
||||||
|
current: parseInt(`${params.current}`, 10) || 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
return res.json(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
function postRule(req: Request, res: Response, u: string, b: Request) {
|
||||||
|
let realUrl = u;
|
||||||
|
if (!realUrl || Object.prototype.toString.call(realUrl) !== '[object String]') {
|
||||||
|
realUrl = req.url;
|
||||||
|
}
|
||||||
|
|
||||||
|
const body = (b && b.body) || req.body;
|
||||||
|
const { method, name, desc, key } = body;
|
||||||
|
|
||||||
|
switch (method) {
|
||||||
|
/* eslint no-case-declarations:0 */
|
||||||
|
case 'delete':
|
||||||
|
tableListDataSource = tableListDataSource.filter((item) => key.indexOf(item.key) === -1);
|
||||||
|
break;
|
||||||
|
case 'post':
|
||||||
|
(() => {
|
||||||
|
const i = Math.ceil(Math.random() * 10000);
|
||||||
|
const newRule: API.RuleListItem = {
|
||||||
|
key: tableListDataSource.length,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: [
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||||
|
][i % 2],
|
||||||
|
name,
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc,
|
||||||
|
callNo: Math.floor(Math.random() * 1000),
|
||||||
|
status: Math.floor(Math.random() * 10) % 2,
|
||||||
|
updatedAt: dayjs().format('YYYY-MM-DD'),
|
||||||
|
createdAt: dayjs().format('YYYY-MM-DD'),
|
||||||
|
progress: Math.ceil(Math.random() * 100),
|
||||||
|
};
|
||||||
|
tableListDataSource.unshift(newRule);
|
||||||
|
return res.json(newRule);
|
||||||
|
})();
|
||||||
|
return;
|
||||||
|
|
||||||
|
case 'update':
|
||||||
|
(() => {
|
||||||
|
let newRule = {};
|
||||||
|
tableListDataSource = tableListDataSource.map((item) => {
|
||||||
|
if (item.key === key) {
|
||||||
|
newRule = { ...item, desc, name };
|
||||||
|
return { ...item, desc, name };
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
return res.json(newRule);
|
||||||
|
})();
|
||||||
|
return;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = {
|
||||||
|
list: tableListDataSource,
|
||||||
|
pagination: {
|
||||||
|
total: tableListDataSource.length,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
res.json(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
'GET /api/rule': getRule,
|
||||||
|
'POST /api/rule': postRule,
|
||||||
|
};
|
||||||
14
mock/monitor.mock.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import type { Request, Response } from 'express';
|
||||||
|
import mockjs from 'mockjs';
|
||||||
|
|
||||||
|
const getTags = (_: Request, res: Response) => {
|
||||||
|
return res.json({
|
||||||
|
data: mockjs.mock({
|
||||||
|
'list|100': [{ name: '@city', 'value|1-100': 150, 'type|0-2': 1 }],
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
'GET /api/tags': getTags,
|
||||||
|
};
|
||||||
115
mock/notices.ts
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
import { Request, Response } from 'express';
|
||||||
|
|
||||||
|
const getNotices = (req: Request, res: Response) => {
|
||||||
|
res.json({
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
id: '000000001',
|
||||||
|
avatar:
|
||||||
|
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/MSbDR4FR2MUAAAAAAAAAAAAAFl94AQBr',
|
||||||
|
title: '你收到了 14 份新周报',
|
||||||
|
datetime: '2017-08-09',
|
||||||
|
type: 'notification',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '000000002',
|
||||||
|
avatar:
|
||||||
|
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/hX-PTavYIq4AAAAAAAAAAAAAFl94AQBr',
|
||||||
|
title: '你推荐的 曲妮妮 已通过第三轮面试',
|
||||||
|
datetime: '2017-08-08',
|
||||||
|
type: 'notification',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '000000003',
|
||||||
|
avatar:
|
||||||
|
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/jHX5R5l3QjQAAAAAAAAAAAAAFl94AQBr',
|
||||||
|
title: '这种模板可以区分多种通知类型',
|
||||||
|
datetime: '2017-08-07',
|
||||||
|
read: true,
|
||||||
|
type: 'notification',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '000000004',
|
||||||
|
avatar:
|
||||||
|
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/Wr4mQqx6jfwAAAAAAAAAAAAAFl94AQBr',
|
||||||
|
title: '左侧图标用于区分不同的类型',
|
||||||
|
datetime: '2017-08-07',
|
||||||
|
type: 'notification',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '000000005',
|
||||||
|
avatar:
|
||||||
|
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/Mzj_TbcWUj4AAAAAAAAAAAAAFl94AQBr',
|
||||||
|
title: '内容不要超过两行字,超出时自动截断',
|
||||||
|
datetime: '2017-08-07',
|
||||||
|
type: 'notification',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '000000006',
|
||||||
|
avatar:
|
||||||
|
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/eXLzRbPqQE4AAAAAAAAAAAAAFl94AQBr',
|
||||||
|
title: '曲丽丽 评论了你',
|
||||||
|
description: '描述信息描述信息描述信息',
|
||||||
|
datetime: '2017-08-07',
|
||||||
|
type: 'message',
|
||||||
|
clickClose: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '000000007',
|
||||||
|
avatar:
|
||||||
|
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/w5mRQY2AmEEAAAAAAAAAAAAAFl94AQBr',
|
||||||
|
title: '朱偏右 回复了你',
|
||||||
|
description: '这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像',
|
||||||
|
datetime: '2017-08-07',
|
||||||
|
type: 'message',
|
||||||
|
clickClose: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '000000008',
|
||||||
|
avatar:
|
||||||
|
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/wPadR5M9918AAAAAAAAAAAAAFl94AQBr',
|
||||||
|
title: '标题',
|
||||||
|
description: '这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像',
|
||||||
|
datetime: '2017-08-07',
|
||||||
|
type: 'message',
|
||||||
|
clickClose: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '000000009',
|
||||||
|
title: '任务名称',
|
||||||
|
description: '任务需要在 2017-01-12 20:00 前启动',
|
||||||
|
extra: '未开始',
|
||||||
|
status: 'todo',
|
||||||
|
type: 'event',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '000000010',
|
||||||
|
title: '第三方紧急代码变更',
|
||||||
|
description: '冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务',
|
||||||
|
extra: '马上到期',
|
||||||
|
status: 'urgent',
|
||||||
|
type: 'event',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '000000011',
|
||||||
|
title: '信息安全考试',
|
||||||
|
description: '指派竹尔于 2017-01-09 前完成更新并发布',
|
||||||
|
extra: '已耗时 8 天',
|
||||||
|
status: 'doing',
|
||||||
|
type: 'event',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '000000012',
|
||||||
|
title: 'ABCD 版本发布',
|
||||||
|
description: '冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务',
|
||||||
|
extra: '进行中',
|
||||||
|
status: 'processing',
|
||||||
|
type: 'event',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
'GET /api/notices': getNotices,
|
||||||
|
};
|
||||||
324
mock/requestRecord.mock.js
Normal file
@@ -0,0 +1,324 @@
|
|||||||
|
module.exports = {
|
||||||
|
'GET /api/currentUser': {
|
||||||
|
data: {
|
||||||
|
name: 'Serati Ma',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png',
|
||||||
|
userid: '00000001',
|
||||||
|
email: 'antdesign@alipay.com',
|
||||||
|
signature: '海纳百川,有容乃大',
|
||||||
|
title: '交互专家',
|
||||||
|
group: '蚂蚁金服-某某某事业群-某某平台部-某某技术部-UED',
|
||||||
|
tags: [
|
||||||
|
{ key: '0', label: '很有想法的' },
|
||||||
|
{ key: '1', label: '专注设计' },
|
||||||
|
{ key: '2', label: '辣~' },
|
||||||
|
{ key: '3', label: '大长腿' },
|
||||||
|
{ key: '4', label: '川妹子' },
|
||||||
|
{ key: '5', label: '海纳百川' },
|
||||||
|
],
|
||||||
|
notifyCount: 12,
|
||||||
|
unreadCount: 11,
|
||||||
|
country: 'China',
|
||||||
|
geographic: {
|
||||||
|
province: { label: '浙江省', key: '330000' },
|
||||||
|
city: { label: '杭州市', key: '330100' },
|
||||||
|
},
|
||||||
|
address: '西湖区工专路 77 号',
|
||||||
|
phone: '0752-268888888',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'GET /api/rule': {
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
key: 99,
|
||||||
|
disabled: false,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||||
|
name: 'TradeCode 99',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 503,
|
||||||
|
status: '0',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 81,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 98,
|
||||||
|
disabled: false,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||||
|
name: 'TradeCode 98',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 164,
|
||||||
|
status: '0',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 12,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 97,
|
||||||
|
disabled: false,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||||
|
name: 'TradeCode 97',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 174,
|
||||||
|
status: '1',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 81,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 96,
|
||||||
|
disabled: true,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||||
|
name: 'TradeCode 96',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 914,
|
||||||
|
status: '0',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 7,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 95,
|
||||||
|
disabled: false,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||||
|
name: 'TradeCode 95',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 698,
|
||||||
|
status: '2',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 82,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 94,
|
||||||
|
disabled: false,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||||
|
name: 'TradeCode 94',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 488,
|
||||||
|
status: '1',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 14,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 93,
|
||||||
|
disabled: false,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||||
|
name: 'TradeCode 93',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 580,
|
||||||
|
status: '2',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 77,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 92,
|
||||||
|
disabled: false,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||||
|
name: 'TradeCode 92',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 244,
|
||||||
|
status: '3',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 58,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 91,
|
||||||
|
disabled: false,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||||
|
name: 'TradeCode 91',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 959,
|
||||||
|
status: '0',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 66,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 90,
|
||||||
|
disabled: true,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||||
|
name: 'TradeCode 90',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 958,
|
||||||
|
status: '0',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 72,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 89,
|
||||||
|
disabled: false,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||||
|
name: 'TradeCode 89',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 301,
|
||||||
|
status: '2',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 88,
|
||||||
|
disabled: false,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||||
|
name: 'TradeCode 88',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 277,
|
||||||
|
status: '1',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 12,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 87,
|
||||||
|
disabled: false,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||||
|
name: 'TradeCode 87',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 810,
|
||||||
|
status: '1',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 82,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 86,
|
||||||
|
disabled: false,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||||
|
name: 'TradeCode 86',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 780,
|
||||||
|
status: '3',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 22,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 85,
|
||||||
|
disabled: false,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||||
|
name: 'TradeCode 85',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 705,
|
||||||
|
status: '3',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 12,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 84,
|
||||||
|
disabled: true,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||||
|
name: 'TradeCode 84',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 203,
|
||||||
|
status: '0',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 79,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 83,
|
||||||
|
disabled: false,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||||
|
name: 'TradeCode 83',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 491,
|
||||||
|
status: '2',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 59,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 82,
|
||||||
|
disabled: false,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||||
|
name: 'TradeCode 82',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 73,
|
||||||
|
status: '0',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 81,
|
||||||
|
disabled: false,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||||
|
name: 'TradeCode 81',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 406,
|
||||||
|
status: '3',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 61,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 80,
|
||||||
|
disabled: false,
|
||||||
|
href: 'https://ant.design',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||||
|
name: 'TradeCode 80',
|
||||||
|
owner: '曲丽丽',
|
||||||
|
desc: '这是一段描述',
|
||||||
|
callNo: 112,
|
||||||
|
status: '2',
|
||||||
|
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
createdAt: '2022-12-06T05:00:57.040Z',
|
||||||
|
progress: 20,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
total: 100,
|
||||||
|
success: true,
|
||||||
|
pageSize: 20,
|
||||||
|
current: 1,
|
||||||
|
},
|
||||||
|
'POST /api/login/outLogin': { data: {}, success: true },
|
||||||
|
'POST /api/login/account': {
|
||||||
|
status: 'ok',
|
||||||
|
type: 'account',
|
||||||
|
currentAuthority: 'admin',
|
||||||
|
},
|
||||||
|
};
|
||||||
5
mock/route.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
export default {
|
||||||
|
'/api/auth_routes': {
|
||||||
|
'/form/advanced-form': { authority: ['admin', 'user'] },
|
||||||
|
},
|
||||||
|
};
|
||||||
203
mock/user.ts
Normal file
@@ -0,0 +1,203 @@
|
|||||||
|
import { Request, Response } from 'express';
|
||||||
|
|
||||||
|
const waitTime = (time: number = 100) => {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
resolve(true);
|
||||||
|
}, time);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
async function getFakeCaptcha(req: Request, res: Response) {
|
||||||
|
await waitTime(2000);
|
||||||
|
return res.json('captcha-xxx');
|
||||||
|
}
|
||||||
|
|
||||||
|
const { ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION } = process.env;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前用户的权限,如果为空代表没登录
|
||||||
|
* current user access, if is '', user need login
|
||||||
|
* 如果是 pro 的预览,默认是有权限的
|
||||||
|
*/
|
||||||
|
let access = ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site' ? 'admin' : '';
|
||||||
|
|
||||||
|
const getAccess = () => {
|
||||||
|
return access;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 代码中会兼容本地 service mock 以及部署站点的静态数据
|
||||||
|
export default {
|
||||||
|
// 支持值为 Object 和 Array
|
||||||
|
'GET /api/currentUser': (req: Request, res: Response) => {
|
||||||
|
if (!getAccess()) {
|
||||||
|
res.status(401).send({
|
||||||
|
data: {
|
||||||
|
isLogin: false,
|
||||||
|
},
|
||||||
|
errorCode: '401',
|
||||||
|
errorMessage: '请先登录!',
|
||||||
|
success: true,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
res.send({
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
name: 'Serati Ma',
|
||||||
|
avatar: 'https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png',
|
||||||
|
userid: '00000001',
|
||||||
|
email: 'antdesign@alipay.com',
|
||||||
|
signature: '海纳百川,有容乃大',
|
||||||
|
title: '交互专家',
|
||||||
|
group: '蚂蚁金服-某某某事业群-某某平台部-某某技术部-UED',
|
||||||
|
tags: [
|
||||||
|
{
|
||||||
|
key: '0',
|
||||||
|
label: '很有想法的',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '1',
|
||||||
|
label: '专注设计',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '2',
|
||||||
|
label: '辣~',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '3',
|
||||||
|
label: '大长腿',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '4',
|
||||||
|
label: '川妹子',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '5',
|
||||||
|
label: '海纳百川',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
notifyCount: 12,
|
||||||
|
unreadCount: 11,
|
||||||
|
country: 'China',
|
||||||
|
access: getAccess(),
|
||||||
|
geographic: {
|
||||||
|
province: {
|
||||||
|
label: '浙江省',
|
||||||
|
key: '330000',
|
||||||
|
},
|
||||||
|
city: {
|
||||||
|
label: '杭州市',
|
||||||
|
key: '330100',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
address: '西湖区工专路 77 号',
|
||||||
|
phone: '0752-268888888',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// GET POST 可省略
|
||||||
|
'GET /api/users': [
|
||||||
|
{
|
||||||
|
key: '1',
|
||||||
|
name: 'John Brown',
|
||||||
|
age: 32,
|
||||||
|
address: 'New York No. 1 Lake Park',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '2',
|
||||||
|
name: 'Jim Green',
|
||||||
|
age: 42,
|
||||||
|
address: 'London No. 1 Lake Park',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '3',
|
||||||
|
name: 'Joe Black',
|
||||||
|
age: 32,
|
||||||
|
address: 'Sidney No. 1 Lake Park',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'POST /api/login/account': async (req: Request, res: Response) => {
|
||||||
|
const { password, username, type } = req.body;
|
||||||
|
await waitTime(2000);
|
||||||
|
if (password === 'ant.design' && username === 'admin') {
|
||||||
|
res.send({
|
||||||
|
status: 'ok',
|
||||||
|
type,
|
||||||
|
currentAuthority: 'admin',
|
||||||
|
});
|
||||||
|
access = 'admin';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (password === 'ant.design' && username === 'user') {
|
||||||
|
res.send({
|
||||||
|
status: 'ok',
|
||||||
|
type,
|
||||||
|
currentAuthority: 'user',
|
||||||
|
});
|
||||||
|
access = 'user';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (type === 'mobile') {
|
||||||
|
res.send({
|
||||||
|
status: 'ok',
|
||||||
|
type,
|
||||||
|
currentAuthority: 'admin',
|
||||||
|
});
|
||||||
|
access = 'admin';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
res.send({
|
||||||
|
status: 'error',
|
||||||
|
type,
|
||||||
|
currentAuthority: 'guest',
|
||||||
|
});
|
||||||
|
access = 'guest';
|
||||||
|
},
|
||||||
|
'POST /api/login/outLogin': (req: Request, res: Response) => {
|
||||||
|
access = '';
|
||||||
|
res.send({ data: {}, success: true });
|
||||||
|
},
|
||||||
|
'POST /api/register': (req: Request, res: Response) => {
|
||||||
|
res.send({ status: 'ok', currentAuthority: 'user', success: true });
|
||||||
|
},
|
||||||
|
'GET /api/500': (req: Request, res: Response) => {
|
||||||
|
res.status(500).send({
|
||||||
|
timestamp: 1513932555104,
|
||||||
|
status: 500,
|
||||||
|
error: 'error',
|
||||||
|
message: 'error',
|
||||||
|
path: '/base/category/list',
|
||||||
|
});
|
||||||
|
},
|
||||||
|
'GET /api/404': (req: Request, res: Response) => {
|
||||||
|
res.status(404).send({
|
||||||
|
timestamp: 1513932643431,
|
||||||
|
status: 404,
|
||||||
|
error: 'Not Found',
|
||||||
|
message: 'No message available',
|
||||||
|
path: '/base/category/list/2121212',
|
||||||
|
});
|
||||||
|
},
|
||||||
|
'GET /api/403': (req: Request, res: Response) => {
|
||||||
|
res.status(403).send({
|
||||||
|
timestamp: 1513932555104,
|
||||||
|
status: 403,
|
||||||
|
error: 'Forbidden',
|
||||||
|
message: 'Forbidden',
|
||||||
|
path: '/base/category/list',
|
||||||
|
});
|
||||||
|
},
|
||||||
|
'GET /api/401': (req: Request, res: Response) => {
|
||||||
|
res.status(401).send({
|
||||||
|
timestamp: 1513932555104,
|
||||||
|
status: 401,
|
||||||
|
error: 'Unauthorized',
|
||||||
|
message: 'Unauthorized',
|
||||||
|
path: '/base/category/list',
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
'GET /api/login/captcha': getFakeCaptcha,
|
||||||
|
};
|
||||||
418
mock/workplace.mock.ts
Normal file
@@ -0,0 +1,418 @@
|
|||||||
|
import { DataItem } from '@antv/g2plot/esm/interface/config';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
import type { Request, Response } from 'express';
|
||||||
|
|
||||||
|
export type SearchDataType = {
|
||||||
|
index: number;
|
||||||
|
keyword: string;
|
||||||
|
count: number;
|
||||||
|
range: number;
|
||||||
|
status: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
// mock data
|
||||||
|
const visitData: DataItem[] = [];
|
||||||
|
const beginDay = new Date().getTime();
|
||||||
|
|
||||||
|
const fakeY = [7, 5, 4, 2, 4, 7, 5, 6, 5, 9, 6, 3, 1, 5, 3, 6, 5];
|
||||||
|
for (let i = 0; i < fakeY.length; i += 1) {
|
||||||
|
visitData.push({
|
||||||
|
x: dayjs(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format('YYYY-MM-DD'),
|
||||||
|
y: fakeY[i],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const visitData2: DataItem[] = [];
|
||||||
|
const fakeY2 = [1, 6, 4, 8, 3, 7, 2];
|
||||||
|
for (let i = 0; i < fakeY2.length; i += 1) {
|
||||||
|
visitData2.push({
|
||||||
|
x: dayjs(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format('YYYY-MM-DD'),
|
||||||
|
y: fakeY2[i],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const salesData: DataItem[] = [];
|
||||||
|
for (let i = 0; i < 12; i += 1) {
|
||||||
|
salesData.push({
|
||||||
|
x: `${i + 1}月`,
|
||||||
|
y: Math.floor(Math.random() * 1000) + 200,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const searchData: SearchDataType[] = [];
|
||||||
|
for (let i = 0; i < 50; i += 1) {
|
||||||
|
searchData.push({
|
||||||
|
index: i + 1,
|
||||||
|
keyword: `搜索关键词-${i}`,
|
||||||
|
count: Math.floor(Math.random() * 1000),
|
||||||
|
range: Math.floor(Math.random() * 100),
|
||||||
|
status: Math.floor((Math.random() * 10) % 2),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const salesTypeData = [
|
||||||
|
{
|
||||||
|
x: '家用电器',
|
||||||
|
y: 4544,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '食用酒水',
|
||||||
|
y: 3321,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '个护健康',
|
||||||
|
y: 3113,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '服饰箱包',
|
||||||
|
y: 2341,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '母婴产品',
|
||||||
|
y: 1231,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '其他',
|
||||||
|
y: 1231,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const salesTypeDataOnline = [
|
||||||
|
{
|
||||||
|
x: '家用电器',
|
||||||
|
y: 244,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '食用酒水',
|
||||||
|
y: 321,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '个护健康',
|
||||||
|
y: 311,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '服饰箱包',
|
||||||
|
y: 41,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '母婴产品',
|
||||||
|
y: 121,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '其他',
|
||||||
|
y: 111,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const salesTypeDataOffline = [
|
||||||
|
{
|
||||||
|
x: '家用电器',
|
||||||
|
y: 99,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '食用酒水',
|
||||||
|
y: 188,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '个护健康',
|
||||||
|
y: 344,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '服饰箱包',
|
||||||
|
y: 255,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: '其他',
|
||||||
|
y: 65,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const offlineData: OfflineDataType[] = [];
|
||||||
|
for (let i = 0; i < 10; i += 1) {
|
||||||
|
offlineData.push({
|
||||||
|
name: `Stores ${i}`,
|
||||||
|
cvr: Math.ceil(Math.random() * 9) / 10,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const offlineChartData: DataItem[] = [];
|
||||||
|
for (let i = 0; i < 20; i += 1) {
|
||||||
|
offlineChartData.push({
|
||||||
|
x: new Date().getTime() + 1000 * 60 * 30 * i,
|
||||||
|
y1: Math.floor(Math.random() * 100) + 10,
|
||||||
|
y2: Math.floor(Math.random() * 100) + 10,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const titles = [
|
||||||
|
'Alipay',
|
||||||
|
'Angular',
|
||||||
|
'Ant Design',
|
||||||
|
'Ant Design Pro',
|
||||||
|
'Bootstrap',
|
||||||
|
'React',
|
||||||
|
'Vue',
|
||||||
|
'Webpack',
|
||||||
|
];
|
||||||
|
const avatars = [
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png', // Alipay
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png', // Angular
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png', // Ant Design
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png', // Ant Design Pro
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/siCrBXXhmvTQGWPNLBow.png', // Bootstrap
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png', // React
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/ComBAopevLwENQdKWiIn.png', // Vue
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/nxkuOJlFJuAUhzlMTCEe.png', // Webpack
|
||||||
|
];
|
||||||
|
|
||||||
|
const avatars2 = [
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png',
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/cnrhVkzwxjPwAaCfPbdc.png',
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/gaOngJwsRYRaVAuXXcmB.png',
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/ubnKSIfAJTxIgXOKlciN.png',
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/WhxKECPNujWoWEFNdnJE.png',
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/jZUIxmJycoymBprLOUbT.png',
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/psOgztMplJMGpVEqfcgF.png',
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/ZpBqSxLxVEXfcUNoPKrz.png',
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/laiEnJdGHVOhJrUShBaJ.png',
|
||||||
|
'https://gw.alipayobjects.com/zos/rmsportal/UrQsqscbKEpNuJcvBZBu.png',
|
||||||
|
];
|
||||||
|
|
||||||
|
const getNotice = (_: Request, res: Response) => {
|
||||||
|
res.json({
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
id: 'xxx1',
|
||||||
|
title: titles[0],
|
||||||
|
logo: avatars[0],
|
||||||
|
description: '那是一种内在的东西,他们到达不了,也无法触及的',
|
||||||
|
updatedAt: new Date(),
|
||||||
|
member: '科学搬砖组',
|
||||||
|
href: '',
|
||||||
|
memberLink: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'xxx2',
|
||||||
|
title: titles[1],
|
||||||
|
logo: avatars[1],
|
||||||
|
description: '希望是一个好东西,也许是最好的,好东西是不会消亡的',
|
||||||
|
updatedAt: new Date('2017-07-24'),
|
||||||
|
member: '全组都是吴彦祖',
|
||||||
|
href: '',
|
||||||
|
memberLink: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'xxx3',
|
||||||
|
title: titles[2],
|
||||||
|
logo: avatars[2],
|
||||||
|
description: '城镇中有那么多的酒馆,她却偏偏走进了我的酒馆',
|
||||||
|
updatedAt: new Date(),
|
||||||
|
member: '中二少女团',
|
||||||
|
href: '',
|
||||||
|
memberLink: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'xxx4',
|
||||||
|
title: titles[3],
|
||||||
|
logo: avatars[3],
|
||||||
|
description: '那时候我只会想自己想要什么,从不想自己拥有什么',
|
||||||
|
updatedAt: new Date('2017-07-23'),
|
||||||
|
member: '程序员日常',
|
||||||
|
href: '',
|
||||||
|
memberLink: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'xxx5',
|
||||||
|
title: titles[4],
|
||||||
|
logo: avatars[4],
|
||||||
|
description: '凛冬将至',
|
||||||
|
updatedAt: new Date('2017-07-23'),
|
||||||
|
member: '高逼格设计天团',
|
||||||
|
href: '',
|
||||||
|
memberLink: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'xxx6',
|
||||||
|
title: titles[5],
|
||||||
|
logo: avatars[5],
|
||||||
|
description: '生命就像一盒巧克力,结果往往出人意料',
|
||||||
|
updatedAt: new Date('2017-07-23'),
|
||||||
|
member: '骗你来学计算机',
|
||||||
|
href: '',
|
||||||
|
memberLink: '',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const getActivities = (_: Request, res: Response) => {
|
||||||
|
res.json({
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
id: 'trend-1',
|
||||||
|
updatedAt: new Date(),
|
||||||
|
user: {
|
||||||
|
name: '曲丽丽',
|
||||||
|
avatar: avatars2[0],
|
||||||
|
},
|
||||||
|
group: {
|
||||||
|
name: '高逼格设计天团',
|
||||||
|
link: 'http://github.com/',
|
||||||
|
},
|
||||||
|
project: {
|
||||||
|
name: '六月迭代',
|
||||||
|
link: 'http://github.com/',
|
||||||
|
},
|
||||||
|
template: '在 @{group} 新建项目 @{project}',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'trend-2',
|
||||||
|
updatedAt: new Date(),
|
||||||
|
user: {
|
||||||
|
name: '付小小',
|
||||||
|
avatar: avatars2[1],
|
||||||
|
},
|
||||||
|
group: {
|
||||||
|
name: '高逼格设计天团',
|
||||||
|
link: 'http://github.com/',
|
||||||
|
},
|
||||||
|
project: {
|
||||||
|
name: '六月迭代',
|
||||||
|
link: 'http://github.com/',
|
||||||
|
},
|
||||||
|
template: '在 @{group} 新建项目 @{project}',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'trend-3',
|
||||||
|
updatedAt: new Date(),
|
||||||
|
user: {
|
||||||
|
name: '林东东',
|
||||||
|
avatar: avatars2[2],
|
||||||
|
},
|
||||||
|
group: {
|
||||||
|
name: '中二少女团',
|
||||||
|
link: 'http://github.com/',
|
||||||
|
},
|
||||||
|
project: {
|
||||||
|
name: '六月迭代',
|
||||||
|
link: 'http://github.com/',
|
||||||
|
},
|
||||||
|
template: '在 @{group} 新建项目 @{project}',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'trend-4',
|
||||||
|
updatedAt: new Date(),
|
||||||
|
user: {
|
||||||
|
name: '周星星',
|
||||||
|
avatar: avatars2[4],
|
||||||
|
},
|
||||||
|
project: {
|
||||||
|
name: '5 月日常迭代',
|
||||||
|
link: 'http://github.com/',
|
||||||
|
},
|
||||||
|
template: '将 @{project} 更新至已发布状态',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'trend-5',
|
||||||
|
updatedAt: new Date(),
|
||||||
|
user: {
|
||||||
|
name: '朱偏右',
|
||||||
|
avatar: avatars2[3],
|
||||||
|
},
|
||||||
|
project: {
|
||||||
|
name: '工程效能',
|
||||||
|
link: 'http://github.com/',
|
||||||
|
},
|
||||||
|
comment: {
|
||||||
|
name: '留言',
|
||||||
|
link: 'http://github.com/',
|
||||||
|
},
|
||||||
|
template: '在 @{project} 发布了 @{comment}',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'trend-6',
|
||||||
|
updatedAt: new Date(),
|
||||||
|
user: {
|
||||||
|
name: '乐哥',
|
||||||
|
avatar: avatars2[5],
|
||||||
|
},
|
||||||
|
group: {
|
||||||
|
name: '程序员日常',
|
||||||
|
link: 'http://github.com/',
|
||||||
|
},
|
||||||
|
project: {
|
||||||
|
name: '品牌迭代',
|
||||||
|
link: 'http://github.com/',
|
||||||
|
},
|
||||||
|
template: '在 @{group} 新建项目 @{project}',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const radarOriginData = [
|
||||||
|
{
|
||||||
|
name: '个人',
|
||||||
|
ref: 10,
|
||||||
|
koubei: 8,
|
||||||
|
output: 4,
|
||||||
|
contribute: 5,
|
||||||
|
hot: 7,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '团队',
|
||||||
|
ref: 3,
|
||||||
|
koubei: 9,
|
||||||
|
output: 6,
|
||||||
|
contribute: 3,
|
||||||
|
hot: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '部门',
|
||||||
|
ref: 4,
|
||||||
|
koubei: 1,
|
||||||
|
output: 6,
|
||||||
|
contribute: 5,
|
||||||
|
hot: 7,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const radarData: any[] = [];
|
||||||
|
const radarTitleMap = {
|
||||||
|
ref: '引用',
|
||||||
|
koubei: '口碑',
|
||||||
|
output: '产量',
|
||||||
|
contribute: '贡献',
|
||||||
|
hot: '热度',
|
||||||
|
};
|
||||||
|
radarOriginData.forEach((item) => {
|
||||||
|
Object.keys(item).forEach((key) => {
|
||||||
|
if (key !== 'name') {
|
||||||
|
radarData.push({
|
||||||
|
name: item.name,
|
||||||
|
label: radarTitleMap[key as 'ref'],
|
||||||
|
value: item[key as 'ref'],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
const getChartData = (_: Request, res: Response) => {
|
||||||
|
res.json({
|
||||||
|
data: {
|
||||||
|
visitData,
|
||||||
|
visitData2,
|
||||||
|
salesData,
|
||||||
|
searchData,
|
||||||
|
offlineData,
|
||||||
|
offlineChartData,
|
||||||
|
salesTypeData,
|
||||||
|
salesTypeDataOnline,
|
||||||
|
salesTypeDataOffline,
|
||||||
|
radarData,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
'GET /api/project/notice': getNotice,
|
||||||
|
'GET /api/activities': getActivities,
|
||||||
|
'GET /api/fake_workplace_chart_data': getChartData,
|
||||||
|
};
|
||||||
103
package.json
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
{
|
||||||
|
"name": "ant-design-pro",
|
||||||
|
"version": "6.0.0",
|
||||||
|
"private": true,
|
||||||
|
"description": "An out-of-box UI solution for enterprise applications",
|
||||||
|
"scripts": {
|
||||||
|
"analyze": "cross-env ANALYZE=1 max build",
|
||||||
|
"build": "max build",
|
||||||
|
"deploy": "npm run build && npm run gh-pages",
|
||||||
|
"dev": "npm run start:dev",
|
||||||
|
"gh-pages": "gh-pages -d dist",
|
||||||
|
"i18n-remove": "pro i18n-remove --locale=zh-CN --write",
|
||||||
|
"postinstall": "max setup",
|
||||||
|
"jest": "jest",
|
||||||
|
"lint": "npm run lint:js && npm run lint:prettier",
|
||||||
|
"lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src ",
|
||||||
|
"lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src",
|
||||||
|
"lint:prettier": "prettier -c --write \"**/**.{js,jsx,tsx,ts,less,md,json}\" --end-of-line auto",
|
||||||
|
"openapi": "max openapi",
|
||||||
|
"prepare": "husky install",
|
||||||
|
"prettier": "prettier -c --write \"**/**.{js,jsx,tsx,ts,less,md,json}\"",
|
||||||
|
"preview": "npm run build && max preview --port 8000",
|
||||||
|
"record": "cross-env NODE_ENV=development REACT_APP_ENV=test max record --scene=login",
|
||||||
|
"serve": "umi-serve",
|
||||||
|
"start": "cross-env UMI_ENV=dev max dev",
|
||||||
|
"start:dev": "cross-env REACT_APP_ENV=dev MOCK=none UMI_ENV=dev max dev",
|
||||||
|
"start:no-mock": "cross-env MOCK=none UMI_ENV=dev max dev",
|
||||||
|
"start:pre": "cross-env REACT_APP_ENV=pre UMI_ENV=dev max dev",
|
||||||
|
"start:test": "cross-env REACT_APP_ENV=test MOCK=none UMI_ENV=dev max dev",
|
||||||
|
"test": "jest",
|
||||||
|
"test:coverage": "npm run jest -- --coverage",
|
||||||
|
"test:update": "npm run jest -- -u",
|
||||||
|
"tsc": "tsc --noEmit"
|
||||||
|
},
|
||||||
|
"browserslist": [
|
||||||
|
"> 1%",
|
||||||
|
"last 2 versions",
|
||||||
|
"not ie <= 10"
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"@ant-design/icons": "^4.8.1",
|
||||||
|
"@ant-design/plots": "^2.1.5",
|
||||||
|
"@ant-design/pro-components": "^2.6.44",
|
||||||
|
"@antv/l7": "^2.20.13",
|
||||||
|
"@antv/l7-maps": "^2.20.13",
|
||||||
|
"@antv/l7-react": "^2.4.3",
|
||||||
|
"@umijs/route-utils": "^2.2.2",
|
||||||
|
"antd": "^5.12.7",
|
||||||
|
"antd-style": "^3.6.1",
|
||||||
|
"autoprefixer": "^10.4.20",
|
||||||
|
"braft-editor": "^2.3.9",
|
||||||
|
"braft-utils": "^3.0.13",
|
||||||
|
"classnames": "^2.5.1",
|
||||||
|
"dayjs": "^1.11.10",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"numeral": "^2.0.6",
|
||||||
|
"omit.js": "^2.0.2",
|
||||||
|
"postcss": "^8.4.41",
|
||||||
|
"querystring": "^0.2.1",
|
||||||
|
"rc-util": "^5.38.1",
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"react-dom": "^18.2.0",
|
||||||
|
"react-fittext": "^1.0.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@ant-design/pro-cli": "^2.1.5",
|
||||||
|
"@testing-library/react": "^13.4.0",
|
||||||
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
||||||
|
"@types/classnames": "^2.3.1",
|
||||||
|
"@types/express": "^4.17.21",
|
||||||
|
"@types/history": "^4.7.11",
|
||||||
|
"@types/jest": "^29.5.11",
|
||||||
|
"@types/lodash": "^4.14.202",
|
||||||
|
"@types/lodash.debounce": "^4.0.9",
|
||||||
|
"@types/react": "^18.2.46",
|
||||||
|
"@types/react-dom": "^18.2.18",
|
||||||
|
"@types/react-helmet": "^6.1.11",
|
||||||
|
"@umijs/fabric": "^2.14.1",
|
||||||
|
"@umijs/lint": "^4.1.0",
|
||||||
|
"@umijs/max": "^4.1.0",
|
||||||
|
"cross-env": "^7.0.3",
|
||||||
|
"eslint": "^8.56.0",
|
||||||
|
"express": "^4.18.2",
|
||||||
|
"gh-pages": "^3.2.3",
|
||||||
|
"husky": "^7.0.4",
|
||||||
|
"jest": "^29.7.0",
|
||||||
|
"jest-environment-jsdom": "^29.7.0",
|
||||||
|
"mockjs": "^1.1.0",
|
||||||
|
"prettier": "^3.1.1",
|
||||||
|
"prettier-plugin-organize-imports": "^3.2.4",
|
||||||
|
"prettier-plugin-packagejson": "^2.4.8",
|
||||||
|
"prettier-plugin-two-style-order": "^1.0.1",
|
||||||
|
"react-dev-inspector": "^1.9.0",
|
||||||
|
"swagger-ui-dist": "^4.19.1",
|
||||||
|
"tailwindcss": "^3.4.10",
|
||||||
|
"ts-node": "^10.9.2",
|
||||||
|
"typescript": "^4.9.5",
|
||||||
|
"umi-presets-pro": "^2.0.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
21730
pnpm-lock.yaml
generated
Normal file
1
public/CNAME
Normal file
@@ -0,0 +1 @@
|
|||||||
|
preview.pro.ant.design
|
||||||
BIN
public/favicon.ico
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
public/icons/icon-128x128.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |