|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<section class="chat-container">
|
|
<section class="chat-container">
|
|
<div class="h-[80px] flex-y-center flex-row top">
|
|
<div class="h-[80px] flex-y-center flex-row top">
|
|
- <avatar :img="userInfos.avatar" size="large" class="ml-[32px]" />
|
|
|
|
|
|
+ <avatar :img="userInfos?.avatar || doctorInfo?.avatar" size="large" class="ml-[32px]" />
|
|
<span class="ml-[32px] text-[26px] color-[#414D55]">{{ doctorInfo.name }}</span>
|
|
<span class="ml-[32px] text-[26px] color-[#414D55]">{{ doctorInfo.name }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="chat-main">
|
|
<div class="chat-main">
|
|
@@ -28,7 +28,7 @@
|
|
:fileTypes="['doc', 'docx', 'xls', 'xlsx', 'pdf', 'zip', 'rar']"
|
|
:fileTypes="['doc', 'docx', 'xls', 'xlsx', 'pdf', 'zip', 'rar']"
|
|
@upload-success="uploadSuccess"
|
|
@upload-success="uploadSuccess"
|
|
>
|
|
>
|
|
- <svg-icon v-if="$props.uploadFileShow" icon-class="annex" size="30px" class="mr-[12px]" />
|
|
|
|
|
|
+ <svg-icon v-if="props.uploadFileShow" icon-class="annex" size="30px" class="mr-[12px]" />
|
|
</file-upload>
|
|
</file-upload>
|
|
</div>
|
|
</div>
|
|
<div class="edit-div-area">
|
|
<div class="edit-div-area">
|
|
@@ -47,19 +47,14 @@
|
|
* 编写者: JutarryWu
|
|
* 编写者: JutarryWu
|
|
*/
|
|
*/
|
|
import { getCurrentInstance } from 'vue'
|
|
import { getCurrentInstance } from 'vue'
|
|
-
|
|
|
|
-import dayjs from 'dayjs'
|
|
|
|
import ChatUtils from '@/utils/ChatUtils'
|
|
import ChatUtils from '@/utils/ChatUtils'
|
|
-import EditDiv from '@/components/Chat/EditDiv/index.vue'
|
|
|
|
|
|
+import dayjs from 'dayjs'
|
|
import MessageAPI from '@/api/message'
|
|
import MessageAPI from '@/api/message'
|
|
import UserAPI, { UserPageQuery, UserPageVO } from '@/api/user'
|
|
import UserAPI, { UserPageQuery, UserPageVO } from '@/api/user'
|
|
-// import { data } from 'autoprefixer'
|
|
|
|
import { useUserStore } from '@/store'
|
|
import { useUserStore } from '@/store'
|
|
-import { id } from 'element-plus/es/locale'
|
|
|
|
-import { text } from 'stream/consumers'
|
|
|
|
|
|
|
|
const instance = getCurrentInstance()
|
|
const instance = getCurrentInstance()
|
|
-const $props = defineProps({
|
|
|
|
|
|
+const props = defineProps({
|
|
userInfos: {
|
|
userInfos: {
|
|
type: Object
|
|
type: Object
|
|
},
|
|
},
|
|
@@ -68,12 +63,13 @@ const $props = defineProps({
|
|
default: false
|
|
default: false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
-const $state = reactive({})
|
|
|
|
-const $emits = defineEmits([])
|
|
|
|
|
|
+
|
|
|
|
+const emits = defineEmits([])
|
|
const showFace = ref(false)
|
|
const showFace = ref(false)
|
|
let doctorInfo = ref({
|
|
let doctorInfo = ref({
|
|
id: '',
|
|
id: '',
|
|
- name: ''
|
|
|
|
|
|
+ name: '',
|
|
|
|
+ avatar: ''
|
|
})
|
|
})
|
|
|
|
|
|
interface TempMsgItem1 {
|
|
interface TempMsgItem1 {
|
|
@@ -95,25 +91,7 @@ interface IMessageItem {
|
|
}
|
|
}
|
|
const userStore = useUserStore()
|
|
const userStore = useUserStore()
|
|
|
|
|
|
-let messageList = ref([
|
|
|
|
- {
|
|
|
|
- date: null,
|
|
|
|
- messages: [{ id: '', name: '', time: null, text: '' }]
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- date: null,
|
|
|
|
- messages: [
|
|
|
|
- { id: '', name: '', time: null, text: '' },
|
|
|
|
- {
|
|
|
|
- id: '',
|
|
|
|
- name: '',
|
|
|
|
- time: null,
|
|
|
|
- img: '',
|
|
|
|
- text: ''
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
-])
|
|
|
|
|
|
+let messageList = ref([])
|
|
let userMessageList = ref([])
|
|
let userMessageList = ref([])
|
|
let userMessageLists = ref([])
|
|
let userMessageLists = ref([])
|
|
const messageContent = ref('')
|
|
const messageContent = ref('')
|
|
@@ -232,7 +210,7 @@ const changeText = (value: any): void => {
|
|
}
|
|
}
|
|
function someChildMethod(data) {
|
|
function someChildMethod(data) {
|
|
console.log('woqu', data)
|
|
console.log('woqu', data)
|
|
- doctorInfo.value = { name: data.name, id: data.id }
|
|
|
|
|
|
+ doctorInfo.value = { name: data.name, id: data.id, avatar: data.avatar }
|
|
console.log(doctorInfo.value, '272')
|
|
console.log(doctorInfo.value, '272')
|
|
gQuerys()
|
|
gQuerys()
|
|
}
|
|
}
|
|
@@ -260,7 +238,7 @@ function user_myDoctor() {
|
|
UserAPI.user_myDoctor()
|
|
UserAPI.user_myDoctor()
|
|
.then((data) => {
|
|
.then((data) => {
|
|
console.log(data, '124')
|
|
console.log(data, '124')
|
|
- doctorInfo.value = { name: data.name, id: data.id }
|
|
|
|
|
|
+ doctorInfo.value = { name: data.name, id: data.id, avatar: data.avatar }
|
|
gQuerys()
|
|
gQuerys()
|
|
})
|
|
})
|
|
.finally(() => {})
|
|
.finally(() => {})
|
|
@@ -332,7 +310,6 @@ function gQuerys() {
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
ChatUtils.imageLoad('message-box')
|
|
ChatUtils.imageLoad('message-box')
|
|
- doctorInfo.value = $props.userInfos
|
|
|
|
user_myDoctor()
|
|
user_myDoctor()
|
|
gQuerys()
|
|
gQuerys()
|
|
})
|
|
})
|