From e45cf7db0c9b1633d54c291769683b535e56b2cf Mon Sep 17 00:00:00 2001 From: qsh <> Date: Fri, 6 Jun 2025 11:15:05 +0800 Subject: [PATCH] sc --- src/permission.js | 4 +- src/views/OKR/Meeting/MeetingInfo.vue | 68 +++++++++++++++++---------- src/views/OKR/Meeting/index.vue | 37 ++++++++++----- 3 files changed, 72 insertions(+), 37 deletions(-) diff --git a/src/permission.js b/src/permission.js index 2eac4ef..5ded0f7 100644 --- a/src/permission.js +++ b/src/permission.js @@ -64,7 +64,9 @@ router.beforeEach(async (to, from, next) => { if (tenantId && appId) { next(`/login?tenantId=${tenantId}&appId=${appId}&redirect=${to.fullPath}`) // 否则全部重定向到登录页 } else { - next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 + // next(`/login?redirect=${to.fullPath}`) + // 否则全部重定向到平台登陆页 + window.location.href = 'https://cloud.ahduima.com/ss/login' } } } diff --git a/src/views/OKR/Meeting/MeetingInfo.vue b/src/views/OKR/Meeting/MeetingInfo.vue index 30c441f..d9f58c7 100644 --- a/src/views/OKR/Meeting/MeetingInfo.vue +++ b/src/views/OKR/Meeting/MeetingInfo.vue @@ -17,20 +17,23 @@ - + - + + + @@ -56,7 +59,7 @@ - + @@ -64,6 +67,7 @@ + @@ -146,8 +150,8 @@ const defaultProps = { const isDetail = route.query.isDetail -onMounted(() => { - getOptions() +onMounted(async () => { + await getOptions() if (route.params.id && route.params.id != 0) { // 这里可以调用API获取会议详情数据 getMeetingInfo(route.params.id) @@ -158,18 +162,31 @@ onMounted(() => { const peroidList = ref([]) function getOptions() { - // 获取OKR节点数据 - getAllNodeTree().then((resp) => { - peroidList.value = listToTree(resp?.tree || [], { - id: 'nodeId', - pid: 'parentId', - children: 'children' + return Promise.all([getAllNodeTree(), getEmployeeSimpleList()]) + .then(([okrResp, employeeResp]) => { + peroidList.value = listToTree(okrResp?.tree || [], { + id: 'nodeId', + pid: 'parentId', + children: 'children' + }) + userOptions.value = employeeResp.map((it) => ({ ...it, id: it.id + '' })) + // handleUserChange() + }) + .catch((error) => { + console.error('获取数据失败:', error) }) - }) - // 获取人员数据 - getEmployeeSimpleList().then((data) => { - userOptions.value = data.map((it) => ({ ...it, id: it.id + '' })) - }) + // // 获取OKR节点数据 + // getAllNodeTree().then((resp) => { + // peroidList.value = listToTree(resp?.tree || [], { + // id: 'nodeId', + // pid: 'parentId', + // children: 'children' + // }) + // }) + // // 获取人员数据 + // getEmployeeSimpleList().then((data) => { + // userOptions.value = data.map((it) => ({ ...it, id: it.id + '' })) + // }) } const form = ref({ @@ -258,6 +275,7 @@ async function submit() { message.error('预约会议时,会议内容不能为空') return } + form.value.actualUsers = [] // 新增会议 await MeetingApi.createMeeting(form.value) message.success('会议创建成功') diff --git a/src/views/OKR/Meeting/index.vue b/src/views/OKR/Meeting/index.vue index 81bebf6..9034ba5 100644 --- a/src/views/OKR/Meeting/index.vue +++ b/src/views/OKR/Meeting/index.vue @@ -3,10 +3,21 @@ - + - + @@ -20,6 +31,7 @@ value-format="YYYY-MM-DD" start-placeholder="会议时间" end-placeholder="会议时间" + @change="handleSearch" /> @@ -32,6 +44,7 @@ check-strictly placeholder="选择OKR节点" style="width: 300px" + clearable @change="handleSearch" /> @@ -43,13 +56,13 @@ - - - + + + - - + +