fix: 企业微信登录提示和隐藏立账凭证页面
This commit is contained in:
1 parent
4587b56900
commit
4fa947c8d7
15 files changed
+20
-748
No files matched your search
@@ -59,7 +59,7 @@ export const workspaceRoutes: RouteRecordRaw[] = [
|
||||
path: 'accounting-voucher-check',
|
||||
name: 'workspace-accounting-voucher-check',
|
||||
component: () => import('@/features/workspace/pages/AccountingVoucherCheckPage.vue'),
|
||||
meta: { title: 'workspace.nav.accountingVoucherCheck' },
|
||||
meta: { title: 'workspace.nav.accountingVoucherCheck', requiresAdmin: true },
|
||||
},
|
||||
{
|
||||
path: 'feedback',
|
||||
|
||||
@@ -35,6 +35,10 @@ const secondaryLinkItems = [
|
||||
{ path: WORKSPACE_PATHS.updates, labelKey: 'workspace.nav.updates', icon: Megaphone, match: ['workspace-updates'] },
|
||||
] as const;
|
||||
|
||||
const visibleLinkItems = computed(() => linkItems.filter((item) => (
|
||||
item.match[0] !== 'workspace-accounting-voucher-check' || String(ws.currentUser?.role || '').toLowerCase() === 'admin'
|
||||
)));
|
||||
|
||||
function isActive(match: readonly string[]) {
|
||||
return match.includes(String(route.name || ''));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
/**
|
||||
* features/workspace/composables/useWorkspaceNavigation.ts
|
||||
* 子路由导航、移动端 Tab、聊天跳转、企微 deeplink 与旧 view 参数兼容。
|
||||
* 用途:子路由导航、移动端 Tab、聊天跳转、企微 deeplink 与旧 view 参数兼容。
|
||||
* 依赖:vue-router、config、auth、requestJson、workspace routes/types。
|
||||
* 逻辑:由 useWorkspace 注入;知识库与立账凭证检核均按管理员权限控制入口和路由访问。
|
||||
*/
|
||||
import { computed, nextTick, ref, watch, type ComputedRef, type Ref } from 'vue';
|
||||
import { config } from '@/config';
|
||||
@@ -180,6 +182,9 @@ export function useWorkspaceNavigation(deps: WorkspaceDeps, options: NavigationO
|
||||
showKnowledgeBaseAccessDenied();
|
||||
await router.replace(WORKSPACE_PATHS.applications);
|
||||
}
|
||||
if (name === 'workspace-accounting-voucher-check' && !hasKnowledgeBaseAccess.value) {
|
||||
await router.replace(WORKSPACE_PATHS.applications);
|
||||
}
|
||||
if (name === 'workspace-feedback') {
|
||||
showGeneralFeedbackDialog.value = true;
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
"retryLogin": "Please close this dialog and sign in again."
|
||||
},
|
||||
"wecomLogin": "Login with WeCom",
|
||||
"wecomComingSoon": "WeCom login is under development. Please stay tuned.",
|
||||
"wecomConnecting": "Connecting to WeCom...",
|
||||
"wecomStartFailed": "Failed to start WeCom login",
|
||||
"wecomInvalidState": "Invalid WeCom login state",
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
"retryLogin": "กรุณาปิดหน้าต่างนี้แล้วเข้าสู่ระบบใหม่"
|
||||
},
|
||||
"wecomLogin": "เข้าสู่ระบบด้วย WeCom",
|
||||
"wecomComingSoon": "ฟีเจอร์เข้าสู่ระบบด้วย WeCom กำลังอยู่ระหว่างการพัฒนา โปรดติดตามเร็ว ๆ นี้",
|
||||
"wecomConnecting": "กำลังเชื่อมต่อ WeCom...",
|
||||
"wecomStartFailed": "เริ่มต้นการเข้าสู่ระบบด้วย WeCom ไม่สำเร็จ",
|
||||
"wecomInvalidState": "สถานะการเข้าสู่ระบบ WeCom ไม่ถูกต้อง",
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
"retryLogin": "请关闭此窗口后重新登录。"
|
||||
},
|
||||
"wecomLogin": "企业微信登录",
|
||||
"wecomComingSoon": "企业微信登录功能正在开发中,敬请期待",
|
||||
"wecomConnecting": "正在连接企业微信...",
|
||||
"wecomStartFailed": "启动企业微信登录失败",
|
||||
"wecomInvalidState": "企业微信登录状态无效",
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
"retryLogin": "請關閉此窗口後重新登入。"
|
||||
},
|
||||
"wecomLogin": "企業微信登錄",
|
||||
"wecomComingSoon": "企業微信登入功能正在開發中,敬請期待",
|
||||
"wecomConnecting": "正在連接企業微信...",
|
||||
"wecomStartFailed": "啟動企業微信登錄失敗",
|
||||
"wecomInvalidState": "企業微信登入狀態無效",
|
||||
|
||||
Reference in new issue
Block a user