├── bin ├── build.bat ├── package.bat └── run-web.bat ├── babel.config.js ├── src ├── views │ ├── content │ │ └── blog │ │ │ ├── page.vue │ │ │ ├── components │ │ │ └── Dropdown │ │ │ │ ├── index.js │ │ │ │ ├── SourceUrl.vue │ │ │ │ ├── Comment.vue │ │ │ │ └── Platform.vue │ │ │ ├── add.vue │ │ │ └── edit.vue │ ├── system │ │ ├── log │ │ │ └── index.vue │ │ └── user │ │ │ └── profile │ │ │ ├── userInfo.vue │ │ │ └── resetPwd.vue │ ├── redirect.vue │ ├── components │ │ └── icons │ │ │ ├── svg-icons.js │ │ │ └── index.vue │ ├── monitor │ │ └── druid │ │ │ └── index.vue │ ├── tool │ │ ├── swagger │ │ │ └── index.vue │ │ └── gen │ │ │ └── basicInfoForm.vue │ ├── dashboard │ │ ├── mixins │ │ │ └── resize.js │ │ ├── PieChart.vue │ │ └── BarChart.vue │ ├── error │ │ └── 401.vue │ └── index.vue ├── assets │ ├── logo │ │ └── logo.png │ ├── 401_images │ │ └── 401.gif │ ├── 404_images │ │ ├── 404.png │ │ └── 404_cloud.png │ ├── image │ │ ├── profile.jpg │ │ └── login-background.jpg │ ├── icons │ │ ├── svg │ │ │ ├── chart.svg │ │ │ ├── size.svg │ │ │ ├── link.svg │ │ │ ├── guide.svg │ │ │ ├── money.svg │ │ │ ├── email.svg │ │ │ ├── drag.svg │ │ │ ├── documentation.svg │ │ │ ├── fullscreen.svg │ │ │ ├── lock.svg │ │ │ ├── user.svg │ │ │ ├── excel.svg │ │ │ ├── example.svg │ │ │ ├── star.svg │ │ │ ├── slider.svg │ │ │ ├── table.svg │ │ │ ├── search.svg │ │ │ ├── education.svg │ │ │ ├── tab.svg │ │ │ ├── message.svg │ │ │ ├── switch.svg │ │ │ ├── theme.svg │ │ │ ├── druid.svg │ │ │ ├── code.svg │ │ │ ├── peoples.svg │ │ │ ├── input.svg │ │ │ ├── server.svg │ │ │ ├── textarea.svg │ │ │ ├── time.svg │ │ │ ├── edit.svg │ │ │ ├── nested.svg │ │ │ ├── row.svg │ │ │ ├── monitor.svg │ │ │ ├── tree-table.svg │ │ │ ├── eye.svg │ │ │ ├── build.svg │ │ │ ├── clipboard.svg │ │ │ ├── list.svg │ │ │ ├── download.svg │ │ │ ├── icon.svg │ │ │ ├── international.svg │ │ │ ├── question.svg │ │ │ ├── wechat.svg │ │ │ ├── skill.svg │ │ │ ├── people.svg │ │ │ ├── post.svg │ │ │ ├── language.svg │ │ │ ├── checkbox.svg │ │ │ ├── eye-open.svg │ │ │ ├── validCode.svg │ │ │ ├── radio.svg │ │ │ ├── select.svg │ │ │ ├── gitee.svg │ │ │ ├── upload.svg │ │ │ ├── 404.svg │ │ │ ├── zip.svg │ │ │ ├── phone.svg │ │ │ ├── log.svg │ │ │ ├── bug.svg │ │ │ ├── github.svg │ │ │ ├── pdf.svg │ │ │ ├── logininfor.svg │ │ │ ├── rate.svg │ │ │ ├── job.svg │ │ │ ├── exit-fullscreen.svg │ │ │ ├── tree.svg │ │ │ ├── swagger.svg │ │ │ ├── password.svg │ │ │ ├── date-range.svg │ │ │ ├── shopping.svg │ │ │ ├── cascader.svg │ │ │ ├── dashboard.svg │ │ │ ├── component.svg │ │ │ ├── form.svg │ │ │ └── tool.svg │ │ ├── index.js │ │ └── svgo.yml │ └── styles │ │ ├── variables.scss │ │ ├── element-variables.scss │ │ ├── transition.scss │ │ ├── element-ui.scss │ │ ├── mixin.scss │ │ └── btn.scss ├── App.vue ├── api │ ├── menu.js │ ├── monitor │ │ ├── server.js │ │ ├── online.js │ │ ├── operlog.js │ │ ├── jobLog.js │ │ ├── logininfor.js │ │ └── job.js │ ├── content │ │ ├── requestlog.js │ │ ├── comment.js │ │ ├── tag.js │ │ ├── type.js │ │ ├── friend.js │ │ └── blog.js │ ├── login.js │ ├── system │ │ ├── notice.js │ │ ├── post.js │ │ ├── dept.js │ │ ├── menu.js │ │ ├── dict │ │ │ ├── type.js │ │ │ └── data.js │ │ ├── config.js │ │ └── role.js │ └── tool │ │ └── gen.js ├── layout │ ├── components │ │ ├── index.js │ │ ├── Sidebar │ │ │ ├── Item.vue │ │ │ ├── FixiOSBug.js │ │ │ ├── Link.vue │ │ │ ├── index.vue │ │ │ └── Logo.vue │ │ └── AppMain.vue │ └── mixin │ │ └── ResizeHandler.js ├── directive │ ├── waves │ │ ├── index.js │ │ ├── waves.css │ │ └── waves.js │ └── permission │ │ ├── index.js │ │ ├── hasRole.js │ │ └── hasPermi.js ├── components │ ├── IconSelect │ │ ├── requireIcons.js │ │ └── index.vue │ ├── RuoYi │ │ ├── Doc │ │ │ └── index.vue │ │ └── Git │ │ │ └── index.vue │ ├── Tinymce │ │ ├── toolbar.js │ │ ├── plugins.js │ │ └── dynamicLoadScript.js │ ├── Screenfull │ │ └── index.vue │ ├── Hamburger │ │ └── index.vue │ ├── SvgIcon │ │ └── index.vue │ ├── SizeSelect │ │ └── index.vue │ ├── Sticky │ │ └── index.vue │ ├── Breadcrumb │ │ └── index.vue │ └── Pagination │ │ └── index.vue ├── utils │ ├── auth.js │ ├── generator │ │ ├── css.js │ │ └── drawingDefalut.js │ ├── jsencrypt.js │ ├── permission.js │ ├── zipdownload.js │ ├── request.js │ ├── scroll-to.js │ └── validate.js ├── store │ ├── index.js │ ├── getters.js │ └── modules │ │ ├── settings.js │ │ ├── app.js │ │ └── permission.js ├── settings.js ├── styles │ ├── variables.scss │ ├── element-variables.scss │ ├── transition.scss │ ├── element-ui.scss │ ├── mixin.scss │ └── btn.scss ├── permission.js └── main.js ├── public └── favicon.ico ├── .env.production ├── .env.staging ├── .env.development ├── .eslintignore ├── .gitignore ├── .editorconfig └── README.md /bin/build.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lurenha/MyBlogVue/HEAD/bin/build.bat -------------------------------------------------------------------------------- /bin/package.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lurenha/MyBlogVue/HEAD/bin/package.bat -------------------------------------------------------------------------------- /bin/run-web.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lurenha/MyBlogVue/HEAD/bin/run-web.bat -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/app' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /src/views/content/blog/page.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/views/system/log/index.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lurenha/MyBlogVue/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /src/assets/logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lurenha/MyBlogVue/HEAD/src/assets/logo/logo.png -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | # 生产环境配置 2 | ENV = 'production' 3 | 4 | # 若依管理系统/生产环境 5 | VUE_APP_BASE_API = '/peng' 6 | -------------------------------------------------------------------------------- /src/assets/401_images/401.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lurenha/MyBlogVue/HEAD/src/assets/401_images/401.gif -------------------------------------------------------------------------------- /src/assets/404_images/404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lurenha/MyBlogVue/HEAD/src/assets/404_images/404.png -------------------------------------------------------------------------------- /src/assets/image/profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lurenha/MyBlogVue/HEAD/src/assets/image/profile.jpg -------------------------------------------------------------------------------- /src/assets/404_images/404_cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lurenha/MyBlogVue/HEAD/src/assets/404_images/404_cloud.png -------------------------------------------------------------------------------- /src/assets/image/login-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lurenha/MyBlogVue/HEAD/src/assets/image/login-background.jpg -------------------------------------------------------------------------------- /.env.staging: -------------------------------------------------------------------------------- 1 | NODE_ENV = production 2 | 3 | # 测试环境配置 4 | ENV = 'staging' 5 | 6 | # 若依管理系统/测试环境 7 | VUE_APP_BASE_API = '/stage-api' 8 | -------------------------------------------------------------------------------- /.env.development: -------------------------------------------------------------------------------- 1 | # 开发环境配置 2 | ENV = 'development' 3 | 4 | # 若依管理系统/开发环境 5 | VUE_APP_BASE_API = '/peng' 6 | 7 | # 路由懒加载 8 | VUE_CLI_BABEL_TRANSPILE_MODULES = true 9 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/api/menu.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 获取路由 4 | export const getRouters = () => { 5 | return request({ 6 | url: '/getRouters', 7 | method: 'get' 8 | }) 9 | } -------------------------------------------------------------------------------- /src/api/monitor/server.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询服务器详细 4 | export function getServer() { 5 | return request({ 6 | url: '/monitor/server', 7 | method: 'get' 8 | }) 9 | } -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | # 忽略build目录下类型为js的文件的语法检查 2 | build/*.js 3 | # 忽略src/assets目录下文件的语法检查 4 | src/assets 5 | # 忽略public目录下文件的语法检查 6 | public 7 | # 忽略当前目录下为js的文件的语法检查 8 | *.js 9 | # 忽略当前目录下为vue的文件的语法检查 10 | *.vue -------------------------------------------------------------------------------- /src/assets/icons/svg/chart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/content/blog/components/Dropdown/index.js: -------------------------------------------------------------------------------- 1 | export { default as CommentDropdown } from './Comment' 2 | export { default as PlatformDropdown } from './Platform' 3 | export { default as SourceUrlDropdown } from './SourceUrl' 4 | -------------------------------------------------------------------------------- /src/assets/icons/svg/size.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/layout/components/index.js: -------------------------------------------------------------------------------- 1 | export { default as AppMain } from './AppMain' 2 | export { default as Navbar } from './Navbar' 3 | export { default as Settings } from './Settings' 4 | export { default as Sidebar } from './Sidebar/index.vue' 5 | export { default as TagsView } from './TagsView/index.vue' 6 | -------------------------------------------------------------------------------- /src/views/content/blog/add.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 13 | 14 | -------------------------------------------------------------------------------- /src/views/content/blog/edit.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 13 | 14 | -------------------------------------------------------------------------------- /src/assets/icons/svg/link.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/directive/waves/index.js: -------------------------------------------------------------------------------- 1 | import waves from './waves' 2 | 3 | const install = function(Vue) { 4 | Vue.directive('waves', waves) 5 | } 6 | 7 | if (window.Vue) { 8 | window.waves = waves 9 | Vue.use(install); // eslint-disable-line 10 | } 11 | 12 | waves.install = install 13 | export default waves 14 | -------------------------------------------------------------------------------- /src/views/redirect.vue: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /src/components/IconSelect/requireIcons.js: -------------------------------------------------------------------------------- 1 | 2 | const req = require.context('../../assets/icons/svg', false, /\.svg$/) 3 | const requireAll = requireContext => requireContext.keys() 4 | 5 | const re = /\.\/(.*)\.svg/ 6 | 7 | const icons = requireAll(req).map(i => { 8 | return i.match(re)[1] 9 | }) 10 | 11 | export default icons 12 | -------------------------------------------------------------------------------- /src/views/components/icons/svg-icons.js: -------------------------------------------------------------------------------- 1 | const req = require.context('../../../assets/icons/svg', false, /\.svg$/) 2 | const requireAll = requireContext => requireContext.keys() 3 | 4 | const re = /\.\/(.*)\.svg/ 5 | 6 | const svgIcons = requireAll(req).map(i => { 7 | return i.match(re)[1] 8 | }) 9 | 10 | export default svgIcons 11 | -------------------------------------------------------------------------------- /src/assets/icons/svg/guide.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import SvgIcon from '@/components/SvgIcon'// svg component 3 | 4 | // register globally 5 | Vue.component('svg-icon', SvgIcon) 6 | 7 | const req = require.context('./svg', false, /\.svg$/) 8 | const requireAll = requireContext => requireContext.keys().map(requireContext) 9 | requireAll(req) 10 | -------------------------------------------------------------------------------- /src/assets/icons/svg/money.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/utils/auth.js: -------------------------------------------------------------------------------- 1 | import Cookies from 'js-cookie' 2 | 3 | const TokenKey = 'Admin-Token' 4 | 5 | export function getToken() { 6 | return Cookies.get(TokenKey) 7 | } 8 | 9 | export function setToken(token) { 10 | return Cookies.set(TokenKey, token) 11 | } 12 | 13 | export function removeToken() { 14 | return Cookies.remove(TokenKey) 15 | } 16 | -------------------------------------------------------------------------------- /src/assets/icons/svg/email.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /src/assets/icons/svg/drag.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/svgo.yml: -------------------------------------------------------------------------------- 1 | # replace default config 2 | 3 | # multipass: true 4 | # full: true 5 | 6 | plugins: 7 | 8 | # - name 9 | # 10 | # or: 11 | # - name: false 12 | # - name: true 13 | # 14 | # or: 15 | # - name: 16 | # param1: 1 17 | # param2: 2 18 | 19 | - removeAttrs: 20 | attrs: 21 | - 'fill' 22 | - 'fill-rule' 23 | -------------------------------------------------------------------------------- /src/api/monitor/online.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询在线用户列表 4 | export function list(query) { 5 | return request({ 6 | url: '/monitor/online/list', 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | // 强退用户 13 | export function forceLogout(tokenId) { 14 | return request({ 15 | url: '/monitor/online/' + tokenId, 16 | method: 'delete' 17 | }) 18 | } 19 | -------------------------------------------------------------------------------- /src/components/RuoYi/Doc/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /src/directive/permission/index.js: -------------------------------------------------------------------------------- 1 | import hasRole from './hasRole' 2 | import hasPermi from './hasPermi' 3 | 4 | const install = function(Vue) { 5 | Vue.directive('hasRole', hasRole) 6 | Vue.directive('hasPermi', hasPermi) 7 | } 8 | 9 | if (window.Vue) { 10 | window['hasRole'] = hasRole 11 | window['hasPermi'] = hasPermi 12 | Vue.use(install); // eslint-disable-line 13 | } 14 | 15 | export default install 16 | -------------------------------------------------------------------------------- /src/api/content/requestlog.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询日志列表 4 | export function listLog(query) { 5 | return request({ 6 | url: '/admin/log/list', 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | // 删除日志 13 | export function delLog(logId) { 14 | return request({ 15 | url: '/admin/log/delete/' + logId, 16 | method: 'get' 17 | }) 18 | } 19 | -------------------------------------------------------------------------------- /src/assets/icons/svg/documentation.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/svg/fullscreen.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/svg/lock.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/svg/user.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # 告诉EditorConfig插件,这是根文件,不用继续往上查找 2 | root = true 3 | 4 | # 匹配全部文件 5 | [*] 6 | # 设置字符集 7 | charset = utf-8 8 | # 缩进风格,可选space、tab 9 | indent_style = space 10 | # 缩进的空格数 11 | indent_size = 2 12 | # 结尾换行符,可选lf、cr、crlf 13 | end_of_line = lf 14 | # 在文件结尾插入新行 15 | insert_final_newline = true 16 | # 删除一行中的前后空格 17 | trim_trailing_whitespace = true 18 | 19 | # 匹配md结尾的文件 20 | [*.md] 21 | insert_final_newline = false 22 | trim_trailing_whitespace = false 23 | -------------------------------------------------------------------------------- /src/assets/icons/svg/excel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/RuoYi/Git/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /src/api/content/comment.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function getCommentWithChildById(id) { 4 | return request({ 5 | url: '/admin/comment/getCommentWithChildById/' + id, 6 | method: 'get' 7 | }) 8 | } 9 | 10 | export function setDeleted(coId, isDelete) { 11 | const data = { 12 | coId, 13 | isDelete 14 | } 15 | return request({ 16 | url: '/admin/comment/setDeleted', 17 | method: 'post', 18 | data: data 19 | }) 20 | } -------------------------------------------------------------------------------- /src/assets/icons/svg/example.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/Tinymce/toolbar.js: -------------------------------------------------------------------------------- 1 | // Here is a list of the toolbar 2 | // Detail list see https://www.tinymce.com/docs/advanced/editor-control-identifiers/#toolbarcontrols 3 | 4 | const toolbar = ['searchreplace bold italic underline strikethrough alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript code codesample', 'hr bullist numlist link image charmap preview anchor pagebreak insertdatetime media table emoticons forecolor backcolor fullscreen'] 5 | 6 | export default toolbar 7 | -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import app from './modules/app' 4 | import user from './modules/user' 5 | import tagsView from './modules/tagsView' 6 | import permission from './modules/permission' 7 | import settings from './modules/settings' 8 | import getters from './getters' 9 | 10 | Vue.use(Vuex) 11 | 12 | const store = new Vuex.Store({ 13 | modules: { 14 | app, 15 | user, 16 | tagsView, 17 | permission, 18 | settings 19 | }, 20 | getters 21 | }) 22 | 23 | export default store 24 | -------------------------------------------------------------------------------- /src/assets/icons/svg/star.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/svg/slider.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/utils/generator/css.js: -------------------------------------------------------------------------------- 1 | const styles = { 2 | 'el-rate': '.el-rate{display: inline-block; vertical-align: text-top;}', 3 | 'el-upload': '.el-upload__tip{line-height: 1.2;}' 4 | } 5 | 6 | function addCss(cssList, el) { 7 | const css = styles[el.tag] 8 | css && cssList.indexOf(css) === -1 && cssList.push(css) 9 | if (el.children) { 10 | el.children.forEach(el2 => addCss(cssList, el2)) 11 | } 12 | } 13 | 14 | export function makeUpCss(conf) { 15 | const cssList = [] 16 | conf.fields.forEach(el => addCss(cssList, el)) 17 | return cssList.join('\n') 18 | } 19 | -------------------------------------------------------------------------------- /src/assets/icons/svg/table.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/svg/search.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/Tinymce/plugins.js: -------------------------------------------------------------------------------- 1 | // Any plugins you want to use has to be imported 2 | // Detail plugins list see https://www.tinymce.com/docs/plugins/ 3 | // Custom builds see https://www.tinymce.com/download/custom-builds/ 4 | 5 | const plugins = ['advlist anchor autolink autosave code codesample colorpicker colorpicker contextmenu directionality emoticons fullscreen hr image imagetools insertdatetime link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace spellchecker tabfocus table template textcolor textpattern visualblocks visualchars wordcount'] 6 | 7 | export default plugins 8 | -------------------------------------------------------------------------------- /src/layout/components/Sidebar/Item.vue: -------------------------------------------------------------------------------- 1 | 30 | -------------------------------------------------------------------------------- /src/store/getters.js: -------------------------------------------------------------------------------- 1 | const getters = { 2 | sidebar: state => state.app.sidebar, 3 | size: state => state.app.size, 4 | device: state => state.app.device, 5 | visitedViews: state => state.tagsView.visitedViews, 6 | cachedViews: state => state.tagsView.cachedViews, 7 | token: state => state.user.token, 8 | avatar: state => state.user.avatar, 9 | name: state => state.user.name, 10 | introduction: state => state.user.introduction, 11 | roles: state => state.user.roles, 12 | permissions: state => state.user.permissions, 13 | permission_routes: state => state.permission.routes 14 | } 15 | export default getters 16 | -------------------------------------------------------------------------------- /src/assets/icons/svg/education.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/svg/tab.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/svg/message.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/settings.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | title: 'MyBlog管理系统', 3 | 4 | /** 5 | * 是否系统布局配置 6 | */ 7 | showSettings: false, 8 | 9 | /** 10 | * 是否显示 tagsView 11 | */ 12 | tagsView: true, 13 | 14 | /** 15 | * 是否固定头部 16 | */ 17 | fixedHeader: false, 18 | 19 | /** 20 | * 是否显示logo 21 | */ 22 | sidebarLogo: true, 23 | 24 | /** 25 | * @type {string | array} 'production' | ['production', 'development'] 26 | * @description Need show err logs component. 27 | * The default is only used in the production env 28 | * If you want to also use it in dev, you can pass ['production', 'development'] 29 | */ 30 | errorLog: 'production' 31 | } 32 | -------------------------------------------------------------------------------- /src/assets/icons/svg/switch.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/svg/theme.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MyBlogVue 2 | 3 | > 一个基于Vue的个人博客管理后台。 4 | 参考[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) 5 | 参考[http://www.ruoyi.vip/](http://www.ruoyi.vip/) 6 | 7 | > [线上地址](http://lurenpeng.cn:8088/) 8 | ## 开发 9 | 10 | ```bash 11 | # 克隆项目 12 | git clone git@github.com:lurenha/MyBlogVue.git 13 | 14 | # 进入项目目录 15 | cd MyBlogVue 16 | 17 | # 安装依赖 18 | npm install 19 | 20 | # 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题 21 | npm install --registry=https://registry.npm.taobao.org 22 | 23 | # 启动服务 24 | npm run dev 25 | ``` 26 | 27 | 浏览器访问 http://localhost 28 | 29 | ## 发布 30 | 31 | ```bash 32 | # 构建测试环境 33 | npm run build:stage 34 | 35 | # 构建生产环境 36 | npm run build:prod 37 | ``` 38 | -------------------------------------------------------------------------------- /src/layout/components/Sidebar/FixiOSBug.js: -------------------------------------------------------------------------------- 1 | export default { 2 | computed: { 3 | device() { 4 | return this.$store.state.app.device 5 | } 6 | }, 7 | mounted() { 8 | // In order to fix the click on menu on the ios device will trigger the mouseleave bug 9 | this.fixBugIniOS() 10 | }, 11 | methods: { 12 | fixBugIniOS() { 13 | const $subMenu = this.$refs.subMenu 14 | if ($subMenu) { 15 | const handleMouseleave = $subMenu.handleMouseleave 16 | $subMenu.handleMouseleave = (e) => { 17 | if (this.device === 'mobile') { 18 | return 19 | } 20 | handleMouseleave(e) 21 | } 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/assets/icons/svg/druid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/svg/code.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/svg/peoples.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/utils/generator/drawingDefalut.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | layout: 'colFormItem', 4 | tagIcon: 'input', 5 | label: '手机号', 6 | vModel: 'mobile', 7 | formId: 6, 8 | tag: 'el-input', 9 | placeholder: '请输入手机号', 10 | defaultValue: '', 11 | span: 24, 12 | style: { width: '100%' }, 13 | clearable: true, 14 | prepend: '', 15 | append: '', 16 | 'prefix-icon': 'el-icon-mobile', 17 | 'suffix-icon': '', 18 | maxlength: 11, 19 | 'show-word-limit': true, 20 | readonly: false, 21 | disabled: false, 22 | required: true, 23 | changeTag: true, 24 | regList: [{ 25 | pattern: '/^1(3|4|5|7|8|9)\\d{9}$/', 26 | message: '手机号格式错误' 27 | }] 28 | } 29 | ] 30 | -------------------------------------------------------------------------------- /src/assets/icons/svg/input.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/api/login.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 登录方法 4 | export function login(username, password, code, uuid) { 5 | const data = { 6 | username, 7 | password, 8 | code, 9 | uuid 10 | } 11 | return request({ 12 | url: '/login', 13 | method: 'post', 14 | params: data 15 | }) 16 | } 17 | 18 | // 获取用户详细信息 19 | export function getInfo() { 20 | return request({ 21 | url: '/getInfo', 22 | method: 'get' 23 | }) 24 | } 25 | 26 | // 退出方法 27 | export function logout() { 28 | return request({ 29 | url: '/logout', 30 | method: 'post' 31 | }) 32 | } 33 | 34 | // 获取验证码 35 | export function getCodeImg() { 36 | return request({ 37 | url: '/captchaImage', 38 | method: 'get' 39 | }) 40 | } -------------------------------------------------------------------------------- /src/api/monitor/operlog.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询操作日志列表 4 | export function list(query) { 5 | return request({ 6 | url: '/monitor/operlog/list', 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | // 删除操作日志 13 | export function delOperlog(operId) { 14 | return request({ 15 | url: '/monitor/operlog/' + operId, 16 | method: 'delete' 17 | }) 18 | } 19 | 20 | // 清空操作日志 21 | export function cleanOperlog() { 22 | return request({ 23 | url: '/monitor/operlog/clean', 24 | method: 'delete' 25 | }) 26 | } 27 | 28 | // 导出操作日志 29 | export function exportOperlog(query) { 30 | return request({ 31 | url: '/monitor/operlog/export', 32 | method: 'get', 33 | params: query 34 | }) 35 | } -------------------------------------------------------------------------------- /src/directive/permission/hasRole.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 角色权限处理 3 | * Copyright (c) 2019 ruoyi 4 | */ 5 | 6 | import store from '@/store' 7 | 8 | export default { 9 | inserted(el, binding, vnode) { 10 | const { value } = binding 11 | const super_admin = "admin"; 12 | const roles = store.getters && store.getters.roles 13 | 14 | if (value && value instanceof Array && value.length > 0) { 15 | const roleFlag = value 16 | 17 | const hasRole = roles.some(role => { 18 | return super_admin === role || roleFlag.includes(role) 19 | }) 20 | 21 | if (!hasRole) { 22 | el.parentNode && el.parentNode.removeChild(el) 23 | } 24 | } else { 25 | throw new Error(`请设置角色权限标签值"`) 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/api/monitor/jobLog.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询调度日志列表 4 | export function listJobLog(query) { 5 | return request({ 6 | url: '/monitor/jobLog/list', 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | // 删除调度日志 13 | export function delJobLog(jobLogId) { 14 | return request({ 15 | url: '/monitor/jobLog/' + jobLogId, 16 | method: 'delete' 17 | }) 18 | } 19 | 20 | // 清空调度日志 21 | export function cleanJobLog() { 22 | return request({ 23 | url: '/monitor/jobLog/clean', 24 | method: 'delete' 25 | }) 26 | } 27 | 28 | // 导出调度日志 29 | export function exportJobLog(query) { 30 | return request({ 31 | url: '/monitor/jobLog/export', 32 | method: 'get', 33 | params: query 34 | }) 35 | } -------------------------------------------------------------------------------- /src/assets/icons/svg/server.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/layout/components/Sidebar/Link.vue: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 37 | -------------------------------------------------------------------------------- /src/api/monitor/logininfor.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | // 查询登录日志列表 4 | export function list(query) { 5 | return request({ 6 | url: '/monitor/logininfor/list', 7 | method: 'get', 8 | params: query 9 | }) 10 | } 11 | 12 | // 删除登录日志 13 | export function delLogininfor(infoId) { 14 | return request({ 15 | url: '/monitor/logininfor/' + infoId, 16 | method: 'delete' 17 | }) 18 | } 19 | 20 | // 清空登录日志 21 | export function cleanLogininfor() { 22 | return request({ 23 | url: '/monitor/logininfor/clean', 24 | method: 'delete' 25 | }) 26 | } 27 | 28 | // 导出登录日志 29 | export function exportLogininfor(query) { 30 | return request({ 31 | url: '/monitor/logininfor/export', 32 | method: 'get', 33 | params: query 34 | }) 35 | } -------------------------------------------------------------------------------- /src/api/content/tag.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function fetchTagList() { 4 | return request({ 5 | url: '/admin/tag/list', 6 | method: 'get' 7 | }) 8 | } 9 | 10 | export function deleteTagById(id) { 11 | return request({ 12 | url: '/admin/tag/delete/' + id, 13 | method: 'get' 14 | }) 15 | } 16 | 17 | // 新增 18 | export function addTag(name) { 19 | const data = { 20 | name 21 | } 22 | return request({ 23 | url: '/admin/tag/add', 24 | method: 'post', 25 | data: data 26 | }) 27 | } 28 | 29 | // 修改 30 | export function updateTag(taId, name) { 31 | const data = { 32 | taId, 33 | name 34 | } 35 | return request({ 36 | url: '/admin/tag/update', 37 | method: 'post', 38 | data: data 39 | }) 40 | } -------------------------------------------------------------------------------- /src/assets/icons/svg/textarea.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/monitor/druid/index.vue: -------------------------------------------------------------------------------- 1 |