重构部分聊天详情页面;重构部分管理员选择页面
This commit is contained in:
parent
5c55411aa3
commit
2c063f3d4f
@ -9,6 +9,9 @@
|
|||||||
<template #left>
|
<template #left>
|
||||||
<slot name="left"></slot>
|
<slot name="left"></slot>
|
||||||
</template>
|
</template>
|
||||||
|
<template #subTitle>
|
||||||
|
<slot name="subTitle"></slot>
|
||||||
|
</template>
|
||||||
<template #right>
|
<template #right>
|
||||||
<slot name="right"></slot>
|
<slot name="right"></slot>
|
||||||
</template>
|
</template>
|
||||||
|
@ -210,16 +210,11 @@ const removeGroupAdmin = (adminItem) => {
|
|||||||
) {
|
) {
|
||||||
let positionInfos = []
|
let positionInfos = []
|
||||||
if (state?.groupAdminList?.length > 0) {
|
if (state?.groupAdminList?.length > 0) {
|
||||||
state?.groupAdminList.forEach((item) => {
|
positionInfos = state?.groupAdminList.filter((item) => {
|
||||||
if (
|
return (
|
||||||
item.dept_id != adminItem.dept_id ||
|
item.dept_id != adminItem.dept_id ||
|
||||||
item.position_id != adminItem.position_id
|
item.position_id != adminItem.position_id
|
||||||
) {
|
)
|
||||||
positionInfos.push({
|
|
||||||
position_id: item.position_id,
|
|
||||||
position_name: item.deptPos,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
let params = {
|
let params = {
|
||||||
source: 'app',
|
source: 'app',
|
||||||
|
@ -364,7 +364,8 @@ const handleClickItem = (item) => {
|
|||||||
if (
|
if (
|
||||||
state.manageType === 'admin' &&
|
state.manageType === 'admin' &&
|
||||||
(groupParams.groupInfo.group_type == 2 ||
|
(groupParams.groupInfo.group_type == 2 ||
|
||||||
groupParams.groupInfo.group_type == 4)
|
groupParams.groupInfo.group_type == 4 ||
|
||||||
|
state.isCreateDepGroup === 1)
|
||||||
) {
|
) {
|
||||||
itemList = state.resultMemberList[0].memberList
|
itemList = state.resultMemberList[0].memberList
|
||||||
}
|
}
|
||||||
@ -388,7 +389,8 @@ const confirmSelectMembers = () => {
|
|||||||
if (
|
if (
|
||||||
state.manageType === 'admin' &&
|
state.manageType === 'admin' &&
|
||||||
(groupParams.groupInfo.group_type == 2 ||
|
(groupParams.groupInfo.group_type == 2 ||
|
||||||
groupParams.groupInfo.group_type == 4)
|
groupParams.groupInfo.group_type == 4 ||
|
||||||
|
state.isCreateDepGroup === 1)
|
||||||
) {
|
) {
|
||||||
itemList = state.resultMemberList[0].memberList
|
itemList = state.resultMemberList[0].memberList
|
||||||
}
|
}
|
||||||
@ -404,8 +406,16 @@ const confirmSelectMembers = () => {
|
|||||||
ele.checkArr?.length > 0 ||
|
ele.checkArr?.length > 0 ||
|
||||||
(ele.leader && (ele.leader == 1 || ele.leader == 2))
|
(ele.leader && (ele.leader == 1 || ele.leader == 2))
|
||||||
) {
|
) {
|
||||||
|
if (state.isCreateDepGroup === 1) {
|
||||||
|
let posInfo = Object.assign({}, ele.positionInfo, {
|
||||||
|
name: ele.nickname,
|
||||||
|
id: ele.id,
|
||||||
|
})
|
||||||
|
positionInfos.push(posInfo)
|
||||||
|
} else {
|
||||||
positionInfos.push(ele.positionInfo)
|
positionInfos.push(ele.positionInfo)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
console.log(selectedUserIds)
|
console.log(selectedUserIds)
|
||||||
if (selectedUserIds) {
|
if (selectedUserIds) {
|
||||||
@ -426,6 +436,13 @@ const confirmSelectMembers = () => {
|
|||||||
})
|
})
|
||||||
resp.catch(() => {})
|
resp.catch(() => {})
|
||||||
} else if (state.manageType === 'admin') {
|
} else if (state.manageType === 'admin') {
|
||||||
|
if (state.isCreateDepGroup === 1) {
|
||||||
|
// console.log(positionInfos)
|
||||||
|
groupTypeStore.groupAdmins.value = positionInfos
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
if (
|
if (
|
||||||
groupParams.groupInfo.group_type == 1 ||
|
groupParams.groupInfo.group_type == 1 ||
|
||||||
groupParams.groupInfo.group_type == 3
|
groupParams.groupInfo.group_type == 3
|
||||||
@ -466,6 +483,7 @@ const confirmSelectMembers = () => {
|
|||||||
})
|
})
|
||||||
resp.catch(() => {})
|
resp.catch(() => {})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (state.manageType === 'removeMembers') {
|
} else if (state.manageType === 'removeMembers') {
|
||||||
let params = {
|
let params = {
|
||||||
group_id: dialogueParams.receiverId, //群id
|
group_id: dialogueParams.receiverId, //群id
|
||||||
@ -523,10 +541,9 @@ const assembleAlphabetMemberList = async (newMemberList) => {
|
|||||||
}
|
}
|
||||||
getPosiByDep(departmentIdsArr)
|
getPosiByDep(departmentIdsArr)
|
||||||
} else if (state.isCreateDepGroup === 1) {
|
} else if (state.isCreateDepGroup === 1) {
|
||||||
console.log(groupTypeStore.depCheckedKeys)
|
|
||||||
let departmentIdsArr = []
|
let departmentIdsArr = []
|
||||||
if (groupTypeStore?.depCheckedKeys?.length > 0) {
|
if (groupTypeStore?.depCheckedKeys?.value?.length > 0) {
|
||||||
groupTypeStore.depCheckedKeys.forEach((item) => {
|
groupTypeStore.depCheckedKeys.value.forEach((item) => {
|
||||||
departmentIdsArr.push(item.ID)
|
departmentIdsArr.push(item.ID)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -571,7 +588,18 @@ const getPosiByDep = async (departmentIdsArr) => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// console.log(departmentAllPositions)
|
if (
|
||||||
|
state.isCreateDepGroup === 1 &&
|
||||||
|
groupTypeStore?.groupAdmins?.value?.length > 0
|
||||||
|
) {
|
||||||
|
departmentAllPositions.forEach((allPos) => {
|
||||||
|
groupTypeStore.groupAdmins.value.forEach((admin) => {
|
||||||
|
if (allPos.id === admin.id) {
|
||||||
|
allPos.checkArr = [allPos.id]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
state.resultMemberList = [
|
state.resultMemberList = [
|
||||||
{
|
{
|
||||||
key: '',
|
key: '',
|
||||||
|
@ -1,29 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="outer-layer">
|
<div class="dialog-page">
|
||||||
<div>
|
|
||||||
<tm-navbar :hideBack="false" hideHome title="" :leftWidth="220">
|
|
||||||
<div class="flex flex-col items-center justify-center">
|
|
||||||
<div class="text-[34rpx] font-bold">{{ talkParams.username }}</div>
|
|
||||||
<div v-if="true" class="text-[24rpx] text-[#999999]">公司群</div>
|
|
||||||
</div>
|
|
||||||
<template v-slot:right>
|
|
||||||
<div class="mr-[36rpx]">
|
|
||||||
<tm-icon
|
|
||||||
color="rgb(51, 51, 51)"
|
|
||||||
:font-size="36"
|
|
||||||
name="tmicon-gengduo"
|
|
||||||
@click="toChatSettingsPage"
|
|
||||||
></tm-icon>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</tm-navbar>
|
|
||||||
</div>
|
|
||||||
<div class="root">
|
|
||||||
<div class="dialogBox">
|
|
||||||
<ZPaging
|
<ZPaging
|
||||||
:fixed="false"
|
|
||||||
use-chat-record-mode
|
use-chat-record-mode
|
||||||
:use-page-scroll="false"
|
|
||||||
:refresher-enabled="false"
|
:refresher-enabled="false"
|
||||||
:show-scrollbar="false"
|
:show-scrollbar="false"
|
||||||
:loading-more-enabled="false"
|
:loading-more-enabled="false"
|
||||||
@ -38,6 +16,26 @@
|
|||||||
@virtualListChange="virtualListChange"
|
@virtualListChange="virtualListChange"
|
||||||
@scrolltolower="onRefreshLoad"
|
@scrolltolower="onRefreshLoad"
|
||||||
>
|
>
|
||||||
|
<template #top>
|
||||||
|
<customNavbar :title="talkParams.username">
|
||||||
|
<template
|
||||||
|
#subTitle
|
||||||
|
v-if="talkStore?.findItem(talkParams.index_name)?.group_type === 4"
|
||||||
|
>
|
||||||
|
<div class="text-[24rpx] text-[#999999]">公司群</div>
|
||||||
|
</template>
|
||||||
|
<template #right>
|
||||||
|
<div class="mr-[36rpx] toChatSetting_btn">
|
||||||
|
<tm-icon
|
||||||
|
color="rgb(51, 51, 51)"
|
||||||
|
:font-size="36"
|
||||||
|
name="tmicon-gengduo"
|
||||||
|
@click="toChatSettingsPage"
|
||||||
|
></tm-icon>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</customNavbar>
|
||||||
|
</template>
|
||||||
<!-- <template #top>
|
<!-- <template #top>
|
||||||
<div class="load-toolbar pointer">
|
<div class="load-toolbar pointer">
|
||||||
<span v-if="loadConfig.status == 0"> 正在加载数据中 ... </span>
|
<span v-if="loadConfig.status == 0"> 正在加载数据中 ... </span>
|
||||||
@ -47,6 +45,7 @@
|
|||||||
</template> -->
|
</template> -->
|
||||||
|
|
||||||
<!-- 数据加载状态栏 -->
|
<!-- 数据加载状态栏 -->
|
||||||
|
<div class="dialog-list">
|
||||||
<div
|
<div
|
||||||
class="message-item"
|
class="message-item"
|
||||||
v-for="item in virtualList"
|
v-for="item in virtualList"
|
||||||
@ -136,9 +135,7 @@
|
|||||||
<component
|
<component
|
||||||
class="component-content"
|
class="component-content"
|
||||||
:key="item.zp_index"
|
:key="item.zp_index"
|
||||||
:is="
|
:is="MessageComponents[item.msg_type] || 'unknown-message'"
|
||||||
MessageComponents[item.msg_type] || 'unknown-message'
|
|
||||||
"
|
|
||||||
:extra="item.extra"
|
:extra="item.extra"
|
||||||
:data="item"
|
:data="item"
|
||||||
:max-width="true"
|
:max-width="true"
|
||||||
@ -178,13 +175,12 @@
|
|||||||
</span>
|
</span>
|
||||||
<span v-else class="no-more">没有更多消息了</span>
|
<span v-else class="no-more">没有更多消息了</span>
|
||||||
</div>
|
</div>
|
||||||
</ZPaging>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<template #bottom>
|
||||||
<div class="footBox">
|
<div class="footBox">
|
||||||
<div v-if="!dialogueStore.isOpenMultiSelect">
|
<div v-if="!dialogueStore.isOpenMultiSelect">
|
||||||
<div
|
<div
|
||||||
class="mt-[16rpx] ml-[32rpx] mr-[32rpx] flex items-center justify-between"
|
class="pt-[16rpx] ml-[32rpx] mr-[32rpx] flex items-center justify-between"
|
||||||
>
|
>
|
||||||
<div class="flex-1 quillBox">
|
<div class="flex-1 quillBox">
|
||||||
<QuillEditor
|
<QuillEditor
|
||||||
@ -228,7 +224,10 @@
|
|||||||
<emojiPanel @on-select="onEmoticonEvent" />
|
<emojiPanel @on-select="onEmoticonEvent" />
|
||||||
</div>
|
</div>
|
||||||
<div v-if="state.isOpenFilePanel" class="mt-[16rpx]">
|
<div v-if="state.isOpenFilePanel" class="mt-[16rpx]">
|
||||||
<filePanel @selectImg="handleSelectImg" :talkParams="talkParams" />
|
<filePanel
|
||||||
|
@selectImg="handleSelectImg"
|
||||||
|
:talkParams="talkParams"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="h-[232rpx]">
|
<div v-else class="h-[232rpx]">
|
||||||
@ -304,6 +303,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</tm-drawer>
|
</tm-drawer>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
</ZPaging>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
@ -854,24 +855,23 @@ onUnmounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
uni-page-body,
|
.dialog-page {
|
||||||
page {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.outer-layer {
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
background-image: url('@/static/image/clockIn/z3280@3x.png');
|
background-image: url('@/static/image/clockIn/z3280@3x.png');
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
display: flex;
|
background-position: bottom center;
|
||||||
flex-direction: column;
|
background-attachment: fixed;
|
||||||
overflow: hidden;
|
width: 100%;
|
||||||
}
|
|
||||||
|
|
||||||
.root {
|
.dialog-list {
|
||||||
flex: 1;
|
|
||||||
padding: 20rpx 32rpx;
|
padding: 20rpx 32rpx;
|
||||||
min-height: 0;
|
}
|
||||||
|
|
||||||
|
.toChatSetting_btn {
|
||||||
|
::v-deep .tmicon-gengduo {
|
||||||
|
line-height: unset !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.searchRoot {
|
.searchRoot {
|
||||||
@ -889,22 +889,6 @@ page {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialogBox {
|
|
||||||
height: 100%;
|
|
||||||
min-height: 0;
|
|
||||||
overflow: auto;
|
|
||||||
|
|
||||||
// 添加以下样式来隐藏滚动条
|
|
||||||
&::-webkit-scrollbar {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
-ms-overflow-style: none;
|
|
||||||
/* IE and Edge */
|
|
||||||
scrollbar-width: none;
|
|
||||||
/* Firefox */
|
|
||||||
}
|
|
||||||
|
|
||||||
.load-toolbar {
|
.load-toolbar {
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
color: #409eff;
|
color: #409eff;
|
||||||
|
@ -78,8 +78,8 @@ export const useGroupTypeStore = createGlobalState(() => {
|
|||||||
}),
|
}),
|
||||||
positionInfos: groupAdmins.value.map((v) => {
|
positionInfos: groupAdmins.value.map((v) => {
|
||||||
return {
|
return {
|
||||||
position_id: v.ID,
|
position_id: v.position_id,
|
||||||
position_name: v.name,
|
position_name: v.position_name,
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<slot name="left"></slot>
|
<slot name="left"></slot>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex flex-row-center-center" :style="{ width: contentwidth + 'px' }">
|
<view class="flex flex-row-center-center flex-col" :style="{ width: contentwidth + 'px' }">
|
||||||
<slot>
|
<slot>
|
||||||
<tm-text
|
<tm-text
|
||||||
:unit="props.unit"
|
:unit="props.unit"
|
||||||
@ -63,6 +63,7 @@
|
|||||||
:font-size="props.fontSize"
|
:font-size="props.fontSize"
|
||||||
:label="_title"
|
:label="_title"
|
||||||
></tm-text>
|
></tm-text>
|
||||||
|
<slot name="subTitle"></slot>
|
||||||
</slot>
|
</slot>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row flex flex-row-center-end" :style="{ width: _rightWidth + 'rpx' }">
|
<view class="flex-row flex flex-row-center-end" :style="{ width: _rightWidth + 'rpx' }">
|
||||||
|
Loading…
Reference in New Issue
Block a user