|
@@ -174,20 +174,22 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
save(){
|
|
save(){
|
|
this.$refs.form.validate(valid=>{
|
|
this.$refs.form.validate(valid=>{
|
|
- this.$axios({
|
|
|
|
- method:"POST",
|
|
|
|
- url:this.$api.systemManagement.saveCluster,
|
|
|
|
- data:{
|
|
|
|
- ...this.form
|
|
|
|
- }
|
|
|
|
- }).then(res=>{
|
|
|
|
- if(res.code == 200){
|
|
|
|
- this.$message.success("保存成功");
|
|
|
|
- this.cancel()
|
|
|
|
- }else{
|
|
|
|
- this.$message.error(res.message || "保存失败");
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ if(valid){
|
|
|
|
+ this.$axios({
|
|
|
|
+ method:"POST",
|
|
|
|
+ url:this.$api.systemManagement.saveCluster,
|
|
|
|
+ data:{
|
|
|
|
+ ...this.form
|
|
|
|
+ }
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ if(res.code == 200){
|
|
|
|
+ this.$message.success("保存成功");
|
|
|
|
+ this.cancel()
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error(res.message || "保存失败");
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
})
|
|
})
|
|
},
|
|
},
|
|
cancel(){
|
|
cancel(){
|