修改页数

This commit is contained in:
2025-12-24 16:37:58 +08:00
parent ad03f3f2db
commit b437a3c675

View File

@@ -124,9 +124,9 @@
</template> </template>
<template #action-area> <template #action-area>
<ElButton type="primary" @click="showWorkcaseDetail = true"> <ElButton type="primary" @click="handleWorkcaseAction">
<FileText :size="16" /> <FileText :size="16" />
查看工单 {{ currentWorkcaseId ? '查看工单' : '创建工单' }}
</ElButton> </ElButton>
</template> </template>
</ChatRoom> </ChatRoom>
@@ -154,6 +154,17 @@
> >
<WorkcaseDetail :workcase-id="currentWorkcaseId" /> <WorkcaseDetail :workcase-id="currentWorkcaseId" />
</ElDialog> </ElDialog>
<!-- 工单创建对话框 -->
<ElDialog
v-model="showWorkcaseCreator"
title="创建工单"
width="800px"
class="workcase-dialog"
>
<!-- TODO: 添加工单创建组件 -->
<div>工单创建表单</div>
</ElDialog>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@@ -205,7 +216,7 @@ const loadingMore = ref(false)
const autoFilling = ref(false) const autoFilling = ref(false)
// 分页状态 // 分页状态
const PAGE_SIZE = 5 const PAGE_SIZE = 20
const currentPage = ref(1) const currentPage = ref(1)
const hasMore = ref(true) const hasMore = ref(true)
@@ -239,6 +250,8 @@ const messages = ref<ChatRoomMessageVO[]>([])
// 工单详情对话框 // 工单详情对话框
const showWorkcaseDetail = ref(false) const showWorkcaseDetail = ref(false)
// 工单创建对话框
const showWorkcaseCreator = ref(false)
// Jitsi Meet会议相关 // Jitsi Meet会议相关
const currentMeetingUrl = ref('') const currentMeetingUrl = ref('')
@@ -480,6 +493,27 @@ const downloadFile = (fileId: string) => {
window.open(`${FILE_DOWNLOAD_URL}/${fileId}`, '_blank') window.open(`${FILE_DOWNLOAD_URL}/${fileId}`, '_blank')
} }
// 处理工单操作(创建或查看)
const handleWorkcaseAction = () => {
if (currentWorkcaseId.value) {
// 已有工单,查看详情
showWorkcaseDetail.value = true
} else {
// 无工单,创建新工单
showWorkcaseCreator.value = true
}
}
// 工单创建成功
const onWorkcaseCreated = (workcaseId: string) => {
showWorkcaseCreator.value = false
// 更新当前聊天室的工单ID
if (currentRoom.value) {
currentRoom.value.workcaseId = workcaseId
}
ElMessage.success('工单创建成功')
}
// 发起会议 // 发起会议
const startMeeting = async () => { const startMeeting = async () => {
if (!currentRoomId.value) return if (!currentRoomId.value) return