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