refactor(system): 重构系统模块接口和数据结构
- 更新了多个控制器的接口设计,使用 CsPageArgs 封装分页参数 - 修改了部分 API 的 HTTP 方法,优化了请求结构 - 统一了查询接口的命名规范 - 调整了部分参数和返回值类型,提高了代码复用性
This commit is contained in:
@@ -376,7 +376,11 @@ export default {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
getDepts() {
|
||||
queryDeptList({ enabled: true }).then(res => {
|
||||
queryDeptList({
|
||||
page: 1,
|
||||
size: 999999,
|
||||
args: { enabled: true }
|
||||
}).then(res => {
|
||||
this.depts = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
@@ -405,7 +409,11 @@ export default {
|
||||
// 获取弹窗内部门数据
|
||||
loadDepts({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
queryDeptList({ enabled: true, pid: parentNode.id }).then(res => {
|
||||
queryDeptList({
|
||||
page: 1,
|
||||
size: 999999,
|
||||
args: { enabled: true, pid: parentNode.id }
|
||||
}).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
|
||||
Reference in New Issue
Block a user