diff --git a/resources/assets/js/functions/common.js b/resources/assets/js/functions/common.js index 8e9b1ca49..4281a11eb 100755 --- a/resources/assets/js/functions/common.js +++ b/resources/assets/js/functions/common.js @@ -1110,6 +1110,20 @@ */ getAttr(el, attrName, def = "") { return el ? el.getAttribute(attrName) : def; + }, + + /** + * 主动失去焦点 + * @param el + */ + onBlur(el = null) { + if (el) { + el.blur(); + } else { + if (document.activeElement && typeof document.activeElement.blur === "function") { + document.activeElement.blur(); + } + } } }); diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue index 9ffee1dbb..ef3437d27 100644 --- a/resources/assets/js/pages/manage/components/DialogWrapper.vue +++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue @@ -340,33 +340,18 @@ export default { } }, - mounted() { - if (this.$store.state.dialogMsgTransfer.time > $A.Time()) { - this.$store.state.dialogMsgTransfer.time = 0; - const {msgFile, msgRecord, msgText} = this.$store.state.dialogMsgTransfer; - this.$nextTick(() => { - if ($A.isArray(msgFile) && msgFile.length > 0) { - this.sendFileMsg(msgFile); - } else if ($A.isJson(msgRecord) && msgRecord.duration > 0) { - this.sendRecord(msgRecord); - } else if (msgText) { - this.sendMsg(msgText); - } - }); - } - }, - beforeDestroy() { this.$store.dispatch('forgetInDialog', this._uid) }, computed: { ...mapState([ - 'cacheDialogs', + 'taskId', 'dialogMsgs', + 'dialogMsgTransfer', + 'cacheDialogs', 'wsOpenNum', 'touchBackInProgress', - 'taskId', ]), isReady() { @@ -490,6 +475,24 @@ export default { immediate: true }, + dialogMsgTransfer: { + handler({time, msgFile, msgRecord, msgText}) { + if (time > $A.Time()) { + this.$store.state.dialogMsgTransfer.time = 0; + this.$nextTick(() => { + if ($A.isArray(msgFile) && msgFile.length > 0) { + this.sendFileMsg(msgFile); + } else if ($A.isJson(msgRecord) && msgRecord.duration > 0) { + this.sendRecord(msgRecord); + } else if (msgText) { + this.sendMsg(msgText); + } + }); + } + }, + immediate: true + }, + wsOpenNum(num) { if (num <= 1) return this.$store.dispatch("getDialogMsgs", this.dialogId).catch(_ => {}); diff --git a/resources/assets/js/pages/manage/components/TaskDetail.vue b/resources/assets/js/pages/manage/components/TaskDetail.vue index 576793ced..be4d0f89b 100644 --- a/resources/assets/js/pages/manage/components/TaskDetail.vue +++ b/resources/assets/js/pages/manage/components/TaskDetail.vue @@ -734,6 +734,9 @@ export default { if (id > 0) { this.ready = true; } else { + if (this.windowSmall) { + $A.onBlur(); + } this.timeOpen = false; this.timeForce = false; this.assistForce = false; @@ -742,9 +745,6 @@ export default { this.$refs.owner && this.$refs.owner.handleClose(); this.$refs.assist && this.$refs.assist.handleClose(); this.$refs.chatInput && this.$refs.chatInput.hidePopover(); - if (this.windowSmall) { - document.activeElement.blur(); - } } }, immediate: true @@ -1103,6 +1103,7 @@ export default { } else { this.$nextTick(() => { if (this.windowSmall) { + $A.onBlur(); this.$store.state.dialogMsgTransfer = { time: $A.Time() + 10, msgText: this.msgText, diff --git a/resources/assets/js/pages/manage/file.vue b/resources/assets/js/pages/manage/file.vue index fa7b78abe..49f0b7994 100644 --- a/resources/assets/js/pages/manage/file.vue +++ b/resources/assets/js/pages/manage/file.vue @@ -611,7 +611,11 @@ export default { }, tableHeight() { - return Math.max(300, this.windowHeight - 160) + if (this.windowLarge) { + return Math.max(300, this.windowHeight - 160) + } else { + return Math.max(300, this.windowHeight - 200) + } } }, diff --git a/resources/assets/sass/pages/components/task-detail.scss b/resources/assets/sass/pages/components/task-detail.scss index 6fc128254..c431b8587 100644 --- a/resources/assets/sass/pages/components/task-detail.scss +++ b/resources/assets/sass/pages/components/task-detail.scss @@ -589,7 +589,7 @@ position: absolute; transform: scale(0.8) translateX(100%); transform-origin: right center; - top: 2px; + bottom: 28px; right: 22px; z-index: 2; height: 20px; diff --git a/resources/assets/sass/pages/page-file.scss b/resources/assets/sass/pages/page-file.scss index 76eee09ef..ec6d6c255 100644 --- a/resources/assets/sass/pages/page-file.scss +++ b/resources/assets/sass/pages/page-file.scss @@ -286,6 +286,10 @@ } } } + .ivu-table-overflowY, + .ivu-table-overflowX { + -webkit-overflow-scrolling: touch; + } } .file-nbox { display: flex; @@ -669,11 +673,15 @@ grid-gap: 4px; > li { width: 80px; + .file-check, + .file-menu { + display: none; + } } } } .file-table { - margin: 16px 24px 24px; + margin: 16px 0 0; } } }