更新若干

This commit is contained in:
hero920103 committed 2026-11-17 17:16:02 +08:00
1 parent 54c90072fb
commit 5682069553
59 files changed
+3813 -1617

No files matched your search

+45
View File
@@ -22,6 +22,8 @@ const NATIVE_RULES = [
{ pattern: /\/apps\/erp\/finance\/payable/i, route: '/pages/erp/finance/bill?bill_type=2' },
{ pattern: /\/apps\/erp\/finance\/payment/i, route: '/pages/erp/finance/fund' },
{ pattern: /\/apps\/erp\/report/i, route: '/pages/erp/report/index' },
{ pattern: /\/apps\/crm\/project/i, route: '/pages/crm/project/index' },
{ pattern: /客户项目|项目管理|项目列表|crmProject/i, route: '/pages/crm/project/index' },
{ pattern: /记事本|笔记|便签|notebook/i, route: '/pages/tools/notepad/index' },
{ pattern: /账号管理|密码库|passwordStore|password-store/i, route: '/pages/tools/account/index' },
{ pattern: /提醒|reminder/i, route: '/pages/tools/schedule/reminder' },
@@ -40,6 +42,49 @@ const NATIVE_RULES = [
const WEBVIEW_PAGE = '/pages/apps/webview'
// 常用功能默认展示顺序(用户未自定义前按此顺序排列)
export const DEFAULT_QUICK_TITLES = [
'考勤打卡',
'报销管理',
'工作日程',
'通讯录',
'审批列表',
'文档库',
'工作日报'
]
// 常用功能标题对应的图标(菜单未配图标时兜底)
export const QUICK_TITLE_ICONS = {
'考勤打卡': 'alarm-clock',
'报销管理': 'receipt',
'工作日程': 'calendar-days',
'通讯录': 'address-book',
'审批列表': 'clipboard-check',
'文档库': 'folder-open',
'工作日报': 'book'
}
/**
* 按默认常用功能顺序排序,未命中的保持原有相对顺序
* @param {Array} list 菜单/应用列表
* @param {Array<string>} titles 优先顺序
*/
export function orderQuickMenus(list = [], titles = DEFAULT_QUICK_TITLES) {
const items = Array.isArray(list) ? list : []
const rank = new Map(titles.map((t, i) => [String(t).trim(), i]))
return items
.map((item, index) => ({ item, index }))
.sort((a, b) => {
const ta = a.item && (a.item.title || a.item.name)
const tb = b.item && (b.item.title || b.item.name)
const ra = rank.has(ta) ? rank.get(ta) : titles.length
const rb = rank.has(tb) ? rank.get(tb) : titles.length
if (ra !== rb) return ra - rb
return a.index - b.index
})
.map((entry) => entry.item)
}
export const WEB_RULES = [
'审批设置',
'审批流配置',