MsgDetails.vue
2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<template>
<el-container>
<el-dialog
width="60%"
:title="title"
:visible.sync="dialogVisible"
:before-close="handleClose"
:close-on-click-modal="false"
append-to-body
>
<table class="form-table" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<th width="120px" class="is-required">模板名称:</th>
<td width="80%">
<span>{{ formData.name }}</span>
</td>
</tr>
<tr>
<th width="120px" class="is-required">模板分类:</th>
<td>
<span>{{ formData.typeKey }}</span>
</td>
</tr>
<tr>
<th width="120px" class="is-required">模板业务键:</th>
<td>
<span>{{ formData.key }}</span>
</td>
</tr>
<tr>
<th width="120px" class="is-required">是否默认模板:</th>
<td>
<span v-if="formData.isDefault == '1'">是</span>
<span v-else>否</span>
</td>
</tr>
<tr>
<th width="120px" class="is-required">标题:</th>
<td>
<span>{{ formData.subject }}</span>
</td>
</tr>
<tr>
<th width="120px" class="is-required">纯文本:</th>
<td>
<span>{{ formData.plain }}</span>
</td>
</tr>
<tr>
<th width="120px" class="is-required">模板体HTML:</th>
<td>
<span>{{ formData.html }}</span>
</td>
</tr>
<tr>
<th width="120px" class="is-required">创建时间:</th>
<td>
<span>{{ formData.createTime }}</span>
</td>
</tr>
<tr>
<th width="120px" class="is-required">更新时间:</th>
<td>
<span>{{ formData.updateTime }}</span>
</td>
</tr>
</tbody>
</table>
</el-dialog>
</el-container>
</template>
<script>
import flow from '@/api/flow.js'
export default {
props: ['msgDataId'],
data() {
return {
title: '查看消息模板',
dialogVisible: false,
formData: {
name: '',
key: '',
smsTemplateNo: '',
voiceTemplateNo: '',
html: '',
plain: '',
subject: '',
createTime: '',
updateTime: ''
}
}
},
methods: {
handleClose() {
this.dialogVisible = false
},
handleOpen() {
this.dialogVisible = true
this.getDetails(this.msgDataId.id)
},
getDetails(id) {
flow.getMsgDetails(id).then(resp => {
console.log(resp.data)
this.formData = resp.data
})
}
}
}
</script>
<style scoped></style>