59 lines
2.1 KiB
Markdown
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.

---
id: report.share.howto
title: 把报告分享到对话
type: howto
feature: report
scope: end-user
locale: zh
aliases:
- 报告转发
- 分享报告到群
- 发到聊天里
- 报告链接发给同事
- 群里发周报
related_tools: []
related_pages: []
prerequisites:
- 必须是报告的提交人或接收人才能分享(其他人无权生成链接)
negative:
- 单次批量分享上限 20 条超过会报「最多只能操作20条数据」
- 分享消息一旦发出无法撤回链接本身(消息可撤回,但其他人若已点开过链接,仍可后续凭 code 访问)
- 没有「私密 / 加密分享」选项,链接只要在手只要访问就能看到内容
last_verified: v1.7.90
---
# 把报告分享到对话
## 入口
- 桌面端:报告详情页右上角操作菜单「分享到对话」
- 桌面端:「我发送的」/「我收到的」列表行右侧「分享」按钮
- 移动端:详情页底部操作栏「分享」
## 操作步骤
1. 选中一条或多条报告(多选最多 20 条)
2. 弹窗中选择目标对话 / 成员(可同时选多个对话 + 多个成员)
3. 可填「转发留言」附在分享消息后
4. 点「发送」
## 分享后效果
- 在目标对话生成一条消息,内容是带 `mention report` 类样式的链接,文本为 `%{报告标题}`
- 单条报告:消息为段落格式
- 多条报告:消息为有序列表格式
- 接收方点击链接 → 跳转 `single/report/detail/<code>` 独立页
## 链接如何生成
后端调 `ReportLink::generateLink(rid, userid)`
- 已有对应 (rid, userid) 链接则复用
- 否则生成 `code = base64(rid,userid,随机串)`
- 链接以 `single/report/detail/<code>` 的形式访问
详细的链接概念见 [[report.link.concept]]。
## 权限校验
分享接口本身没有「能否分享」的额外校验,但底层 `generateLink` 会拒绝既非提交人也非接收人的请求。
## 不支持
- 不支持一次分享超过 20 条
- 不支持分享给企业外用户(链接虽是 URL 但需登录访问)
- 不支持撤回已发链接的访问权(除非删除整份报告)