|
|
@ -214,7 +214,8 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
add () {
|
|
|
|
add () {
|
|
|
|
this.edit({status:'1',permsType:'1'});
|
|
|
|
// 默认值
|
|
|
|
|
|
|
|
this.edit({status:'1',permsType:'1',route:true});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
edit (record) {
|
|
|
|
edit (record) {
|
|
|
|
this.resetScreenSize(); // 调用此方法,根据屏幕宽度自适应调整抽屉的宽度
|
|
|
|
this.resetScreenSize(); // 调用此方法,根据屏幕宽度自适应调整抽屉的宽度
|
|
|
@ -222,31 +223,22 @@
|
|
|
|
this.model = Object.assign({}, record);
|
|
|
|
this.model = Object.assign({}, record);
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
//根据菜单类型,动态展示页面字段
|
|
|
|
//根据菜单类型,动态展示页面字段
|
|
|
|
if(record){
|
|
|
|
|
|
|
|
console.log(record)
|
|
|
|
console.log(record)
|
|
|
|
this.alwaysShow = !record.alwaysShow?false:true;
|
|
|
|
this.alwaysShow = !record.alwaysShow?false:true;
|
|
|
|
this.menuHidden = !record.hidden?false:true;
|
|
|
|
this.menuHidden = !record.hidden?false:true;
|
|
|
|
this.routeSwitch = record.route;
|
|
|
|
if(record.route!=null){
|
|
|
|
|
|
|
|
this.routeSwitch = record.route?true:false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//console.log('record.menuType', record.menuType);
|
|
|
|
//console.log('record.menuType', record.menuType);
|
|
|
|
this.show = record.menuType==2?false:true;
|
|
|
|
this.show = record.menuType==2?false:true;
|
|
|
|
this.menuLabel = record.menuType==2?'按钮/权限名称':'菜单名称';
|
|
|
|
this.menuLabel = record.menuType==2?'按钮/权限':'菜单名称';
|
|
|
|
|
|
|
|
|
|
|
|
if(this.model.parentId){
|
|
|
|
if(this.model.parentId){
|
|
|
|
this.localMenuType = 1;
|
|
|
|
this.localMenuType = 1;
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
this.localMenuType = 0;
|
|
|
|
this.localMenuType = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
|
|
|
|
if(this.model.parentId){
|
|
|
|
|
|
|
|
this.localMenuType = 1;
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.localMenuType = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.show = true;
|
|
|
|
|
|
|
|
this.menuLabel = '菜单名称';
|
|
|
|
|
|
|
|
this.routeSwitch = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------------------------
|
|
|
|
//----------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
this.visible = true;
|
|
|
|
this.visible = true;
|
|
|
@ -303,11 +295,11 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onChangeMenuType(e) {
|
|
|
|
onChangeMenuType(e) {
|
|
|
|
console.log('localMenuType checked', e.target.value)
|
|
|
|
//console.log('localMenuType checked', e.target.value)
|
|
|
|
this.localMenuType=e.target.value
|
|
|
|
this.localMenuType=e.target.value
|
|
|
|
if(e.target.value == 2){
|
|
|
|
if(e.target.value == 2){
|
|
|
|
this.show = false;
|
|
|
|
this.show = false;
|
|
|
|
this.menuLabel = '按钮/权限名称';
|
|
|
|
this.menuLabel = '按钮/权限';
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
this.show = true;
|
|
|
|
this.show = true;
|
|
|
|
this.menuLabel = '菜单名称';
|
|
|
|
this.menuLabel = '菜单名称';
|
|
|
|