diff --git a/frontend/desktop/src/config/i18n/cn.js b/frontend/desktop/src/config/i18n/cn.js
index d462ed049d..5618782f1d 100644
--- a/frontend/desktop/src/config/i18n/cn.js
+++ b/frontend/desktop/src/config/i18n/cn.js
@@ -1793,7 +1793,8 @@ const cn = {
'exFailedText': '节点执行失败,请前往{0}查看错误原因',
'exFailedText_调用日志': '调用日志',
'任务还未执行,暂无执行历史': '任务还未执行,暂无执行历史',
- '空分支': '空分支'
+ '空分支': '空分支',
+ '代理人仅可设置为本人': '代理人仅可设置为本人'
}
export default cn
diff --git a/frontend/desktop/src/config/i18n/en.js b/frontend/desktop/src/config/i18n/en.js
index ecee08b4c1..45b4fc8030 100644
--- a/frontend/desktop/src/config/i18n/en.js
+++ b/frontend/desktop/src/config/i18n/en.js
@@ -1827,7 +1827,8 @@ const en = {
'exFailedText': 'Node execution failed. Please go to the {0} to check the error reason.',
'exFailedText_调用日志': 'call log',
'任务还未执行,暂无执行历史': 'Task not executed, no history available.',
- '空分支': 'Empty branch'
+ '空分支': 'Empty branch',
+ '代理人仅可设置为本人': 'The executor proxy can only set yourself'
}
export default en
diff --git a/frontend/desktop/src/pages/project/config.vue b/frontend/desktop/src/pages/project/config.vue
index 94f2373149..cc2217fc04 100644
--- a/frontend/desktop/src/pages/project/config.vue
+++ b/frontend/desktop/src/pages/project/config.vue
@@ -198,15 +198,17 @@
data-test-id="projectConfig_form_executeAgentDialog"
:cancel-text="$t('取消')"
@confirm="updateAgentData"
- @cancel="isAgentDialogShow = false">
+ @cancel="closeAgentDialog">
{{ $t('代理人仅可设置为本人') }} {{ $t('代理人仅可设置为本人') }}
{{ $t('代理人仅可设置为本人') }}
@@ -562,6 +564,7 @@ } ] }, + isProxyValidateError: false, errorHandleTipsConfig: { allowHtml: true, theme: 'light', @@ -581,6 +584,7 @@ }, computed: { ...mapState({ + 'username': state => state.username, 'subprocessInfo': state => state.template.subprocess_info }), subflowHasUpdate () { @@ -819,6 +823,7 @@ onUserSelectChange (tags) { this.formData.executor_proxy = tags this.updateData() + this.isProxyValidateError = tags.length === 1 && tags[0] !== this.username }, async onAlwaysUseLatestChange (val) { this.formData.alwaysUseLatest = val @@ -1117,6 +1122,7 @@ } } .user-selector { + display: block; width: 100%; .disabled::before { content: ''; diff --git a/frontend/desktop/src/pages/template/TemplateEdit/NodeConfig/NodeConfig.vue b/frontend/desktop/src/pages/template/TemplateEdit/NodeConfig/NodeConfig.vue index 7c7f8de187..9bbedd0316 100644 --- a/frontend/desktop/src/pages/template/TemplateEdit/NodeConfig/NodeConfig.vue +++ b/frontend/desktop/src/pages/template/TemplateEdit/NodeConfig/NodeConfig.vue @@ -1368,6 +1368,9 @@ // 节点配置面板表单校验,基础信息和输入参数 validate () { return this.$refs.basicInfo.validate().then(validator => { + if (this.$refs.basicInfo.isProxyValidateError) { + return false + } if (this.$refs.inputParams) { return this.$refs.inputParams.validate() } else if (this.$refs.jsonSchemaParams) { diff --git a/frontend/desktop/src/pages/template/TemplateEdit/TemplateSetting/TabTemplateConfig.vue b/frontend/desktop/src/pages/template/TemplateEdit/TemplateSetting/TabTemplateConfig.vue index f8eadc168e..f50befdb2f 100644 --- a/frontend/desktop/src/pages/template/TemplateEdit/TemplateSetting/TabTemplateConfig.vue +++ b/frontend/desktop/src/pages/template/TemplateEdit/TemplateSetting/TabTemplateConfig.vue @@ -141,8 +141,9 @@ :disabled="isViewMode" :placeholder="proxyPlaceholder" :value="formData.executorProxy" - @change="formData.executorProxy = $event"> + @change="onSelectedExecutorProxy"> +{{ $t('代理人仅可设置为本人') }}