├── .editorconfig ├── .env.development ├── .env.production ├── .env.staging ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── LICENSE ├── README.md ├── README.zh-CN.md ├── babel.config.js ├── build └── index.js ├── deploy-vue.sh ├── install.sh ├── jsconfig.json ├── package.json ├── plopfile.js ├── postcss.config.js ├── public ├── favicon.ico └── index.html ├── src ├── App.vue ├── api │ ├── system │ │ ├── sys-department-api.js │ │ ├── sys-permission-api.js │ │ ├── sys-role-api.js │ │ ├── sys-user-api.js │ │ └── upload-api.js │ └── user.js ├── assets │ ├── 401_images │ │ └── 401.gif │ ├── 404_images │ │ ├── 404.png │ │ └── 404_cloud.png │ └── custom-theme │ │ ├── fonts │ │ ├── element-icons.ttf │ │ └── element-icons.woff │ │ └── index.css ├── components │ ├── BackToTop │ │ └── index.vue │ ├── Breadcrumb │ │ └── index.vue │ ├── Charts │ │ ├── Keyboard.vue │ │ ├── LineMarker.vue │ │ ├── MixChart.vue │ │ └── mixins │ │ │ └── resize.js │ ├── DatePickerRange │ │ └── index.vue │ ├── DndList │ │ └── index.vue │ ├── DragSelect │ │ └── index.vue │ ├── Dropzone │ │ └── index.vue │ ├── ErrorLog │ │ └── index.vue │ ├── GithubCorner │ │ └── index.vue │ ├── Hamburger │ │ └── index.vue │ ├── HeaderSearch │ │ └── index.vue │ ├── ImageCropper │ │ ├── index.vue │ │ └── utils │ │ │ ├── data2blob.js │ │ │ ├── effectRipple.js │ │ │ ├── language.js │ │ │ └── mimes.js │ ├── JsonEditor │ │ └── index.vue │ ├── Kanban │ │ └── index.vue │ ├── MDinput │ │ └── index.vue │ ├── MarkdownEditor │ │ ├── default-options.js │ │ └── index.vue │ ├── Pagination │ │ └── index.vue │ ├── PanThumb │ │ └── index.vue │ ├── RightPanel │ │ └── index.vue │ ├── Screenfull │ │ └── index.vue │ ├── Share │ │ └── DropdownMenu.vue │ ├── SizeSelect │ │ └── index.vue │ ├── Sticky │ │ └── index.vue │ ├── SvgIcon │ │ └── index.vue │ ├── TextHoverEffect │ │ └── Mallki.vue │ ├── ThemePicker │ │ └── index.vue │ ├── Tinymce │ │ ├── components │ │ │ └── EditorImage.vue │ │ ├── dynamicLoadScript.js │ │ ├── index.vue │ │ ├── plugins.js │ │ └── toolbar.js │ ├── TreeSelect │ │ └── index.vue │ ├── Upload │ │ ├── SingleImage.vue │ │ ├── SingleImage2.vue │ │ └── SingleImage3.vue │ └── UploadExcel │ │ └── index.vue ├── directive │ ├── clipboard │ │ ├── clipboard.js │ │ └── index.js │ ├── el-drag-dialog │ │ ├── drag.js │ │ └── index.js │ ├── el-table │ │ ├── adaptive.js │ │ └── index.js │ ├── permission │ │ ├── index.js │ │ └── permission.js │ ├── sticky.js │ └── waves │ │ ├── index.js │ │ ├── waves.css │ │ └── waves.js ├── filters │ └── index.js ├── icons │ ├── index.js │ ├── svg │ │ ├── 404.svg │ │ ├── bug.svg │ │ ├── chart.svg │ │ ├── clipboard.svg │ │ ├── component.svg │ │ ├── dashboard.svg │ │ ├── documentation.svg │ │ ├── drag.svg │ │ ├── edit.svg │ │ ├── education.svg │ │ ├── email.svg │ │ ├── example.svg │ │ ├── excel.svg │ │ ├── exit-fullscreen.svg │ │ ├── eye-open.svg │ │ ├── eye.svg │ │ ├── form.svg │ │ ├── fullscreen.svg │ │ ├── guide.svg │ │ ├── icon.svg │ │ ├── international.svg │ │ ├── language.svg │ │ ├── link.svg │ │ ├── list.svg │ │ ├── lock.svg │ │ ├── message.svg │ │ ├── money.svg │ │ ├── nested.svg │ │ ├── password.svg │ │ ├── pdf.svg │ │ ├── people.svg │ │ ├── peoples.svg │ │ ├── qq.svg │ │ ├── search.svg │ │ ├── shopping.svg │ │ ├── size.svg │ │ ├── skill.svg │ │ ├── star.svg │ │ ├── tab.svg │ │ ├── table.svg │ │ ├── theme.svg │ │ ├── tree-table.svg │ │ ├── tree.svg │ │ ├── user.svg │ │ ├── wechat.svg │ │ └── zip.svg │ └── svgo.yml ├── layout │ ├── components │ │ ├── AppMain.vue │ │ ├── Navbar.vue │ │ ├── Settings │ │ │ └── index.vue │ │ ├── Sidebar │ │ │ ├── FixiOSBug.js │ │ │ ├── Item.vue │ │ │ ├── Link.vue │ │ │ ├── Logo.vue │ │ │ ├── SidebarItem.vue │ │ │ └── index.vue │ │ ├── TagsView │ │ │ ├── ScrollPane.vue │ │ │ └── index.vue │ │ └── index.js │ ├── index.vue │ └── mixin │ │ └── ResizeHandler.js ├── main.js ├── permission.js ├── router │ └── index.js ├── settings.js ├── store │ ├── getters.js │ ├── index.js │ └── modules │ │ ├── app.js │ │ ├── errorLog.js │ │ ├── permission.js │ │ ├── settings.js │ │ ├── tagsView.js │ │ └── user.js ├── styles │ ├── btn.scss │ ├── element-ui.scss │ ├── element-variables.scss │ ├── index.scss │ ├── mixin.scss │ ├── sidebar.scss │ ├── transition.scss │ └── variables.scss ├── utils │ ├── auth.js │ ├── clipboard.js │ ├── error-log.js │ ├── get-page-title.js │ ├── index.js │ ├── open-window.js │ ├── permission.js │ ├── request.js │ ├── scroll-to.js │ └── validate.js ├── vendor │ ├── Export2Excel.js │ └── Export2Zip.js └── views │ ├── dashboard │ ├── admin │ │ ├── components │ │ │ ├── BarChart.vue │ │ │ ├── BoxCard.vue │ │ │ ├── LineChart.vue │ │ │ ├── PanelGroup.vue │ │ │ ├── PieChart.vue │ │ │ ├── RaddarChart.vue │ │ │ ├── TodoList │ │ │ │ ├── Todo.vue │ │ │ │ ├── index.scss │ │ │ │ └── index.vue │ │ │ ├── TransactionTable.vue │ │ │ └── mixins │ │ │ │ └── resize.js │ │ └── index.vue │ ├── editor │ │ └── index.vue │ └── index.vue │ ├── documentation │ └── index.vue │ ├── error-log │ ├── components │ │ ├── ErrorTestA.vue │ │ └── ErrorTestB.vue │ └── index.vue │ ├── error-page │ ├── 401.vue │ └── 404.vue │ ├── icons │ ├── element-icons.js │ ├── index.vue │ └── svg-icons.js │ ├── login │ ├── auth-redirect.vue │ ├── components │ │ └── SocialSignin.vue │ └── index.vue │ ├── permission │ ├── components │ │ └── SwitchRoles.vue │ ├── directive.vue │ ├── page.vue │ └── role.vue │ ├── profile │ ├── components │ │ ├── Account.vue │ │ ├── Activity.vue │ │ ├── Timeline.vue │ │ └── UserCard.vue │ └── index.vue │ ├── redirect │ └── index.vue │ └── system │ ├── sys-menu │ ├── components │ │ └── sys-menu.vue │ └── sys-menu-list.vue │ ├── sys-role │ ├── components │ │ └── sys-role.vue │ ├── sys-role-list.vue │ └── sys-role-menu.vue │ └── sys-user │ ├── components │ ├── sys-user-head.vue │ ├── sys-user-password.vue │ └── sys-user.vue │ └── sys-user-list.vue └── vue.config.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | insert_final_newline = false 14 | trim_trailing_whitespace = false 15 | -------------------------------------------------------------------------------- /.env.development: -------------------------------------------------------------------------------- 1 | # just a flag 2 | ENV = 'development' 3 | 4 | # base api 5 | VUE_APP_BASE_API = 'http://localhost:8888/api' 6 | 7 | # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable, 8 | # to control whether the babel-plugin-dynamic-import-node plugin is enabled. 9 | # It only does one thing by converting all import() to require(). 10 | # This configuration can significantly increase the speed of hot updates, 11 | # when you have a large number of pages. 12 | # Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js 13 | 14 | VUE_CLI_BABEL_TRANSPILE_MODULES = true 15 | -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | # just a flag 2 | ENV = 'production' 3 | 4 | # base api 5 | VUE_APP_BASE_API = 'http://47.105.159.10:8888/api' 6 | 7 | -------------------------------------------------------------------------------- /.env.staging: -------------------------------------------------------------------------------- 1 | NODE_ENV = production 2 | 3 | # just a flag 4 | ENV = 'staging' 5 | 6 | # base api 7 | VUE_APP_BASE_API = '/stage-api' 8 | 9 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build/*.js 2 | src/assets 3 | public 4 | dist 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | **/*.log 8 | 9 | tests/**/coverage/ 10 | tests/e2e/reports 11 | selenium-debug.log 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | *.local 21 | 22 | package-lock.json 23 | yarn.lock 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # spring-boot-plus-vue 2 | 3 | ## 管理系统主页 4 | [http://47.105.159.10/](http://47.105.159.10/) 5 | 6 | ### 设置nodejs镜像 7 | ```text 8 | npm config set registry https://registry.npm.taobao.org 9 | ``` 10 | 11 | ### npm install 12 | ```text 13 | npm install 14 | ``` 15 | 16 | ### npm启动应用 17 | ```text 18 | npm start 19 | ``` 20 | 21 | ### npm build 22 | > 打包后的目录:dist 23 | ```text 24 | npm run-script build 25 | ``` 26 | -------------------------------------------------------------------------------- /README.zh-CN.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekidea/spring-boot-plus-vue/67ccf280067aedb564e76c6a2a99beeab31c3104/README.zh-CN.md -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/app' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /build/index.js: -------------------------------------------------------------------------------- 1 | const { run } = require('runjs') 2 | const chalk = require('chalk') 3 | const config = require('../vue.config.js') 4 | const rawArgv = process.argv.slice(2) 5 | const args = rawArgv.join(' ') 6 | 7 | if (process.env.npm_config_preview || rawArgv.includes('--preview')) { 8 | const report = rawArgv.includes('--report') 9 | 10 | run(`vue-cli-service build ${args}`) 11 | 12 | const port = 9526 13 | const publicPath = config.publicPath 14 | 15 | var connect = require('connect') 16 | var serveStatic = require('serve-static') 17 | const app = connect() 18 | 19 | app.use( 20 | publicPath, 21 | serveStatic('./dist', { 22 | index: ['index.html', '/'] 23 | }) 24 | ) 25 | 26 | app.listen(port, function () { 27 | console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`)) 28 | if (report) { 29 | console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`)) 30 | } 31 | 32 | }) 33 | } else { 34 | run(`vue-cli-service build ${args}`) 35 | } 36 | -------------------------------------------------------------------------------- /deploy-vue.sh: -------------------------------------------------------------------------------- 1 | #! /bin/shell 2 | 3 | # Copyright 2019-2029 geekidea(https://github.com/geekidea) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | #====================================================================== 18 | # 1. 下载或更新spring-boot-plus-vue版本库 19 | # 2. npm打包 20 | # 3. 将dist目录复制到Nginx静态目录中 21 | # 4. 备份dist目录 22 | # 5. 运行spring-boot-plus-vue 23 | # author: geekidea 24 | # date: 2020-03-06 25 | #====================================================================== 26 | 27 | NOW=$(date --date='0 days ago' "+%Y-%m-%d-%H-%M-%S") 28 | echo "${NOW}" 29 | 30 | if [ ! -d "spring-boot-plus-vue" ]; then 31 | git clone https://gitee.com/geekidea/spring-boot-plus-vue.git 32 | fi 33 | 34 | cd spring-boot-plus-vue 35 | rm -rf package-lock.json 36 | 37 | git checkout master 38 | git branch 39 | git pull 40 | 41 | rm -rf dist 42 | npm install 43 | npx vue-cli-service build 44 | 45 | cd .. 46 | if [ ! -d "spring-boot-plus-vue-back" ]; then 47 | mkdir spring-boot-plus-vue-back 48 | fi 49 | 50 | cp -r -f spring-boot-plus-vue/dist spring-boot-plus-vue-back/spring-boot-plus-vue-back-"${NOW}" 51 | echo "back spring-boot-plus-vue success" 52 | 53 | rm -rf /home/www/vue 54 | nginx -s reload 55 | mv spring-boot-plus-vue/dist /home/www/vue 56 | nginx -s reload 57 | echo "Deploy spring-boot-plus-vue success" 58 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/shell 2 | 3 | # Copyright 2019-2029 geekidea(https://github.com/geekidea) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | #====================================================================== 18 | # 1. 下载nodejs源 19 | # 2. yum安装nodejs 20 | # 3. 设置nodejs镜像 21 | # 4. 安装最新稳定版本 22 | # 5. 查看版本 23 | # 6. 全局安装 vue-cli 24 | # author: geekidea 25 | # date: 2020-03-25 26 | #====================================================================== 27 | 28 | curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash 29 | yum -y install nodejs 30 | npm config set registry https://registry.npm.taobao.org 31 | npm install -g n stable 32 | node -v 33 | npm -v 34 | npm install --global vue-cli 35 | 36 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": "./", 4 | "paths": { 5 | "@/*": ["src/*"] 6 | } 7 | }, 8 | "exclude": ["node_modules", "dist"] 9 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "spring-boot-plus-vue", 3 | "version": "4.2.1", 4 | "description": "基于vue-element-admin开发的,对应spring-boot-plus接口的前端项目", 5 | "author": "geekidea@qq.com", 6 | "license": "Apache License", 7 | "scripts": { 8 | "dev": "vue-cli-service serve", 9 | "build:prod": "vue-cli-service build", 10 | "build:stage": "vue-cli-service build --mode staging", 11 | "preview": "node build/index.js --preview", 12 | "lint": "eslint --ext .js,.vue src", 13 | "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml", 14 | "new": "plop" 15 | }, 16 | "husky": { 17 | "hooks": { 18 | "pre-commit": "lint-staged" 19 | } 20 | }, 21 | "lint-staged": { 22 | "src/**/*.{js,vue}": [ 23 | "eslint --fix", 24 | "git add" 25 | ] 26 | }, 27 | "keywords": [ 28 | "vue", 29 | "admin", 30 | "dashboard", 31 | "element-ui", 32 | "boilerplate", 33 | "admin-template", 34 | "management-system" 35 | ], 36 | "repository": { 37 | "type": "git", 38 | "url": "git+https://github.com/PanJiaChen/vue-element-admin.git" 39 | }, 40 | "bugs": { 41 | "url": "https://github.com/PanJiaChen/vue-element-admin.git/issues" 42 | }, 43 | "dependencies": { 44 | "axios": "0.18.1", 45 | "clipboard": "2.0.4", 46 | "codemirror": "5.45.0", 47 | "driver.js": "0.9.5", 48 | "dropzone": "5.5.1", 49 | "echarts": "4.2.1", 50 | "element-ui": "2.13.0", 51 | "file-saver": "2.0.1", 52 | "fuse.js": "3.4.4", 53 | "js-cookie": "2.2.0", 54 | "jsonlint": "1.6.3", 55 | "jszip": "3.2.1", 56 | "normalize.css": "7.0.0", 57 | "nprogress": "0.2.0", 58 | "path-to-regexp": "2.4.0", 59 | "screenfull": "4.2.0", 60 | "script-loader": "0.7.2", 61 | "showdown": "1.9.0", 62 | "sortablejs": "1.8.4", 63 | "tui-editor": "1.3.3", 64 | "vue": "2.6.10", 65 | "vue-count-to": "1.0.13", 66 | "vue-router": "3.0.2", 67 | "vue-splitpane": "1.0.4", 68 | "vuedraggable": "2.20.0", 69 | "vuex": "3.1.0", 70 | "xlsx": "0.14.1" 71 | }, 72 | "devDependencies": { 73 | "@babel/core": "7.0.0", 74 | "@babel/register": "7.0.0", 75 | "@vue/cli-plugin-babel": "3.5.3", 76 | "@vue/cli-plugin-eslint": "^3.9.1", 77 | "@vue/cli-plugin-unit-jest": "3.5.3", 78 | "@vue/cli-service": "3.5.3", 79 | "autoprefixer": "^9.5.1", 80 | "babel-core": "7.0.0-bridge.0", 81 | "babel-eslint": "10.0.1", 82 | "babel-jest": "23.6.0", 83 | "chalk": "2.4.2", 84 | "chokidar": "2.1.5", 85 | "connect": "3.6.6", 86 | "eslint": "5.15.3", 87 | "eslint-plugin-vue": "5.2.2", 88 | "html-webpack-plugin": "3.2.0", 89 | "husky": "1.3.1", 90 | "lint-staged": "8.1.5", 91 | "node-sass": "^4.9.0", 92 | "plop": "2.3.0", 93 | "runjs": "^4.3.2", 94 | "sass-loader": "^7.1.0", 95 | "script-ext-html-webpack-plugin": "2.1.3", 96 | "serve-static": "^1.13.2", 97 | "svg-sprite-loader": "4.1.3", 98 | "svgo": "1.2.0", 99 | "vue-template-compiler": "2.6.10" 100 | }, 101 | "engines": { 102 | "node": ">=8.9", 103 | "npm": ">= 3.0.0" 104 | }, 105 | "browserslist": [ 106 | "> 1%", 107 | "last 2 versions" 108 | ] 109 | } 110 | -------------------------------------------------------------------------------- /plopfile.js: -------------------------------------------------------------------------------- 1 | const viewGenerator = require('./plop-templates/view/prompt') 2 | const componentGenerator = require('./plop-templates/component/prompt') 3 | const storeGenerator = require('./plop-templates/store/prompt.js') 4 | 5 | module.exports = function(plop) { 6 | plop.setGenerator('view', viewGenerator) 7 | plop.setGenerator('component', componentGenerator) 8 | plop.setGenerator('store', storeGenerator) 9 | } 10 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | autoprefixer: {} 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekidea/spring-boot-plus-vue/67ccf280067aedb564e76c6a2a99beeab31c3104/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | <%= webpackConfig.name %> 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/api/system/sys-department-api.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | const sysDepartmentApi = { 4 | 5 | } 6 | 7 | /** 8 | * 获取系统部门列表 9 | * @param data 10 | * @returns {AxiosPromise} 11 | */ 12 | sysDepartmentApi.getList = data => { 13 | return request({ 14 | url: '/sysDepartment/getList', 15 | method: 'post', 16 | data 17 | }) 18 | } 19 | 20 | /** 21 | * 获取系统部门列表 22 | * @param data 23 | * @returns {AxiosPromise} 24 | */ 25 | sysDepartmentApi.getDepartmentTree = data => { 26 | return request({ 27 | url: '/sysDepartment/getDepartmentTree', 28 | method: 'post', 29 | data 30 | }) 31 | } 32 | 33 | export default sysDepartmentApi 34 | 35 | -------------------------------------------------------------------------------- /src/api/system/sys-permission-api.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | const sysPermissionApi = { 4 | 5 | } 6 | 7 | /** 8 | * 获取系统所有树形菜单 9 | * @param data 10 | * @returns {AxiosPromise} 11 | */ 12 | sysPermissionApi.getAllMenuTree = () => { 13 | return request({ 14 | url: '/sysPermission/getAllMenuTree', 15 | method: 'post' 16 | }) 17 | } 18 | 19 | /** 20 | * 获取系统部门列表 21 | * @param data 22 | * @returns {AxiosPromise} 23 | */ 24 | sysPermissionApi.detail = id => { 25 | return request({ 26 | url: '/sysPermission/info/' + id, 27 | method: 'get' 28 | }) 29 | } 30 | 31 | /** 32 | * 根据角色id获取该对应的所有三级权限ID 33 | * @param data 34 | * @returns {AxiosPromise} 35 | */ 36 | sysPermissionApi.getMenuIdsByRoleId = roleId => { 37 | return request({ 38 | url: '/sysPermission/getThreeLevelPermissionIdsByRoleId/' + roleId, 39 | method: 'get' 40 | }) 41 | } 42 | 43 | /** 44 | * 获取所有导航菜单(一级/二级菜单) 45 | * @param data 46 | * @returns {AxiosPromise} 47 | */ 48 | sysPermissionApi.getNavMenuTree = () => { 49 | return request({ 50 | url: '/sysPermission/getNavMenuTree', 51 | method: 'post' 52 | }) 53 | } 54 | 55 | /** 56 | * 添加菜单 57 | * @param data 58 | * @returns {AxiosPromise} 59 | */ 60 | sysPermissionApi.add = data => { 61 | return request({ 62 | url: '/sysPermission/add', 63 | method: 'post', 64 | data 65 | }) 66 | } 67 | 68 | /** 69 | * 修改菜单 70 | * @param data 71 | * @returns {AxiosPromise} 72 | */ 73 | sysPermissionApi.update = data => { 74 | return request({ 75 | url: '/sysPermission/update', 76 | method: 'post', 77 | data 78 | }) 79 | } 80 | 81 | /** 82 | * 删除菜单 83 | * @param data 84 | * @returns {AxiosPromise} 85 | */ 86 | sysPermissionApi.delete = id => { 87 | return request({ 88 | url: '/sysPermission/delete/' + id, 89 | method: 'post' 90 | }) 91 | } 92 | 93 | export default sysPermissionApi 94 | 95 | -------------------------------------------------------------------------------- /src/api/system/sys-role-api.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | const sysRoleApi = { 4 | 5 | } 6 | 7 | /** 8 | * 获取系统部门列表 9 | * @param data 10 | * @returns {AxiosPromise} 11 | */ 12 | sysRoleApi.getList = data => { 13 | return request({ 14 | url: '/sysRole/getList', 15 | method: 'post', 16 | data 17 | }) 18 | } 19 | 20 | /** 21 | * 获取系统部门列表 22 | * @param data 23 | * @returns {AxiosPromise} 24 | */ 25 | sysRoleApi.getPageList = data => { 26 | return request({ 27 | url: '/sysRole/getPageList', 28 | method: 'post', 29 | data 30 | }) 31 | } 32 | 33 | /** 34 | * 获取系统部门列表 35 | * @param data 36 | * @returns {AxiosPromise} 37 | */ 38 | sysRoleApi.detail = id => { 39 | return request({ 40 | url: '/sysRole/info/' + id, 41 | method: 'get' 42 | }) 43 | } 44 | 45 | /** 46 | * 添加角色 47 | * @param data 48 | * @returns {AxiosPromise} 49 | */ 50 | sysRoleApi.add = data => { 51 | return request({ 52 | url: '/sysRole/add', 53 | method: 'post', 54 | data 55 | }) 56 | } 57 | 58 | /** 59 | * 修改角色 60 | * @param data 61 | * @returns {AxiosPromise} 62 | */ 63 | sysRoleApi.update = data => { 64 | return request({ 65 | url: '/sysRole/update', 66 | method: 'post', 67 | data 68 | }) 69 | } 70 | 71 | /** 72 | * 删除角色 73 | * @param data 74 | * @returns {AxiosPromise} 75 | */ 76 | sysRoleApi.delete = id => { 77 | return request({ 78 | url: '/sysRole/delete/' + id, 79 | method: 'post' 80 | }) 81 | } 82 | 83 | 84 | /** 85 | * 修改系统角色权限 86 | * @param data 87 | * @returns {AxiosPromise} 88 | */ 89 | sysRoleApi.updateSysRolePermission = data => { 90 | return request({ 91 | url: '/sysRole/updateSysRolePermission', 92 | method: 'post', 93 | data 94 | }) 95 | } 96 | 97 | export default sysRoleApi 98 | 99 | -------------------------------------------------------------------------------- /src/api/system/sys-user-api.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | const sysUserApi = { 4 | 5 | } 6 | 7 | /** 8 | * 获取系统用户分页列表 9 | * @param data 10 | * @returns {AxiosPromise} 11 | */ 12 | sysUserApi.getPageList = data => { 13 | return request({ 14 | url: '/sysUser/getPageList', 15 | method: 'post', 16 | data 17 | }) 18 | } 19 | 20 | /** 21 | * 系统用户详情 22 | * @param data 23 | * @returns {AxiosPromise} 24 | */ 25 | sysUserApi.detail = id => { 26 | return request({ 27 | url: '/sysUser/info/' + id, 28 | method: 'get' 29 | }) 30 | } 31 | 32 | /** 33 | * 新增系统用户 34 | * @param data 35 | * @returns {AxiosPromise} 36 | */ 37 | sysUserApi.add = data => { 38 | return request({ 39 | url: '/sysUser/add', 40 | method: 'post', 41 | data 42 | }) 43 | } 44 | 45 | /** 46 | * 修改系统用户 47 | * @param data 48 | * @returns {AxiosPromise} 49 | */ 50 | sysUserApi.update = data => { 51 | return request({ 52 | url: '/sysUser/update', 53 | method: 'post', 54 | data 55 | }) 56 | } 57 | 58 | /** 59 | * 修改系统用户 60 | * @param data 61 | * @returns {AxiosPromise} 62 | */ 63 | sysUserApi.delete = id => { 64 | return request({ 65 | url: '/sysUser/delete/' + id, 66 | method: 'post' 67 | }) 68 | } 69 | 70 | /** 71 | * 上传用户头像 72 | * @param data 73 | * @returns {AxiosPromise} 74 | */ 75 | sysUserApi.uploadHead = data => { 76 | return request({ 77 | url: '/sysUser/uploadHead', 78 | method: 'post', 79 | data 80 | }) 81 | } 82 | 83 | /** 84 | * 管理员重置用户密码 85 | * @param data 86 | * @returns {AxiosPromise} 87 | */ 88 | sysUserApi.resetPassword = data => { 89 | return request({ 90 | url: '/sysUser/resetPassword', 91 | method: 'post', 92 | data 93 | }) 94 | } 95 | 96 | export default sysUserApi 97 | -------------------------------------------------------------------------------- /src/api/system/upload-api.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | const uploadApi = { 4 | 5 | } 6 | 7 | /** 8 | * 上传文件 9 | * @param data 10 | * @returns {AxiosPromise} 11 | */ 12 | uploadApi.upload = data => { 13 | return request({ 14 | url: '/upload', 15 | method: 'post', 16 | data, 17 | headers: { 'Content-Type': 'multipart/form-data' } 18 | }) 19 | } 20 | 21 | export default uploadApi 22 | -------------------------------------------------------------------------------- /src/api/user.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function login(data) { 4 | return request({ 5 | url: '/login', 6 | method: 'post', 7 | data 8 | }) 9 | } 10 | 11 | export function getInfo(token) { 12 | return request({ 13 | url: '/getSysUserInfo', 14 | method: 'get' 15 | }) 16 | } 17 | 18 | export function logout() { 19 | return request({ 20 | url: '/logout', 21 | method: 'post' 22 | }) 23 | } 24 | -------------------------------------------------------------------------------- /src/assets/401_images/401.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekidea/spring-boot-plus-vue/67ccf280067aedb564e76c6a2a99beeab31c3104/src/assets/401_images/401.gif -------------------------------------------------------------------------------- /src/assets/404_images/404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekidea/spring-boot-plus-vue/67ccf280067aedb564e76c6a2a99beeab31c3104/src/assets/404_images/404.png -------------------------------------------------------------------------------- /src/assets/404_images/404_cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekidea/spring-boot-plus-vue/67ccf280067aedb564e76c6a2a99beeab31c3104/src/assets/404_images/404_cloud.png -------------------------------------------------------------------------------- /src/assets/custom-theme/fonts/element-icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekidea/spring-boot-plus-vue/67ccf280067aedb564e76c6a2a99beeab31c3104/src/assets/custom-theme/fonts/element-icons.ttf -------------------------------------------------------------------------------- /src/assets/custom-theme/fonts/element-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geekidea/spring-boot-plus-vue/67ccf280067aedb564e76c6a2a99beeab31c3104/src/assets/custom-theme/fonts/element-icons.woff -------------------------------------------------------------------------------- /src/components/BackToTop/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 84 | 85 | 112 | -------------------------------------------------------------------------------- /src/components/Breadcrumb/index.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 69 | 70 | 83 | -------------------------------------------------------------------------------- /src/components/Charts/mixins/resize.js: -------------------------------------------------------------------------------- 1 | import { debounce } from '@/utils' 2 | 3 | export default { 4 | data() { 5 | return { 6 | $_sidebarElm: null, 7 | $_resizeHandler: null 8 | } 9 | }, 10 | mounted() { 11 | this.initListener() 12 | }, 13 | activated() { 14 | if (!this.$_resizeHandler) { 15 | // avoid duplication init 16 | this.initListener() 17 | } 18 | 19 | // when keep-alive chart activated, auto resize 20 | this.resize() 21 | }, 22 | beforeDestroy() { 23 | this.destroyListener() 24 | }, 25 | deactivated() { 26 | this.destroyListener() 27 | }, 28 | methods: { 29 | // use $_ for mixins properties 30 | // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential 31 | $_sidebarResizeHandler(e) { 32 | if (e.propertyName === 'width') { 33 | this.$_resizeHandler() 34 | } 35 | }, 36 | initListener() { 37 | this.$_resizeHandler = debounce(() => { 38 | this.resize() 39 | }, 100) 40 | window.addEventListener('resize', this.$_resizeHandler) 41 | 42 | this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0] 43 | this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler) 44 | }, 45 | destroyListener() { 46 | window.removeEventListener('resize', this.$_resizeHandler) 47 | this.$_resizeHandler = null 48 | 49 | this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler) 50 | }, 51 | resize() { 52 | const { chart } = this 53 | chart && chart.resize() 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/components/DragSelect/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 50 | 51 | 62 | -------------------------------------------------------------------------------- /src/components/ErrorLog/index.vue: -------------------------------------------------------------------------------- 1 | 48 | 49 | 70 | 71 | 79 | -------------------------------------------------------------------------------- /src/components/GithubCorner/index.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 55 | -------------------------------------------------------------------------------- /src/components/Hamburger/index.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 32 | 33 | 45 | -------------------------------------------------------------------------------- /src/components/ImageCropper/utils/data2blob.js: -------------------------------------------------------------------------------- 1 | /** 2 | * database64文件格式转换为2进制 3 | * 4 | * @param {[String]} data dataURL 的格式为 “data:image/png;base64,****”,逗号之前都是一些说明性的文字,我们只需要逗号之后的就行了 5 | * @param {[String]} mime [description] 6 | * @return {[blob]} [description] 7 | */ 8 | export default function(data, mime) { 9 | data = data.split(',')[1] 10 | data = window.atob(data) 11 | var ia = new Uint8Array(data.length) 12 | for (var i = 0; i < data.length; i++) { 13 | ia[i] = data.charCodeAt(i) 14 | } 15 | // canvas.toDataURL 返回的默认格式就是 image/png 16 | return new Blob([ia], { 17 | type: mime 18 | }) 19 | } 20 | -------------------------------------------------------------------------------- /src/components/ImageCropper/utils/effectRipple.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 点击波纹效果 3 | * 4 | * @param {[event]} e [description] 5 | * @param {[Object]} arg_opts [description] 6 | * @return {[bollean]} [description] 7 | */ 8 | export default function(e, arg_opts) { 9 | var opts = Object.assign({ 10 | ele: e.target, // 波纹作用元素 11 | type: 'hit', // hit点击位置扩散center中心点扩展 12 | bgc: 'rgba(0, 0, 0, 0.15)' // 波纹颜色 13 | }, arg_opts) 14 | var target = opts.ele 15 | if (target) { 16 | var rect = target.getBoundingClientRect() 17 | var ripple = target.querySelector('.e-ripple') 18 | if (!ripple) { 19 | ripple = document.createElement('span') 20 | ripple.className = 'e-ripple' 21 | ripple.style.height = ripple.style.width = Math.max(rect.width, rect.height) + 'px' 22 | target.appendChild(ripple) 23 | } else { 24 | ripple.className = 'e-ripple' 25 | } 26 | switch (opts.type) { 27 | case 'center': 28 | ripple.style.top = (rect.height / 2 - ripple.offsetHeight / 2) + 'px' 29 | ripple.style.left = (rect.width / 2 - ripple.offsetWidth / 2) + 'px' 30 | break 31 | default: 32 | ripple.style.top = (e.pageY - rect.top - ripple.offsetHeight / 2 - document.body.scrollTop) + 'px' 33 | ripple.style.left = (e.pageX - rect.left - ripple.offsetWidth / 2 - document.body.scrollLeft) + 'px' 34 | } 35 | ripple.style.backgroundColor = opts.bgc 36 | ripple.className = 'e-ripple z-active' 37 | return false 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/components/ImageCropper/utils/mimes.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'jpg': 'image/jpeg', 3 | 'png': 'image/png', 4 | 'gif': 'image/gif', 5 | 'svg': 'image/svg+xml', 6 | 'psd': 'image/photoshop' 7 | } 8 | -------------------------------------------------------------------------------- /src/components/JsonEditor/index.vue: -------------------------------------------------------------------------------- 1 |