Merge branch 'wwt'
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
ba52f9a576
@ -26,6 +26,14 @@ export const departmentV2TreeAll = (data) => {
|
|||||||
data,
|
data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 通讯录过滤测试部门
|
||||||
|
export const departmentV2TreeAll2 = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/v1/contact/department/v2/tree/all',
|
||||||
|
method: 'POST',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
//获取指定部门下的所有岗位
|
//获取指定部门下的所有岗位
|
||||||
export const v2TreePositionByDepartment = (data) => {
|
export const v2TreePositionByDepartment = (data) => {
|
||||||
|
@ -24,7 +24,7 @@ const { showUserInfoModal } = useInject()
|
|||||||
<em v-show="index < extra.members.length - 1">、</em>
|
<em v-show="index < extra.members.length - 1">、</em>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<span>踢出群聊</span>
|
<span>移出群聊</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -17,7 +17,7 @@ export const ChatMsgSysText = 1000 // 系统文本消息
|
|||||||
export const ChatMsgSysGroupCreate = 1101 // 创建群聊消息
|
export const ChatMsgSysGroupCreate = 1101 // 创建群聊消息
|
||||||
export const ChatMsgSysGroupMemberJoin = 1102 // 加入群聊消息
|
export const ChatMsgSysGroupMemberJoin = 1102 // 加入群聊消息
|
||||||
export const ChatMsgSysGroupMemberQuit = 1103 // 群成员退出群消息
|
export const ChatMsgSysGroupMemberQuit = 1103 // 群成员退出群消息
|
||||||
export const ChatMsgSysGroupMemberKicked = 1104 // 踢出群成员消息
|
export const ChatMsgSysGroupMemberKicked = 1104 // 移出群成员消息
|
||||||
export const ChatMsgSysGroupMessageRevoke = 1105 // 管理员撤回成员消息
|
export const ChatMsgSysGroupMessageRevoke = 1105 // 管理员撤回成员消息
|
||||||
export const ChatMsgSysGroupDismissed = 1106 // 群解散
|
export const ChatMsgSysGroupDismissed = 1106 // 群解散
|
||||||
export const ChatMsgSysGroupMuted = 1107 // 群禁言
|
export const ChatMsgSysGroupMuted = 1107 // 群禁言
|
||||||
@ -47,7 +47,7 @@ export const ChatMsgTypeMapping = {
|
|||||||
[ChatMsgSysGroupCreate]: '[创建群消息]',
|
[ChatMsgSysGroupCreate]: '[创建群消息]',
|
||||||
[ChatMsgSysGroupMemberJoin]: '[加入群消息]',
|
[ChatMsgSysGroupMemberJoin]: '[加入群消息]',
|
||||||
[ChatMsgSysGroupMemberQuit]: '[退出群消息]',
|
[ChatMsgSysGroupMemberQuit]: '[退出群消息]',
|
||||||
[ChatMsgSysGroupMemberKicked]: '[踢出群消息]',
|
[ChatMsgSysGroupMemberKicked]: '[移出群消息]',
|
||||||
[ChatMsgSysGroupMessageRevoke]: '[撤回消息]',
|
[ChatMsgSysGroupMessageRevoke]: '[撤回消息]',
|
||||||
[ChatMsgSysGroupDismissed]: '[群解散消息]',
|
[ChatMsgSysGroupDismissed]: '[群解散消息]',
|
||||||
[ChatMsgSysGroupMuted]: '[群禁言消息]',
|
[ChatMsgSysGroupMuted]: '[群禁言消息]',
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
? ''
|
? ''
|
||||||
: '0',
|
: '0',
|
||||||
}"
|
}"
|
||||||
v-for="(memberItem, memberIndex) in props?.memberList"
|
v-for="(memberItem, memberIndex) in sortedMemberList"
|
||||||
@click="toUserDetailPage(memberItem)"
|
@click="toUserDetailPage(memberItem)"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@ -81,7 +81,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { defineProps } from 'vue'
|
import { defineProps, computed } from 'vue'
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
memberList: Array, //人员列表
|
memberList: Array, //人员列表
|
||||||
memberListsLimit: Number, //人员列表数量限制
|
memberListsLimit: Number, //人员列表数量限制
|
||||||
@ -90,6 +90,36 @@ const props = defineProps({
|
|||||||
hideAddRemoveBtns: Boolean, //是否隐藏添加移除按钮
|
hideAddRemoveBtns: Boolean, //是否隐藏添加移除按钮
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 对成员列表进行排序
|
||||||
|
const sortedMemberList = computed(() => {
|
||||||
|
if (!props.memberList || props.memberList.length === 0) return [];
|
||||||
|
|
||||||
|
// 创建一个新数组,保留原始索引
|
||||||
|
const indexedList = props.memberList.map((item, index) => ({ item, index }));
|
||||||
|
|
||||||
|
// 按照leader属性和原始顺序排序
|
||||||
|
return indexedList.sort((a, b) => {
|
||||||
|
const leaderA = a.item.leader || 0;
|
||||||
|
const leaderB = b.item.leader || 0;
|
||||||
|
|
||||||
|
// 如果leader状态不同,优先按leader排序
|
||||||
|
if ((leaderA === 1 || leaderA === 2) && (leaderB !== 1 && leaderB !== 2)) {
|
||||||
|
return -1; // a排在前面
|
||||||
|
}
|
||||||
|
if ((leaderB === 1 || leaderB === 2) && (leaderA !== 1 && leaderA !== 2)) {
|
||||||
|
return 1; // b排在前面
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果都是管理员,按照leader值大小排序
|
||||||
|
if ((leaderA === 1 || leaderA === 2) && (leaderB === 1 || leaderB === 2)) {
|
||||||
|
return leaderB - leaderA; // leader值大的排前面
|
||||||
|
}
|
||||||
|
|
||||||
|
// 其他情况保持原始顺序
|
||||||
|
return a.index - b.index;
|
||||||
|
}).map(item => item.item); // 返回排序后的原始对象
|
||||||
|
})
|
||||||
|
|
||||||
//点击跳转到用户详情页面
|
//点击跳转到用户详情页面
|
||||||
const toUserDetailPage = (userItem) => {
|
const toUserDetailPage = (userItem) => {
|
||||||
console.log(userItem)
|
console.log(userItem)
|
||||||
|
@ -470,7 +470,7 @@ const { t } = useI18n()
|
|||||||
|
|
||||||
const {
|
const {
|
||||||
groupActiveIndex,
|
groupActiveIndex,
|
||||||
getDepsTreeMy,
|
getDepsTreeMy2,
|
||||||
depTreeMyList,
|
depTreeMyList,
|
||||||
crumbs,
|
crumbs,
|
||||||
crumbsIndex,
|
crumbsIndex,
|
||||||
@ -917,7 +917,7 @@ const init = async () => {
|
|||||||
depTreeMyList.value = []
|
depTreeMyList.value = []
|
||||||
crumbs.value = []
|
crumbs.value = []
|
||||||
|
|
||||||
await getDepsTreeMy()
|
await getDepsTreeMy2()
|
||||||
if (depTreeMyList.value.length) {
|
if (depTreeMyList.value.length) {
|
||||||
if (state.chooseMode === 1) {
|
if (state.chooseMode === 1) {
|
||||||
// 部门选择模式才创建 all 节点
|
// 部门选择模式才创建 all 节点
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mt-[54rpx] w-full h-[872rpx]">
|
<div class="mt-[54rpx] w-full h-[872rpx]">
|
||||||
<div
|
<div
|
||||||
@click="groupActiveIndex = 0"
|
@click="groupActiveIndex = 0;depCheckedKeys = []"
|
||||||
class="groupCard firstPanel"
|
class="groupCard firstPanel"
|
||||||
:class="groupActiveIndex === 0 ? 'activePanel' : ''"
|
:class="groupActiveIndex === 0 ? 'activePanel' : ''"
|
||||||
>
|
>
|
||||||
@ -95,7 +95,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@click="groupActiveIndex = 2"
|
@click="groupActiveIndex = 2;depCheckedKeys = [];"
|
||||||
class="groupCard thirdPanel"
|
class="groupCard thirdPanel"
|
||||||
:class="groupActiveIndex === 2 ? 'activePanel' : ''"
|
:class="groupActiveIndex === 2 ? 'activePanel' : ''"
|
||||||
>
|
>
|
||||||
@ -131,14 +131,16 @@
|
|||||||
import ZPaging from '@/uni_modules/z-paging/components/z-paging/z-paging.vue'
|
import ZPaging from '@/uni_modules/z-paging/components/z-paging/z-paging.vue'
|
||||||
import customBtn from '@/components/custom-btn/custom-btn.vue'
|
import customBtn from '@/components/custom-btn/custom-btn.vue'
|
||||||
import { ref, watch, computed } from 'vue'
|
import { ref, watch, computed } from 'vue'
|
||||||
import { onShow, onLoad } from '@dcloudio/uni-app'
|
import { onShow, onLoad, onUnload } from '@dcloudio/uni-app'
|
||||||
import { useChatList } from '@/store/chatList/index.js'
|
import { useChatList } from '@/store/chatList/index.js'
|
||||||
import { useAuth } from '@/store/auth'
|
import { useAuth } from '@/store/auth'
|
||||||
import { useTalkStore, useUserStore } from '@/store'
|
import { useTalkStore, useUserStore } from '@/store'
|
||||||
import { useGroupTypeStore } from '@/store/groupType'
|
import { useGroupTypeStore } from '@/store/groupType'
|
||||||
|
|
||||||
const { groupActiveIndex, depCheckedKeys } = useGroupTypeStore()
|
const { groupActiveIndex, depCheckedKeys } = useGroupTypeStore()
|
||||||
|
onUnload(()=> {
|
||||||
|
|
||||||
|
})
|
||||||
const confirmBtnStatus = computed(() => {
|
const confirmBtnStatus = computed(() => {
|
||||||
let disabledT = false
|
let disabledT = false
|
||||||
switch (groupActiveIndex.value) {
|
switch (groupActiveIndex.value) {
|
||||||
|
@ -187,7 +187,7 @@ import groupMemberList from '../chatSettings/components/groupMembersList.vue'
|
|||||||
import avatarModule from '@/components/avatar-module/index.vue'
|
import avatarModule from '@/components/avatar-module/index.vue'
|
||||||
|
|
||||||
import { ref, watch, computed, onMounted } from 'vue'
|
import { ref, watch, computed, onMounted } from 'vue'
|
||||||
import { onShow, onLoad } from '@dcloudio/uni-app'
|
import { onShow, onLoad, onUnload } from '@dcloudio/uni-app'
|
||||||
import { useChatList } from '@/store/chatList/index.js'
|
import { useChatList } from '@/store/chatList/index.js'
|
||||||
import { useAuth } from '@/store/auth'
|
import { useAuth } from '@/store/auth'
|
||||||
import { useTalkStore, useUserStore, useGroupStore } from '@/store'
|
import { useTalkStore, useUserStore, useGroupStore } from '@/store'
|
||||||
@ -214,10 +214,14 @@ const { userInfo } = useAuth()
|
|||||||
const groupChatType = ref('')
|
const groupChatType = ref('')
|
||||||
const depsNoExpanded = ref(true)
|
const depsNoExpanded = ref(true)
|
||||||
|
|
||||||
|
|
||||||
onLoad(()=> {
|
onLoad(()=> {
|
||||||
groupStore.$reset()
|
groupStore.$reset()
|
||||||
})
|
})
|
||||||
|
onUnload(()=> {
|
||||||
|
groupName.value = '';
|
||||||
|
groupActiveIndex.value = -1;
|
||||||
|
})
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
handleSetWebviewStyle()
|
handleSetWebviewStyle()
|
||||||
})
|
})
|
||||||
|
@ -10,6 +10,7 @@ import {
|
|||||||
departmentV2AllPosition,
|
departmentV2AllPosition,
|
||||||
groupCreateDept,
|
groupCreateDept,
|
||||||
departmentV2TreeAll,
|
departmentV2TreeAll,
|
||||||
|
departmentV2TreeAll2,
|
||||||
userV2List,
|
userV2List,
|
||||||
v2TreePositionByDepartment,
|
v2TreePositionByDepartment,
|
||||||
} from '@/api/deps/index.js'
|
} from '@/api/deps/index.js'
|
||||||
@ -35,6 +36,13 @@ export const useGroupTypeStore = createGlobalState(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getDepsTreeMy2 = async () => {
|
||||||
|
const res = await departmentV2TreeAll2()
|
||||||
|
if (res.status === 0) {
|
||||||
|
depTreeMyList.value = res.data.nodes
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//获取指定部门下的所有岗位
|
//获取指定部门下的所有岗位
|
||||||
const getPositionByDepartment = async (params) => {
|
const getPositionByDepartment = async (params) => {
|
||||||
const res = await v2TreePositionByDepartment(params)
|
const res = await v2TreePositionByDepartment(params)
|
||||||
@ -124,6 +132,7 @@ export const useGroupTypeStore = createGlobalState(() => {
|
|||||||
postTreeList,
|
postTreeList,
|
||||||
departmentAllPositions,
|
departmentAllPositions,
|
||||||
getDepsTreeMy,
|
getDepsTreeMy,
|
||||||
|
getDepsTreeMy2,
|
||||||
getPositionByDepartment,
|
getPositionByDepartment,
|
||||||
getPositionsTree,
|
getPositionsTree,
|
||||||
crumbs,
|
crumbs,
|
||||||
|
Loading…
Reference in New Issue
Block a user