fix: 修改 module logs 有多条时 endpoint没有默认选中的问题

This commit is contained in:
zhangyu
2021-08-12 15:48:10 +08:00
parent 23618169b1
commit 0e7cbe35b8

View File

@@ -1158,6 +1158,7 @@ export default {
this.$post('/monitor/endpoint/render', { moduleIds: this.editEndpoint.moduleId, assetIds: this.editEndpoint.assetId }).then(res => {
if (JSON.stringify(this.editEndpoint.configs) === JSON.stringify(this.blankObject.configs)) {
this.editEndpoint.configs = JSON.parse(res.data.list[0].configs)
this.activeNameLogs = this.editEndpoint.configs[1].config.map(() => 'Basic')
}
if (!this.editEndpoint.name) {
this.editEndpoint.name = res.data.list[0].name