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