diff --git a/src/api/person/person.js b/src/api/person/person.js new file mode 100644 index 0000000..452a3e5 --- /dev/null +++ b/src/api/person/person.js @@ -0,0 +1,69 @@ +import request from '@/utils/request' + +const personApi = { + addOrUpdate: 'person/addOrUpdate', + del: 'person/del', + get: 'person/get', + page: 'person/pageList', + transferOrg: 'person/transferOrg', + quit: 'person/quit', + resetPwd: 'person/resetPwd', + setAdmin: 'person/setAdmin', +} + +export function personAddOrUpdate (params) { + return request({ + url: personApi.addOrUpdate, + method: 'post', + data: params + }) +} +export function personGet (params) { + return request({ + url: personApi.get, + method: 'get', + params: params + }) +} +export function personDel (params) { + return request({ + url: personApi.del, + method: 'post', + params: params + }) +} +export function personPage (params) { + return request({ + url: personApi.page, + method: 'get', + params: params + }) +} +export function personTransferOrg (params) { + return request({ + url: personApi.transferOrg, + method: 'get', + params: params + }) +} +export function personQuit (params) { + return request({ + url: personApi.quit, + method: 'get', + params: params + }) +} +export function personResetPwd (params) { + return request({ + url: personApi.resetPwd, + method: 'get', + params: params + }) +} +export function personSetAdmin (params) { + return request({ + url: personApi.setAdmin, + method: 'get', + params: params + }) +} diff --git a/src/utils/permissions.js b/src/utils/permissions.js index 83b0bb1..c139fe1 100644 --- a/src/utils/permissions.js +++ b/src/utils/permissions.js @@ -14,8 +14,7 @@ export function actionToObject (json) { */ export function hasBtnPermission (permission) { const myBtns = store.getters.buttons - const name = store.getters.name - if (name == 'admin') { + if (myBtns.indexOf('*:*:*') > -1) { return true } return myBtns.indexOf(permission) > -1 diff --git a/src/views/org/OrgForm.vue b/src/views/org/OrgForm.vue index de7fc6a..1e65505 100644 --- a/src/views/org/OrgForm.vue +++ b/src/views/org/OrgForm.vue @@ -9,7 +9,7 @@ > - + - + { this.formLoading = false - if (!res.code === 200) { + if (!res.code === 200 || !res.data.length) { this.orgTree = [] return } @@ -189,8 +189,7 @@ }).finally((res) => { this.confirmLoading = false }) - } - + } } else { this.confirmLoading = false } diff --git a/src/views/org/OrgTree.vue b/src/views/org/OrgTree.vue new file mode 100644 index 0000000..f5d0f90 --- /dev/null +++ b/src/views/org/OrgTree.vue @@ -0,0 +1,124 @@ + + + diff --git a/src/views/person/PersonDetail.vue b/src/views/person/PersonDetail.vue new file mode 100644 index 0000000..48d48ea --- /dev/null +++ b/src/views/person/PersonDetail.vue @@ -0,0 +1,8 @@ + + + + + diff --git a/src/views/person/PersonForm.vue b/src/views/person/PersonForm.vue new file mode 100644 index 0000000..80aa59f --- /dev/null +++ b/src/views/person/PersonForm.vue @@ -0,0 +1,332 @@ + + + diff --git a/src/views/person/PersonList.vue b/src/views/person/PersonList.vue new file mode 100644 index 0000000..26aedeb --- /dev/null +++ b/src/views/person/PersonList.vue @@ -0,0 +1,347 @@ + + + diff --git a/src/views/security/menu/MenuForm.vue b/src/views/security/menu/MenuForm.vue index 013e5ad..1c81733 100644 --- a/src/views/security/menu/MenuForm.vue +++ b/src/views/security/menu/MenuForm.vue @@ -229,9 +229,7 @@ this.meneTypeFunc(record.type.toString()) // 默认选中的单选框 - // eslint-disable-next-line no-unused-vars const visibleDef = false - // eslint-disable-next-line eqeqeq if (record.visible == 1) { this.visibleDef = true } diff --git a/src/views/security/user/UserList.vue b/src/views/security/user/UserList.vue index 8057b68..839e614 100644 --- a/src/views/security/user/UserList.vue +++ b/src/views/security/user/UserList.vue @@ -48,7 +48,7 @@ 编辑 - + 更多 @@ -138,7 +138,7 @@ export default { }, created () { // 动态加载权限 - if (this.hasPerm('sys:user:edit') || this.hasPerm('sys:user:resetPwd') || this.hasPerm('sys:user:grantRole') || this.hasPerm('sys:user:delete')) { + if (this.hasPerm('sys:user:edit') || this.hasPerm('sys:user:resetPwd') || this.hasPerm('sys:user:grantRole') || this.hasPerm('sys:user:del')) { this.columns.push({ title: '操作', width: '150px', diff --git a/src/views/sys/dictionary/DictionaryList.vue b/src/views/sys/dictionary/DictionaryList.vue index 02c4d12..02c2509 100644 --- a/src/views/sys/dictionary/DictionaryList.vue +++ b/src/views/sys/dictionary/DictionaryList.vue @@ -1,36 +1,34 @@