├── .DS_Store ├── .gitignore ├── .vscode └── launch.json ├── client ├── .eslintrc ├── .gitignore ├── LICENSE ├── README.md ├── build │ ├── asset-manifest.json │ ├── favicon.ico │ ├── hash.js │ ├── index.html │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ ├── reset.css │ ├── robots.txt │ ├── service-worker.js │ ├── spark-md5.min.js │ └── static │ │ ├── css │ │ ├── 0.371969c2.chunk.css │ │ ├── 0.371969c2.chunk.css.gz │ │ ├── 1.b695c2c7.chunk.css │ │ ├── 1.b695c2c7.chunk.css.gz │ │ ├── 10.39541017.chunk.css │ │ ├── 10.39541017.chunk.css.gz │ │ ├── 11.ba4d032b.chunk.css │ │ ├── 11.ba4d032b.chunk.css.gz │ │ ├── 12.5d77b4aa.chunk.css │ │ ├── 12.5d77b4aa.chunk.css.gz │ │ ├── 13.4c2f88d6.chunk.css │ │ ├── 13.4c2f88d6.chunk.css.gz │ │ ├── 14.e93f3129.chunk.css │ │ ├── 14.e93f3129.chunk.css.gz │ │ ├── 15.038ab382.chunk.css │ │ ├── 16.a46e298c.chunk.css │ │ ├── 17.a1fdeba1.chunk.css │ │ ├── 2.19b6ca2f.chunk.css │ │ ├── 3.76bf3c25.chunk.css │ │ ├── 3.76bf3c25.chunk.css.gz │ │ ├── 7.efba28c3.chunk.css │ │ ├── 7.efba28c3.chunk.css.gz │ │ ├── 8.c5223997.chunk.css │ │ ├── 8.c5223997.chunk.css.gz │ │ ├── 9.34994217.chunk.css │ │ └── 9.34994217.chunk.css.gz │ │ └── media │ │ ├── 404.9161e238.png │ │ └── bg.96c8b37a.png ├── config-overrides.js ├── jsconfig.json ├── package.json ├── public │ ├── favicon.ico │ ├── hash.js │ ├── index.html │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ ├── reset.css │ ├── robots.txt │ └── spark-md5.min.js ├── src │ ├── App.js │ ├── api │ │ └── index.js │ ├── assets │ │ └── gray.css │ ├── components │ │ ├── 404 │ │ │ ├── images │ │ │ │ └── 404.png │ │ │ ├── index.js │ │ │ └── index.less │ │ ├── Attachment │ │ │ ├── Attachment.js │ │ │ ├── AttachmentAttr.js │ │ │ └── index.js │ │ ├── Auth │ │ │ └── index.js │ │ ├── AuthRouter │ │ │ └── index.js │ │ ├── BaseFields │ │ │ └── index.js │ │ ├── BigTable │ │ │ ├── index.js │ │ │ └── style.css │ │ ├── CascadeDrop │ │ │ ├── CascadeDrop.js │ │ │ ├── CascadeDropAttr.js │ │ │ └── index.js │ │ ├── CellBase │ │ │ └── index.js │ │ ├── Date │ │ │ ├── Date.js │ │ │ ├── DateAttr.js │ │ │ └── index.js │ │ ├── DateSection │ │ │ ├── DateSection.js │ │ │ ├── DateSectionAttr.js │ │ │ └── index.js │ │ ├── DragAndDrop │ │ │ ├── DropContainer.js │ │ │ ├── SimpleFields.js │ │ │ ├── WrapperDrag.js │ │ │ └── WrapperDrop.js │ │ ├── DropDown │ │ │ ├── DropDownField.js │ │ │ ├── DropDownFieldAttr.js │ │ │ └── index.js │ │ ├── Dustbin.js │ │ ├── FormHidden │ │ │ ├── FormHidden.js │ │ │ ├── FormHiddenAttr.js │ │ │ └── index.js │ │ ├── FormLayout │ │ │ ├── FormLayout.js │ │ │ ├── FormLayoutAttr.js │ │ │ └── index.js │ │ ├── GridCol │ │ │ └── index.js │ │ ├── LayoutFields │ │ │ └── index.js │ │ ├── MultipleBox │ │ │ ├── MultipleBox.js │ │ │ ├── MultipleBoxAttr.js │ │ │ └── index.js │ │ ├── RadioBox │ │ │ ├── RadioBox.js │ │ │ ├── RadioBoxAttr.js │ │ │ └── index.js │ │ ├── ResizeDemo │ │ │ ├── index.js │ │ │ ├── styles.css │ │ │ ├── styles.css.map │ │ │ └── styles.scss │ │ ├── TextAreaField │ │ │ ├── TextAreaField.js │ │ │ ├── TextAreaFieldAttr.js │ │ │ └── index.js │ │ ├── TextField │ │ │ ├── TextField.js │ │ │ ├── TextFieldAttr.js │ │ │ └── index.js │ │ ├── TextMoneyField │ │ │ ├── TextMoneyField.js │ │ │ ├── TextMoneyFieldAttr.js │ │ │ └── index.js │ │ ├── TextNumberField │ │ │ ├── TextNumberField.js │ │ │ ├── TextNumberFieldAttr.js │ │ │ └── index.js │ │ ├── box │ │ │ └── box.js │ │ ├── footer │ │ │ └── index.js │ │ ├── header │ │ │ ├── index.css │ │ │ ├── index.js │ │ │ └── index.less │ │ ├── left-nav │ │ │ ├── action-type.js │ │ │ ├── action.js │ │ │ ├── index.js │ │ │ ├── index.less │ │ │ └── reducer.js │ │ ├── link-a │ │ │ └── index.js │ │ ├── loading │ │ │ └── index.js │ │ ├── test.js │ │ └── test │ │ │ ├── TestField.js │ │ │ ├── TestFieldAttr.js │ │ │ └── index.js │ ├── config │ │ ├── index.js │ │ ├── menuConfig.js │ │ └── type.js │ ├── directive │ │ └── dragdropdirective.js │ ├── images │ │ ├── angledown.png │ │ ├── attachment.png │ │ ├── cascadedrop.png │ │ ├── date.png │ │ ├── datesection.png │ │ ├── formhidden.png │ │ ├── formsection.png │ │ ├── money.png │ │ ├── multiplebox.png │ │ ├── number.png │ │ ├── radiobox.png │ │ ├── textareafield.png │ │ └── textfield.png │ ├── index.js │ ├── logo.svg │ ├── mock │ │ ├── map.json │ │ └── world.json │ ├── pages │ │ ├── VirtualDom │ │ │ ├── element.js │ │ │ └── index.js │ │ ├── admin │ │ │ └── admin.js │ │ ├── category │ │ │ ├── add-form.js │ │ │ ├── category.js │ │ │ ├── test.js │ │ │ └── update-form.js │ │ ├── charts │ │ │ ├── D3 │ │ │ │ └── graph.js │ │ │ ├── bar.js │ │ │ ├── line.js │ │ │ ├── map.js │ │ │ └── pie.js │ │ ├── drag │ │ │ ├── Native.js │ │ │ ├── Rxjs.js │ │ │ └── index.js │ │ ├── form-design │ │ │ ├── FormDesign │ │ │ │ ├── index.css │ │ │ │ ├── index.js │ │ │ │ └── index.scss │ │ │ ├── FormDisplay │ │ │ │ ├── index.css │ │ │ │ ├── index.css.map │ │ │ │ ├── index.js │ │ │ │ └── index.scss │ │ │ ├── containers │ │ │ │ ├── index.js │ │ │ │ └── index.scss │ │ │ ├── index.js │ │ │ └── index.scss │ │ ├── github │ │ │ └── index.js │ │ ├── home │ │ │ ├── bar.jsx │ │ │ ├── home.css │ │ │ ├── home.js │ │ │ ├── home.less │ │ │ └── line.jsx │ │ ├── hooks │ │ │ ├── calculate-hash.js │ │ │ ├── example.js │ │ │ ├── fileUpload.js │ │ │ └── hooks.js │ │ ├── login │ │ │ ├── action-type.js │ │ │ ├── action.js │ │ │ ├── images │ │ │ │ └── bg.png │ │ │ ├── login.css │ │ │ ├── login.js │ │ │ ├── login.less │ │ │ └── reducer.js │ │ ├── order │ │ │ ├── calendar.js │ │ │ └── index.js │ │ ├── product │ │ │ ├── add.js │ │ │ ├── detail.js │ │ │ ├── index.js │ │ │ ├── product.js │ │ │ ├── richTextEdit.js │ │ │ └── upload.js │ │ ├── role │ │ │ ├── auth.js │ │ │ ├── index.js │ │ │ └── role.js │ │ └── user │ │ │ └── user.js │ ├── redux │ │ ├── index.js │ │ └── reducer.js │ └── utils │ │ ├── DragDropService.js │ │ ├── ajax.js │ │ ├── axios.js │ │ ├── common.js │ │ ├── field-cor-attr.js │ │ ├── field-images.js │ │ ├── request.js │ │ ├── storeUtils.js │ │ └── utils-form-design.js ├── stylelint.config.js ├── yarn.lock └── 笔记.md ├── doc └── img │ ├── 1572075655846.jpg │ ├── 1572075835814.jpg │ ├── 1572077173164.jpg │ ├── 1572077222666.gif │ ├── 1572077222666.jpg │ ├── 1572508162034.gif │ ├── 1572508162034.jpg │ ├── 1572938533169.jpg │ ├── 1573007074794.gif │ ├── 1573007074794.jpg │ ├── permission.gif │ ├── permission.jpg │ ├── roleList.gif │ ├── roleList.jpg │ ├── test.gif │ ├── test.png │ ├── userList.gif │ └── userList.jpg ├── readme.md └── server ├── .DS_Store ├── cluster.js ├── config ├── config.default.js ├── rsa_private_key.pem └── rsa_public_key.pem ├── controller ├── CacheLRU.js └── bigupload.js ├── db └── connect.js ├── models ├── CategoryModel.js ├── ProductModel.js ├── RoleModel.js └── UserModel.js ├── package.json ├── routers ├── file-upload.js └── index.js ├── server.js └── yarn.lock /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | *.lock 14 | 15 | # Directory for instrumented libs generated by jscoverage/JSCover 16 | lib-cov 17 | 18 | # Coverage directory used by tools like istanbul 19 | coverage 20 | 21 | # nyc test coverage 22 | .nyc_output 23 | 24 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 25 | .grunt 26 | 27 | # Bower dependency directory (https://bower.io/) 28 | bower_components 29 | 30 | # node-waf configuration 31 | .lock-wscript 32 | 33 | # Compiled binary addons (https://nodejs.org/api/addons.html) 34 | build/Release 35 | 36 | # Dependency directories 37 | node_modules/ 38 | jspm_packages/ 39 | 40 | # TypeScript v1 declaration files 41 | typings/ 42 | 43 | # Optional npm cache directory 44 | .npm 45 | 46 | # Optional eslint cache 47 | .eslintcache 48 | 49 | # Optional REPL history 50 | .node_repl_history 51 | 52 | # Output of 'npm pack' 53 | *.tgz 54 | 55 | # Yarn Integrity file 56 | .yarn-integrity 57 | 58 | # dotenv environment variables file 59 | .env 60 | 61 | # next.js build output 62 | .next 63 | 64 | # 秘钥 65 | *.pem -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // 使用 IntelliSense 了解相关属性。 3 | // 悬停以查看现有属性的描述。 4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "launch", 10 | "name": "nodemon", 11 | "runtimeExecutable": "nodemon", 12 | "program": "${workspaceFolder}/server/server.js", 13 | "restart": true, 14 | "console": "integratedTerminal", 15 | "internalConsoleOptions": "neverOpen" 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /client/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["airbnb", "airbnb/hooks"] 3 | } -------------------------------------------------------------------------------- /client/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | 25 | *.conf 26 | .stylelintcache -------------------------------------------------------------------------------- /client/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Composure 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /client/build/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/client/build/favicon.ico -------------------------------------------------------------------------------- /client/build/hash.js: -------------------------------------------------------------------------------- 1 | // /public/hash.js 2 | self.importScripts("/spark-md5.min.js"); // 导入脚本 3 | 4 | // 根据文件的内容生成文件 hash 就算修改用户名依旧可以判断是否是同一个文件,hash 值是唯一的 5 | self.onmessage = e => { 6 | const { fileChunkList } = e.data; 7 | const spark = new self.SparkMD5.ArrayBuffer(); 8 | let percentage = 0; 9 | let count = 0; 10 | const loadNext = index => { 11 | const reader = new FileReader(); 12 | reader.readAsArrayBuffer(fileChunkList[index].file); 13 | reader.onload = e => { 14 | count++; 15 | spark.append(e.target.result); 16 | if (count === fileChunkList.length) { 17 | self.postMessage({ 18 | percentage: 100, 19 | hash: spark.end() 20 | }); 21 | self.close(); 22 | } else { 23 | percentage += 100 / fileChunkList.length; 24 | self.postMessage({ 25 | percentage 26 | }); 27 | // 递归计算下一个切片 28 | loadNext(count); 29 | } 30 | }; 31 | }; 32 | loadNext(0); 33 | }; 34 | -------------------------------------------------------------------------------- /client/build/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/client/build/logo192.png -------------------------------------------------------------------------------- /client/build/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/client/build/logo512.png -------------------------------------------------------------------------------- /client/build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /client/build/reset.css: -------------------------------------------------------------------------------- 1 | /*! minireset.css v0.0.5 | MIT License | github.com/jgthms/minireset.css */ 2 | html, 3 | body, 4 | p, 5 | ol, 6 | ul, 7 | li, 8 | dl, 9 | dt, 10 | dd, 11 | blockquote, 12 | figure, 13 | fieldset, 14 | legend, 15 | textarea, 16 | pre, 17 | iframe, 18 | hr, 19 | h1, 20 | h2, 21 | h3, 22 | h4, 23 | h5, 24 | h6 { 25 | margin: 0; 26 | padding: 0; 27 | } 28 | 29 | h1, 30 | h2, 31 | h3, 32 | h4, 33 | h5, 34 | h6 { 35 | font-size: 100%; 36 | font-weight: normal; 37 | } 38 | 39 | ul { 40 | list-style: none; 41 | } 42 | 43 | button, 44 | input, 45 | select, 46 | textarea { 47 | margin: 0; 48 | } 49 | 50 | html { 51 | box-sizing: border-box; 52 | } 53 | 54 | 55 | *, *:before, *:after { 56 | box-sizing: inherit; 57 | } 58 | 59 | img, 60 | video { 61 | height: auto; 62 | max-width: 100%; 63 | } 64 | 65 | iframe { 66 | border: 0; 67 | } 68 | 69 | table { 70 | border-collapse: collapse; 71 | border-spacing: 0; 72 | } 73 | 74 | td, 75 | th { 76 | padding: 0; 77 | text-align: left; 78 | } 79 | #root{ 80 | width: 100%; 81 | height: 100%; 82 | } 83 | -------------------------------------------------------------------------------- /client/build/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | -------------------------------------------------------------------------------- /client/build/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Welcome to your Workbox-powered service worker! 3 | * 4 | * You'll need to register this file in your web app and you should 5 | * disable HTTP caching for this file too. 6 | * See https://goo.gl/nhQhGp 7 | * 8 | * The rest of the code is auto-generated. Please don't update this file 9 | * directly; instead, make changes to your Workbox build configuration 10 | * and re-run your build process. 11 | * See https://goo.gl/2aRDsh 12 | */ 13 | 14 | importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); 15 | 16 | importScripts( 17 | "/precache-manifest.698622eb27f13657b0800e4d8046d773.js" 18 | ); 19 | 20 | self.addEventListener('message', (event) => { 21 | if (event.data && event.data.type === 'SKIP_WAITING') { 22 | self.skipWaiting(); 23 | } 24 | }); 25 | 26 | workbox.core.clientsClaim(); 27 | 28 | /** 29 | * The workboxSW.precacheAndRoute() method efficiently caches and responds to 30 | * requests for URLs in the manifest. 31 | * See https://goo.gl/S9QRab 32 | */ 33 | self.__precacheManifest = [].concat(self.__precacheManifest || []); 34 | workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); 35 | 36 | workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/index.html"), { 37 | 38 | blacklist: [/^\/_/,/\/[^/?]+\.[^/]+$/], 39 | }); 40 | -------------------------------------------------------------------------------- /client/build/static/css/0.371969c2.chunk.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/client/build/static/css/0.371969c2.chunk.css.gz -------------------------------------------------------------------------------- /client/build/static/css/1.b695c2c7.chunk.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/client/build/static/css/1.b695c2c7.chunk.css.gz -------------------------------------------------------------------------------- /client/build/static/css/10.39541017.chunk.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/client/build/static/css/10.39541017.chunk.css.gz -------------------------------------------------------------------------------- /client/build/static/css/11.ba4d032b.chunk.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/client/build/static/css/11.ba4d032b.chunk.css.gz -------------------------------------------------------------------------------- /client/build/static/css/12.5d77b4aa.chunk.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/client/build/static/css/12.5d77b4aa.chunk.css.gz -------------------------------------------------------------------------------- /client/build/static/css/13.4c2f88d6.chunk.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/client/build/static/css/13.4c2f88d6.chunk.css.gz -------------------------------------------------------------------------------- /client/build/static/css/14.e93f3129.chunk.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/client/build/static/css/14.e93f3129.chunk.css.gz -------------------------------------------------------------------------------- /client/build/static/css/15.038ab382.chunk.css: -------------------------------------------------------------------------------- 1 | .not-found{background-color:#f0f2f5;height:100%}.not-found .left{height:100%;background:url(/static/media/404.9161e238.png) no-repeat 50%}.not-found .right{padding-left:50px;margin-top:150px}.not-found .right h1{font-size:35px}.not-found .right h2{margin-bottom:20px;font-size:20px} -------------------------------------------------------------------------------- /client/build/static/css/17.a1fdeba1.chunk.css: -------------------------------------------------------------------------------- 1 | .home{padding:24px;background:#fff;min-height:850px}.home .home-card{float:left}.home .home-content{position:absolute;top:420px;width:76%;border:1px solid #e8e8e8}.home .home-content .home-menu{font-size:20px}.home .home-content .home-menu span{cursor:pointer}.home .home-content .home-menu .home-menu-active{border-bottom:2px solid;padding:0 0 16px}.home .home-content .home-menu .home-menu-visited{margin-right:40px}.home .home-content .home-table-left{float:left;width:60%}.home .home-content .home-table-right{float:right;width:330px} -------------------------------------------------------------------------------- /client/build/static/css/3.76bf3c25.chunk.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/client/build/static/css/3.76bf3c25.chunk.css.gz -------------------------------------------------------------------------------- /client/build/static/css/7.efba28c3.chunk.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/client/build/static/css/7.efba28c3.chunk.css.gz -------------------------------------------------------------------------------- /client/build/static/css/8.c5223997.chunk.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/client/build/static/css/8.c5223997.chunk.css.gz -------------------------------------------------------------------------------- /client/build/static/css/9.34994217.chunk.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/client/build/static/css/9.34994217.chunk.css.gz -------------------------------------------------------------------------------- /client/build/static/media/404.9161e238.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/client/build/static/media/404.9161e238.png -------------------------------------------------------------------------------- /client/build/static/media/bg.96c8b37a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/client/build/static/media/bg.96c8b37a.png -------------------------------------------------------------------------------- /client/config-overrides.js: -------------------------------------------------------------------------------- 1 | const { override, fixBabelImports,addLessLoader,addWebpackAlias} = require('customize-cra'); 2 | const ProgressBarPlugin = require('progress-bar-webpack-plugin'); 3 | const StyleLintPlugin = require('stylelint-webpack-plugin') 4 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; 5 | const path = require("path"); 6 | const CompressionPlugin = require('compression-webpack-plugin'); 7 | 8 | const addMyPlugin = config => { 9 | 10 | let plugins = [ 11 | new ProgressBarPlugin({ 12 | format: 'Build [:bar] :percent (:elapsed seconds)', 13 | clear: false, 14 | }), 15 | new CompressionPlugin({ 16 | filename: "[path].gz[query]", 17 | algorithm: "gzip", 18 | test: /\.js$|\.css$|\.html$/, 19 | threshold: 10240, 20 | minRatio: 0.8 21 | }), 22 | new StyleLintPlugin({ 23 | 'files': ['**/*.{html,vue,css,sass,scss}'], 24 | 'fix': false, 25 | 'cache': true, 26 | 'emitErrors': true, 27 | 'failOnError': false 28 | }), 29 | // new BundleAnalyzerPlugin(), 30 | ] 31 | 32 | config.plugins = [...config.plugins,...plugins] 33 | 34 | return config 35 | } 36 | 37 | // const addWebpackModules = () => config => { 38 | // const loaders = config.module.rules.find(rule => Array.isArray(rule.oneOf)).oneOf 39 | // loaders[loaders.length - 4] = Object.assign( 40 | // loaders[loaders.length - 4], 41 | // webpackConfig.module.rules[0] 42 | // ) 43 | // return config 44 | // } 45 | 46 | 47 | 48 | // 关闭map 49 | process.env.GENERATE_SOURCEMAP = "false"; 50 | module.exports = override( 51 | // 按需打包,根据import(使用babel-plugin-import) 52 | fixBabelImports('import', { 53 | libraryName: 'antd', 54 | libraryDirectory: 'es', 55 | style: true, //自动打包相关样式 56 | }), 57 | // 自定义样式 58 | addLessLoader({ 59 | javascriptEnabled: true, 60 | modifyVars: { 61 | '@primary-color': '#00A5E4' 62 | }, //主题颜色 63 | }), 64 | addWebpackAlias({ 65 | ["@"]: path.resolve(__dirname, "src"), 66 | ["components"]: path.resolve(__dirname, "src/components"), 67 | ["api"]: path.resolve(__dirname, "src/api"), 68 | ["config"]: path.resolve(__dirname, "src/config"), 69 | }), 70 | addMyPlugin, 71 | ); -------------------------------------------------------------------------------- /client/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": "./", 4 | "paths": { 5 | "@/*": ["client/src/*"] 6 | } 7 | }, 8 | "exclude": ["client/node_modules", "client/dist","server"] 9 | } 10 | -------------------------------------------------------------------------------- /client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@antv/data-set": "^0.10.2", 7 | "antd": "^3.23.6", 8 | "axios": "^0.19.0", 9 | "babel-loader": "^8.0.6", 10 | "babel-plugin-import": "^1.13.0", 11 | "bizcharts": "^3.5.6", 12 | "customize-cra": "^0.8.0", 13 | "d3": "v4.*", 14 | "draft-js-export-html": "^1.4.1", 15 | "draftjs-to-html": "^0.8.4", 16 | "echarts": "^4.4.0", 17 | "echarts-for-react": "^2.0.15-beta.1", 18 | "jsonp": "^0.2.1", 19 | "less": "^3.10.3", 20 | "less-loader": "^5.0.0", 21 | "md5": "^2.2.1", 22 | "moment": "^2.24.0", 23 | "node-sass": "^4.13.1", 24 | "react": "^16.10.2", 25 | "react-app-rewired": "^2.1.3", 26 | "react-dnd-html5-backend": "^10.0.2", 27 | "react-dom": "^16.10.2", 28 | "react-draft-wysiwyg": "^1.13.2", 29 | "react-loadable": "^5.5.0", 30 | "react-redux": "^7.1.3", 31 | "react-router-dom": "^5.1.2", 32 | "react-scripts": "3.2.0", 33 | "react-sortablejs": "^2.0.11", 34 | "react-virtualized-auto-sizer": "^1.0.2", 35 | "react-window": "^1.8.5", 36 | "redux": "^4.0.4", 37 | "redux-devtools": "^3.5.0", 38 | "redux-devtools-extension": "^2.13.8", 39 | "redux-thunk": "^2.3.0", 40 | "rxjs": "^6.5.5", 41 | "rxjs-hooks": "^0.6.2", 42 | "store": "^2.0.12" 43 | }, 44 | "scripts": { 45 | "start": "react-app-rewired start", 46 | "dev": "yarn start & yarn server", 47 | "server": "nodemon ../server/server.js ", 48 | "build": "react-app-rewired build", 49 | "test": "react-app-rewired test", 50 | "eject": "react-app-rewired eject", 51 | "lint": "eslint --ext .js,.css,.scss src --fix" 52 | }, 53 | "eslintConfig": { 54 | "extends": "react-app", 55 | "plugins": [ 56 | "react-hooks" 57 | ], 58 | "rules": { 59 | "react-hooks/rules-of-hooks": "error", 60 | "react-hooks/exhaustive-deps": "warn" 61 | } 62 | }, 63 | "browserslist": { 64 | "production": [ 65 | ">0.2%", 66 | "not dead", 67 | "not op_mini all" 68 | ], 69 | "development": [ 70 | "last 1 chrome version", 71 | "last 1 firefox version", 72 | "last 1 safari version" 73 | ] 74 | }, 75 | "proxy": "http://localhost:8081", 76 | "devDependencies": { 77 | "compression-webpack-plugin": "^3.0.0", 78 | "envify": "^4.1.0", 79 | "eslint": "6.8.0", 80 | "eslint-config-airbnb": "18.1.0", 81 | "eslint-plugin-import": "^2.20.1", 82 | "eslint-plugin-jsx-a11y": "^6.2.3", 83 | "eslint-plugin-react": "^7.19.0", 84 | "eslint-plugin-react-hooks": "2.5.0", 85 | "image-webpack-loader": "^6.0.0", 86 | "progress-bar-webpack-plugin": "^1.12.1", 87 | "rollup-plugin-commonjs": "^10.1.0", 88 | "rollup-plugin-replace": "^2.2.0", 89 | "rollup-plugin-terser": "^5.1.2", 90 | "stylelint": "^13.6.1", 91 | "stylelint-config-recommended-scss": "^4.2.0", 92 | "stylelint-config-standard": "^20.0.0", 93 | "stylelint-scss": "^3.18.0", 94 | "stylelint-webpack-plugin": "^2.1.0", 95 | "terser": "^4.4.2", 96 | "terser-brunch": "^3.0.0", 97 | "thread-loader": "^2.1.3", 98 | "uglifyify": "^5.0.2", 99 | "webpack-bundle-analyzer": "^3.6.0" 100 | }, 101 | "babel": { 102 | "presets": [ 103 | "module:metro-react-native-babel-preset" 104 | ], 105 | "env": { 106 | "production": {} 107 | }, 108 | "plugins": [ 109 | [ 110 | "@babel/plugin-proposal-decorators", 111 | { 112 | "legacy": true 113 | } 114 | ], 115 | [ 116 | "transform-inline-environment-variables", 117 | { 118 | "include": [ 119 | "NODE_ENV", 120 | "API" 121 | ] 122 | } 123 | ], 124 | [ 125 | "@babel/plugin-proposal-optional-catch-binding" 126 | ] 127 | ] 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Composur/react-manage/7368193a2bc81768e7d4a31d2cb5766e8544a864/client/public/favicon.ico -------------------------------------------------------------------------------- /client/public/hash.js: -------------------------------------------------------------------------------- 1 | // /public/hash.js 2 | self.importScripts("/spark-md5.min.js"); // 导入脚本 3 | 4 | // 根据文件的内容生成文件 hash 就算修改用户名依旧可以判断是否是同一个文件,hash 值是唯一的 5 | self.onmessage = e => { 6 | const { fileChunkList } = e.data; 7 | const spark = new self.SparkMD5.ArrayBuffer(); 8 | let percentage = 0; 9 | let count = 0; 10 | const loadNext = index => { 11 | const reader = new FileReader(); 12 | reader.readAsArrayBuffer(fileChunkList[index].file); 13 | reader.onload = e => { 14 | count++; 15 | spark.append(e.target.result); 16 | if (count === fileChunkList.length) { 17 | self.postMessage({ 18 | percentage: 100, 19 | hash: spark.end() 20 | }); 21 | self.close(); 22 | } else { 23 | percentage += 100 / fileChunkList.length; 24 | self.postMessage({ 25 | percentage 26 | }); 27 | // 递归计算下一个切片 28 | loadNext(count); 29 | } 30 | }; 31 | }; 32 | loadNext(0); 33 | }; 34 | -------------------------------------------------------------------------------- /client/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 19 | 28 |52 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Qui dicta 53 | minus molestiae vel beatae natus eveniet ratione temporibus aperiam 54 | harum alias officiis assumenda officia quibusdam deleniti eos 55 | cupiditate dolore doloribus! 56 |
57 |58 | Ad dolore dignissimos asperiores dicta facere optio quod commodi nam 59 | tempore recusandae. Rerum sed nulla eum vero expedita ex delectus 60 | voluptates rem at neque quos facere sequi unde optio aliquam! 61 |
62 |68 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Qui dicta 69 | minus molestiae vel beatae natus eveniet ratione temporibus aperiam 70 | harum alias officiis assumenda officia quibusdam deleniti eos 71 | cupiditate dolore doloribus! 72 |
73 |74 | Ad dolore dignissimos asperiores dicta facere optio quod commodi nam 75 | tempore recusandae. Rerum sed nulla eum vero expedita ex delectus 76 | voluptates rem at neque quos facere sequi unde optio aliquam! 77 |
78 |45 | 用新渲染的对象树去和旧的树进行对比,记录这两棵树差异。记录下来的不同就是我们需要对页面真正的 46 | DOM 操作,然后把它们应用在真正的 DOM 树上,页面就变更了 47 |
48 | {/** 包括前端 PC 应用和后端应用,包括用户管理 / 商品分类管理 / 商品管理 / 权限管理等功能模块
28 |* 前端: 使用 React 全家桶 + Antd + Axios + ES6 + Webpack 等技术
29 |* 后端: 使用 Node + Express + Mongodb 等技术
30 |* 包括前端应用和后端应用注册,包括用户注册/登陆, 管理员/普通用户列表, 实时聊天,消息等模块
35 |* 前端: 使用 React 全家桶+ES6+Webpack 等技术
36 |* 后端: 使用 Node + express + mongodb + socketIO 等技术
37 |前端加后台
42 |联调接口
89 |功能验收
90 |登录功能设计
93 |权限验证
94 |页面排版
95 |content2
, 18 | }; 19 | 20 | export default class order extends Component { 21 | state = { 22 | key: 'tab1', 23 | noTitleKey: 'app', 24 | }; 25 | 26 | onTabChange = (key, type) => { 27 | this.setState({ [type]: key }); 28 | }; 29 | componentDidMount(){ 30 | console.log('父') 31 | } 32 | render() { 33 | return ( 34 |