kn-cli 1.0.55 → 1.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -1
- package/readme.md +4 -1
- package/templates/template_oa/.DS_Store +0 -0
- package/templates/template_oa/build.sh +2 -0
- package/templates/template_oa/cli.config.js +24 -0
- package/templates/template_oa/dev.sh +89 -0
- package/templates/template_oa/frontend_build.sh +83 -0
- package/templates/template_oa/init/prepare-commit-msg +5 -0
- package/templates/template_oa/init.sh +33 -0
- package/templates/template_oa/jsconfig.json +10 -0
- package/templates/template_oa/package-lock.json +1925 -0
- package/templates/template_oa/package.json +24 -0
- package/templates/template_oa/public/.DS_Store +0 -0
- package/templates/template_oa/public/404.html +26 -0
- package/templates/template_oa/public/favicon.ico +0 -0
- package/templates/template_oa/public/favicon.png +0 -0
- package/templates/template_oa/public/index.html +43 -0
- package/templates/template_oa/public/pluginjs/.DS_Store +0 -0
- package/templates/template_oa/public/src/.DS_Store +0 -0
- package/templates/template_oa/public/src/_antd.less +237 -0
- package/templates/template_oa/public/src/_reset.less +131 -0
- package/templates/template_oa/public/src/_variable.less +84 -0
- package/templates/template_oa/public/src/assets/.DS_Store +0 -0
- package/templates/template_oa/public/src/assets/iconfont/.DS_Store +0 -0
- package/templates/template_oa/public/src/assets/iconfont/iconfont.eot +0 -0
- package/templates/template_oa/public/src/assets/iconfont/iconfont.less +57 -0
- package/templates/template_oa/public/src/assets/iconfont/iconfont.svg +36 -0
- package/templates/template_oa/public/src/assets/iconfont/iconfont.ttf +0 -0
- package/templates/template_oa/public/src/assets/iconfont/iconfont.woff +0 -0
- package/templates/template_oa/public/src/assets/iconfont/iconfont.woff2 +0 -0
- package/templates/template_oa/public/src/assets/images/.DS_Store +0 -0
- package/templates/template_oa/public/src/assets/images/avatar.png +0 -0
- package/templates/template_oa/public/src/assets/images/loading.svg +40 -0
- package/templates/template_oa/public/src/components/.DS_Store +0 -0
- package/templates/template_oa/public/src/components/Alert/index.jsx +0 -0
- package/templates/template_oa/public/src/components/Alert/index.less +0 -0
- package/templates/template_oa/public/src/components/Auth/index.jsx +44 -0
- package/templates/template_oa/public/src/components/Footer/index.jsx +17 -0
- package/templates/template_oa/public/src/components/Footer/index.less +28 -0
- package/templates/template_oa/public/src/components/IFrame/index.jsx +37 -0
- package/templates/template_oa/public/src/components/IFrame/index.less +4 -0
- package/templates/template_oa/public/src/components/IconFont/index.jsx +10 -0
- package/templates/template_oa/public/src/components/IconFont/index.less +5 -0
- package/templates/template_oa/public/src/components/Layout/.DS_Store +0 -0
- package/templates/template_oa/public/src/components/Layout/Basic/index.jsx +31 -0
- package/templates/template_oa/public/src/components/Layout/Basic/index.less +74 -0
- package/templates/template_oa/public/src/components/Layout/CenterBody/index.jsx +15 -0
- package/templates/template_oa/public/src/components/Layout/CenterBody/index.less +36 -0
- package/templates/template_oa/public/src/components/Layout/FormBlock/index.jsx +23 -0
- package/templates/template_oa/public/src/components/Layout/FormBlock/index.less +34 -0
- package/templates/template_oa/public/src/components/Layout/Provider/index.jsx +12 -0
- package/templates/template_oa/public/src/components/Layout/index.jsx +26 -0
- package/templates/template_oa/public/src/components/Layout/index.less +8 -0
- package/templates/template_oa/public/src/components/Link/index.jsx +24 -0
- package/templates/template_oa/public/src/components/Link/index.less +11 -0
- package/templates/template_oa/public/src/components/Loading/index.jsx +14 -0
- package/templates/template_oa/public/src/components/Loading/index.less +85 -0
- package/templates/template_oa/public/src/components/Nav/index.jsx +121 -0
- package/templates/template_oa/public/src/components/Nav/index.less +38 -0
- package/templates/template_oa/public/src/components/Page/.DS_Store +0 -0
- package/templates/template_oa/public/src/components/Page/PageLoading/index.jsx +30 -0
- package/templates/template_oa/public/src/components/Page/PageLoading/index.less +29 -0
- package/templates/template_oa/public/src/components/Popup/index.jsx +22 -0
- package/templates/template_oa/public/src/components/Popup/index.less +18 -0
- package/templates/template_oa/public/src/components/Toast/index.jsx +60 -0
- package/templates/template_oa/public/src/components/Toast/index.less +43 -0
- package/templates/template_oa/public/src/components/mask/index.jsx +47 -0
- package/templates/template_oa/public/src/components/mask/index.less +32 -0
- package/templates/template_oa/public/src/dictionary/index.js +39 -0
- package/templates/template_oa/public/src/hooks/.DS_Store +0 -0
- package/templates/template_oa/public/src/hooks/index.jsx +20 -0
- package/templates/template_oa/public/src/hooks/useDelay.jsx +29 -0
- package/templates/template_oa/public/src/hooks/useImageLoader.jsx +27 -0
- package/templates/template_oa/public/src/hooks/useLoading.jsx +42 -0
- package/templates/template_oa/public/src/hooks/useLogin.jsx +33 -0
- package/templates/template_oa/public/src/hooks/usePreload.jsx +66 -0
- package/templates/template_oa/public/src/hooks/useScrollTop.jsx +32 -0
- package/templates/template_oa/public/src/hooks/useSearch.jsx +137 -0
- package/templates/template_oa/public/src/hooks/useUpdate.jsx +11 -0
- package/templates/template_oa/public/src/index.jsx +50 -0
- package/templates/template_oa/public/src/mock/auth.js +91 -0
- package/templates/template_oa/public/src/mock/index.js +63 -0
- package/templates/template_oa/public/src/mock/user.js +70 -0
- package/templates/template_oa/public/src/mock/utils.js +33 -0
- package/templates/template_oa/public/src/pages/.DS_Store +0 -0
- package/templates/template_oa/public/src/pages/components/pageTitle/index.jsx +13 -0
- package/templates/template_oa/public/src/pages/components/pageTitle/index.less +20 -0
- package/templates/template_oa/public/src/pages/login/index.jsx +27 -0
- package/templates/template_oa/public/src/pages/login/index.less +44 -0
- package/templates/template_oa/public/src/pages/video/index.jsx +91 -0
- package/templates/template_oa/public/src/pages/video/index.less +12 -0
- package/templates/template_oa/public/src/provider/app.jsx +119 -0
- package/templates/template_oa/public/src/provider/menu.jsx +20 -0
- package/templates/template_oa/public/src/route.jsx +43 -0
- package/templates/template_oa/public/src/services/.DS_Store +0 -0
- package/templates/template_oa/public/src/services/auth.js +121 -0
- package/templates/template_oa/public/src/services/index.js +181 -0
- package/templates/template_oa/public/src/services/user.js +26 -0
- package/templates/template_oa/public/src/services/video.js +33 -0
- package/templates/template_oa/public/src/utils/.DS_Store +0 -0
- package/templates/template_oa/public/src/utils/index.js +66 -0
- package/templates/template_oa/public/static/.DS_Store +0 -0
- package/templates/template_oa/public/static/about.html +1 -0
- package/templates/template_oa/public/static/kssoLogin.html +22 -0
- package/templates/template_oa/readme.md +60 -0
- package/templates/template_oa/release/.DS_Store +0 -0
- package/templates/template_oa/report.sh +68 -0
- package/templates/template_oa/tools/.DS_Store +0 -0
- package/templates/template_oa/tools/iconfont/.DS_Store +0 -0
- package/templates/template_oa/tools/iconfont/dist/.DS_Store +0 -0
- package/templates/template_oa/tools/iconfont/gulpfile.js +70 -0
- package/templates/template_oa/tools/iconfont/package.json +20 -0
- package/templates/template_oa/tools/iconfont/run.sh +39 -0
- package/templates/template_oa/tools/iconfont/svg/.DS_Store +0 -0
- package/templates/template_oa/tools/iconfont/svg/arrowBack.svg +1 -0
- package/templates/template_oa/tools/iconfont/svg/check.svg +1 -0
- package/templates/template_oa/tools/iconfont/svg/close.svg +1 -0
- package/templates/template_oa/tools/iconfont/svg/down.svg +1 -0
- package/templates/template_oa/tools/iconfont/svg/image.svg +1 -0
- package/templates/template_oa/tools/iconfont/svg/play.svg +1 -0
- package/templates/template_oa/tools/iconfont/svg/refresh.svg +1 -0
- package/templates/template_oa/tools/iconfont/svg/warn.svg +1 -0
- package/templates/template_oa/tools/iconfont/templates/_icons.css +26 -0
- package/templates/template_oa/tools/iconfont/templates/_icons.less +29 -0
- package/templates/template_oa/tools/iconfont/templates/index.html +56 -0
- package/templates/template_oa/tools/tinypng/.DS_Store +0 -0
- package/templates/template_oa/tools/tinypng/img/.DS_Store +0 -0
- package/templates/template_oa/tools/tinypng/package.json +11 -0
- package/templates/template_oa/tools/tinypng/run.sh +15 -0
- package/templates/template_oa/versionPublish.sh +27 -0
- package/templates/template_oa/webpack.api.js +62 -0
- package/templates/template_offcial/.gitignore +6 -0
- package/templates/template_offcial/build.sh +2 -0
- package/templates/template_offcial/cli.config.js +25 -0
- package/templates/template_offcial/dev.sh +89 -0
- package/templates/template_offcial/frontend_build.sh +83 -0
- package/templates/template_offcial/init/prepare-commit-msg +5 -0
- package/templates/template_offcial/init.sh +33 -0
- package/templates/template_offcial/jsconfig.json +10 -0
- package/templates/template_offcial/package.json +23 -0
- package/templates/template_offcial/public/404.html +26 -0
- package/templates/template_offcial/public/favicon.ico +0 -0
- package/templates/template_offcial/public/favicon.png +0 -0
- package/templates/template_offcial/public/index.html +52 -0
- package/templates/template_offcial/public/src/_antd.less +4 -0
- package/templates/template_offcial/public/src/_reset.less +130 -0
- package/templates/template_offcial/public/src/_variable.less +78 -0
- package/templates/template_offcial/public/src/assets/iconfont/iconfont.eot +0 -0
- package/templates/template_offcial/public/src/assets/iconfont/iconfont.less +57 -0
- package/templates/template_offcial/public/src/assets/iconfont/iconfont.svg +36 -0
- package/templates/template_offcial/public/src/assets/iconfont/iconfont.ttf +0 -0
- package/templates/template_offcial/public/src/assets/iconfont/iconfont.woff +0 -0
- package/templates/template_offcial/public/src/assets/iconfont/iconfont.woff2 +0 -0
- package/templates/template_offcial/public/src/assets/images/avatar.png +0 -0
- package/templates/template_offcial/public/src/assets/images/loading.svg +40 -0
- package/templates/template_offcial/public/src/components/Alert/index.jsx +0 -0
- package/templates/template_offcial/public/src/components/Alert/index.less +0 -0
- package/templates/template_offcial/public/src/components/Footer/index.jsx +32 -0
- package/templates/template_offcial/public/src/components/Footer/index.less +8 -0
- package/templates/template_offcial/public/src/components/Header/index.jsx +68 -0
- package/templates/template_offcial/public/src/components/Header/index.less +76 -0
- package/templates/template_offcial/public/src/components/IconFont/index.jsx +10 -0
- package/templates/template_offcial/public/src/components/IconFont/index.less +5 -0
- package/templates/template_offcial/public/src/components/Layout/Provider/index.jsx +12 -0
- package/templates/template_offcial/public/src/components/Layout/index.jsx +20 -0
- package/templates/template_offcial/public/src/components/Layout/index.less +20 -0
- package/templates/template_offcial/public/src/components/Link/index.jsx +24 -0
- package/templates/template_offcial/public/src/components/Link/index.less +11 -0
- package/templates/template_offcial/public/src/components/Page/PageLoading/index.jsx +30 -0
- package/templates/template_offcial/public/src/components/Page/PageLoading/index.less +29 -0
- package/templates/template_offcial/public/src/components/Popup/index.jsx +22 -0
- package/templates/template_offcial/public/src/components/Popup/index.less +18 -0
- package/templates/template_offcial/public/src/components/Toast/index.jsx +60 -0
- package/templates/template_offcial/public/src/components/Toast/index.less +43 -0
- package/templates/template_offcial/public/src/hooks/index.jsx +12 -0
- package/templates/template_offcial/public/src/hooks/useImageLoader.jsx +27 -0
- package/templates/template_offcial/public/src/hooks/useInToView.jsx +55 -0
- package/templates/template_offcial/public/src/hooks/usePreload.jsx +66 -0
- package/templates/template_offcial/public/src/hooks/useScroll.jsx +66 -0
- package/templates/template_offcial/public/src/index.jsx +50 -0
- package/templates/template_offcial/public/src/mock/index.js +63 -0
- package/templates/template_offcial/public/src/mock/user.js +70 -0
- package/templates/template_offcial/public/src/mock/utils.js +33 -0
- package/templates/template_offcial/public/src/pages/index.jsx +23 -0
- package/templates/template_offcial/public/src/pages/index.less +0 -0
- package/templates/template_offcial/public/src/pages/mobile/index.jsx +11 -0
- package/templates/template_offcial/public/src/pages/mobile/index.less +0 -0
- package/templates/template_offcial/public/src/pages/pc/index.jsx +45 -0
- package/templates/template_offcial/public/src/pages/pc/index.less +42 -0
- package/templates/template_offcial/public/src/provider/app.jsx +26 -0
- package/templates/template_offcial/public/src/route.jsx +26 -0
- package/templates/template_offcial/public/src/services/index.js +182 -0
- package/templates/template_offcial/public/src/services/user.js +26 -0
- package/templates/template_offcial/public/src/utils/index.js +109 -0
- package/templates/template_offcial/public/static/about.html +1 -0
- package/templates/template_offcial/readme.md +59 -0
- package/templates/template_offcial/report.sh +68 -0
- package/templates/template_offcial/tools/iconfont/gulpfile.js +70 -0
- package/templates/template_offcial/tools/iconfont/package.json +20 -0
- package/templates/template_offcial/tools/iconfont/run.sh +39 -0
- package/templates/template_offcial/tools/iconfont/svg/arrowBack.svg +1 -0
- package/templates/template_offcial/tools/iconfont/svg/check.svg +1 -0
- package/templates/template_offcial/tools/iconfont/svg/close.svg +1 -0
- package/templates/template_offcial/tools/iconfont/svg/down.svg +1 -0
- package/templates/template_offcial/tools/iconfont/svg/image.svg +1 -0
- package/templates/template_offcial/tools/iconfont/svg/play.svg +1 -0
- package/templates/template_offcial/tools/iconfont/svg/refresh.svg +1 -0
- package/templates/template_offcial/tools/iconfont/svg/warn.svg +1 -0
- package/templates/template_offcial/tools/iconfont/templates/_icons.css +26 -0
- package/templates/template_offcial/tools/iconfont/templates/_icons.less +29 -0
- package/templates/template_offcial/tools/iconfont/templates/index.html +56 -0
- package/templates/template_offcial/tools/tinypng/package.json +11 -0
- package/templates/template_offcial/tools/tinypng/run.sh +15 -0
- package/templates/template_offcial/versionPublish.sh +27 -0
- package/templates/template_offcial/webpack.api.js +36 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: none; display: block; shape-rendering: auto;" width="200px" height="200px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
|
3
|
+
<g transform="rotate(0 50 50)">
|
|
4
|
+
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#94908d">
|
|
5
|
+
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.8888888888888888s" repeatCount="indefinite"></animate>
|
|
6
|
+
</rect>
|
|
7
|
+
</g><g transform="rotate(40 50 50)">
|
|
8
|
+
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#94908d">
|
|
9
|
+
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.7777777777777778s" repeatCount="indefinite"></animate>
|
|
10
|
+
</rect>
|
|
11
|
+
</g><g transform="rotate(80 50 50)">
|
|
12
|
+
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#94908d">
|
|
13
|
+
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.6666666666666666s" repeatCount="indefinite"></animate>
|
|
14
|
+
</rect>
|
|
15
|
+
</g><g transform="rotate(120 50 50)">
|
|
16
|
+
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#94908d">
|
|
17
|
+
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5555555555555556s" repeatCount="indefinite"></animate>
|
|
18
|
+
</rect>
|
|
19
|
+
</g><g transform="rotate(160 50 50)">
|
|
20
|
+
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#94908d">
|
|
21
|
+
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.4444444444444444s" repeatCount="indefinite"></animate>
|
|
22
|
+
</rect>
|
|
23
|
+
</g><g transform="rotate(200 50 50)">
|
|
24
|
+
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#94908d">
|
|
25
|
+
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.3333333333333333s" repeatCount="indefinite"></animate>
|
|
26
|
+
</rect>
|
|
27
|
+
</g><g transform="rotate(240 50 50)">
|
|
28
|
+
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#94908d">
|
|
29
|
+
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.2222222222222222s" repeatCount="indefinite"></animate>
|
|
30
|
+
</rect>
|
|
31
|
+
</g><g transform="rotate(280 50 50)">
|
|
32
|
+
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#94908d">
|
|
33
|
+
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.1111111111111111s" repeatCount="indefinite"></animate>
|
|
34
|
+
</rect>
|
|
35
|
+
</g><g transform="rotate(320 50 50)">
|
|
36
|
+
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#94908d">
|
|
37
|
+
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite"></animate>
|
|
38
|
+
</rect>
|
|
39
|
+
</g>
|
|
40
|
+
<!-- [ldio] generated by https://loading.io/ --></svg>
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import ProviderApp from '@/provider/app';
|
|
3
|
+
import { useNavigate } from 'react-router-dom';
|
|
4
|
+
import {useLoading} from '@/hooks';
|
|
5
|
+
|
|
6
|
+
export const AuthShow=(props)=>{
|
|
7
|
+
const {name} = props;
|
|
8
|
+
const app = ProviderApp.useContainer();
|
|
9
|
+
if(app?.user?.authorities?.includes(name)){
|
|
10
|
+
return props.children;
|
|
11
|
+
}
|
|
12
|
+
return <></>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const AuthLogin=(props)=>{
|
|
16
|
+
const navigate = useNavigate();
|
|
17
|
+
const [pass,setPass] = useState(false)
|
|
18
|
+
const app = ProviderApp.useContainer();
|
|
19
|
+
const loading = useLoading();
|
|
20
|
+
|
|
21
|
+
const check=async ()=>{
|
|
22
|
+
loading.setLoading(true);
|
|
23
|
+
console.log(`[Auth]检查用户登录态`)
|
|
24
|
+
const req =await app.isLogin();
|
|
25
|
+
loading.setLoading(false);
|
|
26
|
+
if(req){
|
|
27
|
+
console.log(`[Auth]检查用户登录态成功`)
|
|
28
|
+
setPass(true);
|
|
29
|
+
}else{
|
|
30
|
+
console.log(`[Auth]检查用户登录态失败`)
|
|
31
|
+
setPass(false);
|
|
32
|
+
navigate('/superAdminLogin');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
useEffect(check,[]);
|
|
36
|
+
|
|
37
|
+
if(pass){
|
|
38
|
+
return props.children;
|
|
39
|
+
}
|
|
40
|
+
return <>检查登录态中...</>
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
export default {AuthShow,AuthLogin};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styles from './index.less';
|
|
3
|
+
|
|
4
|
+
const Footer = (props) => {
|
|
5
|
+
return (
|
|
6
|
+
<section className={styles.footer}>
|
|
7
|
+
<hgroup>
|
|
8
|
+
<p>Copyright@2017 版权所有 kingnet.com,All Rights Reserved 沪ICP备10215773号-1</p>
|
|
9
|
+
<p>本系统现仅支持Chrome和Safari浏览器,其他浏览器可能会出现兼容性问题。</p>
|
|
10
|
+
<a href='http://oa.test.com/versionlog/view' target='_blank' style={{ marginTop: '10px' }}>
|
|
11
|
+
版本日志
|
|
12
|
+
</a>
|
|
13
|
+
</hgroup>
|
|
14
|
+
</section>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
export default Footer;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@import '~@/_variable.less';
|
|
2
|
+
|
|
3
|
+
.footer {
|
|
4
|
+
position: absolute;
|
|
5
|
+
bottom: 0;
|
|
6
|
+
|
|
7
|
+
box-shadow: 0px -2px 3px #dde3e7;
|
|
8
|
+
min-height: var(--height-footer);
|
|
9
|
+
width: 100%;
|
|
10
|
+
background-color: white;
|
|
11
|
+
hgroup {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
width: 100%;
|
|
17
|
+
min-height: var(--height-footer);
|
|
18
|
+
}
|
|
19
|
+
p {
|
|
20
|
+
color: #9bb5c9;
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
margin-bottom: 0;
|
|
23
|
+
}
|
|
24
|
+
a {
|
|
25
|
+
color: rgb(119, 119, 119);
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { useEffect,useState,useRef } from 'react';
|
|
2
|
+
import styles from './index.less';
|
|
3
|
+
|
|
4
|
+
const Iframe=(props)=>{
|
|
5
|
+
const {className=''}=props;
|
|
6
|
+
const ref = useRef();
|
|
7
|
+
const [height,setHeight] = useState('0px');
|
|
8
|
+
|
|
9
|
+
useEffect(()=>{
|
|
10
|
+
window.addEventListener('message',(e)=>{
|
|
11
|
+
if(e?.data?.msg==='resize'){
|
|
12
|
+
if(e.data.id===props.name){
|
|
13
|
+
setHeight(e.data.height+2+'px');
|
|
14
|
+
}
|
|
15
|
+
}else if(e?.data?.msg==='link'){
|
|
16
|
+
location.href=e.data.url;
|
|
17
|
+
}else{
|
|
18
|
+
// console.log(e?.data);
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
},[])
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<iframe
|
|
25
|
+
className={`${styles.iframeWrap} ${className}`}
|
|
26
|
+
sandbox='allow-same-origin allow-scripts'
|
|
27
|
+
name={props.name}
|
|
28
|
+
ref={ref}
|
|
29
|
+
src={props.url}
|
|
30
|
+
style={{width:'100%',height:height,verticalAlign:'bottom'}}
|
|
31
|
+
scrolling="none"
|
|
32
|
+
frameBorder="0"
|
|
33
|
+
/>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export default React.memo(Iframe);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styles from'./index.less';
|
|
3
|
+
|
|
4
|
+
const IconFont=(props)=>{
|
|
5
|
+
const {icon,className,...others} = props;
|
|
6
|
+
return (
|
|
7
|
+
<span {...others} className={`iconfont icon-${icon} ${styles.iconBox} ${className||''}`} ></span>
|
|
8
|
+
)
|
|
9
|
+
}
|
|
10
|
+
export default IconFont;
|
|
Binary file
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {Outlet} from 'react-router-dom';
|
|
3
|
+
import Iframe from '@/components/IFrame';
|
|
4
|
+
import styles from './index.less';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
const LayoutBasic=(props)=>{
|
|
8
|
+
const {nav=""} = props;
|
|
9
|
+
return (
|
|
10
|
+
<section className={styles.windowWrap}>
|
|
11
|
+
<Iframe name='header' url={OA_MENU_HOST} className={styles.iframeHeader} />
|
|
12
|
+
<section className={styles.centerWrap}>
|
|
13
|
+
|
|
14
|
+
<div className={styles.crumbs}>
|
|
15
|
+
<b>当前位置:</b>
|
|
16
|
+
<span>服务</span>
|
|
17
|
+
<span style={{ margin: '0 4px' }}>{'>'}</span>
|
|
18
|
+
<a>{document.title}</a>
|
|
19
|
+
</div>
|
|
20
|
+
<section className={styles.content}>
|
|
21
|
+
{nav}
|
|
22
|
+
<section className={styles.body}>
|
|
23
|
+
<Outlet />
|
|
24
|
+
</section>
|
|
25
|
+
</section>
|
|
26
|
+
</section>
|
|
27
|
+
</section>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default LayoutBasic;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
@import '~@/_variable.less';
|
|
2
|
+
|
|
3
|
+
.windowWrap{
|
|
4
|
+
width:100%;
|
|
5
|
+
height:100%;
|
|
6
|
+
overflow: auto;
|
|
7
|
+
overflow: scroll;
|
|
8
|
+
-webkit-overflow-scrolling: touch;
|
|
9
|
+
display: block;
|
|
10
|
+
text-align: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.centerWrap {
|
|
14
|
+
min-width: 1200px;
|
|
15
|
+
max-width: 1600px;
|
|
16
|
+
position: relative;
|
|
17
|
+
display: inline-block;
|
|
18
|
+
z-index:0;
|
|
19
|
+
padding-bottom: var(--height-footer);
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.iframeHeader{
|
|
24
|
+
min-width: 100%;
|
|
25
|
+
width: 1200px;
|
|
26
|
+
height: var(--height-header);
|
|
27
|
+
min-height: var(--height-header);
|
|
28
|
+
position: sticky;
|
|
29
|
+
left:0;
|
|
30
|
+
top:0;
|
|
31
|
+
z-index: 2;
|
|
32
|
+
font-size: 60px;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
border:1px solid red;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.crumbs{
|
|
38
|
+
height: 36px;
|
|
39
|
+
width: 100%;
|
|
40
|
+
max-width: 1600px;
|
|
41
|
+
padding:0 20px;
|
|
42
|
+
font-size: 14px;
|
|
43
|
+
color: #666;
|
|
44
|
+
margin-bottom: 2px;
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
p,
|
|
48
|
+
span {
|
|
49
|
+
font-size: inherit;
|
|
50
|
+
color: inherit;
|
|
51
|
+
}
|
|
52
|
+
span {
|
|
53
|
+
color: rgba(0, 0, 0, 0.65);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.content{
|
|
58
|
+
display: flex;
|
|
59
|
+
box-shadow: 0 0 5px 0 rgba(0,0,0,.15);
|
|
60
|
+
.body {
|
|
61
|
+
overflow: auto;
|
|
62
|
+
flex:1;
|
|
63
|
+
height:100%;
|
|
64
|
+
position: relative;
|
|
65
|
+
&::-webkit-scrollbar {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import styles from './index.less';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const LayoutCenterBody=(props)=>{
|
|
7
|
+
const {className,layout='normal'} = props;
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<section data-layout={layout} className={ className?`${styles.contentBody} ${className}`:styles.contentBody }>
|
|
11
|
+
{props.children}
|
|
12
|
+
</section>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
15
|
+
export default LayoutCenterBody;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@import '~@/_variable.less';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
.contentBody{
|
|
5
|
+
width:100%;
|
|
6
|
+
height:100%;
|
|
7
|
+
overflow: auto;
|
|
8
|
+
overflow: scroll;
|
|
9
|
+
-webkit-overflow-scrolling: touch;
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
&[data-layout='xy-center']{
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
align-items: center;
|
|
17
|
+
}
|
|
18
|
+
&[data-layout='x-center']{
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
flex-wrap: wrap;
|
|
23
|
+
}
|
|
24
|
+
&[data-layout='y-center']{
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
body[data-debug-layout]{
|
|
32
|
+
.contentBody{
|
|
33
|
+
border:1px solid red;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styles from './index.less';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export const FormBlockByTitle = (props) => {
|
|
7
|
+
const {className=''}=props;
|
|
8
|
+
return (
|
|
9
|
+
<section id={props.title} className={`${styles.blockByTitle} ${className}`}>
|
|
10
|
+
{props.title || props.rightBtns ? (
|
|
11
|
+
<div className={styles.titleLine}>
|
|
12
|
+
<div>{props.title ? <div className={styles.title}>{props.title}</div> : ''}</div>
|
|
13
|
+
<div className={styles.rightBtns}>{props.rightBtns}</div>
|
|
14
|
+
</div>
|
|
15
|
+
) : (
|
|
16
|
+
<div className={styles.titleNone} />
|
|
17
|
+
)}
|
|
18
|
+
{props.children}
|
|
19
|
+
</section>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default FormBlockByTitle;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
.blockByTitle {
|
|
3
|
+
border: 1px solid #eaeaea;
|
|
4
|
+
padding: 0 19px 15px;
|
|
5
|
+
background: white;
|
|
6
|
+
border-radius: 3px;
|
|
7
|
+
margin-bottom: 20px;
|
|
8
|
+
}
|
|
9
|
+
.titleLine {
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 50px;
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
}
|
|
15
|
+
.title {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
height: 26px;
|
|
20
|
+
min-width: 78px;
|
|
21
|
+
padding: 0 6px;
|
|
22
|
+
color: #fffefe;
|
|
23
|
+
border-radius: 0 0 4px 4px;
|
|
24
|
+
background-color: #2a96fc;
|
|
25
|
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
26
|
+
}
|
|
27
|
+
.titleNone{
|
|
28
|
+
height: 15px;
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.rightBtns{
|
|
33
|
+
margin-top: 10px;
|
|
34
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {Outlet} from 'react-router-dom';
|
|
3
|
+
import ProviderApp from '@/provider/app';
|
|
4
|
+
|
|
5
|
+
const LayoutProvider=(props)=>{
|
|
6
|
+
return (
|
|
7
|
+
<ProviderApp.Provider>
|
|
8
|
+
<Outlet />
|
|
9
|
+
</ProviderApp.Provider>
|
|
10
|
+
)
|
|
11
|
+
}
|
|
12
|
+
export default LayoutProvider;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ProviderApp from '@/provider/app';
|
|
3
|
+
|
|
4
|
+
import {Outlet} from 'react-router-dom';
|
|
5
|
+
import { ConfigProvider } from 'antd';
|
|
6
|
+
import LayoutBasic from './Basic';
|
|
7
|
+
import LayoutCenterBody from './CenterBody';
|
|
8
|
+
import zhCN from 'antd/lib/locale/zh_CN';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
import styles from './index.less';
|
|
12
|
+
|
|
13
|
+
// 站点最基础的layout,用于控制一些全局环境变量
|
|
14
|
+
const Layout = (props) => {
|
|
15
|
+
return (
|
|
16
|
+
<ProviderApp.Provider>
|
|
17
|
+
<ConfigProvider locale={zhCN} autoInsertSpaceInButton={false}>
|
|
18
|
+
<Outlet />
|
|
19
|
+
</ConfigProvider>
|
|
20
|
+
</ProviderApp.Provider>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
export { Layout,LayoutCenterBody,LayoutBasic };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { openLink,jumpUrl } from '@/utils';
|
|
3
|
+
import styles from './index.less';
|
|
4
|
+
|
|
5
|
+
const Link=(props)=>{
|
|
6
|
+
const {children,className='',onClick,href='',target=''} = props;
|
|
7
|
+
|
|
8
|
+
const onLink=()=>{
|
|
9
|
+
if(href){
|
|
10
|
+
if(target=='_blank'){
|
|
11
|
+
openLink(href);
|
|
12
|
+
// window.open(href);
|
|
13
|
+
}else{
|
|
14
|
+
jumpUrl(href);
|
|
15
|
+
}
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
if(onClick)onClick();
|
|
19
|
+
}
|
|
20
|
+
return (
|
|
21
|
+
<span onClick={onLink} className={`${styles.linkWrap} ${className}`}>{children}</span>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
export default React.memo(Link);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import React,{useMemo} from 'react';
|
|
4
|
+
import styles from './index.less';
|
|
5
|
+
styles;
|
|
6
|
+
export const Loading=()=>{
|
|
7
|
+
return (
|
|
8
|
+
<div className="ldio-2oha7mxue8v">
|
|
9
|
+
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
|
|
10
|
+
</div>
|
|
11
|
+
)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default React.memo(Loading);
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
|
|
2
|
+
:global{
|
|
3
|
+
@color:#fff;
|
|
4
|
+
@keyframes ldio-2oha7mxue8v {
|
|
5
|
+
0% { opacity: 1 }
|
|
6
|
+
100% { opacity: 0 }
|
|
7
|
+
}
|
|
8
|
+
.ldio-2oha7mxue8v div:local {
|
|
9
|
+
left:0px;
|
|
10
|
+
top:0px;
|
|
11
|
+
position: absolute;
|
|
12
|
+
animation: ldio-2oha7mxue8v linear 1s infinite;
|
|
13
|
+
background: @color;
|
|
14
|
+
width: 12px;
|
|
15
|
+
height: 24px;
|
|
16
|
+
border-radius: 6px / 12px;
|
|
17
|
+
transform-origin: 40px 40px;
|
|
18
|
+
}
|
|
19
|
+
.ldio-2oha7mxue8v div:nth-child(1) {
|
|
20
|
+
transform: rotate(0deg);
|
|
21
|
+
animation-delay: -0.9166666666666666s;
|
|
22
|
+
background: @color;
|
|
23
|
+
}.ldio-2oha7mxue8v div:nth-child(2) {
|
|
24
|
+
transform: rotate(30deg);
|
|
25
|
+
animation-delay: -0.8333333333333334s;
|
|
26
|
+
background: @color;
|
|
27
|
+
}.ldio-2oha7mxue8v div:nth-child(3) {
|
|
28
|
+
transform: rotate(60deg);
|
|
29
|
+
animation-delay: -0.75s;
|
|
30
|
+
background: @color;
|
|
31
|
+
}.ldio-2oha7mxue8v div:nth-child(4) {
|
|
32
|
+
transform: rotate(90deg);
|
|
33
|
+
animation-delay: -0.6666666666666666s;
|
|
34
|
+
background: @color;
|
|
35
|
+
}.ldio-2oha7mxue8v div:nth-child(5) {
|
|
36
|
+
transform: rotate(120deg);
|
|
37
|
+
animation-delay: -0.5833333333333334s;
|
|
38
|
+
background: @color;
|
|
39
|
+
}.ldio-2oha7mxue8v div:nth-child(6) {
|
|
40
|
+
transform: rotate(150deg);
|
|
41
|
+
animation-delay: -0.5s;
|
|
42
|
+
background: @color;
|
|
43
|
+
}.ldio-2oha7mxue8v div:nth-child(7) {
|
|
44
|
+
transform: rotate(180deg);
|
|
45
|
+
animation-delay: -0.4166666666666667s;
|
|
46
|
+
background: @color;
|
|
47
|
+
}.ldio-2oha7mxue8v div:nth-child(8) {
|
|
48
|
+
transform: rotate(210deg);
|
|
49
|
+
animation-delay: -0.3333333333333333s;
|
|
50
|
+
background: @color;
|
|
51
|
+
}.ldio-2oha7mxue8v div:nth-child(9) {
|
|
52
|
+
transform: rotate(240deg);
|
|
53
|
+
animation-delay: -0.25s;
|
|
54
|
+
background: @color;
|
|
55
|
+
}.ldio-2oha7mxue8v div:nth-child(10) {
|
|
56
|
+
transform: rotate(270deg);
|
|
57
|
+
animation-delay: -0.16666666666666666s;
|
|
58
|
+
background: @color;
|
|
59
|
+
}.ldio-2oha7mxue8v div:nth-child(11) {
|
|
60
|
+
transform: rotate(300deg);
|
|
61
|
+
animation-delay: -0.08333333333333333s;
|
|
62
|
+
background: @color;
|
|
63
|
+
}.ldio-2oha7mxue8v div:nth-child(12) {
|
|
64
|
+
transform: rotate(330deg);
|
|
65
|
+
animation-delay: 0s;
|
|
66
|
+
background: @color;
|
|
67
|
+
}
|
|
68
|
+
.loadingio-spinner-spinner-vviroavveu {
|
|
69
|
+
width: 200px;
|
|
70
|
+
height: 200px;
|
|
71
|
+
display: inline-block;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
background: transparent;
|
|
74
|
+
}
|
|
75
|
+
.ldio-2oha7mxue8v {
|
|
76
|
+
width: 80px;
|
|
77
|
+
height: 80px;
|
|
78
|
+
position: relative;
|
|
79
|
+
transform: translateZ(0) scale(1);
|
|
80
|
+
backface-visibility: hidden;
|
|
81
|
+
transform-origin: 0 0; /* see note above */
|
|
82
|
+
}
|
|
83
|
+
.ldio-2oha7mxue8v div { box-sizing: content-box; }
|
|
84
|
+
/* generated by https://loading.io/ */
|
|
85
|
+
}
|