diff --git a/src/views/data/Framework.vue b/src/views/data/Framework.vue index 4c25610..0ca09bb 100644 --- a/src/views/data/Framework.vue +++ b/src/views/data/Framework.vue @@ -218,6 +218,8 @@ export default { }).catch(() => {}) }, confirmType(){ + if(this.submited) return false + this.submited = true if(this.id){ this.$post(this.api.updateCategory,{ id: this.id, @@ -226,7 +228,12 @@ export default { this.$message.success('编辑成功') this.getType() this.typeVisible = false - }).catch(res => {}) + setTimeout(() => { + this.submited = false + },1500) + }).catch(res => { + this.submited = false + }) }else{ this.$post(this.api.saveCategory,{ levelId: this.levelId, @@ -235,7 +242,12 @@ export default { this.$message.success('添加成功') this.getType() this.typeVisible = false - }).catch(res => {}) + setTimeout(() => { + this.submited = false + },1500) + }).catch(res => { + this.submited = false + }) } }, closeType(){ diff --git a/src/views/data/Product.vue b/src/views/data/Product.vue index e9081be..495a384 100644 --- a/src/views/data/Product.vue +++ b/src/views/data/Product.vue @@ -211,7 +211,8 @@ export default { listConfigAll: [], previewVisible: false, previewHead: [], - previewData: [] + previewData: [], + submited: false, }; }, watch: { @@ -489,10 +490,13 @@ export default { }) }, confirm(){ + if(this.submited) return false if(!this.productName) return this.$message.warning('请输入数据产品名称') if(!this.market) return this.$message.warning('请输入市场价格') if(isNaN(this.market)) return this.$message.warning('市场价格请输入数字') if(!this.$refs.type.getCheckedNodes().length) return this.$message.warning('请选择数据') + + this.submited = true this.getIds().then(() => { let tableId = Array.from(new Set(this.tableId)) @@ -515,13 +519,19 @@ export default { this.$message.success('新增成功') this.productVisible = false this.getData() - }).catch(res => {}) + this.submited = false + }).catch(res => { + this.submited = false + }) }else{ this.$post(this.api.saveProduct,data).then(res => { this.$message.success('新增成功') this.productVisible = false this.getData() - }).catch(res => {}) + this.submited = false + }).catch(res => { + this.submited = false + }) } }) }, diff --git a/src/views/order/selectClient.vue b/src/views/order/selectClient.vue index 4abcd89..7dfa515 100644 --- a/src/views/order/selectClient.vue +++ b/src/views/order/selectClient.vue @@ -46,7 +46,7 @@ - +