mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 07:03:53 +08:00
去掉调试代码
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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': '提示',
|
||||
|
||||
|
||||
@@ -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': '提示',
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
: $t("agentTemplateManagement.selectAll")
|
||||
}}
|
||||
</el-button>
|
||||
<el-button type="success" @click="handleCreate" size="mini">
|
||||
<el-button type="success" @click="showAddTemplateDialog" size="mini">
|
||||
{{ $t("agentTemplateManagement.createTemplate") }}
|
||||
</el-button>
|
||||
<el-button
|
||||
@@ -208,10 +208,6 @@ export default {
|
||||
this.total =
|
||||
typeof responseData.total === "number" ? responseData.total : 0;
|
||||
} else {
|
||||
console.error(
|
||||
this.$t("agentTemplateManagement.fetchTemplateFailed"),
|
||||
res
|
||||
);
|
||||
this.templateList = [];
|
||||
this.total = 0;
|
||||
this.$message.error(
|
||||
@@ -219,7 +215,6 @@ export default {
|
||||
);
|
||||
}
|
||||
} else {
|
||||
console.error(this.$t("agentTemplateManagement.invalidResponse"), res);
|
||||
this.templateList = [];
|
||||
this.total = 0;
|
||||
this.$message.error(
|
||||
@@ -229,7 +224,6 @@ export default {
|
||||
this.templateLoading = false;
|
||||
},
|
||||
(error) => {
|
||||
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"));
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user