feat: 新增IM即时通讯(浮窗)、工作流、打印模块及工作台增强
- IM: 新增浮窗聊天(ImFloatWindow)、管理页(monitor/config/service/message)、SSE推送 - 工作流: 新增待办/我的流程页面及后端服务 - 打印: 新增打印模板、出库单打印(PrintPage)、模板种子脚本 - 工作台: 增强快捷入口与工作台数据 - 修复: TagsView页签关闭、CrudPage通用表格增强 - 移除导航菜单中的即时通讯入口,改为右下角浮窗
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* openprint 外部打印页配置
|
||||
* - VITE_OPENPRINT_URL:openprint 应用地址(默认本机 5227)
|
||||
* - VITE_PRINT_API_BASE:后端 API 根地址(openprint 打印页直连取模板/数据,默认本机 5136)
|
||||
* 生产环境建议用环境变量指向实际地址,如 http://192.168.1.10:5136
|
||||
*/
|
||||
export const OPENPRINT_URL =
|
||||
import.meta.env.VITE_OPENPRINT_URL || 'http://localhost:5227'
|
||||
|
||||
export const PRINT_API_BASE =
|
||||
import.meta.env.VITE_PRINT_API_BASE || 'http://localhost:5136'
|
||||
|
||||
/** 由查询参数构造 openprint 打印页 URL */
|
||||
export function buildPrintUrl({ template, table, row, token, api = PRINT_API_BASE, data }) {
|
||||
const q = new URLSearchParams({ print: '1', template })
|
||||
if (table) q.set('table', table)
|
||||
if (row) q.set('row', row)
|
||||
if (token) q.set('token', token)
|
||||
if (api) q.set('api', api)
|
||||
if (data) q.set('data', data)
|
||||
return `${OPENPRINT_URL}/?${q.toString()}`
|
||||
}
|
||||
@@ -124,8 +124,8 @@ export function resolveTable(component) {
|
||||
return `${mod}_${pascal}`
|
||||
}
|
||||
|
||||
/** 特殊页面:不经过通用 CRUD(如工作台、看板) */
|
||||
export const SPECIAL_PAGES = new Set(['WorkBench/index'])
|
||||
/** 特殊页面:不经过通用 CRUD(如工作台、看板、工作流、IM) */
|
||||
export const SPECIAL_PAGES = new Set(['WorkBench/index', 'WorkFlow/todo', 'WorkFlow/my', 'Im/monitor', 'Im/service', 'Im/config', 'Im/message'])
|
||||
|
||||
/**
|
||||
* 详情页映射:component → 详情页路由(:id 占位替换)
|
||||
@@ -139,3 +139,30 @@ export const DETAIL_MAP = {
|
||||
export function resolveDetail(component) {
|
||||
return component ? DETAIL_MAP[component] || null : null
|
||||
}
|
||||
|
||||
/**
|
||||
* 打印模板映射:component → 模板名称(对应 RepCenter_ReportDesign.Name)
|
||||
* 配置后,通用 CRUD 列表操作列会显示"打印"按钮
|
||||
*/
|
||||
export const PRINT_MAP = {
|
||||
'RawMaterial/outstock': { templateName: '三等分原料出库单', title: '原料出库单' }
|
||||
}
|
||||
|
||||
/** 根据 component 解析打印模板配置(无则返回 null) */
|
||||
export function resolvePrint(component) {
|
||||
return component ? PRINT_MAP[component] || null : null
|
||||
}
|
||||
|
||||
/**
|
||||
* 工作流映射:component → 业务类型(BizType)
|
||||
* 配置后,通用 CRUD 列表操作列会显示"审批"按钮(发起审批流程)
|
||||
*/
|
||||
export const WORKFLOW_MAP = {
|
||||
'RawMaterial/outstock': 'RawMaterial_OutStock'
|
||||
}
|
||||
|
||||
/** 根据 component 解析工作流配置(无则返回 null) */
|
||||
export function resolveWorkflow(component) {
|
||||
if (!component || !WORKFLOW_MAP[component]) return null
|
||||
return { bizType: WORKFLOW_MAP[component] }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user