feat: 飞书群自动发现与可视化绑定
- FeishuService 新增 list_bot_chats() 拉取机器人所在的所有群(含群名、chat_id) - 新增 GET /api/tenants/feishu-groups 端点,返回群列表并标注每个群当前绑定的租户 - 租户编辑弹窗改为可视化群列表(checkbox 勾选绑定),替代手动填 chat_id - 已绑定其他租户的群显示为禁用状态,防止重复绑定 - 编辑租户时自动加载群列表 - 新建租户时可手动刷新群列表
This commit is contained in:
@@ -2266,11 +2266,12 @@
|
||||
<textarea class="form-control" id="tenant-desc-input" rows="2" placeholder="可选"></textarea>
|
||||
</div>
|
||||
<hr>
|
||||
<h6 class="text-muted">飞书群绑定</h6>
|
||||
<h6 class="text-muted">飞书群绑定 <button class="btn btn-outline-primary btn-sm ms-2" onclick="dashboard.loadFeishuGroups()"><i class="fas fa-sync-alt me-1"></i>刷新群列表</button></h6>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">绑定的飞书群 Chat ID(每行一个)</label>
|
||||
<textarea class="form-control" id="tenant-feishu-chatgroups" rows="3" placeholder="oc_xxxxxxxx oc_yyyyyyyy"></textarea>
|
||||
<div class="form-text">将飞书群绑定到此租户,机器人在该群收到消息时自动使用此租户的知识库。Chat ID 可从机器人日志中获取。</div>
|
||||
<div id="feishu-groups-list">
|
||||
<small class="text-muted">点击"刷新群列表"从飞书拉取机器人所在的群</small>
|
||||
</div>
|
||||
<input type="hidden" id="tenant-feishu-chatgroups">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
Reference in New Issue
Block a user