Merge branch 'wyfMain-dev'
Some checks failed
Check / lint (push) Has been cancelled
Check / typecheck (push) Has been cancelled
Check / build (build, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build, 18.x, windows-latest) (push) Has been cancelled
Check / build (build:app, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:app, 18.x, windows-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Has been cancelled
Some checks failed
Check / lint (push) Has been cancelled
Check / typecheck (push) Has been cancelled
Check / build (build, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build, 18.x, windows-latest) (push) Has been cancelled
Check / build (build:app, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:app, 18.x, windows-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Has been cancelled
This commit is contained in:
commit
5c6f254114
@ -25,3 +25,12 @@ export const userLeaderApi = (data) => {
|
||||
baseURL:import.meta.env.VITE_EPR_BASEURL,
|
||||
})
|
||||
}
|
||||
|
||||
//点击头像查看用户详情
|
||||
export const getUserInfoByClickAvatar = (data) => {
|
||||
return request({
|
||||
url: '/api/v1/users/info',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
@ -1,6 +1,17 @@
|
||||
<template>
|
||||
<div class="custom-btn" :class="props.isBottom ? 'custom-btn-bottom' : ''">
|
||||
<wd-button custom-class="custom-btn-class" @click="clickBtn">{{ props.btnText }}</wd-button>
|
||||
<div
|
||||
class="custom-btn"
|
||||
:class="[
|
||||
props.isBottom ? 'custom-btn-bottom' : '',
|
||||
props.subBtnText ? 'apposition-btn-style' : '',
|
||||
]"
|
||||
>
|
||||
<wd-button custom-class="custom-sub-btn-class" v-if="props.subBtnText">
|
||||
{{ props.subBtnText }}
|
||||
</wd-button>
|
||||
<wd-button custom-class="custom-btn-class" @click="clickBtn">
|
||||
{{ props.btnText }}
|
||||
</wd-button>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
@ -11,6 +22,7 @@ const emits = defineEmits(['clickBtn'])
|
||||
const props = defineProps({
|
||||
isBottom: false, //是否底部按钮
|
||||
btnText: '', //按钮文字
|
||||
subBtnText: '', //次要按钮文字
|
||||
})
|
||||
|
||||
//点击
|
||||
@ -24,6 +36,16 @@ const clickBtn = () => {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.custom-sub-btn-class {
|
||||
background-color: #eee9f8;
|
||||
padding: 18rpx 185rpx;
|
||||
border-radius: 8rpx;
|
||||
box-shadow: 0 6px 12px 2px rgba(188, 188, 188, 0.08);
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
line-height: 40rpx;
|
||||
color: $theme-primary;
|
||||
}
|
||||
.custom-btn-class {
|
||||
background-color: $theme-primary;
|
||||
padding: 18rpx 185rpx;
|
||||
@ -39,4 +61,14 @@ const clickBtn = () => {
|
||||
background-color: #fff;
|
||||
padding: 14rpx 0 72rpx;
|
||||
}
|
||||
.apposition-btn-style {
|
||||
padding: 14rpx 30rpx 72rpx;
|
||||
.custom-sub-btn-class {
|
||||
padding: 18rpx 124rpx;
|
||||
margin: 0 20rpx 0 0;
|
||||
}
|
||||
.custom-btn-class {
|
||||
padding: 18rpx 124rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -43,7 +43,7 @@
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh":false
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -59,7 +59,7 @@
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh":false
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -178,6 +178,14 @@
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/dialog/dialogDetail/userDetail",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
@ -3,6 +3,7 @@
|
||||
<div
|
||||
class="group-member-list-each"
|
||||
v-for="(memberItem, memberIndex) in props?.memberList"
|
||||
@click="toUserDetailPage(memberItem)"
|
||||
>
|
||||
<div
|
||||
class="group-member-each"
|
||||
@ -20,7 +21,7 @@
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="group-member-tag" v-if="memberIndex < 3">
|
||||
<div class="group-member-tag" v-if="memberItem?.leader === 1">
|
||||
<span class="text-[16rpx] font-regular">
|
||||
{{ $t('group.identify.admin') }}
|
||||
</span>
|
||||
@ -40,6 +41,14 @@ const props = defineProps({
|
||||
memberList: Array, //人员列表
|
||||
memberListsLimit: Number, //人员列表数量限制
|
||||
})
|
||||
|
||||
//点击跳转到用户详情页面
|
||||
const toUserDetailPage = (userItem) => {
|
||||
console.log(userItem.erp_user_id)
|
||||
uni.navigateTo({
|
||||
url: '/pages/dialog/dialogDetail/userDetail?erpUserId=' + userItem.erp_user_id,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.group-member-list {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="outer-layer manage-group-silence-page">
|
||||
<div class="outer-layer manage-group-admin-page">
|
||||
<div class="root">
|
||||
<ZPaging ref="zPaging" :show-scrollbar="false">
|
||||
<template #top>
|
||||
@ -11,13 +11,30 @@
|
||||
</div>
|
||||
</tm-navbar>
|
||||
</template>
|
||||
<div class="manage-group-silence">
|
||||
<span class="manage-group-silence-title text-[28rpx] font-regular">
|
||||
<div class="manage-group-admin">
|
||||
<span class="manage-group-admin-title text-[28rpx] font-regular">
|
||||
{{ $t('chat.settings.groupAdmin') }}
|
||||
</span>
|
||||
<div
|
||||
class="add-silence-member-btn chat-settings-card"
|
||||
class="group-admin-list chat-settings-card"
|
||||
:style="{
|
||||
margin: state.groupAdminList.length > 0 ? '20rpx 0 0' : '',
|
||||
}"
|
||||
>
|
||||
<div
|
||||
class="group-admin-list-each"
|
||||
v-for="(item, index) in state.groupAdminList"
|
||||
:key="index"
|
||||
>
|
||||
<span>{{ item }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="add-admin-member-btn chat-settings-card"
|
||||
@click="toSelectMembersPage"
|
||||
:style="{
|
||||
margin: state.groupAdminList.length == 0 ? '20rpx 0 0' : '',
|
||||
}"
|
||||
>
|
||||
<img src="/src/static/image/chatSettings/add-btn.png" />
|
||||
<span class="text-[28rpx] font-medium">
|
||||
@ -25,39 +42,78 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<template #bottom>
|
||||
<customBtn :isBottom="true" :btnText="$t('ok')"></customBtn>
|
||||
</template>
|
||||
</ZPaging>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import customBtn from '@/components/custom-btn/custom-btn.vue'
|
||||
import ZPaging from '@/uni_modules/z-paging/components/z-paging/z-paging.vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { computed, onMounted, reactive } from 'vue'
|
||||
|
||||
import { useGroupTypeStore } from '@/store/groupType'
|
||||
import { useGroupStore, useDialogueStore } from '@/store'
|
||||
|
||||
import { useI18n } from 'vue-i18n'
|
||||
const { t } = useI18n()
|
||||
|
||||
const groupTypeStore = useGroupTypeStore()
|
||||
const groupTypeParams = reactive({
|
||||
postTreeList: computed(() => groupTypeStore.postTreeList),
|
||||
})
|
||||
const groupStore = useGroupStore()
|
||||
const groupParams = reactive({
|
||||
groupInfo: computed(() => groupStore.groupInfo),
|
||||
})
|
||||
const dialogueStore = useDialogueStore()
|
||||
|
||||
const dialogueParams = reactive({
|
||||
adminList: computed(() => dialogueStore.getAdminList),
|
||||
})
|
||||
|
||||
const state = reactive({
|
||||
silenceAllBtn: null, //全员禁言按钮
|
||||
groupAdminList: [], //群管理员列表
|
||||
})
|
||||
|
||||
onLoad((options) => {
|
||||
console.log(options)
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
onMounted(async () => {
|
||||
console.log(dialogueParams.adminList)
|
||||
await groupStore.ServeGroupDetail()
|
||||
await groupTypeStore.getPositionsTree()
|
||||
console.log(groupParams.groupInfo)
|
||||
console.log(groupTypeParams.postTreeList)
|
||||
assembleDepartmentPositions()
|
||||
})
|
||||
|
||||
//组装部门和岗位对应关系数据
|
||||
const assembleDepartmentPositions = () => {
|
||||
let deptPosArr = []
|
||||
if (groupParams?.groupInfo?.deptInfos?.length > 0) {
|
||||
if (groupParams?.groupInfo?.positionInfos?.length > 0) {
|
||||
groupParams?.groupInfo?.deptInfos.forEach((deptInfo) => {
|
||||
groupParams?.groupInfo?.positionInfos.forEach((positionInfo) => {
|
||||
let deptPosItem = groupTypeStore.getDepartmentPositionsById(
|
||||
deptInfo.dept_id,
|
||||
positionInfo.position_id,
|
||||
)
|
||||
if (deptPosItem) {
|
||||
deptPosArr.push(deptPosItem)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
console.log(deptPosArr)
|
||||
state.groupAdminList = deptPosArr
|
||||
}
|
||||
|
||||
//点击跳转到添加禁言成员页面
|
||||
const toSelectMembersPage = () => {
|
||||
uni.navigateTo({
|
||||
@ -73,13 +129,21 @@ const toSelectMembersPage = () => {
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.manage-group-silence {
|
||||
.manage-group-admin {
|
||||
padding: 20rpx 32rpx;
|
||||
.manage-group-silence-title {
|
||||
.manage-group-admin-title {
|
||||
line-height: 40rpx;
|
||||
color: #959598;
|
||||
}
|
||||
.add-silence-member-btn {
|
||||
|
||||
.group-admin-list {
|
||||
.group-admin-list-each {
|
||||
padding: 36rpx 0;
|
||||
margin: 0 32rpx;
|
||||
border-bottom: 1px solid $theme-border-color;
|
||||
}
|
||||
}
|
||||
.add-admin-member-btn {
|
||||
padding: 32rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@ -98,7 +162,6 @@ const toSelectMembersPage = () => {
|
||||
.chat-settings-card {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
margin: 20rpx 0 0;
|
||||
border-radius: 8rpx;
|
||||
box-shadow: 0 6px 12px 2px rgba(188, 188, 188, 0.08);
|
||||
}
|
||||
|
@ -426,6 +426,12 @@ const toSearchByConditionPage = (flag) => {
|
||||
} else {
|
||||
if (flag == 1) {
|
||||
condition = 'date'
|
||||
} else if (flag == 2) {
|
||||
condition = 'imgAndVideo'
|
||||
} else if (flag == 3) {
|
||||
condition = 'file'
|
||||
} else if (flag == 4) {
|
||||
condition = 'link'
|
||||
}
|
||||
uni.navigateTo({
|
||||
url:
|
||||
|
287
src/pages/dialog/dialogDetail/userDetail.vue
Normal file
287
src/pages/dialog/dialogDetail/userDetail.vue
Normal file
@ -0,0 +1,287 @@
|
||||
<template>
|
||||
<div class="outer-layer user-detail-page">
|
||||
<div class="root">
|
||||
<ZPaging ref="zPaging" :show-scrollbar="false">
|
||||
<template #top>
|
||||
<tm-navbar
|
||||
class="tmNavBar"
|
||||
:hideBack="false"
|
||||
hideHome
|
||||
title=""
|
||||
:leftWidth="220"
|
||||
></tm-navbar>
|
||||
</template>
|
||||
<div class="user-detail-info">
|
||||
<div class="user-info-head user-info-card">
|
||||
<div class="user-info-avatar">
|
||||
<img
|
||||
:src="state?.userInfo?.avatar"
|
||||
v-if="state?.userInfo?.avatar"
|
||||
/>
|
||||
<span
|
||||
v-if="!state?.userInfo?.avatar"
|
||||
class="text-[46rpx] font-bold"
|
||||
>
|
||||
{{
|
||||
state?.userInfo?.nickname.length >= 2
|
||||
? state?.userInfo?.nickname.slice(-2)
|
||||
: state?.userInfo?.nickname
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="user-info">
|
||||
<span class="text-[40rpx] font-medium user-info-name">
|
||||
{{ state?.userInfo?.nickname }}
|
||||
</span>
|
||||
<span class="text-[28rpx] font-medium user-info-job-num">
|
||||
{{ $t('user.info.jobNum') + ':' + state?.userInfo?.job_num }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="user-info-main user-info-card">
|
||||
<div class="user-info-main-title">
|
||||
<img src="/src/static/image/mine/ming001@3x.png" />
|
||||
<span class="text-[28rpx] font-medium">
|
||||
{{ $t('index.mine.basic') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="user-info-main-list">
|
||||
<div
|
||||
class="user-info-main-each"
|
||||
v-for="(item, index) in state.userBasicInfos"
|
||||
:key="index"
|
||||
>
|
||||
<span class="text-[28rpx] font-medium user-info-main-each-hint">
|
||||
{{ item.name }}
|
||||
</span>
|
||||
<span class="text-[28rpx] font-medium user-info-main-each-text">
|
||||
{{ item.value }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<template #bottom>
|
||||
<customBtn
|
||||
:isBottom="true"
|
||||
:btnText="$t('user.detail.sendMsg')"
|
||||
:subBtnText="$t('user.detail.ringBell')"
|
||||
></customBtn>
|
||||
</template>
|
||||
</ZPaging>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import customBtn from '@/components/custom-btn/custom-btn.vue'
|
||||
import ZPaging from '@/uni_modules/z-paging/components/z-paging/z-paging.vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { reactive } from 'vue'
|
||||
|
||||
import { getUserInfoByClickAvatar } from '@/api/user/index'
|
||||
|
||||
import { useI18n } from 'vue-i18n'
|
||||
const { t } = useI18n()
|
||||
|
||||
const state = reactive({
|
||||
erpUserId: '', //erp用户id
|
||||
userInfo: null, //用户详情
|
||||
userBasicInfos: [], //用户基本信息
|
||||
})
|
||||
|
||||
onLoad((options) => {
|
||||
console.log(options)
|
||||
if (options.erpUserId) {
|
||||
state.erpUserId = options.erpUserId
|
||||
getUserInfo()
|
||||
}
|
||||
})
|
||||
|
||||
//获取用户信息
|
||||
const getUserInfo = () => {
|
||||
let params = {
|
||||
erp_user_id: Number(state.erpUserId),
|
||||
}
|
||||
console.log(params)
|
||||
const resp = getUserInfoByClickAvatar(params)
|
||||
console.log(resp)
|
||||
resp.then(({ code, data }) => {
|
||||
console.log(data)
|
||||
if (code == 200) {
|
||||
state.userInfo = data
|
||||
let department = ''
|
||||
let post = ''
|
||||
if (data?.erp_dept_position?.length > 0) {
|
||||
data.erp_dept_position.forEach((item) => {
|
||||
if (!department) {
|
||||
department = item.department_name
|
||||
} else {
|
||||
department = department + '、' + item.department_name
|
||||
}
|
||||
if (!post) {
|
||||
post = item.position_name
|
||||
} else {
|
||||
post = post + '、' + item.position_name
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
let hasAddDepartment = department.split('、')
|
||||
let uniqueArr = [...new Set(hasAddDepartment)]
|
||||
department = uniqueArr.join('、')
|
||||
|
||||
let manager = ''
|
||||
if (data?.leaders?.length > 0) {
|
||||
data.leaders.forEach((item) => {
|
||||
if (!manager) {
|
||||
manager = item.user_name
|
||||
} else {
|
||||
manager = manager + '、' + item.user_name
|
||||
}
|
||||
})
|
||||
}
|
||||
state.userBasicInfos = [
|
||||
{
|
||||
name: t('index.mine.company'),
|
||||
value: data.company_name,
|
||||
},
|
||||
{
|
||||
name: t('index.mine.department'),
|
||||
value: department,
|
||||
},
|
||||
{
|
||||
name: t('index.mine.post'),
|
||||
value: post,
|
||||
},
|
||||
{
|
||||
name: t('index.mine.manager'),
|
||||
value: manager,
|
||||
},
|
||||
{
|
||||
name: t('index.mine.phone'),
|
||||
value: data.tel_num,
|
||||
},
|
||||
{
|
||||
name: t('index.mine.entry'),
|
||||
value: data.enter_date,
|
||||
},
|
||||
]
|
||||
} else {
|
||||
}
|
||||
})
|
||||
|
||||
resp.catch(() => {})
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.outer-layer {
|
||||
flex: 1;
|
||||
background-image: url('@/static/image/mine/1111.png');
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.tmNavBar {
|
||||
::v-deep .noNvueBorder {
|
||||
border-bottom: 0 !important;
|
||||
background-color: unset !important;
|
||||
box-shadow: unset !important;
|
||||
}
|
||||
}
|
||||
|
||||
.user-detail-page {
|
||||
.user-detail-info {
|
||||
padding: 86rpx 32rpx 0;
|
||||
.user-info-card {
|
||||
background-color: #fff;
|
||||
box-shadow: 0 6px 12px 2px rgba(188, 188, 188, 0.08);
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.user-info-head {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 20rpx 32rpx;
|
||||
.user-info-avatar {
|
||||
width: 154rpx;
|
||||
height: 154rpx;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(to right, #674bbc, #46299d);
|
||||
box-shadow: 0 6px 12px 2px rgba(70, 41, 157, 0.16);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
span {
|
||||
line-height: 64rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.user-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
margin: 0 0 0 32rpx;
|
||||
.user-info-name {
|
||||
line-height: 56rpx;
|
||||
color: $theme-text;
|
||||
}
|
||||
.user-info-job-num {
|
||||
margin: 12rpx 0 0;
|
||||
line-height: 40rpx;
|
||||
color: #b4b4b4;
|
||||
}
|
||||
}
|
||||
}
|
||||
.user-info-main {
|
||||
margin: 20rpx 0 0;
|
||||
padding: 0 18rpx;
|
||||
.user-info-main-title {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 38rpx 12rpx 32rpx;
|
||||
img {
|
||||
width: 36rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
span {
|
||||
line-height: 40rpx;
|
||||
color: $theme-text;
|
||||
margin: 0 0 0 20rpx;
|
||||
}
|
||||
}
|
||||
.user-info-main-list {
|
||||
.user-info-main-each {
|
||||
padding: 14rpx;
|
||||
border-top: 1px solid $theme-border-color;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
.user-info-main-each-hint {
|
||||
line-height: 40rpx;
|
||||
color: $theme-text;
|
||||
width: 112rpx;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.user-info-main-each-text {
|
||||
margin: 0 0 0 56rpx;
|
||||
line-height: 40rpx;
|
||||
color: #747474;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -54,7 +54,7 @@
|
||||
</aside>
|
||||
|
||||
<!-- 头像信息 -->
|
||||
<aside class="avatar-column">
|
||||
<aside class="avatar-column" @click="toUserDetailPage(item)">
|
||||
<im-avatar class="pointer" :src="item.avatar" :size="80" :username="item.nickname"
|
||||
@click="showUserInfoModal(item.user_id)" />
|
||||
</aside>
|
||||
@ -693,6 +693,13 @@ const toChatSettingsPage = () => {
|
||||
})
|
||||
}
|
||||
|
||||
//点击跳转到用户详情页面
|
||||
const toUserDetailPage = (userItem) => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/dialog/dialogDetail/userDetail?erpUserId=' + userItem.erp_user_id,
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
initData()
|
||||
})
|
||||
|
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div
|
||||
class="search-item"
|
||||
:class="props?.conditionType ? 'search-item-condition' : ''"
|
||||
v-if="resultName"
|
||||
:style="
|
||||
props.searchResultKey === 'talk_record_infos_receiver'
|
||||
@ -8,7 +9,10 @@
|
||||
: ''
|
||||
"
|
||||
>
|
||||
<div class="avatar-img">
|
||||
<div
|
||||
class="avatar-img"
|
||||
:class="props?.conditionType ? 'avatar-img-condition' : ''"
|
||||
>
|
||||
<img v-if="avatarImg !== 'textImg'" :src="avatarImg" />
|
||||
<span v-if="avatarImg === 'textImg'" class="text-[32rpx] font-bold">
|
||||
{{ imgText }}
|
||||
@ -21,7 +25,9 @@
|
||||
>
|
||||
<HighlightText
|
||||
:class="
|
||||
searchRecordDetail
|
||||
props?.conditionType
|
||||
? 'text-[28rpx] font-medium'
|
||||
: searchRecordDetail
|
||||
? 'text-[24rpx] font-medium'
|
||||
: 'text-[32rpx] font-medium'
|
||||
"
|
||||
@ -92,6 +98,7 @@ const props = defineProps({
|
||||
searchText: String, //搜索内容
|
||||
searchRecordDetail: Boolean, //是否是搜索聊天记录详情
|
||||
pointerIconSrc: String, //箭头图标
|
||||
conditionType: Number, //搜索类型
|
||||
})
|
||||
// 映射表-查找对应结构下的属性名
|
||||
const keyMapping = {
|
||||
@ -163,11 +170,21 @@ const avatarImg = computed(() => {
|
||||
if (!avatar) {
|
||||
avatar = groupTypeMapping[props.searchItem?.group_type]?.defaultImg
|
||||
}
|
||||
if (props?.conditionType) {
|
||||
avatar = props.searchItem.avatar
|
||||
if (!avatar) {
|
||||
avatar = groupTypeMapping[0]?.defaultImg
|
||||
}
|
||||
}
|
||||
return avatar
|
||||
})
|
||||
//名称
|
||||
const resultName = computed(() => {
|
||||
return getKeyValue(keyMapping[props.searchResultKey]?.name)
|
||||
let result_name = getKeyValue(keyMapping[props.searchResultKey]?.name)
|
||||
if (props?.conditionType) {
|
||||
result_name = props.searchItem.nickname
|
||||
}
|
||||
return result_name
|
||||
})
|
||||
//文字头像
|
||||
const imgText = computed(() => {
|
||||
@ -237,9 +254,6 @@ const resultDetail = computed(() => {
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.search-item:nth-child(1) {
|
||||
border-top: 1px solid $theme-border-color;
|
||||
}
|
||||
.search-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@ -269,6 +283,14 @@ const resultDetail = computed(() => {
|
||||
line-height: 44rpx;
|
||||
}
|
||||
}
|
||||
.avatar-img-condition {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
margin: 0 18rpx 0 0;
|
||||
span {
|
||||
font-size: 20rpx;
|
||||
}
|
||||
}
|
||||
.result-info {
|
||||
width: 100%;
|
||||
.info-name {
|
||||
@ -328,4 +350,7 @@ const resultDetail = computed(() => {
|
||||
}
|
||||
}
|
||||
}
|
||||
.search-item-condition {
|
||||
border: 0;
|
||||
}
|
||||
</style>
|
||||
|
@ -399,6 +399,7 @@ const clickSearchItem = (searchResultKey, searchItem) => {
|
||||
|
||||
.result-title {
|
||||
padding: 0 0 10rpx;
|
||||
border-bottom: 1px solid $theme-border-color;
|
||||
span {
|
||||
line-height: 40rpx;
|
||||
color: $theme-hint-text;
|
||||
|
@ -1,8 +1,16 @@
|
||||
<template>
|
||||
<div class="outer-layer search-by-condition-page">
|
||||
<div class="root">
|
||||
<ZPaging ref="zPaging" :show-scrollbar="false">
|
||||
<template #top>
|
||||
<ZPaging
|
||||
ref="zPaging"
|
||||
:show-scrollbar="false"
|
||||
@query="queryAllSearch"
|
||||
:refresher-enabled="false"
|
||||
:auto="false"
|
||||
:loading-more-default-as-loading="true"
|
||||
:inside-more="true"
|
||||
>
|
||||
<template #top v-if="state.showPageTitle">
|
||||
<tm-navbar :hideBack="false" hideHome title="" :leftWidth="220">
|
||||
<div class="navBar-title flex flex-col items-center justify-center">
|
||||
<span class="text-[34rpx] font-medium">
|
||||
@ -57,20 +65,217 @@
|
||||
:showDefault="false"
|
||||
></tm-calendar-view>
|
||||
</div>
|
||||
<div
|
||||
class="search-by-condition-input-list"
|
||||
v-if="
|
||||
state.condition === 'imgAndVideo' ||
|
||||
state.condition === 'file' ||
|
||||
state.condition === 'link'
|
||||
"
|
||||
:style="{
|
||||
padding: state.condition === 'imgAndVideo' ? '0 27rpx' : '',
|
||||
}"
|
||||
>
|
||||
<div
|
||||
class="search-by-condition-input"
|
||||
v-if="state.condition === 'file' || state.condition === 'link'"
|
||||
>
|
||||
<customInput
|
||||
:searchText="state.searchText"
|
||||
:first_talk_record_infos="state.first_talk_record_infos"
|
||||
@inputSearchText="inputSearchText"
|
||||
></customInput>
|
||||
<span
|
||||
@click="cancelSearch"
|
||||
class="search-by-condition-input-text text-[32rpx] font-medium"
|
||||
>
|
||||
{{ $t('cancel') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="search-by-condition-list">
|
||||
<div class="condition-dimensionality">
|
||||
<div
|
||||
class="condition-dimensionality-each"
|
||||
v-for="(conditionItem,
|
||||
conditionIndex) in state.searchResultList"
|
||||
:key="conditionIndex"
|
||||
>
|
||||
<div class="condition-dimensionality-each-month">
|
||||
<span class="text-[28rpx] font-regular">
|
||||
{{ conditionItem.dateMonth }}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="condition-each-resultList"
|
||||
:class="[
|
||||
state.condition === 'imgAndVideo'
|
||||
? 'condition-type-imgAndVideo-result'
|
||||
: '',
|
||||
]"
|
||||
>
|
||||
<div
|
||||
class="condition-each-resultList-each"
|
||||
v-for="(item, index) in conditionItem.monthResultList"
|
||||
:key="index"
|
||||
:style="{
|
||||
border: state.condition === 'imgAndVideo' ? '0' : '',
|
||||
padding:
|
||||
state.condition === 'imgAndVideo' ? '0 0 10rpx' : '',
|
||||
}"
|
||||
>
|
||||
<div
|
||||
class="condition-result-imgAndVideo"
|
||||
v-if="state.condition === 'imgAndVideo'"
|
||||
>
|
||||
<div
|
||||
class="condition-result-imgAndVideo-area"
|
||||
v-if="item?.extra?.items?.length > 0"
|
||||
>
|
||||
<div
|
||||
class="condition-result-imgAndVideo-each"
|
||||
v-for="(imgItem, imgIndex) in item?.extra?.items"
|
||||
:key="imgIndex"
|
||||
>
|
||||
<tm-image
|
||||
preview
|
||||
:src="imgItem?.content"
|
||||
v-if="imgItem?.type == 3"
|
||||
model="aspectFill"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="condition-result-imgAndVideo-area"
|
||||
v-if="item?.extra?.url"
|
||||
>
|
||||
<tm-image
|
||||
preview
|
||||
:src="
|
||||
item?.msg_type === 3
|
||||
? item?.extra?.url
|
||||
: item?.msg_type === 5
|
||||
? item?.extra?.cover
|
||||
: ''
|
||||
"
|
||||
model="aspectFill"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="condition-each-result-main"
|
||||
v-if="
|
||||
state.condition === 'file' || state.condition === 'link'
|
||||
"
|
||||
>
|
||||
<searchItem
|
||||
:searchItem="item"
|
||||
:conditionType="state.msg_type"
|
||||
></searchItem>
|
||||
<span
|
||||
class="text-[24rpx] font-medium condition-each-result-main-date"
|
||||
>
|
||||
{{ item.dateTime }}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="condition-each-result-attachments"
|
||||
v-if="
|
||||
state.condition === 'file' || state.condition === 'link'
|
||||
"
|
||||
>
|
||||
<div class="attachment-avatar">
|
||||
<img
|
||||
:src="item?.extra?.file_avatar"
|
||||
v-if="state.condition === 'file'"
|
||||
/>
|
||||
<img
|
||||
src="/src/static/image/search/result-link-icon.png"
|
||||
v-if="state.condition === 'link'"
|
||||
/>
|
||||
</div>
|
||||
<div class="attachment-info">
|
||||
<div class="attachment-info-title">
|
||||
<span
|
||||
class="text-[28rpx] font-regular"
|
||||
v-if="state.condition === 'file'"
|
||||
>
|
||||
{{ item?.extra?.name }}
|
||||
</span>
|
||||
<span
|
||||
class="text-[28rpx] font-regular"
|
||||
v-if="state.condition === 'link'"
|
||||
>
|
||||
{{ $t('record.share.link') }}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="attachment-sub-info"
|
||||
:style="{
|
||||
margin:
|
||||
state.condition === 'file' ? '20rpx 0 0' : '',
|
||||
}"
|
||||
>
|
||||
<span
|
||||
class="text-[24rpx] font-regular"
|
||||
v-if="state.condition === 'file'"
|
||||
>
|
||||
{{ item?.extra?.typeText }}
|
||||
</span>
|
||||
<span
|
||||
class="text-[24rpx] font-regular"
|
||||
v-if="state.condition === 'file'"
|
||||
style="margin: 0 0 0 20rpx;"
|
||||
>
|
||||
{{ item?.extra?.fileSize }}
|
||||
</span>
|
||||
<span
|
||||
class="text-[24rpx] font-regular"
|
||||
v-if="state.condition === 'link'"
|
||||
>
|
||||
{{ item?.extra?.content }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ZPaging>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import fileType_PPT from '@/static/image/search/fileType_PPT.png'
|
||||
import fileType_EXCEL from '@/static/image/search/fileType_EXCEL.png'
|
||||
import fileType_WORD from '@/static/image/search/fileType_WORD.png'
|
||||
import fileType_PDF from '@/static/image/search/fileType_PDF.png'
|
||||
import fileType_Files from '@/static/image/search/fileType_Files.png'
|
||||
import { fileFormatSize, fileSuffix } from '@/utils/strings'
|
||||
import searchItem from '../components/searchItem.vue'
|
||||
import customInput from '@/components/custom-input/custom-input.vue'
|
||||
import ZPaging from '@/uni_modules/z-paging/components/z-paging/z-paging.vue'
|
||||
import searchList from '../components/searchList.vue'
|
||||
import useZPaging from '@/uni_modules/z-paging/components/z-paging/js/hooks/useZPaging.js'
|
||||
import { parseTime } from '@/utils/datetime'
|
||||
import { onMounted, reactive } from 'vue'
|
||||
import { onMounted, reactive, computed, ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { ServeTalkDate } from '@/api/search/index'
|
||||
import { ServeFindTalkRecords } from '@/api/chat/index'
|
||||
import { useDialogueStore } from '@/store'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
const { t } = useI18n()
|
||||
|
||||
const zPaging = ref()
|
||||
useZPaging(zPaging)
|
||||
|
||||
const dialogueStore = useDialogueStore()
|
||||
const dialogueParams = reactive({
|
||||
talk_type: computed(() => dialogueStore.talk.talk_type),
|
||||
receiver_id: computed(() => dialogueStore.talk.receiver_id),
|
||||
})
|
||||
|
||||
let nowDay = new Date().setHours(0, 0, 0, 0)
|
||||
|
||||
const state = reactive({
|
||||
@ -84,6 +289,12 @@ const state = reactive({
|
||||
selectedMonth: new Date(nowDay), //当前选择的月份
|
||||
disabledDateArray: [], //被禁用的日期数组
|
||||
dArray: [], //日历日期数组
|
||||
showPageTitle: false, //是否显示页面标题
|
||||
searchText: '', //搜索内容
|
||||
first_talk_record_infos: Object,
|
||||
searchResultList: [], //搜索结果列表
|
||||
cursor: 0, //上次查询的游标
|
||||
msg_type: 0, //查询的消息类型
|
||||
})
|
||||
|
||||
onLoad((options) => {
|
||||
@ -94,8 +305,38 @@ onLoad((options) => {
|
||||
if (options.condition) {
|
||||
state.condition = options.condition
|
||||
if (options.condition === 'date') {
|
||||
state.showPageTitle = true
|
||||
state.pageTitle = t('search.condition.date')
|
||||
ServeQueryTalkDate(parseTime(state.nowDate, '{y}{m}'))
|
||||
} else if (options.condition === 'imgAndVideo') {
|
||||
state.showPageTitle = true
|
||||
state.pageTitle = t('record.searchType.imgWithVideo')
|
||||
state.msg_type = '3,5'
|
||||
queryAllSearch()
|
||||
} else if (options.condition === 'file') {
|
||||
console.log(dialogueParams)
|
||||
let first_talk_record_infos = {
|
||||
receiver_name: t('record.searchType.files'),
|
||||
}
|
||||
state.first_talk_record_infos = Object.assign(
|
||||
{},
|
||||
state.first_talk_record_infos,
|
||||
first_talk_record_infos,
|
||||
)
|
||||
state.msg_type = 6
|
||||
queryAllSearch()
|
||||
} else if (options.condition === 'link') {
|
||||
console.log(dialogueParams)
|
||||
let first_talk_record_infos = {
|
||||
receiver_name: t('record.searchType.link'),
|
||||
}
|
||||
state.first_talk_record_infos = Object.assign(
|
||||
{},
|
||||
state.first_talk_record_infos,
|
||||
first_talk_record_infos,
|
||||
)
|
||||
state.msg_type = 14
|
||||
queryAllSearch()
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -204,6 +445,109 @@ const confirmSelectedMonth = (e) => {
|
||||
const getDArray = (dArray) => {
|
||||
state.dArray = dArray
|
||||
}
|
||||
|
||||
//输入搜索内容
|
||||
const inputSearchText = (e) => {
|
||||
state.searchText = e
|
||||
}
|
||||
|
||||
//点击取消搜索
|
||||
const cancelSearch = () => {}
|
||||
|
||||
//查询数据
|
||||
const queryAllSearch = () => {
|
||||
let params = {
|
||||
talk_type: dialogueParams.talk_type, //1私聊;2群聊
|
||||
receiver_id: dialogueParams.receiver_id, //目标用户id或群聊id
|
||||
msg_type: state.msg_type, //消息类型:0:全部;2:代码;3:图片;4:音频;5:视频;6:文件;7:位置;9:会话;11群投票;12图文混合
|
||||
cursor: state.cursor, //上次查询的游标
|
||||
limit: 10, //数据行数
|
||||
no_limit: '', //1不限制
|
||||
direction: 'up', //down向下查最新,up向上查老数据
|
||||
start_time: '',
|
||||
end_time: '',
|
||||
group_member_user_id: 0, //群成员id,当查询群历史消息的时候,需要指定群成员的时候送
|
||||
}
|
||||
console.log(params)
|
||||
const resp = ServeFindTalkRecords(params)
|
||||
console.log(resp)
|
||||
resp.then(({ code, data }) => {
|
||||
console.log(data)
|
||||
if (code == 200) {
|
||||
let dateList = state.searchResultList
|
||||
let noMore = false
|
||||
if (data?.items?.length > 0) {
|
||||
data.items.forEach((item) => {
|
||||
item.dateTime = parseTime(item?.created_at, '{m}/{d}')
|
||||
item.extra.fileSize = fileFormatSize(item?.extra?.size)
|
||||
item.extra.typeText = item?.extra?.name
|
||||
? fileSuffix(item?.extra?.name)
|
||||
: ''
|
||||
item.extra.file_avatar = fileTypeAvatar(item?.extra?.typeText)
|
||||
console.log(item.extra.type)
|
||||
let year = new Date(item.created_at).getFullYear()
|
||||
let month = new Date(item.created_at).getMonth() + 1
|
||||
let dateMonth =
|
||||
year == state.nowDate.getFullYear() &&
|
||||
month == state.nowDate.getMonth() + 1
|
||||
? t('result.date.nowMonth')
|
||||
: year + '年' + month + '月'
|
||||
if (dateList.length > 0) {
|
||||
let hasAdd = false
|
||||
dateList.forEach((dateItem) => {
|
||||
if (dateItem.dateMonth === dateMonth) {
|
||||
dateItem.monthResultList.push(item)
|
||||
hasAdd = true
|
||||
}
|
||||
})
|
||||
if (!hasAdd) {
|
||||
console.log(dateList)
|
||||
dateList.push({
|
||||
dateMonth: dateMonth,
|
||||
monthResultList: [item],
|
||||
})
|
||||
}
|
||||
} else {
|
||||
dateList.push({
|
||||
dateMonth: dateMonth,
|
||||
monthResultList: [item],
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
noMore = true
|
||||
}
|
||||
console.log(dateList)
|
||||
state.cursor = data?.cursor
|
||||
zPaging.value?.completeByNoMore(dateList, noMore)
|
||||
} else {
|
||||
zPaging.value?.complete([])
|
||||
}
|
||||
})
|
||||
|
||||
resp.catch(() => {
|
||||
zPaging.value?.complete([])
|
||||
})
|
||||
}
|
||||
|
||||
//文件类型图标
|
||||
const fileTypeAvatar = (fileType) => {
|
||||
let file_type_avatar = fileType_Files
|
||||
if (fileType) {
|
||||
if (fileType === 'ppt' || fileType === 'pptx') {
|
||||
file_type_avatar = fileType_PPT
|
||||
} else if (fileType === 'pdf') {
|
||||
file_type_avatar = fileType_PDF
|
||||
} else if (fileType === 'doc' || fileType === 'docx') {
|
||||
file_type_avatar = fileType_WORD
|
||||
} else if (fileType === 'xls' || fileType === 'xlsx') {
|
||||
file_type_avatar = fileType_EXCEL
|
||||
} else {
|
||||
file_type_avatar = fileType_Files
|
||||
}
|
||||
}
|
||||
return file_type_avatar
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.search-by-date {
|
||||
@ -238,4 +582,130 @@ body::v-deep .tmicon-times-circle-fill {
|
||||
body::v-deep .round-3 {
|
||||
background: linear-gradient(to right, #674bbc, #46299d);
|
||||
}
|
||||
|
||||
.search-by-condition-input-list {
|
||||
padding: 20rpx 48rpx 0 42rpx;
|
||||
.search-by-condition-input {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.search-by-condition-input-text {
|
||||
flex-shrink: 0;
|
||||
margin: 0 0 0 20rpx;
|
||||
color: $theme-primary;
|
||||
}
|
||||
}
|
||||
|
||||
.search-by-condition-list {
|
||||
.condition-dimensionality {
|
||||
.condition-dimensionality-each {
|
||||
.condition-dimensionality-each-month {
|
||||
padding: 24rpx 0 10rpx;
|
||||
span {
|
||||
line-height: 40rpx;
|
||||
color: $theme-hint-text;
|
||||
}
|
||||
}
|
||||
.condition-each-resultList {
|
||||
.condition-each-resultList-each {
|
||||
border-bottom: 1px solid $theme-border-color;
|
||||
padding: 0 0 20rpx;
|
||||
.condition-each-result-main {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.condition-each-result-main-date {
|
||||
line-height: 34rpx;
|
||||
color: $theme-hint-text;
|
||||
}
|
||||
}
|
||||
.condition-each-result-attachments {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 24rpx 30rpx;
|
||||
background-color: #f3f3f3;
|
||||
border-radius: 8rpx;
|
||||
.attachment-avatar {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
img {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
}
|
||||
}
|
||||
.attachment-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
margin: 0 0 0 22rpx;
|
||||
.attachment-info-title {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
span {
|
||||
line-height: 40rpx;
|
||||
color: $theme-text;
|
||||
}
|
||||
}
|
||||
.attachment-sub-info {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
span {
|
||||
line-height: 34rpx;
|
||||
color: $theme-hint-text;
|
||||
word-break: break-all;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.condition-type-imgAndVideo-result {
|
||||
border-bottom: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
.condition-each-resultList-each {
|
||||
.condition-result-imgAndVideo {
|
||||
margin: 0 5rpx;
|
||||
::v-deep .overflow {
|
||||
width: 164rpx !important;
|
||||
height: 164rpx !important;
|
||||
}
|
||||
.condition-result-imgAndVideo-area {
|
||||
::v-deep .overflow {
|
||||
width: 164rpx !important;
|
||||
height: 164rpx !important;
|
||||
}
|
||||
::v-deep .round-0 {
|
||||
width: 164rpx !important;
|
||||
height: 164rpx !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
BIN
src/static/image/search/fileType_EXCEL.png
Normal file
BIN
src/static/image/search/fileType_EXCEL.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
src/static/image/search/fileType_Files.png
Normal file
BIN
src/static/image/search/fileType_Files.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
src/static/image/search/fileType_PDF.png
Normal file
BIN
src/static/image/search/fileType_PDF.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
src/static/image/search/fileType_PPT.png
Normal file
BIN
src/static/image/search/fileType_PPT.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
src/static/image/search/fileType_WORD.png
Normal file
BIN
src/static/image/search/fileType_WORD.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
src/static/image/search/result-link-icon.png
Normal file
BIN
src/static/image/search/result-link-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
@ -26,9 +26,9 @@ export const useGroupTypeStore = createGlobalState(() => {
|
||||
}
|
||||
}
|
||||
|
||||
const getPositionsTree= async()=>{
|
||||
const getPositionsTree = async () => {
|
||||
const res = await departmentV2AllPosition()
|
||||
if(res.status===0){
|
||||
if (res.status === 0) {
|
||||
postTreeList.value = res.data.nodes
|
||||
}
|
||||
}
|
||||
@ -39,11 +39,11 @@ export const useGroupTypeStore = createGlobalState(() => {
|
||||
}
|
||||
|
||||
const resetGroupInfo = () => {
|
||||
groupName.value = '';
|
||||
groupActiveIndex.value = -1;
|
||||
depTreeMyList.value = [];
|
||||
postTreeList.value = [];
|
||||
crumbs.value = [];
|
||||
groupName.value = ''
|
||||
groupActiveIndex.value = -1
|
||||
depTreeMyList.value = []
|
||||
postTreeList.value = []
|
||||
crumbs.value = []
|
||||
crumbsIndex.value = 0
|
||||
depCheckedKeys.value = []
|
||||
groupAdmins.value = []
|
||||
@ -51,23 +51,49 @@ export const useGroupTypeStore = createGlobalState(() => {
|
||||
|
||||
const createDepGroup = async (param) => {
|
||||
const res = await groupCreateDept({
|
||||
name:groupName.value,
|
||||
deptInfos:depCheckedKeys.value.map(v=>{
|
||||
name: groupName.value,
|
||||
deptInfos: depCheckedKeys.value.map((v) => {
|
||||
return {
|
||||
dept_id:v.ID,
|
||||
dept_name:v.name
|
||||
dept_id: v.ID,
|
||||
dept_name: v.name,
|
||||
}
|
||||
}),
|
||||
positionInfos:groupAdmins.value.map(v=>{
|
||||
positionInfos: groupAdmins.value.map((v) => {
|
||||
return {
|
||||
position_id:v.ID,
|
||||
position_name:v.name
|
||||
position_id: v.ID,
|
||||
position_name: v.name,
|
||||
}
|
||||
})
|
||||
}),
|
||||
})
|
||||
return res;
|
||||
return res
|
||||
}
|
||||
|
||||
//通过部门Id和岗位Id得到部门和岗位的对应关系
|
||||
const getDepartmentPositionsById = (departmentId, positionId) => {
|
||||
return buildDepMap(postTreeList.value).get(`${departmentId}-${positionId}`)
|
||||
}
|
||||
|
||||
//建立部门和岗位对应map
|
||||
const buildDepMap = (departments) => {
|
||||
const index = new Map()
|
||||
function traverse(deps) {
|
||||
for (let dep of deps) {
|
||||
if (dep.positions && dep.positions.length > 0) {
|
||||
dep.positions.forEach((position) => {
|
||||
index.set(
|
||||
`${dep.ID}-${position.ID}`,
|
||||
dep.name + '-' + position.name,
|
||||
)
|
||||
})
|
||||
}
|
||||
if (dep.sons && dep.sons.length > 0) {
|
||||
traverse(dep.sons)
|
||||
}
|
||||
}
|
||||
}
|
||||
traverse(departments)
|
||||
return index
|
||||
}
|
||||
|
||||
return {
|
||||
groupName,
|
||||
@ -85,5 +111,6 @@ export const useGroupTypeStore = createGlobalState(() => {
|
||||
getDepMembers,
|
||||
membersCheckedKeys,
|
||||
allChooseMembers,
|
||||
getDepartmentPositionsById
|
||||
}
|
||||
})
|
||||
|
@ -73,8 +73,7 @@ export const useDialogueStore = defineStore('dialogue', {
|
||||
getSilenceMember: (state) =>
|
||||
state.members.filter((item) => item.is_mute === 1),
|
||||
//获取群管理员
|
||||
getAdminList: (state) =>
|
||||
state.members.filter((item) => item.leader === 1),
|
||||
getAdminList: (state) => state.members.filter((item) => item.leader === 1),
|
||||
},
|
||||
actions: {
|
||||
// 更新在线状态
|
||||
@ -119,7 +118,8 @@ export const useDialogueStore = defineStore('dialogue', {
|
||||
remark: o.remark,
|
||||
online: false,
|
||||
value: o.nickname,
|
||||
key: o.key
|
||||
key: o.key,
|
||||
erp_user_id: o.erp_user_id,
|
||||
}))
|
||||
},
|
||||
|
||||
|
@ -60,7 +60,7 @@
|
||||
"index.mine.post": "岗位",
|
||||
"index.mine.manager": "主管",
|
||||
"index.mine.phone": "手机号",
|
||||
"index.mine.entry": "入职时间",
|
||||
"index.mine.entry": "入职日期",
|
||||
"index.mine.unable": "无法上传照片",
|
||||
"index.mine.face": "扫脸失败",
|
||||
"index.mine.recentPhoto": "个人近照",
|
||||
@ -96,6 +96,7 @@
|
||||
"search.chat.record": "搜索聊天记录",
|
||||
"record.searchType.date": "日期",
|
||||
"record.searchType.imgAndVideo": "图片及视频",
|
||||
"record.searchType.imgWithVideo": "图片与视频",
|
||||
"record.searchType.files": "文件",
|
||||
"record.searchType.link": "链接",
|
||||
"group.identify.admin": "管理员",
|
||||
@ -115,6 +116,11 @@
|
||||
"chat.manage.addSilenceMember": "添加禁言成员",
|
||||
"chatSettings.btn.undoSilence": "解禁",
|
||||
"silence.tag.hasDone": "已禁言",
|
||||
"chat.manage.addAdmin": "添加管理员",
|
||||
"search.condition.member": "按群成员查找"
|
||||
"chat.manage.addAdmin": "添加群管理员",
|
||||
"search.condition.member": "按群成员查找",
|
||||
"result.date.nowMonth": "这个月",
|
||||
"user.detail.ringBell": "打电话",
|
||||
"user.detail.sendMsg": "发消息",
|
||||
"user.info.jobNum": "工号",
|
||||
"record.share.link": "分享链接"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user