Commit 00389705 by 姜雷

Merge branch 'develop' into 'test'

Develop See merge request !33
parents 710edf13 6354207a
......@@ -73,6 +73,10 @@ export default {
type: Boolean,
default: false,
},
showMoney: {
type: Boolean,
default: false,
},
},
data() {
return {
......@@ -123,6 +127,7 @@ export default {
{...updateVisible}
customerId={this.customerId}
visible={this.visible}
showMoney={this.showMoney}
title={this.title}
fullscreen={this.fullscreen}
top={this.top}
......@@ -146,6 +151,7 @@ export default {
{...updateVisible}
customerId={this.customerId}
visible={this.visible}
showMoney={this.showMoney}
title={this.title}
fullscreen={this.fullscreen}
top={this.top}
......
......@@ -122,30 +122,7 @@ export default {
},
data() {
return {
menuList: [
{
path: '/OperLog',
name: '19',
meta: { title: '后台操作日志', icon: '' },
},
{
path: '/interface',
name: '27',
meta: { title: '接口管理', icon: '' },
children: [
{
path: '/interface/interfaceApp',
name: '29',
meta: { title: 'APP接口', icon: '' },
},
{
path: '/interface/interfaceManager',
name: '30',
meta: { title: '后台接口', icon: '' },
},
],
},
],
collectRouteList: [],
};
},
computed: {
......@@ -175,24 +152,35 @@ export default {
);
return item ? true : false;
},
collectRouteList() {
if (
this.routers &&
this.routers.length &&
this.collectList &&
this.collectList.length
) {
let item = this.collectList.map(item => {
// collectRouteList() {
// let list = this.collectList.map(item => {
// let id = item.menuId;
// return getFilterMenu(this.routers, id);
// });
// list = list.filter(item => !!item);
// return list ? formatRouteLink(list) : null;
// },
},
watch: {
collectList(val) {
this.getCollectList(val);
},
},
mounted() {
this.getCollectList(this.collectList);
},
methods: {
getCollectList(val) {
let list = val.map(item => {
let id = item.menuId;
return getFilterMenu(this.routers, id);
});
return item ? formatRouteLink(item) : null;
} else {
return null;
}
},
console.log(list);
list = list.filter(item => !!item);
console.log(list);
this.collectRouteList = list && list.length ? formatRouteLink(list) : [];
},
methods: {
clickHandle() {
if (this.dashboardVisiable) {
this.$router.go(-1);
......
......@@ -2,8 +2,8 @@
<div
ref="MenuItem"
:class="`MenuItem ${showSubMenus?'Selected':''}`"
@mouseenter="toggleSubmenus"
@mouseleave="toggleSubmenus"
@mouseenter="toggleSubmenus(true)"
@mouseleave="toggleSubmenus(false)"
>
<div
class="IconMenu"
......@@ -116,8 +116,8 @@ export default {
}
},
methods: {
toggleSubmenus() {
this.showSubMenus = !this.showSubMenus;
toggleSubmenus(visiable) {
this.showSubMenus = visiable;
},
selectHandle() {
if (typeof this.selectRouteMenu === 'function') {
......
......@@ -35,7 +35,7 @@ const actions = {
return addCollect({
data: { ...entity, sortId: getters.collectList.length + 1 },
}).then(res => {
commit(ADD_COLLECT_LIST, entity.menuId);
commit(ADD_COLLECT_LIST, Number(entity.menuId));
});
},
delCollect({ commit }, entity) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment