Compare commits
No commits in common. "e3f2346d66e7ffb727a589a1b65d250f154535b5" and "19a6c89b76a8c3f55426e64cd950e40ac5c6460e" have entirely different histories.
e3f2346d66
...
19a6c89b76
1
.gitignore
vendored
1
.gitignore
vendored
@ -25,4 +25,3 @@ makefile
|
|||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
components.d.ts
|
components.d.ts
|
||||||
auto-imports.d.ts
|
|
||||||
|
75
auto-imports.d.ts
vendored
Normal file
75
auto-imports.d.ts
vendored
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
/* prettier-ignore */
|
||||||
|
// @ts-nocheck
|
||||||
|
// noinspection JSUnusedGlobalSymbols
|
||||||
|
// Generated by unplugin-auto-import
|
||||||
|
// biome-ignore lint: disable
|
||||||
|
export {}
|
||||||
|
declare global {
|
||||||
|
const EffectScope: typeof import('vue')['EffectScope']
|
||||||
|
const computed: typeof import('vue')['computed']
|
||||||
|
const createApp: typeof import('vue')['createApp']
|
||||||
|
const customRef: typeof import('vue')['customRef']
|
||||||
|
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
||||||
|
const defineComponent: typeof import('vue')['defineComponent']
|
||||||
|
const effectScope: typeof import('vue')['effectScope']
|
||||||
|
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
||||||
|
const getCurrentScope: typeof import('vue')['getCurrentScope']
|
||||||
|
const h: typeof import('vue')['h']
|
||||||
|
const inject: typeof import('vue')['inject']
|
||||||
|
const isProxy: typeof import('vue')['isProxy']
|
||||||
|
const isReactive: typeof import('vue')['isReactive']
|
||||||
|
const isReadonly: typeof import('vue')['isReadonly']
|
||||||
|
const isRef: typeof import('vue')['isRef']
|
||||||
|
const markRaw: typeof import('vue')['markRaw']
|
||||||
|
const nextTick: typeof import('vue')['nextTick']
|
||||||
|
const onActivated: typeof import('vue')['onActivated']
|
||||||
|
const onBeforeMount: typeof import('vue')['onBeforeMount']
|
||||||
|
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
|
||||||
|
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
|
||||||
|
const onDeactivated: typeof import('vue')['onDeactivated']
|
||||||
|
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
|
||||||
|
const onMounted: typeof import('vue')['onMounted']
|
||||||
|
const onRenderTracked: typeof import('vue')['onRenderTracked']
|
||||||
|
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
|
||||||
|
const onScopeDispose: typeof import('vue')['onScopeDispose']
|
||||||
|
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
|
||||||
|
const onUnmounted: typeof import('vue')['onUnmounted']
|
||||||
|
const onUpdated: typeof import('vue')['onUpdated']
|
||||||
|
const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
|
||||||
|
const provide: typeof import('vue')['provide']
|
||||||
|
const reactive: typeof import('vue')['reactive']
|
||||||
|
const readonly: typeof import('vue')['readonly']
|
||||||
|
const ref: typeof import('vue')['ref']
|
||||||
|
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||||
|
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||||
|
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
||||||
|
const shallowRef: typeof import('vue')['shallowRef']
|
||||||
|
const toRaw: typeof import('vue')['toRaw']
|
||||||
|
const toRef: typeof import('vue')['toRef']
|
||||||
|
const toRefs: typeof import('vue')['toRefs']
|
||||||
|
const toValue: typeof import('vue')['toValue']
|
||||||
|
const triggerRef: typeof import('vue')['triggerRef']
|
||||||
|
const unref: typeof import('vue')['unref']
|
||||||
|
const useAttrs: typeof import('vue')['useAttrs']
|
||||||
|
const useCssModule: typeof import('vue')['useCssModule']
|
||||||
|
const useCssVars: typeof import('vue')['useCssVars']
|
||||||
|
const useDialog: typeof import('naive-ui')['useDialog']
|
||||||
|
const useId: typeof import('vue')['useId']
|
||||||
|
const useLoadingBar: typeof import('naive-ui')['useLoadingBar']
|
||||||
|
const useMessage: typeof import('naive-ui')['useMessage']
|
||||||
|
const useModel: typeof import('vue')['useModel']
|
||||||
|
const useNotification: typeof import('naive-ui')['useNotification']
|
||||||
|
const useSlots: typeof import('vue')['useSlots']
|
||||||
|
const useTemplateRef: typeof import('vue')['useTemplateRef']
|
||||||
|
const watch: typeof import('vue')['watch']
|
||||||
|
const watchEffect: typeof import('vue')['watchEffect']
|
||||||
|
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
||||||
|
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
|
||||||
|
}
|
||||||
|
// for type re-export
|
||||||
|
declare global {
|
||||||
|
// @ts-ignore
|
||||||
|
export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
|
||||||
|
import('vue')
|
||||||
|
}
|
@ -52,6 +52,7 @@ import { ServeUploadImage } from '@/api/upload'
|
|||||||
import { uploadImg } from '@/api/upload'
|
import { uploadImg } from '@/api/upload'
|
||||||
// 引入事件总线钩子
|
// 引入事件总线钩子
|
||||||
import { useEventBus } from '@/hooks'
|
import { useEventBus } from '@/hooks'
|
||||||
|
|
||||||
// 注册Quill编辑器的自定义格式
|
// 注册Quill编辑器的自定义格式
|
||||||
Quill.register('formats/emoji', EmojiBlot) // 注册表情格式
|
Quill.register('formats/emoji', EmojiBlot) // 注册表情格式
|
||||||
Quill.register('formats/quote', QuoteBlot) // 注册引用格式
|
Quill.register('formats/quote', QuoteBlot) // 注册引用格式
|
||||||
@ -146,12 +147,12 @@ const editorOption = {
|
|||||||
if (!props.members.length) {
|
if (!props.members.length) {
|
||||||
return renderList([])
|
return renderList([])
|
||||||
}
|
}
|
||||||
|
|
||||||
let list = [
|
let list = [
|
||||||
|
{ id: 0, nickname: '所有人', avatar: defAvatar, value: '所有人' },
|
||||||
...props.members
|
...props.members
|
||||||
] as any
|
]
|
||||||
if((dialogueStore.groupInfo as any).is_manager){
|
|
||||||
list.unshift({ id: 0, nickname: '所有人', avatar: defAvatar, value: '所有人' })
|
|
||||||
}
|
|
||||||
const items = list.filter(
|
const items = list.filter(
|
||||||
(item: any) => item.nickname.toLowerCase().indexOf(searchTerm) !== -1
|
(item: any) => item.nickname.toLowerCase().indexOf(searchTerm) !== -1
|
||||||
)
|
)
|
||||||
|
@ -122,7 +122,7 @@ const handleDownload = () => {
|
|||||||
<img class="file-icon" :src="fileInfo.icon" alt="文件图标">
|
<img class="file-icon" :src="fileInfo.icon" alt="文件图标">
|
||||||
|
|
||||||
<!-- 上传进度圆环 - 上传状态 -->
|
<!-- 上传进度圆环 - 上传状态 -->
|
||||||
<div v-if="extra.is_uploading&&extra.percentage!==-1" class="progress-overlay">
|
<div v-if="extra.is_uploading&&extra.percentage>0" class="progress-overlay">
|
||||||
<div class="circle-progress-container" @click.stop="togglePlay">
|
<div class="circle-progress-container" @click.stop="togglePlay">
|
||||||
<svg class="circle-progress" width="20" height="20" viewBox="0 0 20 20">
|
<svg class="circle-progress" width="20" height="20" viewBox="0 0 20 20">
|
||||||
<!-- 底色圆环 -->
|
<!-- 底色圆环 -->
|
||||||
|
@ -178,6 +178,7 @@ export const useUploadsStore = defineStore('uploads', {
|
|||||||
|
|
||||||
// 获取最新的项目状态,确保仍然存在且没有被暂停
|
// 获取最新的项目状态,确保仍然存在且没有被暂停
|
||||||
const updatedItem:any = this.findItem(uploadId)
|
const updatedItem:any = this.findItem(uploadId)
|
||||||
|
if(updatedItem.is_paused) return
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// 当前分片上传成功,增加索引
|
// 当前分片上传成功,增加索引
|
||||||
updatedItem.uploadIndex++
|
updatedItem.uploadIndex++
|
||||||
@ -190,6 +191,9 @@ export const useUploadsStore = defineStore('uploads', {
|
|||||||
if (updatedItem.onProgress) {
|
if (updatedItem.onProgress) {
|
||||||
updatedItem.onProgress(updatedItem.percentage)
|
updatedItem.onProgress(updatedItem.percentage)
|
||||||
}
|
}
|
||||||
|
// if (clientUploadId) {
|
||||||
|
// this.dialogueStore.updateUploadProgress(clientUploadId, percentage)
|
||||||
|
// }
|
||||||
// 检查是否全部上传完成
|
// 检查是否全部上传完成
|
||||||
if (updatedItem.uploadIndex === updatedItem.files.length) {
|
if (updatedItem.uploadIndex === updatedItem.files.length) {
|
||||||
// 所有分片上传完成
|
// 所有分片上传完成
|
||||||
@ -272,22 +276,24 @@ export const useUploadsStore = defineStore('uploads', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 重试文件上传
|
// 重试文件上传
|
||||||
retryCommonUpload(clientUploadId: string) {
|
retryCommonUpload(uploadId: string, errorMessage: string) {
|
||||||
const item = this.findItemByClientId(clientUploadId)
|
const item = this.findItem(uploadId)
|
||||||
if (!item) return
|
if (!item) return
|
||||||
|
|
||||||
// 重新初始化上传,以便重新获取分片信息
|
// 显示错误提示
|
||||||
this.initUploadFile(
|
message.warning(errorMessage)
|
||||||
item.file,
|
|
||||||
item.talk_type,
|
|
||||||
item.receiver_id,
|
|
||||||
clientUploadId,
|
|
||||||
item.onProgress || ((percentage: number) => {}),
|
|
||||||
item.onComplete || ((data: any) => {})
|
|
||||||
)
|
|
||||||
|
|
||||||
// 从上传列表中移除旧的上传项
|
// 创建一个5秒后自动重试的机制
|
||||||
this.items = this.items.filter(i => i.client_upload_id !== clientUploadId)
|
setTimeout(() => {
|
||||||
|
const currentItem = this.findItem(uploadId)
|
||||||
|
if (!currentItem) return
|
||||||
|
|
||||||
|
// 如果用户没有手动暂停,则自动重试
|
||||||
|
if (!currentItem.is_paused) {
|
||||||
|
console.log('正在重试上传分片...');
|
||||||
|
this.triggerUpload(uploadId)
|
||||||
|
}
|
||||||
|
}, 5000)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -18,7 +18,7 @@ export function isLoggedIn() {
|
|||||||
*/
|
*/
|
||||||
export function getAccessToken() {
|
export function getAccessToken() {
|
||||||
// return storage.get(AccessToken) || ''
|
// return storage.get(AccessToken) || ''
|
||||||
return JSON.parse(localStorage.getItem('token'))||'46d71a72d8d845ad7ed23eba9bdde260e635407190c2ce1bf7fd22088e41682ea07773ec65cae8946d2003f264d55961f96e0fc5da10eb96d3a348c1664e9644ce2108c311309f398ae8ea1b8200bfd490e5cb6e8c52c9e5d493cbabb163368f8351420451a631dbfa749829ee4cda49b77b5ed2d3dced5d0f2b7dd9ee76ba5465c84a17c23af040cd92b6b2a4ea48befbb5c729dcdad0a9c9668befe84074cc24f78899c1d947f8e7f94c7eda5325b8ed698df729e76febb98549ef3482ae942fb4f4a1c92d21836fa784728f0c5483aab2760a991b6b36e6b10c84f840a6433a6ecc31dee36e8f1c6158818bc89d22ab23a552e0c3f606946dcb914a52b692e10d823cc7f43027127359e7ee8555d956e7e095946931ceaa3877675584b0a0a4fc690c8018712b306050ebbdea92037aea31d66d65004be26d3c696abc4c29'
|
return JSON.parse(localStorage.getItem('token'))||'46d71a72d8d845ad7ed23eba9bdde260e635407190c2ce1bf7fd22088e41682ea07773ec65cae8946d2003f264d55961f96e0fc5da10eb96d3a348c1664e9644ce2108c311309f398ae8ea1b8200bfd490e5cb6e8c52c9e5d493cbabb163368f8351420451a631dbfa749829ee4cda49b77b5ed2d3dced5d0f2b7dd9ee76ba5465c84a17c23af040cd92b6b2a4ea48befbb5c729dcdad0a9c9668befe84074cc24f78899c1d947f8e7f94c7eda5325b8ed698df729e76febb98549ef3482ae942fb4f4a1c92d21836fa784728f0c5483aab2760a991b6b36e6b10c84f840a6433a6ecc31dee36e8f1c6158818bc89d22cb993eb73d0e2c0e0c8f627f3a8550a8e846cd26e5ec6abe0b57b0470a33b33c4b097d9fc113aa020f9751b55320b4f6b3f812fa4cc357f90f8db108a250b14e477c1e1b2292799d3c8831f7a47de2d6'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,7 +14,7 @@ import { ITalkRecord } from '@/types/chat'
|
|||||||
import { EditorConst } from '@/constant/event-bus'
|
import { EditorConst } from '@/constant/event-bus'
|
||||||
import { useInject, useTalkRecord, useUtil } from '@/hooks'
|
import { useInject, useTalkRecord, useUtil } from '@/hooks'
|
||||||
import { ExclamationCircleFilled } from '@ant-design/icons-vue'
|
import { ExclamationCircleFilled } from '@ant-design/icons-vue'
|
||||||
import { useUserStore ,useUploadsStore} from '@/store'
|
import { useUserStore } from '@/store'
|
||||||
import RevokeMessage from '@/components/talk/message/RevokeMessage.vue'
|
import RevokeMessage from '@/components/talk/message/RevokeMessage.vue'
|
||||||
import { voiceToText } from '@/api/chat.js'
|
import { voiceToText } from '@/api/chat.js'
|
||||||
import {confirmBox} from '@/components/confirm-box/service.js'
|
import {confirmBox} from '@/components/confirm-box/service.js'
|
||||||
@ -42,7 +42,7 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const { loadConfig, records, onLoad, onRefreshLoad, onJumpMessage } = useTalkRecord(props.uid)
|
const { loadConfig, records, onLoad, onRefreshLoad, onJumpMessage } = useTalkRecord(props.uid)
|
||||||
const uploadsStore = useUploadsStore()
|
|
||||||
const { useMessage } = useUtil()
|
const { useMessage } = useUtil()
|
||||||
const { dropdown, showDropdownMenu, closeDropdownMenu } = useMenu()
|
const { dropdown, showDropdownMenu, closeDropdownMenu } = useMenu()
|
||||||
const { showUserInfoModal } = useInject()
|
const { showUserInfoModal } = useInject()
|
||||||
@ -319,19 +319,9 @@ const retry=(item:any)=>{
|
|||||||
confirmBox({
|
confirmBox({
|
||||||
content:'确定重发吗'
|
content:'确定重发吗'
|
||||||
}).then(()=>{
|
}).then(()=>{
|
||||||
uploadsStore.retryCommonUpload(item.extra.upload_id)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const onContextMenuAvatar=(e:any,item:any)=>{
|
|
||||||
console.log('item',item)
|
|
||||||
e.preventDefault()
|
|
||||||
bus.emit(EditorConst.Mention, {
|
|
||||||
id: item.user_id,
|
|
||||||
value: item.nickname
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -396,14 +386,13 @@ const onContextMenuAvatar=(e:any,item:any)=>{
|
|||||||
:src="item.avatar"
|
:src="item.avatar"
|
||||||
:size="42"
|
:size="42"
|
||||||
:username="item.nickname"
|
:username="item.nickname"
|
||||||
@contextmenu.prevent="onContextMenuAvatar($event, item)"
|
|
||||||
@click="showUserInfoModal(item.erp_user_id, item.user_id)"
|
@click="showUserInfoModal(item.erp_user_id, item.user_id)"
|
||||||
/>
|
/>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<!-- 主体信息 -->
|
<!-- 主体信息 -->
|
||||||
<main class="main-column">
|
<main class="main-column">
|
||||||
<!-- <div class="talk-title">
|
<div class="talk-title">
|
||||||
<span
|
<span
|
||||||
class="nickname pointer"
|
class="nickname pointer"
|
||||||
v-show="talk_type == 2 && item.float == 'left'"
|
v-show="talk_type == 2 && item.float == 'left'"
|
||||||
@ -412,15 +401,8 @@ const onContextMenuAvatar=(e:any,item:any)=>{
|
|||||||
<span class="at">@</span>{{ item.nickname }}
|
<span class="at">@</span>{{ item.nickname }}
|
||||||
</span>
|
</span>
|
||||||
<span>{{ parseTime(item.created_at, '{y}/{m}/{d} {h}:{i}') }}</span>
|
<span>{{ parseTime(item.created_at, '{y}/{m}/{d} {h}:{i}') }}</span>
|
||||||
</div> -->
|
|
||||||
<div class="talk-title">
|
|
||||||
<span class="mr-7px"
|
|
||||||
v-show="talk_type == 2 && item.float == 'left'"
|
|
||||||
|
|
||||||
>{{ item.nickname }}
|
|
||||||
</span>
|
|
||||||
<span>{{ parseTime(item.created_at, '{y}/{m}/{d} {h}:{i}') }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="talk-content"
|
class="talk-content"
|
||||||
:class="{ pointer: dialogueStore.isOpenMultiSelect }"
|
:class="{ pointer: dialogueStore.isOpenMultiSelect }"
|
||||||
|
@ -47,7 +47,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
compressPlugin(),
|
compressPlugin(),
|
||||||
UnoCSS(),
|
UnoCSS(),
|
||||||
vueDevTools({
|
vueDevTools({
|
||||||
launchEditor: 'cursor',
|
launchEditor: 'trae',
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
define: {
|
define: {
|
||||||
|
Loading…
Reference in New Issue
Block a user