MrShi
2025-08-19 30e858fa504b268b9b436afca0a1259cf6e8c488
admin/src/components/base/BaseOpera.vue
@@ -1,4 +1,6 @@
<script>
import { memberSync } from '@/api/business/member'
export default {
  name: 'BaseOpera',
  data () {
@@ -76,11 +78,20 @@
        }
        // 调用新建接口
        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)