diff --git a/main/manager-web/src/i18n/en.js b/main/manager-web/src/i18n/en.js index 800ecbbc..7633ce21 100644 --- a/main/manager-web/src/i18n/en.js +++ b/main/manager-web/src/i18n/en.js @@ -447,6 +447,7 @@ export default { 'common.deleteFailure': 'Delete Failed, Please Try Again', 'common.deleteCancelled': 'Delete Cancelled', 'common.warning': 'Warning', + 'common.tip': 'Tip', 'common.confirm': 'Confirm', 'common.cancel': 'Cancel', 'common.sensitive': 'Sensitive', @@ -834,6 +835,7 @@ export default { 'agentTemplateManagement.createTime': 'Creation Time', 'agentTemplateManagement.action': 'Action', 'agentTemplateManagement.createTemplate': 'Create Template', + 'templateQuickConfig.newTemplate': 'New Template', 'agentTemplateManagement.editTemplate': 'Edit Template', 'agentTemplateManagement.deleteTemplate': 'Delete Template', 'agentTemplateManagement.deleteSuccess': 'Template deleted successfully', diff --git a/main/manager-web/src/i18n/zh_CN.js b/main/manager-web/src/i18n/zh_CN.js index 3d12b59f..290e2c8c 100644 --- a/main/manager-web/src/i18n/zh_CN.js +++ b/main/manager-web/src/i18n/zh_CN.js @@ -447,6 +447,7 @@ export default { 'common.deleteFailure': '删除失败,请重试', 'common.deleteCancelled': '已取消删除', 'common.warning': '警告', + 'common.tip': '提示', 'common.confirm': '确定', 'common.cancel': '取消', 'common.sensitive': '敏感', @@ -868,7 +869,7 @@ export default { 'templateQuickConfig.deviceSettings': '设备设置', 'templateQuickConfig.pluginSettings': '插件设置', 'templateQuickConfig.saveConfig': '保存配置', - 'templateQuickConfig.resetConfig': '配置已重置', + 'templateQuickConfig.resetConfig': '重置配置', 'templateQuickConfig.confirmReset': '确定要重置配置吗?', 'templateQuickConfig.success': '成功', 'templateQuickConfig.error': '错误', @@ -879,6 +880,9 @@ export default { 'templateQuickConfig.templateNotFound': '未找到指定模板', 'templateQuickConfig.fetchTemplateFailed': '获取模板失败', 'templateQuickConfig.fetchTemplateBackendError': '获取模板失败,请检查后端服务是否正常', + 'templateQuickConfig.newTemplate': '新模板', + 'templateQuickConfig.saveSuccess': '保存成功', + 'templateQuickConfig.resetSuccess': '重置成功', 'warning': '警告', 'info': '提示', diff --git a/main/manager-web/src/i18n/zh_TW.js b/main/manager-web/src/i18n/zh_TW.js index ef47388c..bf5e6bec 100644 --- a/main/manager-web/src/i18n/zh_TW.js +++ b/main/manager-web/src/i18n/zh_TW.js @@ -483,6 +483,7 @@ export default { 'common.deleteFailure': '刪除失敗,請重試', 'common.deleteCancelled': '已取消刪除', 'common.warning': '警告', + 'common.tip': '提示', 'common.confirm': '確定', 'common.cancel': '取消', 'common.sensitive': '敏感', @@ -881,6 +882,7 @@ export default { 'templateQuickConfig.templateNotFound': '未找到指定模板', 'templateQuickConfig.fetchTemplateFailed': '獲取模板失敗', 'templateQuickConfig.fetchTemplateBackendError': '獲取模板失敗,請檢查後端服務是否正常', + 'templateQuickConfig.newTemplate': '新模板', 'error': '錯誤', 'warning': '警告', 'info': '提示', diff --git a/main/manager-web/src/views/AgentTemplateManagement.vue b/main/manager-web/src/views/AgentTemplateManagement.vue index 0bff2e99..d09738d8 100644 --- a/main/manager-web/src/views/AgentTemplateManagement.vue +++ b/main/manager-web/src/views/AgentTemplateManagement.vue @@ -106,7 +106,7 @@ : $t("agentTemplateManagement.selectAll") }} - + {{ $t("agentTemplateManagement.createTemplate") }} { - console.error(this.$t("agentTemplateManagement.apiCallFailed"), error); this.templateList = []; this.total = 0; this.templateLoading = false; @@ -237,7 +231,6 @@ export default { } ); } catch (error) { - console.error(this.$t("agentTemplateManagement.apiCallException"), error); this.templateList = []; this.total = 0; this.templateLoading = false; @@ -290,9 +283,6 @@ export default { ) .then(() => { agentApi.deleteAgentTemplate(row.id, (res) => { - // 添加调试日志 - console.log("删除模板响应:", res); - if (res && typeof res === "object") { // 检查res.data是否存在且包含code=0 if (res.data && res.data.code === 0) { @@ -304,7 +294,6 @@ export default { ); } } else { - console.error("无效的响应对象:", res); this.$message.error(this.$t("agentTemplateManagement.deleteBackendError")); } }); @@ -335,10 +324,8 @@ export default { .then(() => { // 确保参数格式正确 - 将id数组作为请求体 const ids = this.selectedTemplates.map((template) => template.id); - console.log("批量删除的模板ID:", ids); agentApi.batchDeleteAgentTemplate(ids, (res) => { - console.log("批量删除响应:", res); if (res && typeof res === "object") { if (res.data && res.data.code === 0) { this.$message.success( @@ -355,7 +342,6 @@ export default { ); } } else { - console.error("无效的响应对象:", res); this.$message.error(this.$t("agentTemplateManagement.deleteBackendError")); } });