feat(部门): 添加获取部门及其子部门列表的接口

在leave.vue和goout.vue中使用新接口listDeptWithChildren替换原有的listDept
This commit is contained in:
砂糖
2026-01-27 10:23:06 +08:00
parent fb203d7eb8
commit 0fb7aebf67
3 changed files with 14 additions and 4 deletions

View File

@@ -58,3 +58,13 @@ export function treeselect() {
method: 'get'
})
}
export function listDeptWithChildren(deptId) {
if (!deptId) {
return Promise.reject(new Error('deptId is required'))
}
return request({
url: '/system/dept/list/' + deptId,
method: 'get'
})
}

View File

@@ -119,7 +119,7 @@
<script>
import { getOutRequest, addOutRequest, updateOutRequest } from "@/api/wms/outRequest";
import { listApproval, updateApproval } from "@/api/wms/approval"
import { listDept } from "@/api/system/dept"
import { listDeptWithChildren } from "@/api/system/dept"
import FileUpload from '@/components/FileUpload'
import DictSelect from '@/components/DictSelect'
import OutLabelPrinter from '../components/outLabelPrinter'
@@ -183,7 +183,7 @@ export default {
},
methods: {
getDeptList() {
listDept().then(response => {
listDeptWithChildren("2009923867307630594").then(response => {
this.deptOptions = response.data
})
},

View File

@@ -145,7 +145,7 @@
<script>
import { getLeaveRequest, addLeaveRequest, updateLeaveRequest } from "@/api/wms/leaveRequest";
import { listApproval, updateApproval } from "@/api/wms/approval"
import { listDept } from "@/api/system/dept"
import { listDeptWithChildren } from "@/api/system/dept"
import FileUpload from '@/components/FileUpload'
import DictSelect from '@/components/DictSelect'
@@ -204,7 +204,7 @@ export default {
},
methods: {
getDeptList() {
listDept().then(response => {
listDeptWithChildren("2009923867307630594").then(response => {
this.deptOptions = response.data
})
},