Browse Source

完善车型管理--限制保存按钮连续点击

master
yunuo970428 2 years ago
parent
commit
332fa2c5b7
  1. 14
      anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexingAdd.vue

14
anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexingAdd.vue

@ -3,7 +3,7 @@
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" @click="handleCreate()">保存</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleCreate()">保存</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
@ -180,6 +180,7 @@ export default {
viewTitle: '',
// ---------
imgList: [],
submitdisabled: false,
FormLoading: false,
listLoading: false,
temp: {
@ -346,12 +347,17 @@ export default {
return
}
this.temp.userSid = window.sessionStorage.getItem('userSid')
this.submitdisabled = true
SaveList(this.temp).then(response => {
this.FormLoading = false
if (response.success) {
this.dialogFormVisible = false
this.handleReturn('true')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
} else {
this.temp.userSid = window.sessionStorage.getItem('userSid')
@ -360,12 +366,17 @@ export default {
this.$message({ showClose: true, type: 'error', message: '请上传车型照片' })
return
}
this.submitdisabled = true
SaveList(this.temp).then(response => {
this.FormLoading = false
if (response.success) {
this.dialogFormVisible = false
this.handleReturn('true')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
}
@ -441,6 +452,7 @@ export default {
baseVehicleModelAppendixDtos: [] //
} //
this.imgList = []
this.submitdisabled = false
this.$emit('doback')
},
getPathSid() {

Loading…
Cancel
Save