diff --git a/src/views/modules/part/partCatalogInformation.vue b/src/views/modules/part/partCatalogInformation.vue index 20de0c1..b263ee7 100644 --- a/src/views/modules/part/partCatalogInformation.vue +++ b/src/views/modules/part/partCatalogInformation.vue @@ -168,7 +168,7 @@ - 保存 + 保存 关闭 @@ -1119,6 +1119,7 @@ fastAddFlag: false, loading: false, attributeDialog: true, + saveLoading: false } }, @@ -1511,10 +1512,12 @@ return } if (this.modalData.flag === '1') { + this.saveLoading = true masterPartInformationSave(this.modalData).then(({data}) => { if (data && data.code === 0) { this.getDataList() this.modalFlag = false + this.saveLoading = false this.$message({ message: '操作成功', type: 'success', @@ -1522,16 +1525,21 @@ onClose: () => {} }) } else { + this.saveLoading = false this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } + }).catch(()=>{ + this.saveLoading = false }) } else { + this.saveLoading = true masterPartInformationEdit(this.modalData).then(({data}) => { if (data && data.code === 0) { this.getDataList() this.modalFlag = false + this.saveLoading = false this.$message({ message: '操作成功', type: 'success', @@ -1539,10 +1547,13 @@ onClose: () => {} }) } else { + this.saveLoading = false this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } + }).catch(()=>{ + this.saveLoading = false }) } },