fix:校验后 删除上方未通过的校验 显示错误的问题

This commit is contained in:
zhangyu
2022-08-30 14:16:03 +08:00
parent 84e69a606e
commit fc96a3ef98
5 changed files with 28 additions and 0 deletions

View File

@@ -169,3 +169,11 @@
}
}
.topo-page {
.promqlInput {
.el-cascader-menu {
width: 200px;
height: 100%;
}
}
}

View File

@@ -1187,6 +1187,9 @@ export default {
return
}
this.chartConfig.param.thresholds.splice(index, 1)
this.chartConfig.param.thresholds.forEach((item, index) => {
this.$refs.chartForm.validateField('param.thresholds.' + index + '.value')
})
this.change()
},
move () {

View File

@@ -468,6 +468,9 @@ export default {
this.expressions.splice(index, 1)
this.expressionName.splice(index, 1)
this.expressionsShow.splice(index, 1)
this.chartConfig.elements.forEach((item, index) => {
this.$refs.chartForm.validateField('elements.' + index + '.expression')
})
this.$nextTick(() => {
this.expressions.forEach((ex, index) => {
if (ex) {
@@ -537,6 +540,14 @@ export default {
},
removeMapping (index) {
this.chartConfig.param.valueMapping.splice(index, 1)
this.chartConfig.param.valueMapping.forEach((item, index) => {
this.$refs.chartForm.validateField('param.valueMapping.' + index + '.value')
this.$refs.chartForm.validateField('param.valueMapping.' + index + '.from')
this.$refs.chartForm.validateField('param.valueMapping.' + index + '.to')
this.$refs.chartForm.validateField('param.valueMapping.' + index + '.regx')
this.$refs.chartForm.validateField('param.valueMapping.' + index + '.column')
this.$refs.chartForm.validateField('param.valueMapping.' + index + '.display')
})
this.change()
},
showMapping (index) {

View File

@@ -1311,6 +1311,7 @@ export default {
// 删除pipeline
delPipeline (logsIndex, pipeLineIndex) {
this.editEndpoint.configs[1].config[logsIndex].pipeline.splice(pipeLineIndex, 1)
this.$refs.moduleForm.clearValidate()
},
// 添加pipelineItem
addPipelineItem (logsIndex, pipelineIndex) {
@@ -1354,6 +1355,7 @@ export default {
} else if (val === 'labels') {
this.editEndpoint.configs[1].config[logsIndex].pipeline[pipelineIndex].labels.splice(itemIndex, 1)
}
this.$refs.moduleForm.clearValidate()
},
resultFormat (resp) {
if (resp && resp.data) {
@@ -1457,6 +1459,7 @@ export default {
// return
// }
this.editEndpoint.configs[0].config.relabel_config.splice(index, 1)
this.$refs.moduleForm.clearValidate()
},
tagsChangeRelabel (newTags, index) {
this.editEndpoint.configs[0].config.relabel_config[index].source_labels = newTags.map(item => item.text)

View File

@@ -1064,6 +1064,7 @@ export default {
// return
// }
this.editModule.configs[0].config.relabel_config.splice(index, 1)
this.$refs.moduleForm.clearValidate()
},
tagsChange (newTags, index) {
this.editModule.paramObj[index].value = newTags.map(item => item.text)
@@ -1259,6 +1260,7 @@ export default {
// 删除pipeline
delPipeline (logsIndex, pipeLineIndex) {
this.editModule.configs[1].config[logsIndex].pipeline.splice(pipeLineIndex, 1)
this.$refs.moduleForm.clearValidate()
},
// 添加pipelineItem
addPipelineItem (logsIndex, pipelineIndex) {
@@ -1292,6 +1294,7 @@ export default {
} else if (val === 'labels') {
this.editModule.configs[1].config[logsIndex].pipeline[pipelineIndex].labels.splice(itemIndex, 1)
}
this.$refs.moduleForm.clearValidate()
}
},
mounted () {