diff --git a/src/views/oa/crm/crmMailingApply/edit.vue b/src/views/oa/crm/crmMailingApply/edit.vue index f01ae94..9e90694 100644 --- a/src/views/oa/crm/crmMailingApply/edit.vue +++ b/src/views/oa/crm/crmMailingApply/edit.vue @@ -61,6 +61,20 @@ + + + + + + + @@ -241,8 +255,9 @@ import { updateCrmMailingApplySignTime } from '@/api/oa/crm/crmMailingApply'; import { CrmMailingApplyForm } from '@/api/oa/crm/crmMailingApply/types'; -import { listUser } from '@/api/system/user'; +import { getUserList, listUser } from '@/api/system/user'; import { UserQuery } from '@/api/system/user/types'; +import { allListDept } from '@/api/system/dept'; import ProjectSelect from '@/components/ProjectSelect/index.vue'; import { getRuleGenerateCode } from '@/api/system/codeRule'; import { CodeRuleEnum, FlowCodeEnum } from '@/enums/OAEnum'; @@ -293,6 +308,8 @@ const taskVariables = ref({}); // 用户列表 const userList = ref([]); +// 部门列表 +const deptList = ref([]); // OSS 上传内部 v-model 中转,避免直接绑定到 form 的字段类型导致TS报错 const ossFileModel = ref(undefined); @@ -346,14 +363,23 @@ const { form, rules } = toRefs(data); /** 加载用户列表 */ const loadUserList = async () => { try { - const params: UserQuery = { pageNum: 1, pageSize: 9999 }; - const res = await listUser(params); - userList.value = res.rows; + const res = await getUserList({} as any); + userList.value = res.data; } catch (e) { userList.value = []; } }; +/** 加载部门列表 */ +const loadDeptList = async () => { + try { + const res = await allListDept({ deptCategory: '03' } as any); + deptList.value = res.data || []; + } catch (e) { + deptList.value = []; + } +}; + /** 打开项目选择弹窗 */ const openProjectSelect = () => { if (routeParams.value.type === 'view' || routeParams.value.type === 'approval') { @@ -579,6 +605,7 @@ onMounted(async () => { nextTick(async () => { proxy?.$modal.loading('正在加载数据,请稍后...'); await loadUserList(); + await loadDeptList(); await loadFormData(); proxy?.$modal.closeLoading(); });