|
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
|
@cancel="handleCancel"
|
谭毅彬
authored
|
10
|
:cancelText="$t('button.close')">
|
|
11
|
<tenant-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tenant-form>
|
|
12
13
14
15
|
</j-modal>
</template>
<script>
|
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
import TenantForm from './TenantForm'
export default {
name: "TenantModal",
components: {
TenantForm
},
data() {
return {
title: '',
width: 800,
visible: false,
disableSubmit: false
}
},
methods: {
add() {
this.visible = true
this.$nextTick(() => {
this.$refs.realForm.show();
})
},
edit(record) {
this.visible = true
this.$nextTick(() => {
this.$refs.realForm.show(record);
})
},
close() {
this.$emit('close');
this.visible = false;
},
handleOk() {
this.$refs.realForm.submitForm();
|
|
50
|
},
|
|
51
52
53
|
submitCallback() {
this.$emit('ok');
this.visible = false;
|
|
54
|
},
|
|
55
56
|
handleCancel() {
this.close()
|
|
57
58
|
}
}
|
|
59
|
}
|
|
60
|
</script>
|