Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d25a37340e | ||
|
|
2414585c06 | ||
|
|
2a78050f6b | ||
|
|
16e79ac4cf | ||
|
|
db2efc5ab7 | ||
|
|
dd29b890a8 | ||
|
|
1809bc4e09 | ||
|
|
59a4bfcbb3 | ||
|
|
7c1c379bcb | ||
|
|
714c506b49 | ||
|
|
83d3db1000 | ||
|
|
648eb9429a | ||
|
|
35b0c8194b | ||
|
|
2787c95916 | ||
|
|
46957d317e | ||
|
|
51d4ae089f | ||
|
|
9c79130cea | ||
|
|
e29943f8ad | ||
|
|
cb386d484d | ||
|
|
bb124b171c | ||
|
|
6f9938100d | ||
|
|
9a637a8edd | ||
|
|
d64231f9cb | ||
|
|
a4191e7d77 | ||
|
|
e77efc4613 | ||
|
|
1e89f8f706 | ||
|
|
48deb4cda0 | ||
|
|
85aefeaa4b | ||
|
|
66182572a6 | ||
|
|
ce734f6809 | ||
|
|
1cd930fa08 | ||
|
|
475fc05e72 | ||
|
|
3a07e6e42b | ||
|
|
b7fdf0d0c1 | ||
|
|
1e1c1c1fc9 | ||
|
|
1f120407d7 | ||
|
|
cd33a867fc | ||
|
|
6c33075e44 | ||
|
|
ff159a7669 | ||
|
|
2b07588a2f | ||
|
|
173bce9474 | ||
|
|
29da312337 | ||
|
|
a1a1b03e14 | ||
|
|
c927a78e95 | ||
|
|
b5acd8d167 | ||
|
|
43c3a8b936 | ||
|
|
498f101352 | ||
|
|
792bb5ddaf | ||
|
|
73122e8c9b | ||
|
|
57237c254a | ||
|
|
b553c82083 | ||
|
|
641ebcbd33 | ||
|
|
03c6b3a572 | ||
|
|
6c019c6e03 | ||
|
|
4f25004331 | ||
|
|
90b96456c1 | ||
|
|
b39b36a8bc | ||
|
|
67aa157d10 | ||
|
|
68ec19ebf7 | ||
|
|
74a764b870 | ||
|
|
93b6d82770 | ||
|
|
46a03a1877 | ||
|
|
bf595384d8 |
@@ -1,15 +0,0 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.{js,jsx,ts,tsx,vue}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"printWidth": 100,
|
||||
"tabWidth": 4,
|
||||
"trailingComma": "all",
|
||||
"singleQuote": true
|
||||
"printWidth": 150,
|
||||
"semi": false,
|
||||
"singleQuote": true
|
||||
}
|
||||
|
||||
@@ -1,5 +1,27 @@
|
||||
# 4.1.0
|
||||
- [ ] MatterItem抽出通用组件
|
||||
|
||||
# 4.0.4
|
||||
1. 修复已知问题
|
||||
|
||||
# 4.0.3
|
||||
1. 修复已知问题
|
||||
|
||||
# 4.0.2
|
||||
1. 修复文件夹跳转列表获取问题
|
||||
|
||||
# 4.0.1
|
||||
1. 修复一些已知问题
|
||||
|
||||
# 4.0.0
|
||||
1. 共享空间
|
||||
|
||||
# 3.2.0
|
||||
1. PC端不展示左侧关于菜单
|
||||
|
||||
# 3.1.6
|
||||
1. 增加云盘剩余容量显示
|
||||
2. 优化拖拽文件夹进行上传的错误提示
|
||||
3. 优化超出限制大小的错误提示
|
||||
4. 修复一些已知问题
|
||||
4. 文件列表页右键展示操作目录
|
||||
5. 修复一些已知问题
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[English Version](https://tank-doc.eyeblue.cn/en)
|
||||
|
||||
# 蓝眼云盘(3.1.5)
|
||||
# 蓝眼云盘(4.0.4)
|
||||
[在线Demo](https://tank.eyeblue.cn) (体验账号: demo 密码:123456)
|
||||
|
||||
蓝眼云盘是蓝眼开源系列代表作品之一,致力于打造精致,优雅,简约的云盘。核心功能如下:
|
||||
@@ -51,11 +51,11 @@ yarn start
|
||||
|
||||
如果您也想参与进来,请尽情的fork, star, post issue, pull requests
|
||||
|
||||
当然你可以加入钉钉群一起直接交流,在钉钉群中可以获取最新beta版本。
|
||||
当然你可以加入钉钉群(一群已满员)一起直接交流,在钉钉群中可以获取最新beta版本。
|
||||
|
||||

|
||||

|
||||
|
||||
群号:23156361
|
||||
群号:44754005
|
||||
|
||||
### Support
|
||||
IDE for this project is supported by [Jetbrains](https://jb.gg/OpenSourceSupport).
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const CracoLessPlugin = require('craco-less');
|
||||
const CracoLessPlugin = require('craco-less')
|
||||
const { CracoAliasPlugin } = require('react-app-alias')
|
||||
const path = require('node:path')
|
||||
|
||||
module.exports = {
|
||||
devServer: {
|
||||
@@ -6,32 +8,40 @@ module.exports = {
|
||||
// proxy for local development.
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:6010',
|
||||
// target: 'http://localhost:6010',
|
||||
target: 'https://tank.ycyin.cn',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/api': '/api'
|
||||
}
|
||||
}
|
||||
'^/api': '/api',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
{
|
||||
|
||||
// less loader.
|
||||
plugin: CracoLessPlugin,
|
||||
options: {
|
||||
// resolve-url-loader只对sass生效,craco-less默认使用sass配置,所以这里手动过滤掉resolve-url-loader
|
||||
modifyLessRule: (lessRule) => {
|
||||
lessRule.use = lessRule.use.filter(i => !i.loader.includes('resolve-url-loader'));
|
||||
return lessRule;
|
||||
lessRule.use = lessRule.use.filter((i) => !i.loader.includes('resolve-url-loader'))
|
||||
return lessRule
|
||||
},
|
||||
lessLoaderOptions: {
|
||||
lessOptions: {
|
||||
modifyVars: {'@primary-color': '#215891'},
|
||||
modifyVars: { '@primary-color': '#215891' },
|
||||
javascriptEnabled: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
plugin: CracoAliasPlugin,
|
||||
options: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, 'src'),
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 208 KiB |
@@ -0,0 +1 @@
|
||||
<!--<code_scheme name="Project" version="173" />-->
|
||||
@@ -1,28 +1,29 @@
|
||||
{
|
||||
"name": "tank-front",
|
||||
"version": "3.1.6",
|
||||
"version": "4.0.4",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@ahooksjs/use-url-state": "^3.5.1",
|
||||
"@ant-design/icons": "4.7.0",
|
||||
"@craco/craco": "6.4.3",
|
||||
"@types/echarts": "4.6.1",
|
||||
"@types/node": "16.7.13",
|
||||
"@types/photoswipe": "^4.1.2",
|
||||
"@types/qs": "^6.9.7",
|
||||
"@types/react": "17.0.2",
|
||||
"@types/react-dom": "17.0.2",
|
||||
"@types/react-router-dom": "^5.3.3",
|
||||
"ahooks": "^3.8.0",
|
||||
"antd": "4.19.2",
|
||||
"axios": "^0.26.1",
|
||||
"axios": "^1.7.2",
|
||||
"comma-separated-values": "^3.6.4",
|
||||
"copy-to-clipboard": "^3.3.3",
|
||||
"craco-less": "2.0.0",
|
||||
"echarts": "4.8.0",
|
||||
"echarts-for-react": "2.0.16",
|
||||
"photoswipe": "^4.1.3",
|
||||
"prettier": "^2.6.2",
|
||||
"qs": "^6.10.3",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2",
|
||||
"react-photo-view": "^1.2.3",
|
||||
"react-router": "^5.2.0",
|
||||
"react-router-dom": "^5.2.0",
|
||||
"react-scripts": "5.0.0",
|
||||
@@ -44,5 +45,24 @@
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"husky": "^8.0.3",
|
||||
"lint-staged": "^13.2.2",
|
||||
"postcss-flexbugs-fixes": "^5.0.2",
|
||||
"prettier": "^3.2.5",
|
||||
"react-app-alias": "^2.2.2"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,jsx,ts,tsx}": [
|
||||
"prettier --write",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
|
||||
}
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
import React from 'react';
|
||||
import {BrowserRouter as Router} from "react-router-dom";
|
||||
import {ConfigProvider} from 'antd';
|
||||
import Frame from "./pages/Frame";
|
||||
import en_US from 'antd/es/locale/en_US';
|
||||
import React from 'react'
|
||||
import { BrowserRouter as Router } from 'react-router-dom'
|
||||
import { ConfigProvider } from 'antd'
|
||||
import Frame from './pages/Frame'
|
||||
import en_US from 'antd/es/locale/en_US'
|
||||
|
||||
// global less 须放在Frame组件之后,不然会出现按需加载的less文件覆盖样式问题
|
||||
import './App.less';
|
||||
import './App.less'
|
||||
import GlobalContextProvider from '@/contexts/globalContext'
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<Router>
|
||||
<ConfigProvider locale={en_US}>
|
||||
<Frame/>
|
||||
<GlobalContextProvider>
|
||||
<Frame />
|
||||
</GlobalContextProvider>
|
||||
</ConfigProvider>
|
||||
</Router>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
export default App;
|
||||
export default App
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { generateCRUDApi } from './util'
|
||||
import { IMatter } from '@/models/Matter'
|
||||
import { axios } from '@/setupAxios'
|
||||
|
||||
const API_PREFIX = 'matter'
|
||||
|
||||
export const matterCRUDApi = generateCRUDApi<{
|
||||
listResponse: {
|
||||
data: IMatter[]
|
||||
total: number
|
||||
}
|
||||
}>(API_PREFIX)
|
||||
|
||||
export const updateMatterPrivacy = (body: { spaceUuid: string; uuid: string; privacy: boolean }) => {
|
||||
return axios.post(`${API_PREFIX}/change/privacy`, body)
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { axios } from '@/setupAxios'
|
||||
|
||||
export const generateCRUDApi = <
|
||||
T extends {
|
||||
filters?: Record<string, unknown>
|
||||
listResponse?: any // list接口返回值
|
||||
},
|
||||
>(
|
||||
apiPrefix: string,
|
||||
) => {
|
||||
return {
|
||||
list: (filters?: T['filters']): Promise<T['listResponse']> => {
|
||||
return axios.get(`${apiPrefix}/page`)
|
||||
},
|
||||
get: () => {},
|
||||
save: () => {},
|
||||
delete: () => {},
|
||||
}
|
||||
}
|
||||
@@ -23,28 +23,28 @@
|
||||
}
|
||||
|
||||
.btn-action {
|
||||
margin: 0 3px;
|
||||
display: inline-block;
|
||||
opacity: 0.85;
|
||||
-webkit-transition: all 0.1s;
|
||||
-o-transition: all 0.1s;
|
||||
transition: all 0.1s;
|
||||
cursor: pointer;
|
||||
margin: 0 3px;
|
||||
display: inline-block;
|
||||
opacity: 0.85;
|
||||
-webkit-transition: all 0.1s;
|
||||
-o-transition: all 0.1s;
|
||||
transition: all 0.1s;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
opacity: 1;
|
||||
-moz-transform: scale(1.2);
|
||||
-webkit-transform: scale(1.2);
|
||||
-o-transform: scale(1.2);
|
||||
-ms-transform: scale(1.2);
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
opacity: 1;
|
||||
-moz-transform: scale(1.2);
|
||||
-webkit-transform: scale(1.2);
|
||||
-o-transform: scale(1.2);
|
||||
-ms-transform: scale(1.2);
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
@@ -52,12 +52,14 @@
|
||||
background-color: #337ab7;
|
||||
border-color: #2e6da4;
|
||||
}
|
||||
|
||||
.btn-primary:focus,
|
||||
.btn-primary.focus {
|
||||
color: #fff;
|
||||
background-color: #286090;
|
||||
border-color: #122b40;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
color: #fff;
|
||||
background-color: #286090;
|
||||
@@ -73,11 +75,11 @@
|
||||
|
||||
//编辑区域按钮,鼠标一上去按钮变大
|
||||
.action-buttons {
|
||||
a {
|
||||
.btn-action;
|
||||
}
|
||||
a {
|
||||
.btn-action;
|
||||
}
|
||||
}
|
||||
|
||||
.cursor {
|
||||
cursor: pointer;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -1,113 +1,391 @@
|
||||
@import "./variables.less";
|
||||
|
||||
.bg-primary{ background-color: @brand-primary; color: white;}
|
||||
.bg-success{ background-color: @brand-success; color: white; }
|
||||
.bg-info{ background-color: @brand-info; color: white; }
|
||||
.bg-warning{ background-color: @brand-warning; color: white; }
|
||||
.bg-danger{ background-color: @brand-danger; color: white; }
|
||||
.bg-gray{ background-color: @brand-gray; color: white; }
|
||||
.bg-laxative{ background-color: @brand-laxative; color: white; }
|
||||
.bg-primary {
|
||||
background-color: @brand-primary;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.bg-success {
|
||||
background-color: @brand-success;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.bg-info {
|
||||
background-color: @brand-info;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.bg-warning {
|
||||
background-color: @brand-warning;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.bg-danger {
|
||||
background-color: @brand-danger;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.bg-gray {
|
||||
background-color: @brand-gray;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.bg-laxative {
|
||||
background-color: @brand-laxative;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
.text-primary{ color: @brand-primary;}
|
||||
.text-success{ color: @brand-success; }
|
||||
.text-info{ color: @brand-info; }
|
||||
.text-warning{ color: @brand-warning; }
|
||||
.text-danger{ color: @brand-danger; }
|
||||
.text-gray{ color: @brand-gray; }
|
||||
.text-laxative{ color: @brand-laxative; }
|
||||
.text-theme { color: @primary-color; }
|
||||
.text-primary {
|
||||
color: @brand-primary;
|
||||
}
|
||||
|
||||
.text-success {
|
||||
color: @brand-success;
|
||||
}
|
||||
|
||||
.text-info {
|
||||
color: @brand-info;
|
||||
}
|
||||
|
||||
.text-warning {
|
||||
color: @brand-warning;
|
||||
}
|
||||
|
||||
.text-danger {
|
||||
color: @brand-danger;
|
||||
}
|
||||
|
||||
.text-gray {
|
||||
color: @brand-gray;
|
||||
}
|
||||
|
||||
.text-laxative {
|
||||
color: @brand-laxative;
|
||||
}
|
||||
|
||||
.text-theme {
|
||||
color: @primary-color;
|
||||
}
|
||||
|
||||
.bg-navy {
|
||||
background-color: #001F3F;
|
||||
}
|
||||
|
||||
.bg-blue {
|
||||
background-color: #0074D9;
|
||||
}
|
||||
|
||||
.bg-aqua {
|
||||
background-color: #7FDBFF;
|
||||
}
|
||||
|
||||
.bg-aliceblue {
|
||||
background-color: aliceblue;
|
||||
}
|
||||
|
||||
.bg-pink {
|
||||
background-color: pink;
|
||||
}
|
||||
|
||||
.bg-azure {
|
||||
background-color: azure;
|
||||
}
|
||||
|
||||
.bg-teal {
|
||||
background-color: #39CCCC;
|
||||
}
|
||||
|
||||
.bg-olive {
|
||||
background-color: #3D9970;
|
||||
}
|
||||
|
||||
.bg-green {
|
||||
background-color: #2ECC40;
|
||||
}
|
||||
|
||||
.bg-lime {
|
||||
background-color: #01FF70;
|
||||
}
|
||||
|
||||
.bg-yellow {
|
||||
background-color: #FFDC00;
|
||||
}
|
||||
|
||||
.bg-pink {
|
||||
color: pink;
|
||||
}
|
||||
|
||||
.bg-orange {
|
||||
background-color: #FF851B;
|
||||
}
|
||||
|
||||
.bg-red {
|
||||
background-color: #FF4136;
|
||||
}
|
||||
|
||||
.bg-fuchsia {
|
||||
background-color: #F012BE;
|
||||
}
|
||||
|
||||
.bg-purple {
|
||||
background-color: #B10DC9;
|
||||
}
|
||||
|
||||
.bg-maroon {
|
||||
background-color: #85144B;
|
||||
}
|
||||
|
||||
.bg-white {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.bg-gray {
|
||||
background-color: #AAAAAA;
|
||||
}
|
||||
|
||||
.bg-silver {
|
||||
background-color: #DDDDDD;
|
||||
}
|
||||
|
||||
.bg-navy { background-color: #001F3F;}
|
||||
.bg-blue { background-color: #0074D9;}
|
||||
.bg-aqua { background-color: #7FDBFF;}
|
||||
.bg-aliceblue { background-color: aliceblue;}
|
||||
.bg-pink { background-color: pink;}
|
||||
.bg-azure { background-color: azure;}
|
||||
.bg-teal { background-color: #39CCCC;}
|
||||
.bg-olive { background-color: #3D9970;}
|
||||
.bg-green { background-color: #2ECC40;}
|
||||
.bg-lime { background-color: #01FF70;}
|
||||
.bg-yellow { background-color: #FFDC00;}
|
||||
.bg-pink { color: pink; }
|
||||
.bg-orange { background-color: #FF851B;}
|
||||
.bg-red { background-color: #FF4136;}
|
||||
.bg-fuchsia { background-color: #F012BE;}
|
||||
.bg-purple { background-color: #B10DC9;}
|
||||
.bg-maroon { background-color: #85144B;}
|
||||
.bg-white { background-color: #FFFFFF;}
|
||||
.bg-gray { background-color: #AAAAAA;}
|
||||
.bg-silver { background-color: #DDDDDD;}
|
||||
.bg-silver-white {
|
||||
background-color: #EEEEEE;
|
||||
}
|
||||
.bg-black { background-color: #111111;}
|
||||
|
||||
.bg-111{ background-color:#111 }
|
||||
.bg-222{ background-color:#222 }
|
||||
.bg-333{ background-color:#333 }
|
||||
.bg-444{ background-color:#444 }
|
||||
.bg-555{ background-color:#555 }
|
||||
.bg-666{ background-color:#666 }
|
||||
.bg-777{ background-color:#777 }
|
||||
.bg-888{ background-color:#888 }
|
||||
.bg-999{ background-color:#999 }
|
||||
.bg-aaa{ background-color:#aaa }
|
||||
.bg-bbb{ background-color:#bbb }
|
||||
.bg-ccc{ background-color:#ccc }
|
||||
.bg-ddd{ background-color:#ddd }
|
||||
.bg-eee{ background-color:#eee }
|
||||
.bg-black {
|
||||
background-color: #111111;
|
||||
}
|
||||
|
||||
.bg-111 {
|
||||
background-color: #111
|
||||
}
|
||||
|
||||
.bg-222 {
|
||||
background-color: #222
|
||||
}
|
||||
|
||||
.bg-333 {
|
||||
background-color: #333
|
||||
}
|
||||
|
||||
.bg-444 {
|
||||
background-color: #444
|
||||
}
|
||||
|
||||
.bg-555 {
|
||||
background-color: #555
|
||||
}
|
||||
|
||||
.bg-666 {
|
||||
background-color: #666
|
||||
}
|
||||
|
||||
.bg-777 {
|
||||
background-color: #777
|
||||
}
|
||||
|
||||
.bg-888 {
|
||||
background-color: #888
|
||||
}
|
||||
|
||||
.bg-999 {
|
||||
background-color: #999
|
||||
}
|
||||
|
||||
.bg-aaa {
|
||||
background-color: #aaa
|
||||
}
|
||||
|
||||
.bg-bbb {
|
||||
background-color: #bbb
|
||||
}
|
||||
|
||||
.bg-ccc {
|
||||
background-color: #ccc
|
||||
}
|
||||
|
||||
.bg-ddd {
|
||||
background-color: #ddd
|
||||
}
|
||||
|
||||
.bg-eee {
|
||||
background-color: #eee
|
||||
}
|
||||
|
||||
|
||||
/* Colors */
|
||||
.navy { color: #001F3F;}
|
||||
.blue { color: #0074D9;}
|
||||
.aqua { color: #7FDBFF;}
|
||||
.teal { color: #39CCCC;}
|
||||
.olive { color: #3D9970;}
|
||||
.green { color: #2ECC40;}
|
||||
.lime { color: #01FF70;}
|
||||
.yellow { color: #FFDC00;}
|
||||
.pink { color: pink; }
|
||||
.orange { color: #FF851B;}
|
||||
.red { color: #FF4136;}
|
||||
.fuchsia { color: #F012BE;}
|
||||
.purple { color: #B10DC9;}
|
||||
.maroon { color: #85144B;}
|
||||
.white { color: #FFFFFF;}
|
||||
.silver { color: #DDDDDD;}
|
||||
.gray { color: #AAAAAA;}
|
||||
.black { color: #111111;}
|
||||
.navy {
|
||||
color: #001F3F;
|
||||
}
|
||||
|
||||
.blue {
|
||||
color: #0074D9;
|
||||
}
|
||||
|
||||
.aqua {
|
||||
color: #7FDBFF;
|
||||
}
|
||||
|
||||
.teal {
|
||||
color: #39CCCC;
|
||||
}
|
||||
|
||||
.olive {
|
||||
color: #3D9970;
|
||||
}
|
||||
|
||||
.green {
|
||||
color: #2ECC40;
|
||||
}
|
||||
|
||||
.lime {
|
||||
color: #01FF70;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
color: #FFDC00;
|
||||
}
|
||||
|
||||
.pink {
|
||||
color: pink;
|
||||
}
|
||||
|
||||
.orange {
|
||||
color: #FF851B;
|
||||
}
|
||||
|
||||
.red {
|
||||
color: #FF4136;
|
||||
}
|
||||
|
||||
.fuchsia {
|
||||
color: #F012BE;
|
||||
}
|
||||
|
||||
.purple {
|
||||
color: #B10DC9;
|
||||
}
|
||||
|
||||
.maroon {
|
||||
color: #85144B;
|
||||
}
|
||||
|
||||
.white {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.silver {
|
||||
color: #DDDDDD;
|
||||
}
|
||||
|
||||
.gray {
|
||||
color: #AAAAAA;
|
||||
}
|
||||
|
||||
.black {
|
||||
color: #111111;
|
||||
}
|
||||
|
||||
|
||||
.color-111{color:#111}
|
||||
.color-222{color:#222}
|
||||
.color-333{color:#333}
|
||||
.color-444{color:#444}
|
||||
.color-555{color:#555}
|
||||
.color-666{color:#666}
|
||||
.color-777{color:#777}
|
||||
.color-888{color:#888}
|
||||
.color-999{color:#999}
|
||||
.color-aaa{color:#aaa}
|
||||
.color-bbb{color:#bbb}
|
||||
.color-ccc{color:#ccc}
|
||||
.color-ddd{color:#ddd}
|
||||
.color-eee{color:#eee}
|
||||
.color-111 {
|
||||
color: #111
|
||||
}
|
||||
|
||||
.color-222 {
|
||||
color: #222
|
||||
}
|
||||
|
||||
.color-333 {
|
||||
color: #333
|
||||
}
|
||||
|
||||
.color-444 {
|
||||
color: #444
|
||||
}
|
||||
|
||||
.color-555 {
|
||||
color: #555
|
||||
}
|
||||
|
||||
.color-666 {
|
||||
color: #666
|
||||
}
|
||||
|
||||
.color-777 {
|
||||
color: #777
|
||||
}
|
||||
|
||||
.color-888 {
|
||||
color: #888
|
||||
}
|
||||
|
||||
.color-999 {
|
||||
color: #999
|
||||
}
|
||||
|
||||
.color-aaa {
|
||||
color: #aaa
|
||||
}
|
||||
|
||||
.color-bbb {
|
||||
color: #bbb
|
||||
}
|
||||
|
||||
.color-ccc {
|
||||
color: #ccc
|
||||
}
|
||||
|
||||
.color-ddd {
|
||||
color: #ddd
|
||||
}
|
||||
|
||||
.color-eee {
|
||||
color: #eee
|
||||
}
|
||||
|
||||
|
||||
.color-text { color: #660E7A;}
|
||||
.color-doc { color: #295496;}
|
||||
.color-xls { color: #1E6C41;}
|
||||
.color-ppt { color: #D04324;}
|
||||
.color-pdf { color: #E40B0B;}
|
||||
.color-audio { color: #5bc0de;}
|
||||
.color-video { color: #5cb85c;}
|
||||
.color-image { color: #0074D9;}
|
||||
.color-archive { color: #4437f2;}
|
||||
.color-text {
|
||||
color: #660E7A;
|
||||
}
|
||||
|
||||
.color-light-active{ color: #ffc60c;}
|
||||
.color-light-inactive{ color:#ccc;}
|
||||
.color-doc {
|
||||
color: #295496;
|
||||
}
|
||||
|
||||
.color-xls {
|
||||
color: #1E6C41;
|
||||
}
|
||||
|
||||
.color-ppt {
|
||||
color: #D04324;
|
||||
}
|
||||
|
||||
.color-pdf {
|
||||
color: #E40B0B;
|
||||
}
|
||||
|
||||
.color-audio {
|
||||
color: #5bc0de;
|
||||
}
|
||||
|
||||
.color-video {
|
||||
color: #5cb85c;
|
||||
}
|
||||
|
||||
.color-image {
|
||||
color: #0074D9;
|
||||
}
|
||||
|
||||
.color-archive {
|
||||
color: #4437f2;
|
||||
}
|
||||
|
||||
.color-light-active {
|
||||
color: #ffc60c;
|
||||
}
|
||||
|
||||
.color-light-inactive {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
#font{
|
||||
.f(@from,@end,@step){
|
||||
.mX(@f,@e,@s) when (@e >= @f){
|
||||
.f@{e}{
|
||||
font-size:@e*1px!important;
|
||||
#font {
|
||||
.f(@from,@end,@step) {
|
||||
.mX(@f,@e,@s) when (@e >= @f) {
|
||||
.f@{e} {
|
||||
font-size: @e*1px !important;
|
||||
}
|
||||
.mX(@f,@e - @s,@s);
|
||||
.mX(@f, @e - @s, @s);
|
||||
}
|
||||
.mX(@from,@end,@step);
|
||||
.mX(@from, @end, @step);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#font > .f(10,80,1);
|
||||
#font > .f(10, 80, 1);
|
||||
|
||||
#font{
|
||||
.ln(@from,@end,@step){
|
||||
.mX(@f,@e,@s) when (@e >= @f){
|
||||
.ln@{e}{
|
||||
line-height:@e*1px!important;
|
||||
#font {
|
||||
.ln(@from,@end,@step) {
|
||||
.mX(@f,@e,@s) when (@e >= @f) {
|
||||
.ln@{e} {
|
||||
line-height: @e*1px !important;
|
||||
}
|
||||
.mX(@f,@e - @s,@s);
|
||||
.mX(@f, @e - @s, @s);
|
||||
}
|
||||
.mX(@from,@end,@step);
|
||||
.mX(@from, @end, @step);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#font > .ln(10,100,1);
|
||||
#font > .ln(10, 100, 1);
|
||||
|
||||
|
||||
|
||||
.bold{
|
||||
font-weight:bold;
|
||||
.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.italic{
|
||||
font-style:italic;
|
||||
|
||||
.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@@ -139,6 +139,7 @@ a {
|
||||
|
||||
.hot-area {
|
||||
position: relative;
|
||||
|
||||
&:after {
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
@@ -148,3 +149,9 @@ a {
|
||||
content: '';
|
||||
}
|
||||
}
|
||||
|
||||
.custom-handle-modal {
|
||||
.ant-modal-confirm-btns {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,10 @@
|
||||
.visible-pc {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.visible-pc-flex {
|
||||
display: flex !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 992px) {
|
||||
@@ -16,6 +20,10 @@
|
||||
.visible-pc {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.visible-pc-flex {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
//浏览器滚动条样式
|
||||
|
||||
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.7 KiB |
@@ -1 +1,10 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1514189634329" class="icon" style="" viewBox="0 0 1219 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10648" xmlns:xlink="http://www.w3.org/1999/xlink" width="238.0859375" height="200"><defs><style type="text/css"></style></defs><path d="M1197.787429 327.192381a19.504762 19.504762 0 0 1 19.553523 19.407238v614.156191c0 34.913524-28.574476 63.24419-63.878095 63.24419H63.878095C28.623238 1024 0 995.718095 0 960.75581V346.599619a19.504762 19.504762 0 0 1 19.602286-19.358476h1178.185143z m-66.80381-213.089524C1179.550476 114.102857 1219.047619 153.209905 1219.047619 201.386667v80.213333H1.657905V88.259048C1.657905 39.497143 41.593905 0 90.794667 0h290.864762c17.408 0 33.987048 7.655619 45.104761 20.967619l78.214096 93.135238h626.005333z" fill="#1ab394" p-id="10649"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1514189634329" class="icon" style="" viewBox="0 0 1219 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="10648" width="238.0859375" height="200">
|
||||
<defs>
|
||||
<style type="text/css"></style>
|
||||
</defs>
|
||||
<path d="M1197.787429 327.192381a19.504762 19.504762 0 0 1 19.553523 19.407238v614.156191c0 34.913524-28.574476 63.24419-63.878095 63.24419H63.878095C28.623238 1024 0 995.718095 0 960.75581V346.599619a19.504762 19.504762 0 0 1 19.602286-19.358476h1178.185143z m-66.80381-213.089524C1179.550476 114.102857 1219.047619 153.209905 1219.047619 201.386667v80.213333H1.657905V88.259048C1.657905 39.497143 41.593905 0 90.794667 0h290.864762c17.408 0 33.987048 7.655619 45.104761 20.967619l78.214096 93.135238h626.005333z"
|
||||
fill="#1ab394" p-id="10649"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 943 B After Width: | Height: | Size: 949 B |
@@ -1 +1,14 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1514189353878" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1197" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M9.367 0h992.97v341.333H9.366z" fill="#55C7F7" p-id="1198"></path><path d="M9.367 341.333h992.97v341.334H9.366z" fill="#F95F5D" p-id="1199"></path><path d="M9.367 682.667h992.97V1024H9.366z" fill="#7ECF3B" p-id="1200"></path><path d="M350.7 0h310.303v1024H350.7z" fill="#FDAF42" p-id="1201"></path><path d="M304.154 386.638V646.05h403.394V386.638H304.154z m356.849 215.97H350.7V429.46h310.303v173.15z" fill="#FFFFFF" p-id="1202"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1514189353878" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="1197" width="200" height="200">
|
||||
<defs>
|
||||
<style type="text/css"></style>
|
||||
</defs>
|
||||
<path d="M9.367 0h992.97v341.333H9.366z" fill="#55C7F7" p-id="1198"></path>
|
||||
<path d="M9.367 341.333h992.97v341.334H9.366z" fill="#F95F5D" p-id="1199"></path>
|
||||
<path d="M9.367 682.667h992.97V1024H9.366z" fill="#7ECF3B" p-id="1200"></path>
|
||||
<path d="M350.7 0h310.303v1024H350.7z" fill="#FDAF42" p-id="1201"></path>
|
||||
<path d="M304.154 386.638V646.05h403.394V386.638H304.154z m356.849 215.97H350.7V429.46h310.303v173.15z"
|
||||
fill="#FFFFFF" p-id="1202"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 828 B After Width: | Height: | Size: 855 B |
@@ -1 +1,14 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543321997742" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3887" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M160 32c-12 0-24.8 4.8-33.6 14.4S112 68 112 80v864c0 12 4.8 24.8 14.4 33.6C136 987.2 148 992 160 992h704c12 0 24.8-4.8 33.6-14.4C907.2 968 912 956 912 944V304L640 32H160z" fill="#FF5562" p-id="3888"></path><path d="M912 304H688c-12 0-24.8-4.8-33.6-14.4-9.6-8.8-14.4-21.6-14.4-33.6V32l272 272z" fill="#FFBBC0" p-id="3889"></path><path d="M669.6 491.2c0-1.6 0.8-4 0-6.4V369.6c0-4.8-2.4-8.8-5.6-12-4-3.2-8-4-12.8-3.2l-250.4 70.4c-7.2 1.6-12 7.2-12 14.4v275.2c-9.6-4-20.8-6.4-32.8-6.4-8.8 0-17.6 0.8-26.4 3.2-40.8 11.2-66.4 43.2-58.4 72.8 6.4 23.2 30.4 37.6 60.8 37.6 8.8 0 17.6-1.6 26.4-3.2 36.8-10.4 60.8-36.8 60-63.2 0.8-1.6 0.8-3.2 0.8-5.6V570.4l220-61.6v136c-9.6-4-20.8-6.4-32.8-6.4-8.8 0-17.6 0.8-26.4 3.2-40.8 11.2-66.4 43.2-58.4 72.8C528 737.6 552 752 582.4 752c8.8 0 17.6-0.8 26.4-3.2 36-9.6 60-36 60-62.4 0.8-1.6 0.8-3.2 0.8-5.6V491.2z m-250.4 48v-53.6l220-61.6v53.6l-220 61.6z" fill="#FFFFFF" p-id="3890"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1543321997742" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="3887" width="200" height="200">
|
||||
<defs>
|
||||
<style type="text/css"></style>
|
||||
</defs>
|
||||
<path d="M160 32c-12 0-24.8 4.8-33.6 14.4S112 68 112 80v864c0 12 4.8 24.8 14.4 33.6C136 987.2 148 992 160 992h704c12 0 24.8-4.8 33.6-14.4C907.2 968 912 956 912 944V304L640 32H160z"
|
||||
fill="#FF5562" p-id="3888"></path>
|
||||
<path d="M912 304H688c-12 0-24.8-4.8-33.6-14.4-9.6-8.8-14.4-21.6-14.4-33.6V32l272 272z" fill="#FFBBC0"
|
||||
p-id="3889"></path>
|
||||
<path d="M669.6 491.2c0-1.6 0.8-4 0-6.4V369.6c0-4.8-2.4-8.8-5.6-12-4-3.2-8-4-12.8-3.2l-250.4 70.4c-7.2 1.6-12 7.2-12 14.4v275.2c-9.6-4-20.8-6.4-32.8-6.4-8.8 0-17.6 0.8-26.4 3.2-40.8 11.2-66.4 43.2-58.4 72.8 6.4 23.2 30.4 37.6 60.8 37.6 8.8 0 17.6-1.6 26.4-3.2 36.8-10.4 60.8-36.8 60-63.2 0.8-1.6 0.8-3.2 0.8-5.6V570.4l220-61.6v136c-9.6-4-20.8-6.4-32.8-6.4-8.8 0-17.6 0.8-26.4 3.2-40.8 11.2-66.4 43.2-58.4 72.8C528 737.6 552 752 582.4 752c8.8 0 17.6-0.8 26.4-3.2 36-9.6 60-36 60-62.4 0.8-1.6 0.8-3.2 0.8-5.6V491.2z m-250.4 48v-53.6l220-61.6v53.6l-220 61.6z"
|
||||
fill="#FFFFFF" p-id="3890"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -1 +1,12 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543300132402" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2107" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M533.947184 38.36489h65.880106v88.119185c117.859409 0.660894 235.60867-1.211639 353.35793 0.660894 25.102953-2.533427 44.81962 16.962943 42.506492 42.07691 1.872533 216.993492-0.440596 434.097133 1.112505 651.090626-1.112505 22.250094 2.191965 46.923466-10.695466 66.640133-16.081751 11.455494-36.899909 10.023557-55.625236 10.904749-110.25913-0.550745-220.408111-0.330447-330.656225-0.330447v88.119185h-68.843113c-167.657764-30.621417-335.745108-58.709407-503.722304-88.119185-0.110149-256.977572 0-513.955144 0-770.822567 168.858388-29.519927 337.826924-58.268811 506.685311-88.339483z" fill="#2A5699" p-id="2108"></path><path d="M599.816275 159.528769h363.491637v704.953477h-363.491637v-88.119185h286.38735v-44.059592h-286.38735v-55.07449h286.38735v-44.059593h-286.38735v-55.07449h286.38735v-44.059592h-286.38735v-55.074491h286.38735v-44.059592h-286.38735v-55.074491h286.38735v-44.059592h-286.38735v-55.07449h286.38735v-44.059593h-286.38735v-77.104286zM254.829667 354.162018c20.928306-1.211639 41.856613-2.092831 62.784919-3.19432 14.649814 74.350562 29.619061 148.590975 45.491529 222.61109 12.446835-76.443393 26.215457-152.666487 39.543484-228.999731 22.029796-0.771043 44.059592-1.982682 65.97924-3.30447-24.89367 106.734362-46.703168 214.349917-73.909966 320.423385-18.39488 9.582961-45.932125-0.440596-67.741623 1.10149-14.649814-72.90761-31.722906-145.38564-44.819621-218.645727-12.898446 71.156242-29.641091 141.651589-44.390039 212.367235a4187.754101 4187.754101 0 0 1-63.666111-3.866229c-18.284731-96.931103-39.763782-193.190297-56.836874-290.341698 18.835476-0.881192 37.792115-1.652235 56.627591-2.313129 11.33433 70.164901 24.221761 139.999355 34.146184 210.274404 15.508976-72.037433 31.37043-144.074867 46.791287-216.1123z" fill="#FFFFFF" p-id="2109"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1543300132402" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="2107" width="200" height="200">
|
||||
<defs>
|
||||
<style type="text/css"></style>
|
||||
</defs>
|
||||
<path d="M533.947184 38.36489h65.880106v88.119185c117.859409 0.660894 235.60867-1.211639 353.35793 0.660894 25.102953-2.533427 44.81962 16.962943 42.506492 42.07691 1.872533 216.993492-0.440596 434.097133 1.112505 651.090626-1.112505 22.250094 2.191965 46.923466-10.695466 66.640133-16.081751 11.455494-36.899909 10.023557-55.625236 10.904749-110.25913-0.550745-220.408111-0.330447-330.656225-0.330447v88.119185h-68.843113c-167.657764-30.621417-335.745108-58.709407-503.722304-88.119185-0.110149-256.977572 0-513.955144 0-770.822567 168.858388-29.519927 337.826924-58.268811 506.685311-88.339483z"
|
||||
fill="#2A5699" p-id="2108"></path>
|
||||
<path d="M599.816275 159.528769h363.491637v704.953477h-363.491637v-88.119185h286.38735v-44.059592h-286.38735v-55.07449h286.38735v-44.059593h-286.38735v-55.07449h286.38735v-44.059592h-286.38735v-55.074491h286.38735v-44.059592h-286.38735v-55.074491h286.38735v-44.059592h-286.38735v-55.07449h286.38735v-44.059593h-286.38735v-77.104286zM254.829667 354.162018c20.928306-1.211639 41.856613-2.092831 62.784919-3.19432 14.649814 74.350562 29.619061 148.590975 45.491529 222.61109 12.446835-76.443393 26.215457-152.666487 39.543484-228.999731 22.029796-0.771043 44.059592-1.982682 65.97924-3.30447-24.89367 106.734362-46.703168 214.349917-73.909966 320.423385-18.39488 9.582961-45.932125-0.440596-67.741623 1.10149-14.649814-72.90761-31.722906-145.38564-44.819621-218.645727-12.898446 71.156242-29.641091 141.651589-44.390039 212.367235a4187.754101 4187.754101 0 0 1-63.666111-3.866229c-18.284731-96.931103-39.763782-193.190297-56.836874-290.341698 18.835476-0.881192 37.792115-1.652235 56.627591-2.313129 11.33433 70.164901 24.221761 139.999355 34.146184 210.274404 15.508976-72.037433 31.37043-144.074867 46.791287-216.1123z"
|
||||
fill="#FFFFFF" p-id="2109"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -1 +1,19 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1514189511483" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6709" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M676.297143 0H145.609143C130.834286 0 118.857143 11.977143 118.857143 35.218286V1005.714286c0 6.308571 11.977143 18.285714 26.752 18.285714h732.781714c14.774857 0 26.752-11.977143 26.752-18.285714V237.312c0-12.726857-1.700571-16.822857-4.699428-19.84L687.670857 4.699429A16.164571 16.164571 0 0 0 676.297143 0z" fill="#E9E9E0" p-id="6710"></path><path d="M685.714286 2.761143V219.428571h216.667428z" fill="#D9D7CA" p-id="6711"></path><path d="M878.390857 1024H145.609143A26.752 26.752 0 0 1 118.857143 997.248V713.142857h786.285714v284.105143c0 14.774857-11.977143 26.752-26.752 26.752z" fill="#C8BDB8" p-id="6712"></path><path d="M338.285714 859.428571m-54.857143 0a54.857143 54.857143 0 1 0 109.714286 0 54.857143 54.857143 0 1 0-109.714286 0Z" fill="#FFFFFF" p-id="6713"></path><path d="M521.142857 859.428571m-54.857143 0a54.857143 54.857143 0 1 0 109.714286 0 54.857143 54.857143 0 1 0-109.714286 0Z" fill="#FFFFFF" p-id="6714"></path><path d="M704 859.428571m-54.857143 0a54.857143 54.857143 0 1 0 109.714286 0 54.857143 54.857143 0 1 0-109.714286 0Z" fill="#FFFFFF" p-id="6715"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1514189511483" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="6709" width="200" height="200">
|
||||
<defs>
|
||||
<style type="text/css"></style>
|
||||
</defs>
|
||||
<path d="M676.297143 0H145.609143C130.834286 0 118.857143 11.977143 118.857143 35.218286V1005.714286c0 6.308571 11.977143 18.285714 26.752 18.285714h732.781714c14.774857 0 26.752-11.977143 26.752-18.285714V237.312c0-12.726857-1.700571-16.822857-4.699428-19.84L687.670857 4.699429A16.164571 16.164571 0 0 0 676.297143 0z"
|
||||
fill="#E9E9E0" p-id="6710"></path>
|
||||
<path d="M685.714286 2.761143V219.428571h216.667428z" fill="#D9D7CA" p-id="6711"></path>
|
||||
<path d="M878.390857 1024H145.609143A26.752 26.752 0 0 1 118.857143 997.248V713.142857h786.285714v284.105143c0 14.774857-11.977143 26.752-26.752 26.752z"
|
||||
fill="#C8BDB8" p-id="6712"></path>
|
||||
<path d="M338.285714 859.428571m-54.857143 0a54.857143 54.857143 0 1 0 109.714286 0 54.857143 54.857143 0 1 0-109.714286 0Z"
|
||||
fill="#FFFFFF" p-id="6713"></path>
|
||||
<path d="M521.142857 859.428571m-54.857143 0a54.857143 54.857143 0 1 0 109.714286 0 54.857143 54.857143 0 1 0-109.714286 0Z"
|
||||
fill="#FFFFFF" p-id="6714"></path>
|
||||
<path d="M704 859.428571m-54.857143 0a54.857143 54.857143 0 1 0 109.714286 0 54.857143 54.857143 0 1 0-109.714286 0Z"
|
||||
fill="#FFFFFF" p-id="6715"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -1 +1,10 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1514189634329" class="icon" style="" viewBox="0 0 1219 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10648" xmlns:xlink="http://www.w3.org/1999/xlink" width="238.0859375" height="200"><defs><style type="text/css"></style></defs><path d="M1197.787429 327.192381a19.504762 19.504762 0 0 1 19.553523 19.407238v614.156191c0 34.913524-28.574476 63.24419-63.878095 63.24419H63.878095C28.623238 1024 0 995.718095 0 960.75581V346.599619a19.504762 19.504762 0 0 1 19.602286-19.358476h1178.185143z m-66.80381-213.089524C1179.550476 114.102857 1219.047619 153.209905 1219.047619 201.386667v80.213333H1.657905V88.259048C1.657905 39.497143 41.593905 0 90.794667 0h290.864762c17.408 0 33.987048 7.655619 45.104761 20.967619l78.214096 93.135238h626.005333z" fill="#23B7E5" p-id="10649"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1514189634329" class="icon" style="" viewBox="0 0 1219 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="10648" width="238.0859375" height="200">
|
||||
<defs>
|
||||
<style type="text/css"></style>
|
||||
</defs>
|
||||
<path d="M1197.787429 327.192381a19.504762 19.504762 0 0 1 19.553523 19.407238v614.156191c0 34.913524-28.574476 63.24419-63.878095 63.24419H63.878095C28.623238 1024 0 995.718095 0 960.75581V346.599619a19.504762 19.504762 0 0 1 19.602286-19.358476h1178.185143z m-66.80381-213.089524C1179.550476 114.102857 1219.047619 153.209905 1219.047619 201.386667v80.213333H1.657905V88.259048C1.657905 39.497143 41.593905 0 90.794667 0h290.864762c17.408 0 33.987048 7.655619 45.104761 20.967619l78.214096 93.135238h626.005333z"
|
||||
fill="#23B7E5" p-id="10649"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 943 B After Width: | Height: | Size: 949 B |
@@ -1 +1,16 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1514190539077" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14917" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M128 0h597.3l227.6 227.9v739.2c0 31.4-25.5 56.9-56.9 56.9H128c-31.4 0-56.9-25.5-56.9-56.9V56.9C71.1 25.5 96.6 0 128 0z" fill="#13BE93" p-id="14918"></path><path d="M630.5 1024H128c-25.7 0-47.4-17-54.4-40.4l218.1-218.1c22.2-22.2 58.2-22.2 80.5 0L630.5 1024z" fill="#6BD8BD" p-id="14919"></path><path d="M952.9 858v109.1c0 31.4-25.5 56.9-56.9 56.9H322.4l-4.7-4.7 358-358c22.2-22.2 58.2-22.2 80.5 0L952.9 858z" fill="#9CF9E2" p-id="14920"></path><path d="M725.3 0l227.6 227.6H782.2c-31.4 0-56.9-25.5-56.9-56.9V0z" fill="#69DCC0" p-id="14921"></path><path d="M327.1 483.6m-85.3 0a85.3 85.3 0 1 0 170.6 0 85.3 85.3 0 1 0-170.6 0Z" fill="#E9FFFA" p-id="14922"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1514190539077" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="14917" width="200" height="200">
|
||||
<defs>
|
||||
<style type="text/css"></style>
|
||||
</defs>
|
||||
<path d="M128 0h597.3l227.6 227.9v739.2c0 31.4-25.5 56.9-56.9 56.9H128c-31.4 0-56.9-25.5-56.9-56.9V56.9C71.1 25.5 96.6 0 128 0z"
|
||||
fill="#13BE93" p-id="14918"></path>
|
||||
<path d="M630.5 1024H128c-25.7 0-47.4-17-54.4-40.4l218.1-218.1c22.2-22.2 58.2-22.2 80.5 0L630.5 1024z"
|
||||
fill="#6BD8BD" p-id="14919"></path>
|
||||
<path d="M952.9 858v109.1c0 31.4-25.5 56.9-56.9 56.9H322.4l-4.7-4.7 358-358c22.2-22.2 58.2-22.2 80.5 0L952.9 858z"
|
||||
fill="#9CF9E2" p-id="14920"></path>
|
||||
<path d="M725.3 0l227.6 227.6H782.2c-31.4 0-56.9-25.5-56.9-56.9V0z" fill="#69DCC0" p-id="14921"></path>
|
||||
<path d="M327.1 483.6m-85.3 0a85.3 85.3 0 1 0 170.6 0 85.3 85.3 0 1 0-170.6 0Z" fill="#E9FFFA" p-id="14922"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -1 +1,13 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1514284130163" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1551" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M915.114667 1024H108.885333V0h587.776v218.112H914.773333V1024z m-785.066667-20.821333h763.904V238.933333H675.84V20.821333H129.706667v982.357334z" fill="#F90E09" p-id="1552"></path><path d="M708.266667 10.581333L904.533333 206.848h-196.266666z" fill="#F90E09" p-id="1553"></path><path d="M282.965333 792.576c33.450667-23.210667 55.637333-57.344 76.8-91.136-30.378667 25.941333-59.050667 54.954667-76.8 91.136z m396.629334-169.642667c31.402667 15.018667 65.877333 31.061333 101.376 21.504-24.576-29.696-67.584-21.504-101.376-21.504z m-246.101334 23.210667c45.397333-16.725333 91.818667-29.696 138.922667-39.594667-30.378667-26.965333-55.978667-58.368-76.458667-93.525333-16.725333 46.08-38.912 90.112-62.464 133.12z m67.925334-243.370667c14.677333-37.546667 19.114667-83.285333-5.802667-117.418666-7.168 38.912-4.096 79.189333 5.802667 117.418666z m-45.397334-105.130666c4.096-24.917333 35.84-29.696 55.637334-22.186667 12.288 7.850667 18.432 22.869333 18.773333 37.205333 1.365333 44.032-6.485333 87.381333-12.629333 130.730667-3.413333 20.138667 8.874667 38.229333 17.749333 55.296 21.845333 40.277333 52.224 76.458667 92.16 99.669333 48.128-5.802667 98.645333-12.970667 145.749333 2.389334 35.157333 11.946667 26.965333 77.141333-11.264 77.824-53.589333 2.730667-102.058667-23.893333-150.186666-43.349334-66.218667 4.778667-130.730667 24.917333-194.218667 44.032-28.672 46.762667-54.613333 98.986667-101.034667 130.730667-23.210667 18.090667-76.458667 3.072-64.512-32.085333 20.138667-49.152 70.314667-76.117333 114.346667-100.693334 12.629333-6.485333 19.797333-18.773333 26.282667-31.061333 30.037333-57.685333 60.074667-115.370667 84.309333-175.786667-12.629333-56.661333-31.061333-114.688-21.162667-172.714666z" fill="#F90E09" p-id="1554"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1514284130163" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="1551" width="200" height="200">
|
||||
<defs>
|
||||
<style type="text/css"></style>
|
||||
</defs>
|
||||
<path d="M915.114667 1024H108.885333V0h587.776v218.112H914.773333V1024z m-785.066667-20.821333h763.904V238.933333H675.84V20.821333H129.706667v982.357334z"
|
||||
fill="#F90E09" p-id="1552"></path>
|
||||
<path d="M708.266667 10.581333L904.533333 206.848h-196.266666z" fill="#F90E09" p-id="1553"></path>
|
||||
<path d="M282.965333 792.576c33.450667-23.210667 55.637333-57.344 76.8-91.136-30.378667 25.941333-59.050667 54.954667-76.8 91.136z m396.629334-169.642667c31.402667 15.018667 65.877333 31.061333 101.376 21.504-24.576-29.696-67.584-21.504-101.376-21.504z m-246.101334 23.210667c45.397333-16.725333 91.818667-29.696 138.922667-39.594667-30.378667-26.965333-55.978667-58.368-76.458667-93.525333-16.725333 46.08-38.912 90.112-62.464 133.12z m67.925334-243.370667c14.677333-37.546667 19.114667-83.285333-5.802667-117.418666-7.168 38.912-4.096 79.189333 5.802667 117.418666z m-45.397334-105.130666c4.096-24.917333 35.84-29.696 55.637334-22.186667 12.288 7.850667 18.432 22.869333 18.773333 37.205333 1.365333 44.032-6.485333 87.381333-12.629333 130.730667-3.413333 20.138667 8.874667 38.229333 17.749333 55.296 21.845333 40.277333 52.224 76.458667 92.16 99.669333 48.128-5.802667 98.645333-12.970667 145.749333 2.389334 35.157333 11.946667 26.965333 77.141333-11.264 77.824-53.589333 2.730667-102.058667-23.893333-150.186666-43.349334-66.218667 4.778667-130.730667 24.917333-194.218667 44.032-28.672 46.762667-54.613333 98.986667-101.034667 130.730667-23.210667 18.090667-76.458667 3.072-64.512-32.085333 20.138667-49.152 70.314667-76.117333 114.346667-100.693334 12.629333-6.485333 19.797333-18.773333 26.282667-31.061333 30.037333-57.685333 60.074667-115.370667 84.309333-175.786667-12.629333-56.661333-31.061333-114.688-21.162667-172.714666z"
|
||||
fill="#F90E09" p-id="1554"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -1 +1,18 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543300178225" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5733" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M537.372818 38.36489h62.454472v99.134083c117.738246 0.660894 235.60867-1.211639 353.236766 0.550745 25.334266-2.423278 45.172097 17.29339 42.627656 42.627655 1.872533 205.758296-0.440596 411.626741 1.10149 617.506201-1.10149 22.250094 2.20298 46.923466-10.574302 66.640134-16.081751 11.664777-36.999043 10.133706-55.834519 11.014898-110.148981-0.550745-220.297962-0.330447-330.557091-0.330447v110.148981h-68.523681c-167.856032-30.621417-336.06454-58.599258-504.041736-88.119185-0.110149-256.977572 0-513.955144 0-770.822567 169.970892-29.420793 339.93077-59.381316 510.110945-88.350498z" fill="#D24625" p-id="5734"></path><path d="M599.82729 170.543667h363.491636v671.908783h-363.491636v-88.119185h264.357554v-44.059592h-264.357554v-55.074491h264.357554v-44.059592h-264.247405c-0.110149-21.5892-0.110149-43.1784-0.231313-64.767601 43.630011 13.53731 93.307202 13.217878 132.299941-13.008594 42.18706-25.003819 64.216856-72.698327 67.851772-120.271672-48.366417-0.330447-96.710805-0.220298-144.956059-0.220298-0.121164-47.914807 0.550745-95.829613-0.991341-143.634271-18.075448 3.524767-36.128866 7.269833-54.083149 11.125047v-109.818534z" fill="#FFFFFF" p-id="5735"></path><path d="M677.041725 246.216017c76.553542 3.524767 140.880546 67.961921 144.956059 144.295165-48.366417 0.550745-96.710805 0.330447-145.066208 0.330447 0-48.245254-0.121164-96.490507 0.110149-144.625612z" fill="#D24625" p-id="5736"></path><path d="M203.940838 329.378497c59.810897 2.863874 132.288926-23.682031 181.855967 21.148605 47.485226 57.607917 34.917227 163.571236-35.467972 198.047867-25.003819 12.777282-53.642554 11.014898-80.849351 10.133706-0.110149 43.068251-0.220298 86.136503-0.110149 129.19374-21.820513-1.872533-43.74016-3.745065-65.538644-5.507449-0.980326-117.628097-1.211639-235.377357 0.110149-353.016469z" fill="#FFFFFF" p-id="5737"></path><path d="M269.380347 388.969096c21.699349-0.991341 48.575701-4.956704 63.214501 15.420857 12.567999 21.5892 11.89609 50.007637 1.442951 72.257732-12.567999 22.69069-40.986436 20.48771-62.895068 23.131286-2.313129-36.899909-2.092831-73.799817-1.762384-110.809875z" fill="#D24625" p-id="5738"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1543300178225" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="5733" width="200" height="200">
|
||||
<defs>
|
||||
<style type="text/css"></style>
|
||||
</defs>
|
||||
<path d="M537.372818 38.36489h62.454472v99.134083c117.738246 0.660894 235.60867-1.211639 353.236766 0.550745 25.334266-2.423278 45.172097 17.29339 42.627656 42.627655 1.872533 205.758296-0.440596 411.626741 1.10149 617.506201-1.10149 22.250094 2.20298 46.923466-10.574302 66.640134-16.081751 11.664777-36.999043 10.133706-55.834519 11.014898-110.148981-0.550745-220.297962-0.330447-330.557091-0.330447v110.148981h-68.523681c-167.856032-30.621417-336.06454-58.599258-504.041736-88.119185-0.110149-256.977572 0-513.955144 0-770.822567 169.970892-29.420793 339.93077-59.381316 510.110945-88.350498z"
|
||||
fill="#D24625" p-id="5734"></path>
|
||||
<path d="M599.82729 170.543667h363.491636v671.908783h-363.491636v-88.119185h264.357554v-44.059592h-264.357554v-55.074491h264.357554v-44.059592h-264.247405c-0.110149-21.5892-0.110149-43.1784-0.231313-64.767601 43.630011 13.53731 93.307202 13.217878 132.299941-13.008594 42.18706-25.003819 64.216856-72.698327 67.851772-120.271672-48.366417-0.330447-96.710805-0.220298-144.956059-0.220298-0.121164-47.914807 0.550745-95.829613-0.991341-143.634271-18.075448 3.524767-36.128866 7.269833-54.083149 11.125047v-109.818534z"
|
||||
fill="#FFFFFF" p-id="5735"></path>
|
||||
<path d="M677.041725 246.216017c76.553542 3.524767 140.880546 67.961921 144.956059 144.295165-48.366417 0.550745-96.710805 0.330447-145.066208 0.330447 0-48.245254-0.121164-96.490507 0.110149-144.625612z"
|
||||
fill="#D24625" p-id="5736"></path>
|
||||
<path d="M203.940838 329.378497c59.810897 2.863874 132.288926-23.682031 181.855967 21.148605 47.485226 57.607917 34.917227 163.571236-35.467972 198.047867-25.003819 12.777282-53.642554 11.014898-80.849351 10.133706-0.110149 43.068251-0.220298 86.136503-0.110149 129.19374-21.820513-1.872533-43.74016-3.745065-65.538644-5.507449-0.980326-117.628097-1.211639-235.377357 0.110149-353.016469z"
|
||||
fill="#FFFFFF" p-id="5737"></path>
|
||||
<path d="M269.380347 388.969096c21.699349-0.991341 48.575701-4.956704 63.214501 15.420857 12.567999 21.5892 11.89609 50.007637 1.442951 72.257732-12.567999 22.69069-40.986436 20.48771-62.895068 23.131286-2.313129-36.899909-2.092831-73.799817-1.762384-110.809875z"
|
||||
fill="#D24625" p-id="5738"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -1 +1,16 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1545064197737" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14227" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M759.725253 0H134.464646v1024h817.131314V191.870707z" fill="#02007A" p-id="14228"></path><path d="M72.40404 708.525253h687.838384v258.585858H72.40404z" fill="#230091" p-id="14229"></path><path d="M82.747475 718.868687h667.151515v237.89899H82.747475zM755.070707 5.171717l191.353535 191.353536h-191.353535z" fill="#FFFFFF" p-id="14230"></path><path d="M506.828283 791.272727v93.090909h25.858586c28.444444 0 41.373737-12.929293 41.373737-45.511111s-12.929293-47.579798-41.373737-47.579798h-25.858586z m-25.858586-25.858586h51.717172c42.408081 0 67.232323 29.99596 67.232323 74.989899S575.612121 910.222222 532.686869 910.222222H480.969697v-144.808081z m-132.39596 104.468687c1.034343 26.375758 22.755556 42.408081 55.337374 42.408081 34.650505 0 55.854545-17.066667 55.854546-43.959596 0-21.20404-12.412121-33.09899-40.856566-39.822222l-16.549495-3.620202c-17.583838-4.137374-24.824242-9.826263-24.824242-19.135354 0-11.894949 10.860606-19.652525 26.892929-19.652525s27.410101 7.757576 28.444444 21.204041h24.307071c-0.517172-24.824242-21.20404-41.890909-52.751515-41.89091S351.676768 782.480808 351.676768 807.822222c0 20.169697 12.412121 33.09899 38.787878 38.787879l18.618182 4.137374c18.10101 4.137374 25.341414 10.343434 25.341414 20.169697 0 11.894949-11.894949 20.169697-28.961616 20.169697s-30.513131-8.791919-32.064646-21.721212l-24.824243 0.517171zM258.585859 788.686869v53.785858h20.686868c18.10101 0 31.030303-9.826263 31.030303-26.892929s-12.412121-26.892929-31.030303-26.892929h-20.686868z m-25.858586-23.272728h56.888889c28.444444 0 46.545455 20.686869 46.545454 49.131314s-17.583838 49.131313-46.545454 49.131313h-31.030303v46.545454h-25.858586v-144.808081z" fill="#230091" p-id="14231"></path><path d="M415.806061 443.216162h-31.030303v137.567676H321.163636V196.525253h93.090909c91.022222 0 140.670707 35.684848 140.670708 122.052525 0.517172 103.434343-92.573737 124.638384-139.119192 124.638384z m-5.688889-192.905051c-6.206061 0-14.99798 0.517172-26.89293 1.551515V387.878788h36.202021C461.834343 387.878788 491.313131 366.157576 491.313131 312.888889c0-40.856566-32.064646-62.577778-81.195959-62.577778z m258.068687 337.19596c70.852525 0 96.711111-50.165657 96.711111-84.816162 0-54.820202-35.684848-67.749495-66.19798-87.40202-25.858586-17.066667-49.648485-23.272727-49.648485-40.856566 0-22.755556 15.515152-27.410101 36.20202-27.410101 25.858586 0 54.820202 2.068687 67.232323 16.032323V306.682828c-12.929293-10.343434-37.236364-13.446465-68.783838-13.446464-67.749495 0-93.608081 44.993939-93.608081 84.29899 0 50.682828 33.616162 65.680808 66.19798 83.781818 21.20404 11.894949 46.545455 20.686869 46.545455 44.476767 0 13.963636-8.791919 27.927273-37.753536 27.927273-26.892929 0-59.991919-10.343434-74.989899-23.789899v59.991919c13.446465 10.343434 40.339394 17.583838 78.09293 17.583839z" fill="#7AB7FF" p-id="14232"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1545064197737" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="14227" width="200" height="200">
|
||||
<defs>
|
||||
<style type="text/css"></style>
|
||||
</defs>
|
||||
<path d="M759.725253 0H134.464646v1024h817.131314V191.870707z" fill="#02007A" p-id="14228"></path>
|
||||
<path d="M72.40404 708.525253h687.838384v258.585858H72.40404z" fill="#230091" p-id="14229"></path>
|
||||
<path d="M82.747475 718.868687h667.151515v237.89899H82.747475zM755.070707 5.171717l191.353535 191.353536h-191.353535z"
|
||||
fill="#FFFFFF" p-id="14230"></path>
|
||||
<path d="M506.828283 791.272727v93.090909h25.858586c28.444444 0 41.373737-12.929293 41.373737-45.511111s-12.929293-47.579798-41.373737-47.579798h-25.858586z m-25.858586-25.858586h51.717172c42.408081 0 67.232323 29.99596 67.232323 74.989899S575.612121 910.222222 532.686869 910.222222H480.969697v-144.808081z m-132.39596 104.468687c1.034343 26.375758 22.755556 42.408081 55.337374 42.408081 34.650505 0 55.854545-17.066667 55.854546-43.959596 0-21.20404-12.412121-33.09899-40.856566-39.822222l-16.549495-3.620202c-17.583838-4.137374-24.824242-9.826263-24.824242-19.135354 0-11.894949 10.860606-19.652525 26.892929-19.652525s27.410101 7.757576 28.444444 21.204041h24.307071c-0.517172-24.824242-21.20404-41.890909-52.751515-41.89091S351.676768 782.480808 351.676768 807.822222c0 20.169697 12.412121 33.09899 38.787878 38.787879l18.618182 4.137374c18.10101 4.137374 25.341414 10.343434 25.341414 20.169697 0 11.894949-11.894949 20.169697-28.961616 20.169697s-30.513131-8.791919-32.064646-21.721212l-24.824243 0.517171zM258.585859 788.686869v53.785858h20.686868c18.10101 0 31.030303-9.826263 31.030303-26.892929s-12.412121-26.892929-31.030303-26.892929h-20.686868z m-25.858586-23.272728h56.888889c28.444444 0 46.545455 20.686869 46.545454 49.131314s-17.583838 49.131313-46.545454 49.131313h-31.030303v46.545454h-25.858586v-144.808081z"
|
||||
fill="#230091" p-id="14231"></path>
|
||||
<path d="M415.806061 443.216162h-31.030303v137.567676H321.163636V196.525253h93.090909c91.022222 0 140.670707 35.684848 140.670708 122.052525 0.517172 103.434343-92.573737 124.638384-139.119192 124.638384z m-5.688889-192.905051c-6.206061 0-14.99798 0.517172-26.89293 1.551515V387.878788h36.202021C461.834343 387.878788 491.313131 366.157576 491.313131 312.888889c0-40.856566-32.064646-62.577778-81.195959-62.577778z m258.068687 337.19596c70.852525 0 96.711111-50.165657 96.711111-84.816162 0-54.820202-35.684848-67.749495-66.19798-87.40202-25.858586-17.066667-49.648485-23.272727-49.648485-40.856566 0-22.755556 15.515152-27.410101 36.20202-27.410101 25.858586 0 54.820202 2.068687 67.232323 16.032323V306.682828c-12.929293-10.343434-37.236364-13.446465-68.783838-13.446464-67.749495 0-93.608081 44.993939-93.608081 84.29899 0 50.682828 33.616162 65.680808 66.19798 83.781818 21.20404 11.894949 46.545455 20.686869 46.545455 44.476767 0 13.963636-8.791919 27.927273-37.753536 27.927273-26.892929 0-59.991919-10.343434-74.989899-23.789899v59.991919c13.446465 10.343434 40.339394 17.583838 78.09293 17.583839z"
|
||||
fill="#7AB7FF" p-id="14232"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -1 +1,10 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1514189544355" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8186" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M176 1024l672 0c26.464 0 48-21.536 48-48l0-672c0-0.544-0.256-0.992-0.288-1.504-0.064-0.736-0.256-1.376-0.416-2.08-0.544-2.272-1.472-4.32-2.88-6.112-0.224-0.288-0.192-0.64-0.416-0.928l-256-288c-0.096-0.096-0.224-0.096-0.32-0.192-1.92-2.048-4.352-3.456-7.136-4.288-0.608-0.192-1.152-0.256-1.792-0.352-0.928-0.16-1.792-0.544-2.752-0.544l-448 0c-26.464 0-48 21.536-48 48l0 928c0 26.464 21.536 48 48 48zM640 58.08l204.384 229.92-188.384 0c-7.04 0-16-13.44-16-24l0-205.92zM160 48c0-8.832 7.2-16 16-16l432 0 0 232c0 25.888 20.96 56 48 56l208 0 0 656c0 8.832-7.2 16-16 16l-672 0c-8.96 0-16-7.04-16-16l0-928zM304 448l416 0c8.832 0 16-7.168 16-16s-7.168-16-16-16l-416 0c-8.832 0-16 7.168-16 16s7.168 16 16 16zM304 576l416 0c8.832 0 16-7.168 16-16s-7.168-16-16-16l-416 0c-8.832 0-16 7.168-16 16s7.168 16 16 16zM304 320l192 0c8.832 0 16-7.168 16-16s-7.168-16-16-16l-192 0c-8.832 0-16 7.168-16 16s7.168 16 16 16zM304 704l416 0c8.832 0 16-7.168 16-16s-7.168-16-16-16l-416 0c-8.832 0-16 7.168-16 16s7.168 16 16 16zM304 832l416 0c8.832 0 16-7.168 16-16s-7.168-16-16-16l-416 0c-8.832 0-16 7.168-16 16s7.168 16 16 16z" p-id="8187"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1514189544355" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="8186" width="200" height="200">
|
||||
<defs>
|
||||
<style type="text/css"></style>
|
||||
</defs>
|
||||
<path d="M176 1024l672 0c26.464 0 48-21.536 48-48l0-672c0-0.544-0.256-0.992-0.288-1.504-0.064-0.736-0.256-1.376-0.416-2.08-0.544-2.272-1.472-4.32-2.88-6.112-0.224-0.288-0.192-0.64-0.416-0.928l-256-288c-0.096-0.096-0.224-0.096-0.32-0.192-1.92-2.048-4.352-3.456-7.136-4.288-0.608-0.192-1.152-0.256-1.792-0.352-0.928-0.16-1.792-0.544-2.752-0.544l-448 0c-26.464 0-48 21.536-48 48l0 928c0 26.464 21.536 48 48 48zM640 58.08l204.384 229.92-188.384 0c-7.04 0-16-13.44-16-24l0-205.92zM160 48c0-8.832 7.2-16 16-16l432 0 0 232c0 25.888 20.96 56 48 56l208 0 0 656c0 8.832-7.2 16-16 16l-672 0c-8.96 0-16-7.04-16-16l0-928zM304 448l416 0c8.832 0 16-7.168 16-16s-7.168-16-16-16l-416 0c-8.832 0-16 7.168-16 16s7.168 16 16 16zM304 576l416 0c8.832 0 16-7.168 16-16s-7.168-16-16-16l-416 0c-8.832 0-16 7.168-16 16s7.168 16 16 16zM304 320l192 0c8.832 0 16-7.168 16-16s-7.168-16-16-16l-192 0c-8.832 0-16 7.168-16 16s7.168 16 16 16zM304 704l416 0c8.832 0 16-7.168 16-16s-7.168-16-16-16l-416 0c-8.832 0-16 7.168-16 16s7.168 16 16 16zM304 832l416 0c8.832 0 16-7.168 16-16s-7.168-16-16-16l-416 0c-8.832 0-16 7.168-16 16s7.168 16 16 16z"
|
||||
p-id="8187"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -1 +1,23 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1514189554639" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8871" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M80 34.4h864v960H80z" fill="#8095FF" p-id="8872"></path><path d="M176 112m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8873"></path><path d="M176 272m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8874"></path><path d="M176 432m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8875"></path><path d="M176 592m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8876"></path><path d="M176 752m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8877"></path><path d="M176 912m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8878"></path><path d="M864 112m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8879"></path><path d="M864 272m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8880"></path><path d="M864 432m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8881"></path><path d="M864 592m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8882"></path><path d="M864 752m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8883"></path><path d="M864 912m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8884"></path><path d="M648 508L436 362.4c-4.8-3.2-11.2-4-16.8-0.8-5.6 3.2-8.8 8.8-8.8 14.4v290.4c0 5.6 3.2 11.2 8.8 14.4 5.6 3.2 12 2.4 16.8-0.8L648 533.6c4.8-2.4 7.2-8 7.2-12.8 0-4.8-3.2-9.6-7.2-12.8z" fill="#FFFFFF" p-id="8885"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1514189554639" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="8871" width="200" height="200">
|
||||
<defs>
|
||||
<style type="text/css"></style>
|
||||
</defs>
|
||||
<path d="M80 34.4h864v960H80z" fill="#8095FF" p-id="8872"></path>
|
||||
<path d="M176 112m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8873"></path>
|
||||
<path d="M176 272m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8874"></path>
|
||||
<path d="M176 432m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8875"></path>
|
||||
<path d="M176 592m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8876"></path>
|
||||
<path d="M176 752m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8877"></path>
|
||||
<path d="M176 912m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8878"></path>
|
||||
<path d="M864 112m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8879"></path>
|
||||
<path d="M864 272m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8880"></path>
|
||||
<path d="M864 432m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8881"></path>
|
||||
<path d="M864 592m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8882"></path>
|
||||
<path d="M864 752m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8883"></path>
|
||||
<path d="M864 912m-40 0a40 40 0 1 0 80 0 40 40 0 1 0-80 0Z" fill="#FFFFFF" p-id="8884"></path>
|
||||
<path d="M648 508L436 362.4c-4.8-3.2-11.2-4-16.8-0.8-5.6 3.2-8.8 8.8-8.8 14.4v290.4c0 5.6 3.2 11.2 8.8 14.4 5.6 3.2 12 2.4 16.8-0.8L648 533.6c4.8-2.4 7.2-8 7.2-12.8 0-4.8-3.2-9.6-7.2-12.8z"
|
||||
fill="#FFFFFF" p-id="8885"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -1 +1,17 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543300142282" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2233" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M534.310676 38.36489h65.428495v88.119185c110.25913 0 220.507245 0.220298 330.766374-0.330447 18.615178 0.771043 39.113903-0.550745 55.305803 10.574302 11.345345 16.302049 10.023557 37.010058 10.783586 55.746399-0.550745 191.218631-0.319432 382.327112-0.220298 573.435594-0.550745 32.053353 2.974022 64.767601-3.745066 96.380358-4.405959 22.910988-31.943204 23.461733-50.338084 24.232776-114.114344 0.330447-228.338837-0.220298-342.56333 0v99.134083h-68.402517c-167.867047-30.511268-336.075555-58.709407-504.151885-88.119185v-770.932716c169.0897-29.420793 338.168386-58.389975 507.136922-88.240349z" fill="#207245" p-id="2234"></path><path d="M599.739171 159.528769h363.491636v693.938579h-363.491636v-66.089389h88.119184v-77.104286h-88.119184v-44.059592h88.119184v-77.104287h-88.119184v-44.059592h88.119184v-77.104287h-88.119184v-44.059592h88.119184v-77.104287h-88.119184v-44.059592h88.119184v-77.104287h-88.119184v-66.089388z" fill="#FFFFFF" p-id="2235"></path><path d="M731.917948 225.618157h154.208573v77.104287h-154.208573v-77.104287z" fill="#207245" p-id="2236"></path><path d="M353.44605 328.827752c24.89367-1.762384 49.897488-3.304469 74.901307-4.516108-29.409778 60.251492-58.929705 120.502985-88.879213 180.53418 30.29097 61.683429 61.242833 122.926263 91.632937 184.609692-26.545904-1.553101-52.98166-3.19432-79.527564-5.066854-18.725327-45.932125-41.526166-90.322164-54.964342-138.358134-14.969246 44.731501-36.349164 86.918561-53.521389 130.74684-24.122627-0.330447-48.256268-1.321788-72.367881-2.313129 28.308288-55.404937 55.625235-111.250471 84.814716-166.324961-24.783521-56.726725-52.001334-112.35196-77.544883-168.748238 24.232776-1.431937 48.454537-2.863874 72.698327-4.185662 16.412198 43.068251 34.366482 85.585758 47.925822 129.7555 14.506621-46.802302 36.216985-90.861894 54.832163-136.133126z" fill="#FFFFFF" p-id="2237"></path><path d="M731.917948 346.782036h154.208573v77.104287h-154.208573v-77.104287zM731.917948 467.945915h154.208573v77.104287h-154.208573v-77.104287zM731.917948 589.109794h154.208573v77.104287h-154.208573v-77.104287zM731.917948 710.273673h154.208573v77.104286h-154.208573v-77.104286z" fill="#207245" p-id="2238"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1543300142282" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="2233" width="200" height="200">
|
||||
<defs>
|
||||
<style type="text/css"></style>
|
||||
</defs>
|
||||
<path d="M534.310676 38.36489h65.428495v88.119185c110.25913 0 220.507245 0.220298 330.766374-0.330447 18.615178 0.771043 39.113903-0.550745 55.305803 10.574302 11.345345 16.302049 10.023557 37.010058 10.783586 55.746399-0.550745 191.218631-0.319432 382.327112-0.220298 573.435594-0.550745 32.053353 2.974022 64.767601-3.745066 96.380358-4.405959 22.910988-31.943204 23.461733-50.338084 24.232776-114.114344 0.330447-228.338837-0.220298-342.56333 0v99.134083h-68.402517c-167.867047-30.511268-336.075555-58.709407-504.151885-88.119185v-770.932716c169.0897-29.420793 338.168386-58.389975 507.136922-88.240349z"
|
||||
fill="#207245" p-id="2234"></path>
|
||||
<path d="M599.739171 159.528769h363.491636v693.938579h-363.491636v-66.089389h88.119184v-77.104286h-88.119184v-44.059592h88.119184v-77.104287h-88.119184v-44.059592h88.119184v-77.104287h-88.119184v-44.059592h88.119184v-77.104287h-88.119184v-44.059592h88.119184v-77.104287h-88.119184v-66.089388z"
|
||||
fill="#FFFFFF" p-id="2235"></path>
|
||||
<path d="M731.917948 225.618157h154.208573v77.104287h-154.208573v-77.104287z" fill="#207245" p-id="2236"></path>
|
||||
<path d="M353.44605 328.827752c24.89367-1.762384 49.897488-3.304469 74.901307-4.516108-29.409778 60.251492-58.929705 120.502985-88.879213 180.53418 30.29097 61.683429 61.242833 122.926263 91.632937 184.609692-26.545904-1.553101-52.98166-3.19432-79.527564-5.066854-18.725327-45.932125-41.526166-90.322164-54.964342-138.358134-14.969246 44.731501-36.349164 86.918561-53.521389 130.74684-24.122627-0.330447-48.256268-1.321788-72.367881-2.313129 28.308288-55.404937 55.625235-111.250471 84.814716-166.324961-24.783521-56.726725-52.001334-112.35196-77.544883-168.748238 24.232776-1.431937 48.454537-2.863874 72.698327-4.185662 16.412198 43.068251 34.366482 85.585758 47.925822 129.7555 14.506621-46.802302 36.216985-90.861894 54.832163-136.133126z"
|
||||
fill="#FFFFFF" p-id="2237"></path>
|
||||
<path d="M731.917948 346.782036h154.208573v77.104287h-154.208573v-77.104287zM731.917948 467.945915h154.208573v77.104287h-154.208573v-77.104287zM731.917948 589.109794h154.208573v77.104287h-154.208573v-77.104287zM731.917948 710.273673h154.208573v77.104286h-154.208573v-77.104286z"
|
||||
fill="#207245" p-id="2238"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.6 KiB |
@@ -1 +1,11 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1544085034574" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1828" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M0 512A512 512 0 1 0 512 0 512 512 0 0 0 0 512" fill="#36D49F" p-id="1829"></path><path d="M450.37037 552.580741l-115.105185-87.798519-50.820741 39.822222L483.365926 701.62963C517.499259 616.296296 625.777778 449.232593 758.518519 330.714074L746.382222 303.407407a1264.071111 1264.071111 0 0 0-296.011852 249.173334" fill="#FFFFFF" p-id="1830"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1544085034574" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="1828" width="200" height="200">
|
||||
<defs>
|
||||
<style type="text/css"></style>
|
||||
</defs>
|
||||
<path d="M0 512A512 512 0 1 0 512 0 512 512 0 0 0 0 512" fill="#36D49F" p-id="1829"></path>
|
||||
<path d="M450.37037 552.580741l-115.105185-87.798519-50.820741 39.822222L483.365926 701.62963C517.499259 616.296296 625.777778 449.232593 758.518519 330.714074L746.382222 303.407407a1264.071111 1264.071111 0 0 0-296.011852 249.173334"
|
||||
fill="#FFFFFF" p-id="1830"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 743 B After Width: | Height: | Size: 755 B |
@@ -1,31 +1,29 @@
|
||||
import React from 'react';
|
||||
|
||||
|
||||
/**
|
||||
* 带有挂载状态的自定义组件
|
||||
*/
|
||||
export default class TankComponent<P, S> extends React.Component <P, S> {
|
||||
|
||||
export default class TankComponent<P, S> extends React.Component<P, S> {
|
||||
//是否处于挂载的状态。
|
||||
mounted: boolean = false
|
||||
mounted: boolean = false;
|
||||
|
||||
componentWillUnmount() {
|
||||
let that = this
|
||||
that.mounted = false
|
||||
let that = this;
|
||||
that.mounted = false;
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
let that = this
|
||||
that.mounted = true
|
||||
let that = this;
|
||||
that.mounted = true;
|
||||
}
|
||||
|
||||
//更新当前视图。
|
||||
updateUI() {
|
||||
let that = this
|
||||
let that = this;
|
||||
if (that.mounted) {
|
||||
that.setState({})
|
||||
that.setState({});
|
||||
} else {
|
||||
console.info(this.constructor.name + "已经脱离挂载,不再刷新视图。")
|
||||
console.info(this.constructor.name + '已经脱离挂载,不再刷新视图。');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,4 +32,3 @@ export default class TankComponent<P, S> extends React.Component <P, S> {
|
||||
return this.constructor.name;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
export const FORM_LAYOUT = {
|
||||
labelCol: { span: 6 },
|
||||
wrapperCol: { span: 18 },
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
import {ToolItem} from "../types";
|
||||
import React from "react";
|
||||
import { ToolItem } from '../types';
|
||||
import React from 'react';
|
||||
|
||||
export default class MenuItem implements ToolItem {
|
||||
name: string;
|
||||
@@ -7,18 +7,18 @@ export default class MenuItem implements ToolItem {
|
||||
icon: React.ReactNode;
|
||||
active: boolean = false;
|
||||
|
||||
|
||||
constructor(name: string, url: string, icon: React.ReactNode) {
|
||||
this.name = name;
|
||||
this.url = url;
|
||||
this.icon = icon;
|
||||
|
||||
//当前的url完全一致,那么就高亮显示
|
||||
if (url == "/user/login") {
|
||||
this.active = window.location.pathname === url || window.location.pathname === "/user/register"
|
||||
if (url == '/user/login') {
|
||||
this.active =
|
||||
window.location.pathname === url ||
|
||||
window.location.pathname === '/user/register';
|
||||
} else {
|
||||
this.active = window.location.pathname === url
|
||||
this.active = window.location.pathname === url;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,101 +1,89 @@
|
||||
/**
|
||||
* 管理当前所有的菜单
|
||||
*/
|
||||
import React from "react";
|
||||
import MenuItem from './MenuItem';
|
||||
import Moon from '../model/global/Moon';
|
||||
import User from '../model/user/User';
|
||||
import {UserRole} from '../model/user/UserRole';
|
||||
import Sun from '../../common/model/global/Sun';
|
||||
import React from 'react'
|
||||
import MenuItem from './MenuItem'
|
||||
import Moon from '../model/global/Moon'
|
||||
import User from '../model/user/User'
|
||||
import { UserRole } from '../model/user/UserRole'
|
||||
import Sun from '../../common/model/global/Sun'
|
||||
import {
|
||||
AppstoreOutlined,
|
||||
CloudSyncOutlined,
|
||||
DashboardOutlined,
|
||||
DeleteOutlined,
|
||||
PoweroffOutlined,
|
||||
SettingOutlined,
|
||||
ShareAltOutlined,
|
||||
TeamOutlined,
|
||||
DeleteOutlined
|
||||
} from '@ant-design/icons';
|
||||
import {LoginOutlined} from "@ant-design/icons/lib";
|
||||
import Preference from "../model/preference/Preference";
|
||||
import Lang from "../model/global/Lang";
|
||||
|
||||
} from '@ant-design/icons'
|
||||
import { LoginOutlined } from '@ant-design/icons/lib'
|
||||
import Preference from '../model/preference/Preference'
|
||||
import Lang from '../model/global/Lang'
|
||||
|
||||
export default class MenuManager {
|
||||
|
||||
//单例模式
|
||||
private static singleton: MenuManager;
|
||||
private static singleton: MenuManager
|
||||
|
||||
constructor() {
|
||||
|
||||
}
|
||||
constructor() {}
|
||||
|
||||
static getSingleton(): MenuManager {
|
||||
if (!MenuManager.singleton) {
|
||||
//初始化一个mainLand.
|
||||
MenuManager.singleton = new MenuManager();
|
||||
|
||||
MenuManager.singleton = new MenuManager()
|
||||
}
|
||||
return MenuManager.singleton;
|
||||
return MenuManager.singleton
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取到当前高亮的菜单
|
||||
*/
|
||||
getSelectedKeys(): string[] {
|
||||
|
||||
let keys: string[] = this.getMenuItems()
|
||||
.filter((menuItem: MenuItem, index: number) => {
|
||||
return menuItem.active;
|
||||
}).map((menuItem: MenuItem, index: number) => {
|
||||
return menuItem.url;
|
||||
});
|
||||
return menuItem.active
|
||||
})
|
||||
.map((menuItem: MenuItem, index: number) => {
|
||||
return menuItem.url
|
||||
})
|
||||
|
||||
return keys;
|
||||
return keys
|
||||
}
|
||||
|
||||
/**
|
||||
* 高亮某个菜单
|
||||
*/
|
||||
selectMenu(url: string) {
|
||||
|
||||
this.getMenuItems().forEach((menuItem: MenuItem, index: number) => {
|
||||
menuItem.active = menuItem.url === url;
|
||||
});
|
||||
|
||||
menuItem.active = menuItem.url === url
|
||||
})
|
||||
}
|
||||
|
||||
getMenuItems(): MenuItem[] {
|
||||
let user: User = Moon.getSingleton().user;
|
||||
let preference: Preference = Moon.getSingleton().preference;
|
||||
let user: User = Moon.getSingleton().user
|
||||
let preference: Preference = Moon.getSingleton().preference
|
||||
|
||||
let menuItems: MenuItem[] = [];
|
||||
let menuItems: MenuItem[] = []
|
||||
|
||||
if (!preference.installed) {
|
||||
menuItems = [
|
||||
new MenuItem(Lang.t("layout.install"), '/install/index', <SettingOutlined/>),
|
||||
];
|
||||
menuItems = [new MenuItem(Lang.t('layout.install'), '/install/index', <SettingOutlined />)]
|
||||
} else if (user.role === UserRole.GUEST) {
|
||||
menuItems = [
|
||||
new MenuItem(Lang.t("user.login"), '/user/login', <LoginOutlined/>),
|
||||
];
|
||||
menuItems = [new MenuItem(Lang.t('user.login'), '/user/login', <LoginOutlined />)]
|
||||
} else {
|
||||
menuItems.push(new MenuItem(Lang.t("layout.allFiles"), '/matter/list', <AppstoreOutlined/>))
|
||||
menuItems.push(new MenuItem(Lang.t("layout.myShare"), '/share/list', <ShareAltOutlined/>))
|
||||
menuItems.push(new MenuItem(Lang.t("layout.bin"), '/bin/list', <DeleteOutlined />))
|
||||
menuItems.push(new MenuItem(Lang.t('layout.allFiles'), '/matter/list', <AppstoreOutlined />))
|
||||
menuItems.push(new MenuItem(Lang.t('layout.allFiles'), '/new/matter/list', <AppstoreOutlined />))
|
||||
menuItems.push(new MenuItem(Lang.t('layout.space'), '/space', <CloudSyncOutlined />))
|
||||
menuItems.push(new MenuItem(Lang.t('layout.myShare'), '/share/list', <ShareAltOutlined />))
|
||||
menuItems.push(new MenuItem(Lang.t('layout.bin'), '/bin/list', <DeleteOutlined />))
|
||||
|
||||
if (user.role === UserRole.ADMINISTRATOR) {
|
||||
menuItems.push(new MenuItem(Lang.t("layout.setting"), '/preference/index', <SettingOutlined/>))
|
||||
menuItems.push(new MenuItem(Lang.t("layout.dashboard"), '/dashboard/index', <DashboardOutlined/>))
|
||||
menuItems.push(new MenuItem(Lang.t("layout.users"), `${Sun.getSingleton().isMobile ? '/mobile': ''}/user/list`, <TeamOutlined/>))
|
||||
menuItems.push(new MenuItem(Lang.t('layout.setting'), '/preference/index', <SettingOutlined />))
|
||||
menuItems.push(new MenuItem(Lang.t('layout.dashboard'), '/dashboard/index', <DashboardOutlined />))
|
||||
menuItems.push(new MenuItem(Lang.t('layout.users'), `${Sun.getSingleton().isMobile ? '/mobile' : ''}/user/list`, <TeamOutlined />))
|
||||
}
|
||||
menuItems.push(new MenuItem(Lang.t("layout.logout"), '/user/logout', <PoweroffOutlined/>))
|
||||
|
||||
|
||||
menuItems.push(new MenuItem(Lang.t('layout.logout'), '/user/logout', <PoweroffOutlined />))
|
||||
}
|
||||
|
||||
return menuItems;
|
||||
|
||||
return menuItems
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import ObjectUtil from "../../util/ObjectUtil";
|
||||
import JsonUtil from "../../util/JsonUtil";
|
||||
import DateUtil from "../../util/DateUtil";
|
||||
import ObjectUtil from '../../util/ObjectUtil';
|
||||
import JsonUtil from '../../util/JsonUtil';
|
||||
import DateUtil from '../../util/DateUtil';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -8,29 +8,25 @@ import DateUtil from "../../util/DateUtil";
|
||||
* 在这个类中可以统计建立的实体个数。
|
||||
*/
|
||||
export default class Base {
|
||||
|
||||
//id自增长值
|
||||
private static AUTO_INCREMENT_ID = 0
|
||||
private static AUTO_INCREMENT_ID = 0;
|
||||
|
||||
//当前对象的ID,这个字段让我们可以很轻松的统计出共创建了多少个实体类。
|
||||
autoId: number = 0
|
||||
|
||||
autoId: number = 0;
|
||||
|
||||
//我们认为每个实体都会存放于某个react组件中,当然可以不传入。
|
||||
constructor() {
|
||||
|
||||
this.autoId = Base.generateAutoId()
|
||||
this.autoId = Base.generateAutoId();
|
||||
}
|
||||
|
||||
static generateAutoId() {
|
||||
Base.AUTO_INCREMENT_ID++
|
||||
return Base.AUTO_INCREMENT_ID
|
||||
Base.AUTO_INCREMENT_ID++;
|
||||
return Base.AUTO_INCREMENT_ID;
|
||||
}
|
||||
|
||||
|
||||
//把obj中的属性,赋值到this中来。采用深拷贝。
|
||||
assign(obj: any) {
|
||||
ObjectUtil.extend(this, obj)
|
||||
ObjectUtil.extend(this, obj);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,11 +35,9 @@ export default class Base {
|
||||
* @param Clazz 类型名
|
||||
*/
|
||||
assignList<F extends keyof this>(field: string, Clazz: any) {
|
||||
|
||||
ObjectUtil.assignList(this, field, Clazz)
|
||||
ObjectUtil.assignList(this, field, Clazz);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据一个类型,渲染出对应的数组。
|
||||
* @param json 字符串或者数组对象。
|
||||
@@ -51,99 +45,80 @@ export default class Base {
|
||||
* @returns {*}
|
||||
*/
|
||||
static renderList(json: any, Clazz: any) {
|
||||
let target: any = [];
|
||||
|
||||
let target: any = []
|
||||
|
||||
|
||||
let arr: any = []
|
||||
|
||||
if (json instanceof String || typeof json === "string") {
|
||||
|
||||
arr = JsonUtil.parseList(json)
|
||||
let arr: any = [];
|
||||
|
||||
if (json instanceof String || typeof json === 'string') {
|
||||
arr = JsonUtil.parseList(json);
|
||||
} else if (json instanceof Array) {
|
||||
arr = json
|
||||
arr = json;
|
||||
} else {
|
||||
|
||||
console.error("源必须为字符或者数组", json, typeof json)
|
||||
return target
|
||||
console.error('源必须为字符或者数组', json, typeof json);
|
||||
return target;
|
||||
}
|
||||
|
||||
//如果我们要转换成字符串的数组形式,那么this[field]应该是一个字符串才对。
|
||||
if (Clazz === String) {
|
||||
return arr
|
||||
return arr;
|
||||
}
|
||||
|
||||
if (!Clazz || !(Clazz.prototype instanceof Base)) {
|
||||
console.error("指定的类型必须是 Base的子类 ")
|
||||
return target
|
||||
console.error('指定的类型必须是 Base的子类 ');
|
||||
return target;
|
||||
}
|
||||
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
let bean = arr[i]
|
||||
let bean = arr[i];
|
||||
|
||||
let clazz = new Clazz()
|
||||
let clazz = new Clazz();
|
||||
|
||||
clazz.assign(bean)
|
||||
clazz.assign(bean);
|
||||
|
||||
target.push(clazz)
|
||||
target.push(clazz);
|
||||
}
|
||||
|
||||
return target
|
||||
return target;
|
||||
}
|
||||
|
||||
//直接render出一个Entity. field字段名,Clazz类名。
|
||||
assignEntity(field: any, Clazz: any) {
|
||||
let thisObj: any = this;
|
||||
|
||||
let thisObj: any = this
|
||||
|
||||
let obj: any = thisObj[field]
|
||||
let obj: any = thisObj[field];
|
||||
if (!obj) {
|
||||
if (Clazz) {
|
||||
let EntityClazz: any = this.constructor
|
||||
obj = (new EntityClazz())[field]
|
||||
|
||||
let EntityClazz: any = this.constructor;
|
||||
obj = new EntityClazz()[field];
|
||||
} else {
|
||||
return
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (Clazz === Date) {
|
||||
|
||||
thisObj[field] = DateUtil.str2Date(obj)
|
||||
|
||||
thisObj[field] = DateUtil.str2Date(obj);
|
||||
} else if (Clazz.prototype instanceof Base) {
|
||||
|
||||
//可能此处的该项属性做了特殊处理的。
|
||||
//1024*1024 以及 "图片尺寸不超过1M"用let bean = new Clazz(); 就无法反映出来。因为父类assign的时候已经将avatar给变成了Object.
|
||||
let bean = (new thisObj.constructor())[field]
|
||||
let bean = new thisObj.constructor()[field];
|
||||
if (!bean) {
|
||||
bean = new Clazz()
|
||||
bean = new Clazz();
|
||||
}
|
||||
|
||||
|
||||
if (typeof obj === "string") {
|
||||
if (typeof obj === 'string') {
|
||||
try {
|
||||
obj = JSON.parse(obj)
|
||||
obj = JSON.parse(obj);
|
||||
} catch (e) {
|
||||
console.error("JSON parse obj error", e)
|
||||
console.error('JSON parse obj error', e);
|
||||
}
|
||||
}
|
||||
|
||||
if (obj !== null) {
|
||||
bean.assign(obj)
|
||||
thisObj[field] = bean
|
||||
bean.assign(obj);
|
||||
thisObj[field] = bean;
|
||||
}
|
||||
|
||||
} else {
|
||||
console.error('调用错误!')
|
||||
console.error('调用错误!');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,13 +4,11 @@ import SortFilter from './filter/SortFilter';
|
||||
import Filter from './filter/Filter';
|
||||
import HttpBase from './HttpBase';
|
||||
|
||||
|
||||
/**
|
||||
* 实体基类
|
||||
* 继承这个类的表示在数据库中有对应的表。
|
||||
*/
|
||||
export default class BaseEntity extends HttpBase {
|
||||
|
||||
/**
|
||||
* 唯一标识
|
||||
*/
|
||||
@@ -31,17 +29,13 @@ export default class BaseEntity extends HttpBase {
|
||||
*/
|
||||
updateTime: Date | null = null;
|
||||
|
||||
|
||||
//************ 前端辅助字段 ****************/
|
||||
//加载详情的指示
|
||||
detailLoading: boolean = false;
|
||||
|
||||
|
||||
//我们认为每个实体都会存放于某个react组件中,当然可以不传入。
|
||||
constructor(reactComponent?: React.Component | null) {
|
||||
|
||||
super(reactComponent);
|
||||
|
||||
}
|
||||
|
||||
//把obj中的属性,赋值到this中来。采用深拷贝。
|
||||
@@ -50,7 +44,6 @@ export default class BaseEntity extends HttpBase {
|
||||
|
||||
this.assignEntity('createTime', Date);
|
||||
this.assignEntity('updateTime', Date);
|
||||
|
||||
}
|
||||
|
||||
//获取过滤器,必须每次动态生成,否则会造成filter逻辑混乱。
|
||||
@@ -59,12 +52,10 @@ export default class BaseEntity extends HttpBase {
|
||||
new SortFilter('修改时间排序', 'orderCreateTime'),
|
||||
new SortFilter('创建时间排序', 'orderUpdateTime'),
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
//提交之前对自己进行验证。返回错误信息,null表示没有错误。
|
||||
validate(): any {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -75,7 +66,6 @@ export default class BaseEntity extends HttpBase {
|
||||
|
||||
//获取到当前类的单数标签。比如 Project便得到 project
|
||||
getTAG(): string {
|
||||
|
||||
let className = this.constructor.name;
|
||||
|
||||
//IE无法直接通过this.constructor.name获取到相应名称
|
||||
@@ -86,13 +76,11 @@ export default class BaseEntity extends HttpBase {
|
||||
return StringUtil.lowerCamel(className);
|
||||
}
|
||||
|
||||
|
||||
//获取到当前实体的url前缀。比如Notification获取到 /api/fs/notification
|
||||
getUrlPrefix(): string {
|
||||
return '/api' + StringUtil.lowerSlash(this.getTAG());
|
||||
}
|
||||
|
||||
|
||||
getUrlCreate(): string {
|
||||
let prefix = this.getUrlPrefix();
|
||||
|
||||
@@ -103,7 +91,6 @@ export default class BaseEntity extends HttpBase {
|
||||
let prefix = this.getUrlPrefix();
|
||||
|
||||
return prefix + '/delete';
|
||||
|
||||
}
|
||||
|
||||
getUrlEdit(): string {
|
||||
@@ -130,10 +117,8 @@ export default class BaseEntity extends HttpBase {
|
||||
return prefix + '/sort';
|
||||
}
|
||||
|
||||
|
||||
//新增或者修改
|
||||
httpSave(successCallback?: any, errorCallback?: any, finallyCallback?: any) {
|
||||
|
||||
let that = this;
|
||||
|
||||
let url = this.getUrlCreate();
|
||||
@@ -141,30 +126,33 @@ export default class BaseEntity extends HttpBase {
|
||||
url = this.getUrlEdit();
|
||||
}
|
||||
|
||||
|
||||
this.errorMessage = this.validate();
|
||||
if (this.errorMessage) {
|
||||
that.defaultErrorHandler(this.errorMessage, errorCallback);
|
||||
return;
|
||||
}
|
||||
|
||||
this.httpPost(url, this.getForm(), function(response: any) {
|
||||
|
||||
that.assign(response.data.data);
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
}, errorCallback, finallyCallback);
|
||||
this.httpPost(
|
||||
url,
|
||||
this.getForm(),
|
||||
function (response: any) {
|
||||
that.assign(response.data.data);
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback,
|
||||
finallyCallback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//common http detail methods.
|
||||
httpDetail(successCallback?: any, errorCallback?: any, finallyCallback?: any) {
|
||||
|
||||
httpDetail(
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finallyCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
if (!this.uuid) {
|
||||
|
||||
this.errorMessage = 'uuid未指定,无法获取到详情!';
|
||||
|
||||
this.defaultErrorHandler(this.errorMessage, errorCallback);
|
||||
@@ -176,33 +164,33 @@ export default class BaseEntity extends HttpBase {
|
||||
|
||||
this.detailLoading = true;
|
||||
|
||||
this.httpGet(url, {}, function(response: any) {
|
||||
that.detailLoading = false;
|
||||
this.httpGet(
|
||||
url,
|
||||
{},
|
||||
function (response: any) {
|
||||
that.detailLoading = false;
|
||||
|
||||
that.assign(response.data.data);
|
||||
that.assign(response.data.data);
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
}, function(response: any) {
|
||||
|
||||
that.detailLoading = false;
|
||||
|
||||
if (typeof errorCallback === 'function') {
|
||||
errorCallback(that.getErrorMessage(response), response);
|
||||
} else {
|
||||
//没有传入错误处理的方法就采用默认处理方法:toast弹出该错误信息。
|
||||
that.defaultErrorHandler(response);
|
||||
}
|
||||
}, finallyCallback);
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
function (response: any) {
|
||||
that.detailLoading = false;
|
||||
|
||||
if (typeof errorCallback === 'function') {
|
||||
errorCallback(that.getErrorMessage(response), response);
|
||||
} else {
|
||||
//没有传入错误处理的方法就采用默认处理方法:toast弹出该错误信息。
|
||||
that.defaultErrorHandler(response);
|
||||
}
|
||||
},
|
||||
finallyCallback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
httpDel(successCallback?: any, errorCallback?: any, finallyCallback?: any) {
|
||||
|
||||
let that = this;
|
||||
if (!this.uuid) {
|
||||
|
||||
this.errorMessage = '没有id,无法删除!';
|
||||
that.defaultErrorHandler(this.errorMessage, errorCallback);
|
||||
|
||||
@@ -211,17 +199,14 @@ export default class BaseEntity extends HttpBase {
|
||||
|
||||
let url = this.getUrlDel() + '?uuid=' + this.uuid;
|
||||
|
||||
this.httpPost(url, {}, function(response: any) {
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
}, errorCallback, finallyCallback);
|
||||
|
||||
this.httpPost(
|
||||
url,
|
||||
{},
|
||||
function (response: any) {
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback,
|
||||
finallyCallback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,291 +1,287 @@
|
||||
import HttpUtil from "../../util/HttpUtil";
|
||||
import SafeUtil from "../../util/SafeUtil";
|
||||
import qs from "qs"
|
||||
import React from "react";
|
||||
import ViewBase from "./ViewBase";
|
||||
import Sun from "../global/Sun";
|
||||
import {WebResultCode} from "./WebResultCode";
|
||||
import MessageBoxUtil from "../../util/MessageBoxUtil";
|
||||
import HttpUtil from '../../util/HttpUtil';
|
||||
import SafeUtil from '../../util/SafeUtil';
|
||||
import qs from 'qs';
|
||||
import React from 'react';
|
||||
import ViewBase from './ViewBase';
|
||||
import Sun from '../global/Sun';
|
||||
import { WebResultCode } from './WebResultCode';
|
||||
import MessageBoxUtil from '../../util/MessageBoxUtil';
|
||||
|
||||
/**
|
||||
* 基类。带有网络请求能力的基类
|
||||
* 继承了该类就表示具有了去服务器请求的能力。
|
||||
*/
|
||||
export default class HttpBase extends ViewBase {
|
||||
|
||||
static lastLoginErrorTimestamp = 0
|
||||
static lastLoginErrorTimestamp = 0;
|
||||
|
||||
//是否需要自动刷新State
|
||||
needReactComponentUpdate: boolean = true
|
||||
needReactComponentUpdate: boolean = true;
|
||||
|
||||
//当前是否正在进行http请求
|
||||
loading: boolean = false
|
||||
loading: boolean = false;
|
||||
|
||||
//请求http的时候是否有错误
|
||||
errorMessage: string | null = null
|
||||
errorMessage: string | null = null;
|
||||
|
||||
//我们认为每个实体都会存放于某个react组件中,当然可以不传入。
|
||||
constructor(reactComponent?: React.Component | null) {
|
||||
|
||||
super()
|
||||
super();
|
||||
|
||||
if (reactComponent) {
|
||||
this.reactComponent = reactComponent
|
||||
this.reactComponent = reactComponent;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//更新当前的视图,只在需要更新的情况下才更新。
|
||||
updateUI() {
|
||||
if (this.needReactComponentUpdate && this.reactComponent) {
|
||||
ViewBase.updateComponentUI(this.reactComponent, this)
|
||||
ViewBase.updateComponentUI(this.reactComponent, this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 转跳到登录页面
|
||||
*/
|
||||
jumpLogin() {
|
||||
|
||||
Sun.navigateTo("/user/login")
|
||||
|
||||
|
||||
Sun.navigateTo('/user/login');
|
||||
}
|
||||
|
||||
/**
|
||||
* 转跳到网站安装页面
|
||||
*/
|
||||
jumpInstall() {
|
||||
|
||||
Sun.navigateTo("/install/index")
|
||||
|
||||
Sun.navigateTo('/install/index');
|
||||
}
|
||||
|
||||
//从一个返回中获取出其错误信息。适配各种错误的类型。
|
||||
getErrorMessage(response: any) {
|
||||
|
||||
console.error("getErrorMessage", response)
|
||||
let msg = '服务器出错,请稍后再试!'
|
||||
console.error('getErrorMessage', response);
|
||||
let msg = '服务器出错,请稍后再试!';
|
||||
|
||||
if (!response) {
|
||||
msg = '出错啦,请稍后重试!'
|
||||
msg = '出错啦,请稍后重试!';
|
||||
} else if (typeof response === 'string') {
|
||||
msg = response
|
||||
msg = response;
|
||||
} else if (response['msg']) {
|
||||
msg = response['msg']
|
||||
msg = response['msg'];
|
||||
} else if (response['message']) {
|
||||
msg = response['message']
|
||||
msg = response['message'];
|
||||
} else {
|
||||
let temp = response['data']
|
||||
let temp = response['data'];
|
||||
if (temp !== null && typeof temp === 'object') {
|
||||
if (temp['message']) {
|
||||
msg = temp['message']
|
||||
msg = temp['message'];
|
||||
} else if (temp['msg']) {
|
||||
msg = temp['msg']
|
||||
msg = temp['msg'];
|
||||
} else {
|
||||
if (temp['error'] && temp['error']['message']) {
|
||||
msg = temp['error']['message']
|
||||
msg = temp['error']['message'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.errorMessage = msg
|
||||
return msg
|
||||
this.errorMessage = msg;
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
//提供全局的默认处理方式,可以自定义错误处理
|
||||
defaultErrorHandler(response: any, errorCallback?: any) {
|
||||
let msg = this.getErrorMessage(response);
|
||||
|
||||
let msg = this.getErrorMessage(response)
|
||||
|
||||
console.error("请求出错了", typeof msg, msg)
|
||||
console.error('请求出错了', typeof msg, msg);
|
||||
|
||||
if (typeof errorCallback === 'function') {
|
||||
errorCallback(msg, response)
|
||||
errorCallback(msg, response);
|
||||
} else {
|
||||
MessageBoxUtil.error(msg)
|
||||
MessageBoxUtil.error(msg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//专门捕捉没有登录这种错误。return true -> 有错误(已经处理掉了) false -> 没错误 (什么都没干)
|
||||
specialErrorHandler(response: any) {
|
||||
|
||||
if (!response || !response.data) {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
|
||||
//1.判断是不是登录错误
|
||||
if (response.data["code"] === WebResultCode.LOGIN) {
|
||||
|
||||
if (response.data['code'] === WebResultCode.LOGIN) {
|
||||
//这个问题不能报的太频繁,比如一个页面请求了两个接口,两个接口都报没有登录。
|
||||
if ((new Date().getTime()) - HttpBase.lastLoginErrorTimestamp < 3000) {
|
||||
return true
|
||||
if (new Date().getTime() - HttpBase.lastLoginErrorTimestamp < 3000) {
|
||||
return true;
|
||||
} else {
|
||||
HttpBase.lastLoginErrorTimestamp = (new Date().getTime());
|
||||
HttpBase.lastLoginErrorTimestamp = new Date().getTime();
|
||||
}
|
||||
|
||||
MessageBoxUtil.error("您尚未登录,请登录后访问!")
|
||||
MessageBoxUtil.error('您尚未登录,请登录后访问!');
|
||||
|
||||
//立即进行登录跳转。
|
||||
this.jumpLogin()
|
||||
this.jumpLogin();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 基类中的http请求会去统一处理错误情况。
|
||||
* 1.登录过期
|
||||
*
|
||||
*/
|
||||
httpGet(url: any, params = {}, successCallback?: any, errorCallback?: any, finallyCallback?: any, opts?: any) {
|
||||
|
||||
let that = this
|
||||
httpGet(
|
||||
url: any,
|
||||
params = {},
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finallyCallback?: any,
|
||||
opts?: any
|
||||
) {
|
||||
let that = this;
|
||||
|
||||
if (!opts) {
|
||||
opts = {}
|
||||
opts = {};
|
||||
}
|
||||
|
||||
|
||||
that.loading = true
|
||||
that.loading = true;
|
||||
|
||||
//更新react控件的状态
|
||||
that.updateUI()
|
||||
that.updateUI();
|
||||
|
||||
return HttpUtil.httpGet(url, params, function (response: any) {
|
||||
//有可能正常接口回来的数据也是错误的。交给错误处理器处理。
|
||||
if (that.specialErrorHandler(response)) {
|
||||
return HttpUtil.httpGet(
|
||||
url,
|
||||
params,
|
||||
function (response: any) {
|
||||
//有可能正常接口回来的数据也是错误的。交给错误处理器处理。
|
||||
if (that.specialErrorHandler(response)) {
|
||||
SafeUtil.safeCallback(errorCallback)(response);
|
||||
return;
|
||||
}
|
||||
|
||||
SafeUtil.safeCallback(errorCallback)(response)
|
||||
return
|
||||
}
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
function (err: any) {
|
||||
let response = err.response;
|
||||
console.error('请求出错啦', response);
|
||||
|
||||
//特殊错误情况的通用处理方式
|
||||
if (that.specialErrorHandler(response)) {
|
||||
return;
|
||||
}
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response)
|
||||
that.defaultErrorHandler(response, errorCallback);
|
||||
},
|
||||
function (res: any) {
|
||||
that.loading = false;
|
||||
|
||||
}, function (err: any) {
|
||||
//更新react控件的状态
|
||||
that.updateUI();
|
||||
|
||||
let response = err.response
|
||||
console.error("请求出错啦", response)
|
||||
|
||||
//特殊错误情况的通用处理方式
|
||||
if (that.specialErrorHandler(response)) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
that.defaultErrorHandler(response, errorCallback)
|
||||
|
||||
}, function (res: any) {
|
||||
|
||||
that.loading = false
|
||||
|
||||
//更新react控件的状态
|
||||
that.updateUI()
|
||||
|
||||
SafeUtil.safeCallback(finallyCallback)(res)
|
||||
|
||||
}, opts);
|
||||
SafeUtil.safeCallback(finallyCallback)(res);
|
||||
},
|
||||
opts
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 基类中纯粹的http get请求。
|
||||
*
|
||||
*/
|
||||
httpPureGet(url: any, params = {}, successCallback?: any, errorCallback?: any, finallyCallback?: any, opts?: any) {
|
||||
|
||||
let that = this
|
||||
httpPureGet(
|
||||
url: any,
|
||||
params = {},
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finallyCallback?: any,
|
||||
opts?: any
|
||||
) {
|
||||
let that = this;
|
||||
|
||||
if (!opts) {
|
||||
opts = {}
|
||||
opts = {};
|
||||
}
|
||||
|
||||
return HttpUtil.httpGet(url, params, function (response: any) {
|
||||
SafeUtil.safeCallback(successCallback)(response)
|
||||
}, function (err: any) {
|
||||
SafeUtil.safeCallback(errorCallback)(that.getErrorMessage(err.response))
|
||||
}, function (res: any) {
|
||||
SafeUtil.safeCallback(finallyCallback)(res)
|
||||
}, opts);
|
||||
return HttpUtil.httpGet(
|
||||
url,
|
||||
params,
|
||||
function (response: any) {
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
function (err: any) {
|
||||
SafeUtil.safeCallback(errorCallback)(
|
||||
that.getErrorMessage(err.response)
|
||||
);
|
||||
},
|
||||
function (res: any) {
|
||||
SafeUtil.safeCallback(finallyCallback)(res);
|
||||
},
|
||||
opts
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 基类中的http请求会去统一处理错误情况。
|
||||
* 1.登录过期
|
||||
*
|
||||
*/
|
||||
httpPost(url: any, params = {}, successCallback?: any, errorCallback?: any, finallyCallback?: any, opts?: any) {
|
||||
|
||||
let that = this
|
||||
httpPost(
|
||||
url: any,
|
||||
params = {},
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finallyCallback?: any,
|
||||
opts?: any
|
||||
) {
|
||||
let that = this;
|
||||
|
||||
if (!opts) {
|
||||
opts = {}
|
||||
opts = {};
|
||||
}
|
||||
|
||||
that.loading = true
|
||||
that.loading = true;
|
||||
|
||||
//更新react控件的状态
|
||||
that.updateUI()
|
||||
|
||||
that.updateUI();
|
||||
|
||||
let formData = qs.stringify(params);
|
||||
|
||||
if (!opts["headers"]) {
|
||||
opts["headers"] = {}
|
||||
if (!opts['headers']) {
|
||||
opts['headers'] = {};
|
||||
}
|
||||
opts["headers"]['Content-Type'] = 'application/x-www-form-urlencoded'
|
||||
opts['headers']['Content-Type'] = 'application/x-www-form-urlencoded';
|
||||
|
||||
return HttpUtil.httpPost(
|
||||
url,
|
||||
formData,
|
||||
function (response: any) {
|
||||
//有可能正常接口回来的数据也是错误的。交给错误处理器处理。
|
||||
if (that.specialErrorHandler(response)) {
|
||||
SafeUtil.safeCallback(errorCallback)(response);
|
||||
return;
|
||||
}
|
||||
|
||||
return HttpUtil.httpPost(url, formData, function (response: any) {
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
function (err: any) {
|
||||
let response = err.response;
|
||||
|
||||
//有可能正常接口回来的数据也是错误的。交给错误处理器处理。
|
||||
if (that.specialErrorHandler(response)) {
|
||||
console.error('请求出错啦', response ? response : err);
|
||||
|
||||
SafeUtil.safeCallback(errorCallback)(response)
|
||||
return
|
||||
}
|
||||
//特殊错误情况的通用处理方式
|
||||
if (that.specialErrorHandler(response)) {
|
||||
return;
|
||||
}
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response)
|
||||
that.defaultErrorHandler(response, errorCallback);
|
||||
},
|
||||
function (res: any) {
|
||||
that.loading = false;
|
||||
|
||||
}, function (err: any) {
|
||||
//更新react控件的状态
|
||||
that.updateUI();
|
||||
|
||||
let response = err.response
|
||||
|
||||
console.error("请求出错啦", response ? response : err)
|
||||
|
||||
//特殊错误情况的通用处理方式
|
||||
if (that.specialErrorHandler(response)) {
|
||||
return
|
||||
}
|
||||
|
||||
that.defaultErrorHandler(response, errorCallback)
|
||||
|
||||
}, function (res: any) {
|
||||
|
||||
that.loading = false
|
||||
|
||||
//更新react控件的状态
|
||||
that.updateUI()
|
||||
|
||||
SafeUtil.safeCallback(finallyCallback)(res)
|
||||
|
||||
}, opts);
|
||||
SafeUtil.safeCallback(finallyCallback)(res);
|
||||
},
|
||||
opts
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ import HttpBase from './HttpBase';
|
||||
* 这个类具有非常神奇的能力,可以说是整个项目含金量最高的一个类!
|
||||
*/
|
||||
export default class Pager<T> extends HttpBase {
|
||||
|
||||
static MAX_PAGE_SIZE = 500;
|
||||
|
||||
/**
|
||||
@@ -58,15 +57,17 @@ export default class Pager<T> extends HttpBase {
|
||||
*/
|
||||
history: boolean = false;
|
||||
|
||||
|
||||
constructor(reactComponent: React.Component | null, Clazz: any, pageSize = 20) {
|
||||
|
||||
constructor(
|
||||
reactComponent: React.Component | null,
|
||||
Clazz: any,
|
||||
pageSize = 20
|
||||
) {
|
||||
super(reactComponent);
|
||||
|
||||
this.pageSize = pageSize;
|
||||
|
||||
//这里的处理利用了js的原型调用链,比较魔法。
|
||||
if (Clazz && (Clazz.prototype instanceof BaseEntity)) {
|
||||
if (Clazz && Clazz.prototype instanceof BaseEntity) {
|
||||
this.Clazz = Clazz;
|
||||
|
||||
let urlPage = Clazz.prototype.getUrlList();
|
||||
@@ -77,16 +78,13 @@ export default class Pager<T> extends HttpBase {
|
||||
}
|
||||
|
||||
if (Clazz.prototype.getFilters) {
|
||||
|
||||
//直接获取该类的过滤器。
|
||||
this.filters = Clazz.prototype.getFilters();
|
||||
|
||||
} else {
|
||||
|
||||
console.error('The Clazz MUST define a prototype method named \'getFilters\'');
|
||||
|
||||
console.error(
|
||||
"The Clazz MUST define a prototype method named 'getFilters'"
|
||||
);
|
||||
}
|
||||
|
||||
} else {
|
||||
console.error('You MUST specify a Clazz extended BaseEntity');
|
||||
}
|
||||
@@ -94,14 +92,11 @@ export default class Pager<T> extends HttpBase {
|
||||
|
||||
//把obj中的属性,赋值到this中来。采用深拷贝。
|
||||
assign(obj: any) {
|
||||
|
||||
super.assign(obj);
|
||||
|
||||
this.assignList('data', this.Clazz);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//该方法是在地址栏添加上query参数,参数就是filters中的key和value.
|
||||
//同时地址栏上有的参数也会自动读取到filters中去
|
||||
//因此,启用该方法后返回时可以停留在之前的页码中。
|
||||
@@ -126,32 +121,27 @@ export default class Pager<T> extends HttpBase {
|
||||
this.pageSize = 10;
|
||||
}
|
||||
|
||||
|
||||
//从请求参数中传值。
|
||||
for (let i = 0; i < this.filters.length; i++) {
|
||||
|
||||
let filter: Filter = this.filters[i];
|
||||
|
||||
let queryValue = BrowserUtil.getQueryByName(filter.key);
|
||||
|
||||
if (queryValue !== null && queryValue !== '') {
|
||||
|
||||
filter.putValue(queryValue);
|
||||
|
||||
} else {
|
||||
filter.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//重置所有过滤器
|
||||
resetFilter() {
|
||||
for (let i = 0; i < this.filters.length; i++) {
|
||||
let filter = this.filters[i];
|
||||
filter.reset();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//重置排序过滤器
|
||||
resetSortFilters() {
|
||||
@@ -161,8 +151,7 @@ export default class Pager<T> extends HttpBase {
|
||||
filter.reset();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
//手动设置过滤器的值
|
||||
setFilterValue(key: string, value: any) {
|
||||
@@ -171,38 +160,20 @@ export default class Pager<T> extends HttpBase {
|
||||
}
|
||||
|
||||
for (let i = 0; i < this.filters.length; i++) {
|
||||
|
||||
let filter = this.filters[i];
|
||||
|
||||
if (filter.key === key) {
|
||||
filter.putValue(value);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
setFilterValues(obj: any) {
|
||||
const keys = Object.keys(obj);
|
||||
if(keys.length) {
|
||||
keys.forEach(key => this.setFilterValue(key, obj[key]))
|
||||
if (keys.length) {
|
||||
keys.forEach((key) => this.setFilterValue(key, obj[key]));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//根据key来删除某个Filter
|
||||
removeFilter(key: string) {
|
||||
if (!this.filters || !this.filters.length) {
|
||||
return;
|
||||
}
|
||||
for (let i = 0; i < this.filters.length; i++) {
|
||||
let filter = this.filters[i];
|
||||
if (filter.key === key) {
|
||||
this.filters.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
//隐藏某个Filter,实际上我们可以根据这个filter来筛选,只不过不出现在NbFilter中而已。
|
||||
showFilter(key: string, visible = true) {
|
||||
@@ -216,7 +187,7 @@ export default class Pager<T> extends HttpBase {
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
showAllFilter(visible = true) {
|
||||
if (!this.filters || !this.filters.length) {
|
||||
@@ -242,25 +213,23 @@ export default class Pager<T> extends HttpBase {
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
//根据一个key来获取某个filter
|
||||
getFilterValue(key: string) {
|
||||
let filter = this.getFilter(key);
|
||||
if (!filter) {
|
||||
return null
|
||||
return null;
|
||||
} else {
|
||||
return filter.getValueString()
|
||||
return filter.getValueString();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前进行sort的那个filter
|
||||
* 我们认为一次只有一个排序值
|
||||
*/
|
||||
getCurrentSortFilter(): Filter | null {
|
||||
|
||||
if (!this.filters || !this.filters.length) {
|
||||
return null;
|
||||
}
|
||||
@@ -272,15 +241,12 @@ export default class Pager<T> extends HttpBase {
|
||||
return filter;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
//获取所有的filter参数,键值对形式
|
||||
getParams(): { [s: string]: string | number } {
|
||||
|
||||
let params: { [s: string]: string | number } = {
|
||||
page: this.page,
|
||||
pageSize: this.pageSize,
|
||||
@@ -290,6 +256,8 @@ export default class Pager<T> extends HttpBase {
|
||||
return params;
|
||||
}
|
||||
|
||||
console.log("this.filters",this.filters)
|
||||
|
||||
for (let i = 0; i < this.filters.length; i++) {
|
||||
let filter = this.filters[i];
|
||||
|
||||
@@ -299,8 +267,7 @@ export default class Pager<T> extends HttpBase {
|
||||
}
|
||||
|
||||
return params;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
//元素是否为空
|
||||
isEmpty(): boolean {
|
||||
@@ -309,39 +276,41 @@ export default class Pager<T> extends HttpBase {
|
||||
|
||||
//去服务器端进行请求
|
||||
httpList(successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
|
||||
let that = this;
|
||||
|
||||
let params: { [s: string]: string | number } = this.getParams();
|
||||
|
||||
|
||||
if (this.history) {
|
||||
window.history.replaceState({}, '', window.location.pathname + '?' + ObjectUtil.param(params));
|
||||
window.history.replaceState(
|
||||
{},
|
||||
'',
|
||||
window.location.pathname + '?' + ObjectUtil.param(params)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//准备去请求,所有错误置为空
|
||||
this.errorMessage = null;
|
||||
|
||||
this.httpGet(this.urlPage, params, function(response: any) {
|
||||
// handle success
|
||||
this.httpGet(
|
||||
this.urlPage,
|
||||
params,
|
||||
function (response: any) {
|
||||
// handle success
|
||||
|
||||
that.assign(response.data.data);
|
||||
that.assign(response.data.data);
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
}, function(errorMessage: any, response: any) {
|
||||
|
||||
//失败了就清空
|
||||
that.data = [];
|
||||
|
||||
SafeUtil.safeCallback(errorCallback)(errorMessage, response);
|
||||
|
||||
}, finalCallback);
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
function (errorMessage: any, response: any) {
|
||||
//失败了就清空
|
||||
that.data = [];
|
||||
|
||||
SafeUtil.safeCallback(errorCallback)(errorMessage, response);
|
||||
},
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//从pager中获取当前的分页情况,在table的分页器中显示 PaginationConfig
|
||||
getPagination(): any | false {
|
||||
let that = this;
|
||||
@@ -357,35 +326,28 @@ export default class Pager<T> extends HttpBase {
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//获取默认的排序顺序,提供给table使用
|
||||
getDefaultSortOrder(columnKey: string): any | boolean {
|
||||
|
||||
//将变化的这个情况更新。
|
||||
let filterKey = 'order' + StringUtil.capitalize(columnKey);
|
||||
|
||||
//直接放进排序值即可,底层会自动兼容
|
||||
let sortFilter = this.getFilter(filterKey);
|
||||
|
||||
if (sortFilter && (sortFilter instanceof SortFilter)) {
|
||||
|
||||
if (sortFilter && sortFilter instanceof SortFilter) {
|
||||
let antdSortValue: any | null = sortFilter.getAntdValue();
|
||||
if (antdSortValue) {
|
||||
return antdSortValue;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//在table的分页器 发生变化调用 TODO: PaginationConfig SorterResult TableCurrentDataSource
|
||||
tableOnChange(pagination: any, filters: any, sorter: any, extra: any) {
|
||||
let that = this;
|
||||
@@ -395,22 +357,19 @@ export default class Pager<T> extends HttpBase {
|
||||
}
|
||||
|
||||
if (pagination.pageSize !== undefined) {
|
||||
|
||||
that.pageSize = pagination.pageSize;
|
||||
}
|
||||
|
||||
|
||||
//重置所有的sort
|
||||
that.resetSortFilters();
|
||||
if (!StringUtil.isEmptyObject(sorter)) {
|
||||
|
||||
//将变化的这个情况更新。
|
||||
let filterKey = 'order' + StringUtil.capitalize(StringUtil.underScoreToCamel(sorter.field));
|
||||
|
||||
let filterKey =
|
||||
'order' +
|
||||
StringUtil.capitalize(StringUtil.underScoreToCamel(sorter.field));
|
||||
|
||||
//直接放进排序值即可,底层会自动兼容
|
||||
that.setFilterValue(filterKey, sorter.order);
|
||||
|
||||
}
|
||||
|
||||
//直接去刷新
|
||||
@@ -424,9 +383,4 @@ export default class Pager<T> extends HttpBase {
|
||||
this.totalItems = 0;
|
||||
this.totalPages = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,7 @@ enum SortDirection {
|
||||
|
||||
//这两项是antd的标准
|
||||
DESCEND = 'descend',
|
||||
ASCEND = 'ascend'
|
||||
ASCEND = 'ascend',
|
||||
}
|
||||
|
||||
|
||||
export default SortDirection
|
||||
export default SortDirection;
|
||||
|
||||
@@ -5,34 +5,29 @@
|
||||
* 这个类附带了一个视图,通过对这个类的操作可以对对应的视图进行更新等操作。
|
||||
* Castle中的类,大多数直接继承这个类。
|
||||
*/
|
||||
import Base from "./Base";
|
||||
import React from "react";
|
||||
import Base from './Base';
|
||||
import React from 'react';
|
||||
|
||||
export default class ViewBase extends Base {
|
||||
|
||||
//该类对应的React视图。
|
||||
reactComponent: React.Component | null = null
|
||||
reactComponent: React.Component | null = null;
|
||||
|
||||
//更新某一个组件对应的UI
|
||||
static updateComponentUI(component: React.Component | null, entity?: any) {
|
||||
if (component) {
|
||||
//_version在这里是充当fake的。
|
||||
component.setState({_version: new Date().getTime()})
|
||||
component.setState({ _version: new Date().getTime() });
|
||||
} else {
|
||||
console.warn(`${entity && entity.constructor ? entity.constructor.name : '未知对象'} 的 reactComponent 不存在,无法更新其对应的UI`)
|
||||
console.warn(
|
||||
`${
|
||||
entity && entity.constructor ? entity.constructor.name : '未知对象'
|
||||
} 的 reactComponent 不存在,无法更新其对应的UI`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//更新当前的视图
|
||||
updateUI() {
|
||||
|
||||
ViewBase.updateComponentUI(this.reactComponent, this)
|
||||
|
||||
ViewBase.updateComponentUI(this.reactComponent, this);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,62 +1,59 @@
|
||||
import SelectionOption from "../base/option/SelectionOption";
|
||||
|
||||
import SelectionOption from '../base/option/SelectionOption';
|
||||
|
||||
enum WebResultCode {
|
||||
OK = "OK",
|
||||
BAD_REQUEST = "BAD_REQUEST",
|
||||
NEED_SHARE_CODE = "NEED_SHARE_CODE",
|
||||
SHARE_CODE_ERROR = "SHARE_CODE_ERROR",
|
||||
LOGIN = "LOGIN",
|
||||
NOT_INSTALLED = "NOT_INSTALLED",
|
||||
SERVER = "SERVER",
|
||||
UNKNOWN = "UNKNOWN",
|
||||
OK = 'OK',
|
||||
BAD_REQUEST = 'BAD_REQUEST',
|
||||
NEED_SHARE_CODE = 'NEED_SHARE_CODE',
|
||||
SHARE_CODE_ERROR = 'SHARE_CODE_ERROR',
|
||||
LOGIN = 'LOGIN',
|
||||
NOT_INSTALLED = 'NOT_INSTALLED',
|
||||
SERVER = 'SERVER',
|
||||
UNKNOWN = 'UNKNOWN',
|
||||
}
|
||||
|
||||
let WebResultCodes: WebResultCode[] = Object.keys(WebResultCode).map(k => k as WebResultCode)
|
||||
let WebResultCodes: WebResultCode[] = Object.keys(WebResultCode).map(
|
||||
(k) => k as WebResultCode
|
||||
);
|
||||
|
||||
let WebResultCodeMap: { [key in keyof typeof WebResultCode]: SelectionOption } = {
|
||||
OK: {
|
||||
"name": "成功",
|
||||
"value": "OK",
|
||||
},
|
||||
BAD_REQUEST: {
|
||||
"name": "请求错误",
|
||||
"value": "BAD_REQUEST",
|
||||
},
|
||||
NEED_SHARE_CODE: {
|
||||
name: "提取码必填",
|
||||
value: "NEED_SHARE_CODE"
|
||||
},
|
||||
SHARE_CODE_ERROR: {
|
||||
name: "提取码错误",
|
||||
value: "SHARE_CODE_ERROR"
|
||||
},
|
||||
LOGIN: {
|
||||
"name": "未登录",
|
||||
"value": "LOGIN",
|
||||
},
|
||||
NOT_INSTALLED: {
|
||||
"name": "未安装",
|
||||
"value": "NOT_INSTALLED",
|
||||
},
|
||||
SERVER: {
|
||||
"name": "服务器出错",
|
||||
"value": "SERVER",
|
||||
},
|
||||
UNKNOWN: {
|
||||
"name": "未知错误",
|
||||
"value": "UNKNOWN",
|
||||
},
|
||||
}
|
||||
let WebResultCodeMap: { [key in keyof typeof WebResultCode]: SelectionOption } =
|
||||
{
|
||||
OK: {
|
||||
name: '成功',
|
||||
value: 'OK',
|
||||
},
|
||||
BAD_REQUEST: {
|
||||
name: '请求错误',
|
||||
value: 'BAD_REQUEST',
|
||||
},
|
||||
NEED_SHARE_CODE: {
|
||||
name: '提取码必填',
|
||||
value: 'NEED_SHARE_CODE',
|
||||
},
|
||||
SHARE_CODE_ERROR: {
|
||||
name: '提取码错误',
|
||||
value: 'SHARE_CODE_ERROR',
|
||||
},
|
||||
LOGIN: {
|
||||
name: '未登录',
|
||||
value: 'LOGIN',
|
||||
},
|
||||
NOT_INSTALLED: {
|
||||
name: '未安装',
|
||||
value: 'NOT_INSTALLED',
|
||||
},
|
||||
SERVER: {
|
||||
name: '服务器出错',
|
||||
value: 'SERVER',
|
||||
},
|
||||
UNKNOWN: {
|
||||
name: '未知错误',
|
||||
value: 'UNKNOWN',
|
||||
},
|
||||
};
|
||||
|
||||
let WebResultCodeList: SelectionOption[] = []
|
||||
let WebResultCodeList: SelectionOption[] = [];
|
||||
WebResultCodes.forEach((type: WebResultCode, index: number) => {
|
||||
WebResultCodeList.push(WebResultCodeMap[type])
|
||||
})
|
||||
|
||||
|
||||
export {WebResultCode, WebResultCodes, WebResultCodeMap, WebResultCodeList}
|
||||
|
||||
|
||||
|
||||
WebResultCodeList.push(WebResultCodeMap[type]);
|
||||
});
|
||||
|
||||
export { WebResultCode, WebResultCodes, WebResultCodeMap, WebResultCodeList };
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import Filter from "./Filter";
|
||||
|
||||
import Filter from './Filter';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -7,46 +6,42 @@ import Filter from "./Filter";
|
||||
*
|
||||
*/
|
||||
export default class CheckFilter extends Filter {
|
||||
|
||||
//值,最终填写的内容。null表示这个值不设置
|
||||
value: boolean | null = null
|
||||
value: boolean | null = null;
|
||||
|
||||
constructor(name: string, code: string, visible?: boolean) {
|
||||
super(name, code, visible)
|
||||
super(name, code, visible);
|
||||
}
|
||||
|
||||
|
||||
//获取值字符串,[null,true,false] => ["","true","false"]
|
||||
getValueString(): string {
|
||||
let stringValue = ""
|
||||
let stringValue = '';
|
||||
if (this.value === true) {
|
||||
stringValue = "true"
|
||||
stringValue = 'true';
|
||||
} else if (this.value === false) {
|
||||
stringValue = "false"
|
||||
stringValue = 'false';
|
||||
} else {
|
||||
stringValue = ""
|
||||
stringValue = '';
|
||||
}
|
||||
return stringValue
|
||||
return stringValue;
|
||||
}
|
||||
|
||||
//通过一个字符串来设置值
|
||||
putValue(value: any) {
|
||||
|
||||
if (value === "true" || value === true) {
|
||||
this.value = true
|
||||
} else if (value === "false" || value === false) {
|
||||
this.value = false
|
||||
if (value === 'true' || value === true) {
|
||||
this.value = true;
|
||||
} else if (value === 'false' || value === false) {
|
||||
this.value = false;
|
||||
} else {
|
||||
this.value = null
|
||||
this.value = null;
|
||||
}
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.value = null
|
||||
this.value = null;
|
||||
}
|
||||
|
||||
isEmpty(): boolean {
|
||||
return this.value === null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import Filter from "./Filter";
|
||||
import DateUtil from "../../../util/DateUtil";
|
||||
|
||||
import Filter from './Filter';
|
||||
import DateUtil from '../../../util/DateUtil';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -8,47 +7,40 @@ import DateUtil from "../../../util/DateUtil";
|
||||
*
|
||||
*/
|
||||
export default class DateFilter extends Filter {
|
||||
|
||||
//时间筛选的格式
|
||||
format: string
|
||||
format: string;
|
||||
|
||||
//值,最终填写的内容。null表示这个值不设置
|
||||
value: Date | null = null
|
||||
value: Date | null = null;
|
||||
|
||||
constructor(name: string, code: string, format?: string, visible?: boolean) {
|
||||
super(name, code, visible)
|
||||
super(name, code, visible);
|
||||
if (format) {
|
||||
this.format = format
|
||||
this.format = format;
|
||||
} else {
|
||||
this.format = DateUtil.DATE_FORMAT
|
||||
this.format = DateUtil.DATE_FORMAT;
|
||||
}
|
||||
}
|
||||
|
||||
//获取值字符串
|
||||
getValueString(): string {
|
||||
if (this.value) {
|
||||
return DateUtil.format(this.value, this.format)
|
||||
return DateUtil.format(this.value, this.format);
|
||||
} else {
|
||||
return ""
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//通过一个字符串来设置值
|
||||
putValue(value: string) {
|
||||
|
||||
this.value = DateUtil.parse(value)
|
||||
this.value = DateUtil.parse(value);
|
||||
}
|
||||
|
||||
|
||||
reset() {
|
||||
this.value = null
|
||||
this.value = null;
|
||||
}
|
||||
|
||||
isEmpty(): boolean {
|
||||
return this.value === null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import Filter from "./Filter";
|
||||
import DateUtil from "../../../util/DateUtil";
|
||||
|
||||
import Filter from './Filter';
|
||||
import DateUtil from '../../../util/DateUtil';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -8,47 +7,40 @@ import DateUtil from "../../../util/DateUtil";
|
||||
*
|
||||
*/
|
||||
export default class DateTimeFilter extends Filter {
|
||||
|
||||
//时间筛选的格式
|
||||
format: string
|
||||
format: string;
|
||||
|
||||
//值,最终填写的内容。null表示这个值不设置
|
||||
value: Date | null = null
|
||||
value: Date | null = null;
|
||||
|
||||
constructor(name: string, code: string, format?: string, visible?: boolean) {
|
||||
super(name, code, visible)
|
||||
super(name, code, visible);
|
||||
if (format) {
|
||||
this.format = format
|
||||
this.format = format;
|
||||
} else {
|
||||
this.format = DateUtil.DEFAULT_FORMAT
|
||||
this.format = DateUtil.DEFAULT_FORMAT;
|
||||
}
|
||||
}
|
||||
|
||||
//获取值字符串
|
||||
getValueString(): string {
|
||||
if (this.value) {
|
||||
return DateUtil.format(this.value, this.format)
|
||||
return DateUtil.format(this.value, this.format);
|
||||
} else {
|
||||
return ""
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//通过一个字符串来设置值
|
||||
putValue(value: string) {
|
||||
|
||||
this.value = DateUtil.parse(value)
|
||||
this.value = DateUtil.parse(value);
|
||||
}
|
||||
|
||||
|
||||
reset() {
|
||||
this.value = null
|
||||
this.value = null;
|
||||
}
|
||||
|
||||
isEmpty(): boolean {
|
||||
return this.value === null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,23 +2,22 @@
|
||||
* 这个是列表筛选器的基类。
|
||||
*/
|
||||
export default class Filter {
|
||||
|
||||
//中文名
|
||||
name: string
|
||||
name: string;
|
||||
//提交时候的键值,英文
|
||||
key: string
|
||||
key: string;
|
||||
//是否可见
|
||||
visible: boolean = true
|
||||
visible: boolean = true;
|
||||
|
||||
constructor(name: string, key: string, visible?: boolean) {
|
||||
this.name = name
|
||||
this.key = key
|
||||
this.name = name;
|
||||
this.key = key;
|
||||
|
||||
//没有传默认为true.
|
||||
if (visible === undefined) {
|
||||
this.visible = true
|
||||
this.visible = true;
|
||||
} else {
|
||||
this.visible = visible
|
||||
this.visible = visible;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,30 +25,37 @@ export default class Filter {
|
||||
* 获取到一个字符串的值
|
||||
*/
|
||||
getValueString(): string {
|
||||
console.error(`${this.constructor.name} 的 getValue 不存在,请开发者及时配置。`)
|
||||
return ""
|
||||
console.error(
|
||||
`${this.constructor.name} 的 getValue 不存在,请开发者及时配置。`
|
||||
);
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* 把一个字符串放置到value中去,因为有可能从请求参数中回填值
|
||||
*/
|
||||
putValue(value: string) {
|
||||
console.error(`${this.constructor.name} 的 putValue 不存在,请开发者及时配置。`)
|
||||
console.error(
|
||||
`${this.constructor.name} 的 putValue 不存在,请开发者及时配置。`
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将过滤器的值清空
|
||||
*/
|
||||
reset() {
|
||||
console.error(`${this.constructor.name} 的 reset 不存在,请开发者及时配置。`)
|
||||
console.error(
|
||||
`${this.constructor.name} 的 reset 不存在,请开发者及时配置。`
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前过滤器是否为空
|
||||
*/
|
||||
isEmpty():boolean {
|
||||
console.error(`${this.constructor.name} 的 isEmpty 不存在,请开发者及时配置。`)
|
||||
return false
|
||||
isEmpty(): boolean {
|
||||
console.error(
|
||||
`${this.constructor.name} 的 isEmpty 不存在,请开发者及时配置。`
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import SelectionFilter from "./SelectionFilter";
|
||||
import SelectionFilterType from "./SelectionFilterType";
|
||||
|
||||
import SelectionFilter from './SelectionFilter';
|
||||
import SelectionFilterType from './SelectionFilterType';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -8,25 +7,29 @@ import SelectionFilterType from "./SelectionFilterType";
|
||||
*
|
||||
*/
|
||||
export default class HttpSelectionFilter extends SelectionFilter {
|
||||
|
||||
//远程的访问链接。
|
||||
url: string
|
||||
url: string;
|
||||
|
||||
constructor(name: string, code: string, url: string, selectionType?: SelectionFilterType, visible?: boolean) {
|
||||
super(name, code, [], selectionType, visible)
|
||||
this.url = url
|
||||
constructor(
|
||||
name: string,
|
||||
code: string,
|
||||
url: string,
|
||||
selectionType?: SelectionFilterType,
|
||||
visible?: boolean
|
||||
) {
|
||||
super(name, code, [], selectionType, visible);
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
//通过一个字符串来设置值
|
||||
//远程调用的值必须要宽容,因为值可能还没有从远程取回来呢。
|
||||
putValue(value: string) {
|
||||
this.value = value
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
//严格的回填,采用父类的策略
|
||||
//这个方法会在http请求完成了之后调用。HttpSelectionFilter中会调用
|
||||
strictPutValue(value: string) {
|
||||
super.putValue(value)
|
||||
super.putValue(value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,47 +1,46 @@
|
||||
import Filter from "./Filter";
|
||||
import Filter from './Filter';
|
||||
|
||||
/**
|
||||
* 文本输入框筛选器
|
||||
* 这种一般是模糊搜索。
|
||||
*/
|
||||
export default class InputFilter extends Filter {
|
||||
|
||||
//值,最终填写的内容
|
||||
value: string = ""
|
||||
value: string = '';
|
||||
|
||||
//占位符
|
||||
placeholder: string
|
||||
placeholder: string;
|
||||
|
||||
constructor(name: string, code: string, placeholder?: string | null, visible?: boolean) {
|
||||
super(name, code, visible)
|
||||
constructor(
|
||||
name: string,
|
||||
code: string,
|
||||
placeholder?: string | null,
|
||||
visible?: boolean
|
||||
) {
|
||||
super(name, code, visible);
|
||||
|
||||
if (placeholder) {
|
||||
this.placeholder = placeholder
|
||||
this.placeholder = placeholder;
|
||||
} else {
|
||||
this.placeholder = name
|
||||
this.placeholder = name;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//获取值字符串
|
||||
getValueString(): string {
|
||||
return this.value
|
||||
return this.value;
|
||||
}
|
||||
|
||||
//通过一个字符串来设置值
|
||||
putValue(value: string) {
|
||||
|
||||
this.value = value
|
||||
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
|
||||
reset() {
|
||||
this.value = ""
|
||||
this.value = '';
|
||||
}
|
||||
|
||||
isEmpty(): boolean {
|
||||
return this.value === "";
|
||||
return this.value === '';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import Filter from "./Filter";
|
||||
import SelectionOption from "../option/SelectionOption";
|
||||
import SelectionFilterType from "./SelectionFilterType";
|
||||
|
||||
import Filter from './Filter';
|
||||
import SelectionOption from '../option/SelectionOption';
|
||||
import SelectionFilterType from './SelectionFilterType';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -9,60 +8,60 @@ import SelectionFilterType from "./SelectionFilterType";
|
||||
*
|
||||
*/
|
||||
export default class SelectionFilter extends Filter {
|
||||
|
||||
//候选项,要求必须有name和value。
|
||||
options: SelectionOption[]
|
||||
options: SelectionOption[];
|
||||
|
||||
//值,最终填写的内容。null表示这个值不设置
|
||||
value: string = ""
|
||||
value: string = '';
|
||||
|
||||
//采用的样式
|
||||
selectionType: SelectionFilterType
|
||||
selectionType: SelectionFilterType;
|
||||
|
||||
constructor(name: string, code: string, options: SelectionOption[],selectionType?: SelectionFilterType, visible?: boolean) {
|
||||
super(name, code, visible)
|
||||
constructor(
|
||||
name: string,
|
||||
code: string,
|
||||
options: SelectionOption[],
|
||||
selectionType?: SelectionFilterType,
|
||||
visible?: boolean
|
||||
) {
|
||||
super(name, code, visible);
|
||||
|
||||
this.options = options
|
||||
this.options = options;
|
||||
if (selectionType === undefined) {
|
||||
this.selectionType = SelectionFilterType.COMBOBOX
|
||||
this.selectionType = SelectionFilterType.COMBOBOX;
|
||||
} else {
|
||||
this.selectionType = selectionType
|
||||
this.selectionType = selectionType;
|
||||
}
|
||||
}
|
||||
|
||||
//获取值字符串
|
||||
getValueString(): string {
|
||||
return this.value
|
||||
return this.value;
|
||||
}
|
||||
|
||||
//通过一个字符串来设置值
|
||||
putValue(value: string) {
|
||||
|
||||
if (value === "") {
|
||||
this.value = ""
|
||||
if (value === '') {
|
||||
this.value = '';
|
||||
} else {
|
||||
|
||||
//必须是options中的值才接纳。
|
||||
for (let j = 0; j < this.options.length; j++) {
|
||||
let opt = this.options[j]
|
||||
let opt = this.options[j];
|
||||
if (opt.value === value) {
|
||||
this.value = value
|
||||
return
|
||||
this.value = value;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.value = ""
|
||||
this.value = '';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
reset() {
|
||||
this.value = ""
|
||||
this.value = '';
|
||||
}
|
||||
|
||||
isEmpty(): boolean {
|
||||
return this.value === "";
|
||||
return this.value === '';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
*/
|
||||
enum SelectionFilterType {
|
||||
//下拉框的样式
|
||||
COMBOBOX = "COMBOBOX",
|
||||
COMBOBOX = 'COMBOBOX',
|
||||
//按钮的样式
|
||||
BUTTON = "BUTTON",
|
||||
BUTTON = 'BUTTON',
|
||||
}
|
||||
|
||||
export default SelectionFilterType
|
||||
export default SelectionFilterType;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import Filter from "./Filter";
|
||||
import SortDirection from "../SortDirection";
|
||||
|
||||
import Filter from './Filter';
|
||||
import SortDirection from '../SortDirection';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -8,62 +7,62 @@ import SortDirection from "../SortDirection";
|
||||
*
|
||||
*/
|
||||
export default class SortFilter extends Filter {
|
||||
|
||||
//值,最终填写的内容。null表示这个值不设置
|
||||
value: SortDirection | null = null
|
||||
value: SortDirection | null = null;
|
||||
|
||||
constructor(name: string, code: string, visible?: boolean) {
|
||||
super(name, code, visible)
|
||||
super(name, code, visible);
|
||||
//过滤排序器,more是不显示的。
|
||||
//没有传默认为true.
|
||||
if (visible === undefined) {
|
||||
this.visible = false
|
||||
this.visible = false;
|
||||
} else {
|
||||
this.visible = visible
|
||||
this.visible = visible;
|
||||
}
|
||||
}
|
||||
|
||||
//获取值字符串,[null,true,false] => ["","true","false"]
|
||||
getValueString(): string {
|
||||
if (this.value) {
|
||||
return this.value
|
||||
return this.value;
|
||||
} else {
|
||||
return ""
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
//通过一个字符串来设置值
|
||||
putValue(value: string) {
|
||||
if (value === SortDirection.DESC || value === SortDirection.DESCEND) {
|
||||
this.value = SortDirection.DESC
|
||||
this.value = SortDirection.DESC;
|
||||
} else if (value === SortDirection.ASC || value === SortDirection.ASCEND) {
|
||||
this.value = SortDirection.ASC
|
||||
this.value = SortDirection.ASC;
|
||||
} else {
|
||||
this.value = null
|
||||
this.value = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//获取到antd需要使用的值 TODO: SortOrder
|
||||
getAntdValue(): any | null {
|
||||
if (this.value === SortDirection.DESC || this.value === SortDirection.DESCEND) {
|
||||
return SortDirection.DESCEND
|
||||
} else if (this.value === SortDirection.ASC || this.value === SortDirection.ASCEND) {
|
||||
return SortDirection.ASCEND
|
||||
if (
|
||||
this.value === SortDirection.DESC ||
|
||||
this.value === SortDirection.DESCEND
|
||||
) {
|
||||
return SortDirection.DESCEND;
|
||||
} else if (
|
||||
this.value === SortDirection.ASC ||
|
||||
this.value === SortDirection.ASCEND
|
||||
) {
|
||||
return SortDirection.ASCEND;
|
||||
} else {
|
||||
return null
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
reset() {
|
||||
this.value = null
|
||||
this.value = null;
|
||||
}
|
||||
|
||||
|
||||
isEmpty(): boolean {
|
||||
return this.value === null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
* 面包屑对应的模型
|
||||
*/
|
||||
export default interface BreadcrumbModel {
|
||||
name: string,
|
||||
path: string,
|
||||
query: any,
|
||||
displayDirect: boolean,
|
||||
name: string;
|
||||
path: string;
|
||||
query: any;
|
||||
displayDirect: boolean;
|
||||
onClick?: () => void;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/**
|
||||
* 带有Code的一个selection
|
||||
*/
|
||||
import SelectionOption from "./SelectionOption";
|
||||
import SelectionOption from './SelectionOption';
|
||||
|
||||
export default interface CodeSelectionOption extends SelectionOption {
|
||||
code: string,
|
||||
type: string,
|
||||
code: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
enum Color {
|
||||
PRIMARY = "#215891",
|
||||
INFO = "#2DB7F5",
|
||||
SUCCESS = "#67C23A",
|
||||
WARNING = "#E6A23C",
|
||||
DANGER = "#FF756F",
|
||||
PRIMARY = '#215891',
|
||||
INFO = '#2DB7F5',
|
||||
SUCCESS = '#67C23A',
|
||||
WARNING = '#E6A23C',
|
||||
DANGER = '#FF756F',
|
||||
}
|
||||
|
||||
export default Color
|
||||
export default Color;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/**
|
||||
* 下拉筛选框的选项,统一使用该接口,同时这个作为枚举的复杂类型。
|
||||
*/
|
||||
import SelectionOption from "./SelectionOption";
|
||||
import SelectionOption from './SelectionOption';
|
||||
|
||||
export default interface ColorSelectionOption extends SelectionOption {
|
||||
index: number,
|
||||
color: string,
|
||||
index: number;
|
||||
color: string;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* 下拉筛选框的选项,统一使用该接口,同时这个作为枚举的复杂类型。
|
||||
*/
|
||||
import SelectionOption from "./SelectionOption";
|
||||
import SelectionOption from './SelectionOption';
|
||||
|
||||
export default interface ColorSelectionOption extends SelectionOption {
|
||||
color: string,
|
||||
color: string;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
/**
|
||||
* 包含图标和 index序列的选项,在ProteinSqlPendant中有用到
|
||||
*/
|
||||
import SelectionOption from "./SelectionOption";
|
||||
import SelectionOption from './SelectionOption';
|
||||
|
||||
export default interface IconIndexSelectionOption extends SelectionOption {
|
||||
index: number,
|
||||
icon: string,
|
||||
index: number;
|
||||
icon: string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* 下拉筛选框的选项,统一使用该接口,同时这个作为枚举的复杂类型。
|
||||
*/
|
||||
import SelectionOption from "./SelectionOption";
|
||||
import SelectionOption from './SelectionOption';
|
||||
|
||||
export default interface IndexSelectionOption extends SelectionOption {
|
||||
index: number,
|
||||
name: string,
|
||||
value: string
|
||||
index: number;
|
||||
name: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
* 下拉筛选框的选项,统一使用该接口,同时这个作为枚举的复杂类型。
|
||||
*/
|
||||
export default interface SelectionOption {
|
||||
name: string,
|
||||
value: string
|
||||
name: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* 下拉筛选框的选项,统一使用该接口,同时这个作为枚举的复杂类型。
|
||||
*/
|
||||
import SelectionOption from "./SelectionOption";
|
||||
import SelectionOption from './SelectionOption';
|
||||
|
||||
export default interface StyleSelectionOption extends SelectionOption {
|
||||
style: string,
|
||||
style: string;
|
||||
}
|
||||
|
||||
@@ -3,55 +3,49 @@
|
||||
*/
|
||||
export interface IconActionItem {
|
||||
//图片的资源链接(优先级高于iconType)
|
||||
icon?: string
|
||||
icon?: string;
|
||||
//antd的图标类型
|
||||
iconType?: string
|
||||
iconType?: string;
|
||||
//名称
|
||||
name?: string
|
||||
name?: string;
|
||||
//是否可见。默认可见
|
||||
visible?: boolean
|
||||
visible?: boolean;
|
||||
//点击图标后的行为
|
||||
onClick?: () => void
|
||||
onClick?: () => void;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 工具箱的条目,图标采用antd的图标。
|
||||
* 图标不带有高亮样式
|
||||
*/
|
||||
export interface ToolItem {
|
||||
|
||||
name: string
|
||||
name: string;
|
||||
|
||||
//当前是否处于展开状态
|
||||
active: boolean
|
||||
active: boolean;
|
||||
|
||||
//antd的图标样式
|
||||
iconType: string
|
||||
|
||||
iconType: string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 该接口可以像文件树一样展示。
|
||||
* 同时图标带有高亮样式
|
||||
*/
|
||||
export interface SkeletonItem {
|
||||
|
||||
name: string
|
||||
name: string;
|
||||
|
||||
//当前是否处于展开状态
|
||||
active: boolean
|
||||
active: boolean;
|
||||
|
||||
//高亮的图标 资源链接
|
||||
activeIcon: string
|
||||
activeIcon: string;
|
||||
|
||||
//一般状态的图标 资源链接
|
||||
icon: string
|
||||
|
||||
icon: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求的Map,键值对
|
||||
*/
|
||||
export type RequestParamMap = { [key: string]: string }
|
||||
export type RequestParamMap = { [key: string]: string };
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
import SafeUtil from '../../util/SafeUtil';
|
||||
import BaseEntity from '../base/BaseEntity';
|
||||
import Filter from "../base/filter/Filter";
|
||||
import SortFilter from "../base/filter/SortFilter";
|
||||
import StringUtil from "../../util/StringUtil";
|
||||
|
||||
import Filter from '../base/filter/Filter';
|
||||
import SortFilter from '../base/filter/SortFilter';
|
||||
|
||||
export default class Dashboard extends BaseEntity {
|
||||
|
||||
static URL_ACTIVE_IP_TOP10 = "/api/dashboard/active/ip/top10"
|
||||
static URL_ETL = "/api/dashboard/etl"
|
||||
static URL_ACTIVE_IP_TOP10 = '/api/dashboard/active/ip/top10';
|
||||
static URL_ETL = '/api/dashboard/etl';
|
||||
|
||||
invokeNum: number = 0;
|
||||
totalInvokeNum: number = 0;
|
||||
@@ -19,53 +16,51 @@ export default class Dashboard extends BaseEntity {
|
||||
fileSize: number = 0;
|
||||
totalFileSize: number = 0;
|
||||
avgCost: number = 0;
|
||||
dt: string = "";
|
||||
|
||||
dt: string = '';
|
||||
|
||||
constructor(reactComponent?: React.Component) {
|
||||
|
||||
super(reactComponent);
|
||||
|
||||
}
|
||||
|
||||
assign(obj: any) {
|
||||
super.assign(obj);
|
||||
|
||||
}
|
||||
|
||||
getTAG(): string {
|
||||
return "dashboard";
|
||||
return 'dashboard';
|
||||
}
|
||||
|
||||
getFilters(): Filter[] {
|
||||
return [
|
||||
...super.getFilters(),
|
||||
new SortFilter("按DT排序", "orderDt"),
|
||||
|
||||
]
|
||||
return [...super.getFilters(), new SortFilter('按DT排序', 'orderDt')];
|
||||
}
|
||||
|
||||
httpActiveIpTop10(successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
let that = this
|
||||
this.httpPost(Dashboard.URL_ACTIVE_IP_TOP10, {}, function (response: any) {
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response.data.data);
|
||||
|
||||
}, errorCallback, finalCallback)
|
||||
httpActiveIpTop10(
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
this.httpPost(
|
||||
Dashboard.URL_ACTIVE_IP_TOP10,
|
||||
{},
|
||||
function (response: any) {
|
||||
SafeUtil.safeCallback(successCallback)(response.data.data);
|
||||
},
|
||||
errorCallback,
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
httpEtl(successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
let that = this
|
||||
this.httpPost(Dashboard.URL_ETL, {}, function (response: any) {
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response.data.data);
|
||||
|
||||
}, errorCallback, finalCallback)
|
||||
let that = this;
|
||||
this.httpPost(
|
||||
Dashboard.URL_ETL,
|
||||
{},
|
||||
function (response: any) {
|
||||
SafeUtil.safeCallback(successCallback)(response.data.data);
|
||||
},
|
||||
errorCallback,
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import BaseEntity from "../../base/BaseEntity";
|
||||
import DateUtil from "../../../util/DateUtil";
|
||||
import SafeUtil from "../../../util/SafeUtil";
|
||||
import BaseEntity from '../../base/BaseEntity';
|
||||
import DateUtil from '../../../util/DateUtil';
|
||||
import SafeUtil from '../../../util/SafeUtil';
|
||||
|
||||
export default class DownloadToken extends BaseEntity {
|
||||
userUuid: string | null = null;
|
||||
@@ -8,20 +8,19 @@ export default class DownloadToken extends BaseEntity {
|
||||
expireTime: string | null = null;
|
||||
ip: string | null = null;
|
||||
|
||||
static URL_FETCH_DOWNLOAD_TOKEN = "/api/alien/fetch/download/token";
|
||||
static URL_FETCH_DOWNLOAD_TOKEN = '/api/alien/fetch/download/token';
|
||||
|
||||
constructor(reactComponent?: React.Component) {
|
||||
super(reactComponent);
|
||||
}
|
||||
|
||||
|
||||
getTAG(): string {
|
||||
return "downloadToken";
|
||||
return 'downloadToken';
|
||||
}
|
||||
|
||||
assign(obj: any) {
|
||||
super.assign(obj);
|
||||
this.assignEntity("expireTime", Date);
|
||||
this.assignEntity('expireTime', Date);
|
||||
}
|
||||
|
||||
getFilters() {
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
/**
|
||||
* 全局性的国际化
|
||||
*/
|
||||
import BrowserUtil from "../../util/BrowserUtil";
|
||||
import LangEn from "./i18n/LangEn";
|
||||
import LangZh from "./i18n/LangZh";
|
||||
|
||||
import BrowserUtil from '../../util/BrowserUtil';
|
||||
import LangEn from './i18n/LangEn';
|
||||
import LangZh from './i18n/LangZh';
|
||||
|
||||
export default class Lang {
|
||||
|
||||
//当前使用的语言,默认中文
|
||||
lang: string = "zh"
|
||||
lang: string = 'zh';
|
||||
|
||||
//全局的一个store对象
|
||||
private static singleton: Lang | null = null
|
||||
private static singleton: Lang | null = null;
|
||||
|
||||
//使用懒加载模式。
|
||||
static getSingleton(): Lang {
|
||||
@@ -20,54 +18,51 @@ export default class Lang {
|
||||
Lang.singleton = new Lang();
|
||||
|
||||
//读取默认的语言
|
||||
let lang = BrowserUtil.browserLang()
|
||||
let localLang = localStorage.getItem("_lang");
|
||||
if (localLang === "zh" || localLang === "en") {
|
||||
lang = localLang
|
||||
let lang = BrowserUtil.browserLang();
|
||||
let localLang = localStorage.getItem('_lang');
|
||||
if (localLang === 'zh' || localLang === 'en') {
|
||||
lang = localLang;
|
||||
}
|
||||
Lang.singleton.lang = lang
|
||||
console.info("current lang: ", lang)
|
||||
|
||||
Lang.singleton.lang = lang;
|
||||
console.info('current lang: ', lang);
|
||||
}
|
||||
|
||||
return Lang.singleton
|
||||
return Lang.singleton;
|
||||
}
|
||||
|
||||
//快捷获取一种语言对应的文字。
|
||||
static t(key: string, ...params: any[]): string {
|
||||
let json: { [key: string]: any } = LangEn;
|
||||
|
||||
let json: { [key: string]: any } = LangEn
|
||||
|
||||
let lang = Lang.getSingleton().lang
|
||||
if (lang == "zh") {
|
||||
json = LangZh
|
||||
let lang = Lang.getSingleton().lang;
|
||||
if (lang == 'zh') {
|
||||
json = LangZh;
|
||||
}
|
||||
|
||||
let keyParts: string[] = key.split(".")
|
||||
let jsonBody: any = json
|
||||
let keyParts: string[] = key.split('.');
|
||||
let jsonBody: any = json;
|
||||
for (let i = 0; i < keyParts.length; i++) {
|
||||
let part: string = keyParts[i]
|
||||
jsonBody = jsonBody[part]
|
||||
let part: string = keyParts[i];
|
||||
jsonBody = jsonBody[part];
|
||||
if (jsonBody === undefined || jsonBody === null) {
|
||||
//找不到key对应的内容,直接返回key
|
||||
return key
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
||||
//到这里已经找到了
|
||||
if (typeof jsonBody !== "string") {
|
||||
return key
|
||||
if (typeof jsonBody !== 'string') {
|
||||
return key;
|
||||
}
|
||||
|
||||
//依次将参数写入进去。
|
||||
if (params && params.length > 0) {
|
||||
for (let i = 0; i < params.length; i++) {
|
||||
let param = params[i]
|
||||
jsonBody = jsonBody.replace("{}", param)
|
||||
let param = params[i];
|
||||
jsonBody = jsonBody.replace('{}', param);
|
||||
}
|
||||
}
|
||||
|
||||
return jsonBody
|
||||
return jsonBody;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,30 +3,29 @@
|
||||
* 这个类只包含Base的子类,比如User, Preference.
|
||||
* 和Sun形成姊妹篇
|
||||
*/
|
||||
import User from "../user/User";
|
||||
import Preference from "../preference/Preference";
|
||||
import Matter from "../matter/Matter";
|
||||
|
||||
import User from '../user/User';
|
||||
import Preference from '../preference/Preference';
|
||||
import Matter from '../matter/Matter';
|
||||
|
||||
export default class Moon {
|
||||
|
||||
//全局具有唯一的用户,即当前登录的用户.
|
||||
user: User = new User()
|
||||
user: User = new User();
|
||||
|
||||
//全局唯一的偏好设置
|
||||
preference: Preference = new Preference()
|
||||
preference: Preference = new Preference();
|
||||
|
||||
//全局的上传文件对象,key是space的uuid
|
||||
uploadMattersMap: Record<string, Matter[]> = {};
|
||||
|
||||
//全局的一个store对象
|
||||
private static singleton: Moon | null = null
|
||||
private static singleton: Moon | null = null;
|
||||
|
||||
//使用懒加载模式。
|
||||
static getSingleton(): Moon {
|
||||
if (Moon.singleton == null) {
|
||||
Moon.singleton = new Moon();
|
||||
|
||||
}
|
||||
|
||||
return Moon.singleton
|
||||
return Moon.singleton;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
export default class Sun {
|
||||
|
||||
//全局的一个store对象
|
||||
static singleton: Sun | null = null;
|
||||
|
||||
@@ -19,25 +18,21 @@ export default class Sun {
|
||||
showDrawer: boolean = false;
|
||||
|
||||
//全局mobile标识
|
||||
isMobile: boolean = /Mobile|iP(hone|od|ad)|iOS|Android|BlackBerry/i.test(window.navigator.userAgent);
|
||||
|
||||
|
||||
isMobile: boolean = /Mobile|iP(hone|od|ad)|iOS|Android|BlackBerry/i.test(
|
||||
window.navigator.userAgent
|
||||
);
|
||||
|
||||
//由于这个类采用单例模式,因此所有属性都是独一份的。
|
||||
constructor() {
|
||||
|
||||
}
|
||||
constructor() {}
|
||||
|
||||
//使用懒加载模式。
|
||||
static getSingleton(): Sun {
|
||||
if (Sun.singleton == null) {
|
||||
Sun.singleton = new Sun();
|
||||
|
||||
}
|
||||
return Sun.singleton
|
||||
return Sun.singleton;
|
||||
}
|
||||
|
||||
|
||||
//*******************和路由相关的方法 开始 *******************//
|
||||
|
||||
/**
|
||||
@@ -45,9 +40,9 @@ export default class Sun {
|
||||
*/
|
||||
static navigateTo(path: any) {
|
||||
if (Sun.getSingleton().reactRouter) {
|
||||
Sun.getSingleton().reactRouter.push(path)
|
||||
Sun.getSingleton().reactRouter.push(path);
|
||||
} else {
|
||||
console.error("全局的 reactRouter 未定义,请检查代码!")
|
||||
console.error('全局的 reactRouter 未定义,请检查代码!');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,9 +64,9 @@ export default class Sun {
|
||||
*/
|
||||
static navigateBack() {
|
||||
if (Sun.getSingleton().reactRouter) {
|
||||
Sun.getSingleton().reactRouter.go(-1)
|
||||
Sun.getSingleton().reactRouter.go(-1);
|
||||
} else {
|
||||
console.error("全局的 reactRouter 未定义,请检查代码!")
|
||||
console.error('全局的 reactRouter 未定义,请检查代码!');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,9 +78,9 @@ export default class Sun {
|
||||
*/
|
||||
static updateFrame() {
|
||||
if (Sun.getSingleton().frameComponent) {
|
||||
Sun.getSingleton().frameComponent.updateUI()
|
||||
Sun.getSingleton().frameComponent.updateUI();
|
||||
} else {
|
||||
console.error("全局的 frameComponent 未定义,请检查代码!")
|
||||
console.error('全局的 frameComponent 未定义,请检查代码!');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
let LangEn = {
|
||||
eyeblueTank: "EyeblueTank",
|
||||
eyeblueTank: 'EyeblueTank',
|
||||
dashboard: {
|
||||
totalInvokeNum: 'Total PV',
|
||||
weekRate: 'Week',
|
||||
@@ -21,355 +21,395 @@ let LangEn = {
|
||||
reRun: 'ReRun',
|
||||
},
|
||||
install: {
|
||||
configMysql: "Config Database",
|
||||
dbType: "Database Type",
|
||||
port: "Port",
|
||||
schema: "Schema",
|
||||
username: "Username",
|
||||
password: "Password",
|
||||
charset: "Charset",
|
||||
mysqlConnectionPass: "Connect MySQL Ok",
|
||||
testMysqlConnection: "Tes MySQL Connection",
|
||||
notice: "Notice",
|
||||
sqliteNotice1: "Sqlite is a tiny file database, you can use it without installation",
|
||||
mysqlNotice1: "If Mysql and EyeblueTank installed on the same server, Host is 127.0.0.1",
|
||||
mysqlNotice2: "Your mysql account must have access to create table, or the second step will fail.",
|
||||
validateMysqlFirst: "Please test the mysql connection firstly.",
|
||||
preStep: "Pre Step",
|
||||
nextStep: "Next Step",
|
||||
createTable: "Craete Tables",
|
||||
installed: "Installed",
|
||||
installedButMissing: "Installed, but missing fields",
|
||||
toBeInstalled: "To be installed",
|
||||
allFields: "All fields",
|
||||
missingFields: "Missing fields",
|
||||
configMysql: 'Config Database',
|
||||
dbType: 'Database Type',
|
||||
port: 'Port',
|
||||
schema: 'Schema',
|
||||
username: 'Username',
|
||||
password: 'Password',
|
||||
charset: 'Charset',
|
||||
mysqlConnectionPass: 'Connect MySQL Ok',
|
||||
testMysqlConnection: 'Tes MySQL Connection',
|
||||
notice: 'Notice',
|
||||
sqliteNotice1: 'Sqlite is a tiny file database, you can use it without installation',
|
||||
mysqlNotice1: 'If Mysql and EyeblueTank installed on the same server, Host is 127.0.0.1',
|
||||
mysqlNotice2: 'Your mysql account must have access to create table, or the second step will fail.',
|
||||
validateMysqlFirst: 'Please test the mysql connection firstly.',
|
||||
preStep: 'Pre Step',
|
||||
nextStep: 'Next Step',
|
||||
createTable: 'Craete Tables',
|
||||
installed: 'Installed',
|
||||
installedButMissing: 'Installed, but missing fields',
|
||||
toBeInstalled: 'To be installed',
|
||||
allFields: 'All fields',
|
||||
missingFields: 'Missing fields',
|
||||
tableNotice: "'Create Tables' will trigger the following actions:",
|
||||
tableNotice1: "If a table not exist, create it.",
|
||||
tableNotice2: "If a table exist and no fields missing, nothing will do on this table.",
|
||||
tableNotice3: "If a table exist but some fields is missing, it will add the missing fields.",
|
||||
tableNotice4: "If a table exist and some fields not necessary, nothing will do on this table.",
|
||||
oneKeyCreate: "Create Tables",
|
||||
createFinish: "Finish Creating Tables",
|
||||
createTableSuccess: "Create tables successfully",
|
||||
tableNotice1: 'If a table not exist, create it.',
|
||||
tableNotice2: 'If a table exist and no fields missing, nothing will do on this table.',
|
||||
tableNotice3: 'If a table exist but some fields is missing, it will add the missing fields.',
|
||||
tableNotice4: 'If a table exist and some fields not necessary, nothing will do on this table.',
|
||||
oneKeyCreate: 'Create Tables',
|
||||
createFinish: 'Finish Creating Tables',
|
||||
createTableSuccess: 'Create tables successfully',
|
||||
crateTableFirst: "Please click 'Create Tables'",
|
||||
setAdministrator: "Config Administrator",
|
||||
detectAdministrator: "Detect the following administrators:",
|
||||
useOrCreateAdministrator: "You can validate one of them, or you can create a new one.",
|
||||
validateAdministrator: "Validate administrator",
|
||||
createAdministrator: "Create administrator",
|
||||
administratorUsername: "username",
|
||||
administratorPassword: "password",
|
||||
administratorRePassword: "Enter administrator password again",
|
||||
usernameRule: "EyeblueTank will use username as directory name, so only lowercase letter and number and _ is permitted.",
|
||||
congratulationInstall: "Congratulations, install successfully!",
|
||||
configAdminFirst: "Please config administrator first.",
|
||||
createAdminSuccess: "Create administrator successfully!",
|
||||
validateAdminSuccess: "Validate administrator successfully!",
|
||||
pressToHome: "Click the button below to enter home。",
|
||||
enterHome: "Finish And Enter Home",
|
||||
finish: "Finish",
|
||||
setAdministrator: 'Config Administrator',
|
||||
detectAdministrator: 'Detect the following administrators:',
|
||||
useOrCreateAdministrator: 'You can validate one of them, or you can create a new one.',
|
||||
validateAdministrator: 'Validate administrator',
|
||||
createAdministrator: 'Create administrator',
|
||||
administratorUsername: 'username',
|
||||
administratorPassword: 'password',
|
||||
administratorRePassword: 'Enter administrator password again',
|
||||
usernameRule: 'EyeblueTank will use username as directory name, so only lowercase letter and number and _ is permitted.',
|
||||
congratulationInstall: 'Congratulations, install successfully!',
|
||||
configAdminFirst: 'Please config administrator first.',
|
||||
createAdminSuccess: 'Create administrator successfully!',
|
||||
validateAdminSuccess: 'Validate administrator successfully!',
|
||||
pressToHome: 'Click the button below to enter home。',
|
||||
enterHome: 'Finish And Enter Home',
|
||||
finish: 'Finish',
|
||||
},
|
||||
layout: {
|
||||
allFiles: "Files",
|
||||
myShare: "My Share",
|
||||
bin: "Recycle bin",
|
||||
setting: "Setting",
|
||||
dashboard: "Dashboard",
|
||||
users: "Users",
|
||||
logout: "Logout",
|
||||
about: "About",
|
||||
install: "Install",
|
||||
dragMouseUp: "Put file here~"
|
||||
allFiles: 'Files',
|
||||
myShare: 'My share',
|
||||
bin: 'Recycle bin',
|
||||
setting: 'Setting',
|
||||
dashboard: 'Dashboard',
|
||||
users: 'Users',
|
||||
logout: 'Logout',
|
||||
about: 'About',
|
||||
install: 'Install',
|
||||
dragMouseUp: 'Put file here~',
|
||||
space: 'Shared space',
|
||||
},
|
||||
matter: {
|
||||
file: "File",
|
||||
directory: "Directory",
|
||||
rename: "Rename",
|
||||
download: "Download",
|
||||
delete: "Delete",
|
||||
hardDelete: "Hard delete",
|
||||
recovery: "Recovery",
|
||||
more: "More",
|
||||
share: "Share",
|
||||
close: "Close",
|
||||
size: "Size",
|
||||
preview: "Preview",
|
||||
move: "Move",
|
||||
moveTo: "MoveTo",
|
||||
upload: "Upload",
|
||||
create: "Create",
|
||||
createTime: "Create Time",
|
||||
updateTime: "Update Time",
|
||||
deleteTime: "Deleted Time",
|
||||
root: "Root",
|
||||
fillInPicLink: "Fill in Picture Link",
|
||||
rePick: "Re Choose",
|
||||
chooseImage: "Choose Image",
|
||||
uploadMode: "Upload Mode",
|
||||
fillMode: "Fill Mode",
|
||||
sizeExceedLimit: "File size exceed limit {}>{}",
|
||||
dropNotDirectory: "Cannot drag and drop folders for uploading",
|
||||
setPublic: "Set as public",
|
||||
setPrivate: "Set as private",
|
||||
copyLink: "Copy Link",
|
||||
enterName: "Please enter name",
|
||||
publicFileEveryoneCanVisit: "Public file, anyone can access",
|
||||
fileDetail: "File info",
|
||||
expire: "Expire",
|
||||
copyLinkAndCode: "Copy link and code",
|
||||
uploaded: "Uploaded",
|
||||
file: 'File',
|
||||
directory: 'Directory',
|
||||
rename: 'Rename',
|
||||
download: 'Download',
|
||||
delete: 'Delete',
|
||||
hardDelete: 'Hard delete',
|
||||
recovery: 'Recovery',
|
||||
more: 'More',
|
||||
share: 'Share',
|
||||
close: 'Close',
|
||||
size: 'Size',
|
||||
preview: 'Preview',
|
||||
move: 'Move',
|
||||
moveTo: 'MoveTo',
|
||||
upload: 'Upload',
|
||||
create: 'Create',
|
||||
createTime: 'Create Time',
|
||||
updateTime: 'Update Time',
|
||||
updateDate: 'Update Date',
|
||||
deleteTime: 'Deleted Time',
|
||||
uploadUserNickname: 'Upload User',
|
||||
root: 'Root',
|
||||
fillInPicLink: 'Fill in Picture Link',
|
||||
rePick: 'Re Choose',
|
||||
chooseImage: 'Choose Image',
|
||||
uploadMode: 'Upload Mode',
|
||||
fillMode: 'Fill Mode',
|
||||
sizeExceedLimit: 'File size exceed limit {}>{}',
|
||||
dropNotDirectory: 'Cannot drag and drop folders for uploading',
|
||||
setPublic: 'Set as public',
|
||||
setPrivate: 'Set as private',
|
||||
copyLink: 'Copy Link',
|
||||
enterName: 'Please enter name',
|
||||
publicFileEveryoneCanVisit: 'Public file, anyone can access',
|
||||
fileDetail: 'File info',
|
||||
expire: 'Expire',
|
||||
copyLinkAndCode: 'Copy link and code',
|
||||
uploaded: 'Uploaded',
|
||||
uploadDir: 'Upload dir',
|
||||
uploadInfo: 'Upload Info',
|
||||
uploadErrorInfo: 'Some files failed to upload, you can export CSV files for viewing',
|
||||
exportCSV: 'Export upload error detail',
|
||||
speed: "Speed",
|
||||
fileInfo: "File basic info",
|
||||
fileName: "Filename",
|
||||
path: "Path",
|
||||
copyPath: "Copy path",
|
||||
publicOrPrivate: "Public or private",
|
||||
privateInfo: "Private file, only self or auth user can download",
|
||||
publicInfo: "Public file, anyone can download",
|
||||
downloadTimes: "Download times",
|
||||
operations: "Operation",
|
||||
oneTimeLink: "One time link",
|
||||
oneTimeLinkInfo: "One time link will expire after downloading, click to copy",
|
||||
imageCache: "Image cache",
|
||||
searchFile: "Search file",
|
||||
noContentYet: "No content under this directory yet",
|
||||
allFiles: "All Files",
|
||||
newDirectory: "New directory",
|
||||
notChoose: "Not choose any file",
|
||||
exceed1000: "Exceed file limit 1000",
|
||||
noImageCache: "No image cache",
|
||||
recycleBin: "Recycle bin",
|
||||
deleted: "Deleted",
|
||||
unCompatibleBrowser: "The current browser does not support it. Please try choose another one",
|
||||
canIUse: "To see if the current browser supports it",
|
||||
intoRecycleBin: "Recycle bin",
|
||||
finishingTip: "Please wait while files are sorted..."
|
||||
speed: 'Speed',
|
||||
fileInfo: 'File basic info',
|
||||
fileName: 'Filename',
|
||||
path: 'Path',
|
||||
copyPath: 'Copy path',
|
||||
publicOrPrivate: 'Public or private',
|
||||
privateInfo: 'Private file, only self or auth user can download',
|
||||
publicInfo: 'Public file, anyone can download',
|
||||
downloadTimes: 'Download times',
|
||||
operations: 'Operation',
|
||||
oneTimeLink: 'One time link',
|
||||
oneTimeLinkInfo: 'One time link will expire after downloading, click to copy',
|
||||
imageCache: 'Image cache',
|
||||
searchFile: 'Search file',
|
||||
noContentYet: 'No content under this directory yet',
|
||||
allFiles: 'All Files',
|
||||
newDirectory: 'New directory',
|
||||
notChoose: 'Not choose any file',
|
||||
exceed1000: 'Exceed file limit 1000',
|
||||
noImageCache: 'No image cache',
|
||||
recycleBin: 'Recycle bin',
|
||||
deleted: 'Deleted',
|
||||
unCompatibleBrowser: 'The current browser does not support it. Please try choose another one',
|
||||
canIUse: 'To see if the current browser supports it',
|
||||
intoRecycleBin: 'Recycle bin',
|
||||
finishingTip: 'Please wait while files are sorted...',
|
||||
crawl: 'Crawl File',
|
||||
crawlLink: 'Link',
|
||||
crawlLinkTip: 'Please enter link',
|
||||
crawlFilename: 'Filename',
|
||||
crawlFilenameTip: 'Please enter filename',
|
||||
crawlBackground: 'Background',
|
||||
crawlSuccessTip: 'Crawl successfully',
|
||||
crawlDescription:
|
||||
'Crawl files refers to the backend downloading directly from the specified resource link to the current directory of EyeblueTank',
|
||||
},
|
||||
router: {
|
||||
allFiles: "All Files",
|
||||
fileDetail: "File Detail",
|
||||
login: "Login",
|
||||
autoLogin: "Auto Login",
|
||||
register: "Register",
|
||||
users: "Users",
|
||||
userDetail: "User Detail",
|
||||
changePassword: "Change password",
|
||||
editUser: "Edit User",
|
||||
createUser: "Create User",
|
||||
shareDetail: "Share Detail",
|
||||
myShare: "My Share",
|
||||
dashboard: "Dashboard",
|
||||
install: "Install",
|
||||
setting: "Setting"
|
||||
allFiles: 'All Files',
|
||||
fileDetail: 'File Detail',
|
||||
login: 'Login',
|
||||
autoLogin: 'Auto Login',
|
||||
register: 'Register',
|
||||
users: 'Users',
|
||||
userDetail: 'User Detail',
|
||||
changePassword: 'Change password',
|
||||
editUser: 'Edit User',
|
||||
createUser: 'Create User',
|
||||
shareDetail: 'Share Detail',
|
||||
myShare: 'My Share',
|
||||
dashboard: 'Dashboard',
|
||||
install: 'Install',
|
||||
setting: 'Setting',
|
||||
},
|
||||
preference: {
|
||||
basic: "Base Info",
|
||||
preview: "Preview Conf",
|
||||
scan: "Scan Disk",
|
||||
websiteName: "Website Name",
|
||||
logo: "Logo",
|
||||
logoSquare: "Logo will be cropped to square size",
|
||||
onlyAllowIco: "Only .ico allowed",
|
||||
copyright: "Copyright (support html)",
|
||||
extraInfo: "Extra info (support html)",
|
||||
zipMaxNumLimit: "Zip download max num limit",
|
||||
zipMaxSizeLimit: "Zip download max size limit(B)",
|
||||
current: "Current",
|
||||
noLimit: "No limit",
|
||||
userDefaultSizeLimit: "User default size limit(B) ",
|
||||
matterBinDefaultSaveDay: "Matter bin storage days",
|
||||
enterMatterBinDefaultSaveDay: "Please enter matter bin storage days!",
|
||||
docLink: "Document Link",
|
||||
tankDocLink: "https://tank-doc.eyeblue.cn",
|
||||
allowRegister: "Allow register",
|
||||
systemCleanup: "System Cleanup",
|
||||
basic: 'Base Info',
|
||||
preview: 'Preview Conf',
|
||||
scan: 'Scan Disk',
|
||||
websiteName: 'Website Name',
|
||||
logo: 'Logo',
|
||||
logoSquare: 'Logo will be cropped to square size',
|
||||
onlyAllowIco: 'Only .ico allowed',
|
||||
copyright: 'Copyright (support html)',
|
||||
extraInfo: 'Extra info (support html)',
|
||||
zipMaxNumLimit: 'Zip download max num limit',
|
||||
zipMaxSizeLimit: 'Zip download max size limit(B)',
|
||||
current: 'Current',
|
||||
noLimit: 'No limit',
|
||||
userDefaultSizeLimit: 'User default size limit(B) ',
|
||||
matterBinDefaultSaveDay: 'Matter bin storage days',
|
||||
enterMatterBinDefaultSaveDay: 'Please enter matter bin storage days!',
|
||||
docLink: 'Document Link',
|
||||
tankDocLink: 'https://tank-doc.eyeblue.cn',
|
||||
allowRegister: 'Allow register',
|
||||
systemCleanup: 'System Cleanup',
|
||||
systemCleanupDescription: "This operation will cleanup everything except administrators' data",
|
||||
systemCleanupPrompt: "This operation will cleanup everything except administrators' account data, please input login password.",
|
||||
previewConfig: "File Preview Config",
|
||||
editPreference: "Edit Preference",
|
||||
editPreviewEngine: "Edit Preview engine",
|
||||
enterWebsiteName: "Please enter website name!",
|
||||
enterZipMaxNumLimit: "Please enter zip max num!",
|
||||
enterZipMaxSizeLimit: "Please enter zip max size!",
|
||||
previewConfig: 'File Preview Config',
|
||||
editPreference: 'Edit Preference',
|
||||
editPreviewEngine: 'Edit Preview engine',
|
||||
enterWebsiteName: 'Please enter website name!',
|
||||
enterZipMaxNumLimit: 'Please enter zip max num!',
|
||||
enterZipMaxSizeLimit: 'Please enter zip max size!',
|
||||
enterUserDefaultSizeLimit: "Please enter user's default size!",
|
||||
engine: "The number {} engine",
|
||||
noEngine: "No preview engine",
|
||||
newEngine: "Add a preview engine",
|
||||
engineReg: "Engine format",
|
||||
engineSuffix: "Engine suffix",
|
||||
enginePreview: "Engine preview",
|
||||
defaultPreview: "Default preview engine",
|
||||
previewEngine: "Number {} preview engine",
|
||||
defaultPreviewDesc: "Default preview engine, can not be removed",
|
||||
engineUsageHint: "Previewing a file using the first engine matches the extentions.",
|
||||
engineRegHelper: "template syntax, {url} represents the file path, the preview will automatically replace with the corresponding file url",
|
||||
engineRegPlaceHolder: "eg:https://xxx.xxx.xxx?url={url}",
|
||||
engineSuffixPlaceHolder: "suffix can not be null, split by comma, look like: doc,ppt,xls",
|
||||
previewCurrent: "preview in current page",
|
||||
previewOpen: "preview in new page",
|
||||
editScan: "Edit Scan disk",
|
||||
enableScan: "Enable Scan disk",
|
||||
disabledScan: "Disabled Scan disk",
|
||||
scanCron: "Regularly Scan disk",
|
||||
cron: "Cron expression",
|
||||
cronValidate: "Cron expression can not be null",
|
||||
scanScope: "Scan scope",
|
||||
scanUsers: "Scan users",
|
||||
scanPerTenSeconds: "Scan every ten seconds",
|
||||
scanPerThirtySeconds: "Scan every thirty seconds",
|
||||
scanPerMinute: "Scan every minute",
|
||||
scanPerHour: "Scan every hour",
|
||||
scanCustom: "Scan custom",
|
||||
chooseUsers: "Fuzzy search users",
|
||||
chooseUsersValidate: "choose one more user",
|
||||
scanLoading: "waiting...",
|
||||
matterBinDefaultTip: "set zero means to turn off the recycle bin"
|
||||
engine: 'The number {} engine',
|
||||
noEngine: 'No preview engine',
|
||||
newEngine: 'Add a preview engine',
|
||||
engineReg: 'Engine format',
|
||||
engineSuffix: 'Engine suffix',
|
||||
enginePreview: 'Engine preview',
|
||||
defaultPreview: 'Default preview engine',
|
||||
previewEngine: 'Number {} preview engine',
|
||||
defaultPreviewDesc: 'Default preview engine, can not be removed',
|
||||
engineUsageHint: 'Previewing a file using the first engine matches the extentions.',
|
||||
engineRegHelper: 'template syntax, {url} represents the file path, the preview will automatically replace with the corresponding file url',
|
||||
engineRegPlaceHolder: 'eg:https://xxx.xxx.xxx?url={url}',
|
||||
engineSuffixPlaceHolder: 'suffix can not be null, split by comma, look like: doc,ppt,xls',
|
||||
previewCurrent: 'preview in current page',
|
||||
previewOpen: 'preview in new page',
|
||||
editScan: 'Edit Scan disk',
|
||||
enableScan: 'Enable Scan disk',
|
||||
disabledScan: 'Disabled Scan disk',
|
||||
scanCron: 'Regularly Scan disk',
|
||||
scanCronValidate: 'Regularly scan disk can not be null',
|
||||
cron: 'Cron expression',
|
||||
cronValidate: 'Cron expression can not be null',
|
||||
scanScope: 'Scan scope',
|
||||
scanScopeValidate: 'Scan scope can not be null',
|
||||
scanSpaces: 'Scan spaces',
|
||||
scanPerTenSeconds: 'Scan every ten seconds',
|
||||
scanPerThirtySeconds: 'Scan every thirty seconds',
|
||||
scanPerMinute: 'Scan every minute',
|
||||
scanPerHour: 'Scan every hour',
|
||||
scanCustom: 'Scan custom',
|
||||
chooseSpaces: 'Fuzzy search spaces',
|
||||
chooseSpacesValidate: 'choose one more space',
|
||||
scanLoading: 'waiting...',
|
||||
matterBinDefaultTip: 'set zero means to turn off the recycle bin',
|
||||
scanImmediately: 'Scan immediately',
|
||||
},
|
||||
share: {
|
||||
shareDetail: "Share Detail",
|
||||
shareTime: "Share Time",
|
||||
expireTime: "Expire Time",
|
||||
noExpire: "Never Expire",
|
||||
expired: "Expired",
|
||||
copyLinkAndCode: "Copy Link And Code",
|
||||
shareSuccess: "Share Successfully",
|
||||
sharer: "Share Person",
|
||||
link: "Link",
|
||||
copyLink: "Copy Link",
|
||||
code: "Code",
|
||||
copyCode: "Copy Code",
|
||||
copySuccess: "Copy Successfully",
|
||||
more: "More",
|
||||
cancelShare: "Cancel Share",
|
||||
getLink: "Get Link",
|
||||
allFiles: "All Files",
|
||||
noContent: "No content in this directory",
|
||||
enterCode: "Please enter code",
|
||||
getFiles: "Get Files",
|
||||
codeError: "Code Error",
|
||||
cancelPrompt: "This operation will cancel sharing forever, continue?",
|
||||
hour: "1 Hour",
|
||||
day: "1 Day",
|
||||
week: "1 Week",
|
||||
month: "1 Month",
|
||||
year: "1 Year",
|
||||
infinity: "Forever",
|
||||
emptyHint: "No Share Yet",
|
||||
shareDetail: 'Share Detail',
|
||||
shareTime: 'Share Time',
|
||||
expireTime: 'Expire Time',
|
||||
noExpire: 'Never Expire',
|
||||
expired: 'Expired',
|
||||
copyLinkAndCode: 'Copy Link And Code',
|
||||
shareSuccess: 'Share Successfully',
|
||||
sharer: 'Share Person',
|
||||
link: 'Link',
|
||||
copyLink: 'Copy Link',
|
||||
code: 'Code',
|
||||
copyCode: 'Copy Code',
|
||||
copySuccess: 'Copy Successfully',
|
||||
more: 'More',
|
||||
cancelShare: 'Cancel Share',
|
||||
getLink: 'Get Link',
|
||||
allFiles: 'All Files',
|
||||
noContent: 'No content in this directory',
|
||||
enterCode: 'Please enter code',
|
||||
getFiles: 'Get Files',
|
||||
codeError: 'Code Error',
|
||||
cancelPrompt: 'This operation will cancel sharing forever, continue?',
|
||||
hour: '1 Hour',
|
||||
day: '1 Day',
|
||||
week: '1 Week',
|
||||
month: '1 Month',
|
||||
year: '1 Year',
|
||||
infinity: 'Forever',
|
||||
emptyHint: 'No Share Yet',
|
||||
},
|
||||
user: {
|
||||
redirecting: "Redirecting...",
|
||||
oldPassword: "Old Password",
|
||||
newPassword: "New Password",
|
||||
confirmNewPassword: "Confirm New Password",
|
||||
cannotBeNull: "Cannot be null!",
|
||||
passwordNotSame: "passwords above not same!",
|
||||
role: "Role",
|
||||
singleFileSizeLimit: "Single File Limit",
|
||||
totalFileSizeLimit: "Total Space Limit",
|
||||
current: "Current",
|
||||
noLimit: "No Limit",
|
||||
totalFileSize: "Used Space",
|
||||
status: "Status",
|
||||
lastLogin: "Last Login",
|
||||
lastLoginIp: "Last Login Ip",
|
||||
lastLoginTime: "Last Login Time",
|
||||
resetPassword: "Reset Password",
|
||||
transfiguration: "Transfiguration",
|
||||
changePassword: "Edit Password",
|
||||
enterPassword: "Please Enter Password",
|
||||
enterUsername: "Please Enter Username",
|
||||
enterNewPassword: "Please Enter New Password",
|
||||
profile: "Profile",
|
||||
avatar: "Avatar",
|
||||
username: "Username",
|
||||
password: "Password",
|
||||
confirmPassword: "Confirm Password",
|
||||
disabled: "Disabled",
|
||||
disableUser: "Disable this user",
|
||||
disable: "Disable",
|
||||
active: "Active",
|
||||
sync: "Sync",
|
||||
activeUser: "Active this user",
|
||||
deleteUser: "Delete this user",
|
||||
redirecting: 'Redirecting...',
|
||||
oldPassword: 'Old Password',
|
||||
newPassword: 'New Password',
|
||||
confirmNewPassword: 'Confirm New Password',
|
||||
cannotBeNull: 'Cannot be null!',
|
||||
passwordNotSame: 'passwords above not same!',
|
||||
role: 'Role',
|
||||
singleFileSizeLimit: 'Single File Limit',
|
||||
totalFileSizeLimit: 'Total Space Limit',
|
||||
current: 'Current',
|
||||
noLimit: 'No Limit',
|
||||
totalFileSize: 'Used Space',
|
||||
status: 'Status',
|
||||
lastLogin: 'Last Login',
|
||||
lastLoginIp: 'Last Login Ip',
|
||||
lastLoginTime: 'Last Login Time',
|
||||
resetPassword: 'Reset Password',
|
||||
transfiguration: 'Transfiguration',
|
||||
changePassword: 'Edit Password',
|
||||
enterPassword: 'Please Enter Password',
|
||||
enterUsername: 'Please Enter Username',
|
||||
enterNewPassword: 'Please Enter New Password',
|
||||
profile: 'Profile',
|
||||
avatar: 'Avatar',
|
||||
username: 'Username',
|
||||
password: 'Password',
|
||||
confirmPassword: 'Confirm Password',
|
||||
disabled: 'Disabled',
|
||||
disableUser: 'Disable this user',
|
||||
disable: 'Disable',
|
||||
active: 'Active',
|
||||
sync: 'Sync',
|
||||
activeUser: 'Active this user',
|
||||
deleteUser: 'Delete this user',
|
||||
deleteHint: "This action will delete {}'s all records, including files,shares,user infos etc. Continue?",
|
||||
welcomeLogin: "Welcome Login",
|
||||
logining: "Login...",
|
||||
login: "Login",
|
||||
loginSuccess: "Login Success",
|
||||
toToRegister: "Go To Register",
|
||||
welcomeRegister: "Welcome Register",
|
||||
registering: "Login...",
|
||||
register: "Register",
|
||||
goToLogin: "Go To Login",
|
||||
roleGuest: "Guest",
|
||||
roleUser: "User",
|
||||
roleAdministrator: "Administrator",
|
||||
statusActive: "Ok",
|
||||
statusDisabled: "Disabled",
|
||||
webdavLink: "WebDAV Link",
|
||||
docLink: "Document Link",
|
||||
createUser: "Create User",
|
||||
editUser: "Edit User",
|
||||
welcomeLogin: 'Welcome Login',
|
||||
logining: 'Login...',
|
||||
login: 'Login',
|
||||
loginSuccess: 'Login Success',
|
||||
toToRegister: 'Go To Register',
|
||||
welcomeRegister: 'Welcome Register',
|
||||
registering: 'Login...',
|
||||
register: 'Register',
|
||||
goToLogin: 'Go To Login',
|
||||
roleGuest: 'Guest',
|
||||
roleUser: 'User',
|
||||
roleUserRoleSpace: 'User Space Role',
|
||||
roleAdministrator: 'Administrator',
|
||||
statusActive: 'Ok',
|
||||
statusDisabled: 'Disabled',
|
||||
webdavLink: 'WebDAV Link',
|
||||
docLink: 'Document Link',
|
||||
createUser: 'Create User',
|
||||
editUser: 'Edit User',
|
||||
editSomebodyPassword: "Edit {}'s Password",
|
||||
transfigurationPromptText: "Transfiguration Prompt",
|
||||
transfigurationPrompt: "You will login as this user.Please visit this link in other browser, if in current browser, you will logout.",
|
||||
allUsers: "All users",
|
||||
partialUsers: "Partial users",
|
||||
searchUser: "Search user"
|
||||
transfigurationPromptText: 'Transfiguration Prompt',
|
||||
transfigurationPrompt: 'You will login as this user.Please visit this link in other browser, if in current browser, you will logout.',
|
||||
searchUser: 'Search user',
|
||||
},
|
||||
space: {
|
||||
name: 'Shared space',
|
||||
nameTip: 'Please enter space name, can not be modified later',
|
||||
create: 'Create space',
|
||||
totalSize: 'Already use',
|
||||
sizeLimit: 'Single file limit',
|
||||
sizeLimitTip: 'Please enter single file limit',
|
||||
totalSizeLimit: 'Total space limit',
|
||||
totalSizeLimitTip: 'Please enter total space limit',
|
||||
deleteHint: 'This operation will permanently delete the space. Please delete all files and members of the space first. Do you want to continue?',
|
||||
memberManage: 'Space member Manage',
|
||||
member: 'member',
|
||||
memberTip: 'Please enter member',
|
||||
memberRole: 'Member role',
|
||||
memberRoleTip: 'Please select member role',
|
||||
bindMember: 'Bind space member',
|
||||
unBindMember: 'Unbind space member',
|
||||
unBindMemberHint: 'This operation will unbind the member from the space. Do you want to continue?',
|
||||
memberRoleReadonly: 'Readonly',
|
||||
memberRoleReadWrite: 'Read and write',
|
||||
memberRoleAdmin: 'Admin',
|
||||
emptyHint: 'No Space Yet',
|
||||
allSpaces: 'All Spaces',
|
||||
partialSpaces: 'Partial Spaces',
|
||||
},
|
||||
model: {
|
||||
usernameRule: "only lowercase letter and number and _ is permitted.",
|
||||
passwordRule: "Password must have more than 6 chars",
|
||||
linkCodeText: "Link:{} Code:{}",
|
||||
copyLinkCodeSuccess: "Copy Link and Code successfully",
|
||||
|
||||
usernameRule: 'only lowercase letter and number and _ is permitted.',
|
||||
passwordRule: 'Password must have more than 6 chars',
|
||||
linkCodeText: 'Link:{} Code:{}',
|
||||
copyLinkCodeSuccess: 'Copy Link and Code successfully',
|
||||
},
|
||||
plugin: {
|
||||
cannotPreview: "Cannot Preview",
|
||||
emptyHintDefault: "No Items",
|
||||
everyPage: "Every Page",
|
||||
items: "Items",
|
||||
total: "Total",
|
||||
clickRefresh: "Click To Refresh",
|
||||
cannotPreview: 'Cannot Preview',
|
||||
emptyHintDefault: 'No Items',
|
||||
everyPage: 'Every Page',
|
||||
items: 'Items',
|
||||
total: 'Total',
|
||||
clickRefresh: 'Click To Refresh',
|
||||
},
|
||||
loading: "Loading",
|
||||
selectAll: "All",
|
||||
edit: "Edit",
|
||||
createTime: "Create Time",
|
||||
download: "Download",
|
||||
close: "Close",
|
||||
required: "Required",
|
||||
cancel: "Cancel",
|
||||
delete: "Delete",
|
||||
actionCanNotRevertConfirm: "This action cannot be reverted, confirm?",
|
||||
actionDeleteConfirm: "Delete, confirm?",
|
||||
actionRecoveryConfirm: "Recovery, confirm?",
|
||||
prompt: "Prompt",
|
||||
confirm: "Confirm",
|
||||
copy: "Copy",
|
||||
copySuccess: "Copy Success!",
|
||||
copyError: "Copy Error!",
|
||||
showMore: "Show More",
|
||||
username: "Username",
|
||||
password: "Password",
|
||||
submit: "Submit",
|
||||
save: "Save",
|
||||
create: "Create",
|
||||
finish: "Finish",
|
||||
operationSuccess: "Operation success",
|
||||
operation: "Operation",
|
||||
notFound: "404 Not Found",
|
||||
login: "Login",
|
||||
logout: "Logout",
|
||||
yes: "Yes",
|
||||
no: "No",
|
||||
all: "All",
|
||||
refresh: "refresh",
|
||||
inputRequired: "Input required",
|
||||
loading: 'Loading',
|
||||
selectAll: 'All',
|
||||
edit: 'Edit',
|
||||
createTime: 'Create Time',
|
||||
download: 'Download',
|
||||
close: 'Close',
|
||||
required: 'Required',
|
||||
cancel: 'Cancel',
|
||||
delete: 'Delete',
|
||||
actionCanNotRevertConfirm: 'This action cannot be reverted, confirm?',
|
||||
actionDeleteConfirm: 'Delete, confirm?',
|
||||
actionRecoveryConfirm: 'Recovery, confirm?',
|
||||
prompt: 'Prompt',
|
||||
confirm: 'Confirm',
|
||||
copy: 'Copy',
|
||||
copySuccess: 'Copy Success!',
|
||||
copyError: 'Copy Error!',
|
||||
showMore: 'Show More',
|
||||
username: 'Username',
|
||||
password: 'Password',
|
||||
submit: 'Submit',
|
||||
save: 'Save',
|
||||
create: 'Create',
|
||||
finish: 'Finish',
|
||||
operationSuccess: 'Operation success',
|
||||
operation: 'Operation',
|
||||
notFound: '404 Not Found',
|
||||
login: 'Login',
|
||||
logout: 'Logout',
|
||||
yes: 'Yes',
|
||||
no: 'No',
|
||||
all: 'All',
|
||||
refresh: 'refresh',
|
||||
inputRequired: 'Input required',
|
||||
selectRequired: 'Select required',
|
||||
more: 'More',
|
||||
}
|
||||
|
||||
export default LangEn
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
let LangZh = {
|
||||
eyeblueTank: "蓝眼云盘",
|
||||
eyeblueTank: '蓝眼云盘',
|
||||
dashboard: {
|
||||
totalInvokeNum: '总PV',
|
||||
weekRate: '周环比',
|
||||
@@ -21,357 +21,395 @@ let LangZh = {
|
||||
reRun: '立即重跑',
|
||||
},
|
||||
install: {
|
||||
configMysql: "配置数据库",
|
||||
dbType: "数据库类型",
|
||||
port: "端口",
|
||||
schema: "库名",
|
||||
username: "用户名",
|
||||
password: "密码",
|
||||
charset: "编码",
|
||||
mysqlConnectionPass: "MySQL连接测试通过",
|
||||
testMysqlConnection: "测试MySQL连接",
|
||||
notice: "注意",
|
||||
sqliteNotice1: "sqlite是一个轻量的文件数据库,无需安装即可使用",
|
||||
mysqlNotice1: "如果数据库和蓝眼云盘安装在同一台服务器,Host可以直接填写 127.0.0.1。",
|
||||
mysqlNotice2: "数据库账户的权限要求要能够创建表,否则第二步\"创建表\"操作会出错",
|
||||
validateMysqlFirst: "请首先验证数据库连接",
|
||||
preStep: "上一步",
|
||||
nextStep: "下一步",
|
||||
createTable: "创建表",
|
||||
installed: "已安装",
|
||||
installedButMissing: "已安装,字段缺失",
|
||||
toBeInstalled: "待安装",
|
||||
allFields: "所有字段",
|
||||
missingFields: "缺失字段",
|
||||
tableNotice: "点击\"一键建表\"后会按照以下逻辑执行操作:",
|
||||
tableNotice1: "如果某表不存在,则直接创建表。",
|
||||
tableNotice2: "如果某表存在并且字段齐全,那么不会对该表做任何操作。",
|
||||
tableNotice3: "如果某表存在但是部分字段缺失,那么会在该表中增加缺失字段。",
|
||||
tableNotice4: "如果表中有多余的字段(多余字段即不是蓝眼云盘需要的字段),不会做删除处理,而会维持原样。",
|
||||
oneKeyCreate: "一键建表",
|
||||
createFinish: "建表完成",
|
||||
createTableSuccess: "建表成功",
|
||||
configMysql: '配置数据库',
|
||||
dbType: '数据库类型',
|
||||
port: '端口',
|
||||
schema: '库名',
|
||||
username: '用户名',
|
||||
password: '密码',
|
||||
charset: '编码',
|
||||
mysqlConnectionPass: 'MySQL连接测试通过',
|
||||
testMysqlConnection: '测试MySQL连接',
|
||||
notice: '注意',
|
||||
sqliteNotice1: 'sqlite是一个轻量的文件数据库,无需安装即可使用',
|
||||
mysqlNotice1: '如果数据库和蓝眼云盘安装在同一台服务器,Host可以直接填写 127.0.0.1。',
|
||||
mysqlNotice2: '数据库账户的权限要求要能够创建表,否则第二步"创建表"操作会出错',
|
||||
validateMysqlFirst: '请首先验证数据库连接',
|
||||
preStep: '上一步',
|
||||
nextStep: '下一步',
|
||||
createTable: '创建表',
|
||||
installed: '已安装',
|
||||
installedButMissing: '已安装,字段缺失',
|
||||
toBeInstalled: '待安装',
|
||||
allFields: '所有字段',
|
||||
missingFields: '缺失字段',
|
||||
tableNotice: '点击"一键建表"后会按照以下逻辑执行操作:',
|
||||
tableNotice1: '如果某表不存在,则直接创建表。',
|
||||
tableNotice2: '如果某表存在并且字段齐全,那么不会对该表做任何操作。',
|
||||
tableNotice3: '如果某表存在但是部分字段缺失,那么会在该表中增加缺失字段。',
|
||||
tableNotice4: '如果表中有多余的字段(多余字段即不是蓝眼云盘需要的字段),不会做删除处理,而会维持原样。',
|
||||
oneKeyCreate: '一键建表',
|
||||
createFinish: '建表完成',
|
||||
createTableSuccess: '建表成功',
|
||||
crateTableFirst: "请首先点击'一键建表'",
|
||||
setAdministrator: "设置管理员",
|
||||
detectAdministrator: "检测到系统中已经存在有以下管理员:",
|
||||
useOrCreateAdministrator: "你可以使用其中一位管理员的用户名和密码进行验证,或者创建一位新的管理员账户",
|
||||
validateAdministrator: "验证管理员账户",
|
||||
createAdministrator: "创建管理员账户",
|
||||
administratorUsername: "管理员用户名",
|
||||
administratorPassword: "管理员密码",
|
||||
administratorRePassword: "再次输入密码",
|
||||
usernameRule: "由于用户名将作为文件上传的目录,因此只允许字母数字以及\"_\"。",
|
||||
congratulationInstall: "恭喜,安装成功!",
|
||||
configAdminFirst: "请首先配置管理员信息!",
|
||||
createAdminSuccess: "创建管理员成功!",
|
||||
validateAdminSuccess: "验证管理员成功!",
|
||||
pressToHome: "点击下方按钮来完成安装过程并进入首页。",
|
||||
enterHome: "完成,并进入首页",
|
||||
finish: "完成",
|
||||
setAdministrator: '设置管理员',
|
||||
detectAdministrator: '检测到系统中已经存在有以下管理员:',
|
||||
useOrCreateAdministrator: '你可以使用其中一位管理员的用户名和密码进行验证,或者创建一位新的管理员账户',
|
||||
validateAdministrator: '验证管理员账户',
|
||||
createAdministrator: '创建管理员账户',
|
||||
administratorUsername: '管理员用户名',
|
||||
administratorPassword: '管理员密码',
|
||||
administratorRePassword: '再次输入密码',
|
||||
usernameRule: '由于用户名将作为文件上传的目录,因此只允许字母数字以及"_"。',
|
||||
congratulationInstall: '恭喜,安装成功!',
|
||||
configAdminFirst: '请首先配置管理员信息!',
|
||||
createAdminSuccess: '创建管理员成功!',
|
||||
validateAdminSuccess: '验证管理员成功!',
|
||||
pressToHome: '点击下方按钮来完成安装过程并进入首页。',
|
||||
enterHome: '完成,并进入首页',
|
||||
finish: '完成',
|
||||
},
|
||||
layout: {
|
||||
allFiles: "全部文件",
|
||||
myShare: "我的分享",
|
||||
bin: "回收站",
|
||||
setting: "网站设置",
|
||||
dashboard: "监控统计",
|
||||
users: "用户管理",
|
||||
logout: "退出登录",
|
||||
about: "关于",
|
||||
install: "安装网站",
|
||||
dragMouseUp: "可以松手啦~"
|
||||
allFiles: '个人文件',
|
||||
myShare: '我的分享',
|
||||
bin: '回收站',
|
||||
setting: '网站设置',
|
||||
dashboard: '监控统计',
|
||||
users: '用户管理',
|
||||
logout: '退出登录',
|
||||
about: '关于',
|
||||
install: '安装网站',
|
||||
dragMouseUp: '可以松手啦~',
|
||||
space: '共享空间',
|
||||
},
|
||||
matter: {
|
||||
file: "文件",
|
||||
directory: "文件夹",
|
||||
rename: "重命名",
|
||||
download: "下载",
|
||||
delete: "删除",
|
||||
hardDelete: "彻底删除",
|
||||
recovery: "恢复",
|
||||
more: "更多",
|
||||
share: "分享",
|
||||
close: "关闭",
|
||||
size: "大小",
|
||||
preview: "预览",
|
||||
move: "移动",
|
||||
moveTo: "移动到",
|
||||
upload: "上传",
|
||||
create: "新建",
|
||||
createTime: "创建时间",
|
||||
updateTime: "修改时间",
|
||||
deleteTime: "删除时间",
|
||||
root: "根目录",
|
||||
fillInPicLink: "请填写图片链接",
|
||||
rePick: "重新选择",
|
||||
chooseImage: "选择图片",
|
||||
uploadMode: "上传模式",
|
||||
fillMode: "填写模式",
|
||||
sizeExceedLimit: "文件大小超过了限制{}>{}",
|
||||
dropNotDirectory: "不可拖拽文件夹进行上传",
|
||||
setPublic: "设置为公有文件",
|
||||
setPrivate: "设置为私有文件",
|
||||
copyLink: "复制下载链接",
|
||||
enterName: "请输入名称",
|
||||
publicFileEveryoneCanVisit: "公有文件,任何人可以访问",
|
||||
fileDetail: "文件详情",
|
||||
expire: "有效期",
|
||||
copyLinkAndCode: "复制链接+提取码",
|
||||
uploaded: "已上传",
|
||||
file: '文件',
|
||||
directory: '文件夹',
|
||||
rename: '重命名',
|
||||
download: '下载',
|
||||
delete: '删除',
|
||||
hardDelete: '彻底删除',
|
||||
recovery: '恢复',
|
||||
more: '更多',
|
||||
share: '分享',
|
||||
close: '关闭',
|
||||
size: '大小',
|
||||
preview: '预览',
|
||||
move: '移动',
|
||||
moveTo: '移动到',
|
||||
upload: '上传',
|
||||
create: '新建',
|
||||
createTime: '创建时间',
|
||||
updateTime: '修改时间',
|
||||
updateDate: '修改日期',
|
||||
deleteTime: '删除时间',
|
||||
uploadUserNickname: '上传者',
|
||||
root: '根目录',
|
||||
fillInPicLink: '请填写图片链接',
|
||||
rePick: '重新选择',
|
||||
chooseImage: '选择图片',
|
||||
uploadMode: '上传模式',
|
||||
fillMode: '填写模式',
|
||||
sizeExceedLimit: '文件大小超过了限制{}>{}',
|
||||
dropNotDirectory: '不可拖拽文件夹进行上传',
|
||||
setPublic: '设置为公有文件',
|
||||
setPrivate: '设置为私有文件',
|
||||
copyLink: '复制下载链接',
|
||||
enterName: '请输入名称',
|
||||
publicFileEveryoneCanVisit: '公有文件,任何人可以访问',
|
||||
fileDetail: '文件详情',
|
||||
expire: '有效期',
|
||||
copyLinkAndCode: '复制链接+提取码',
|
||||
uploaded: '已上传',
|
||||
uploadDir: '上传文件夹',
|
||||
uploadInfo: '上传信息',
|
||||
uploadErrorInfo: '部分文件上传失败,可导出csv文件查看',
|
||||
exportCSV: '导出上传错误详情',
|
||||
speed: "速度",
|
||||
fileInfo: "文件基本信息",
|
||||
fileName: "文件名",
|
||||
path: "路径",
|
||||
copyPath: "复制路径",
|
||||
publicOrPrivate: "文件公开性",
|
||||
privateInfo: "私有文件,只有自己或者授权的用户可以下载",
|
||||
publicInfo: "公有文件,任何人可以通过链接下载",
|
||||
downloadTimes: "下载次数",
|
||||
operations: "操作",
|
||||
oneTimeLink: "一次性链接",
|
||||
oneTimeLinkInfo: "使用一次性链接下载后链接立即失效,可以分享这个链接给朋友,点击复制",
|
||||
imageCache: "图片缓存",
|
||||
searchFile: "搜索文件",
|
||||
noContentYet: "该目录下暂无任何内容",
|
||||
allFiles: "全部文件",
|
||||
newDirectory: "新建文件夹",
|
||||
notChoose: "没有选择文件",
|
||||
exceed1000: "最多只能同时选取1000个文件",
|
||||
noImageCache: "暂无图片缓存数据",
|
||||
recycleBin: "回收站",
|
||||
deleted: "已删除",
|
||||
unCompatibleBrowser: "当前浏览器不支持,请切换浏览器尝试",
|
||||
canIUse: "查看当前浏览器是否支持,点击跳转",
|
||||
intoRecycleBin: "放入回收站",
|
||||
finishingTip: "后台文件整理中,请稍候..."
|
||||
speed: '速度',
|
||||
fileInfo: '文件基本信息',
|
||||
fileName: '文件名',
|
||||
path: '路径',
|
||||
copyPath: '复制路径',
|
||||
publicOrPrivate: '文件公开性',
|
||||
privateInfo: '私有文件,只有自己或者授权的用户可以下载',
|
||||
publicInfo: '公有文件,任何人可以通过链接下载',
|
||||
downloadTimes: '下载次数',
|
||||
operations: '操作',
|
||||
oneTimeLink: '一次性链接',
|
||||
oneTimeLinkInfo: '使用一次性链接下载后链接立即失效,可以分享这个链接给朋友,点击复制',
|
||||
imageCache: '图片缓存',
|
||||
searchFile: '搜索文件',
|
||||
noContentYet: '该目录下暂无任何内容',
|
||||
allFiles: '全部文件',
|
||||
newDirectory: '新建文件夹',
|
||||
notChoose: '没有选择文件',
|
||||
exceed1000: '最多只能同时选取1000个文件',
|
||||
noImageCache: '暂无图片缓存数据',
|
||||
recycleBin: '回收站',
|
||||
deleted: '已删除',
|
||||
unCompatibleBrowser: '当前浏览器不支持,请切换浏览器尝试',
|
||||
canIUse: '查看当前浏览器是否支持,点击跳转',
|
||||
intoRecycleBin: '放入回收站',
|
||||
finishingTip: '后台文件整理中,请稍候...',
|
||||
crawl: '抓取文件',
|
||||
crawlLink: '链接',
|
||||
crawlLinkTip: '请输入链接',
|
||||
crawlFilename: '文件名',
|
||||
crawlFilenameTip: '请输入文件名',
|
||||
crawlBackground: '后台抓取',
|
||||
crawlSuccessTip: '抓取成功',
|
||||
crawlDescription: '抓取文件指后台将从指定资源链接直接下载到蓝眼云盘当前目录下',
|
||||
},
|
||||
router: {
|
||||
allFiles: "全部文件",
|
||||
fileDetail: "文件详情",
|
||||
login: "登录",
|
||||
autoLogin: "自动登录",
|
||||
register: "注册",
|
||||
users: "用户列表",
|
||||
userDetail: "用户详情",
|
||||
changePassword: "修改密码",
|
||||
editUser: "编辑用户",
|
||||
createUser: "创建用户",
|
||||
shareDetail: "分享详情",
|
||||
myShare: "我的分享",
|
||||
dashboard: "监控统计",
|
||||
install: "安装网站",
|
||||
setting: "网站设置"
|
||||
allFiles: '全部文件',
|
||||
fileDetail: '文件详情',
|
||||
login: '登录',
|
||||
autoLogin: '自动登录',
|
||||
register: '注册',
|
||||
users: '用户列表',
|
||||
userDetail: '用户详情',
|
||||
changePassword: '修改密码',
|
||||
editUser: '编辑用户',
|
||||
createUser: '创建用户',
|
||||
shareDetail: '分享详情',
|
||||
myShare: '我的分享',
|
||||
dashboard: '监控统计',
|
||||
install: '安装网站',
|
||||
setting: '网站设置',
|
||||
},
|
||||
preference: {
|
||||
basic: "基本信息",
|
||||
preview: "预览引擎",
|
||||
scan: "扫描磁盘",
|
||||
websiteName: "网站名称",
|
||||
logo: "Logo",
|
||||
logoSquare: "logo请使用正方形图片,否则在显示时会裁剪成正方形",
|
||||
onlyAllowIco: "只允许上传.ico图标",
|
||||
copyright: "版权信息(支持html)",
|
||||
extraInfo: "备案信息(支持html)",
|
||||
zipMaxNumLimit: "zip下载数量限制",
|
||||
zipMaxSizeLimit: "zip下载大小限制(B)",
|
||||
current: "当前值",
|
||||
noLimit: "无限制",
|
||||
userDefaultSizeLimit: "用户默认总大小限制(B) ",
|
||||
matterBinDefaultSaveDay: "回收站默认保留天数",
|
||||
enterMatterBinDefaultSaveDay: "默认回收站默认保留天数必填!",
|
||||
docLink: "文档链接",
|
||||
tankDocLink: "https://tank-doc.eyeblue.cn/zh",
|
||||
allowRegister: "允许自主注册",
|
||||
systemCleanup: "重置系统",
|
||||
systemCleanupDescription: "重置系统将清空除管理员账号外所有数据",
|
||||
systemCleanupPrompt: "重置系统将清空除管理员账号外所有数据,事关重大,请输入登录密码",
|
||||
previewConfig: "文件预览配置",
|
||||
editPreference: "设置网站偏好",
|
||||
editPreviewEngine: "设置预览引擎",
|
||||
enterWebsiteName: "请输入网站名称!",
|
||||
enterZipMaxNumLimit: "zip最大数量限制必填!",
|
||||
enterZipMaxSizeLimit: "zip大小限制必填!",
|
||||
enterUserDefaultSizeLimit: "默认用户空间大小必填!",
|
||||
engine: "{}号预览引擎",
|
||||
noEngine: "暂无在线预览引擎配置",
|
||||
newEngine: "添加一个预览引擎",
|
||||
engineReg: "引擎格式",
|
||||
engineSuffix: "匹配后缀",
|
||||
enginePreview: "预览方式",
|
||||
defaultPreview: "默认引擎",
|
||||
previewEngine: "{}号引擎",
|
||||
defaultPreviewDesc: "默认预览引擎,不可移除",
|
||||
engineRegHelper: "此处填写模板语法:{url}表示文件路径,预览时会自动替换成对应的文件url;{b64url}表示base64机密后的路径,适用于kkfileview;",
|
||||
engineUsageHint: "对于一个文件的预览,使用第一个匹配到后缀名的引擎,没有配匹到则使用系统默认预览引擎",
|
||||
engineRegPlaceHolder: "例如:https://xxx.xxx.xxx?url={url}",
|
||||
basic: '基本信息',
|
||||
preview: '预览引擎',
|
||||
scan: '扫描磁盘',
|
||||
websiteName: '网站名称',
|
||||
logo: 'Logo',
|
||||
logoSquare: 'logo请使用正方形图片,否则在显示时会裁剪成正方形',
|
||||
onlyAllowIco: '只允许上传.ico图标',
|
||||
copyright: '版权信息(支持html)',
|
||||
extraInfo: '备案信息(支持html)',
|
||||
zipMaxNumLimit: 'zip下载数量限制',
|
||||
zipMaxSizeLimit: 'zip下载大小限制(B)',
|
||||
current: '当前值',
|
||||
noLimit: '无限制',
|
||||
userDefaultSizeLimit: '用户默认总大小限制(B) ',
|
||||
matterBinDefaultSaveDay: '回收站默认保留天数',
|
||||
enterMatterBinDefaultSaveDay: '默认回收站默认保留天数必填!',
|
||||
docLink: '文档链接',
|
||||
tankDocLink: 'https://tank-doc.eyeblue.cn/zh',
|
||||
allowRegister: '允许自主注册',
|
||||
systemCleanup: '重置系统',
|
||||
systemCleanupDescription: '重置系统将清空除管理员账号外所有数据',
|
||||
systemCleanupPrompt: '重置系统将清空除管理员账号外所有数据,事关重大,请输入登录密码',
|
||||
previewConfig: '文件预览配置',
|
||||
editPreference: '设置网站偏好',
|
||||
editPreviewEngine: '设置预览引擎',
|
||||
enterWebsiteName: '请输入网站名称!',
|
||||
enterZipMaxNumLimit: 'zip最大数量限制必填!',
|
||||
enterZipMaxSizeLimit: 'zip大小限制必填!',
|
||||
enterUserDefaultSizeLimit: '默认用户空间大小必填!',
|
||||
engine: '{}号预览引擎',
|
||||
noEngine: '暂无在线预览引擎配置',
|
||||
newEngine: '添加一个预览引擎',
|
||||
engineReg: '引擎格式',
|
||||
engineSuffix: '匹配后缀',
|
||||
enginePreview: '预览方式',
|
||||
defaultPreview: '默认引擎',
|
||||
previewEngine: '{}号引擎',
|
||||
defaultPreviewDesc: '默认预览引擎,不可移除',
|
||||
engineRegHelper: '此处填写模板语法:{url}表示文件路径,预览时会自动替换成对应的文件url;{b64url}表示base64机密后的路径,适用于kkfileview;',
|
||||
engineUsageHint: '对于一个文件的预览,使用第一个匹配到后缀名的引擎,没有配匹到则使用系统默认预览引擎',
|
||||
engineRegPlaceHolder: '例如:https://xxx.xxx.xxx?url={url}',
|
||||
engineSuffixPlaceHolder: '输入后缀,使用逗号分隔,不用带. 例如:doc,ppt,xls',
|
||||
previewCurrent: "本站预览",
|
||||
previewOpen: "新标签打开",
|
||||
editScan: "设置磁盘扫描",
|
||||
enableScan: "开启磁盘扫描",
|
||||
disabledScan: "暂未开启磁盘扫描",
|
||||
scanCron: "定时扫描",
|
||||
cron: "cron表达式",
|
||||
cronValidate: "cron表达式不能为空",
|
||||
scanScope: "扫描范围",
|
||||
scanUsers: "扫描用户",
|
||||
scanPerTenSeconds: "每十秒",
|
||||
scanPerThirtySeconds: "每三十秒",
|
||||
scanPerMinute: "每分钟",
|
||||
scanPerHour: "每小时",
|
||||
scanCustom: "自定义",
|
||||
chooseUsers: "模糊搜索用户",
|
||||
chooseUsersValidate: "请选择至少一个用户",
|
||||
scanLoading: "扫描中,请稍后...",
|
||||
matterBinDefaultTip: "设置0表示关闭回收站功能"
|
||||
previewCurrent: '本站预览',
|
||||
previewOpen: '新标签打开',
|
||||
editScan: '设置磁盘扫描',
|
||||
enableScan: '开启磁盘扫描',
|
||||
disabledScan: '暂未开启磁盘扫描',
|
||||
scanCron: '定时扫描',
|
||||
scanCronValidate: '定时扫描不能为空',
|
||||
cron: 'cron表达式',
|
||||
cronValidate: 'cron表达式不能为空',
|
||||
scanScope: '扫描范围',
|
||||
scanScopeValidate: '扫描范围不能为空',
|
||||
scanSpaces: '扫描空间',
|
||||
scanPerTenSeconds: '每十秒',
|
||||
scanPerThirtySeconds: '每三十秒',
|
||||
scanPerMinute: '每分钟',
|
||||
scanPerHour: '每小时',
|
||||
scanCustom: '自定义',
|
||||
chooseSpaces: '模糊搜索空间',
|
||||
chooseSpacesValidate: '请选择至少一个空间',
|
||||
scanLoading: '扫描中,请稍后...',
|
||||
matterBinDefaultTip: '设置0表示关闭回收站功能',
|
||||
scanImmediately: '立即扫描',
|
||||
},
|
||||
share: {
|
||||
shareDetail: "分享详情",
|
||||
shareTime: "分享时间",
|
||||
expireTime: "失效时间",
|
||||
noExpire: "永久有效",
|
||||
expired: "已过期",
|
||||
copyLinkAndCode: "复制链接+提取码",
|
||||
shareSuccess: "分享成功",
|
||||
sharer: "分享者",
|
||||
link: "链接",
|
||||
copyLink: "复制链接",
|
||||
code: "提取码",
|
||||
copyCode: "复制提取码",
|
||||
copySuccess: "复制成功",
|
||||
more: "更多",
|
||||
cancelShare: "取消分享",
|
||||
getLink: "获取链接",
|
||||
allFiles: "全部文件",
|
||||
noContent: "该目录下暂无任何内容",
|
||||
enterCode: "请输入提取码",
|
||||
getFiles: "提取文件",
|
||||
codeError: "提取码错误",
|
||||
cancelPrompt: "此操作将永久取消该分享, 是否继续?",
|
||||
hour: "1小时",
|
||||
day: "1天",
|
||||
week: "1周",
|
||||
month: "1个月",
|
||||
year: "1年",
|
||||
infinity: "永远有效",
|
||||
emptyHint: "暂无任何分享",
|
||||
shareDetail: '分享详情',
|
||||
shareTime: '分享时间',
|
||||
expireTime: '失效时间',
|
||||
noExpire: '永久有效',
|
||||
expired: '已过期',
|
||||
copyLinkAndCode: '复制链接+提取码',
|
||||
shareSuccess: '分享成功',
|
||||
sharer: '分享者',
|
||||
link: '链接',
|
||||
copyLink: '复制链接',
|
||||
code: '提取码',
|
||||
copyCode: '复制提取码',
|
||||
copySuccess: '复制成功',
|
||||
more: '更多',
|
||||
cancelShare: '取消分享',
|
||||
getLink: '获取链接',
|
||||
allFiles: '全部文件',
|
||||
noContent: '该目录下暂无任何内容',
|
||||
enterCode: '请输入提取码',
|
||||
getFiles: '提取文件',
|
||||
codeError: '提取码错误',
|
||||
cancelPrompt: '此操作将永久取消该分享, 是否继续?',
|
||||
hour: '1小时',
|
||||
day: '1天',
|
||||
week: '1周',
|
||||
month: '1个月',
|
||||
year: '1年',
|
||||
infinity: '永远有效',
|
||||
emptyHint: '暂无任何分享',
|
||||
},
|
||||
user: {
|
||||
redirecting: "正在转跳...",
|
||||
oldPassword: "旧密码",
|
||||
newPassword: "新密码",
|
||||
confirmNewPassword: "确认新密码",
|
||||
cannotBeNull: "不能为空!",
|
||||
passwordNotSame: "两次输入不一致!",
|
||||
role: "角色",
|
||||
singleFileSizeLimit: "单文件限制",
|
||||
totalFileSizeLimit: "空间限制",
|
||||
current: "当前值",
|
||||
noLimit: "无限制",
|
||||
totalFileSize: "已使用空间",
|
||||
status: "状态",
|
||||
lastLogin: "上次登录",
|
||||
lastLoginIp: "上次登录IP",
|
||||
lastLoginTime: "上次登录时间",
|
||||
resetPassword: "重置密码",
|
||||
transfiguration: "变身",
|
||||
changePassword: "修改密码",
|
||||
enterPassword: "输入密码",
|
||||
enterUsername: "请输入用户名",
|
||||
enterNewPassword: "请输入新密码",
|
||||
profile: "个人详情",
|
||||
avatar: "头像",
|
||||
username: "用户名",
|
||||
password: "密码",
|
||||
confirmPassword: "确认密码",
|
||||
disabled: "已禁用",
|
||||
disableUser: "禁用该用户",
|
||||
activeUser: "激活该用户",
|
||||
deleteUser: "删除该用户",
|
||||
deleteHint: "此操作将删除用户【{}】的所有记录,包括文件,分享,用户信息等内容,确定继续?",
|
||||
disable: "禁用",
|
||||
sync: "同步",
|
||||
active: "激活",
|
||||
welcomeLogin: "欢迎登录",
|
||||
logining: "正在登录...",
|
||||
login: "登录",
|
||||
loginSuccess: "登录成功",
|
||||
toToRegister: "立即注册",
|
||||
welcomeRegister: "欢迎注册",
|
||||
registering: "正在登录...",
|
||||
register: "注册",
|
||||
goToLogin: "前往登录",
|
||||
roleGuest: "游客",
|
||||
roleUser: "注册用户",
|
||||
roleAdministrator: "管理员",
|
||||
statusActive: "正常",
|
||||
statusDisabled: "禁用",
|
||||
webdavLink: "WebDAV 地址",
|
||||
docLink: "文档链接",
|
||||
createUser: "创建用户",
|
||||
editUser: "编辑用户",
|
||||
editSomebodyPassword: "修改{}的密码",
|
||||
transfigurationPromptText: "变身提示",
|
||||
transfigurationPrompt: "您将使用该用户的身份登录。请复制以下链接到其他浏览器访问,在当前浏览器访问会导致当前用户登录信息失效。",
|
||||
allUsers: "全部用户",
|
||||
partialUsers: "局部用户",
|
||||
searchUser: "搜索用户"
|
||||
redirecting: '正在转跳...',
|
||||
oldPassword: '旧密码',
|
||||
newPassword: '新密码',
|
||||
confirmNewPassword: '确认新密码',
|
||||
cannotBeNull: '不能为空!',
|
||||
passwordNotSame: '两次输入不一致!',
|
||||
role: '角色',
|
||||
singleFileSizeLimit: '单文件限制',
|
||||
totalFileSizeLimit: '空间限制',
|
||||
current: '当前值',
|
||||
noLimit: '无限制',
|
||||
totalFileSize: '已使用空间',
|
||||
status: '状态',
|
||||
lastLogin: '上次登录',
|
||||
lastLoginIp: '上次登录IP',
|
||||
lastLoginTime: '上次登录时间',
|
||||
resetPassword: '重置密码',
|
||||
transfiguration: '变身',
|
||||
changePassword: '修改密码',
|
||||
enterPassword: '输入密码',
|
||||
enterUsername: '请输入用户名',
|
||||
enterNewPassword: '请输入新密码',
|
||||
profile: '个人详情',
|
||||
avatar: '头像',
|
||||
username: '用户名',
|
||||
password: '密码',
|
||||
confirmPassword: '确认密码',
|
||||
disabled: '已禁用',
|
||||
disableUser: '禁用该用户',
|
||||
activeUser: '激活该用户',
|
||||
deleteUser: '删除该用户',
|
||||
deleteHint: '此操作将删除用户【{}】的所有记录,包括文件,分享,用户信息等内容,确定继续?',
|
||||
disable: '禁用',
|
||||
sync: '同步',
|
||||
active: '激活',
|
||||
welcomeLogin: '欢迎登录',
|
||||
logining: '正在登录...',
|
||||
login: '登录',
|
||||
loginSuccess: '登录成功',
|
||||
toToRegister: '立即注册',
|
||||
welcomeRegister: '欢迎注册',
|
||||
registering: '正在登录...',
|
||||
register: '注册',
|
||||
goToLogin: '前往登录',
|
||||
roleGuest: '游客',
|
||||
roleUser: '注册用户',
|
||||
roleUserRoleSpace: '用户空间角色',
|
||||
roleAdministrator: '管理员',
|
||||
statusActive: '正常',
|
||||
statusDisabled: '禁用',
|
||||
webdavLink: 'WebDAV 地址',
|
||||
docLink: '文档链接',
|
||||
createUser: '创建用户',
|
||||
editUser: '编辑用户',
|
||||
editSomebodyPassword: '修改{}的密码',
|
||||
transfigurationPromptText: '变身提示',
|
||||
transfigurationPrompt: '您将使用该用户的身份登录。请复制以下链接到其他浏览器访问,在当前浏览器访问会导致当前用户登录信息失效。',
|
||||
searchUser: '搜索用户',
|
||||
},
|
||||
space: {
|
||||
name: '共享空间',
|
||||
nameTip: '请输入空间名称,不可修改',
|
||||
create: '创建空间',
|
||||
totalSize: '已使用',
|
||||
sizeLimit: '单文件限制',
|
||||
sizeLimitTip: '请输入单文件大小限制',
|
||||
totalSizeLimit: '总大小限制',
|
||||
totalSizeLimitTip: '请输入总大小限制',
|
||||
deleteHint: '此操作将永久删除该空间, 请先删除空间所有文件和空间成员, 是否继续?',
|
||||
memberManage: '空间成员管理',
|
||||
member: '空间成员',
|
||||
memberTip: '请搜索选择用户',
|
||||
memberRole: '成员角色',
|
||||
memberRoleTip: '请选择成员角色',
|
||||
bindMember: '绑定空间成员',
|
||||
unBindMember: '解绑空间成员',
|
||||
unBindMemberHint: '此操作将解绑该空间成员, 是否继续?',
|
||||
memberRoleReadonly: '只读',
|
||||
memberRoleReadWrite: '可读写',
|
||||
memberRoleAdmin: '管理员',
|
||||
emptyHint: '暂无任何空间',
|
||||
allSpaces: '全部空间',
|
||||
partialSpaces: '局部空间',
|
||||
},
|
||||
model: {
|
||||
usernameRule: "用户名只能包含字母,数字和\"_\"",
|
||||
passwordRule: "密码长度至少为6位",
|
||||
linkCodeText: "链接:{} 提取码:{}",
|
||||
copyLinkCodeSuccess: "复制链接提取码成功",
|
||||
|
||||
usernameRule: '用户名只能包含字母,数字和"_"',
|
||||
passwordRule: '密码长度至少为6位',
|
||||
linkCodeText: '链接:{} 提取码:{}',
|
||||
copyLinkCodeSuccess: '复制链接提取码成功',
|
||||
},
|
||||
plugin: {
|
||||
cannotPreview: "无法预览",
|
||||
emptyHintDefault: "没有符合条件的项目",
|
||||
everyPage: "每页",
|
||||
items: "条",
|
||||
total: "共",
|
||||
clickRefresh: "点击刷新",
|
||||
cannotPreview: '无法预览',
|
||||
emptyHintDefault: '没有符合条件的项目',
|
||||
everyPage: '每页',
|
||||
items: '条',
|
||||
total: '共',
|
||||
clickRefresh: '点击刷新',
|
||||
},
|
||||
loading: "加载中",
|
||||
selectAll: "全选",
|
||||
edit: "修改",
|
||||
createTime: "创建时间",
|
||||
download: "下载",
|
||||
close: "关闭",
|
||||
required: "必填",
|
||||
cancel: "取消",
|
||||
delete: "删除",
|
||||
deleteDirectly: "直接删除",
|
||||
actionCanNotRevertConfirm: "此操作不可撤回, 是否继续?",
|
||||
actionDeleteConfirm: "确定删除吗?",
|
||||
actionRecoveryConfirm: "确定恢复吗?",
|
||||
prompt: "提示",
|
||||
confirm: "确定",
|
||||
copy: "复制",
|
||||
copySuccess: "复制成功!",
|
||||
copyError: "复制失败!",
|
||||
showMore: "显示更多",
|
||||
username: "用户名",
|
||||
password: "密码",
|
||||
submit: "提交",
|
||||
save: "保存",
|
||||
create: "创建",
|
||||
finish: "完成",
|
||||
operationSuccess: "操作成功",
|
||||
operation: "操作",
|
||||
notFound: "404 页面找不到",
|
||||
login: "登录",
|
||||
logout: "退出",
|
||||
yes: "是",
|
||||
no: "否",
|
||||
all: "所有",
|
||||
refresh: "刷新",
|
||||
inputRequired: "该项必填",
|
||||
|
||||
loading: '加载中',
|
||||
selectAll: '全选',
|
||||
edit: '修改',
|
||||
createTime: '创建时间',
|
||||
download: '下载',
|
||||
close: '关闭',
|
||||
required: '必填',
|
||||
cancel: '取消',
|
||||
delete: '删除',
|
||||
deleteDirectly: '直接删除',
|
||||
actionCanNotRevertConfirm: '此操作不可撤回, 是否继续?',
|
||||
actionDeleteConfirm: '确定删除吗?',
|
||||
actionRecoveryConfirm: '确定恢复吗?',
|
||||
prompt: '提示',
|
||||
confirm: '确定',
|
||||
copy: '复制',
|
||||
copySuccess: '复制成功!',
|
||||
copyError: '复制失败!',
|
||||
showMore: '显示更多',
|
||||
username: '用户名',
|
||||
password: '密码',
|
||||
submit: '提交',
|
||||
save: '保存',
|
||||
create: '创建',
|
||||
finish: '完成',
|
||||
operationSuccess: '操作成功',
|
||||
operation: '操作',
|
||||
notFound: '404 页面找不到',
|
||||
login: '登录',
|
||||
logout: '退出',
|
||||
yes: '是',
|
||||
no: '否',
|
||||
all: '所有',
|
||||
refresh: '刷新',
|
||||
inputRequired: '该项必填',
|
||||
selectRequired: '该项必选',
|
||||
more: '更多',
|
||||
}
|
||||
|
||||
export default LangZh
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import BaseEntity from '../../base/BaseEntity'
|
||||
import User from "../../user/User";
|
||||
import Matter from "../../matter/Matter";
|
||||
import InputFilter from "../../base/filter/InputFilter";
|
||||
import SafeUtil from "../../../util/SafeUtil";
|
||||
import BaseEntity from '../../base/BaseEntity';
|
||||
import User from '../../user/User';
|
||||
import Matter from '../../matter/Matter';
|
||||
import InputFilter from '../../base/filter/InputFilter';
|
||||
import SafeUtil from '../../../util/SafeUtil';
|
||||
|
||||
export default class ImageCache extends BaseEntity {
|
||||
|
||||
static URL_DELETE_BATCH = '/api/image/cache/delete/batch';
|
||||
|
||||
name: string | null = null;
|
||||
@@ -18,8 +17,8 @@ export default class ImageCache extends BaseEntity {
|
||||
path: number = 0;
|
||||
|
||||
/*
|
||||
这部分是辅助UI的字段信息
|
||||
*/
|
||||
这部分是辅助UI的字段信息
|
||||
*/
|
||||
//作为勾选变量
|
||||
check: boolean = false;
|
||||
|
||||
@@ -31,7 +30,7 @@ export default class ImageCache extends BaseEntity {
|
||||
}
|
||||
|
||||
getTAG(): string {
|
||||
return "imageCache";
|
||||
return 'imageCache';
|
||||
}
|
||||
|
||||
assign(obj: any) {
|
||||
@@ -41,31 +40,44 @@ export default class ImageCache extends BaseEntity {
|
||||
getFilters() {
|
||||
return [
|
||||
...super.getFilters(),
|
||||
new InputFilter("User Uuid", "userUuid", null, false),
|
||||
new InputFilter("File Uuid", "matterUuid", null, false),
|
||||
]
|
||||
new InputFilter('User Uuid', 'userUuid', null, false),
|
||||
new InputFilter('File Uuid', 'matterUuid', null, false),
|
||||
];
|
||||
}
|
||||
|
||||
getForm() {
|
||||
return {
|
||||
uuid: this.uuid ? this.uuid : null
|
||||
}
|
||||
uuid: this.uuid ? this.uuid : null,
|
||||
};
|
||||
}
|
||||
|
||||
getResizeUrl() {
|
||||
return '/api/alien/preview/' + this.matterUuid + '/' + this.matterName + "?ir=" + this.mode
|
||||
return (
|
||||
'/api/alien/preview/' +
|
||||
this.matterUuid +
|
||||
'/' +
|
||||
this.matterName +
|
||||
'?ir=' +
|
||||
this.mode
|
||||
);
|
||||
}
|
||||
|
||||
getOriginUrl() {
|
||||
return '/api/alien/download/' + this.matterUuid + '/' + this.matterName
|
||||
return '/api/alien/download/' + this.matterUuid + '/' + this.matterName;
|
||||
}
|
||||
|
||||
|
||||
httpDeleteBatch(uuids: string, successCallback?: () => any, errorCallback?: () => any) {
|
||||
this.httpPost(ImageCache.URL_DELETE_BATCH, {'uuids': uuids}, function (response: any) {
|
||||
SafeUtil.safeCallback(successCallback)(response)
|
||||
}, errorCallback)
|
||||
httpDeleteBatch(
|
||||
uuids: string,
|
||||
successCallback?: () => any,
|
||||
errorCallback?: () => any
|
||||
) {
|
||||
this.httpPost(
|
||||
ImageCache.URL_DELETE_BATCH,
|
||||
{ uuids: uuids },
|
||||
function (response: any) {
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,64 +1,57 @@
|
||||
import SafeUtil from '../../util/SafeUtil';
|
||||
import BaseEntity from '../base/BaseEntity';
|
||||
import User from "../user/User";
|
||||
import InstallTableInfo from "./InstallTableInfo";
|
||||
import Base from "../base/Base";
|
||||
import User from '../user/User';
|
||||
import InstallTableInfo from './InstallTableInfo';
|
||||
import Base from '../base/Base';
|
||||
|
||||
export default class Install extends BaseEntity {
|
||||
|
||||
static URL_VERIFY = '/api/install/verify'
|
||||
static URL_TABLE_INFO_LIST = '/api/install/table/info/list'
|
||||
static URL_ADMIN_LIST = '/api/install/admin/list'
|
||||
static URL_CREATE_TABLE = '/api/install/create/table'
|
||||
static URL_CREATE_ADMIN = '/api/install/create/admin'
|
||||
static URL_VALIDATE_ADMIN = '/api/install/validate/admin'
|
||||
static URL_FINISH = '/api/install/finish'
|
||||
static URL_VERIFY = '/api/install/verify';
|
||||
static URL_TABLE_INFO_LIST = '/api/install/table/info/list';
|
||||
static URL_ADMIN_LIST = '/api/install/admin/list';
|
||||
static URL_CREATE_TABLE = '/api/install/create/table';
|
||||
static URL_CREATE_ADMIN = '/api/install/create/admin';
|
||||
static URL_VALIDATE_ADMIN = '/api/install/validate/admin';
|
||||
static URL_FINISH = '/api/install/finish';
|
||||
|
||||
//数据库类型
|
||||
dbType: string = "mysql"
|
||||
dbType: string = 'mysql';
|
||||
|
||||
//数据库名
|
||||
mysqlPort: number = 3306
|
||||
mysqlHost: string = "127.0.0.1"
|
||||
mysqlSchema: string = "tank"
|
||||
mysqlUsername: string = "tank"
|
||||
mysqlPassword: string | null = null
|
||||
mysqlCharset: string = "utf8"
|
||||
mysqlPort: number = 3306;
|
||||
mysqlHost: string = '127.0.0.1';
|
||||
mysqlSchema: string = 'tank';
|
||||
mysqlUsername: string = 'tank';
|
||||
mysqlPassword: string | null = null;
|
||||
mysqlCharset: string = 'utf8';
|
||||
|
||||
//管理员用户名
|
||||
adminUsername: string | null = null
|
||||
adminPassword: string | null = null
|
||||
adminRepassword: string | null = null
|
||||
adminUsername: string | null = null;
|
||||
adminPassword: string | null = null;
|
||||
adminRepassword: string | null = null;
|
||||
|
||||
//表元信息
|
||||
tableInfoList: InstallTableInfo[] = []
|
||||
tableInfoList: InstallTableInfo[] = [];
|
||||
|
||||
//管理员列表
|
||||
adminList: User[] = []
|
||||
adminList: User[] = [];
|
||||
|
||||
//数据库连接是否可用
|
||||
verified: boolean = false
|
||||
verified: boolean = false;
|
||||
//管理员配置完毕
|
||||
adminConfigured: boolean = false
|
||||
|
||||
adminConfigured: boolean = false;
|
||||
|
||||
constructor(reactComponent?: React.Component) {
|
||||
|
||||
super(reactComponent);
|
||||
|
||||
}
|
||||
|
||||
assign(obj: any) {
|
||||
super.assign(obj);
|
||||
|
||||
}
|
||||
|
||||
|
||||
getTAG():string {
|
||||
return "install"
|
||||
getTAG(): string {
|
||||
return 'install';
|
||||
}
|
||||
|
||||
|
||||
getMysqlForm() {
|
||||
return {
|
||||
dbType: this.dbType,
|
||||
@@ -68,7 +61,7 @@ export default class Install extends BaseEntity {
|
||||
mysqlUsername: this.mysqlUsername,
|
||||
mysqlPassword: this.mysqlPassword,
|
||||
mysqlCharset: this.mysqlCharset,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
getForm() {
|
||||
@@ -82,23 +75,22 @@ export default class Install extends BaseEntity {
|
||||
mysqlCharset: this.mysqlCharset,
|
||||
adminUsername: this.adminUsername,
|
||||
adminPassword: this.adminPassword,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
//表创建完毕
|
||||
tableCreated() {
|
||||
if (!this.tableInfoList || this.tableInfoList.length === 0) {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
for (let i = 0; i < this.tableInfoList.length; i++) {
|
||||
let tableInfo = this.tableInfoList[i]
|
||||
let tableInfo = this.tableInfoList[i];
|
||||
if (!tableInfo.tableExist) {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
|
||||
if (tableInfo.tableExist && tableInfo.missingFields.length !== 0) {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,143 +98,184 @@ export default class Install extends BaseEntity {
|
||||
}
|
||||
|
||||
httpVerify(successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
let that = this
|
||||
let that = this;
|
||||
|
||||
this.httpPost(Install.URL_VERIFY, this.getMysqlForm(), function (response: any) {
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
|
||||
}, errorCallback)
|
||||
this.httpPost(
|
||||
Install.URL_VERIFY,
|
||||
this.getMysqlForm(),
|
||||
function (response: any) {
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback
|
||||
);
|
||||
}
|
||||
|
||||
httpTableInfoList(successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
let that = this
|
||||
httpTableInfoList(
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
|
||||
if (!this.verified) {
|
||||
this.defaultErrorHandler("Please verify mysql first", errorCallback)
|
||||
return
|
||||
this.defaultErrorHandler('Please verify mysql first', errorCallback);
|
||||
return;
|
||||
}
|
||||
|
||||
this.httpPost(Install.URL_TABLE_INFO_LIST, this.getForm(), function (response: any) {
|
||||
this.httpPost(
|
||||
Install.URL_TABLE_INFO_LIST,
|
||||
this.getForm(),
|
||||
function (response: any) {
|
||||
that.tableInfoList.splice(0, that.tableInfoList.length);
|
||||
let list = Base.renderList(response.data.data, InstallTableInfo);
|
||||
that.tableInfoList.push(...list);
|
||||
|
||||
that.tableInfoList.splice(0, that.tableInfoList.length);
|
||||
let list = Base.renderList(response.data.data, InstallTableInfo);
|
||||
that.tableInfoList.push(...list)
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
}, errorCallback, finalCallback)
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback,
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
httpCreateTable(successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
let that = this
|
||||
httpCreateTable(
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
|
||||
if (!this.verified) {
|
||||
this.defaultErrorHandler("Please verify mysql first", errorCallback)
|
||||
return
|
||||
this.defaultErrorHandler('Please verify mysql first', errorCallback);
|
||||
return;
|
||||
}
|
||||
|
||||
this.httpPost(Install.URL_CREATE_TABLE, this.getForm(), function (response: any) {
|
||||
this.httpPost(
|
||||
Install.URL_CREATE_TABLE,
|
||||
this.getForm(),
|
||||
function (response: any) {
|
||||
that.tableInfoList.splice(0, that.tableInfoList.length);
|
||||
that.tableInfoList.push(...response.data.data);
|
||||
|
||||
that.tableInfoList.splice(0, that.tableInfoList.length);
|
||||
that.tableInfoList.push(...response.data.data)
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
}, errorCallback, finalCallback)
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback,
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
//获取管理员列表
|
||||
httpAdminList(successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
let that = this
|
||||
httpAdminList(
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
|
||||
if (!this.tableCreated()) {
|
||||
this.defaultErrorHandler("Please verify create table first", errorCallback)
|
||||
return
|
||||
this.defaultErrorHandler(
|
||||
'Please verify create table first',
|
||||
errorCallback
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
let form = this.getForm();
|
||||
|
||||
let form = this.getForm()
|
||||
|
||||
|
||||
this.httpPost(Install.URL_ADMIN_LIST, form, function (response: any) {
|
||||
|
||||
that.adminList = BaseEntity.renderList(response.data.data, User)
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
}, errorCallback, finalCallback)
|
||||
this.httpPost(
|
||||
Install.URL_ADMIN_LIST,
|
||||
form,
|
||||
function (response: any) {
|
||||
that.adminList = BaseEntity.renderList(response.data.data, User);
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback,
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
httpCreateAdmin(successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
let that = this
|
||||
httpCreateAdmin(
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
|
||||
if (!this.tableCreated()) {
|
||||
this.defaultErrorHandler("Please verify create table first", errorCallback)
|
||||
return
|
||||
this.defaultErrorHandler(
|
||||
'Please verify create table first',
|
||||
errorCallback
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (this.adminPassword !== this.adminRepassword) {
|
||||
this.defaultErrorHandler("password not same", errorCallback)
|
||||
return
|
||||
this.defaultErrorHandler('password not same', errorCallback);
|
||||
return;
|
||||
}
|
||||
|
||||
let form = this.getForm();
|
||||
|
||||
let form = this.getForm()
|
||||
|
||||
this.httpPost(Install.URL_CREATE_ADMIN, form, function (response: any) {
|
||||
|
||||
that.adminConfigured = true
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
}, errorCallback, finalCallback)
|
||||
this.httpPost(
|
||||
Install.URL_CREATE_ADMIN,
|
||||
form,
|
||||
function (response: any) {
|
||||
that.adminConfigured = true;
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback,
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//验证管理员账号
|
||||
httpValidateAdmin(successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
let that = this
|
||||
httpValidateAdmin(
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
|
||||
if (!this.tableCreated()) {
|
||||
this.defaultErrorHandler("Please verify create table first", errorCallback)
|
||||
return
|
||||
this.defaultErrorHandler(
|
||||
'Please verify create table first',
|
||||
errorCallback
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.adminUsername || !this.adminPassword) {
|
||||
this.defaultErrorHandler("username and password required", errorCallback)
|
||||
return
|
||||
this.defaultErrorHandler('username and password required', errorCallback);
|
||||
return;
|
||||
}
|
||||
|
||||
let form = this.getForm()
|
||||
let form = this.getForm();
|
||||
|
||||
this.httpPost(Install.URL_VALIDATE_ADMIN, form, function (response: any) {
|
||||
|
||||
that.adminConfigured = true
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
}, errorCallback, finalCallback)
|
||||
this.httpPost(
|
||||
Install.URL_VALIDATE_ADMIN,
|
||||
form,
|
||||
function (response: any) {
|
||||
that.adminConfigured = true;
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback,
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//完成安装过程
|
||||
httpFinish(successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
let that = this
|
||||
let that = this;
|
||||
|
||||
let form = this.getForm();
|
||||
|
||||
let form = this.getForm()
|
||||
|
||||
this.httpPost(Install.URL_FINISH, form, function (response: any) {
|
||||
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
}, errorCallback, finalCallback)
|
||||
this.httpPost(
|
||||
Install.URL_FINISH,
|
||||
form,
|
||||
function (response: any) {
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback,
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import Base from "../base/Base";
|
||||
import Base from '../base/Base';
|
||||
|
||||
export default class InstallFieldInfo extends Base{
|
||||
|
||||
name: string = "";
|
||||
export default class InstallFieldInfo extends Base {
|
||||
name: string = '';
|
||||
dataType: boolean = false;
|
||||
|
||||
assign(obj: any) {
|
||||
super.assign(obj);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import Base from "../base/Base";
|
||||
import InstallFieldInfo from "./InstallFieldInfo";
|
||||
import Base from '../base/Base';
|
||||
import InstallFieldInfo from './InstallFieldInfo';
|
||||
|
||||
export default class InstallTableInfo extends Base {
|
||||
|
||||
name: string = "";
|
||||
name: string = '';
|
||||
tableExist: boolean = false;
|
||||
allFields: InstallFieldInfo[] = [];
|
||||
missingFields: InstallFieldInfo[] = [];
|
||||
@@ -11,9 +10,7 @@ export default class InstallTableInfo extends Base {
|
||||
assign(obj: any) {
|
||||
super.assign(obj);
|
||||
|
||||
this.assignList("allFields", InstallFieldInfo);
|
||||
this.assignList("missingFields", InstallFieldInfo);
|
||||
this.assignList('allFields', InstallFieldInfo);
|
||||
this.assignList('missingFields', InstallFieldInfo);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,28 +1,30 @@
|
||||
import { message } from "antd";
|
||||
import axios, { CancelTokenSource } from "axios";
|
||||
import BaseEntity from "../base/BaseEntity";
|
||||
import Filter from "../base/filter/Filter";
|
||||
import HttpUtil from "../../util/HttpUtil";
|
||||
import FileHelper from "../../util/FileHelper";
|
||||
import ImageUtil from "../../util/ImageUtil";
|
||||
import EnvUtil from "../../util/EnvUtil";
|
||||
import InputFilter from "../base/filter/InputFilter";
|
||||
import CheckFilter from "../base/filter/CheckFilter";
|
||||
import SortFilter from "../base/filter/SortFilter";
|
||||
import MimeUtil from "../../util/MimeUtil";
|
||||
import StringUtil from "../../util/StringUtil";
|
||||
import NumberUtil from "../../util/NumberUtil";
|
||||
import SafeUtil from "../../util/SafeUtil";
|
||||
import ImagePreviewer from "../../../pages/widget/previewer/ImagePreviewer";
|
||||
import MessageBoxUtil from "../../util/MessageBoxUtil";
|
||||
import PreviewerHelper from "../../../pages/widget/previewer/PreviewerHelper";
|
||||
import { message } from 'antd';
|
||||
import axios, { CancelTokenSource } from 'axios';
|
||||
import BaseEntity from '../base/BaseEntity';
|
||||
import Filter from '../base/filter/Filter';
|
||||
import HttpUtil from '../../util/HttpUtil';
|
||||
import FileUtil from '../../util/FileUtil';
|
||||
import ImageUtil from '../../util/ImageUtil';
|
||||
import EnvUtil from '../../util/EnvUtil';
|
||||
import InputFilter from '../base/filter/InputFilter';
|
||||
import CheckFilter from '../base/filter/CheckFilter';
|
||||
import SortFilter from '../base/filter/SortFilter';
|
||||
import MimeUtil from '../../util/MimeUtil';
|
||||
import StringUtil from '../../util/StringUtil';
|
||||
import NumberUtil from '../../util/NumberUtil';
|
||||
import SafeUtil from '../../util/SafeUtil';
|
||||
import ImagePreviewer from '../../../pages/widget/previewer/ImagePreviewer';
|
||||
import MessageBoxUtil from '../../util/MessageBoxUtil';
|
||||
import PreviewerHelper from '../../../pages/widget/previewer/PreviewerHelper';
|
||||
import HttpBase from '../base/HttpBase';
|
||||
import User from "../user/User";
|
||||
|
||||
export default class Matter extends BaseEntity {
|
||||
puuid: string = "";
|
||||
userUuid: string = "";
|
||||
puuid: string = '';
|
||||
userUuid: string = '';
|
||||
dir: boolean = false;
|
||||
alien: boolean = false;
|
||||
name: string = "";
|
||||
name: string = '';
|
||||
md5: string | null = null;
|
||||
size: number = 0;
|
||||
privacy: boolean = true;
|
||||
@@ -31,19 +33,21 @@ export default class Matter extends BaseEntity {
|
||||
//上次访问时间
|
||||
visitTime: Date | null = null;
|
||||
parent: Matter | null = null;
|
||||
user: User = new User();
|
||||
// 文件是否被软删除
|
||||
deleted: boolean = false;
|
||||
deleteTime: Date | null = null;
|
||||
spaceUuid: string | null = null;
|
||||
|
||||
/*
|
||||
这部分是辅助UI的字段信息
|
||||
*/
|
||||
这部分是辅助UI的字段信息
|
||||
*/
|
||||
//作为勾选变量
|
||||
check: boolean = false;
|
||||
editMode: boolean = false;
|
||||
|
||||
//允许用户选择的文件类型
|
||||
filter: string = "*";
|
||||
filter: string = '*';
|
||||
//本地字段
|
||||
//给用户的提示文字
|
||||
uploadHint: string | null = null;
|
||||
@@ -56,26 +60,28 @@ export default class Matter extends BaseEntity {
|
||||
//取消上传source
|
||||
cancelSource: CancelTokenSource = axios.CancelToken.source();
|
||||
|
||||
static URL_MATTER_CREATE_DIRECTORY = "/api/matter/create/directory";
|
||||
static URL_MATTER_SOFT_DELETE = "/api/matter/soft/delete";
|
||||
static URL_MATTER_SOFT_DELETE_BATCH = "/api/matter/soft/delete/batch";
|
||||
static URL_MATTER_RECOVERY = "/api/matter/recovery";
|
||||
static URL_MATTER_RECOVERY_BATCH = "/api/matter/recovery/batch";
|
||||
static URL_MATTER_DELETE = "/api/matter/delete";
|
||||
static URL_MATTER_DELETE_BATCH = "/api/matter/delete/batch";
|
||||
static URL_MATTER_RENAME = "/api/matter/rename";
|
||||
static URL_CHANGE_PRIVACY = "/api/matter/change/privacy";
|
||||
static URL_MATTER_MOVE = "/api/matter/move";
|
||||
static URL_MATTER_DOWNLOAD = "/api/matter/download";
|
||||
static URL_MATTER_UPLOAD = "/api/matter/upload";
|
||||
static URL_MATTER_ZIP = "/api/matter/zip";
|
||||
static URL_MATTER_CREATE_DIRECTORY = '/api/matter/create/directory';
|
||||
static URL_MATTER_SOFT_DELETE = '/api/matter/soft/delete';
|
||||
static URL_MATTER_SOFT_DELETE_BATCH = '/api/matter/soft/delete/batch';
|
||||
static URL_MATTER_RECOVERY = '/api/matter/recovery';
|
||||
static URL_MATTER_RECOVERY_BATCH = '/api/matter/recovery/batch';
|
||||
static URL_MATTER_DELETE = '/api/matter/delete';
|
||||
static URL_MATTER_DELETE_BATCH = '/api/matter/delete/batch';
|
||||
static URL_MATTER_RENAME = '/api/matter/rename';
|
||||
static URL_CHANGE_PRIVACY = '/api/matter/change/privacy';
|
||||
static URL_MATTER_MOVE = '/api/matter/move';
|
||||
static URL_MATTER_UPLOAD = '/api/matter/upload';
|
||||
static URL_MATTER_ZIP = '/api/matter/zip';
|
||||
static URL_MATTER_CRAWL = '/api/matter/crawl';
|
||||
|
||||
static MATTER_ROOT = "root";
|
||||
static MATTER_ROOT = 'root';
|
||||
|
||||
//下载zip包
|
||||
static downloadZip(uuidsString: string) {
|
||||
static downloadZip(uuidsString: string, spaceUuid: string) {
|
||||
window.open(
|
||||
EnvUtil.currentHost() + Matter.URL_MATTER_ZIP + "?uuids=" + uuidsString
|
||||
`${EnvUtil.currentHost()}${
|
||||
Matter.URL_MATTER_ZIP
|
||||
}?uuids=${uuidsString}&spaceUuid=${spaceUuid}`
|
||||
);
|
||||
}
|
||||
|
||||
@@ -85,14 +91,16 @@ export default class Matter extends BaseEntity {
|
||||
|
||||
assign(obj: any) {
|
||||
super.assign(obj);
|
||||
this.assignEntity("parent", Matter);
|
||||
this.assignEntity("visitTime", Date);
|
||||
this.assignEntity("deleteTime", Date);
|
||||
this.assignEntity('parent', Matter);
|
||||
this.assignEntity('user', User);
|
||||
this.assignEntity('visitTime', Date);
|
||||
this.assignEntity('deleteTime', Date);
|
||||
}
|
||||
|
||||
getTAG():string {
|
||||
return "matter"
|
||||
getTAG(): string {
|
||||
return 'matter';
|
||||
}
|
||||
|
||||
getForm(): any {
|
||||
return {
|
||||
userUuid: this.userUuid,
|
||||
@@ -113,69 +121,38 @@ export default class Matter extends BaseEntity {
|
||||
getFilters(): Filter[] {
|
||||
return [
|
||||
...super.getFilters(),
|
||||
new InputFilter("父级菜单uuid", "puuid", null, false),
|
||||
new InputFilter("用户", "userUuid", null, false),
|
||||
new InputFilter("关键字", "name"),
|
||||
new CheckFilter("文件夹", "dir"),
|
||||
new CheckFilter("应用数据", "alien"),
|
||||
new CheckFilter("删除", "deleted"),
|
||||
new SortFilter("文件夹", "orderDir"),
|
||||
new SortFilter("下载次数", "orderTimes"),
|
||||
new SortFilter("大小", "orderSize"),
|
||||
new SortFilter("名称", "orderName"),
|
||||
new InputFilter("后缀名", "extensions"),
|
||||
new InputFilter("分享uuid", "shareUuid"),
|
||||
new InputFilter("提取码", "shareCode"),
|
||||
new InputFilter("分享根目录", "shareRootUuid"),
|
||||
new SortFilter("删除时间排序", "orderDeleteTime"),
|
||||
new InputFilter('父级菜单uuid', 'puuid', null, false),
|
||||
new InputFilter('用户', 'userUuid', null, false),
|
||||
new InputFilter('关键字', 'name'),
|
||||
new CheckFilter('文件夹', 'dir'),
|
||||
new CheckFilter('应用数据', 'alien'),
|
||||
new CheckFilter('删除', 'deleted'),
|
||||
new SortFilter('文件夹', 'orderDir'),
|
||||
new SortFilter('下载次数', 'orderTimes'),
|
||||
new SortFilter('大小', 'orderSize'),
|
||||
new SortFilter('名称', 'orderName'),
|
||||
new InputFilter('后缀名', 'extensions'),
|
||||
new InputFilter('分享uuid', 'shareUuid'),
|
||||
new InputFilter('提取码', 'shareCode'),
|
||||
new InputFilter('分享根目录', 'shareRootUuid'),
|
||||
new SortFilter('删除时间排序', 'orderDeleteTime'),
|
||||
new InputFilter('空间uuid', 'spaceUuid'),
|
||||
];
|
||||
}
|
||||
|
||||
getUrlPrefix() {
|
||||
return "/api/matter";
|
||||
return '/api/matter';
|
||||
}
|
||||
|
||||
isImage() {
|
||||
return FileHelper.isImage(this.name);
|
||||
}
|
||||
|
||||
isPdf() {
|
||||
return FileHelper.isPdf(this.name);
|
||||
}
|
||||
|
||||
isText() {
|
||||
return FileHelper.isText(this.name);
|
||||
}
|
||||
|
||||
isDoc() {
|
||||
return FileHelper.isDoc(this.name);
|
||||
}
|
||||
|
||||
isPpt() {
|
||||
return FileHelper.isPpt(this.name);
|
||||
}
|
||||
|
||||
isXls() {
|
||||
return FileHelper.isXls(this.name);
|
||||
}
|
||||
|
||||
isAudio() {
|
||||
return FileHelper.isAudio(this.name);
|
||||
}
|
||||
|
||||
isVideo() {
|
||||
return FileHelper.isVideo(this.name);
|
||||
}
|
||||
|
||||
isPsd() {
|
||||
return FileHelper.isPsd(this.name);
|
||||
return FileUtil.isImage(this.name);
|
||||
}
|
||||
|
||||
getIcon() {
|
||||
if (FileHelper.isImage(this.name)) {
|
||||
if (FileUtil.isImage(this.name)) {
|
||||
return ImageUtil.handleImageUrl(this.getPreviewUrl(), false, 100, 100);
|
||||
} else {
|
||||
return FileHelper.getIcon(this.name, this.dir);
|
||||
return FileUtil.getIcon(this.name, this.dir);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,14 +191,18 @@ export default class Matter extends BaseEntity {
|
||||
finallyCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
let form = { userUuid: that.userUuid, name: that.name, puuid: that.puuid };
|
||||
let form = {
|
||||
name: this.name,
|
||||
puuid: this.puuid,
|
||||
spaceUuid: this.spaceUuid,
|
||||
};
|
||||
|
||||
return this.httpPost(
|
||||
Matter.URL_MATTER_CREATE_DIRECTORY,
|
||||
form,
|
||||
function (response: any) {
|
||||
that.assign(response.data.data);
|
||||
typeof successCallback === "function" && successCallback(response);
|
||||
typeof successCallback === 'function' && successCallback(response);
|
||||
},
|
||||
errorCallback,
|
||||
finallyCallback
|
||||
@@ -231,24 +212,25 @@ export default class Matter extends BaseEntity {
|
||||
httpSoftDelete(successCallback?: any, errorCallback?: any) {
|
||||
this.httpPost(
|
||||
Matter.URL_MATTER_SOFT_DELETE,
|
||||
{ uuid: this.uuid },
|
||||
{ uuid: this.uuid, spaceUuid: this.spaceUuid },
|
||||
function (response: any) {
|
||||
typeof successCallback === "function" && successCallback(response);
|
||||
typeof successCallback === 'function' && successCallback(response);
|
||||
},
|
||||
errorCallback
|
||||
);
|
||||
}
|
||||
|
||||
httpSoftDeleteBatch(
|
||||
static httpSoftDeleteBatch(
|
||||
uuids: string,
|
||||
spaceUuid: string,
|
||||
successCallback?: any,
|
||||
errorCallback?: any
|
||||
) {
|
||||
this.httpPost(
|
||||
new HttpBase().httpPost(
|
||||
Matter.URL_MATTER_SOFT_DELETE_BATCH,
|
||||
{ uuids: uuids },
|
||||
{ uuids, spaceUuid },
|
||||
function (response: any) {
|
||||
typeof successCallback === "function" && successCallback(response);
|
||||
typeof successCallback === 'function' && successCallback(response);
|
||||
},
|
||||
errorCallback
|
||||
);
|
||||
@@ -257,20 +239,47 @@ export default class Matter extends BaseEntity {
|
||||
httpDelete(successCallback?: any, errorCallback?: any) {
|
||||
this.httpPost(
|
||||
Matter.URL_MATTER_DELETE,
|
||||
{ uuid: this.uuid },
|
||||
{ uuid: this.uuid, spaceUuid: this.spaceUuid },
|
||||
function (response: any) {
|
||||
typeof successCallback === "function" && successCallback(response);
|
||||
typeof successCallback === 'function' && successCallback(response);
|
||||
},
|
||||
errorCallback
|
||||
);
|
||||
}
|
||||
|
||||
httpDeleteBatch(uuids: string, successCallback?: any, errorCallback?: any) {
|
||||
this.httpPost(
|
||||
Matter.URL_MATTER_DELETE_BATCH,
|
||||
{ uuids: uuids },
|
||||
static httpCrawl(
|
||||
body: {
|
||||
url: string;
|
||||
puuid: string;
|
||||
filename: string;
|
||||
spaceUuid: string;
|
||||
},
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finallyCallback?: any
|
||||
) {
|
||||
new HttpBase().httpPost(
|
||||
Matter.URL_MATTER_CRAWL,
|
||||
body,
|
||||
function (response: any) {
|
||||
typeof successCallback === "function" && successCallback(response);
|
||||
typeof successCallback === 'function' && successCallback(response);
|
||||
},
|
||||
errorCallback,
|
||||
finallyCallback
|
||||
);
|
||||
}
|
||||
|
||||
static httpDeleteBatch(
|
||||
uuids: string,
|
||||
spaceUuid: string,
|
||||
successCallback?: any,
|
||||
errorCallback?: any
|
||||
) {
|
||||
new HttpBase().httpPost(
|
||||
Matter.URL_MATTER_DELETE_BATCH,
|
||||
{ uuids, spaceUuid },
|
||||
function (response: any) {
|
||||
typeof successCallback === 'function' && successCallback(response);
|
||||
},
|
||||
errorCallback
|
||||
);
|
||||
@@ -281,23 +290,70 @@ export default class Matter extends BaseEntity {
|
||||
Matter.URL_MATTER_RECOVERY,
|
||||
{ uuid: this.uuid },
|
||||
function (response: any) {
|
||||
typeof successCallback === "function" && successCallback(response);
|
||||
typeof successCallback === 'function' && successCallback(response);
|
||||
},
|
||||
errorCallback
|
||||
);
|
||||
}
|
||||
|
||||
httpRecoveryBatch(uuids: string, successCallback?: any, errorCallback?: any) {
|
||||
this.httpPost(
|
||||
static httpRecoveryBatch(
|
||||
uuids: string,
|
||||
successCallback?: any,
|
||||
errorCallback?: any
|
||||
) {
|
||||
new HttpBase().httpPost(
|
||||
Matter.URL_MATTER_RECOVERY_BATCH,
|
||||
{ uuids: uuids },
|
||||
function (response: any) {
|
||||
typeof successCallback === "function" && successCallback(response);
|
||||
typeof successCallback === 'function' && successCallback(response);
|
||||
},
|
||||
errorCallback
|
||||
);
|
||||
}
|
||||
|
||||
httpDetail(
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finallyCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
if (!this.uuid) {
|
||||
this.errorMessage = 'uuid未指定,无法获取到详情!';
|
||||
|
||||
this.defaultErrorHandler(this.errorMessage, errorCallback);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
this.detailLoading = true;
|
||||
|
||||
this.httpGet(
|
||||
this.getUrlDetail(),
|
||||
{
|
||||
uuid: this.uuid,
|
||||
spaceUuid: this.spaceUuid,
|
||||
},
|
||||
function (response: any) {
|
||||
that.detailLoading = false;
|
||||
|
||||
that.assign(response.data.data);
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
function (response: any) {
|
||||
that.detailLoading = false;
|
||||
|
||||
if (typeof errorCallback === 'function') {
|
||||
errorCallback(that.getErrorMessage(response), response);
|
||||
} else {
|
||||
//没有传入错误处理的方法就采用默认处理方法:toast弹出该错误信息。
|
||||
that.defaultErrorHandler(response);
|
||||
}
|
||||
},
|
||||
finallyCallback
|
||||
);
|
||||
}
|
||||
|
||||
httpRename(
|
||||
name: string,
|
||||
successCallback?: any,
|
||||
@@ -307,10 +363,10 @@ export default class Matter extends BaseEntity {
|
||||
let that = this;
|
||||
this.httpPost(
|
||||
Matter.URL_MATTER_RENAME,
|
||||
{ uuid: this.uuid, name: name },
|
||||
{ uuid: this.uuid, spaceUuid: this.spaceUuid, name: name },
|
||||
function (response: any) {
|
||||
that.assign(response.data.data);
|
||||
typeof successCallback === "function" && successCallback(response);
|
||||
typeof successCallback === 'function' && successCallback(response);
|
||||
},
|
||||
errorCallback,
|
||||
finallyCallback
|
||||
@@ -325,10 +381,10 @@ export default class Matter extends BaseEntity {
|
||||
let that = this;
|
||||
this.httpPost(
|
||||
Matter.URL_CHANGE_PRIVACY,
|
||||
{ uuid: this.uuid, privacy: privacy },
|
||||
{ uuid: this.uuid, privacy: privacy, spaceUuid: this.spaceUuid },
|
||||
function (response: any) {
|
||||
that.privacy = privacy;
|
||||
if (typeof successCallback === "function") {
|
||||
if (typeof successCallback === 'function') {
|
||||
successCallback(response);
|
||||
message.success(response.data.msg);
|
||||
} else {
|
||||
@@ -339,42 +395,43 @@ export default class Matter extends BaseEntity {
|
||||
);
|
||||
}
|
||||
|
||||
httpMove(
|
||||
static httpMove(
|
||||
spaceUuid: string,
|
||||
srcUuids: string,
|
||||
destUuid: string,
|
||||
successCallback?: any,
|
||||
errorCallback?: any
|
||||
) {
|
||||
let form: any = { srcUuids: srcUuids };
|
||||
let form: any = { spaceUuid, srcUuids };
|
||||
if (destUuid) {
|
||||
form.destUuid = destUuid;
|
||||
} else {
|
||||
form.destUuid = "root";
|
||||
form.destUuid = 'root';
|
||||
}
|
||||
this.httpPost(
|
||||
new HttpBase().httpPost(
|
||||
Matter.URL_MATTER_MOVE,
|
||||
form,
|
||||
function (response: any) {
|
||||
typeof successCallback === "function" && successCallback(response);
|
||||
typeof successCallback === 'function' && successCallback(response);
|
||||
},
|
||||
errorCallback
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
以下是和上传相关的内容。
|
||||
*/
|
||||
以下是和上传相关的内容。
|
||||
*/
|
||||
|
||||
//从file中装填metaData
|
||||
validate() {
|
||||
if (!this.file) {
|
||||
this.errorMessage = "请选择上传文件";
|
||||
this.errorMessage = '请选择上传文件';
|
||||
return false;
|
||||
}
|
||||
|
||||
this.name = this.file.name;
|
||||
if (!this.name) {
|
||||
this.errorMessage = "请选择上传文件";
|
||||
this.errorMessage = '请选择上传文件';
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -387,12 +444,12 @@ export default class Matter extends BaseEntity {
|
||||
//验证过滤器有没有误填写,这个方法主要给开发者使用。
|
||||
validateFilter() {
|
||||
let filter = this.filter;
|
||||
if (filter === null || filter === "") {
|
||||
this.errorMessage = "过滤器设置错误,请检查-1";
|
||||
console.error("过滤器设置错误,请检查.-1");
|
||||
if (filter === null || filter === '') {
|
||||
this.errorMessage = '过滤器设置错误,请检查-1';
|
||||
console.error('过滤器设置错误,请检查.-1');
|
||||
return false;
|
||||
}
|
||||
if (filter !== "*") {
|
||||
if (filter !== '*') {
|
||||
let regex1 = /^(image|audio|video|text)(\|(image|audio|video|text))*$/g;
|
||||
let regex2 = /^(\.[\w]+)(\|\.[\w]+)*$/;
|
||||
// 测试几种特殊类型 image|audio|video|text
|
||||
@@ -400,8 +457,8 @@ export default class Matter extends BaseEntity {
|
||||
if (!regex1.test(filter)) {
|
||||
//测试后缀名
|
||||
if (!regex2.test(filter)) {
|
||||
this.errorMessage = "过滤器设置错误,请检查-2";
|
||||
console.error("过滤器设置错误,请检查.-2");
|
||||
this.errorMessage = '过滤器设置错误,请检查-2';
|
||||
console.error('过滤器设置错误,请检查.-2');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -411,8 +468,8 @@ export default class Matter extends BaseEntity {
|
||||
let privacy = this.privacy;
|
||||
if (!privacy) {
|
||||
if (privacy !== false) {
|
||||
this.errorMessage = "privacy属性为Boolean类型";
|
||||
console.error("privacy属性为Boolean类型.");
|
||||
this.errorMessage = 'privacy属性为Boolean类型';
|
||||
console.error('privacy属性为Boolean类型.');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -423,28 +480,28 @@ export default class Matter extends BaseEntity {
|
||||
//验证用户上传的文件是否符合过滤器
|
||||
validateFileType() {
|
||||
if (!this.filter) {
|
||||
this.errorMessage = "该过滤条件有问题";
|
||||
this.errorMessage = '该过滤条件有问题';
|
||||
return false;
|
||||
}
|
||||
if (this.filter === "*") {
|
||||
if (this.filter === '*') {
|
||||
this.errorMessage = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
let type = MimeUtil.getMimeType(this.name);
|
||||
let extension = MimeUtil.getExtension(this.name);
|
||||
let simpleType = type.substring(0, type.indexOf("/"));
|
||||
let simpleType = type.substring(0, type.indexOf('/'));
|
||||
|
||||
//专门解决android微信浏览器中名字乱命名的bug.
|
||||
if (StringUtil.startWith(this.name, "image%3A")) {
|
||||
extension = "jpg";
|
||||
simpleType = "image";
|
||||
} else if (StringUtil.startWith(this.name, "video%3A")) {
|
||||
extension = "mp4";
|
||||
simpleType = "video";
|
||||
} else if (StringUtil.startWith(this.name, "audio%3A")) {
|
||||
extension = "mp3";
|
||||
simpleType = "audio";
|
||||
if (StringUtil.startWith(this.name, 'image%3A')) {
|
||||
extension = 'jpg';
|
||||
simpleType = 'image';
|
||||
} else if (StringUtil.startWith(this.name, 'video%3A')) {
|
||||
extension = 'mp4';
|
||||
simpleType = 'video';
|
||||
} else if (StringUtil.startWith(this.name, 'audio%3A')) {
|
||||
extension = 'mp3';
|
||||
simpleType = 'audio';
|
||||
}
|
||||
|
||||
if (StringUtil.containStr(this.filter, extension)) {
|
||||
@@ -458,7 +515,7 @@ export default class Matter extends BaseEntity {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
this.errorMessage = "您上传的文件格式不符合要求";
|
||||
this.errorMessage = '您上传的文件格式不符合要求';
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -478,18 +535,18 @@ export default class Matter extends BaseEntity {
|
||||
|
||||
//验证是否满足过滤器
|
||||
if (!this.validateFileType()) {
|
||||
MessageBoxUtil.error("文件类型不满足,请重试");
|
||||
MessageBoxUtil.error('文件类型不满足,请重试');
|
||||
return;
|
||||
}
|
||||
|
||||
//(兼容性:chrome,ff,IE9及以上)
|
||||
let formData = new FormData();
|
||||
|
||||
formData.append("userUuid", that.userUuid);
|
||||
formData.append("puuid", that.puuid);
|
||||
formData.append("file", that.file!);
|
||||
formData.append("alien", that.alien.toString());
|
||||
formData.append("privacy", that.privacy.toString());
|
||||
formData.append('spaceUuid', that.spaceUuid!);
|
||||
formData.append('puuid', that.puuid);
|
||||
formData.append('file', that.file!);
|
||||
formData.append('alien', that.alien.toString());
|
||||
formData.append('privacy', that.privacy.toString());
|
||||
|
||||
//闭包
|
||||
let lastTimeStamp = new Date().getTime();
|
||||
@@ -564,13 +621,13 @@ export default class Matter extends BaseEntity {
|
||||
getPreviewUrl(downloadTokenUuid?: string): string {
|
||||
return `${EnvUtil.currentHost()}/api/alien/preview/${this.uuid}/${
|
||||
this.name
|
||||
}${downloadTokenUuid ? "?downloadTokenUuid=" + downloadTokenUuid : ""}`;
|
||||
}${downloadTokenUuid ? '?downloadTokenUuid=' + downloadTokenUuid : ''}`;
|
||||
}
|
||||
|
||||
getDownloadUrl(downloadTokenUuid?: string): string {
|
||||
return `${EnvUtil.currentHost()}/api/alien/download/${this.uuid}/${
|
||||
this.name
|
||||
}${downloadTokenUuid ? "?downloadTokenUuid=" + downloadTokenUuid : ""}`;
|
||||
}${downloadTokenUuid ? '?downloadTokenUuid=' + downloadTokenUuid : ''}`;
|
||||
}
|
||||
|
||||
getShareDownloadUrl(
|
||||
@@ -578,9 +635,9 @@ export default class Matter extends BaseEntity {
|
||||
shareCode: string,
|
||||
shareRootUuid: string
|
||||
): string {
|
||||
return `${EnvUtil.currentHost()}/api/alien/download/${this.uuid}/${
|
||||
this.name
|
||||
}?shareUuid=${shareUuid}&shareCode=${shareCode}&shareRootUuid=${shareRootUuid}`;
|
||||
return `${EnvUtil.currentHost()}/api/share/matter/download?matterUuid=${
|
||||
this.uuid
|
||||
}&shareUuid=${shareUuid}&shareCode=${shareCode}&shareRootUuid=${shareRootUuid}`;
|
||||
}
|
||||
|
||||
getSharePreviewUrl(
|
||||
@@ -588,8 +645,8 @@ export default class Matter extends BaseEntity {
|
||||
shareCode: string,
|
||||
shareRootUuid: string
|
||||
): string {
|
||||
return `${EnvUtil.currentHost()}/api/alien/preview/${this.uuid}/${
|
||||
this.name
|
||||
}?shareUuid=${shareUuid}&shareCode=${shareCode}&shareRootUuid=${shareRootUuid}`;
|
||||
return `${EnvUtil.currentHost()}/api/share/matter/preview?matterUuid=${
|
||||
this.uuid
|
||||
}&shareUuid=${shareUuid}&shareCode=${shareCode}&shareRootUuid=${shareRootUuid}`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,73 +1,67 @@
|
||||
import SafeUtil from '../../util/SafeUtil';
|
||||
import BaseEntity from '../base/BaseEntity';
|
||||
import PreviewConfig from "./model/PreviewConfig";
|
||||
import JsonUtil from "../../util/JsonUtil";
|
||||
import ScanConfig from "./model/ScanConfig";
|
||||
|
||||
import PreviewConfig from './model/PreviewConfig';
|
||||
import JsonUtil from '../../util/JsonUtil';
|
||||
import ScanConfig from './model/ScanConfig';
|
||||
|
||||
export default class Preference extends BaseEntity {
|
||||
|
||||
//获取当前登录者的信息
|
||||
static URL_API_PREFERENCE_FETCH = '/api/preference/fetch'
|
||||
static URL_API_SYSTEM_CLEANUP = '/api/preference/system/cleanup'
|
||||
static URL_API_PREFERENCE_EDIT_PREVIEW_CONFIG = '/api/preference/edit/preview/config'
|
||||
static URL_API_PREFERENCE_EDIT_SCAN = '/api/preference/edit/scan/config'
|
||||
static URL_API_PREFERENCE_SCAN_ONCE = '/api/preference/scan/once'
|
||||
|
||||
static URL_API_PREFERENCE_FETCH = '/api/preference/fetch';
|
||||
static URL_API_SYSTEM_CLEANUP = '/api/preference/system/cleanup';
|
||||
static URL_API_PREFERENCE_EDIT_PREVIEW_CONFIG =
|
||||
'/api/preference/edit/preview/config';
|
||||
static URL_API_PREFERENCE_EDIT_SCAN = '/api/preference/edit/scan/config';
|
||||
static URL_API_PREFERENCE_SCAN_ONCE = '/api/preference/scan/once';
|
||||
|
||||
//网站名称
|
||||
name: string = ""
|
||||
name: string = '';
|
||||
|
||||
//logo
|
||||
logoUrl: string | null = null
|
||||
faviconUrl: string | null = null
|
||||
logoUrl: string | null = null;
|
||||
faviconUrl: string | null = null;
|
||||
|
||||
//版权信息
|
||||
copyright: string = ""
|
||||
record: string = ""
|
||||
copyright: string = '';
|
||||
record: string = '';
|
||||
|
||||
//大小限制
|
||||
downloadDirMaxSize: number = -1
|
||||
downloadDirMaxSize: number = -1;
|
||||
//文件数量
|
||||
downloadDirMaxNum: number = -1
|
||||
downloadDirMaxNum: number = -1;
|
||||
//用户默认总大小限制
|
||||
defaultTotalSizeLimit: number = -1
|
||||
defaultTotalSizeLimit: number = -1;
|
||||
//回收站保存文件天数
|
||||
deletedKeepDays: number = 7
|
||||
deletedKeepDays: number = 7;
|
||||
//是否允许自主注册
|
||||
allowRegister: boolean = false
|
||||
allowRegister: boolean = false;
|
||||
//预览配置
|
||||
previewConfig: PreviewConfig = new PreviewConfig()
|
||||
previewConfig: PreviewConfig = new PreviewConfig();
|
||||
//扫描磁盘配置
|
||||
scanConfig: ScanConfig = new ScanConfig()
|
||||
scanConfig: ScanConfig = new ScanConfig();
|
||||
//后台版本
|
||||
version: string | null = null
|
||||
|
||||
version: string | null = null;
|
||||
|
||||
//*****************前端辅助变量***********************/
|
||||
//网站是否完成了安装
|
||||
installed: boolean = true
|
||||
installed: boolean = true;
|
||||
|
||||
constructor(reactComponent?: React.Component) {
|
||||
|
||||
super(reactComponent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
assign(obj: any) {
|
||||
super.assign(obj);
|
||||
|
||||
this.assignEntity("previewConfig", PreviewConfig)
|
||||
this.assignEntity("scanConfig", ScanConfig)
|
||||
this.assignEntity('previewConfig', PreviewConfig);
|
||||
this.assignEntity('scanConfig', ScanConfig);
|
||||
}
|
||||
|
||||
getTAG():string {
|
||||
return "preference"
|
||||
getTAG(): string {
|
||||
return 'preference';
|
||||
}
|
||||
|
||||
getRecycleBinStatus() {
|
||||
return this.deletedKeepDays > 0
|
||||
return this.deletedKeepDays > 0;
|
||||
}
|
||||
|
||||
getForm(): any {
|
||||
@@ -83,81 +77,112 @@ export default class Preference extends BaseEntity {
|
||||
deletedKeepDays: this.deletedKeepDays,
|
||||
allowRegister: this.allowRegister,
|
||||
previewConfig: JsonUtil.toJson(this.previewConfig.getForm()),
|
||||
scanConfig: JsonUtil.toJson(this.scanConfig.getForm())
|
||||
scanConfig: JsonUtil.toJson(this.scanConfig.getForm()),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
//修改title和favicon
|
||||
updateTitleAndFavicon() {
|
||||
|
||||
if (this.faviconUrl) {
|
||||
//修改favicon
|
||||
let link: any = document.querySelector("link[rel*='icon']") || document.createElement('link');
|
||||
let link: any =
|
||||
document.querySelector("link[rel*='icon']") ||
|
||||
document.createElement('link');
|
||||
link.type = 'image/x-icon';
|
||||
link.rel = 'shortcut icon';
|
||||
link.href = this.faviconUrl;
|
||||
document.getElementsByTagName('head')[0].appendChild(link);
|
||||
}
|
||||
|
||||
document.title = this.name
|
||||
|
||||
document.title = this.name;
|
||||
}
|
||||
|
||||
httpFetch(successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
let that = this
|
||||
this.httpPost(Preference.URL_API_PREFERENCE_FETCH, {}, function (response: any) {
|
||||
let that = this;
|
||||
this.httpPost(
|
||||
Preference.URL_API_PREFERENCE_FETCH,
|
||||
{},
|
||||
function (response: any) {
|
||||
that.assign(response.data.data);
|
||||
|
||||
that.assign(response.data.data);
|
||||
that.updateTitleAndFavicon();
|
||||
|
||||
that.updateTitleAndFavicon()
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
}, errorCallback, finalCallback)
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback,
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
httpSystemCleanup(password: string, successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
let that = this
|
||||
this.httpPost(Preference.URL_API_SYSTEM_CLEANUP, {password}, function (response: any) {
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
}, errorCallback, finalCallback)
|
||||
httpSystemCleanup(
|
||||
password: string,
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
this.httpPost(
|
||||
Preference.URL_API_SYSTEM_CLEANUP,
|
||||
{ password },
|
||||
function (response: any) {
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback,
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
httpSavePreviewEngine(successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
const that = this
|
||||
this.httpPost(Preference.URL_API_PREFERENCE_EDIT_PREVIEW_CONFIG, this.getForm(), function(response: any) {
|
||||
|
||||
that.assign(response.data.data);
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
}, errorCallback, finalCallback);
|
||||
httpSavePreviewEngine(
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
const that = this;
|
||||
this.httpPost(
|
||||
Preference.URL_API_PREFERENCE_EDIT_PREVIEW_CONFIG,
|
||||
this.getForm(),
|
||||
function (response: any) {
|
||||
that.assign(response.data.data);
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback,
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
httpSaveScan(successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
const that = this
|
||||
this.httpPost(Preference.URL_API_PREFERENCE_EDIT_SCAN, this.getForm(), function(response: any) {
|
||||
|
||||
that.assign(response.data.data);
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
}, errorCallback, finalCallback);
|
||||
httpSaveScan(
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
const that = this;
|
||||
this.httpPost(
|
||||
Preference.URL_API_PREFERENCE_EDIT_SCAN,
|
||||
this.getForm(),
|
||||
function (response: any) {
|
||||
that.assign(response.data.data);
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback,
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
httpScanOnce(successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
this.httpGet(Preference.URL_API_PREFERENCE_SCAN_ONCE, {}, function (response: any) {
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
}, errorCallback, finalCallback)
|
||||
httpScanOnce(
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
this.httpGet(
|
||||
Preference.URL_API_PREFERENCE_SCAN_ONCE,
|
||||
{},
|
||||
function (response: any) {
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback,
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,48 +2,37 @@
|
||||
* 预览配置
|
||||
* 支持自定义不同的文件预览类型
|
||||
*/
|
||||
import Base from "../../base/Base";
|
||||
import PreviewEngine from "./PreviewEngine";
|
||||
import MimeUtil from "../../../util/MimeUtil";
|
||||
import MessageBoxUtil from "../../../util/MessageBoxUtil";
|
||||
import Base from '../../base/Base';
|
||||
import PreviewEngine from './PreviewEngine';
|
||||
|
||||
/**
|
||||
* 预览配置
|
||||
*/
|
||||
export default class PreviewConfig extends Base {
|
||||
|
||||
/**
|
||||
* 预览引擎
|
||||
*/
|
||||
previewEngines: PreviewEngine[] = []
|
||||
previewEngines: PreviewEngine[] = [];
|
||||
|
||||
constructor() {
|
||||
|
||||
super()
|
||||
|
||||
super();
|
||||
}
|
||||
|
||||
assign(obj: any) {
|
||||
super.assign(obj);
|
||||
|
||||
this.assignList("previewEngines", PreviewEngine)
|
||||
this.assignList('previewEngines', PreviewEngine);
|
||||
}
|
||||
|
||||
|
||||
getForm(): any {
|
||||
|
||||
let forms = this.previewEngines.map((item: PreviewEngine, index: number) => {
|
||||
return item.getForm()
|
||||
})
|
||||
let forms = this.previewEngines.map(
|
||||
(item: PreviewEngine, index: number) => {
|
||||
return item.getForm();
|
||||
}
|
||||
);
|
||||
|
||||
return {
|
||||
previewEngines: forms
|
||||
previewEngines: forms,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
* 预览配置
|
||||
* 支持自定义不同的文件预览类型
|
||||
*/
|
||||
import Base from "../../base/Base";
|
||||
import MimeUtil from "../../../util/MimeUtil";
|
||||
import Base from '../../base/Base';
|
||||
import MimeUtil from '../../../util/MimeUtil';
|
||||
|
||||
export default class PreviewEngine extends Base {
|
||||
/**
|
||||
@@ -12,14 +12,14 @@ export default class PreviewEngine extends Base {
|
||||
* {url} 对于公有文件publicUrl=originUrl,对于私有文件publicUrl是originUrl带上downloadToken。 eg: https://tanker.eyeblue.cn/api/alien/download/2a0ceee1-744c-4c82-4215-69c382597a50/abstract-free-photo-2210x1473.jpg?downloadTokenUuid=6bdba52f-af6b-49ae-5a5d-fd80bfb01d3b
|
||||
* {b64Url} 文件原始地址
|
||||
*/
|
||||
url: string = "";
|
||||
url: string = '';
|
||||
|
||||
/**
|
||||
* 此预览引擎支持的文件后缀名。
|
||||
* 星好*表示匹配所有的后缀名。
|
||||
* 逗号分隔,不带. 例如: xls,doc,ppt,xlsx,docx,pptx
|
||||
*/
|
||||
extensions: string = "";
|
||||
extensions: string = '';
|
||||
|
||||
/**
|
||||
* 本站预览,新标签打开
|
||||
@@ -45,15 +45,15 @@ export default class PreviewEngine extends Base {
|
||||
//添加office默认预览引擎,使用微软开放接口
|
||||
let officeEngine: PreviewEngine = new PreviewEngine();
|
||||
officeEngine.url =
|
||||
"https://view.officeapps.live.com/op/embed.aspx?src={url}";
|
||||
officeEngine.extensions = "doc,ppt,xls,docx,pptx,xlsx";
|
||||
'https://view.officeapps.live.com/op/embed.aspx?src={url}';
|
||||
officeEngine.extensions = 'doc,ppt,xls,docx,pptx,xlsx';
|
||||
officeEngine.previewInSite = true;
|
||||
defaultEngines.push(officeEngine);
|
||||
|
||||
//添加全局预览引擎,使用浏览器预览能力。
|
||||
let globalEngine: PreviewEngine = new PreviewEngine();
|
||||
globalEngine.url = "{originUrl}";
|
||||
globalEngine.extensions = "*";
|
||||
globalEngine.url = '{originUrl}';
|
||||
globalEngine.extensions = '*';
|
||||
globalEngine.previewInSite = true;
|
||||
defaultEngines.push(globalEngine);
|
||||
|
||||
@@ -68,14 +68,14 @@ export default class PreviewEngine extends Base {
|
||||
}
|
||||
|
||||
let canHandle = false;
|
||||
if (this.extensions === "*") {
|
||||
if (this.extensions === '*') {
|
||||
canHandle = true;
|
||||
} else {
|
||||
let parts: string[] = this.extensions.split(",");
|
||||
let parts: string[] = this.extensions.split(',');
|
||||
for (let part of parts) {
|
||||
if (
|
||||
extension === part.toLowerCase() ||
|
||||
"." + extension === part.toLowerCase()
|
||||
'.' + extension === part.toLowerCase()
|
||||
) {
|
||||
canHandle = true;
|
||||
break;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
* 扫描配置
|
||||
*/
|
||||
import { LabeledValue } from 'antd/lib/select';
|
||||
import Base from "../../base/Base";
|
||||
import { ScanScopeType } from "./ScanScopeType";
|
||||
import { ScanCronType } from "./ScanCronType";
|
||||
import Base from '../../base/Base';
|
||||
import { ScanScopeType } from './ScanScopeType';
|
||||
import { ScanCronType } from './ScanCronType';
|
||||
|
||||
export default class ScanConfig extends Base {
|
||||
// 是否开启
|
||||
@@ -13,13 +13,11 @@ export default class ScanConfig extends Base {
|
||||
cron: string | null = null;
|
||||
// 扫描磁盘开启范围(全部用户 or 局部用户)
|
||||
scope: ScanScopeType = ScanScopeType.ALL;
|
||||
// 开启扫描磁盘功能的用户们
|
||||
usernames: string[] = [];
|
||||
// 开启扫描磁盘功能的空间
|
||||
spaceNames: string[] = [];
|
||||
|
||||
// 前端辅助字段
|
||||
cronType: string | null = null;
|
||||
users: LabeledValue[] = [];
|
||||
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
@@ -34,7 +32,7 @@ export default class ScanConfig extends Base {
|
||||
enable: this.enable,
|
||||
scope: this.scope,
|
||||
cron: this.cronType === ScanCronType.CUSTOM ? this.cron : this.cronType,
|
||||
usernames: this.usernames,
|
||||
spaceNames: this.spaceNames,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,40 +1,41 @@
|
||||
import SelectionOption from "../../base/option/SelectionOption";
|
||||
import Lang from "../../global/Lang";
|
||||
import SelectionOption from '../../base/option/SelectionOption';
|
||||
import Lang from '../../global/Lang';
|
||||
|
||||
enum ScanCronType {
|
||||
TEN_SECONDS = "TEN_SECONDS",
|
||||
THIRTY_SECONDS = "THIRTY_SECONDS",
|
||||
MINUTE = "MINUTE",
|
||||
HOUR = "HOUR",
|
||||
CUSTOM = "CUSTOM",
|
||||
TEN_SECONDS = 'TEN_SECONDS',
|
||||
THIRTY_SECONDS = 'THIRTY_SECONDS',
|
||||
MINUTE = 'MINUTE',
|
||||
HOUR = 'HOUR',
|
||||
CUSTOM = 'CUSTOM',
|
||||
}
|
||||
|
||||
const ScanCronTypes: ScanCronType[] = Object.keys(ScanCronType).map(
|
||||
(k) => k as ScanCronType
|
||||
);
|
||||
|
||||
const ScanCronTypeMap: { [key in keyof typeof ScanCronType]: SelectionOption } = {
|
||||
TEN_SECONDS: {
|
||||
name: Lang.t("preference.scanPerTenSeconds"),
|
||||
value: "@every 10s",
|
||||
},
|
||||
THIRTY_SECONDS: {
|
||||
name: Lang.t("preference.scanPerThirtySeconds"),
|
||||
value: "@every 30s",
|
||||
},
|
||||
MINUTE: {
|
||||
name: Lang.t("preference.scanPerMinute"),
|
||||
value: "@every 1m",
|
||||
},
|
||||
HOUR: {
|
||||
name: Lang.t("preference.scanPerHour"),
|
||||
value: "0 * * * *",
|
||||
},
|
||||
CUSTOM: {
|
||||
name: Lang.t("preference.scanCustom"),
|
||||
value: "CUSTOM",
|
||||
},
|
||||
};
|
||||
const ScanCronTypeMap: { [key in keyof typeof ScanCronType]: SelectionOption } =
|
||||
{
|
||||
TEN_SECONDS: {
|
||||
name: Lang.t('preference.scanPerTenSeconds'),
|
||||
value: '@every 10s',
|
||||
},
|
||||
THIRTY_SECONDS: {
|
||||
name: Lang.t('preference.scanPerThirtySeconds'),
|
||||
value: '@every 30s',
|
||||
},
|
||||
MINUTE: {
|
||||
name: Lang.t('preference.scanPerMinute'),
|
||||
value: '@every 1m',
|
||||
},
|
||||
HOUR: {
|
||||
name: Lang.t('preference.scanPerHour'),
|
||||
value: '0 * * * *',
|
||||
},
|
||||
CUSTOM: {
|
||||
name: Lang.t('preference.scanCustom'),
|
||||
value: 'CUSTOM',
|
||||
},
|
||||
};
|
||||
|
||||
const ScanCronTypeList: SelectionOption[] = [];
|
||||
ScanCronTypes.forEach((type: ScanCronType) => {
|
||||
@@ -46,4 +47,9 @@ ScanCronTypes.forEach((type: ScanCronType) => {
|
||||
ScanCronTypeValueList.push(ScanCronTypeMap[type].value);
|
||||
});
|
||||
|
||||
export { ScanCronType, ScanCronTypeMap, ScanCronTypeList, ScanCronTypeValueList };
|
||||
export {
|
||||
ScanCronType,
|
||||
ScanCronTypeMap,
|
||||
ScanCronTypeList,
|
||||
ScanCronTypeValueList,
|
||||
};
|
||||
|
||||
@@ -1,23 +1,25 @@
|
||||
import SelectionOption from "../../base/option/SelectionOption";
|
||||
import Lang from "../../global/Lang";
|
||||
import SelectionOption from '../../base/option/SelectionOption';
|
||||
import Lang from '../../global/Lang';
|
||||
|
||||
enum ScanScopeType {
|
||||
ALL = "ALL",
|
||||
CUSTOM = "CUSTOM",
|
||||
ALL = 'ALL',
|
||||
CUSTOM = 'CUSTOM',
|
||||
}
|
||||
|
||||
const ScanScopeTypes: ScanScopeType[] = Object.keys(ScanScopeType).map(
|
||||
(k) => k as ScanScopeType
|
||||
);
|
||||
|
||||
const ScanScopeTypeMap: { [key in keyof typeof ScanScopeType]: SelectionOption } = {
|
||||
const ScanScopeTypeMap: {
|
||||
[key in keyof typeof ScanScopeType]: SelectionOption;
|
||||
} = {
|
||||
ALL: {
|
||||
name: Lang.t("user.allUsers"),
|
||||
value: "ALL",
|
||||
name: Lang.t('space.allSpaces'),
|
||||
value: 'ALL',
|
||||
},
|
||||
CUSTOM: {
|
||||
name: Lang.t("user.partialUsers"),
|
||||
value: "CUSTOM",
|
||||
name: Lang.t('space.partialSpaces'),
|
||||
value: 'CUSTOM',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -1,180 +1,157 @@
|
||||
import BaseEntity from "../base/BaseEntity";
|
||||
import Matter from "../matter/Matter";
|
||||
import FileHelper from "../../util/FileHelper";
|
||||
import EnvUtil from "../../util/EnvUtil";
|
||||
import {ShareType} from "./ShareType";
|
||||
import {ShareExpireOption, ShareExpireOptionMap} from "./ShareExpireOption";
|
||||
import DateUtil from "../../util/DateUtil";
|
||||
import SafeUtil from "../../util/SafeUtil";
|
||||
import MessageBoxUtil from "../../util/MessageBoxUtil";
|
||||
import BaseEntity from '../base/BaseEntity'
|
||||
import Matter from '../matter/Matter'
|
||||
import FileUtil from '../../util/FileUtil'
|
||||
import EnvUtil from '../../util/EnvUtil'
|
||||
import { ShareType } from './ShareType'
|
||||
import { ShareExpireOption, ShareExpireOptionMap } from './ShareExpireOption'
|
||||
import DateUtil from '../../util/DateUtil'
|
||||
import SafeUtil from '../../util/SafeUtil'
|
||||
import MessageBoxUtil from '../../util/MessageBoxUtil'
|
||||
|
||||
export default class Share extends BaseEntity {
|
||||
name: string | null = null;
|
||||
shareType: ShareType = ShareType.MIX;
|
||||
userUuid: string | null = null;
|
||||
username: string | null = null;
|
||||
downloadTimes: number = 0;
|
||||
code: string | null = null;
|
||||
expireInfinity: boolean = false;
|
||||
expireTime: Date | null = null;
|
||||
name: string | null = null
|
||||
shareType: ShareType = ShareType.MIX
|
||||
userUuid: string | null = null
|
||||
username: string | null = null
|
||||
downloadTimes: number = 0
|
||||
code: string | null = null
|
||||
expireInfinity: boolean = false
|
||||
expireTime: Date | null = null
|
||||
|
||||
//当前正在查看的文件夹
|
||||
dirMatter: Matter = new Matter();
|
||||
dirMatter: Matter = new Matter()
|
||||
//当前share对应的matters
|
||||
matters: Matter[] = [];
|
||||
|
||||
//当前分享正在查看的根目录matter的uuid。前端辅助字段。
|
||||
rootUuid: string = Matter.MATTER_ROOT;
|
||||
matters: Matter[] = []
|
||||
spaceUuid: string | null = null
|
||||
|
||||
//本地临时字段
|
||||
expireOption: ShareExpireOption = ShareExpireOption.MONTH;
|
||||
expireOption: ShareExpireOption = ShareExpireOption.MONTH
|
||||
|
||||
static URL_CREATE = "/api/share/create";
|
||||
static URL_BROWSE = "/api/share/browse";
|
||||
static URL_DELETE_BATCH = "/api/share/delete/batch";
|
||||
static URL_ZIP = "/api/share/zip";
|
||||
static URL_CREATE = '/api/share/create'
|
||||
static URL_BROWSE = '/api/share/browse'
|
||||
static URL_DELETE_BATCH = '/api/share/delete/batch'
|
||||
static URL_ZIP = '/api/share/zip'
|
||||
static URL_MATTER_PAGE = '/api/share/matter/page'
|
||||
|
||||
constructor(reactComponent?: React.Component) {
|
||||
super(reactComponent);
|
||||
super(reactComponent)
|
||||
}
|
||||
|
||||
assign(obj: any) {
|
||||
super.assign(obj);
|
||||
super.assignEntity("expireTime", Date);
|
||||
super.assignEntity("dirMatter", Matter);
|
||||
super.assignList("matters", Matter);
|
||||
super.assign(obj)
|
||||
super.assignEntity('expireTime', Date)
|
||||
super.assignEntity('dirMatter', Matter)
|
||||
super.assignList('matters', Matter)
|
||||
}
|
||||
|
||||
getTAG():string {
|
||||
return "share"
|
||||
getTAG(): string {
|
||||
return 'share'
|
||||
}
|
||||
|
||||
getFilters() {
|
||||
return [...super.getFilters()];
|
||||
return [...super.getFilters()]
|
||||
}
|
||||
|
||||
getForm() {
|
||||
return {
|
||||
name: this.name,
|
||||
uuid: this.uuid ? this.uuid : null,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
getIcon() {
|
||||
if (this.shareType === ShareType.MIX) {
|
||||
return FileHelper.getIcon(
|
||||
"zip",
|
||||
false
|
||||
);
|
||||
return FileUtil.getIcon('zip', false)
|
||||
} else {
|
||||
return FileHelper.getIcon(
|
||||
this.name,
|
||||
this.shareType === ShareType.DIRECTORY
|
||||
);
|
||||
return FileUtil.getIcon(this.name as any, this.shareType === ShareType.DIRECTORY)
|
||||
}
|
||||
}
|
||||
|
||||
getLink() {
|
||||
return EnvUtil.currentHost() + "/share/detail/" + this.uuid;
|
||||
return EnvUtil.currentHost() + '/share/detail/' + this.uuid
|
||||
}
|
||||
|
||||
hasExpired() {
|
||||
if (this.expireInfinity) {
|
||||
return false;
|
||||
return false
|
||||
} else {
|
||||
if (this.expireTime) {
|
||||
return new Date(this.expireTime).getTime() < new Date().getTime();
|
||||
return new Date(this.expireTime).getTime() < new Date().getTime()
|
||||
} else {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//获取过期时间
|
||||
getExpireTime() {
|
||||
const delta = ShareExpireOptionMap[this.expireOption].deltaMillisecond;
|
||||
const now = new Date();
|
||||
return new Date(now.getTime() + delta);
|
||||
const delta = ShareExpireOptionMap[this.expireOption].deltaMillisecond
|
||||
const now = new Date()
|
||||
return new Date(now.getTime() + delta)
|
||||
}
|
||||
|
||||
//下载zip包
|
||||
downloadZip(puuid?: string) {
|
||||
window.open(
|
||||
`${EnvUtil.currentHost()}${Share.URL_ZIP}?shareUuid=${this.uuid}&code=${
|
||||
this.code
|
||||
}&puuid=${puuid}&rootUuid=${this.rootUuid}`
|
||||
);
|
||||
downloadZip(rootUuid: string, puuid?: string) {
|
||||
window.open(`${EnvUtil.currentHost()}${Share.URL_ZIP}?shareUuid=${this.uuid}&code=${this.code}&puuid=${puuid}&rootUuid=${rootUuid}`)
|
||||
}
|
||||
|
||||
//创建一个分享matterUuids要求为数组,expireTime要求为时间对象
|
||||
httpCreate(
|
||||
matterUuids: string,
|
||||
successCallback?: () => any,
|
||||
errorCallback?: () => any
|
||||
) {
|
||||
let that = this;
|
||||
httpCreate(matterUuids: string, successCallback?: () => any, errorCallback?: () => any) {
|
||||
let that = this
|
||||
|
||||
const form = {
|
||||
matterUuids: matterUuids,
|
||||
matterUuids,
|
||||
spaceUuid: this.spaceUuid,
|
||||
expireInfinity: this.expireOption === ShareExpireOption.INFINITY,
|
||||
expireTime: DateUtil.simpleDateTime(this.getExpireTime()),
|
||||
};
|
||||
}
|
||||
|
||||
this.httpPost(
|
||||
Share.URL_CREATE,
|
||||
form,
|
||||
function (response: any) {
|
||||
that.assign(response.data.data);
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
that.assign(response.data.data)
|
||||
SafeUtil.safeCallback(successCallback)(response)
|
||||
},
|
||||
errorCallback
|
||||
);
|
||||
errorCallback,
|
||||
)
|
||||
}
|
||||
|
||||
httpDeleteBatch(
|
||||
uuids: string,
|
||||
successCallback?: () => any,
|
||||
errorCallback?: () => any
|
||||
) {
|
||||
httpDeleteBatch(uuids: string, successCallback?: () => any, errorCallback?: () => any) {
|
||||
this.httpPost(
|
||||
Share.URL_DELETE_BATCH,
|
||||
{uuids: uuids},
|
||||
{ uuids: uuids },
|
||||
function (response: any) {
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
SafeUtil.safeCallback(successCallback)(response)
|
||||
},
|
||||
errorCallback
|
||||
);
|
||||
errorCallback,
|
||||
)
|
||||
}
|
||||
|
||||
httpBrowse(
|
||||
puuid: string,
|
||||
rootUuid: string,
|
||||
successCallback?: () => any,
|
||||
errorCallback?: () => any
|
||||
) {
|
||||
let that = this;
|
||||
httpBrowse(puuid: string, rootUuid: string, successCallback?: () => any, errorCallback?: () => any) {
|
||||
let that = this
|
||||
|
||||
const form = {
|
||||
puuid,
|
||||
rootUuid,
|
||||
shareUuid: this.uuid,
|
||||
code: this.code,
|
||||
};
|
||||
}
|
||||
|
||||
this.detailLoading = true;
|
||||
this.detailLoading = true
|
||||
this.httpPost(
|
||||
Share.URL_BROWSE,
|
||||
form,
|
||||
function (response: any) {
|
||||
that.assign(response.data.data);
|
||||
that.detailLoading = false;
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
that.assign(response.data.data)
|
||||
that.detailLoading = false
|
||||
SafeUtil.safeCallback(successCallback)(response)
|
||||
},
|
||||
function (errorMsg: any) {
|
||||
that.detailLoading = false;
|
||||
MessageBoxUtil.error(errorMsg);
|
||||
SafeUtil.safeCallback(errorCallback)(errorMsg);
|
||||
}
|
||||
);
|
||||
that.detailLoading = false
|
||||
MessageBoxUtil.error(errorMsg)
|
||||
SafeUtil.safeCallback(errorCallback)(errorMsg)
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import SelectionOption from "../base/option/SelectionOption";
|
||||
import SelectionOption from '../base/option/SelectionOption';
|
||||
|
||||
enum ShareExpireOption {
|
||||
HOUR = "HOUR",
|
||||
DAY = "DAY",
|
||||
WEEK = "WEEK",
|
||||
MONTH = "MONTH",
|
||||
YEAR = "YEAR",
|
||||
INFINITY = "INFINITY",
|
||||
HOUR = 'HOUR',
|
||||
DAY = 'DAY',
|
||||
WEEK = 'WEEK',
|
||||
MONTH = 'MONTH',
|
||||
YEAR = 'YEAR',
|
||||
INFINITY = 'INFINITY',
|
||||
}
|
||||
|
||||
interface ShareExpireSelection extends SelectionOption {
|
||||
@@ -21,33 +21,33 @@ const ShareExpireOptionMap: {
|
||||
[key in keyof typeof ShareExpireOption]: ShareExpireSelection;
|
||||
} = {
|
||||
HOUR: {
|
||||
name: "share.hour",
|
||||
value: "HOUR",
|
||||
name: 'share.hour',
|
||||
value: 'HOUR',
|
||||
deltaMillisecond: 60 * 60 * 1000,
|
||||
},
|
||||
DAY: {
|
||||
name: "share.day",
|
||||
value: "DAY",
|
||||
name: 'share.day',
|
||||
value: 'DAY',
|
||||
deltaMillisecond: 24 * 60 * 60 * 1000,
|
||||
},
|
||||
WEEK: {
|
||||
name: "share.week",
|
||||
value: "WEEK",
|
||||
name: 'share.week',
|
||||
value: 'WEEK',
|
||||
deltaMillisecond: 7 * 24 * 60 * 60 * 1000,
|
||||
},
|
||||
MONTH: {
|
||||
name: "share.month",
|
||||
value: "MONTH",
|
||||
name: 'share.month',
|
||||
value: 'MONTH',
|
||||
deltaMillisecond: 30 * 24 * 60 * 60 * 1000,
|
||||
},
|
||||
YEAR: {
|
||||
name: "share.year",
|
||||
value: "YEAR",
|
||||
name: 'share.year',
|
||||
value: 'YEAR',
|
||||
deltaMillisecond: 365 * 24 * 60 * 60 * 1000,
|
||||
},
|
||||
INFINITY: {
|
||||
name: "share.infinity",
|
||||
value: "INFINITY",
|
||||
name: 'share.infinity',
|
||||
value: 'INFINITY',
|
||||
deltaMillisecond: 0,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import SelectionOption from "../base/option/SelectionOption";
|
||||
import SelectionOption from '../base/option/SelectionOption';
|
||||
|
||||
enum ShareType {
|
||||
FILE = "FILE",
|
||||
DIRECTORY = "DIRECTORY",
|
||||
MIX = "MIX",
|
||||
FILE = 'FILE',
|
||||
DIRECTORY = 'DIRECTORY',
|
||||
MIX = 'MIX',
|
||||
}
|
||||
|
||||
const ShareTypes: ShareType[] = Object.keys(ShareType).map(
|
||||
@@ -12,16 +12,16 @@ const ShareTypes: ShareType[] = Object.keys(ShareType).map(
|
||||
|
||||
const ShareTypeMap: { [key in keyof typeof ShareType]: SelectionOption } = {
|
||||
FILE: {
|
||||
name: "文件",
|
||||
value: "FILE",
|
||||
name: '文件',
|
||||
value: 'FILE',
|
||||
},
|
||||
DIRECTORY: {
|
||||
name: "文件夹",
|
||||
value: "DIRECTORY",
|
||||
name: '文件夹',
|
||||
value: 'DIRECTORY',
|
||||
},
|
||||
MIX: {
|
||||
name: "混合",
|
||||
value: "MIX",
|
||||
name: '混合',
|
||||
value: 'MIX',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
import BaseEntity from '../base/BaseEntity';
|
||||
import User from '../user/User';
|
||||
import FileUtil from '../../util/FileUtil';
|
||||
import Filter from '../base/filter/Filter';
|
||||
import InputFilter from '../base/filter/InputFilter';
|
||||
|
||||
export interface SpaceFormValues {
|
||||
name: string;
|
||||
sizeLimit: number;
|
||||
totalSizeLimit: number;
|
||||
uuid: string | null;
|
||||
}
|
||||
|
||||
export default class Space extends BaseEntity {
|
||||
name: string | null = null;
|
||||
totalSize: number = 0;
|
||||
sizeLimit: number = 0;
|
||||
totalSizeLimit: number = 0;
|
||||
userUuid: string | null = null;
|
||||
user: User | null = null;
|
||||
type: 'PRIVATE' | 'SHARED' | null = null;
|
||||
|
||||
constructor(reactComponent?: React.Component) {
|
||||
super(reactComponent);
|
||||
}
|
||||
|
||||
getTAG(): string {
|
||||
return 'space';
|
||||
}
|
||||
|
||||
getFilters(): Filter[] {
|
||||
return [
|
||||
...super.getFilters(),
|
||||
new InputFilter('空间名称', 'name'),
|
||||
new InputFilter('空间类型', 'type'),
|
||||
];
|
||||
}
|
||||
|
||||
assign(obj: any) {
|
||||
super.assign(obj);
|
||||
this.assignEntity('user', User);
|
||||
}
|
||||
|
||||
getForm(): SpaceFormValues {
|
||||
return {
|
||||
name: this.name!,
|
||||
sizeLimit: this.sizeLimit,
|
||||
totalSizeLimit: this.totalSizeLimit,
|
||||
uuid: this.uuid ? this.uuid : null,
|
||||
};
|
||||
}
|
||||
|
||||
getHumanizeTotalSize() {
|
||||
return FileUtil.humanFileSize(this.totalSize);
|
||||
}
|
||||
|
||||
getHumanizeSizeLimit() {
|
||||
return FileUtil.humanFileSize(this.sizeLimit);
|
||||
}
|
||||
|
||||
getHumanizeTotalSizeLimit() {
|
||||
return FileUtil.humanFileSize(this.totalSizeLimit);
|
||||
}
|
||||
|
||||
getUsedPercent() {
|
||||
if (this.totalSizeLimit === 0) {
|
||||
return 0;
|
||||
}
|
||||
return (this.totalSize / this.totalSizeLimit) * 100;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
import BaseEntity from '../../base/BaseEntity';
|
||||
import User from '../../user/User';
|
||||
import { SpaceMemberRole } from './SpaceMemberRole';
|
||||
import Filter from '../../base/filter/Filter';
|
||||
import SortFilter from '../../base/filter/SortFilter';
|
||||
import InputFilter from '../../base/filter/InputFilter';
|
||||
import SafeUtil from '../../../util/SafeUtil';
|
||||
|
||||
export interface SpaceMemberFormValues {
|
||||
spaceUuid: string;
|
||||
userUuid: string;
|
||||
role: SpaceMemberRole;
|
||||
uuid: string | null;
|
||||
}
|
||||
export default class SpaceMember extends BaseEntity {
|
||||
spaceUuid: string | null = null;
|
||||
userUuid: string | null = null;
|
||||
role: SpaceMemberRole | null = null;
|
||||
user: User | null = null;
|
||||
|
||||
static URL_SPACE_MEMBER_MINE = '/api/space/member/mine';
|
||||
|
||||
constructor(reactComponent?: React.Component) {
|
||||
super(reactComponent);
|
||||
}
|
||||
|
||||
getTAG(): string {
|
||||
return 'spaceMember';
|
||||
}
|
||||
|
||||
assign(obj: any) {
|
||||
super.assign(obj);
|
||||
this.assignEntity('user', User);
|
||||
}
|
||||
|
||||
getFilters(): Filter[] {
|
||||
return [
|
||||
...super.getFilters(),
|
||||
new InputFilter('空间ID', 'spaceUuid', '按空间ID搜索', false),
|
||||
];
|
||||
}
|
||||
|
||||
getForm(): SpaceMemberFormValues {
|
||||
return {
|
||||
spaceUuid: this.spaceUuid!,
|
||||
userUuid: this.userUuid!,
|
||||
role: this.role!,
|
||||
uuid: this.uuid ? this.uuid : null,
|
||||
};
|
||||
}
|
||||
|
||||
httpMine(spaceUuid: string, successCallback?: any, errorCallback?: any) {
|
||||
this.httpGet(
|
||||
SpaceMember.URL_SPACE_MEMBER_MINE,
|
||||
{ spaceUuid },
|
||||
(response: any) => {
|
||||
this.assign(response.data.data);
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
import Lang from '../../global/Lang';
|
||||
import ColorSelectionOption from '../../base/option/ColorSelectionOption';
|
||||
import Color from '../../base/option/Color';
|
||||
|
||||
enum SpaceMemberRole {
|
||||
READ_ONLY = 'READ_ONLY',
|
||||
READ_WRITE = 'READ_WRITE',
|
||||
ADMIN = 'ADMIN',
|
||||
}
|
||||
|
||||
const SpaceMemberRoles: SpaceMemberRole[] = Object.keys(SpaceMemberRole).map(
|
||||
(k) => k as SpaceMemberRole
|
||||
);
|
||||
|
||||
const SpaceMemberRoleMap: Record<SpaceMemberRole, ColorSelectionOption> = {
|
||||
[SpaceMemberRole.READ_ONLY]: {
|
||||
name: Lang.t('space.memberRoleReadonly'),
|
||||
value: SpaceMemberRole.READ_ONLY,
|
||||
color: Color.SUCCESS,
|
||||
},
|
||||
[SpaceMemberRole.READ_WRITE]: {
|
||||
name: Lang.t('space.memberRoleReadWrite'),
|
||||
value: SpaceMemberRole.READ_WRITE,
|
||||
color: Color.PRIMARY,
|
||||
},
|
||||
[SpaceMemberRole.ADMIN]: {
|
||||
name: Lang.t('space.memberRoleAdmin'),
|
||||
value: SpaceMemberRole.ADMIN,
|
||||
color: Color.DANGER,
|
||||
},
|
||||
};
|
||||
|
||||
const SpaceMemberRoleList: ColorSelectionOption[] = [];
|
||||
SpaceMemberRoles.forEach((type: SpaceMemberRole, index: number) => {
|
||||
SpaceMemberRoleList.push(SpaceMemberRoleMap[type]);
|
||||
});
|
||||
|
||||
export {
|
||||
SpaceMemberRole,
|
||||
SpaceMemberRoles,
|
||||
SpaceMemberRoleMap,
|
||||
SpaceMemberRoleList,
|
||||
};
|
||||
@@ -1,68 +1,68 @@
|
||||
import SafeUtil from '../../util/SafeUtil';
|
||||
import BaseEntity from '../base/BaseEntity';
|
||||
import {UserRole} from './UserRole';
|
||||
import {UserStatus, UserStatusList} from "./UserStatus";
|
||||
import ImageUtil from "../../util/ImageUtil";
|
||||
import defaultAvatarPath from "../../../assets/image/avatar.png";
|
||||
import Filter from "../base/filter/Filter";
|
||||
import SortFilter from "../base/filter/SortFilter";
|
||||
import { UserRole } from './UserRole';
|
||||
import { UserStatus, UserStatusList } from './UserStatus';
|
||||
import ImageUtil from '../../util/ImageUtil';
|
||||
import defaultAvatarPath from '../../../assets/image/avatar.png';
|
||||
import Filter from '../base/filter/Filter';
|
||||
import SortFilter from '../base/filter/SortFilter';
|
||||
import InputFilter from '../base/filter/InputFilter';
|
||||
import SelectionFilter from "../base/filter/SelectionFilter";
|
||||
import SelectionFilter from '../base/filter/SelectionFilter';
|
||||
import Space from '../space/Space';
|
||||
|
||||
export default class User extends BaseEntity {
|
||||
|
||||
//获取当前登录者的信息
|
||||
static URL_INFO = '/api/user/info';
|
||||
static URL_LOGIN = '/api/user/login'
|
||||
static URL_AUTHENTICATION_LOGIN = '/api/user/authentication/login'
|
||||
static URL_REGISTER = '/api/user/register'
|
||||
static URL_LOGOUT = '/api/user/logout'
|
||||
static URL_USER_CHANGE_PASSWORD = '/api/user/change/password'
|
||||
static URL_USER_RESET_PASSWORD = '/api/user/reset/password'
|
||||
static URL_USER_TOGGLE_STATUS = '/api/user/toggle/status'
|
||||
static URL_USER_TRANSFIGURATION = '/api/user/transfiguration'
|
||||
static URL_USER_SCAN = '/api/user/scan'
|
||||
|
||||
role: UserRole = UserRole.GUEST
|
||||
username: string | null = null
|
||||
password: string | null = null
|
||||
avatarUrl: string | null = null
|
||||
lastIp: string | null = null
|
||||
lastTime: Date = new Date()
|
||||
//默认大小限制100Mb.
|
||||
sizeLimit: number = 104857600
|
||||
totalSize: number = 0
|
||||
totalSizeLimit: number = -1
|
||||
status: UserStatus = UserStatus.OK
|
||||
static URL_LOGIN = '/api/user/login';
|
||||
static URL_AUTHENTICATION_LOGIN = '/api/user/authentication/login';
|
||||
static URL_REGISTER = '/api/user/register';
|
||||
static URL_LOGOUT = '/api/user/logout';
|
||||
static URL_USER_CHANGE_PASSWORD = '/api/user/change/password';
|
||||
static URL_USER_RESET_PASSWORD = '/api/user/reset/password';
|
||||
static URL_USER_TOGGLE_STATUS = '/api/user/toggle/status';
|
||||
static URL_USER_TRANSFIGURATION = '/api/user/transfiguration';
|
||||
static URL_USER_SCAN = '/api/user/scan';
|
||||
|
||||
role: UserRole = UserRole.GUEST;
|
||||
username: string | null = null;
|
||||
password: string | null = null;
|
||||
avatarUrl: string | null = null;
|
||||
lastIp: string | null = null;
|
||||
lastTime: Date = new Date();
|
||||
status: UserStatus = UserStatus.OK;
|
||||
spaceUuid: string | null = null;
|
||||
space: Space = new Space();
|
||||
|
||||
constructor(reactComponent?: React.Component) {
|
||||
|
||||
super(reactComponent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
assign(obj: any) {
|
||||
super.assign(obj);
|
||||
|
||||
this.assignEntity("lastTime", Date)
|
||||
this.assignEntity('lastTime', Date);
|
||||
this.assignEntity('space', Space);
|
||||
}
|
||||
|
||||
hasLogin(): boolean {
|
||||
return this.role !== UserRole.GUEST;
|
||||
}
|
||||
|
||||
isAdmin(): boolean {
|
||||
return this.role === UserRole.ADMINISTRATOR;
|
||||
}
|
||||
|
||||
getTAG(): string {
|
||||
return "user"
|
||||
return 'user';
|
||||
}
|
||||
|
||||
|
||||
getFilters(): Filter[] {
|
||||
return [
|
||||
...super.getFilters(),
|
||||
new SortFilter("按上次登录时间排序", "orderLastTime"),
|
||||
new InputFilter("用户名", "username", "按用户名搜索"),
|
||||
new SelectionFilter("状态", "status", UserStatusList),
|
||||
|
||||
]
|
||||
new SortFilter('按上次登录时间排序', 'orderLastTime'),
|
||||
new InputFilter('用户名', 'username', '按用户名搜索'),
|
||||
new SelectionFilter('状态', 'status', UserStatusList),
|
||||
];
|
||||
}
|
||||
|
||||
getForm(): any {
|
||||
@@ -71,24 +71,26 @@ export default class User extends BaseEntity {
|
||||
password: this.password,
|
||||
role: this.role,
|
||||
avatarUrl: this.avatarUrl,
|
||||
sizeLimit: this.sizeLimit,
|
||||
totalSizeLimit: this.totalSizeLimit,
|
||||
uuid: this.uuid ? this.uuid : null
|
||||
uuid: this.uuid ? this.uuid : null,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
getAvatarUrl(origin: boolean = false) {
|
||||
if (this.avatarUrl) {
|
||||
return ImageUtil.handleImageUrl(this.avatarUrl, origin)
|
||||
return ImageUtil.handleImageUrl(this.avatarUrl, origin);
|
||||
} else {
|
||||
return defaultAvatarPath
|
||||
return defaultAvatarPath;
|
||||
}
|
||||
}
|
||||
|
||||
//登录
|
||||
httpLogin(username: string, password: string, successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
|
||||
httpLogin(
|
||||
username: string,
|
||||
password: string,
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
|
||||
let form = {
|
||||
@@ -96,19 +98,27 @@ export default class User extends BaseEntity {
|
||||
password,
|
||||
};
|
||||
|
||||
this.httpGet(User.URL_LOGIN, form, function (response: any) {
|
||||
|
||||
that.assign(response.data.data);
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
}, errorCallback, finalCallback);
|
||||
this.httpGet(
|
||||
User.URL_LOGIN,
|
||||
form,
|
||||
function (response: any) {
|
||||
that.assign(response.data.data);
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback,
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
//注册
|
||||
httpRegister(username: string, password: string, successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
|
||||
httpRegister(
|
||||
username: string,
|
||||
password: string,
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
|
||||
let form = {
|
||||
@@ -116,126 +126,209 @@ export default class User extends BaseEntity {
|
||||
password,
|
||||
};
|
||||
|
||||
this.httpGet(User.URL_REGISTER, form, function (response: any) {
|
||||
|
||||
that.assign(response.data.data);
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
}, errorCallback, finalCallback);
|
||||
this.httpGet(
|
||||
User.URL_REGISTER,
|
||||
form,
|
||||
function (response: any) {
|
||||
that.assign(response.data.data);
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback,
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
//获取当前登录者的信息
|
||||
httpInfo(loginRequired: boolean, finalCallback?: any) {
|
||||
|
||||
let that = this;
|
||||
if (loginRequired) { // httpGet有统一的登录处理机制
|
||||
this.httpGet(User.URL_INFO, {}, function (response: any) {
|
||||
that.assign(response.data.data);
|
||||
}, null, finalCallback);
|
||||
if (loginRequired) {
|
||||
// httpGet有统一的登录处理机制
|
||||
this.httpGet(
|
||||
User.URL_INFO,
|
||||
{},
|
||||
function (response: any) {
|
||||
that.assign(response.data.data);
|
||||
},
|
||||
null,
|
||||
finalCallback
|
||||
);
|
||||
} else {
|
||||
this.httpPureGet(User.URL_INFO, {}, function (response: any) {
|
||||
that.assign(response.data.data);
|
||||
}, () => {
|
||||
}, finalCallback);
|
||||
this.httpPureGet(
|
||||
User.URL_INFO,
|
||||
{},
|
||||
function (response: any) {
|
||||
that.assign(response.data.data);
|
||||
},
|
||||
() => {},
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
httpSave(
|
||||
limit: {
|
||||
sizeLimit: number;
|
||||
totalSizeLimit: number;
|
||||
},
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finallyCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
|
||||
let url = this.getUrlCreate();
|
||||
if (this.uuid) {
|
||||
url = this.getUrlEdit();
|
||||
}
|
||||
|
||||
this.errorMessage = this.validate();
|
||||
if (this.errorMessage) {
|
||||
that.defaultErrorHandler(this.errorMessage, errorCallback);
|
||||
return;
|
||||
}
|
||||
|
||||
this.httpPost(
|
||||
url,
|
||||
{ ...this.getForm(), ...limit },
|
||||
function (response: any) {
|
||||
that.assign(response.data.data);
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback,
|
||||
finallyCallback
|
||||
);
|
||||
}
|
||||
|
||||
//退出登录
|
||||
httpLogout(successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
|
||||
let that = this;
|
||||
|
||||
let form = {};
|
||||
|
||||
this.httpGet(User.URL_LOGOUT, form, function (response: any) {
|
||||
this.httpGet(
|
||||
User.URL_LOGOUT,
|
||||
form,
|
||||
function (response: any) {
|
||||
console.info('退出成功!');
|
||||
|
||||
console.info('退出成功!');
|
||||
|
||||
that.assign(new User())
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
}, errorCallback, finalCallback);
|
||||
that.assign(new User());
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback,
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
httpChangePassword(oldPassword: string, newPassword: string, successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
let that = this
|
||||
this.httpPost(User.URL_USER_CHANGE_PASSWORD, {
|
||||
'oldPassword': oldPassword,
|
||||
'newPassword': newPassword
|
||||
}, function (response: any) {
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
|
||||
}, errorCallback)
|
||||
httpChangePassword(
|
||||
oldPassword: string,
|
||||
newPassword: string,
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
this.httpPost(
|
||||
User.URL_USER_CHANGE_PASSWORD,
|
||||
{
|
||||
oldPassword: oldPassword,
|
||||
newPassword: newPassword,
|
||||
},
|
||||
function (response: any) {
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback
|
||||
);
|
||||
}
|
||||
|
||||
httpResetPassword(password: string, successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
this.httpPost(User.URL_USER_RESET_PASSWORD, {
|
||||
'userUuid': this.uuid,
|
||||
'password': password
|
||||
}, function (response: any) {
|
||||
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
|
||||
}, errorCallback)
|
||||
httpResetPassword(
|
||||
password: string,
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
this.httpPost(
|
||||
User.URL_USER_RESET_PASSWORD,
|
||||
{
|
||||
userUuid: this.uuid,
|
||||
password: password,
|
||||
},
|
||||
function (response: any) {
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
httpToggleStatus(successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
let that = this
|
||||
this.httpPost(User.URL_USER_TOGGLE_STATUS, {'uuid': this.uuid}, function (response: any) {
|
||||
|
||||
that.assign(response.data.data);
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
|
||||
}, errorCallback)
|
||||
httpToggleStatus(
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
this.httpPost(
|
||||
User.URL_USER_TOGGLE_STATUS,
|
||||
{ uuid: this.uuid },
|
||||
function (response: any) {
|
||||
that.assign(response.data.data);
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback
|
||||
);
|
||||
}
|
||||
|
||||
httpAuthenticationLogin(authentication: string, successCallback?: any, errorCallback?: any, finalCallback?: any) {
|
||||
let that = this
|
||||
let form = {authentication}
|
||||
this.httpPost(User.URL_AUTHENTICATION_LOGIN, form, function (response: any) {
|
||||
|
||||
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
|
||||
|
||||
}, errorCallback)
|
||||
httpAuthenticationLogin(
|
||||
authentication: string,
|
||||
successCallback?: any,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
let form = { authentication };
|
||||
this.httpPost(
|
||||
User.URL_AUTHENTICATION_LOGIN,
|
||||
form,
|
||||
function (response: any) {
|
||||
SafeUtil.safeCallback(successCallback)(response);
|
||||
},
|
||||
errorCallback
|
||||
);
|
||||
}
|
||||
|
||||
httpTransfiguration(successCallback: (text: string) => void, errorCallback?: any, finalCallback?: any) {
|
||||
let that = this
|
||||
let form = {'uuid': this.uuid}
|
||||
this.httpPost(User.URL_USER_TRANSFIGURATION, form, function (response: any) {
|
||||
|
||||
successCallback(response.data.msg)
|
||||
|
||||
}, errorCallback)
|
||||
httpTransfiguration(
|
||||
successCallback: (text: string) => void,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
let form = { uuid: this.uuid };
|
||||
this.httpPost(
|
||||
User.URL_USER_TRANSFIGURATION,
|
||||
form,
|
||||
function (response: any) {
|
||||
successCallback(response.data.msg);
|
||||
},
|
||||
errorCallback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
httpScan(successCallback: (text: string) => void, errorCallback?: any, finalCallback?: any) {
|
||||
let that = this
|
||||
let form = {'uuid': this.uuid}
|
||||
this.httpPost(User.URL_USER_SCAN, form, function (response: any) {
|
||||
|
||||
successCallback(response.data.msg)
|
||||
|
||||
}, errorCallback, finalCallback)
|
||||
httpScan(
|
||||
successCallback: (text: string) => void,
|
||||
errorCallback?: any,
|
||||
finalCallback?: any
|
||||
) {
|
||||
let that = this;
|
||||
let form = { uuid: this.uuid };
|
||||
this.httpPost(
|
||||
User.URL_USER_SCAN,
|
||||
form,
|
||||
function (response: any) {
|
||||
successCallback(response.data.msg);
|
||||
},
|
||||
errorCallback,
|
||||
finalCallback
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import ColorSelectionOption from "../base/option/ColorSelectionOption";
|
||||
import Color from "../base/option/Color";
|
||||
import Lang from "../global/Lang";
|
||||
|
||||
import ColorSelectionOption from '../base/option/ColorSelectionOption';
|
||||
import Color from '../base/option/Color';
|
||||
import Lang from '../global/Lang';
|
||||
|
||||
enum UserRole {
|
||||
GUEST = 'GUEST',
|
||||
@@ -9,25 +8,24 @@ enum UserRole {
|
||||
ADMINISTRATOR = 'ADMINISTRATOR',
|
||||
}
|
||||
|
||||
let UserRoles: UserRole[] = Object.keys(UserRole).map(k => k as UserRole);
|
||||
let UserRoles: UserRole[] = Object.keys(UserRole).map((k) => k as UserRole);
|
||||
|
||||
let UserRoleMap: { [key in keyof typeof UserRole]: ColorSelectionOption } = {
|
||||
GUEST: {
|
||||
'name': Lang.t("user.roleGuest"),
|
||||
'value': 'GUEST',
|
||||
'color': Color.WARNING,
|
||||
name: Lang.t('user.roleGuest'),
|
||||
value: 'GUEST',
|
||||
color: Color.WARNING,
|
||||
},
|
||||
USER: {
|
||||
'name': Lang.t("user.roleUser"),
|
||||
'value': 'USER',
|
||||
'color': Color.PRIMARY,
|
||||
name: Lang.t('user.roleUser'),
|
||||
value: 'USER',
|
||||
color: Color.PRIMARY,
|
||||
},
|
||||
ADMINISTRATOR: {
|
||||
'name': Lang.t("user.roleAdministrator"),
|
||||
'value': 'ADMINISTRATOR',
|
||||
'color': Color.DANGER,
|
||||
name: Lang.t('user.roleAdministrator'),
|
||||
value: 'ADMINISTRATOR',
|
||||
color: Color.DANGER,
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
let UserRoleList: ColorSelectionOption[] = [];
|
||||
@@ -35,9 +33,4 @@ UserRoles.forEach((type: UserRole, index: number) => {
|
||||
UserRoleList.push(UserRoleMap[type]);
|
||||
});
|
||||
|
||||
|
||||
export {UserRole, UserRoles, UserRoleMap, UserRoleList};
|
||||
|
||||
|
||||
|
||||
|
||||
export { UserRole, UserRoles, UserRoleMap, UserRoleList };
|
||||
|
||||
@@ -1,36 +1,33 @@
|
||||
import ColorSelectionOption from '../base/option/ColorSelectionOption';
|
||||
import Color from "../base/option/Color";
|
||||
import Lang from "../global/Lang";
|
||||
|
||||
import Color from '../base/option/Color';
|
||||
import Lang from '../global/Lang';
|
||||
|
||||
enum UserStatus {
|
||||
OK = 'OK',
|
||||
DISABLED = 'DISABLED'
|
||||
DISABLED = 'DISABLED',
|
||||
}
|
||||
|
||||
let UserStatuss: UserStatus[] = Object.keys(UserStatus).map(k => k as UserStatus);
|
||||
let UserStatuss: UserStatus[] = Object.keys(UserStatus).map(
|
||||
(k) => k as UserStatus
|
||||
);
|
||||
|
||||
let UserStatusMap: { [key in keyof typeof UserStatus]: ColorSelectionOption } = {
|
||||
OK: {
|
||||
'name': Lang.t("user.statusActive"),
|
||||
'value': 'OK',
|
||||
'color': Color.SUCCESS,
|
||||
},
|
||||
DISABLED: {
|
||||
'name': Lang.t("user.statusDisabled"),
|
||||
'value': 'DISABLED',
|
||||
'color': Color.DANGER,
|
||||
},
|
||||
};
|
||||
let UserStatusMap: { [key in keyof typeof UserStatus]: ColorSelectionOption } =
|
||||
{
|
||||
OK: {
|
||||
name: Lang.t('user.statusActive'),
|
||||
value: 'OK',
|
||||
color: Color.SUCCESS,
|
||||
},
|
||||
DISABLED: {
|
||||
name: Lang.t('user.statusDisabled'),
|
||||
value: 'DISABLED',
|
||||
color: Color.DANGER,
|
||||
},
|
||||
};
|
||||
|
||||
let UserStatusList: ColorSelectionOption[] = [];
|
||||
UserStatuss.forEach((type: UserStatus, index: number) => {
|
||||
UserStatusList.push(UserStatusMap[type]);
|
||||
});
|
||||
|
||||
|
||||
export {UserStatus, UserStatuss, UserStatusMap, UserStatusList};
|
||||
|
||||
|
||||
|
||||
|
||||
export { UserStatus, UserStatuss, UserStatusMap, UserStatusList };
|
||||
|
||||
@@ -1,59 +1,53 @@
|
||||
import * as React from "react";
|
||||
import * as React from 'react';
|
||||
|
||||
/**
|
||||
* 定义了一个图标行为的对象,这个可以辅助一些组件。
|
||||
*/
|
||||
export interface IconActionItem {
|
||||
//图片的资源链接(优先级高于iconType)
|
||||
icon?: string
|
||||
icon?: string;
|
||||
//antd的图标类型
|
||||
iconType?: string
|
||||
iconType?: string;
|
||||
//名称
|
||||
name?: string
|
||||
name?: string;
|
||||
//是否可见。默认可见
|
||||
visible?: boolean
|
||||
visible?: boolean;
|
||||
//点击图标后的行为
|
||||
onClick?: () => void
|
||||
onClick?: () => void;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 工具箱的条目,图标采用antd的图标。
|
||||
* 图标不带有高亮样式
|
||||
*/
|
||||
export interface ToolItem {
|
||||
|
||||
name: string
|
||||
name: string;
|
||||
|
||||
//当前是否处于展开状态
|
||||
active: boolean
|
||||
active: boolean;
|
||||
|
||||
//antd的图标样式
|
||||
icon: React.ReactNode
|
||||
|
||||
icon: React.ReactNode;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 该接口可以像文件树一样展示。
|
||||
* 同时图标带有高亮样式
|
||||
*/
|
||||
export interface SkeletonItem {
|
||||
|
||||
name: string
|
||||
name: string;
|
||||
|
||||
//当前是否处于展开状态
|
||||
active: boolean
|
||||
active: boolean;
|
||||
|
||||
//高亮的图标 资源链接
|
||||
activeIcon: string
|
||||
activeIcon: string;
|
||||
|
||||
//一般状态的图标 资源链接
|
||||
icon: string
|
||||
|
||||
icon: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求的Map,键值对
|
||||
*/
|
||||
export type RequestParamMap = { [key: string]: string }
|
||||
export type RequestParamMap = { [key: string]: string };
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import SafeUtil from "./SafeUtil";
|
||||
import SafeUtil from './SafeUtil';
|
||||
|
||||
export default class AnimateUtil {
|
||||
|
||||
/**
|
||||
* 动画函数
|
||||
* @param startValue 开始的值
|
||||
@@ -22,71 +21,70 @@ export default class AnimateUtil {
|
||||
endHandler?: (value: number) => void,
|
||||
standard?: number
|
||||
): void {
|
||||
|
||||
|
||||
//规则校验。
|
||||
if (duration <= 0) {
|
||||
console.error("duration值只能是正整数")
|
||||
return
|
||||
console.error('duration值只能是正整数');
|
||||
return;
|
||||
}
|
||||
|
||||
if (standard == undefined) {
|
||||
standard = 20
|
||||
standard = 20;
|
||||
} else if (standard <= 0) {
|
||||
console.error("standard值只能是正整数")
|
||||
return
|
||||
console.error('standard值只能是正整数');
|
||||
return;
|
||||
}
|
||||
|
||||
let totalStep: number = endValue - startValue
|
||||
let totalStep: number = endValue - startValue;
|
||||
|
||||
//从startValue到endValue需要触发几次。
|
||||
let num = Math.ceil(duration / standard)
|
||||
let num = Math.ceil(duration / standard);
|
||||
|
||||
//每一步的长度
|
||||
let delta: number = totalStep
|
||||
let delta: number = totalStep;
|
||||
if (num != 0) {
|
||||
delta = Math.ceil(totalStep / num)
|
||||
delta = Math.ceil(totalStep / num);
|
||||
}
|
||||
|
||||
//定时执行
|
||||
let sum = 0;
|
||||
SafeUtil.safeCallback(startHandler)(startValue)
|
||||
processHandler(startValue)
|
||||
SafeUtil.safeCallback(startHandler)(startValue);
|
||||
processHandler(startValue);
|
||||
let intervalHandler = setInterval(() => {
|
||||
|
||||
sum = sum + delta
|
||||
sum = sum + delta;
|
||||
if (Math.abs(sum) >= Math.abs(totalStep)) {
|
||||
//该停止了
|
||||
processHandler(endValue)
|
||||
SafeUtil.safeCallback(endHandler)(endValue)
|
||||
processHandler(endValue);
|
||||
SafeUtil.safeCallback(endHandler)(endValue);
|
||||
|
||||
//关闭定时器。
|
||||
clearInterval(intervalHandler)
|
||||
|
||||
clearInterval(intervalHandler);
|
||||
} else {
|
||||
//更新当前进度
|
||||
processHandler(startValue + sum)
|
||||
processHandler(startValue + sum);
|
||||
}
|
||||
|
||||
}, standard)
|
||||
|
||||
}, standard);
|
||||
}
|
||||
|
||||
static setInputSelection(input: HTMLInputElement, startPos: number, endPos: number) {
|
||||
static setInputSelection(
|
||||
input: HTMLInputElement,
|
||||
startPos: number,
|
||||
endPos: number
|
||||
) {
|
||||
input.focus();
|
||||
if (typeof input.selectionStart !== "undefined") {
|
||||
if (typeof input.selectionStart !== 'undefined') {
|
||||
input.selectionStart = startPos;
|
||||
input.selectionEnd = endPos;
|
||||
} else if ((document as any).selection && (document as any).selection.createRange) {
|
||||
} else if (
|
||||
(document as any).selection &&
|
||||
(document as any).selection.createRange
|
||||
) {
|
||||
// IE branch
|
||||
input.select();
|
||||
let range = (document as any).selection.createRange();
|
||||
range.collapse(true);
|
||||
range.moveEnd("character", endPos);
|
||||
range.moveStart("character", startPos);
|
||||
range.moveEnd('character', endPos);
|
||||
range.moveStart('character', startPos);
|
||||
range.select();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,46 +1,36 @@
|
||||
import DateUtil from "./DateUtil";
|
||||
import DateUtil from './DateUtil';
|
||||
|
||||
/**
|
||||
* 这个类是专门为antd服务的
|
||||
*/
|
||||
export default class AntdUtil {
|
||||
|
||||
|
||||
/**
|
||||
* 从一个数组中,获取到antd table想要的那种dataSource格式
|
||||
*/
|
||||
static getDataSource(columns :any, data :any) {
|
||||
|
||||
let dataSource :any= []
|
||||
if (!((columns instanceof Array) && (data instanceof Array))) {
|
||||
|
||||
console.error("columns和data必须为数组")
|
||||
return dataSource
|
||||
static getDataSource(columns: any, data: any) {
|
||||
let dataSource: any = [];
|
||||
if (!(columns instanceof Array && data instanceof Array)) {
|
||||
console.error('columns和data必须为数组');
|
||||
return dataSource;
|
||||
}
|
||||
|
||||
data.forEach((item, index) => {
|
||||
|
||||
let obj :any = {key: index, id: item.id}
|
||||
|
||||
let obj: any = { key: index, id: item.id };
|
||||
|
||||
columns.forEach((column, i) => {
|
||||
|
||||
let value = item[column.key]
|
||||
let value = item[column.key];
|
||||
|
||||
//遇到时间自动转成 yyyy-MM-dd HH:mm:ss
|
||||
if (value instanceof Date) {
|
||||
value = DateUtil.simpleDateTime(value)
|
||||
value = DateUtil.simpleDateTime(value);
|
||||
}
|
||||
|
||||
obj[column.key] = value
|
||||
})
|
||||
obj[column.key] = value;
|
||||
});
|
||||
|
||||
dataSource.push(obj)
|
||||
})
|
||||
|
||||
|
||||
return dataSource
|
||||
dataSource.push(obj);
|
||||
});
|
||||
|
||||
return dataSource;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
export default class ArrayUtil {
|
||||
|
||||
|
||||
//从srcArray中减去childArray的元素
|
||||
static substract(srcArray: [], childArray: any) {
|
||||
if (!srcArray) {
|
||||
@@ -11,46 +9,40 @@ export default class ArrayUtil {
|
||||
return srcArray;
|
||||
}
|
||||
|
||||
let newArray: [] = []
|
||||
let newArray: [] = [];
|
||||
|
||||
for (let i = 0; i < srcArray.length; i++) {
|
||||
|
||||
//在childArray的那些元素就不要了。
|
||||
if (childArray.indexOf(srcArray[i]) === -1) {
|
||||
newArray.push(srcArray[i])
|
||||
newArray.push(srcArray[i]);
|
||||
}
|
||||
|
||||
}
|
||||
return newArray
|
||||
|
||||
return newArray;
|
||||
}
|
||||
|
||||
//不重复添加
|
||||
static uniqueAdd(srcArray: any, childArray: any) {
|
||||
if (!srcArray) {
|
||||
srcArray = []
|
||||
srcArray = [];
|
||||
}
|
||||
|
||||
if (!childArray || childArray.length === 0) {
|
||||
return srcArray;
|
||||
}
|
||||
|
||||
|
||||
for (let i = 0; i < childArray.length; i++) {
|
||||
|
||||
//在childArray的那些元素就不要了。
|
||||
if (srcArray.indexOf(childArray[i]) === -1) {
|
||||
srcArray.push(childArray[i])
|
||||
srcArray.push(childArray[i]);
|
||||
}
|
||||
|
||||
}
|
||||
return srcArray
|
||||
return srcArray;
|
||||
}
|
||||
|
||||
//不重复添加
|
||||
static uniqueAddOne(srcArray: any[], child: any) {
|
||||
if (!srcArray) {
|
||||
srcArray = []
|
||||
srcArray = [];
|
||||
}
|
||||
|
||||
if (child === undefined || child === null) {
|
||||
@@ -59,10 +51,10 @@ export default class ArrayUtil {
|
||||
|
||||
//在childArray的那些元素就不要了。
|
||||
if (srcArray.indexOf(child) === -1) {
|
||||
srcArray.push(child)
|
||||
srcArray.push(child);
|
||||
}
|
||||
|
||||
return srcArray
|
||||
return srcArray;
|
||||
}
|
||||
|
||||
//数组中查找特定元素并返回所有该元素的索引
|
||||
@@ -72,71 +64,65 @@ export default class ArrayUtil {
|
||||
pos: number = 0;
|
||||
while (pos < len) {
|
||||
pos = a.indexOf(x, pos);
|
||||
if (pos === -1) {//未找到就退出循环完成搜索
|
||||
if (pos === -1) {
|
||||
//未找到就退出循环完成搜索
|
||||
break;
|
||||
}
|
||||
results.push(pos);//找到就存储索引
|
||||
pos += 1;//并从下个位置开始搜索
|
||||
results.push(pos); //找到就存储索引
|
||||
pos += 1; //并从下个位置开始搜索
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
|
||||
//调整元素位置。将dragIndex的元素放到hoverIndex的前面,其余顺移。在拖拽排序中用到。
|
||||
static insertSort(arr: any, dragIndex: any, hoverIndex: any) {
|
||||
|
||||
|
||||
if (!(arr instanceof Array)) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
if (dragIndex < 0 || dragIndex >= arr.length) {
|
||||
console.error("dragIndex = " + dragIndex + " index越界 length = " + arr.length)
|
||||
return
|
||||
console.error(
|
||||
'dragIndex = ' + dragIndex + ' index越界 length = ' + arr.length
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (hoverIndex < 0 || hoverIndex >= arr.length) {
|
||||
console.error("hoverIndex = " + hoverIndex + " index越界 length = " + arr.length)
|
||||
return
|
||||
console.error(
|
||||
'hoverIndex = ' + hoverIndex + ' index越界 length = ' + arr.length
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (dragIndex === hoverIndex) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
if (dragIndex > hoverIndex) {
|
||||
|
||||
let temp = arr[dragIndex]
|
||||
let temp = arr[dragIndex];
|
||||
|
||||
for (let i = dragIndex; i >= hoverIndex + 1; i--) {
|
||||
arr[i] = arr[i - 1]
|
||||
arr[i] = arr[i - 1];
|
||||
}
|
||||
arr[hoverIndex] = temp
|
||||
|
||||
|
||||
arr[hoverIndex] = temp;
|
||||
} else {
|
||||
|
||||
let temp = arr[dragIndex]
|
||||
let temp = arr[dragIndex];
|
||||
|
||||
for (let i = dragIndex; i <= hoverIndex - 1; i++) {
|
||||
arr[i] = arr[i + 1]
|
||||
arr[i] = arr[i + 1];
|
||||
}
|
||||
arr[hoverIndex] = temp
|
||||
|
||||
arr[hoverIndex] = temp;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//数组去重
|
||||
static unique(arr: string[]) {
|
||||
let newArr: string[] = [];
|
||||
for (let i = 0, item; item = arr[i++];) {
|
||||
for (let i = 0, item; (item = arr[i++]); ) {
|
||||
if (newArr.indexOf(item) === -1) {
|
||||
newArr.push(item);
|
||||
}
|
||||
}
|
||||
return newArr;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
export default class BrowserUtil {
|
||||
|
||||
//根据cookie键,读取cookie值
|
||||
static readCookie(name: any) {
|
||||
let nameEQ = name + "=";
|
||||
let nameEQ = name + '=';
|
||||
let ca = document.cookie.split(';');
|
||||
for (let i = 0; i < ca.length; i++) {
|
||||
let c = ca[i];
|
||||
@@ -12,7 +11,6 @@ export default class BrowserUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 获取url地址栏的参数
|
||||
@@ -26,14 +24,13 @@ export default class BrowserUtil {
|
||||
* @returns {*}
|
||||
*/
|
||||
static getQueryByName(name: string, url?: string): string | null {
|
||||
|
||||
if (!url) {
|
||||
url = window.location.href
|
||||
url = window.location.href;
|
||||
}
|
||||
|
||||
name = name.replace(/[\[\]]/g, "\\$&");
|
||||
name = name.replace(/[\[\]]/g, '\\$&');
|
||||
|
||||
let regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)")
|
||||
let regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)');
|
||||
let results = regex.exec(url);
|
||||
|
||||
if (!results) {
|
||||
@@ -41,13 +38,12 @@ export default class BrowserUtil {
|
||||
}
|
||||
|
||||
if (!results[2]) {
|
||||
return "";
|
||||
return '';
|
||||
}
|
||||
|
||||
return decodeURIComponent(results[2].replace(/\+/g, " "));
|
||||
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 半颜的方法。注释待补充
|
||||
* @param name
|
||||
@@ -60,7 +56,6 @@ export default class BrowserUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
static isLocalStorageNameSupported() {
|
||||
let testKey = 'test';
|
||||
let storage = window.localStorage;
|
||||
@@ -73,12 +68,11 @@ export default class BrowserUtil {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static readLocalStorage(key: any) {
|
||||
if (BrowserUtil.isLocalStorageNameSupported()) {
|
||||
return window.localStorage[key];
|
||||
} else {
|
||||
console.error("not support localStorage.");
|
||||
console.error('not support localStorage.');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -87,30 +81,27 @@ export default class BrowserUtil {
|
||||
if (BrowserUtil.isLocalStorageNameSupported()) {
|
||||
window.localStorage[key] = content;
|
||||
} else {
|
||||
console.error("not support localStorage.");
|
||||
console.error('not support localStorage.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static removeLocalStorage(key: any) {
|
||||
if (BrowserUtil.isLocalStorageNameSupported()) {
|
||||
window.localStorage.removeItem(key);
|
||||
} else {
|
||||
console.error("not support localStorage.");
|
||||
console.error('not support localStorage.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取完整的host
|
||||
* eg:
|
||||
* https://tanker.eyeblue.cn
|
||||
*/
|
||||
static fullHost() {
|
||||
return window.location.protocol + "//" + window.location.host
|
||||
return window.location.protocol + '//' + window.location.host;
|
||||
}
|
||||
|
||||
|
||||
//只支持zh和en
|
||||
static browserLang() {
|
||||
//常规浏览器语言和IE浏览器
|
||||
@@ -118,11 +109,10 @@ export default class BrowserUtil {
|
||||
|
||||
//截取lang前2位字符
|
||||
lang = lang.substr(0, 2);
|
||||
if (lang === "zh") {
|
||||
return "zh"
|
||||
if (lang === 'zh') {
|
||||
return 'zh';
|
||||
} else {
|
||||
return "en"
|
||||
return 'en';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,39 +1,42 @@
|
||||
import SafeUtil from "./SafeUtil";
|
||||
import SafeUtil from './SafeUtil';
|
||||
|
||||
export default class ClipboardUtil {
|
||||
|
||||
|
||||
/**
|
||||
* 复制一段文字到粘贴板。
|
||||
*
|
||||
*/
|
||||
static copy(text: string, successCallback: () => void, errorCallback?: () => void) {
|
||||
static copy(
|
||||
text: string,
|
||||
successCallback: () => void,
|
||||
errorCallback?: () => void
|
||||
) {
|
||||
let className = 'clipboard-textarea-util';
|
||||
|
||||
let className = "clipboard-textarea-util"
|
||||
|
||||
let textAreaElement: HTMLTextAreaElement | null = document.querySelector("." + className);
|
||||
let textAreaElement: HTMLTextAreaElement | null = document.querySelector(
|
||||
'.' + className
|
||||
);
|
||||
|
||||
if (!textAreaElement) {
|
||||
textAreaElement = document.createElement("textarea")
|
||||
textAreaElement.className = className
|
||||
textAreaElement.style.cssText = "position:fixed;opacity:0;z-index:0;width:5px;height:5px;"
|
||||
document.body.appendChild(textAreaElement)
|
||||
textAreaElement = document.createElement('textarea');
|
||||
textAreaElement.className = className;
|
||||
textAreaElement.style.cssText =
|
||||
'position:fixed;opacity:0;z-index:0;width:5px;height:5px;';
|
||||
document.body.appendChild(textAreaElement);
|
||||
}
|
||||
|
||||
textAreaElement.value = text
|
||||
textAreaElement.value = text;
|
||||
textAreaElement.select();
|
||||
|
||||
try {
|
||||
let successful = document.execCommand('copy');
|
||||
if (successful) {
|
||||
successCallback()
|
||||
successCallback();
|
||||
} else {
|
||||
SafeUtil.safeCallback(errorCallback)()
|
||||
SafeUtil.safeCallback(errorCallback)();
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('复制失败', err);
|
||||
SafeUtil.safeCallback(errorCallback)()
|
||||
SafeUtil.safeCallback(errorCallback)();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,36 +1,35 @@
|
||||
import moment from "moment"
|
||||
import moment from 'moment';
|
||||
|
||||
export default class DateUtil {
|
||||
|
||||
static DEFAULT_FORMAT = "YYYY-MM-DD HH:mm:ss";
|
||||
static DEFAULT_HOUR_MINUTE = "YYYY-MM-DD HH:mm";
|
||||
static SLASH_DATE_FORMAT = "YYYY/MM/DD";
|
||||
static TIME_FORMAT = "HH:mm:ss";
|
||||
static DATE_FORMAT = "YYYY-MM-DD";
|
||||
static DEFAULT_FORMAT = 'YYYY-MM-DD HH:mm:ss';
|
||||
static DEFAULT_HOUR_MINUTE = 'YYYY-MM-DD HH:mm';
|
||||
static SLASH_DATE_FORMAT = 'YYYY/MM/DD';
|
||||
static TIME_FORMAT = 'HH:mm:ss';
|
||||
static DATE_FORMAT = 'YYYY-MM-DD';
|
||||
//紧凑型的时间格式
|
||||
static COMPACT_DATE_FORMAT = "YYYYMMDD";
|
||||
static COMPACT_DATE_FORMAT = 'YYYYMMDD';
|
||||
|
||||
static simpleDateHourMinute(date: Date |null): string {
|
||||
static simpleDateHourMinute(date: Date | null): string {
|
||||
if (date == null) {
|
||||
return ""
|
||||
return '';
|
||||
} else {
|
||||
return moment(date).format(DateUtil.DEFAULT_HOUR_MINUTE)
|
||||
return moment(date).format(DateUtil.DEFAULT_HOUR_MINUTE);
|
||||
}
|
||||
}
|
||||
|
||||
static simpleDateTime(date: Date | null): string {
|
||||
if (date == null) {
|
||||
return ""
|
||||
return '';
|
||||
} else {
|
||||
return moment(date).format(DateUtil.DEFAULT_FORMAT)
|
||||
return moment(date).format(DateUtil.DEFAULT_FORMAT);
|
||||
}
|
||||
}
|
||||
|
||||
static simpleDate(date: Date | null): string {
|
||||
|
||||
if (date == null) {
|
||||
return ""
|
||||
return '';
|
||||
} else {
|
||||
return moment(date).format(DateUtil.DATE_FORMAT)
|
||||
return moment(date).format(DateUtil.DATE_FORMAT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,57 +37,50 @@ export default class DateUtil {
|
||||
* 某个日期的前一天
|
||||
*/
|
||||
static lastDay(date: Date | null, format?: string): string {
|
||||
|
||||
if (format === undefined) {
|
||||
format = DateUtil.DEFAULT_FORMAT
|
||||
format = DateUtil.DEFAULT_FORMAT;
|
||||
}
|
||||
|
||||
if (date == null) {
|
||||
return ""
|
||||
return '';
|
||||
} else {
|
||||
return moment(date).add(-1, 'days').format(format)
|
||||
return moment(date).add(-1, 'days').format(format);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 按照指定格式进行格式化
|
||||
*/
|
||||
static format(date: Date | null, formatString: string): string {
|
||||
if (date == null) {
|
||||
return ""
|
||||
return '';
|
||||
} else {
|
||||
return moment(date).format(formatString)
|
||||
return moment(date).format(formatString);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 将字符串,按照指定的格式反序列化成为时间对象
|
||||
* @param str
|
||||
*/
|
||||
static parse(str: string): Date | null {
|
||||
|
||||
let valid = moment(str).isValid();
|
||||
if (valid) {
|
||||
return moment(str).toDate()
|
||||
return moment(str).toDate();
|
||||
} else {
|
||||
return null
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//将时间字符串转化成js date
|
||||
//deprecated,使用 parse方法替代。
|
||||
static str2Date(str: any): Date {
|
||||
|
||||
let valid = moment(str).isValid();
|
||||
if (valid) {
|
||||
return moment(str).toDate()
|
||||
return moment(str).toDate();
|
||||
} else {
|
||||
//console.warn("不能转换成时间对象:", str)
|
||||
return new Date()
|
||||
return new Date();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +1,25 @@
|
||||
export default class DomUtil {
|
||||
|
||||
static addEvent(el: Node, event: string, handler: (evt: Event) => void): void {
|
||||
static addEvent(
|
||||
el: Node,
|
||||
event: string,
|
||||
handler: (evt: Event) => void
|
||||
): void {
|
||||
if (el.addEventListener) {
|
||||
el.addEventListener(event, handler, true);
|
||||
} else {
|
||||
console.error("不支持事件监听!", el)
|
||||
console.error('不支持事件监听!', el);
|
||||
}
|
||||
}
|
||||
|
||||
static removeEvent(el: Node, event: string, handler: (evt: Event) => void): void {
|
||||
|
||||
static removeEvent(
|
||||
el: Node,
|
||||
event: string,
|
||||
handler: (evt: Event) => void
|
||||
): void {
|
||||
if (el.removeEventListener) {
|
||||
el.removeEventListener(event, handler, true);
|
||||
} else {
|
||||
console.error("不支持事件监听!", el)
|
||||
console.error('不支持事件监听!', el);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export default class EnvUtil {
|
||||
static currentHost() {
|
||||
return window.location.protocol + "//" + window.location.host;
|
||||
}
|
||||
static currentHost() {
|
||||
return window.location.protocol + '//' + window.location.host;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,164 +0,0 @@
|
||||
import MimeUtil from "./MimeUtil";
|
||||
import StringUtil from "./StringUtil";
|
||||
import Lang from "../model/global/Lang";
|
||||
import CSV from "comma-separated-values";
|
||||
import archiveSvg from "../../assets/image/file/archive.svg";
|
||||
import audioSvg from "../../assets/image/file/audio.svg";
|
||||
import docSvg from "../../assets/image/file/doc.svg";
|
||||
import fileSvg from "../../assets/image/file/file.svg";
|
||||
import folderSvg from "../../assets/image/file/folder.svg";
|
||||
import imageSvg from "../../assets/image/file/image.svg";
|
||||
import pdfSvg from "../../assets/image/file/pdf.svg";
|
||||
import pptSvg from "../../assets/image/file/ppt.svg";
|
||||
import psdSvg from "../../assets/image/file/psd.svg";
|
||||
import textSvg from "../../assets/image/file/text.svg";
|
||||
import videoSvg from "../../assets/image/file/video.svg";
|
||||
import xlsSvg from "../../assets/image/file/xls.svg";
|
||||
|
||||
export default class FileHelper {
|
||||
static isImage(name: string | null): boolean {
|
||||
let mimeType = MimeUtil.getMimeType(name);
|
||||
return StringUtil.startWith(mimeType, "image");
|
||||
}
|
||||
|
||||
static isPdf(name: string | null): boolean {
|
||||
let mimeType = MimeUtil.getMimeType(name);
|
||||
return StringUtil.startWith(mimeType, "application/pdf");
|
||||
}
|
||||
|
||||
static isText(name: string | null): boolean {
|
||||
let mimeType = MimeUtil.getMimeType(name);
|
||||
return StringUtil.startWith(mimeType, "text");
|
||||
}
|
||||
|
||||
static isDoc(name: string | null): boolean {
|
||||
let mimeType = MimeUtil.getMimeType(name);
|
||||
return (
|
||||
StringUtil.startWith(mimeType, "application/msword") ||
|
||||
StringUtil.startWith(
|
||||
mimeType,
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
static isPpt(name: string | null): boolean {
|
||||
let mimeType = MimeUtil.getMimeType(name);
|
||||
return (
|
||||
StringUtil.startWith(mimeType, "application/vnd.ms-powerpoint") ||
|
||||
StringUtil.startWith(
|
||||
mimeType,
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
static isXls(name: string | null): boolean {
|
||||
let mimeType = MimeUtil.getMimeType(name);
|
||||
return (
|
||||
StringUtil.startWith(mimeType, "application/vnd.ms-excel") ||
|
||||
StringUtil.startWith(
|
||||
mimeType,
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
static isAudio(name: string | null): boolean {
|
||||
let mimeType = MimeUtil.getMimeType(name);
|
||||
return StringUtil.startWith(mimeType, "audio");
|
||||
}
|
||||
|
||||
static isVideo(name: string | null): boolean {
|
||||
let mimeType = MimeUtil.getMimeType(name);
|
||||
return StringUtil.startWith(mimeType, "video");
|
||||
}
|
||||
|
||||
static isPsd(name: string | null): boolean {
|
||||
let extension = MimeUtil.getExtension(name);
|
||||
return extension === ".psd";
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据名字获取对应的图标。imageIcon传值了,那么图片格式采用imageIcon
|
||||
* @param name
|
||||
* @param idDir
|
||||
*/
|
||||
static getIcon(name: string | null, idDir: boolean = false): any {
|
||||
if (idDir) {
|
||||
return folderSvg;
|
||||
}
|
||||
|
||||
if (FileHelper.isPdf(name)) {
|
||||
return pdfSvg;
|
||||
} else if (FileHelper.isDoc(name)) {
|
||||
return docSvg;
|
||||
} else if (FileHelper.isPpt(name)) {
|
||||
return pptSvg;
|
||||
} else if (FileHelper.isXls(name)) {
|
||||
return xlsSvg;
|
||||
} else if (FileHelper.isAudio(name)) {
|
||||
return audioSvg;
|
||||
} else if (
|
||||
FileHelper.isVideo(name) ||
|
||||
MimeUtil.getExtension(name) === ".mkv"
|
||||
) {
|
||||
return videoSvg;
|
||||
} else if (FileHelper.isText(name)) {
|
||||
return textSvg;
|
||||
} else if (FileHelper.isPsd(name)) {
|
||||
return psdSvg;
|
||||
} else if (FileHelper.isImage(name)) {
|
||||
return imageSvg;
|
||||
} else if (
|
||||
StringUtil.endWith(name, "zip") ||
|
||||
StringUtil.endWith(name, "rar") ||
|
||||
StringUtil.endWith(name, "7z") ||
|
||||
StringUtil.endWith(name, "tar") ||
|
||||
StringUtil.endWith(name, "tar") ||
|
||||
StringUtil.endWith(name, "gz")
|
||||
) {
|
||||
return archiveSvg;
|
||||
} else {
|
||||
return fileSvg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//把一个大小转变成方便读的格式
|
||||
//human readable file size
|
||||
static humanFileSize(bytes: number, si: boolean = false): string {
|
||||
if (bytes == -1) {
|
||||
return Lang.t("preference.noLimit")
|
||||
}
|
||||
|
||||
let thresh = si ? 1000 : 1024
|
||||
if (Math.abs(bytes) < thresh) {
|
||||
return bytes + ' B'
|
||||
}
|
||||
let units = si
|
||||
? ['KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']
|
||||
: ['kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
|
||||
let u = -1
|
||||
do {
|
||||
bytes /= thresh
|
||||
++u
|
||||
} while (Math.abs(bytes) >= thresh && u < units.length - 1)
|
||||
return bytes.toFixed(1) + ' ' + units[u]
|
||||
}
|
||||
|
||||
static getErrorLogsToCSVUrl(logs: object) {
|
||||
const _utf = "\uFEFF"; // 为了使文件以utf-8的编码模式,同时也是解决中文乱码的问题
|
||||
if (window.Blob && window.URL && window.URL.createObjectURL) {
|
||||
const csvStr = new CSV(logs, {
|
||||
header: ["filename", "path", "errorMsg"],
|
||||
}).encode();
|
||||
const blob = new Blob([_utf + csvStr], {
|
||||
type: "text/csv",
|
||||
});
|
||||
return window.URL.createObjectURL(blob);
|
||||
}
|
||||
return "";
|
||||
};
|
||||
|
||||
}
|
||||