no message

This commit is contained in:
kuaifan 2025-04-12 23:59:54 +08:00
parent 484bc6ea39
commit d8872f215b
6 changed files with 83 additions and 34 deletions

View File

@ -334,7 +334,8 @@ export default {
this.searchKey = "" this.searchKey = ""
} }
this.$emit("on-show-change", v) this.$emit("on-show-change", v)
$A.eeuiAppSetScrollDisabled(v) //
$A.eeuiAppSetScrollDisabled(v && this.windowPortrait)
}, },
searchKey() { searchKey() {

View File

@ -414,6 +414,9 @@ export default {
} }
let value = $A.rightDelete(this.cacheServerUrl, "/api/"); let value = $A.rightDelete(this.cacheServerUrl, "/api/");
value = $A.leftDelete(value, "http://"); value = $A.leftDelete(value, "http://");
if (!value && /^https?:/.test(window.location.protocol)) {
value = window.location.host
}
$A.modalInput({ $A.modalInput({
title: "使用 SSO 登录", title: "使用 SSO 登录",
value, value,

View File

@ -89,7 +89,7 @@ export default {
}, },
show(v) { show(v) {
$A.eeuiAppSetScrollDisabled(v) $A.eeuiAppSetScrollDisabled(v && this.windowPortrait)
} }
}, },

View File

@ -722,6 +722,9 @@ export default {
focusLazy: false, focusLazy: false,
focusTimer: null, focusTimer: null,
keepInterval: null,
keepIntoTimer: null,
allMsgs: [], allMsgs: [],
tempMsgs: [], tempMsgs: [],
tempId: $A.randNum(1000000000, 9999999999), tempId: $A.randNum(1000000000, 9999999999),
@ -833,11 +836,13 @@ export default {
mounted() { mounted() {
emitter.on('websocketMsg', this.onWebsocketMsg); emitter.on('websocketMsg', this.onWebsocketMsg);
emitter.on('dialogMsgChange', this.onMsgChange); emitter.on('dialogMsgChange', this.onMsgChange);
this.keepInterval = setInterval(this.keepIntoInput, 1000)
this.windowTouch && document.addEventListener('selectionchange', this.onSelectionchange); this.windowTouch && document.addEventListener('selectionchange', this.onSelectionchange);
}, },
beforeDestroy() { beforeDestroy() {
this.windowTouch && document.removeEventListener('selectionchange', this.onSelectionchange); this.windowTouch && document.removeEventListener('selectionchange', this.onSelectionchange);
clearInterval(this.keepInterval);
emitter.off('dialogMsgChange', this.onMsgChange); emitter.off('dialogMsgChange', this.onMsgChange);
emitter.off('websocketMsg', this.onWebsocketMsg); emitter.off('websocketMsg', this.onWebsocketMsg);
this.generateUnreadData(this.dialogId) this.generateUnreadData(this.dialogId)
@ -879,7 +884,6 @@ export default {
'formOptions', 'formOptions',
'cacheTranslationLanguage', 'cacheTranslationLanguage',
'longpressData', 'longpressData',
'viewportHeight',
'keyboardShow', 'keyboardShow',
'keyboardHeight', 'keyboardHeight',
]), ]),
@ -1414,22 +1418,6 @@ export default {
} }
document.getSelection().removeAllRanges(); document.getSelection().removeAllRanges();
}, },
viewportHeight() {
if (this.location !== 'modal' || !this.$isEEUiApp) {
return
}
if (this.viewportTimer) {
this.viewportTimer()
this.viewportTimer = null
}
this.viewportTimer = $A.repeatWithCount(() => {
this.$refs.footer?.scrollIntoView({
block: 'end',
behavior: 'smooth'
})
}, 500, 500, 2)
}
}, },
methods: { methods: {
@ -4391,6 +4379,25 @@ export default {
} catch (e) { } catch (e) {
// console.log(e) // console.log(e)
} }
},
keepIntoInput() {
if (!this.$isEEUiApp) {
return
}
this.keepIntoTimer && clearTimeout(this.keepIntoTimer)
this.keepIntoTimer = setTimeout(_ => {
if (!this.keyboardShow) {
return true; //
}
if (!this.$refs.input?.isFocus) {
return true; //
}
this.$refs.footer?.scrollIntoView({
block: 'end',
behavior: 'smooth'
})
}, 500)
} }
} }
} }

View File

@ -431,7 +431,11 @@
</Scrollbar> </Scrollbar>
<TaskUpload ref="upload" class="upload" @on-select-file="onSelectFile"/> <TaskUpload ref="upload" class="upload" @on-select-file="onSelectFile"/>
</div> </div>
<div v-show="taskDetail.id > 0" class="task-dialog" :style="dialogStyle"> <div
v-show="taskDetail.id > 0"
ref="taskDialog"
class="task-dialog"
:style="dialogStyle">
<template v-if="hasOpenDialog"> <template v-if="hasOpenDialog">
<ResizeLine <ResizeLine
class="task-resize" class="task-resize"
@ -485,11 +489,18 @@
</div> </div>
</div> </div>
</div> </div>
<ProjectLog v-if="navActive=='log' && taskId > 0" ref="log" :task-id="taskDetail.id" :show-load="false" @on-load-change="logLoadChange"/> <ProjectLog
<div v-else class="no-dialog" v-if="navActive=='log' && taskId > 0"
@drop.prevent="taskPasteDrag($event, 'drag')" ref="log"
@dragover.prevent="taskDragOver(true, $event)" :task-id="taskDetail.id"
@dragleave.prevent="taskDragOver(false, $event)"> :show-load="false"
@on-load-change="logLoadChange"/>
<div
v-else
class="no-dialog"
@drop.prevent="taskPasteDrag($event, 'drag')"
@dragover.prevent="taskDragOver(true, $event)"
@dragleave.prevent="taskDragOver(false, $event)">
<div class="no-input"> <div class="no-input">
<ChatInput <ChatInput
ref="chatInput" ref="chatInput"
@ -668,8 +679,9 @@ export default {
loopForce: false, loopForce: false,
nowTime: $A.dayjs().unix(), keepInterval: null,
nowInterval: null, keepIntoTimer: null,
keepUnix: $A.dayjs().unix(),
msgText: '', msgText: '',
msgFile: [], msgFile: [],
@ -732,15 +744,16 @@ export default {
}, },
mounted() { mounted() {
this.nowInterval = setInterval(() => { this.keepInterval = setInterval(() => {
this.nowTime = $A.dayjs().unix(); this.keepUnix = $A.dayjs().unix();
this.keepIntoInput();
}, 1000); }, 1000);
// //
emitter.on('receiveTask', this.onReceiveShow); emitter.on('receiveTask', this.onReceiveShow);
}, },
destroyed() { destroyed() {
clearInterval(this.nowInterval); clearInterval(this.keepInterval);
// //
emitter.off('receiveTask', this.onReceiveShow); emitter.off('receiveTask', this.onReceiveShow);
}, },
@ -1046,7 +1059,7 @@ export default {
this.visibleForce = false; this.visibleForce = false;
this.addsubForce = false; this.addsubForce = false;
this.receiveShow = false; this.receiveShow = false;
this.$refs.chatInput && this.$refs.chatInput.hidePopover(); this.$refs.chatInput?.hidePopover();
} }
}, },
immediate: true immediate: true
@ -1126,11 +1139,11 @@ export default {
}, },
within24Hours(date) { within24Hours(date) {
return ($A.dayjs(date).unix() - this.nowTime) < 86400 return ($A.dayjs(date).unix() - this.keepUnix) < 86400
}, },
expiresFormat(date) { expiresFormat(date) {
return $A.countDownFormat(this.nowTime, date) return $A.countDownFormat(this.keepUnix, date)
}, },
tagColor(taskDetail) { tagColor(taskDetail) {
@ -1784,7 +1797,7 @@ export default {
}, },
onSend(msgText) { onSend(msgText) {
this.$refs.chatInput && this.$refs.chatInput.hidePopover(); this.$refs.chatInput?.hidePopover();
if (msgText === 'open') { if (msgText === 'open') {
this.msgDialog(null, true); this.msgDialog(null, true);
} else { } else {
@ -2127,6 +2140,25 @@ export default {
this.$refs.dialog?.onMsgType(type) this.$refs.dialog?.onMsgType(type)
} }
} }
},
keepIntoInput() {
if (!this.$isEEUiApp) {
return
}
this.keepIntoTimer && clearTimeout(this.keepIntoTimer)
this.keepIntoTimer = setTimeout(_ => {
if (!this.keyboardShow) {
return true; //
}
if (!this.$refs.chatInput?.isFocus) {
return true; //
}
this.$refs.taskDialog?.scrollIntoView({
block: 'end',
behavior: 'smooth'
})
}, 500)
} }
} }
} }

View File

@ -39,6 +39,12 @@ export default {
} }
}, },
watch: {
show(v) {
$A.eeuiAppSetScrollDisabled(v && this.windowPortrait)
}
},
mounted() { mounted() {
emitter.on('handleMoveTop', this.handleMoveTop); emitter.on('handleMoveTop', this.handleMoveTop);
}, },