Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue
Conflicts:
ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java
ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java
ruoyi-common/src/main/java/com/ruoyi/common/core/text/CharsetKit.java
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
ruoyi-ui/package.json
ruoyi-ui/src/layout/components/AppMain.vue
ruoyi-ui/src/layout/components/TagsView/index.vue
ruoyi-ui/src/router/index.js
ruoyi-ui/src/store/modules/permission.js
ruoyi-ui/src/views/system/user/profile/userAvatar.vue
sql/ry_20201128.sql
已修改13个文件
已添加1个文件
已重命名2个文件
| | |
| | | <dependency>
|
| | | <groupId>org.springframework.boot</groupId>
|
| | | <artifactId>spring-boot-dependencies</artifactId>
|
| | | <version>2.1.17.RELEASE</version>
|
| | | <version>2.1.18.RELEASE</version>
|
| | | <type>pom</type>
|
| | | <scope>import</scope>
|
| | | </dependency>
|
| | |
| | | |
| | | /** æ°æ®åºæ°åç±»å */ |
| | | public static final String[] COLUMNTYPE_NUMBER = { "tinyint", "smallint", "mediumint", "int", "number", "integer", |
| | | "bit", "bigint", "float", "float", "double", "decimal" }; |
| | | "bit", "bigint", "float", "double", "decimal" }; |
| | | |
| | | /** 页é¢ä¸éè¦ç¼è¾å段 */ |
| | | public static final String[] COLUMNNAME_NOT_EDIT = { "id", "create_by", "create_time", "del_flag" }; |
| | |
| | | /** Layoutç»ä»¶æ è¯ */ |
| | | public final static String LAYOUT = "Layout"; |
| | | |
| | | /** ParentViewç»ä»¶æ è¯ */ |
| | | public final static String PARENT_VIEW = "ParentView"; |
| | | |
| | | /** æ ¡éªè¿åç»æç */ |
| | | public final static String UNIQUE = "0"; |
| | | public final static String NOT_UNIQUE = "1"; |
| | |
| | | val = DateUtil.getJavaDate((Double) val);
|
| | | }
|
| | | }
|
| | | else if (Boolean.TYPE == fieldType || Boolean.class == fieldType)
|
| | | {
|
| | | val = Convert.toBool(val, false);
|
| | | }
|
| | | if (StringUtils.isNotNull(fieldType))
|
| | | {
|
| | | Excel attr = field.getAnnotation(Excel.class);
|
| | |
| | | args[i] = DateUtil.getJavaDate((Double) args[i]);
|
| | | }
|
| | | }
|
| | | else if (cs[i] == boolean.class || cs[i] == Boolean.class)
|
| | | {
|
| | | args[i] = Convert.toBool(args[i]);
|
| | | }
|
| | | }
|
| | | }
|
| | | return (E) method.invoke(obj, args);
|
| | |
| | | { |
| | | component = menu.getComponent(); |
| | | } |
| | | else if (StringUtils.isEmpty(menu.getComponent()) && isParentView(menu)) |
| | | { |
| | | component = UserConstants.PARENT_VIEW; |
| | | } |
| | | return component; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ¯å¦ä¸ºparent_viewç»ä»¶ |
| | | * |
| | | * @param menu èåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public boolean isParentView(SysMenu menu) |
| | | { |
| | | return menu.getParentId().intValue() != 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType()); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ç¶èç¹çIDè·åææåèç¹ |
| | | * |
| | | * @param list å类表 |
| | |
| | | "clipboard": "2.0.4", |
| | | "core-js": "3.6.5", |
| | | "echarts": "4.2.1", |
| | | "element-ui": "2.13.2", |
| | | "element-ui": "2.14.1", |
| | | "file-saver": "2.0.1", |
| | | "js-beautify": "1.10.2", |
| | | "fuse.js": "3.4.4", |
| | |
| | | <!-- @author ruoyi 20201128 æ¯æä¸çº§ä»¥ä¸èåç¼å --> |
| | | <template> |
| | | <section class="app-main"> |
| | | <transition name="fade-transform" mode="out-in"> |
| | | <keep-alive :include="cachedViews"> |
| | | <keep-alive :max="20" :exclude="notCacheName"> |
| | | <router-view :key="key" /> |
| | | </keep-alive> |
| | | </transition> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import Global from "@/layout/components/global.js"; |
| | | |
| | | export default { |
| | | name: 'AppMain', |
| | | computed: { |
| | | cachedViews() { |
| | | return this.$store.state.tagsView.cachedViews |
| | | notCacheName() { |
| | | var visitedViews = this.$store.state.tagsView.visitedViews; |
| | | var noCacheViews = []; |
| | | Object.keys(visitedViews).some((index) => { |
| | | if (visitedViews[index].meta.noCache) { |
| | | noCacheViews.push(visitedViews[index].name); |
| | | } |
| | | }); |
| | | return noCacheViews; |
| | | }, |
| | | key() { |
| | | return this.$route.path |
| | | } |
| | | } |
| | | } |
| | | return this.$route.path; |
| | | }, |
| | | }, |
| | | mounted() { |
| | | // å
³éæ ç¾è§¦å |
| | | Global.$on("removeCache", (name, view) => { |
| | | this.removeCache(name, view); |
| | | }); |
| | | }, |
| | | methods: { |
| | | // è·åækeep-aliveåèç¹çVnode |
| | | getVnode() { |
| | | // 夿åéé空 |
| | | if (this.$children.length == 0) return false; |
| | | let vnode; |
| | | for (let item of this.$children) { |
| | | // 妿data䏿keyå代表æ¾å°äºkeep-aliveä¸é¢çåéï¼è¿ä¸ªkeyå°±æ¯router-viewä¸çkey |
| | | if (item.$vnode.data.key) { |
| | | vnode = item.$vnode; |
| | | break; |
| | | } |
| | | } |
| | | return vnode ? vnode : false; |
| | | }, |
| | | // ç§»é¤keep-aliveç¼å |
| | | removeCache(name, view = {}) { |
| | | let vnode = this.getVnode(); |
| | | if (!vnode) return false; |
| | | let componentInstance = vnode.parent.componentInstance; |
| | | // è¿ä¸ªkeyæ¯ç¨æ¥è·ååç¼ç¨æ¥å颿£åå¹é
ç¨ç |
| | | let keyStart = vnode.key.split("/")[0]; |
| | | let thisKey = `${keyStart}${view.fullPath}`; |
| | | let regKey = `${keyStart}${view.path}`; |
| | | |
| | | this[name]({ componentInstance, thisKey, regKey }); |
| | | }, |
| | | // ç§»é¤å
¶ä» |
| | | closeOthersTags({ componentInstance, thisKey }) { |
| | | Object.keys(componentInstance.cache).forEach((key, index) => { |
| | | if (key != thisKey) { |
| | | // 鿝å®ä¾(è¿éåå¨å¤ä¸ªkeyæåä¸ä¸ªç¼åçæ
åµå¯è½åé¢ä¸ä¸ªå·²ç»æ¸
é¤æäºææè¦å 夿) |
| | | if (componentInstance.cache[key]) { |
| | | componentInstance.cache[key].componentInstance.$destroy(); |
| | | } |
| | | // å é¤ç¼å |
| | | delete componentInstance.cache[key]; |
| | | // ç§»é¤keyä¸å¯¹åºçkey |
| | | componentInstance.keys.splice(index, 1); |
| | | } |
| | | }); |
| | | }, |
| | | // ç§»é¤ææç¼å |
| | | closeAllTags({ componentInstance }) { |
| | | // 鿝å®ä¾ |
| | | Object.keys(componentInstance.cache).forEach((key) => { |
| | | if (componentInstance.cache[key]) { |
| | | componentInstance.cache[key].componentInstance.$destroy(); |
| | | } |
| | | }); |
| | | // å é¤ç¼å |
| | | componentInstance.cache = {}; |
| | | // ç§»é¤keyä¸å¯¹åºçkey |
| | | componentInstance.keys = []; |
| | | }, |
| | | // ç§»é¤å个ç¼å |
| | | closeSelectedTag({ componentInstance, regKey }) { |
| | | let reg = new RegExp(`^${regKey}`); |
| | | Object.keys(componentInstance.cache).forEach((key, i) => { |
| | | if (reg.test(key)) { |
| | | // 鿝å®ä¾ |
| | | if (componentInstance.cache[key]) { |
| | | componentInstance.cache[key].componentInstance.$destroy(); |
| | | } |
| | | // å é¤ç¼å |
| | | delete componentInstance.cache[key]; |
| | | // ç§»é¤keyä¸å¯¹åºçkey |
| | | componentInstance.keys.splice(i, 1); |
| | | } |
| | | }); |
| | | }, |
| | | // å·æ°å个ç¼å |
| | | refreshSelectedTag({ componentInstance, thisKey }) { |
| | | Object.keys(componentInstance.cache).forEach((key, index) => { |
| | | if (null != thisKey && key.replace("/redirect", "") == thisKey) { |
| | | // 1 鿝å®ä¾(è¿éåå¨å¤ä¸ªkeyæåä¸ä¸ªç¼åçæ
åµå¯è½åé¢ä¸ä¸ªå·²ç»æ¸
é¤æäºææè¦å 夿) |
| | | if (componentInstance.cache[key]) { |
| | | componentInstance.cache[key].componentInstance.$destroy(); |
| | | } |
| | | // 2 å é¤ç¼å |
| | | delete componentInstance.cache[key]; |
| | | // 3 ç§»é¤keyä¸å¯¹åºçkey |
| | | componentInstance.keys.splice(index, 1); |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .fixed-header+.app-main { |
| | | .fixed-header + .app-main { |
| | | padding-top: 50px; |
| | | } |
| | | |
| | |
| | | min-height: calc(100vh - 84px); |
| | | } |
| | | |
| | | .fixed-header+.app-main { |
| | | .fixed-header + .app-main { |
| | | padding-top: 84px; |
| | | } |
| | | } |
| | |
| | | <script> |
| | | import ScrollPane from './ScrollPane' |
| | | import path from 'path' |
| | | import Global from "@/layout/components/global.js"; |
| | | |
| | | export default { |
| | | components: { ScrollPane }, |
| | |
| | | }) |
| | | }) |
| | | }) |
| | | Global.$emit("removeCache", "refreshSelectedTag", this.selectedTag); |
| | | }, |
| | | closeSelectedTag(view) { |
| | | this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => { |
| | |
| | | this.toLastView(visitedViews, view) |
| | | } |
| | | }) |
| | | Global.$emit("removeCache", "closeSelectedTag", view); |
| | | }, |
| | | closeOthersTags() { |
| | | this.$router.push(this.selectedTag) |
| | | this.$store.dispatch('tagsView/delOthersViews', this.selectedTag).then(() => { |
| | | this.moveToCurrentTag() |
| | | }) |
| | | Global.$emit("removeCache", "closeOthersTags", this.selectedTag); |
| | | }, |
| | | closeAllTags(view) { |
| | | this.$store.dispatch('tagsView/delAllViews').then(({ visitedViews }) => { |
| | |
| | | } |
| | | this.toLastView(visitedViews, view) |
| | | }) |
| | | Global.$emit("removeCache", "closeAllTags"); |
| | | }, |
| | | toLastView(visitedViews, view) { |
| | | const latestView = visitedViews.slice(-1)[0] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import Vue from 'vue'
|
| | | const global = new Vue()
|
| | | export default global
|
| | |
| | | |
| | | /* Layout */ |
| | | import Layout from '@/layout' |
| | | import ParentView from '@/components/ParentView'; |
| | | |
| | | /** |
| | | * Note: è·¯ç±é
置项 |
| | |
| | | import { constantRoutes } from '@/router' |
| | | import { getRouters } from '@/api/menu' |
| | | import Layout from '@/layout/index' |
| | | import ParentView from '@/components/ParentView'; |
| | | |
| | | const permission = { |
| | | state: { |
| | |
| | | function filterAsyncRouter(asyncRouterMap) { |
| | | return asyncRouterMap.filter(route => { |
| | | if (route.component) { |
| | | // Layoutç»ä»¶ç¹æ®å¤ç |
| | | // Layout ParentView ç»ä»¶ç¹æ®å¤ç |
| | | if (route.component === 'Layout') { |
| | | route.component = Layout |
| | | } else if (route.component === 'ParentView') { |
| | | route.component = ParentView |
| | | } else { |
| | | route.component = loadView(route.component) |
| | | } |
| | |
| | | this.usedmemory = echarts.init(this.$refs.usedmemory, "macarons");
|
| | | this.usedmemory.setOption({
|
| | | tooltip: {
|
| | | formatter: "{b} <br/>{a} : {c}M",
|
| | | formatter: "{b} <br/>{a} : {c}K",
|
| | | },
|
| | | series: [
|
| | | {
|
| | | name: "å³°å¼",
|
| | | type: "gauge",
|
| | | detail: {
|
| | | formatter: "{value}M",
|
| | | formatter: "{value}K",
|
| | | },
|
| | | data: [
|
| | | {
|
| | |
| | | .user-info-head { |
| | | position: relative; |
| | | display: inline-block; |
| | | height: 120px; |
| | | } |
| | | |
| | | .user-info-head:hover:after { |
| | |
| | | line-height: 110px; |
| | | border-radius: 50%; |
| | | } |
| | | </style> |
| | | </style> |
ÎļþÃû´Ó sql/ry_20201123.sql ÐÞ¸Ä |
| | |
| | | insert into sys_menu values('105', 'åå
¸ç®¡ç', '1', '6', 'dict', 'system/dict/index', 1, 0, 'C', '0', '0', 'system:dict:list', 'dict', 'admin', sysdate(), '', null, 'åå
¸ç®¡çèå'); |
| | | insert into sys_menu values('106', 'åæ°è®¾ç½®', '1', '7', 'config', 'system/config/index', 1, 0, 'C', '0', '0', 'system:config:list', 'edit', 'admin', sysdate(), '', null, 'åæ°è®¾ç½®èå'); |
| | | insert into sys_menu values('107', 'éç¥å
¬å', '1', '8', 'notice', 'system/notice/index', 1, 0, 'C', '0', '0', 'system:notice:list', 'message', 'admin', sysdate(), '', null, 'éç¥å
¬åèå'); |
| | | insert into sys_menu values('108', 'æ¥å¿ç®¡ç', '1', '9', 'log', 'system/log/index', 1, 0, 'M', '0', '0', '', 'log', 'admin', sysdate(), '', null, 'æ¥å¿ç®¡çèå'); |
| | | insert into sys_menu values('108', 'æ¥å¿ç®¡ç', '1', '9', 'log', '', 1, 0, 'M', '0', '0', '', 'log', 'admin', sysdate(), '', null, 'æ¥å¿ç®¡çèå'); |
| | | insert into sys_menu values('109', 'å¨çº¿ç¨æ·', '2', '1', 'online', 'monitor/online/index', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 'admin', sysdate(), '', null, 'å¨çº¿ç¨æ·èå'); |
| | | insert into sys_menu values('110', '宿¶ä»»å¡', '2', '2', 'job', 'monitor/job/index', 1, 0, 'C', '0', '0', 'monitor:job:list', 'job', 'admin', sysdate(), '', null, '宿¶ä»»å¡èå'); |
| | | insert into sys_menu values('111', 'æ°æ®çæ§', '2', '3', 'druid', 'monitor/druid/index', 1, 0, 'C', '0', '0', 'monitor:druid:list', 'druid', 'admin', sysdate(), '', null, 'æ°æ®çæ§èå'); |