diff --git a/ruoyi-ui/src/assets/styles/sidebar.scss b/ruoyi-ui/src/assets/styles/sidebar.scss
index ed308b8dc..abe5b6317 100644
--- a/ruoyi-ui/src/assets/styles/sidebar.scss
+++ b/ruoyi-ui/src/assets/styles/sidebar.scss
@@ -1,7 +1,7 @@
#app {
.main-container {
- min-height: 100%;
+ height: 100%;
transition: margin-left .28s;
margin-left: $base-sidebar-width;
position: relative;
diff --git a/ruoyi-ui/src/components/DictTag/index.vue b/ruoyi-ui/src/components/DictTag/index.vue
index 4c196c489..279b6137c 100644
--- a/ruoyi-ui/src/components/DictTag/index.vue
+++ b/ruoyi-ui/src/components/DictTag/index.vue
@@ -7,7 +7,7 @@
:key="item.value"
:index="index"
:class="item.raw.cssClass"
- >{{ item.label }}{{ item.label + ' ' }}
- {{ item.label }}
+ {{ item.label + ' ' }}
+
+ {{ unmatchArray | handleArray }}
+
@@ -33,6 +36,16 @@ export default {
default: null,
},
value: [Number, String, Array],
+ // 当未找到匹配的数据时,显示value
+ showValue: {
+ type: Boolean,
+ default: true,
+ }
+ },
+ data() {
+ return {
+ unmatchArray: [], // 记录未匹配的项
+ }
},
computed: {
values() {
@@ -42,11 +55,38 @@ export default {
return [];
}
},
+ unmatch(){
+ this.unmatchArray = [];
+ if (this.value !== null && typeof this.value !== 'undefined') {
+ // 传入值为非数组
+ if(!Array.isArray(this.value)){
+ if(this.options.some(v=> v.value == this.value )) return false;
+ this.unmatchArray.push(this.value);
+ return true;
+ }
+ // 传入值为Array
+ this.value.forEach(item => {
+ if (!this.options.some(v=> v.value == item )) this.unmatchArray.push(item)
+ });
+ return true;
+ }
+ // 没有value不显示
+ return false;
+ },
+
},
+ filters: {
+ handleArray(array) {
+ if(array.length===0) return '';
+ return array.reduce((pre, cur) => {
+ return pre + ' ' + cur;
+ })
+ },
+ }
};
\ No newline at end of file
+
diff --git a/ruoyi-ui/src/components/IconSelect/index.vue b/ruoyi-ui/src/components/IconSelect/index.vue
index 2ace1224f..8dadc028a 100644
--- a/ruoyi-ui/src/components/IconSelect/index.vue
+++ b/ruoyi-ui/src/components/IconSelect/index.vue
@@ -1,13 +1,17 @@
-
+
@@ -17,6 +21,11 @@
import icons from './requireIcons'
export default {
name: 'IconSelect',
+ props: {
+ activeIcon: {
+ type: String
+ }
+ },
data() {
return {
name: '',
@@ -46,22 +55,49 @@ export default {
.icon-body {
width: 100%;
padding: 10px;
+ .icon-search {
+ position: relative;
+ margin-bottom: 5px;
+ }
.icon-list {
height: 200px;
- overflow-y: scroll;
- div {
- height: 30px;
- line-height: 30px;
- margin-bottom: -5px;
- cursor: pointer;
- width: 33%;
- float: left;
- }
- span {
- display: inline-block;
- vertical-align: -0.15em;
- fill: currentColor;
- overflow: hidden;
+ overflow: auto;
+ .list-container {
+ display: flex;
+ flex-wrap: wrap;
+ .icon-item-wrapper {
+ width: calc(100% / 3);
+ height: 25px;
+ line-height: 25px;
+ cursor: pointer;
+ display: flex;
+ .icon-item {
+ display: flex;
+ max-width: 100%;
+ height: 100%;
+ padding: 0 5px;
+ &:hover {
+ background: #ececec;
+ border-radius: 5px;
+ }
+ .icon {
+ flex-shrink: 0;
+ }
+ span {
+ display: inline-block;
+ vertical-align: -0.15em;
+ fill: currentColor;
+ padding-left: 2px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ }
+ .icon-item.active {
+ background: #ececec;
+ border-radius: 5px;
+ }
+ }
}
}
}
diff --git a/ruoyi-ui/src/components/TopNav/index.vue b/ruoyi-ui/src/components/TopNav/index.vue
index 5f0edbef8..9fb8dd81d 100644
--- a/ruoyi-ui/src/components/TopNav/index.vue
+++ b/ruoyi-ui/src/components/TopNav/index.vue
@@ -127,7 +127,13 @@ export default {
window.open(key, "_blank");
} else if (!route || !route.children) {
// 没有子路由路径内部打开
- this.$router.push({ path: key });
+ const routeMenu = this.childrenMenus.find(item => item.path === key);
+ if (routeMenu && routeMenu.query) {
+ let query = JSON.parse(routeMenu.query);
+ this.$router.push({ path: key, query: query });
+ } else {
+ this.$router.push({ path: key });
+ }
this.$store.dispatch('app/toggleSideBarHide', true);
} else {
// 显示左侧联动菜单
diff --git a/ruoyi-ui/src/layout/components/AppMain.vue b/ruoyi-ui/src/layout/components/AppMain.vue
index b7a87ae8c..a25c56254 100644
--- a/ruoyi-ui/src/layout/components/AppMain.vue
+++ b/ruoyi-ui/src/layout/components/AppMain.vue
@@ -50,3 +50,26 @@ export default {
}
}
+
+
diff --git a/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue b/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue
index bb753a124..f92d99b7a 100644
--- a/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue
+++ b/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue
@@ -87,7 +87,7 @@ export default {
bottom: 0px;
}
.el-scrollbar__wrap {
- height: 49px;
+ height: 39px;
}
}
}
diff --git a/ruoyi-ui/src/layout/index.vue b/ruoyi-ui/src/layout/index.vue
index 1daaba200..dba4393da 100644
--- a/ruoyi-ui/src/layout/index.vue
+++ b/ruoyi-ui/src/layout/index.vue
@@ -1,19 +1,17 @@
-
-
-
-
@@ -74,18 +72,6 @@ export default {
height: 100%;
width: 100%;
- .el-scrollbar{
- height: 100%;
- }
-
- ::v-deep .el-scrollbar__bar.is-vertical {
- z-index: 10;
- }
-
- ::v-deep .el-scrollbar__wrap {
- overflow-x: hidden;
- }
-
&.mobile.openSidebar {
position: fixed;
top: 0;
diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js
index dd4d5f14a..883ea2df8 100644
--- a/ruoyi-ui/src/router/index.js
+++ b/ruoyi-ui/src/router/index.js
@@ -166,9 +166,15 @@ export const dynamicRoutes = [
// 防止连续点击多次路由报错
let routerPush = Router.prototype.push;
+let routerReplace = Router.prototype.replace;
+// push
Router.prototype.push = function push(location) {
return routerPush.call(this, location).catch(err => err)
}
+// replace
+Router.prototype.replace = function push(location) {
+ return routerReplace.call(this, location).catch(err => err)
+}
export default new Router({
base: process.env.VUE_APP_CONTEXT_PATH,
diff --git a/ruoyi-ui/src/views/monitor/cache/list.vue b/ruoyi-ui/src/views/monitor/cache/list.vue
index 8073d56a7..a4be540e8 100644
--- a/ruoyi-ui/src/views/monitor/cache/list.vue
+++ b/ruoyi-ui/src/views/monitor/cache/list.vue
@@ -187,7 +187,7 @@ export default {
/** 清理指定名称缓存 */
handleClearCacheName(row) {
clearCacheName(row.cacheName).then(response => {
- this.$modal.msgSuccess("清理缓存名称[" + this.nowCacheName + "]成功");
+ this.$modal.msgSuccess("清理缓存名称[" + row.cacheName + "]成功");
this.getCacheKeys();
});
},
diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/ruoyi-ui/src/views/system/menu/index.vue
index 2bb73c71b..a8971d1db 100644
--- a/ruoyi-ui/src/views/system/menu/index.vue
+++ b/ruoyi-ui/src/views/system/menu/index.vue
@@ -134,7 +134,7 @@
trigger="click"
@show="$refs['iconSelect'].reset()"
>
-
+