Commit deaa3c4e by caoyanzhi

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

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