feat: 增加emailServerType字段

This commit is contained in:
Xu Zhimeng 2025-05-15 09:55:52 +08:00
parent 44cfc62ed5
commit 8dc0324d72

View File

@ -86,7 +86,7 @@
/>
</div>
<a-modal :title="isAdd ? 'Add' : 'Edit'" v-model="visible" :maskClosable="false" @cancel="onCancel">
<a-form :form="form" :label-col="{ span: 6 }" :wrapper-col="{ span: 16 }">
<a-form :form="form" :label-col="{ span: 7 }" :wrapper-col="{ span: 16 }">
<a-form-item label="Name">
<a-input
v-decorator="[
@ -131,6 +131,21 @@
]"
/>
</a-form-item>
<a-form-item label="Email Server Type">
<a-select
allowClear
v-decorator="[
'emailServerType',
{
rules: [{ required: true, message: 'Please select an email server type!' }],
initialVale: this.formVal.emailServerType,
},
]"
>
<a-select-option :value="1"> General </a-select-option>
<a-select-option :value="0"> TurboEx </a-select-option>
</a-select>
</a-form-item>
<a-form-item label="Email Type">
<j-dict-select-tag
placeholder="Please select an email type"
@ -138,7 +153,7 @@
v-decorator="[
'emilType',
{
rules: [{ required: true, message: 'Please input your name!' }],
rules: [{ required: true, message: 'Please select an email type!' }],
initialVale: this.formVal.emilType,
},
]"
@ -207,6 +222,12 @@ const columns = [
customRender: 'enabled',
},
},
{
title: 'EmailServerType',
align: 'center',
dataIndex: 'emailServerType',
customRender: (text) => (text == 1 ? 'General' : 'TurboEx'),
},
{
title: 'ServerAddress',
align: 'center',
@ -268,6 +289,7 @@ export default {
emailServerAddress: '',
username: '',
password: '',
emailServerType: 1,
emilType: '',
enabled: '',
port: '',
@ -341,6 +363,7 @@ export default {
this.form.setFieldsValue({
name: res.result.name,
emailServerAddress: res.result.emailServerAddress,
emailServerType: res.result.emailServerType,
username: res.result.username,
password: res.result.password,
emilType: res.result.emilType,