feat: 支持评估版本隔离的报告、匹配及PDF导出功能
新增revisionId参数到路由、服务及导出接口,实现不同评估版本的隔离访问。删除已废弃的需求相关服务文件,移除取消采集的融资金额、期限和用途字段,更新相关页面提示文本。同时更新文档,说明评估版本、最新资料及产品展示规则的调整,支持前台正常业务名称显示,去除环境标签。
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// 登录返回只允许助手路由与编号;拒绝任意returnUrl,重新登录后仍由服务端校验归属。
|
||||
export function assistantReturnPath(assessmentId: string, productIds: string, chatId: string, from: string): string {
|
||||
export function assistantReturnPath(assessmentId: string, productIds: string, chatId: string, from: string, revisionId: string = ''): string {
|
||||
const valid = (id: string): boolean => /^[1-9][0-9]{0,9}$/.test(id)
|
||||
if ((assessmentId.length > 0 && !valid(assessmentId)) || (chatId.length > 0 && !valid(chatId))) return ''
|
||||
const ids = productIds.length == 0 ? [] as string[] : productIds.split(',')
|
||||
@@ -7,5 +7,6 @@ export function assistantReturnPath(assessmentId: string, productIds: string, ch
|
||||
const seen: string[] = []
|
||||
for (let i = 0; i < ids.length; i++) { if (!valid(ids[i]) || seen.includes(ids[i])) return ''; seen.push(ids[i]) }
|
||||
if (!['','matches','product','compare','report','next-step','archive'].includes(from)) return ''
|
||||
return '/packages/finance/assistant/assistant?from=' + from + (assessmentId.length > 0 ? '&assessmentId=' + assessmentId + '&productIds=' + productIds : '') + (chatId.length > 0 ? '&chatId=' + chatId : '')
|
||||
if (revisionId.length > 0 && !/^[1-9][0-9]{0,9}$/.test(revisionId)) return ''
|
||||
return '/packages/finance/assistant/assistant?from=' + from + (assessmentId.length > 0 ? '&assessmentId=' + assessmentId + '&productIds=' + productIds : '') + (chatId.length > 0 ? '&chatId=' + chatId : '') + (revisionId.length > 0 ? '&revisionId=' + revisionId : '')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user