| | |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogFormVisible = false">取消</el-button> |
| | | <el-button type="primary" @click="submitHandle">确认</el-button> |
| | | <el-button type="primary" @click="debouncedSubmit">确认</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <div style="clear: both;"></div> |
| | |
| | | ...mapGetters([ |
| | | 'userType', |
| | | 'username' |
| | | ]) |
| | | ]), |
| | | debouncedSubmit() { |
| | | return this.debounce(this.submitHandle, 1000); |
| | | } |
| | | }, |
| | | methods: { |
| | | async selectChange(){ |
| | |
| | | parseError({error: error, vm: _this}) |
| | | }) |
| | | }, |
| | | debounce(func, wait) { |
| | | let timeout; |
| | | return (...args) => { |
| | | clearTimeout(timeout); |
| | | timeout = setTimeout(() => { |
| | | func.apply(this, args); |
| | | }, wait); |
| | | }; |
| | | }, |
| | | submitHandle:function(){ |
| | | if (this.dialogStatus === 'create') { |
| | | this.createHandle(); |