From ea069db412d4c5cf93dfc24fb4b3a07ecea8e669 Mon Sep 17 00:00:00 2001 From: yinq Date: Tue, 20 Jan 2026 15:27:21 +0800 Subject: [PATCH] =?UTF-8?q?1.0.54=20=E9=82=AE=E5=AF=84=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8=E3=80=81?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=83=A8=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/oa/crm/crmMailingApply/edit.vue | 35 ++++++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) 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(); });