feat: 2026-07-11 全量更新 - 代办集成+会议室预定+知识迭代修复+UI统一+Bug修复

== 已部署上线 (9项) ==
- 代办事项真实数据源集成 (企微审批API 8bug修复链)
- H5/坐席端 Logo样式统一+绿色背景
- 视频引导页修复 (localStorage key v2)
- 坐席端 v9 Vue版本修复 (ElMessage._context)
- 截图按钮 v10 修复 (getDisplayMedia user gesture)
- 扫码样式恢复+H5扫码登录跳转修复
- H5截图快捷键提示

== 代码完成待部署 (3项) ==
- 知识迭代3Bug修复 (#8 POST端点/#7 MERGE幂等/#6 过期检查)
- 会议室预定-小鱼易联终端 (40文件, 40/40测试通过)
- IT资产升级审批推送 (asset_service.py)

== 需求文档 (2项) ==
- 坐席端AI辅助消息框-PRD (4项新功能确认)
- 坐席端布局优化建议 v2.0 (7天计划)

== 新增文档 ==
- 日报-2026-07-11.md
- 知识迭代Bug修复报告-20260711.md
- 会议室预定-部署指南.md
- CHANGELOG.md 更新

== 测试 ==
- test_todo_integration.py: 40/40
- test_meetingroom.py: 40/40
- test_bugfix_ki_suggestions.py: 21/21
This commit is contained in:
Simon
2026-07-11 23:13:10 +08:00
parent 3d152fc8eb
commit bea288e414
928 changed files with 85169 additions and 54205 deletions
+67
View File
@@ -11,6 +11,8 @@ import type {
CreateSessionPayload,
ApprovalPayload,
TakeoverPayload,
InformationItem,
PausedSession,
} from '@/api/automation'
import {
createAutomationSession,
@@ -18,6 +20,10 @@ import {
getAutomationSession,
approveAutomationSession,
takeoverAutomationSession,
listPausedSessions,
agentResumeSession,
agentCloseSession,
getInfoItems,
} from '@/api/automation'
// --------------------------------------------------------------------------
@@ -45,6 +51,10 @@ export const useAutomationStore = defineStore('automation', () => {
const ws = ref<WebSocket | null>(null)
const wsSessionId = ref<string | null>(null)
const wsConnected = ref(false)
/** 暂停会话列表(复杂场景重构) */
const pausedSessions = ref<PausedSession[]>([])
/** 当前会话信息项列表(复杂场景重构) */
const infoItems = ref<InformationItem[]>([])
// ------------------------------------------------------------------------
// 计算属性
@@ -91,6 +101,25 @@ export const useAutomationStore = defineStore('automation', () => {
currentSession.value = await takeoverAutomationSession(sessionId, payload)
}
// ------------------------------------------------------------------------
// 复杂场景重构:暂停会话管理 / 信息项
// ------------------------------------------------------------------------
async function fetchPausedSessions(employeeId: string): Promise<void> {
pausedSessions.value = await listPausedSessions(employeeId)
}
async function agentResume(sessionId: string, note?: string): Promise<void> {
currentSession.value = await agentResumeSession(sessionId, { note })
}
async function agentClose(sessionId: string, note?: string): Promise<void> {
currentSession.value = await agentCloseSession(sessionId, { note })
}
async function fetchInfoItems(sessionId: string): Promise<void> {
infoItems.value = await getInfoItems(sessionId)
}
// ------------------------------------------------------------------------
// WebSocket
// ------------------------------------------------------------------------
@@ -146,6 +175,38 @@ export const useAutomationStore = defineStore('automation', () => {
fetchSession(wsSessionId.value)
}
break
// --- 复杂场景重构:新增 WS 事件 ---
case 'automation.paused':
// 会话暂停:刷新详情
if (wsSessionId.value) {
fetchSession(wsSessionId.value)
}
break
case 'automation.resumed':
// 会话恢复:刷新详情和信息项
if (wsSessionId.value) {
fetchSession(wsSessionId.value)
fetchInfoItems(wsSessionId.value)
}
break
case 'automation.info_corrected':
// 信息更正:刷新信息项
if (wsSessionId.value) {
fetchInfoItems(wsSessionId.value)
}
break
case 'automation.info_supplemented':
// 信息补充:刷新信息项
if (wsSessionId.value) {
fetchInfoItems(wsSessionId.value)
}
break
case 'automation.timeout_closed':
// 超时关闭:刷新详情
if (wsSessionId.value) {
fetchSession(wsSessionId.value)
}
break
default:
break
}
@@ -157,11 +218,17 @@ export const useAutomationStore = defineStore('automation', () => {
loading,
wsConnected,
pendingSessions,
pausedSessions,
infoItems,
fetchSessions,
fetchSession,
createSession,
approve,
takeover,
fetchPausedSessions,
agentResume,
agentClose,
fetchInfoItems,
connectWs,
disconnectWs,
}
+49 -11
View File
@@ -3,16 +3,17 @@
// =============================================================================
// 说明:管理坐席工作台的待办事项列表、当前选中的待办、加载状态
// 核心功能:
// 1. 获取待办列表
// 1. 获取待办列表(支持按类型筛选)
// 2. 选中待办事项(联动 conversationStore.workspaceView = 'task'
// 3. 更新待办状态
// 3. 手动刷新待办列表(跳过缓存)
// 4. 更新待办状态
// 数据来源:后端聚合企微审批 + ITSM 工单,无 mock fallback
// =============================================================================
import { defineStore } from 'pinia'
import { ref, computed } from 'vue'
import type { TodoItemData } from '@/api/todo'
import { getTodoItems, updateTodoStatus } from '@/api/todo'
import { mockTodoListData } from '@/mock/data'
import { getTodoItems, refreshTodoItems, updateTodoStatus } from '@/api/todo'
// --------------------------------------------------------------------------
// Store 定义
@@ -31,6 +32,9 @@ export const useTodoStore = defineStore('todo', () => {
/** 是否正在加载 */
const loading = ref<boolean>(false)
/** 当前筛选类型:all/approval/ticket */
const activeType = ref<'all' | 'approval' | 'ticket'>('all')
// ==========================================================================
// 计算属性
// ==========================================================================
@@ -56,25 +60,56 @@ export const useTodoStore = defineStore('todo', () => {
/**
* 获取待办列表
* 调用后端 API 获取当前坐席的待办事项
* 调用后端 API 获取当前坐席的待办事项,按 activeType 筛选
* API 失败时显示空列表 + 错误日志,不回退 mock 数据
*/
async function fetchTodoList(): Promise<void> {
try {
loading.value = true
const data = await getTodoItems()
const params = activeType.value !== 'all'
? { type: activeType.value as 'ticket' | 'approval' }
: undefined
const data = await getTodoItems(params)
todoList.value = data.items
} catch (error) {
console.error('获取待办列表失败:', error)
// 使用 mock 数据作为 fallback(开发/演示用)
if (import.meta.env.DEV) {
console.warn('[Mock] 使用模拟待办数据')
todoList.value = mockTodoListData.items
}
// 不回退 mock 数据,直接清空列表
todoList.value = []
} finally {
loading.value = false
}
}
/**
* 强制刷新待办列表(跳过后端缓存)
* 通过 refreshTodoItems 传递 _force=1 参数,后端跳过 Redis 缓存重新查询
*/
async function refreshList(): Promise<void> {
try {
loading.value = true
const params = activeType.value !== 'all'
? { type: activeType.value as 'ticket' | 'approval' }
: undefined
const data = await refreshTodoItems(params)
todoList.value = data.items
} catch (error) {
console.error('刷新待办列表失败:', error)
todoList.value = []
} finally {
loading.value = false
}
}
/**
* 切换筛选类型并刷新列表
*
* @param type - 筛选类型:all/approval/ticket
*/
async function setActiveType(type: 'all' | 'approval' | 'ticket'): Promise<void> {
activeType.value = type
await fetchTodoList()
}
/**
* 选中待办事项
* 设置 currentTodoItem,并触发 workspaceView 切换为 'task'
@@ -109,6 +144,7 @@ export const useTodoStore = defineStore('todo', () => {
todoList,
currentTodoItem,
loading,
activeType,
// 计算属性
urgentCount,
@@ -117,6 +153,8 @@ export const useTodoStore = defineStore('todo', () => {
// 方法
fetchTodoList,
refreshList,
setActiveType,
selectTodoItem,
updateTodoItemStatus,
}