|
1
2
3
|
<template>
<j-modal
:title="title"
|
|
4
|
:width="width"
|
|
5
6
7
8
|
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
|
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>
|
|
16
|
import TenantForm from './TenantForm'
|
|
17
|
export default {
|
|
18
|
name: "TenantModal",
|
|
19
|
components: {
|
|
20
|
TenantForm
|
|
21
|
},
|
|
22
|
data () {
|
|
23
24
25
26
27
28
29
|
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
|
|
30
|
methods: {
|
|
31
32
33
|
add () {
this.visible=true
this.$nextTick(()=>{
|
|
34
|
this.$refs.realForm.show();
|
|
35
36
37
38
39
|
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
|
|
40
|
this.$refs.realForm.show(record);
|
|
41
42
43
44
45
46
47
|
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
|
|
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()
}
}
}
|
|
59
|
</script>
|