暂存
This commit is contained in:
@@ -92,8 +92,6 @@
|
||||
:room-id="currentRoomId"
|
||||
:workcase-id="currentWorkcaseId"
|
||||
:room-name="currentRoom?.roomName"
|
||||
:meeting-url="currentMeetingUrl"
|
||||
:show-meeting="showMeetingIframe"
|
||||
:file-download-url="FILE_DOWNLOAD_URL"
|
||||
:has-more="hasMore"
|
||||
:loading-more="loadingMore"
|
||||
@@ -145,8 +143,13 @@
|
||||
title="工单详情"
|
||||
width="800px"
|
||||
class="workcase-dialog"
|
||||
destroy-on-close
|
||||
>
|
||||
<WorkcaseDetail :workcase-id="currentWorkcaseId" />
|
||||
<WorkcaseDetail
|
||||
mode="view"
|
||||
:workcase-id="currentWorkcaseId"
|
||||
@cancel="showWorkcaseDetail = false"
|
||||
/>
|
||||
</ElDialog>
|
||||
|
||||
<!-- 工单创建对话框 -->
|
||||
@@ -155,9 +158,14 @@
|
||||
title="创建工单"
|
||||
width="800px"
|
||||
class="workcase-dialog"
|
||||
destroy-on-close
|
||||
>
|
||||
<!-- TODO: 添加工单创建组件 -->
|
||||
<div>工单创建表单</div>
|
||||
<WorkcaseDetail
|
||||
mode="create"
|
||||
:room-id="currentRoomId!"
|
||||
@cancel="showWorkcaseCreator = false"
|
||||
@created="onWorkcaseCreated"
|
||||
/>
|
||||
</ElDialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -247,11 +255,6 @@ const showWorkcaseDetail = ref(false)
|
||||
// 工单创建对话框
|
||||
const showWorkcaseCreator = ref(false)
|
||||
|
||||
// Jitsi Meet会议相关
|
||||
const currentMeetingUrl = ref('')
|
||||
const showMeetingIframe = ref(false)
|
||||
const currentMeetingId = ref<string | null>(null)
|
||||
|
||||
// ChatRoom组件引用
|
||||
const chatRoomRef = ref<InstanceType<typeof ChatRoom> | null>(null)
|
||||
|
||||
@@ -508,13 +511,15 @@ const onWorkcaseCreated = (workcaseId: string) => {
|
||||
if (currentRoom.value) {
|
||||
currentRoom.value.workcaseId = workcaseId
|
||||
}
|
||||
// 刷新聊天室列表
|
||||
fetchChatRooms()
|
||||
ElMessage.success('工单创建成功')
|
||||
}
|
||||
|
||||
// 发起会议
|
||||
const startMeeting = async () => {
|
||||
if (!currentRoomId.value) return
|
||||
|
||||
|
||||
try {
|
||||
// 先检查是否有活跃会议
|
||||
const activeResult = await workcaseChatAPI.getActiveMeeting(currentRoomId.value)
|
||||
@@ -523,31 +528,33 @@ const startMeeting = async () => {
|
||||
currentMeetingId.value = activeResult.data.meetingId!
|
||||
const joinResult = await workcaseChatAPI.joinVideoMeeting(currentMeetingId.value!)
|
||||
if (joinResult.success && joinResult.data?.iframeUrl) {
|
||||
currentMeetingUrl.value = joinResult.data.iframeUrl
|
||||
showMeetingIframe.value = true
|
||||
// 使用router跳转到JitsiMeetingView页面,附加roomId参数用于返回
|
||||
const meetingUrl = joinResult.data.iframeUrl + `&roomId=${currentRoomId.value}`
|
||||
router.push(meetingUrl)
|
||||
} else {
|
||||
ElMessage.error(joinResult.message || '加入会议失败')
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
// 没有活跃会议,创建新会议
|
||||
const createResult = await workcaseChatAPI.createVideoMeeting({
|
||||
roomId: currentRoomId.value,
|
||||
meetingName: currentRoom.value?.roomName || '视频会议'
|
||||
})
|
||||
|
||||
|
||||
if (createResult.success && createResult.data) {
|
||||
currentMeetingId.value = createResult.data.meetingId!
|
||||
|
||||
|
||||
// 开始会议
|
||||
await workcaseChatAPI.startVideoMeeting(currentMeetingId.value!)
|
||||
|
||||
// 加入会议获取iframe URL
|
||||
|
||||
// 加入会议获取会议页面URL
|
||||
const joinResult = await workcaseChatAPI.joinVideoMeeting(currentMeetingId.value!)
|
||||
if (joinResult.success && joinResult.data?.iframeUrl) {
|
||||
currentMeetingUrl.value = joinResult.data.iframeUrl
|
||||
showMeetingIframe.value = true
|
||||
// 使用router跳转到JitsiMeetingView页面,附加roomId参数用于返回
|
||||
const meetingUrl = joinResult.data.iframeUrl + `&roomId=${currentRoomId.value}`
|
||||
router.push(meetingUrl)
|
||||
ElMessage.success('会议已创建')
|
||||
} else {
|
||||
ElMessage.error(joinResult.message || '获取会议链接失败')
|
||||
|
||||
Reference in New Issue
Block a user