【修改】校验展示形式统一
This commit is contained in:
@@ -109,7 +109,7 @@ export default {
|
||||
this.form.remark = data.remark
|
||||
this.form.id=data.id
|
||||
this.form={...this.form}
|
||||
this.$refs.form.clearValidate('name')
|
||||
// this.$refs.form.clearValidate('name')
|
||||
this.$forceUpdate()
|
||||
} else {
|
||||
this.form = {
|
||||
@@ -119,44 +119,41 @@ export default {
|
||||
orderNum:'',
|
||||
remark:''
|
||||
}
|
||||
this.$refs.form.clearValidate()
|
||||
// this.$refs.form.clearValidate()
|
||||
this.$forceUpdate()
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
cancel() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
submitForm() {
|
||||
if (this.checkReportF()) {
|
||||
this.form.parentId=this.form.nodeLabel[this.form.nodeLabel.length - 1]
|
||||
delete this.form.nodeLabel
|
||||
if(!this.form.id){
|
||||
this.$api.report.labelAdd(this.form).then(res => {
|
||||
if(res.ok){
|
||||
this.$message({
|
||||
type:'success',
|
||||
message:'添加成功'
|
||||
})
|
||||
this.$emit('updateList')
|
||||
}
|
||||
this.form.parentId=this.form.nodeLabel[this.form.nodeLabel.length - 1]
|
||||
delete this.form.nodeLabel
|
||||
if(!this.form.id){
|
||||
this.$api.report.labelAdd(this.form).then(res => {
|
||||
if(res.ok){
|
||||
this.$message({
|
||||
type:'success',
|
||||
message:'添加成功'
|
||||
})
|
||||
this.$emit('updateList')
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.$api.report.labelUpdate(this.form).then(res=>{
|
||||
if(res.ok){
|
||||
this.$message({
|
||||
type:'success',
|
||||
message:'更新成功'
|
||||
})
|
||||
}else{
|
||||
this.$api.report.labelUpdate(this.form).then(res=>{
|
||||
if(res.ok){
|
||||
this.$message({
|
||||
type:'success',
|
||||
message:'更新成功'
|
||||
})
|
||||
this.$emit('updateList')
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
this.dialogVisible = false
|
||||
this.$emit('updateList')
|
||||
}
|
||||
})
|
||||
}
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user