File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
src/views/system/notify/template Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 15
15
type =" textarea"
16
16
/>
17
17
</el-form-item >
18
- <el-form-item label =" 接收人" prop =" userId" >
18
+ <el-form-item label =" 用户类型" prop =" userType" >
19
+ <el-radio-group v-model =" formData.userType" >
20
+ <el-radio
21
+ v-for =" dict in getIntDictOptions(DICT_TYPE.USER_TYPE)"
22
+ :key =" dict.value"
23
+ :label =" dict.value as number"
24
+ >
25
+ {{ dict.label }}
26
+ </el-radio >
27
+ </el-radio-group >
28
+ </el-form-item >
29
+ <el-form-item v-show =" formData.userType === 1" label =" 接收人ID" prop =" userId" >
30
+ <el-input v-model =" formData.userId" style =" width : 160px " />
31
+ </el-form-item >
32
+ <el-form-item v-show =" formData.userType === 2" label =" 接收人" prop =" userId" >
19
33
<el-select v-model =" formData.userId" placeholder =" 请选择接收人" >
20
34
<el-option
21
35
v-for =" item in userOption"
46
60
<script lang="ts" setup>
47
61
import * as UserApi from ' @/api/system/user'
48
62
import * as NotifyTemplateApi from ' @/api/system/notify/template'
63
+ import { DICT_TYPE , getIntDictOptions } from ' @/utils/dict'
49
64
50
65
defineOptions ({ name: ' SystemNotifyTemplateSendForm' })
51
66
@@ -57,6 +72,7 @@ const formData = ref({
57
72
content: ' ' ,
58
73
params: {},
59
74
userId: null ,
75
+ userType: 1 ,
60
76
templateCode: ' ' ,
61
77
templateParams: new Map ()
62
78
})
@@ -122,7 +138,8 @@ const resetForm = () => {
122
138
params: {},
123
139
mobile: ' ' ,
124
140
templateCode: ' ' ,
125
- templateParams: new Map ()
141
+ templateParams: new Map (),
142
+ userType: 1
126
143
} as any
127
144
formRef .value ?.resetFields ()
128
145
}
You can’t perform that action at this time.
0 commit comments