diff --git a/client/dist/index.html b/client/dist/index.html
index b34300f..9772179 100644
--- a/client/dist/index.html
+++ b/client/dist/index.html
@@ -1 +1 @@
-
vue Admin Template
\ No newline at end of file
+vue Admin Template
\ No newline at end of file
diff --git a/client/src/api/org.js b/client/src/api/org.js
index 3ee4928..8c535b4 100644
--- a/client/src/api/org.js
+++ b/client/src/api/org.js
@@ -42,3 +42,9 @@ export function deleteOrg(id) {
method: 'delete'
})
}
+export function getOrgItem(id) {
+ return request({
+ url: `/system/organization/${id}/`,
+ method: 'get'
+ })
+}
diff --git a/client/src/store/modules/user.js b/client/src/store/modules/user.js
index 1b23525..8766130 100644
--- a/client/src/store/modules/user.js
+++ b/client/src/store/modules/user.js
@@ -1,5 +1,6 @@
import { login, logout, getInfo, login2, fulllogin } from '@/api/user'
import { getToken, setToken, removeToken } from '@/utils/auth'
+import { getOrgItem} from "@/api/org";
import { resetRouter } from '@/router'
const getDefaultState = () => {
@@ -68,7 +69,6 @@ const actions = {
}
const { perms, name, avatar } = data.user
-
// perms must be a non-empty array
if (!perms || perms.length <= 0) {
reject('没有任何权限!')
@@ -104,23 +104,26 @@ const actions = {
return new Promise((resolve, reject) => {
getInfo(state.token).then(response => {
const { data } = response
-
if (!data) {
reject('验证失败,重新登陆.')
}
-
- const { perms, name, avatar, dept, dept_name} = data
-
+ const { perms, name, avatar, dept, dept_name} = data;
// perms must be a non-empty array
- if (!perms || perms.length <= 0) {
- reject('没有任何权限!')
- }
-
- commit('SET_PERMS', perms)
commit('SET_NAME', name)
commit('SET_AVATAR', avatar)
commit('SET_DEPT', dept)
commit('SET_DEPTNAME', dept_name)
+ if (!perms || perms.length <= 0) {
+ reject('没有任何权限!')
+ }else{
+ if(dept==5||dept==33||dept==34||dept==55||dept==36||dept==37||dept==38
+ ||dept==39||dept==40||dept==41||dept==42||dept==67||dept==97){
+ perms.push('test')
+ commit('SET_PERMS', perms);
+ }else{
+ commit('SET_PERMS', perms);
+ }
+ }
resolve(data)
}).catch(error => {
reject(error)