Merge branch 'wyfMain-dev'
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run
This commit is contained in:
commit
383abed2e8
1
components.d.ts
vendored
1
components.d.ts
vendored
@ -43,6 +43,7 @@ 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,7 +14,8 @@ 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>
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
<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,7 +167,6 @@
|
|||||||
@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)
|
||||||
@ -226,6 +225,7 @@ 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,14 +563,20 @@ 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('ok') + t('group.quit.btn')
|
confirmContent = t('group.dismiss.confirm')
|
||||||
subContent = t('groupManage.disband.hint')
|
|
||||||
subContentColor = '#CF3050'
|
|
||||||
} else if (flag === 3) {
|
} else if (flag === 3) {
|
||||||
//退出群聊
|
//最后一个管理员退群就解散群聊
|
||||||
confirmContent = t('ok') + t('group.quit.btn')
|
if (dialogueParams.adminList.length === 1 && dialogueParams.adminList[0].id === dialogueParams.uid) {
|
||||||
subContent = t('groupManage.quit.hint')
|
//解散群聊
|
||||||
subContentColor = '#B4B4B4'
|
confirmContent = t('ok') + t('group.quit.btn')
|
||||||
|
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,
|
||||||
@ -597,14 +603,32 @@ const showConfirmPrompt = (flag) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else if (flag === 3) {
|
} else if (flag === 3) {
|
||||||
ServeSecedeGroup({
|
//最后一个管理员退群就解散群聊
|
||||||
group_id: dialogueParams.receiver_id,
|
if (dialogueParams.adminList.length === 1 && dialogueParams.adminList[0].id === dialogueParams.uid) {
|
||||||
}).then(({ code, message }) => {
|
//解散群聊
|
||||||
if (code == 200) {
|
let params = {
|
||||||
// dialogueStore.apiClearRecord()
|
group_id: dialogueParams.receiver_id, //群id
|
||||||
} 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"
|
v-if="!talkParams.isDismiss && !talkParams.isQuit"
|
||||||
>
|
>
|
||||||
<tm-icon
|
<tm-icon
|
||||||
color="rgb(51, 51, 51)"
|
color="rgb(51, 51, 51)"
|
||||||
@ -542,6 +542,7 @@ 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),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -877,6 +878,9 @@ 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()
|
||||||
@ -1107,11 +1111,14 @@ watch(
|
|||||||
newValue[newValue.length - 1]?.sequence ===
|
newValue[newValue.length - 1]?.sequence ===
|
||||||
dialogueList?.records?.[0]?.sequence
|
dialogueList?.records?.[0]?.sequence
|
||||||
) {
|
) {
|
||||||
//相同意味着分页加载缓存中的聊天记录完毕
|
if (
|
||||||
state.value.localPageLoadDone = true
|
dialogueList?.records?.[0]?.sequence !== 1 &&
|
||||||
if (dialogueList?.records?.[0]?.sequence !== 1) {
|
!state.value.localPageLoadDone
|
||||||
|
) {
|
||||||
loadConfig.status = 1
|
loadConfig.status = 1
|
||||||
}
|
}
|
||||||
|
//相同意味着分页加载缓存中的聊天记录完毕
|
||||||
|
state.value.localPageLoadDone = true
|
||||||
} else {
|
} else {
|
||||||
state.value.localPageLoadDone = false
|
state.value.localPageLoadDone = false
|
||||||
}
|
}
|
||||||
@ -1149,8 +1156,10 @@ const onScrollToLower = async () => {
|
|||||||
}))
|
}))
|
||||||
|
|
||||||
virtualList.value = formattedMoreRecords.concat(tempVirtualList).reverse()
|
virtualList.value = formattedMoreRecords.concat(tempVirtualList).reverse()
|
||||||
|
loadConfig.status =
|
||||||
console.log(virtualList.value)
|
dialogueList?.records?.[0]?.sequence > 1 && moreRecords.length > 0
|
||||||
|
? 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
|
||||||
@ -1224,8 +1233,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()
|
||||||
|
|
||||||
@ -1330,7 +1339,7 @@ const getMentionSelectLists = (mentionSelectList) => {
|
|||||||
{
|
{
|
||||||
id: mentionSelectItem?.id,
|
id: mentionSelectItem?.id,
|
||||||
denotationChar: '@',
|
denotationChar: '@',
|
||||||
value: mentionSelectItem?.nickname,
|
value: mentionSelectItem?.nickname + ' ',
|
||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
)
|
)
|
||||||
@ -1401,7 +1410,8 @@ const queryRecordsByMsgInfo = async (msgInfo) => {
|
|||||||
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
zpagingRef.value.complete(recordsList.reverse())
|
zpagingRef.value.complete(recordsList.reverse())
|
||||||
loadConfig.status = dialogueList?.records?.[0]?.sequence > 1 ? 1 : 2
|
loadConfig.status =
|
||||||
|
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()
|
||||||
@ -1492,8 +1502,11 @@ 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,6 +317,8 @@ 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,6 +62,8 @@ 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
|
||||||
@ -73,11 +75,13 @@ onLoad((options) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
//分页查询时,最后一条id变化
|
//分页查询时,最后一条id变化
|
||||||
const lastIdChange = (last_id, last_group_id, last_member_id) => {
|
const lastIdChange = (last_id, last_group_id, last_member_id, last_receiver_user_name, last_receiver_group_name) => {
|
||||||
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,6 +51,9 @@ export const useDialogueStore = defineStore('dialogue', {
|
|||||||
//是否已被解散
|
//是否已被解散
|
||||||
isDismiss: false,
|
isDismiss: false,
|
||||||
|
|
||||||
|
//是否退群/移出群
|
||||||
|
isQuit: false,
|
||||||
|
|
||||||
// 群成员列表
|
// 群成员列表
|
||||||
members: [],
|
members: [],
|
||||||
|
|
||||||
@ -102,6 +105,7 @@ 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,6 +41,7 @@ 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,5 +154,6 @@
|
|||||||
"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,6 +33,7 @@ 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