Files
2026-08-20 17:53:59 +08:00

191 lines
4.4 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 淡雅配色方案(马卡龙色系)
export const pastelColors = [
'#7eb6ff', // 淡蓝
'#ffb787', // 淡橙
'#8fd6a8', // 淡绿
'#b99bf8', // 淡紫
'#ff8fa3', // 淡粉
'#80deea', // 青色
'#ffd56b', // 淡黄
]
// 默认应用配置
export const defaultApps = [{
name: '点口管理',
icon: 'diankouguanli',
menuId: '3ACE25CE-C5CE-4CEC-AD27-0D5CF1DF2F01',
path: "/pipe/diankou/list",
prefix: 'nbd-icon',
selected: false
},
{
name: '试压管理',
icon: 'shiyabao',
menuId: '55976B16-2C33-406E-B514-2FE42D031071',
path: '/pipe/pressure/index',
prefix: 'nbd-icon',
selected: false
},
{
name: '包装管理',
icon: 'baozhuangguanli',
menuId: "25DED954-10C9-47CC-99F2-C44FDE9E0A81",
path: "/pipe/packaging/list",
prefix: 'nbd-icon',
selected: false
},
{
name: '发货管理',
icon: 'a-facheguanli',
menuId: "EEC0D060-C15E-4D25-B015-C2B91F735DAC",
path: "/pipe/deliver/list",
prefix: 'nbd-icon',
selected: false
},
{
name: '预制组件管理',
icon: 'yuzhijian',
menuId: "8255554C-0A92-4C7B-BF19-779AF0220A8C",
path: "/pipe/precast/list",
prefix: 'nbd-icon',
selected: false
},
{
name: '下料抽检',
icon: 'xialiaochoujianjilu',
menuId: "",
path: "/scanpages/hj/weld_joint_search?target=%2Fscanpages%2Fhj%2Fmaterial_sampling&title=%E4%B8%8B%E6%96%99%E6%8A%BD%E6%A3%80",
funcKey: 'sampling',
prefix: 'nbd-icon',
selected: false
},
{
name: '组对抽查',
icon: 'zudui',
menuId: "",
path: "/scanpages/hj/weld_joint_search?target=%2Fscanpages%2Fhj%2Fmake_right&title=%E7%BB%84%E5%AF%B9%E6%8A%BD%E6%9F%A5",
funcKey: 'makeRight',
prefix: 'nbd-icon',
selected: false
},
{
name: '防腐处理',
icon: 'chuxiufangfu',
menuId: "",
path: "/scanpages/hj/do_anti_rust",
isScan: true,
funcKey: 'antiRust',
prefix: 'nbd-icon',
selected: false
},
{
name: '日报审核',
icon: 'daiban',
menuId: "",
path: "/scanpages/hj/daily_audit",
funcKey: 'dailyAudit',
prefix: 'nbd-icon',
selected: false
},
{
name: '焊缝检测',
icon: 'search',
menuId: "",
path: "/scanpages/hj/weld_joint_search?target=%2Fscanpages%2Fhj%2Fweld_appearance&title=%E7%84%8A%E7%BC%9D%E6%A3%80%E6%B5%8B",
prefix: 'uicon',
selected: false
},
{
name: '条码查询',
icon: 'saoyisao',
menuId: '',
path: '/scanpages/hj/barcode_search',
prefix: 'nbd-icon',
selected: false
},
{
name: '焊接任务单',
icon: 'daiban',
menuId: '',
path: '/scanpages/hj/weld_task_list',
prefix: 'nbd-icon',
selected: false
}
]
// 数据权限:view 可查看 / edit 可编辑
const VIEW = 'view'
const EDIT = 'edit'
// 扫码类功能:sampling 下料 / makeRight 组对 / antiRust 防腐 / dailyPaper 日报
// 扩展:dailyAudit 日报审核
const ALL_VIEW = {
sampling: VIEW,
makeRight: VIEW,
antiRust: VIEW,
dailyPaper: VIEW,
dailyAudit: VIEW,
}
const ALL_EDIT = {
sampling: EDIT,
makeRight: EDIT,
antiRust: EDIT,
dailyPaper: EDIT,
dailyAudit: EDIT,
}
// 岗位权限,仅按 WorkPostName 硬编码(来源:岗位权限表)
// value 为 { [funcKey]: 'view'|'edit' };WorkPostName 为空时仅可查看;未列出的岗位名不限制
// pipe 管理类应用(无 funcKey)不按岗位拦截,由后端 menuId 控制
export const postMenuPermissions = {
// —— 全部菜单 · 可查看 ——
'项目经理': ALL_VIEW,
'项目总工': ALL_VIEW,
'控制经理': ALL_VIEW,
'安环经理': ALL_VIEW,
'材料部长': ALL_VIEW,
// '防腐工程师': ALL_VIEW,
'费控工程师': ALL_VIEW,
'物流工程师': ALL_VIEW,
'包装工程师': ALL_VIEW,
'材料员': ALL_VIEW,
'资料员': ALL_VIEW,
// —— 全部菜单 · 可编辑 ——
'质量经理': ALL_EDIT,
'管道工程师': ALL_EDIT,
'项目信息员': ALL_EDIT,
'技术员': ALL_EDIT,
'质量员': ALL_EDIT,
'施工员': ALL_EDIT,
// —— 现场工种(细粒度)——
'焊工': {
sampling: VIEW,
makeRight: VIEW,
dailyPaper: EDIT,
},
'管工': {
sampling: EDIT,
makeRight: EDIT,
antiRust: VIEW,
dailyPaper: VIEW,
},
'防腐工': {
antiRust: EDIT,
},
'防腐工程师': {
antiRust: EDIT,
},
'无损检测工': {
dailyPaper: VIEW,
},
}
// 扫码类页面路径 → 功能 key(用于扫码跳转前的岗位权限校验)
export const scanPathFuncKeyMap = {
'/scanpages/hj/material_sampling': 'sampling',
'/scanpages/hj/make_right': 'makeRight',
'/scanpages/hj/do_anti_rust': 'antiRust',
'/scanpages/hj/daily_paper': 'dailyPaper',
'/scanpages/hj/daily_audit': 'dailyAudit',
}