diff --git a/frontend/desktop/src/components/common/RenderForm/tags/TagInput.vue b/frontend/desktop/src/components/common/RenderForm/tags/TagInput.vue index bc2ef4a6fc..633be6ec53 100644 --- a/frontend/desktop/src/components/common/RenderForm/tags/TagInput.vue +++ b/frontend/desktop/src/components/common/RenderForm/tags/TagInput.vue @@ -208,6 +208,7 @@ this.handleInputBlur() } } + divInputDom.addEventListener('paste', this.handlePaste) }, beforeDestroy () { window.removeEventListener('click', this.handleListShow, false) @@ -476,6 +477,28 @@ handleBlur () { this.emit_event(this.tagCode, 'blur', this.value) this.$emit('blur', this.value) + }, + handlePaste (e) { + event.preventDefault() + let text = '' + const clp = (e.originalEvent || e).clipboardData + if (clp === undefined || clp === null) { + text = window.clipboardData.getData('text') || '' + text = text.split('\n').join('') + if (text !== '') { + if (window.getSelection) { + const newNode = document.createElement('span') + newNode.innerHTML = text + window.getSelection().getRangeAt(0).insertNode(newNode) + } else { + document.selection.createRange().pasteHTML(text) + } + } + } else { + text = clp.getData('text/plain') || '' + text = text.split('\n').join('') + text && document.execCommand('insertText', false, text) + } } } } diff --git a/frontend/desktop/src/components/common/RenderForm/tags/TagTextarea.vue b/frontend/desktop/src/components/common/RenderForm/tags/TagTextarea.vue index f3588658aa..f29bbb0683 100644 --- a/frontend/desktop/src/components/common/RenderForm/tags/TagTextarea.vue +++ b/frontend/desktop/src/components/common/RenderForm/tags/TagTextarea.vue @@ -167,6 +167,7 @@ divInputDom.innerHTML = divInputDom.innerHTML.replace(/
/g, '

') } } + divInputDom.addEventListener('paste', this.handlePaste) }, beforeDestroy () { window.removeEventListener('click', this.handleListShow, false) @@ -465,6 +466,26 @@ handleBlur () { this.emit_event(this.tagCode, 'blur', this.value) this.$emit('blur', this.value) + }, + handlePaste (e) { + event.preventDefault() + let text = '' + const clp = (e.originalEvent || e).clipboardData + if (clp === undefined || clp === null) { + text = window.clipboardData.getData('text') || '' + if (text !== '') { + if (window.getSelection) { + const newNode = document.createElement('span') + newNode.innerHTML = text + window.getSelection().getRangeAt(0).insertNode(newNode) + } else { + document.selection.createRange().pasteHTML(text) + } + } + } else { + text = clp.getData('text/plain') || '' + text && document.execCommand('insertText', false, text) + } } } } diff --git a/frontend/desktop/src/components/common/TemplateCanvas/PalettePanel/index.vue b/frontend/desktop/src/components/common/TemplateCanvas/PalettePanel/index.vue index 75cd4e75ed..1d65dc2f7b 100755 --- a/frontend/desktop/src/components/common/TemplateCanvas/PalettePanel/index.vue +++ b/frontend/desktop/src/components/common/TemplateCanvas/PalettePanel/index.vue @@ -34,14 +34,12 @@
+ data-type="tasknode">
+ data-type="subflow">
diff --git a/frontend/desktop/src/config/i18n/cn.js b/frontend/desktop/src/config/i18n/cn.js index b69269f734..4c470c114e 100644 --- a/frontend/desktop/src/config/i18n/cn.js +++ b/frontend/desktop/src/config/i18n/cn.js @@ -1791,7 +1791,8 @@ const cn = { '节点输出型变量仅支持从节点"取消接收输出"来删除': '节点输出型变量仅支持从节点"取消接收输出"来删除', '刷新': '刷新', 'exFailedText': '节点执行失败,请前往{0}查看错误原因', - 'exFailedText_调用日志': '调用日志' + 'exFailedText_调用日志': '调用日志', + '任务还未执行,暂无执行历史': '任务还未执行,暂无执行历史' } export default cn diff --git a/frontend/desktop/src/config/i18n/en.js b/frontend/desktop/src/config/i18n/en.js index ad57c28e8d..74d5d64406 100644 --- a/frontend/desktop/src/config/i18n/en.js +++ b/frontend/desktop/src/config/i18n/en.js @@ -1825,7 +1825,8 @@ const en = { '节点输出型变量仅支持从节点"取消接收输出"来删除': 'Node output variables can only be deleted by the node "Cancel Receiving Output"', '刷新': 'Refresh', 'exFailedText': 'Node execution failed. Please go to the {0} to check the error reason.', - 'exFailedText_调用日志': 'call log' + 'exFailedText_调用日志': 'call log', + '任务还未执行,暂无执行历史': 'Task not executed, no history available.' } export default en diff --git a/frontend/desktop/src/pages/task/ClockedList/index.vue b/frontend/desktop/src/pages/task/ClockedList/index.vue index 83918b9618..61d3af4cdb 100644 --- a/frontend/desktop/src/pages/task/ClockedList/index.vue +++ b/frontend/desktop/src/pages/task/ClockedList/index.vue @@ -128,7 +128,7 @@ {{ $t('执行历史') }} - {{ '--' }} + {{ $t('执行历史') }}
@@ -745,6 +745,8 @@ } .empty-text { padding: 5px; + color: #ccc; + cursor: not-allowed; } }