refactor(api): 重构系统模块API函数命名规范
This commit is contained in:
@@ -151,9 +151,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudRoles from '@/api/system/role'
|
||||
import { searchDept, queryDeptSuperiorTree } from '@/api/system/dept'
|
||||
import { queryChildMenuSet, queryMenuListByPid } from '@/api/system/menu'
|
||||
import crudRoles, {getCurrentUserRoleLevel} from '@/api/system/role'
|
||||
import { searchDept, searchDeptTree } from '@/api/system/dept'
|
||||
import { listChildMenuSetByMenuId, listMenuByPid } from '@/api/system/menu'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
@@ -190,14 +190,14 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudRoles.getLevel().then(data => {
|
||||
crudRoles.getCurrentUserRoleLevel().then(data => {
|
||||
this.level = data.level
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getMenuDatas(node, resolve) {
|
||||
setTimeout(() => {
|
||||
queryMenuListByPid(node.data.id ? node.data.id : 0).then(res => {
|
||||
listMenuByPid(node.data.id ? node.data.id : 0).then(res => {
|
||||
resolve(res)
|
||||
})
|
||||
}, 100)
|
||||
@@ -261,7 +261,7 @@ export default {
|
||||
},
|
||||
menuChange(menu) {
|
||||
// 获取该节点的所有子节点,id 包含自身
|
||||
queryChildMenuSet(menu.id).then(childIds => {
|
||||
listChildMenuSetByMenuId(menu.id).then(childIds => {
|
||||
// 判断是否在 menuIds 中,如果存在则删除,否则添加
|
||||
if (this.menuIds.indexOf(menu.id) !== -1) {
|
||||
for (let i = 0; i < childIds.length; i++) {
|
||||
@@ -331,7 +331,7 @@ export default {
|
||||
depts.forEach(dept => {
|
||||
ids.push(dept.id)
|
||||
})
|
||||
queryDeptSuperiorTree(ids).then(res => {
|
||||
searchDeptTree(ids).then(res => {
|
||||
const date = res.content
|
||||
this.buildDepts(date)
|
||||
this.depts = date
|
||||
|
||||
Reference in New Issue
Block a user