Blame view

ant-design-vue-jeecg/src/views/system/modules/TenantModal.vue 1.2 KB
1
2
3
<template>
  <j-modal
    :title="title"
肖超群 authored
4
    :width="width"
5
6
7
8
    :visible="visible"
    switchFullscreen
    @ok="handleOk"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
肖超群 authored
9
10
11
    @cancel="handleCancel"
    cancelText="关闭">
    <tenant-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tenant-form>
12
13
14
15
  </j-modal>
</template>

<script>
肖超群 authored
16
  import TenantForm from './TenantForm'
17
  export default {
肖超群 authored
18
    name: "TenantModal",
19
    components: {
肖超群 authored
20
      TenantForm
21
    },
肖超群 authored
22
    data () {
23
24
25
26
27
28
29
      return {
        title:'',
        width:800,
        visible: false,
        disableSubmit: false
      }
    },
肖超群 authored
30
    methods: {
31
32
33
      add () {
        this.visible=true
        this.$nextTick(()=>{
肖超群 authored
34
          this.$refs.realForm.show();
35
36
37
38
39
        })
      },
      edit (record) {
        this.visible=true
        this.$nextTick(()=>{
肖超群 authored
40
          this.$refs.realForm.show(record);
41
42
43
44
45
46
47
        })
      },
      close () {
        this.$emit('close');
        this.visible = false;
      },
      handleOk () {
肖超群 authored
48
        this.$refs.realForm.submitForm();
49
50
51
52
53
54
55
56
57
58
      },
      submitCallback(){
        this.$emit('ok');
        this.visible = false;
      },
      handleCancel () {
        this.close()
      }
    }
  }
肖超群 authored
59
</script>