diff --git a/src/views/system/InformationCategory/index.vue b/src/views/system/InformationCategory/index.vue index 7b88a31..899de4b 100644 --- a/src/views/system/InformationCategory/index.vue +++ b/src/views/system/InformationCategory/index.vue @@ -507,7 +507,7 @@ export default { submitForm() { this.$refs["form"].validate((valid) => { if (valid) { - this.form.informationCategoryList[0].sort=parseInt( this.form.informationCategoryList[0].sort) + if (this.form.id != null) { updateInformationCategory(this.form).then((response) => { this.$modal.msgSuccess("修改成功"); @@ -515,6 +515,7 @@ export default { this.getList(); }); } else { + this.form.informationCategoryList[0].sort=parseInt( this.form.informationCategoryList[0].sort) addInformationCategory(this.form).then((response) => { this.$modal.msgSuccess("新增成功"); this.addopen = false; diff --git a/src/views/system/informationInfo/index.vue b/src/views/system/informationInfo/index.vue index 06ccc0c..02261df 100644 --- a/src/views/system/informationInfo/index.vue +++ b/src/views/system/informationInfo/index.vue @@ -621,7 +621,7 @@ export default { submitForm() { this.$refs["form"].validate((valid) => { if (valid) { - this.form.informationSort=parseInt( this.form.informationSort) + if (this.form.id != null) { updateInformationInfo(this.form).then((response) => { this.$modal.msgSuccess("修改成功"); @@ -637,6 +637,7 @@ export default { this.getList(); }); } else { + this.form.informationSort=parseInt( this.form.informationSort) addInformationInfo(this.form).then((response) => { this.$modal.msgSuccess("新增成功"); this.open = false;