新增聊天页面选择提醒的人弹窗
This commit is contained in:
parent
f2abedd88e
commit
ae2a447fa4
@ -212,15 +212,13 @@
|
|||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
v-if="state?.quoteInfo?.msg_type === 3"
|
v-if="state?.quoteInfo"
|
||||||
class="text-[28rpx] text-[#999]"
|
class="text-[28rpx] text-[#999]"
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
state?.quoteInfo?.nickname +
|
state?.quoteInfo?.nickname +
|
||||||
':' +
|
':' +
|
||||||
'[' +
|
ChatMsgTypeMapping[state?.quoteInfo?.msg_type]
|
||||||
$t('msg.type') +
|
|
||||||
']'
|
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
<img
|
<img
|
||||||
@ -344,6 +342,70 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</ZPaging>
|
</ZPaging>
|
||||||
|
<tm-drawer placement="bottom" :show="true" :hideHeader="true" :round="5">
|
||||||
|
<div
|
||||||
|
class="mention-select-drawer flex flex-row flex-1 flex-row flex-row-center-between"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="cancel-btns flex-row flex flex-row-center-start"
|
||||||
|
style="width: 210rpx;"
|
||||||
|
>
|
||||||
|
<div class="hide-btn" v-if="!state.mentionIsMulSelect">
|
||||||
|
<img
|
||||||
|
style="width: 40rpx; height: 40rpx;"
|
||||||
|
src="/src/static/image/chatList/mention_select_hide_bg.png"
|
||||||
|
/>
|
||||||
|
<img
|
||||||
|
style="
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -9rpx;
|
||||||
|
margin-top: -5rpx;
|
||||||
|
"
|
||||||
|
src="/src/static/image/chatList/mention_select_hide_icon.png"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
style="flex-shrink: 0; display: block;"
|
||||||
|
class="text-[32rpx] font-regular text-[#191919]"
|
||||||
|
v-if="state.mentionIsMulSelect"
|
||||||
|
@click="changeMentionSelectMul(false)"
|
||||||
|
>
|
||||||
|
{{ $t('cancel') }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="flex flex-row-center-center flex-col"
|
||||||
|
style="padding: 6rpx 0;"
|
||||||
|
>
|
||||||
|
<text>{{ $t('chat.mention.select') }}</text>
|
||||||
|
</div>
|
||||||
|
<div class="flex-row flex flex-row-center-end" style="width: 210rpx;">
|
||||||
|
<div
|
||||||
|
class="mention-edit-btn"
|
||||||
|
v-if="!state.mentionIsMulSelect"
|
||||||
|
@click="changeMentionSelectMul(true)"
|
||||||
|
>
|
||||||
|
<span class="text-[32rpx] font-regular text-[#191919]">
|
||||||
|
{{ $t('button.multiple.choice') }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="mention-done-btn"
|
||||||
|
:class="
|
||||||
|
state?.mentionSelectComplete ? 'mention-done-btn-can-do' : ''
|
||||||
|
"
|
||||||
|
v-if="state.mentionIsMulSelect"
|
||||||
|
@click="changeToSelectMode"
|
||||||
|
>
|
||||||
|
<span class="text-[32rpx] font-regular text-[#191919]">
|
||||||
|
{{ $t('button.text.done') }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</tm-drawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
@ -370,7 +432,11 @@ import {
|
|||||||
useDialogueListStore,
|
useDialogueListStore,
|
||||||
} from '@/store'
|
} from '@/store'
|
||||||
import addCircleGray from '@/static/image/chatList/addCircleGray.png'
|
import addCircleGray from '@/static/image/chatList/addCircleGray.png'
|
||||||
import { MessageComponents, ForwardableMessageType } from '@/constant/message'
|
import {
|
||||||
|
MessageComponents,
|
||||||
|
ForwardableMessageType,
|
||||||
|
ChatMsgTypeMapping,
|
||||||
|
} from '@/constant/message'
|
||||||
import { formatTime, parseTime } from '@/utils/datetime'
|
import { formatTime, parseTime } from '@/utils/datetime'
|
||||||
import { deltaToMessage, deltaToString, isEmptyDelta } from './util'
|
import { deltaToMessage, deltaToString, isEmptyDelta } from './util'
|
||||||
import smile from '@/static/image/chatList/smile@2x.png'
|
import smile from '@/static/image/chatList/smile@2x.png'
|
||||||
@ -433,6 +499,7 @@ const state = ref({
|
|||||||
sessionId: '',
|
sessionId: '',
|
||||||
localPageLoadDone: true, //分页加载缓存中的聊天记录是否完毕
|
localPageLoadDone: true, //分页加载缓存中的聊天记录是否完毕
|
||||||
quoteInfo: null, //引用信息
|
quoteInfo: null, //引用信息
|
||||||
|
mentionIsMulSelect: false, //是否是多选提醒的人
|
||||||
})
|
})
|
||||||
|
|
||||||
uniOnload((options) => {
|
uniOnload((options) => {
|
||||||
@ -487,6 +554,15 @@ const onSendMessage = (data = {}, callBack) => {
|
|||||||
|
|
||||||
const onSendMessageClick = () => {
|
const onSendMessageClick = () => {
|
||||||
let delta = getQuill().getContents()
|
let delta = getQuill().getContents()
|
||||||
|
if (state.value.quoteInfo) {
|
||||||
|
delta.ops.unshift({
|
||||||
|
insert: {
|
||||||
|
quote: {
|
||||||
|
id: state.value.quoteInfo.msg_id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
let data = deltaToMessage(delta)
|
let data = deltaToMessage(delta)
|
||||||
|
|
||||||
if (data.items.length === 0) {
|
if (data.items.length === 0) {
|
||||||
@ -503,6 +579,9 @@ const onSendMessageClick = () => {
|
|||||||
callBack: (ok) => {
|
callBack: (ok) => {
|
||||||
if (!ok) return
|
if (!ok) return
|
||||||
getQuill().setContents([], Quill.sources.USER)
|
getQuill().setContents([], Quill.sources.USER)
|
||||||
|
if (state.value.quoteInfo) {
|
||||||
|
state.value.quoteInfo = null
|
||||||
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
@ -934,6 +1013,11 @@ const toUserDetailPage = (userItem) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//切换提醒的人选择弹窗多选状态
|
||||||
|
const changeMentionSelectMul = (status) => {
|
||||||
|
state.value.mentionIsMulSelect = status
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
initData()
|
initData()
|
||||||
})
|
})
|
||||||
@ -1256,4 +1340,66 @@ onUnmounted(() => {
|
|||||||
height: 1rpx;
|
height: 1rpx;
|
||||||
background-color: #e7e7e7;
|
background-color: #e7e7e7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mention-select-drawer {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 36rpx 32rpx;
|
||||||
|
.cancel-btns {
|
||||||
|
flex-shrink: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
.hide-btn {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
position: relative;
|
||||||
|
text {
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
width: 18rpx;
|
||||||
|
height: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mention-done-btn {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 6rpx 24rpx;
|
||||||
|
background-color: #f3f3f3;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
span {
|
||||||
|
color: #bababa;
|
||||||
|
line-height: 40rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mention-done-btn-can-do {
|
||||||
|
background-color: #46299d;
|
||||||
|
span {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mention-edit-btn {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
flex-shrink: 0;
|
||||||
|
span {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
BIN
src/static/image/chatList/mention_select_hide_bg.png
Normal file
BIN
src/static/image/chatList/mention_select_hide_bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 752 B |
BIN
src/static/image/chatList/mention_select_hide_icon.png
Normal file
BIN
src/static/image/chatList/mention_select_hide_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 208 B |
@ -150,5 +150,5 @@
|
|||||||
"button.text.close": "关闭",
|
"button.text.close": "关闭",
|
||||||
"choose.deps.all": "全部",
|
"choose.deps.all": "全部",
|
||||||
"choose.deps.current": "当前",
|
"choose.deps.current": "当前",
|
||||||
"msg.type": "图片"
|
"chat.mention.select": "选择提醒的人"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user