|
@@ -12,11 +12,9 @@ export default {
|
|
|
|
|
|
// 检查权限是否存在
|
|
|
hasPermission (permission) {
|
|
|
-
|
|
|
let hasPermission = true
|
|
|
-
|
|
|
- let appData = JSON.parse(sessionStorage.getItem('app'))
|
|
|
-
|
|
|
+ const store = useAuthStore()
|
|
|
+ let appData = store.app
|
|
|
let auth = appData.meta.auth
|
|
|
|
|
|
hasPermission = auth.some(item=>item.option == permission)
|
|
@@ -25,9 +23,11 @@ export default {
|
|
|
},
|
|
|
// 获取应用表格
|
|
|
TBLayout (appname) {
|
|
|
+
|
|
|
try {
|
|
|
// 获取应用数据
|
|
|
- let apps = JSON.parse(sessionStorage.getItem('app'))
|
|
|
+ const store = useAuthStore()
|
|
|
+ let apps = store.app
|
|
|
// 获取当前应用表格数据
|
|
|
let tablecols = apps.meta.tables[appname].tablecols.map(e=>{
|
|
|
return {
|