temp jitsi
This commit is contained in:
@@ -148,6 +148,16 @@
|
||||
<el-button type="primary" @click="createTicket">创建</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 工单详情弹窗 -->
|
||||
<el-dialog v-model="showDetailDialog" title="工单详情" width="900px" destroy-on-close>
|
||||
<WorkcaseDetail
|
||||
v-if="showDetailDialog"
|
||||
:workcase="currentWorkcase"
|
||||
mode="view"
|
||||
@cancel="showDetailDialog = false"
|
||||
/>
|
||||
</el-dialog>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
|
||||
@@ -157,8 +167,9 @@ import AdminLayout from '@/views/admin/AdminLayout.vue'
|
||||
import { Plus, Search } from 'lucide-vue-next'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { workcaseAPI } from '@/api/workcase'
|
||||
import WorkcaseDetail from '@/views/public/workcase/WorkcaseDetail/WorkcaseDetail.vue'
|
||||
import type { TbWorkcaseDTO, TbWorkcaseProcessDTO } from '@/types/workcase'
|
||||
import type { PageRequest, PageParam, ResultDomain } from 'shared/types'
|
||||
import type { PageRequest, PageParam } from 'shared/types'
|
||||
|
||||
const statusFilter = ref('all')
|
||||
const typeFilter = ref('')
|
||||
@@ -168,11 +179,11 @@ const currentPage = ref(1)
|
||||
const pageSize = ref(10)
|
||||
const total = ref(0)
|
||||
const showCreateDialog = ref(false)
|
||||
const showDetailDialog = ref(false)
|
||||
const currentWorkcase = ref<TbWorkcaseDTO>({})
|
||||
const loading = ref(false)
|
||||
|
||||
const formData = ref<TbWorkcaseDTO>({
|
||||
roomId: '',
|
||||
deviceNamePlateImg: '',
|
||||
username: '',
|
||||
phone: '',
|
||||
device: '',
|
||||
@@ -215,7 +226,7 @@ const loadWorkcases = async () => {
|
||||
const res = await workcaseAPI.getWorkcasePage(pageRequest)
|
||||
if (res.success) {
|
||||
workcaseList.value = res.dataList || res.pageDomain?.dataList || []
|
||||
total.value = res.pageParam?.totalElements || 0
|
||||
total.value = res.pageDomain?.pageParam?.total || 0
|
||||
} else {
|
||||
ElMessage.error(res.message || '加载失败')
|
||||
}
|
||||
@@ -365,8 +376,8 @@ const handlePageChange = (page: number) => {
|
||||
}
|
||||
|
||||
const viewDetail = (row: TbWorkcaseDTO) => {
|
||||
ElMessage.info(`查看工单详情: ${row.workcaseId}`)
|
||||
// TODO: 跳转到工单详情页面
|
||||
currentWorkcase.value = { ...row }
|
||||
showDetailDialog.value = true
|
||||
}
|
||||
|
||||
const assignTicket = (row: TbWorkcaseDTO) => {
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<div class="table-label">铭牌照片</div>
|
||||
<div class="table-value table-value-full">
|
||||
<div class="nameplate-photo" @click="previewNameplateImage">
|
||||
<img :src="formData.deviceNamePlateImg" alt="设备铭牌" />
|
||||
<img :src="getImageUrl(formData.deviceNamePlateImg)" alt="设备铭牌" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -132,7 +132,7 @@
|
||||
</div>
|
||||
<div class="photos-grid">
|
||||
<div v-for="(img, index) in formData.imgs" :key="index" class="photo-item">
|
||||
<img :src="img" alt="故障照片" />
|
||||
<img :src="getImageUrl(img)" alt="故障照片" />
|
||||
</div>
|
||||
<div v-if="mode !== 'view'" class="photo-upload">
|
||||
<Plus :size="32" />
|
||||
@@ -185,6 +185,7 @@ import { ChatMessage } from '@/views/public/ChatRoom/'
|
||||
import { ElButton, ElInput, ElSelect, ElOption, ElDialog, ElMessage } from 'element-plus'
|
||||
import { MessageSquare, ImageIcon as ImageIcon, Plus } from 'lucide-vue-next'
|
||||
import type { TbWorkcaseDTO } from '@/types/workcase/workcase'
|
||||
import { FILE_DOWNLOAD_URL } from '@/config'
|
||||
|
||||
interface TimelineItem {
|
||||
status: 'system' | 'manager' | 'engineer'
|
||||
@@ -225,6 +226,14 @@ const timeline = ref<TimelineItem[]>([
|
||||
}
|
||||
])
|
||||
|
||||
function getImageUrl(fileId: string): string {
|
||||
if (!fileId) return ''
|
||||
if (fileId.startsWith('http://') || fileId.startsWith('https://')) {
|
||||
return fileId
|
||||
}
|
||||
return `${FILE_DOWNLOAD_URL}${fileId}`
|
||||
}
|
||||
|
||||
// 根据 workcaseId 获取聊天室ID
|
||||
const loadChatRoom = async () => {
|
||||
if (!formData.value.workcaseId) return
|
||||
|
||||
Reference in New Issue
Block a user