sss 2 years ago
parent
commit
a1d91eee8f
3 changed files with 13 additions and 4 deletions
  1. 10 1
      src/api/system/dept.js
  2. 1 1
      src/views/middle.vue
  3. 2 2
      src/views/system/role/index.vue

+ 10 - 1
src/api/system/dept.js

@@ -16,6 +16,15 @@ export function getAllDept() {
 }
 
 export function getDeptSuperior(ids) {
+  const data = ids.length || ids.length === 0 ? ids : Array.of(ids)
+  return request({
+    url: 'api/dept/superior',
+    method: 'post',
+    data: [data]
+  })
+}
+
+export function getRoleDeptSuperior(ids) {
   const data = ids.length || ids.length === 0 ? ids : Array.of(ids)
   return request({
     url: 'api/dept/superior',
@@ -48,4 +57,4 @@ export function edit(data) {
   })
 }
 
-export default { add, edit, del, getDepts, getDeptSuperior, getAllDept }
+export default { add, edit, del, getDepts, getDeptSuperior, getAllDept, getRoleDeptSuperior }

+ 1 - 1
src/views/middle.vue

@@ -5,7 +5,7 @@
       <header>
         <div class="width_1200">
           <div class="header_container">
-            <p>您好,黎瀛&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;</p>
+            <p>您好,{{ dmUser.user.nickName }}&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;</p>
             <p>
               {{
                 dmUser.user.dept.name

+ 2 - 2
src/views/system/role/index.vue

@@ -119,7 +119,7 @@
 
 <script>
 import crudRoles from '@/api/system/role'
-import { getDepts, getDeptSuperior } from '@/api/system/dept'
+import { getDepts, getRoleDeptSuperior } from '@/api/system/dept'
 import { getMenusTree, getChild } from '@/api/system/menu'
 import CRUD, { presenter, header, form, crud } from '@crud/crud'
 import rrOperation from '@crud/RR.operation'
@@ -298,7 +298,7 @@ export default {
       depts.forEach(dept => {
         ids.push(dept.id)
       })
-      getDeptSuperior(ids).then(res => {
+      getRoleDeptSuperior(ids).then(res => {
         const date = res.content
         this.buildDepts(date)
         this.depts = date