import React, { useRef } from 'react' import { Button, Form, message } from 'antd' import { ModalForm, ProFormDependency, ProFormRadio, ProFormSelect, ProFormText } from '@ant-design/pro-form' import RighEditor from './RighEditor' import { Plus } from '@icon-park/react' export const msgTypeEnum = { NotificationOne: 'notification', Message: 'message' } export const mediaType = { VersionUpdate: 1, HolidayNotice: 2 } const AddMessage = props => { const { onConfirm } = props const formRef = useRef(null) const handleFormValues = values => { const newValues = { ...values } switch (values.msgType) { case msgTypeEnum.NotificationOne: switch (values.media) { case mediaType.VersionUpdate: newValues.avatar = 'https://zhcld.com/resource/notice_email.png' break case mediaType.HolidayNotice: newValues.avatar = 'https://zhcld.com/resource/notice_airplane.png' break default: break } break default: break } return newValues } return (