站内信测试弹窗用户类型缺失

pull/420/head
liuyu 2024-03-14 10:23:39 +08:00
parent f19e67c39d
commit b3308883c9
1 changed files with 15 additions and 1 deletions

View File

@ -76,10 +76,21 @@
<!-- 测试站内信的弹窗 -->
<XModal id="sendTest" v-model="sendVisible" title="测试">
<el-form :model="sendForm" :rules="sendRules" label-width="200px" label-position="top">
<el-form :model="sendForm" :rules="sendRules" label-width="140px">
<el-form-item label="模板内容" prop="content">
<el-input type="textarea" v-model="sendForm.content" readonly />
</el-form-item>
<el-form-item label="用户类型" prop="userType">
<el-radio-group v-model="sendForm.userType">
<el-radio
v-for="dict in getIntDictOptions(DICT_TYPE.USER_TYPE)"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="接收人" prop="userId">
<el-select v-model="sendForm.userId" placeholder="请选择接收人">
<el-option
@ -120,6 +131,7 @@ import { FormExpose } from '@/components/Form'
import { rules, allSchemas } from './template.data'
import * as NotifyTemplateApi from '@/api/system/notify/template'
import { getListSimpleUsersApi, UserVO } from '@/api/system/user'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
defineOptions({ name: 'SystemNotifyTemplate' })
@ -203,6 +215,7 @@ const submitForm = async () => {
// ========== ==========
const sendForm = ref({
content: '',
userType: 1,
params: {},
userId: '',
templateCode: '',
@ -233,6 +246,7 @@ const handleSendNotify = (row: any) => {
const sendTest = async () => {
const data: NotifyTemplateApi.NotifySendReqVO = {
userType: sendForm.value.userType,
userId: sendForm.value.userId,
templateCode: sendForm.value.templateCode,
templateParams: sendForm.value.templateParams as unknown as Map<string, Object>