Compare commits
No commits in common. "383abed2e8a2f6b2510cc1a422430ce372cb1907" and "2fa381bea15159a74a70d1667b92f0fedd283597" have entirely different histories.
383abed2e8
...
2fa381bea1
1
components.d.ts
vendored
1
components.d.ts
vendored
@ -43,7 +43,6 @@ declare module 'vue' {
|
|||||||
SysGroupMemberKickedMessage: typeof import('./src/components/talk/message/system/SysGroupMemberKickedMessage.vue')['default']
|
SysGroupMemberKickedMessage: typeof import('./src/components/talk/message/system/SysGroupMemberKickedMessage.vue')['default']
|
||||||
SysGroupMemberMutedMessage: typeof import('./src/components/talk/message/system/SysGroupMemberMutedMessage.vue')['default']
|
SysGroupMemberMutedMessage: typeof import('./src/components/talk/message/system/SysGroupMemberMutedMessage.vue')['default']
|
||||||
SysGroupMemberQuitMessage: typeof import('./src/components/talk/message/system/SysGroupMemberQuitMessage.vue')['default']
|
SysGroupMemberQuitMessage: typeof import('./src/components/talk/message/system/SysGroupMemberQuitMessage.vue')['default']
|
||||||
SysGroupMemberRemovedMessage: typeof import('./src/components/talk/message/system/SysGroupMemberRemovedMessage.vue')['default']
|
|
||||||
SysGroupMutedMessage: typeof import('./src/components/talk/message/system/SysGroupMutedMessage.vue')['default']
|
SysGroupMutedMessage: typeof import('./src/components/talk/message/system/SysGroupMutedMessage.vue')['default']
|
||||||
SysGroupTransferMessage: typeof import('./src/components/talk/message/system/SysGroupTransferMessage.vue')['default']
|
SysGroupTransferMessage: typeof import('./src/components/talk/message/system/SysGroupTransferMessage.vue')['default']
|
||||||
SysTextMessage: typeof import('./src/components/talk/message/system/SysTextMessage.vue')['default']
|
SysTextMessage: typeof import('./src/components/talk/message/system/SysTextMessage.vue')['default']
|
||||||
|
@ -14,8 +14,7 @@ defineProps({
|
|||||||
<div class="im-message-sys-text">
|
<div class="im-message-sys-text">
|
||||||
<div class="sys-text">
|
<div class="sys-text">
|
||||||
<a @click="showUserInfoModal(data.user_id)">
|
<a @click="showUserInfoModal(data.user_id)">
|
||||||
<!-- {{ data.nickname }} -->
|
{{ data.nickname }}
|
||||||
管理员
|
|
||||||
</a>
|
</a>
|
||||||
<span>修改群名为</span>
|
<span>修改群名为</span>
|
||||||
<span>"{{ extra.group_name }}"</span>
|
<span>"{{ extra.group_name }}"</span>
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import './sys-message.less'
|
|
||||||
import { useInject } from '@/hooks'
|
|
||||||
|
|
||||||
const { showUserInfoModal } = useInject()
|
|
||||||
|
|
||||||
defineProps({
|
|
||||||
extra: Object,
|
|
||||||
data: Object,
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="im-message-sys-text">
|
|
||||||
<div class="sys-text">
|
|
||||||
<template v-for="(user, index) in extra?.members" :key="index">
|
|
||||||
<a @click="showUserInfoModal(user.user_id)">{{ user.nickname }}</a>
|
|
||||||
<em v-show="index < extra.members.length - 1">、</em>
|
|
||||||
</template>
|
|
||||||
<span>已离开此群</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
@ -60,7 +60,7 @@ export const ChatMsgTypeMapping = {
|
|||||||
[ChatMsgSysGroupTransfer]: '[转让群主]',
|
[ChatMsgSysGroupTransfer]: '[转让群主]',
|
||||||
[ChatMsgSysGroupAdmin]: '[设置管理员]',
|
[ChatMsgSysGroupAdmin]: '[设置管理员]',
|
||||||
[ChatMsgSysGroupMemberRemoved]: '[移出群成员消息]',
|
[ChatMsgSysGroupMemberRemoved]: '[移出群成员消息]',
|
||||||
[ChatMsgSysGroupInfoChange]: '[群信息更新]'
|
[ChatMsgSysGroupInfoChange]: '[修改群名称]'
|
||||||
}
|
}
|
||||||
|
|
||||||
// 消息类型 - 消息组件 映射关系
|
// 消息类型 - 消息组件 映射关系
|
||||||
|
@ -167,6 +167,7 @@
|
|||||||
@click="showConfirmPrompt(3)"
|
@click="showConfirmPrompt(3)"
|
||||||
class="clear-chat-record-btn-each"
|
class="clear-chat-record-btn-each"
|
||||||
v-if="
|
v-if="
|
||||||
|
groupParams?.groupInfo?.is_manager === false &&
|
||||||
dialogueParams.type === 2 &&
|
dialogueParams.type === 2 &&
|
||||||
(groupParams?.groupInfo?.group_type === 1 ||
|
(groupParams?.groupInfo?.group_type === 1 ||
|
||||||
groupParams?.groupInfo?.group_type === 3)
|
groupParams?.groupInfo?.group_type === 3)
|
||||||
@ -225,7 +226,6 @@ const dialogueParams = reactive({
|
|||||||
keyboard: computed(() => dialogueStore.keyboard),
|
keyboard: computed(() => dialogueStore.keyboard),
|
||||||
num: computed(() => dialogueStore.members.length),
|
num: computed(() => dialogueStore.members.length),
|
||||||
memberList: computed(() => dialogueStore.members),
|
memberList: computed(() => dialogueStore.members),
|
||||||
adminList: computed(() => dialogueStore.getAdminList),
|
|
||||||
})
|
})
|
||||||
const talkParams = reactive({
|
const talkParams = reactive({
|
||||||
topItems: computed(() => talkStore.topItems),
|
topItems: computed(() => talkStore.topItems),
|
||||||
@ -563,20 +563,14 @@ const showConfirmPrompt = (flag) => {
|
|||||||
confirmContent = t('ok') + t('chat.settings.clearChatRecord')
|
confirmContent = t('ok') + t('chat.settings.clearChatRecord')
|
||||||
} else if (flag === 2) {
|
} else if (flag === 2) {
|
||||||
//解散群聊
|
//解散群聊
|
||||||
confirmContent = t('group.dismiss.confirm')
|
confirmContent = t('ok') + t('group.quit.btn')
|
||||||
|
subContent = t('groupManage.disband.hint')
|
||||||
|
subContentColor = '#CF3050'
|
||||||
} else if (flag === 3) {
|
} else if (flag === 3) {
|
||||||
//最后一个管理员退群就解散群聊
|
//退出群聊
|
||||||
if (dialogueParams.adminList.length === 1 && dialogueParams.adminList[0].id === dialogueParams.uid) {
|
confirmContent = t('ok') + t('group.quit.btn')
|
||||||
//解散群聊
|
subContent = t('groupManage.quit.hint')
|
||||||
confirmContent = t('ok') + t('group.quit.btn')
|
subContentColor = '#B4B4B4'
|
||||||
subContent = t('groupManage.disband.hint')
|
|
||||||
subContentColor = '#CF3050'
|
|
||||||
} else {
|
|
||||||
//退出群聊
|
|
||||||
confirmContent = t('ok') + t('group.quit.btn')
|
|
||||||
subContent = t('groupManage.quit.hint')
|
|
||||||
subContentColor = '#B4B4B4'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
showConfirm({
|
showConfirm({
|
||||||
subContent: subContent,
|
subContent: subContent,
|
||||||
@ -603,32 +597,14 @@ const showConfirmPrompt = (flag) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else if (flag === 3) {
|
} else if (flag === 3) {
|
||||||
//最后一个管理员退群就解散群聊
|
ServeSecedeGroup({
|
||||||
if (dialogueParams.adminList.length === 1 && dialogueParams.adminList[0].id === dialogueParams.uid) {
|
group_id: dialogueParams.receiver_id,
|
||||||
//解散群聊
|
}).then(({ code, message }) => {
|
||||||
let params = {
|
if (code == 200) {
|
||||||
group_id: dialogueParams.receiver_id, //群id
|
// dialogueStore.apiClearRecord()
|
||||||
|
} else {
|
||||||
}
|
}
|
||||||
console.log(params)
|
})
|
||||||
const res = await ServeDismissGroup(params)
|
|
||||||
if (res.code === 200) {
|
|
||||||
dialogueStore.updateGroupMembers()
|
|
||||||
groupStore.ServeGroupDetail()
|
|
||||||
uni.navigateBack({
|
|
||||||
delta: 2,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
//退出群聊
|
|
||||||
ServeSecedeGroup({
|
|
||||||
group_id: dialogueParams.receiver_id,
|
|
||||||
}).then(({ code, message }) => {
|
|
||||||
if (code == 200) {
|
|
||||||
// dialogueStore.apiClearRecord()
|
|
||||||
} else {
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onCancel: () => {},
|
onCancel: () => {},
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<template #right>
|
<template #right>
|
||||||
<div
|
<div
|
||||||
class="mr-[36rpx] toChatSetting_btn"
|
class="mr-[36rpx] toChatSetting_btn"
|
||||||
v-if="!talkParams.isDismiss && !talkParams.isQuit"
|
v-if="!talkParams.isDismiss"
|
||||||
>
|
>
|
||||||
<tm-icon
|
<tm-icon
|
||||||
color="rgb(51, 51, 51)"
|
color="rgb(51, 51, 51)"
|
||||||
@ -542,7 +542,6 @@ const talkParams = reactive({
|
|||||||
keyboard: computed(() => dialogueStore.keyboard),
|
keyboard: computed(() => dialogueStore.keyboard),
|
||||||
num: computed(() => dialogueStore.members.length),
|
num: computed(() => dialogueStore.members.length),
|
||||||
isDismiss: computed(() => dialogueStore.isDismiss),
|
isDismiss: computed(() => dialogueStore.isDismiss),
|
||||||
isQuit: computed(() => dialogueStore.isQuit),
|
|
||||||
adminList: computed(() => dialogueStore.getAdminList),
|
adminList: computed(() => dialogueStore.getAdminList),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -878,9 +877,6 @@ const editorOption = {
|
|||||||
return el
|
return el
|
||||||
},
|
},
|
||||||
source: function (searchTerm, renderList, mentionChar) {
|
source: function (searchTerm, renderList, mentionChar) {
|
||||||
if (talkParams.type === 1) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 在失焦前保存光标位置
|
// 在失焦前保存光标位置
|
||||||
const quill = getQuill()
|
const quill = getQuill()
|
||||||
const range = quill.getSelection()
|
const range = quill.getSelection()
|
||||||
@ -1111,14 +1107,11 @@ watch(
|
|||||||
newValue[newValue.length - 1]?.sequence ===
|
newValue[newValue.length - 1]?.sequence ===
|
||||||
dialogueList?.records?.[0]?.sequence
|
dialogueList?.records?.[0]?.sequence
|
||||||
) {
|
) {
|
||||||
if (
|
|
||||||
dialogueList?.records?.[0]?.sequence !== 1 &&
|
|
||||||
!state.value.localPageLoadDone
|
|
||||||
) {
|
|
||||||
loadConfig.status = 1
|
|
||||||
}
|
|
||||||
//相同意味着分页加载缓存中的聊天记录完毕
|
//相同意味着分页加载缓存中的聊天记录完毕
|
||||||
state.value.localPageLoadDone = true
|
state.value.localPageLoadDone = true
|
||||||
|
if (dialogueList?.records?.[0]?.sequence !== 1) {
|
||||||
|
loadConfig.status = 1
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
state.value.localPageLoadDone = false
|
state.value.localPageLoadDone = false
|
||||||
}
|
}
|
||||||
@ -1156,10 +1149,8 @@ const onScrollToLower = async () => {
|
|||||||
}))
|
}))
|
||||||
|
|
||||||
virtualList.value = formattedMoreRecords.concat(tempVirtualList).reverse()
|
virtualList.value = formattedMoreRecords.concat(tempVirtualList).reverse()
|
||||||
loadConfig.status =
|
|
||||||
dialogueList?.records?.[0]?.sequence > 1 && moreRecords.length > 0
|
console.log(virtualList.value)
|
||||||
? 1
|
|
||||||
: 2
|
|
||||||
} else {
|
} else {
|
||||||
if (tempVirtualList[0].sequence > dialogueList.records[0].sequence) {
|
if (tempVirtualList[0].sequence > dialogueList.records[0].sequence) {
|
||||||
virtualList.value = dialogueList.records
|
virtualList.value = dialogueList.records
|
||||||
@ -1233,8 +1224,8 @@ const onScrollToUpper = async () => {
|
|||||||
.concat(
|
.concat(
|
||||||
dialogueList.records.slice(
|
dialogueList.records.slice(
|
||||||
recordIndex + 1,
|
recordIndex + 1,
|
||||||
Math.min(recordIndex + 11, dialogueList.records.length),
|
Math.min(recordIndex + 11, dialogueList.records.length)
|
||||||
),
|
)
|
||||||
)
|
)
|
||||||
.reverse()
|
.reverse()
|
||||||
|
|
||||||
@ -1339,7 +1330,7 @@ const getMentionSelectLists = (mentionSelectList) => {
|
|||||||
{
|
{
|
||||||
id: mentionSelectItem?.id,
|
id: mentionSelectItem?.id,
|
||||||
denotationChar: '@',
|
denotationChar: '@',
|
||||||
value: mentionSelectItem?.nickname + ' ',
|
value: mentionSelectItem?.nickname,
|
||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
)
|
)
|
||||||
@ -1410,8 +1401,7 @@ const queryRecordsByMsgInfo = async (msgInfo) => {
|
|||||||
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
zpagingRef.value.complete(recordsList.reverse())
|
zpagingRef.value.complete(recordsList.reverse())
|
||||||
loadConfig.status =
|
loadConfig.status = dialogueList?.records?.[0]?.sequence > 1 ? 1 : 2
|
||||||
dialogueList?.records?.[0]?.sequence > 1 && recordsList.length > 0 ? 1 : 2
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
let offset = uni.getSystemInfoSync().windowHeight
|
let offset = uni.getSystemInfoSync().windowHeight
|
||||||
const navBarAreaQuery = uni.createSelectorQuery()
|
const navBarAreaQuery = uni.createSelectorQuery()
|
||||||
@ -1502,11 +1492,8 @@ const findTalkRecords = (record, isMiddle, sequence, appointParams) => {
|
|||||||
resolve(JSON.parse(JSON.stringify(state.value.serveFindRecord)))
|
resolve(JSON.parse(JSON.stringify(state.value.serveFindRecord)))
|
||||||
state.value.serveFindRecord = []
|
state.value.serveFindRecord = []
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
resolve([])
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
resolve([])
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
resp.catch(() => {})
|
resp.catch(() => {})
|
||||||
|
@ -317,8 +317,6 @@ const queryAllSearch = (pageNum, searchResultPageSize) => {
|
|||||||
data.last_id,
|
data.last_id,
|
||||||
data.last_group_id,
|
data.last_group_id,
|
||||||
data.last_member_id,
|
data.last_member_id,
|
||||||
data.last_receiver_user_name,
|
|
||||||
data.last_receiver_group_name,
|
|
||||||
)
|
)
|
||||||
let total = data.count
|
let total = data.count
|
||||||
if (props.searchRecordDetail) {
|
if (props.searchRecordDetail) {
|
||||||
|
@ -62,8 +62,6 @@ onLoad((options) => {
|
|||||||
receiver_id: 0, //查详情的时候需传入
|
receiver_id: 0, //查详情的时候需传入
|
||||||
last_group_id: 0, //最后一条群id
|
last_group_id: 0, //最后一条群id
|
||||||
last_member_id: 0, //最后一条用户id
|
last_member_id: 0, //最后一条用户id
|
||||||
last_receiver_user_name: '', //最后一条用户名
|
|
||||||
last_receiver_group_name: '', //最后一条群名
|
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
state.apiRequest = ServeTalkRecord
|
state.apiRequest = ServeTalkRecord
|
||||||
@ -75,13 +73,11 @@ onLoad((options) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
//分页查询时,最后一条id变化
|
//分页查询时,最后一条id变化
|
||||||
const lastIdChange = (last_id, last_group_id, last_member_id, last_receiver_user_name, last_receiver_group_name) => {
|
const lastIdChange = (last_id, last_group_id, last_member_id) => {
|
||||||
let idChanges = {
|
let idChanges = {
|
||||||
last_id,
|
last_id,
|
||||||
last_group_id,
|
last_group_id,
|
||||||
last_member_id,
|
last_member_id,
|
||||||
last_receiver_user_name,
|
|
||||||
last_receiver_group_name,
|
|
||||||
}
|
}
|
||||||
state.apiParams = encodeURIComponent(
|
state.apiParams = encodeURIComponent(
|
||||||
JSON.stringify(
|
JSON.stringify(
|
||||||
|
@ -51,9 +51,6 @@ export const useDialogueStore = defineStore('dialogue', {
|
|||||||
//是否已被解散
|
//是否已被解散
|
||||||
isDismiss: false,
|
isDismiss: false,
|
||||||
|
|
||||||
//是否退群/移出群
|
|
||||||
isQuit: false,
|
|
||||||
|
|
||||||
// 群成员列表
|
// 群成员列表
|
||||||
members: [],
|
members: [],
|
||||||
|
|
||||||
@ -105,7 +102,6 @@ export const useDialogueStore = defineStore('dialogue', {
|
|||||||
this.isShowEditor = data?.is_robot === 0
|
this.isShowEditor = data?.is_robot === 0
|
||||||
|
|
||||||
this.isDismiss = data?.is_dismiss === 1 ? true : false
|
this.isDismiss = data?.is_dismiss === 1 ? true : false
|
||||||
this.isQuit = data?.is_quit === 1 ? true : false
|
|
||||||
|
|
||||||
this.members = []
|
this.members = []
|
||||||
if (data.talk_type == 2) {
|
if (data.talk_type == 2) {
|
||||||
|
@ -41,7 +41,6 @@ export const useDialogueListStore = createGlobalState(() => {
|
|||||||
isShowEditor: dialogue.isShowEditor,
|
isShowEditor: dialogue.isShowEditor,
|
||||||
isShowSessionList: dialogue.isShowSessionList,
|
isShowSessionList: dialogue.isShowSessionList,
|
||||||
isDismiss: dialogue.isDismiss,
|
isDismiss: dialogue.isDismiss,
|
||||||
isQuit: dialogue.isQuit,
|
|
||||||
members: dialogue.members.map(member => ({
|
members: dialogue.members.map(member => ({
|
||||||
id: member.id,
|
id: member.id,
|
||||||
nickname: member.nickname,
|
nickname: member.nickname,
|
||||||
|
@ -154,6 +154,5 @@
|
|||||||
"chat.mention.select": "选择提醒的人",
|
"chat.mention.select": "选择提醒的人",
|
||||||
"do.phone.call": "拨打",
|
"do.phone.call": "拨打",
|
||||||
"popup.title.phone": "电话",
|
"popup.title.phone": "电话",
|
||||||
"pageTitle.view.deps": "查看部门",
|
"pageTitle.view.deps": "查看部门"
|
||||||
"group.dismiss.confirm": "确定解散本群"
|
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,6 @@ export function formatTalkItem(params) {
|
|||||||
is_top: 0,
|
is_top: 0,
|
||||||
is_online: 0,
|
is_online: 0,
|
||||||
is_dismiss: 0,
|
is_dismiss: 0,
|
||||||
is_quit: 0,
|
|
||||||
is_robot: 0,
|
is_robot: 0,
|
||||||
unread_num: 0,
|
unread_num: 0,
|
||||||
content: '......',
|
content: '......',
|
||||||
|
Loading…
Reference in New Issue
Block a user