mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-09 02:46:50 +08:00
refactor(agent): 优化工作流页面的名称编辑功能
- 添加 resetName 属性,用于保存初始应用名称 - 修改编辑名称逻辑,确保正确回显初始值- 更新保存逻辑,同步 resetName 和 editValue
This commit is contained in:
@@ -13,6 +13,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
agentDetail: {},
|
agentDetail: {},
|
||||||
|
|
||||||
|
resetName: '',
|
||||||
editName: '',
|
editName: '',
|
||||||
editValue: '',
|
editValue: '',
|
||||||
isLoading: true,
|
isLoading: true,
|
||||||
@@ -122,6 +123,7 @@ export default {
|
|||||||
const { content } = await agentDetail(this.$route.query.id)
|
const { content } = await agentDetail(this.$route.query.id)
|
||||||
this.agentDetail = content.content
|
this.agentDetail = content.content
|
||||||
this.editValue = this.agentDetail.appName
|
this.editValue = this.agentDetail.appName
|
||||||
|
this.resetName = this.agentDetail.appName
|
||||||
},
|
},
|
||||||
saveUS() {
|
saveUS() {
|
||||||
// 更新表单之后重新获取列表,然后退出 dialog
|
// 更新表单之后重新获取列表,然后退出 dialog
|
||||||
@@ -129,6 +131,7 @@ export default {
|
|||||||
if (res) {
|
if (res) {
|
||||||
this.$message.success('修改成功')
|
this.$message.success('修改成功')
|
||||||
this.editName = false
|
this.editName = false
|
||||||
|
this.resetName = this.editValue
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -157,7 +160,7 @@ export default {
|
|||||||
size="medium"
|
size="medium"
|
||||||
@click="
|
@click="
|
||||||
editName = !editName
|
editName = !editName
|
||||||
editValue = $route.query.name
|
editValue = resetName
|
||||||
"
|
"
|
||||||
>取消</el-button
|
>取消</el-button
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user