|  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | import { memberSync } from '@/api/business/member' | 
|---|
|  |  |  |  | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: 'BaseOpera', | 
|---|
|  |  |  | data () { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 调用新建接口 | 
|---|
|  |  |  | this.isWorking = true | 
|---|
|  |  |  | var that = this | 
|---|
|  |  |  | this.api.create(this.form) | 
|---|
|  |  |  | .then(() => { | 
|---|
|  |  |  | this.visible = false | 
|---|
|  |  |  | this.$tip.apiSuccess('新建成功') | 
|---|
|  |  |  | this.$emit('success') | 
|---|
|  |  |  | // that.$tip.apiSuccess('新建成功') | 
|---|
|  |  |  | that.$dialog.actionConfirmButton('是否停留该页面继续新建数据?', '新建成功','继续添加','关闭返回') | 
|---|
|  |  |  | .then(() => { | 
|---|
|  |  |  | that.$refs.form.resetFields() | 
|---|
|  |  |  | that.form[this.configData['field.id']] = null | 
|---|
|  |  |  | that.$emit('success') | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(() => { | 
|---|
|  |  |  | that.visible = false | 
|---|
|  |  |  | that.$emit('success') | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(e => { | 
|---|
|  |  |  | this.$tip.apiFailed(e) | 
|---|