mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-15 05:12:49 +00:00
no message
This commit is contained in:
parent
b78f93979d
commit
8bdd31ae67
@ -90,9 +90,9 @@
|
|||||||
<i class="taskfont"></i>
|
<i class="taskfont"></i>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
<template v-if="!isAiBot">
|
<template v-if="!isAiBot">
|
||||||
<div v-if="maybePhotoSrc" class="chat-input-popover-item maybe-photo" @click="onToolbar('maybe-photo')">
|
<div v-if="maybePhotoShow" class="chat-input-popover-item maybe-photo" @click="onToolbar('maybe-photo')">
|
||||||
<span>{{$L('你可能要发送的照片')}}:</span>
|
<span>{{$L('你可能要发送的照片')}}:</span>
|
||||||
<img :src="maybePhotoSrc" :style="maybePhotoStyle">
|
<div class="photo-preview" :style="maybePhotoStyle"></div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="recordReady" class="chat-input-popover-item" @click="onToolbar('meeting')">
|
<div v-if="recordReady" class="chat-input-popover-item" @click="onToolbar('meeting')">
|
||||||
<i class="taskfont"></i>
|
<i class="taskfont"></i>
|
||||||
@ -386,7 +386,8 @@ export default {
|
|||||||
|
|
||||||
mentionMode: '',
|
mentionMode: '',
|
||||||
|
|
||||||
maybePhotoSrc: '',
|
maybePhotoShow: false,
|
||||||
|
maybePhotoData: {},
|
||||||
maybePhotoStyle: {},
|
maybePhotoStyle: {},
|
||||||
|
|
||||||
userList: null,
|
userList: null,
|
||||||
@ -788,11 +789,33 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
showMore(val) {
|
showMore(val) {
|
||||||
|
this.maybePhotoShow = false
|
||||||
if (val) {
|
if (val) {
|
||||||
this.showMenu = false;
|
this.showMenu = false;
|
||||||
// this.showMore = false;
|
// this.showMore = false;
|
||||||
this.showEmoji = false;
|
this.showEmoji = false;
|
||||||
this.emojiQuickShow = false;
|
this.emojiQuickShow = false;
|
||||||
|
//
|
||||||
|
$A.eeuiAppGetLatestPhoto(({status, created, thumbnail, original}) => {
|
||||||
|
if (status !== 'success'
|
||||||
|
// || created + 60 < $A.dayjs().unix()
|
||||||
|
|| !thumbnail.base64
|
||||||
|
|| !original.path) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const width = 120;
|
||||||
|
const height = Math.min(150, thumbnail.height / (thumbnail.width / width));
|
||||||
|
this.maybePhotoStyle = {
|
||||||
|
width: width + 'px',
|
||||||
|
height: height + 'px',
|
||||||
|
backgroundImage: `url(${thumbnail.base64})`,
|
||||||
|
}
|
||||||
|
this.maybePhotoData = original
|
||||||
|
this.maybePhotoShow = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.more?.updatePopper()
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1619,6 +1642,33 @@ export default {
|
|||||||
this.openMenu("#");
|
this.openMenu("#");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'maybe-photo':
|
||||||
|
$A.eeuiAppUploadPhoto({
|
||||||
|
url: $A.apiUrl('dialog/msg/sendfile'),
|
||||||
|
data: {
|
||||||
|
dialog_id: this.dialogId,
|
||||||
|
},
|
||||||
|
headers: {
|
||||||
|
token: this.userToken,
|
||||||
|
},
|
||||||
|
path: this.maybePhotoData.path,
|
||||||
|
fieldName: "files"
|
||||||
|
}, ({status, data}) => {
|
||||||
|
/*switch (status) {
|
||||||
|
case "uploading":
|
||||||
|
break;
|
||||||
|
case "success":
|
||||||
|
if (data.ret !== 1) {
|
||||||
|
$A.messageError(data.msg || "上传失败")
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "error":
|
||||||
|
$A
|
||||||
|
break;
|
||||||
|
}*/
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
|
||||||
case 'meeting':
|
case 'meeting':
|
||||||
emitter.emit('addMeeting', {
|
emitter.emit('addMeeting', {
|
||||||
type: 'create',
|
type: 'create',
|
||||||
|
|||||||
@ -755,10 +755,11 @@
|
|||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
|
||||||
> img {
|
.photo-preview {
|
||||||
display: flex;
|
background-size: cover;
|
||||||
max-width: 100%;
|
background-position: center center;
|
||||||
width: 120px;
|
background-repeat: no-repeat;
|
||||||
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit 5bcd05203171ee552e56bddc621f43d1ce366f83
|
Subproject commit 0ed743c24355aed405433b0de472b5f878fd3bab
|
||||||
Loading…
x
Reference in New Issue
Block a user