Compare commits
No commits in common. "5c6f2541147839a84067873a42716f9a20d4c028" and "0989ffb96eb7e63c1812129d4a660af7eb7c9745" have entirely different histories.
5c6f254114
...
0989ffb96e
@ -25,12 +25,3 @@ export const userLeaderApi = (data) => {
|
|||||||
baseURL:import.meta.env.VITE_EPR_BASEURL,
|
baseURL:import.meta.env.VITE_EPR_BASEURL,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//点击头像查看用户详情
|
|
||||||
export const getUserInfoByClickAvatar = (data) => {
|
|
||||||
return request({
|
|
||||||
url: '/api/v1/users/info',
|
|
||||||
method: 'POST',
|
|
||||||
data,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
@ -1,17 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div class="custom-btn" :class="props.isBottom ? 'custom-btn-bottom' : ''">
|
||||||
class="custom-btn"
|
<wd-button custom-class="custom-btn-class" @click="clickBtn">{{ props.btnText }}</wd-button>
|
||||||
: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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
@ -22,7 +11,6 @@ const emits = defineEmits(['clickBtn'])
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
isBottom: false, //是否底部按钮
|
isBottom: false, //是否底部按钮
|
||||||
btnText: '', //按钮文字
|
btnText: '', //按钮文字
|
||||||
subBtnText: '', //次要按钮文字
|
|
||||||
})
|
})
|
||||||
|
|
||||||
//点击
|
//点击
|
||||||
@ -36,16 +24,6 @@ const clickBtn = () => {
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: 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 {
|
.custom-btn-class {
|
||||||
background-color: $theme-primary;
|
background-color: $theme-primary;
|
||||||
padding: 18rpx 185rpx;
|
padding: 18rpx 185rpx;
|
||||||
@ -61,14 +39,4 @@ const clickBtn = () => {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 14rpx 0 72rpx;
|
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>
|
</style>
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
"type": "page",
|
"type": "page",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh":false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -59,7 +59,7 @@
|
|||||||
"type": "page",
|
"type": "page",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh":false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -178,14 +178,6 @@
|
|||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/dialog/dialogDetail/userDetail",
|
|
||||||
"type": "page",
|
|
||||||
"style": {
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<div
|
<div
|
||||||
class="group-member-list-each"
|
class="group-member-list-each"
|
||||||
v-for="(memberItem, memberIndex) in props?.memberList"
|
v-for="(memberItem, memberIndex) in props?.memberList"
|
||||||
@click="toUserDetailPage(memberItem)"
|
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="group-member-each"
|
class="group-member-each"
|
||||||
@ -21,7 +20,7 @@
|
|||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="group-member-tag" v-if="memberItem?.leader === 1">
|
<div class="group-member-tag" v-if="memberIndex < 3">
|
||||||
<span class="text-[16rpx] font-regular">
|
<span class="text-[16rpx] font-regular">
|
||||||
{{ $t('group.identify.admin') }}
|
{{ $t('group.identify.admin') }}
|
||||||
</span>
|
</span>
|
||||||
@ -41,14 +40,6 @@ const props = defineProps({
|
|||||||
memberList: Array, //人员列表
|
memberList: Array, //人员列表
|
||||||
memberListsLimit: Number, //人员列表数量限制
|
memberListsLimit: Number, //人员列表数量限制
|
||||||
})
|
})
|
||||||
|
|
||||||
//点击跳转到用户详情页面
|
|
||||||
const toUserDetailPage = (userItem) => {
|
|
||||||
console.log(userItem.erp_user_id)
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/dialog/dialogDetail/userDetail?erpUserId=' + userItem.erp_user_id,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.group-member-list {
|
.group-member-list {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="outer-layer manage-group-admin-page">
|
<div class="outer-layer manage-group-silence-page">
|
||||||
<div class="root">
|
<div class="root">
|
||||||
<ZPaging ref="zPaging" :show-scrollbar="false">
|
<ZPaging ref="zPaging" :show-scrollbar="false">
|
||||||
<template #top>
|
<template #top>
|
||||||
@ -11,30 +11,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</tm-navbar>
|
</tm-navbar>
|
||||||
</template>
|
</template>
|
||||||
<div class="manage-group-admin">
|
<div class="manage-group-silence">
|
||||||
<span class="manage-group-admin-title text-[28rpx] font-regular">
|
<span class="manage-group-silence-title text-[28rpx] font-regular">
|
||||||
{{ $t('chat.settings.groupAdmin') }}
|
{{ $t('chat.settings.groupAdmin') }}
|
||||||
</span>
|
</span>
|
||||||
<div
|
<div
|
||||||
class="group-admin-list chat-settings-card"
|
class="add-silence-member-btn 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"
|
@click="toSelectMembersPage"
|
||||||
:style="{
|
|
||||||
margin: state.groupAdminList.length == 0 ? '20rpx 0 0' : '',
|
|
||||||
}"
|
|
||||||
>
|
>
|
||||||
<img src="/src/static/image/chatSettings/add-btn.png" />
|
<img src="/src/static/image/chatSettings/add-btn.png" />
|
||||||
<span class="text-[28rpx] font-medium">
|
<span class="text-[28rpx] font-medium">
|
||||||
@ -42,78 +25,39 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template #bottom>
|
|
||||||
<customBtn :isBottom="true" :btnText="$t('ok')"></customBtn>
|
|
||||||
</template>
|
|
||||||
</ZPaging>
|
</ZPaging>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<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 ZPaging from '@/uni_modules/z-paging/components/z-paging/z-paging.vue'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import { computed, onMounted, reactive } from 'vue'
|
import { computed, onMounted, reactive } from 'vue'
|
||||||
|
|
||||||
import { useGroupTypeStore } from '@/store/groupType'
|
|
||||||
import { useGroupStore, useDialogueStore } from '@/store'
|
import { useGroupStore, useDialogueStore } from '@/store'
|
||||||
|
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
const groupTypeStore = useGroupTypeStore()
|
|
||||||
const groupTypeParams = reactive({
|
|
||||||
postTreeList: computed(() => groupTypeStore.postTreeList),
|
|
||||||
})
|
|
||||||
const groupStore = useGroupStore()
|
const groupStore = useGroupStore()
|
||||||
const groupParams = reactive({
|
|
||||||
groupInfo: computed(() => groupStore.groupInfo),
|
|
||||||
})
|
|
||||||
const dialogueStore = useDialogueStore()
|
const dialogueStore = useDialogueStore()
|
||||||
|
|
||||||
const dialogueParams = reactive({
|
const dialogueParams = reactive({
|
||||||
adminList: computed(() => dialogueStore.getAdminList),
|
adminList: computed(() => dialogueStore.getAdminList),
|
||||||
})
|
})
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
silenceAllBtn: null, //全员禁言按钮
|
silenceAllBtn: null, //全员禁言按钮
|
||||||
groupAdminList: [], //群管理员列表
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
console.log(options)
|
console.log(options)
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(() => {
|
||||||
console.log(dialogueParams.adminList)
|
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 = () => {
|
const toSelectMembersPage = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@ -129,21 +73,13 @@ const toSelectMembersPage = () => {
|
|||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.manage-group-admin {
|
.manage-group-silence {
|
||||||
padding: 20rpx 32rpx;
|
padding: 20rpx 32rpx;
|
||||||
.manage-group-admin-title {
|
.manage-group-silence-title {
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
color: #959598;
|
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;
|
padding: 32rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
@ -162,6 +98,7 @@ const toSelectMembersPage = () => {
|
|||||||
.chat-settings-card {
|
.chat-settings-card {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
margin: 20rpx 0 0;
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
box-shadow: 0 6px 12px 2px rgba(188, 188, 188, 0.08);
|
box-shadow: 0 6px 12px 2px rgba(188, 188, 188, 0.08);
|
||||||
}
|
}
|
||||||
|
@ -426,12 +426,6 @@ const toSearchByConditionPage = (flag) => {
|
|||||||
} else {
|
} else {
|
||||||
if (flag == 1) {
|
if (flag == 1) {
|
||||||
condition = 'date'
|
condition = 'date'
|
||||||
} else if (flag == 2) {
|
|
||||||
condition = 'imgAndVideo'
|
|
||||||
} else if (flag == 3) {
|
|
||||||
condition = 'file'
|
|
||||||
} else if (flag == 4) {
|
|
||||||
condition = 'link'
|
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:
|
url:
|
||||||
|
@ -1,287 +0,0 @@
|
|||||||
<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>
|
||||||
|
|
||||||
<!-- 头像信息 -->
|
<!-- 头像信息 -->
|
||||||
<aside class="avatar-column" @click="toUserDetailPage(item)">
|
<aside class="avatar-column">
|
||||||
<im-avatar class="pointer" :src="item.avatar" :size="80" :username="item.nickname"
|
<im-avatar class="pointer" :src="item.avatar" :size="80" :username="item.nickname"
|
||||||
@click="showUserInfoModal(item.user_id)" />
|
@click="showUserInfoModal(item.user_id)" />
|
||||||
</aside>
|
</aside>
|
||||||
@ -693,13 +693,6 @@ const toChatSettingsPage = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//点击跳转到用户详情页面
|
|
||||||
const toUserDetailPage = (userItem) => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/dialog/dialogDetail/userDetail?erpUserId=' + userItem.erp_user_id,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
initData()
|
initData()
|
||||||
})
|
})
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="search-item"
|
class="search-item"
|
||||||
:class="props?.conditionType ? 'search-item-condition' : ''"
|
|
||||||
v-if="resultName"
|
v-if="resultName"
|
||||||
:style="
|
:style="
|
||||||
props.searchResultKey === 'talk_record_infos_receiver'
|
props.searchResultKey === 'talk_record_infos_receiver'
|
||||||
@ -9,10 +8,7 @@
|
|||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div
|
<div class="avatar-img">
|
||||||
class="avatar-img"
|
|
||||||
:class="props?.conditionType ? 'avatar-img-condition' : ''"
|
|
||||||
>
|
|
||||||
<img v-if="avatarImg !== 'textImg'" :src="avatarImg" />
|
<img v-if="avatarImg !== 'textImg'" :src="avatarImg" />
|
||||||
<span v-if="avatarImg === 'textImg'" class="text-[32rpx] font-bold">
|
<span v-if="avatarImg === 'textImg'" class="text-[32rpx] font-bold">
|
||||||
{{ imgText }}
|
{{ imgText }}
|
||||||
@ -25,9 +21,7 @@
|
|||||||
>
|
>
|
||||||
<HighlightText
|
<HighlightText
|
||||||
:class="
|
:class="
|
||||||
props?.conditionType
|
searchRecordDetail
|
||||||
? 'text-[28rpx] font-medium'
|
|
||||||
: searchRecordDetail
|
|
||||||
? 'text-[24rpx] font-medium'
|
? 'text-[24rpx] font-medium'
|
||||||
: 'text-[32rpx] font-medium'
|
: 'text-[32rpx] font-medium'
|
||||||
"
|
"
|
||||||
@ -98,7 +92,6 @@ const props = defineProps({
|
|||||||
searchText: String, //搜索内容
|
searchText: String, //搜索内容
|
||||||
searchRecordDetail: Boolean, //是否是搜索聊天记录详情
|
searchRecordDetail: Boolean, //是否是搜索聊天记录详情
|
||||||
pointerIconSrc: String, //箭头图标
|
pointerIconSrc: String, //箭头图标
|
||||||
conditionType: Number, //搜索类型
|
|
||||||
})
|
})
|
||||||
// 映射表-查找对应结构下的属性名
|
// 映射表-查找对应结构下的属性名
|
||||||
const keyMapping = {
|
const keyMapping = {
|
||||||
@ -170,21 +163,11 @@ const avatarImg = computed(() => {
|
|||||||
if (!avatar) {
|
if (!avatar) {
|
||||||
avatar = groupTypeMapping[props.searchItem?.group_type]?.defaultImg
|
avatar = groupTypeMapping[props.searchItem?.group_type]?.defaultImg
|
||||||
}
|
}
|
||||||
if (props?.conditionType) {
|
|
||||||
avatar = props.searchItem.avatar
|
|
||||||
if (!avatar) {
|
|
||||||
avatar = groupTypeMapping[0]?.defaultImg
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return avatar
|
return avatar
|
||||||
})
|
})
|
||||||
//名称
|
//名称
|
||||||
const resultName = computed(() => {
|
const resultName = computed(() => {
|
||||||
let result_name = getKeyValue(keyMapping[props.searchResultKey]?.name)
|
return getKeyValue(keyMapping[props.searchResultKey]?.name)
|
||||||
if (props?.conditionType) {
|
|
||||||
result_name = props.searchItem.nickname
|
|
||||||
}
|
|
||||||
return result_name
|
|
||||||
})
|
})
|
||||||
//文字头像
|
//文字头像
|
||||||
const imgText = computed(() => {
|
const imgText = computed(() => {
|
||||||
@ -254,6 +237,9 @@ const resultDetail = computed(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.search-item:nth-child(1) {
|
||||||
|
border-top: 1px solid $theme-border-color;
|
||||||
|
}
|
||||||
.search-item {
|
.search-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
@ -283,14 +269,6 @@ const resultDetail = computed(() => {
|
|||||||
line-height: 44rpx;
|
line-height: 44rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.avatar-img-condition {
|
|
||||||
width: 64rpx;
|
|
||||||
height: 64rpx;
|
|
||||||
margin: 0 18rpx 0 0;
|
|
||||||
span {
|
|
||||||
font-size: 20rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.result-info {
|
.result-info {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.info-name {
|
.info-name {
|
||||||
@ -350,7 +328,4 @@ const resultDetail = computed(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.search-item-condition {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -399,7 +399,6 @@ const clickSearchItem = (searchResultKey, searchItem) => {
|
|||||||
|
|
||||||
.result-title {
|
.result-title {
|
||||||
padding: 0 0 10rpx;
|
padding: 0 0 10rpx;
|
||||||
border-bottom: 1px solid $theme-border-color;
|
|
||||||
span {
|
span {
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
color: $theme-hint-text;
|
color: $theme-hint-text;
|
||||||
|
@ -1,16 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="outer-layer search-by-condition-page">
|
<div class="outer-layer search-by-condition-page">
|
||||||
<div class="root">
|
<div class="root">
|
||||||
<ZPaging
|
<ZPaging ref="zPaging" :show-scrollbar="false">
|
||||||
ref="zPaging"
|
<template #top>
|
||||||
: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">
|
<tm-navbar :hideBack="false" hideHome title="" :leftWidth="220">
|
||||||
<div class="navBar-title flex flex-col items-center justify-center">
|
<div class="navBar-title flex flex-col items-center justify-center">
|
||||||
<span class="text-[34rpx] font-medium">
|
<span class="text-[34rpx] font-medium">
|
||||||
@ -65,217 +57,20 @@
|
|||||||
:showDefault="false"
|
:showDefault="false"
|
||||||
></tm-calendar-view>
|
></tm-calendar-view>
|
||||||
</div>
|
</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>
|
</ZPaging>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<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 ZPaging from '@/uni_modules/z-paging/components/z-paging/z-paging.vue'
|
||||||
import useZPaging from '@/uni_modules/z-paging/components/z-paging/js/hooks/useZPaging.js'
|
import searchList from '../components/searchList.vue'
|
||||||
import { parseTime } from '@/utils/datetime'
|
import { parseTime } from '@/utils/datetime'
|
||||||
import { onMounted, reactive, computed, ref } from 'vue'
|
import { onMounted, reactive } from 'vue'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import { ServeTalkDate } from '@/api/search/index'
|
import { ServeTalkDate } from '@/api/search/index'
|
||||||
import { ServeFindTalkRecords } from '@/api/chat/index'
|
|
||||||
import { useDialogueStore } from '@/store'
|
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
const { t } = useI18n()
|
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)
|
let nowDay = new Date().setHours(0, 0, 0, 0)
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
@ -289,12 +84,6 @@ const state = reactive({
|
|||||||
selectedMonth: new Date(nowDay), //当前选择的月份
|
selectedMonth: new Date(nowDay), //当前选择的月份
|
||||||
disabledDateArray: [], //被禁用的日期数组
|
disabledDateArray: [], //被禁用的日期数组
|
||||||
dArray: [], //日历日期数组
|
dArray: [], //日历日期数组
|
||||||
showPageTitle: false, //是否显示页面标题
|
|
||||||
searchText: '', //搜索内容
|
|
||||||
first_talk_record_infos: Object,
|
|
||||||
searchResultList: [], //搜索结果列表
|
|
||||||
cursor: 0, //上次查询的游标
|
|
||||||
msg_type: 0, //查询的消息类型
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
@ -305,38 +94,8 @@ onLoad((options) => {
|
|||||||
if (options.condition) {
|
if (options.condition) {
|
||||||
state.condition = options.condition
|
state.condition = options.condition
|
||||||
if (options.condition === 'date') {
|
if (options.condition === 'date') {
|
||||||
state.showPageTitle = true
|
|
||||||
state.pageTitle = t('search.condition.date')
|
state.pageTitle = t('search.condition.date')
|
||||||
ServeQueryTalkDate(parseTime(state.nowDate, '{y}{m}'))
|
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()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -445,109 +204,6 @@ const confirmSelectedMonth = (e) => {
|
|||||||
const getDArray = (dArray) => {
|
const getDArray = (dArray) => {
|
||||||
state.dArray = 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>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.search-by-date {
|
.search-by-date {
|
||||||
@ -582,130 +238,4 @@ body::v-deep .tmicon-times-circle-fill {
|
|||||||
body::v-deep .round-3 {
|
body::v-deep .round-3 {
|
||||||
background: linear-gradient(to right, #674bbc, #46299d);
|
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>
|
</style>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB |
@ -26,9 +26,9 @@ export const useGroupTypeStore = createGlobalState(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const getPositionsTree = async () => {
|
const getPositionsTree= async()=>{
|
||||||
const res = await departmentV2AllPosition()
|
const res = await departmentV2AllPosition()
|
||||||
if (res.status === 0) {
|
if(res.status===0){
|
||||||
postTreeList.value = res.data.nodes
|
postTreeList.value = res.data.nodes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -39,11 +39,11 @@ export const useGroupTypeStore = createGlobalState(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const resetGroupInfo = () => {
|
const resetGroupInfo = () => {
|
||||||
groupName.value = ''
|
groupName.value = '';
|
||||||
groupActiveIndex.value = -1
|
groupActiveIndex.value = -1;
|
||||||
depTreeMyList.value = []
|
depTreeMyList.value = [];
|
||||||
postTreeList.value = []
|
postTreeList.value = [];
|
||||||
crumbs.value = []
|
crumbs.value = [];
|
||||||
crumbsIndex.value = 0
|
crumbsIndex.value = 0
|
||||||
depCheckedKeys.value = []
|
depCheckedKeys.value = []
|
||||||
groupAdmins.value = []
|
groupAdmins.value = []
|
||||||
@ -51,49 +51,23 @@ export const useGroupTypeStore = createGlobalState(() => {
|
|||||||
|
|
||||||
const createDepGroup = async (param) => {
|
const createDepGroup = async (param) => {
|
||||||
const res = await groupCreateDept({
|
const res = await groupCreateDept({
|
||||||
name: groupName.value,
|
name:groupName.value,
|
||||||
deptInfos: depCheckedKeys.value.map((v) => {
|
deptInfos:depCheckedKeys.value.map(v=>{
|
||||||
return {
|
return {
|
||||||
dept_id: v.ID,
|
dept_id:v.ID,
|
||||||
dept_name: v.name,
|
dept_name:v.name
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
positionInfos: groupAdmins.value.map((v) => {
|
positionInfos:groupAdmins.value.map(v=>{
|
||||||
return {
|
return {
|
||||||
position_id: v.ID,
|
position_id:v.ID,
|
||||||
position_name: v.name,
|
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 {
|
return {
|
||||||
groupName,
|
groupName,
|
||||||
@ -111,6 +85,5 @@ export const useGroupTypeStore = createGlobalState(() => {
|
|||||||
getDepMembers,
|
getDepMembers,
|
||||||
membersCheckedKeys,
|
membersCheckedKeys,
|
||||||
allChooseMembers,
|
allChooseMembers,
|
||||||
getDepartmentPositionsById
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -73,7 +73,8 @@ export const useDialogueStore = defineStore('dialogue', {
|
|||||||
getSilenceMember: (state) =>
|
getSilenceMember: (state) =>
|
||||||
state.members.filter((item) => item.is_mute === 1),
|
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: {
|
actions: {
|
||||||
// 更新在线状态
|
// 更新在线状态
|
||||||
@ -118,8 +119,7 @@ export const useDialogueStore = defineStore('dialogue', {
|
|||||||
remark: o.remark,
|
remark: o.remark,
|
||||||
online: false,
|
online: false,
|
||||||
value: o.nickname,
|
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.post": "岗位",
|
||||||
"index.mine.manager": "主管",
|
"index.mine.manager": "主管",
|
||||||
"index.mine.phone": "手机号",
|
"index.mine.phone": "手机号",
|
||||||
"index.mine.entry": "入职日期",
|
"index.mine.entry": "入职时间",
|
||||||
"index.mine.unable": "无法上传照片",
|
"index.mine.unable": "无法上传照片",
|
||||||
"index.mine.face": "扫脸失败",
|
"index.mine.face": "扫脸失败",
|
||||||
"index.mine.recentPhoto": "个人近照",
|
"index.mine.recentPhoto": "个人近照",
|
||||||
@ -96,7 +96,6 @@
|
|||||||
"search.chat.record": "搜索聊天记录",
|
"search.chat.record": "搜索聊天记录",
|
||||||
"record.searchType.date": "日期",
|
"record.searchType.date": "日期",
|
||||||
"record.searchType.imgAndVideo": "图片及视频",
|
"record.searchType.imgAndVideo": "图片及视频",
|
||||||
"record.searchType.imgWithVideo": "图片与视频",
|
|
||||||
"record.searchType.files": "文件",
|
"record.searchType.files": "文件",
|
||||||
"record.searchType.link": "链接",
|
"record.searchType.link": "链接",
|
||||||
"group.identify.admin": "管理员",
|
"group.identify.admin": "管理员",
|
||||||
@ -116,11 +115,6 @@
|
|||||||
"chat.manage.addSilenceMember": "添加禁言成员",
|
"chat.manage.addSilenceMember": "添加禁言成员",
|
||||||
"chatSettings.btn.undoSilence": "解禁",
|
"chatSettings.btn.undoSilence": "解禁",
|
||||||
"silence.tag.hasDone": "已禁言",
|
"silence.tag.hasDone": "已禁言",
|
||||||
"chat.manage.addAdmin": "添加群管理员",
|
"chat.manage.addAdmin": "添加管理员",
|
||||||
"search.condition.member": "按群成员查找",
|
"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