feat(dept): 新增部门树形组件功能
- 创建 CuteDeptTreeVo 模型类用于部门树形结构数据传输 - 实现 CuteDeptTreeService 服务类处理部门树形数据查询逻辑 - 开发 CuteDeptTreeApi 接口提供部门树形数据查询功能 - 将 SystemDeptService 中的 filterRootDeptList 和 queryDeptByArgs 方法改为 public 以便外部调用 - 前端创建 cute-dept-tree API 接口文件封装请求方法 - 更新 CuteDeptTree 组件使用新的部门树形接口并调整数据处理逻辑 - 修改组件 props 类型从 Number/String 改为 String 类型
This commit is contained in:
@@ -30,13 +30,13 @@
|
||||
|
||||
<script>
|
||||
|
||||
import { searchDept } from '@/api/system/dept'
|
||||
import CuteDeptTreeApi from '@/api/application/cute-dept-tree'
|
||||
|
||||
export default {
|
||||
name: 'CuteDeptTree',
|
||||
props: {
|
||||
value: {
|
||||
type: [Number, String],
|
||||
type: String,
|
||||
required: false,
|
||||
default: null
|
||||
}
|
||||
@@ -61,15 +61,11 @@ export default {
|
||||
params['pid'] = node.data.id
|
||||
}
|
||||
setTimeout(() => {
|
||||
searchDept({
|
||||
page: 1,
|
||||
size: 1000,
|
||||
args: params
|
||||
}).then(res => {
|
||||
CuteDeptTreeApi.listMetadata(params).then(res => {
|
||||
if (resolve) {
|
||||
resolve(res.content)
|
||||
resolve(res)
|
||||
} else {
|
||||
this.deptData = res.content
|
||||
this.deptData = res
|
||||
}
|
||||
})
|
||||
}, 100)
|
||||
|
||||
Reference in New Issue
Block a user