Commit deaa3c4e by caoyanzhi

fix:权限项页面跳转到操作项页面,打开对应的tab

parent 40d827fd
......@@ -297,7 +297,7 @@ export default {
// 跳转到权限项列表页
toPermissionList(menuData) {
const { menuId } = menuData;
this.$router.push(`/permission-list?menuId=${menuId}`)
this.$router.push(`/permission-list?menuId=${menuId}&appType=${this.appType}`)
},
flatDataToTree(data) {
return data.filter(el => {
......
......@@ -25,6 +25,11 @@ export default {
return {
activeName: 'first'
}
},
created() {
const { type } = this.$route.query;
const tabs = ['', 'first', 'second', 'third', 'fourth'];
this.activeName = tabs[type > 0 && type < 5 ? type : 1] ;
}
}
</script>
......
......@@ -58,6 +58,7 @@ export default {
{ name: '权限项'}
],
menuId: '',
appType: '',
// 操作项列表
operationList: [],
// 权限项列表
......@@ -77,11 +78,12 @@ export default {
}
},
created() {
const { menuId } = this.$route.query;
const { menuId, appType } = this.$route.query;
if (!menuId) {
return this.$router.go(-1);
}
this.menuId = menuId;
this.appType = appType;
this.initData();
this.$emit('updateBread', this.bread)
},
......@@ -165,7 +167,7 @@ export default {
},
// 去操作项列表页
toOperationList() {
this.$router.push('/operation-list');
this.$router.push(`/operation-list?type=${this.appType}`);
}
}
}
......
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