Merge pull request #9287 from dataease/pr@dev-v2@feat_email_setting

feat(X-Pack): 邮件设置
This commit is contained in:
fit2cloud-chenyw 2024-04-23 20:35:22 +08:00 committed by GitHub
commit 9f9d8e53dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 59 additions and 4 deletions

View File

@ -2163,6 +2163,16 @@ export default {
platformOid: '第三方平台用户组织',
platformRid: '第三方平台用户角色'
},
setting_email: {
title: '邮件设置',
host: 'SMTP主机',
port: 'SMTP端口',
account: 'SMTP账号',
pwd: 'SMTP密码',
reci: '测试收件人',
ssl: 'SSL',
tsl: 'TSL'
},
template_manage: {
name_already_exists_type: '分类名称已存在',
the_same_category: '同一分类下该模板名称已存在'

View File

@ -5,6 +5,7 @@
<span>{{ curTitle }}</span>
</div>
<div>
<el-button v-if="testConnectText" secondary @click="check">{{ testConnectText }}</el-button>
<el-button type="primary" @click="edit">{{ t('commons.edit') }}</el-button>
<el-button v-if="showValidate" type="primary" @click="check">{{
t('datasource.validate')
@ -109,6 +110,10 @@ const props = defineProps({
type: Boolean,
default: false
},
testConnectText: {
type: String,
default: null
},
copyList: {
type: Array as PropType<string[]>,
default: () => []

View File

@ -8,8 +8,13 @@
<map-setting v-if="activeName === 'map'" />
<basic-info v-if="activeName === 'basic'" />
<engine-info v-if="activeName === 'engine'" />
<xpack-component
jsname="L21lbnUvc2V0dGluZy9lbWFpbC9pbmRleA=="
v-if="activeName === 'email'"
/>
</div>
</div>
<xpack-component jsname="L2NvbXBvbmVudC9tZW51LWhhbmRsZXIvRW1haWxIYW5kbGVy" @loaded="addTable" />
</template>
<script lang="ts" setup>
@ -18,16 +23,23 @@ import { useI18n } from '@/hooks/web/useI18n'
import MapSetting from './map/MapSetting.vue'
import BasicInfo from './basic/BasicInfo.vue'
import EngineInfo from '@/views/system/parameter/engine/EngineInfo.vue'
import { XpackComponent } from '@/components/plugin'
/* import EmailInfo from './email/EmailInfo.vue' */
const { t } = useI18n()
const tabArray = [
const tabArray = ref([
{ label: '基础设置', name: 'basic' },
/* { label: '邮件设置', name: 'email' }, */
{ label: '地图设置', name: 'map' },
{ label: '引擎设置', name: 'engine' }
]
])
const activeName = ref('basic')
const addTable = tab => {
if (!tabArray.value.some(item => item.name === tab['name'])) {
tabArray.value.splice(1, 0, tab)
}
}
</script>
<style lang="less">
.router-title {

@ -1 +1 @@
Subproject commit 22e8ad631b05f078920385f440ae97561fa8c351
Subproject commit c080217f6945768ba8724134a80380f55e44759c

View File

@ -0,0 +1,28 @@
package io.dataease.api.email;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.dataease.api.system.vo.SettingItemVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
@Tag(name = "系统设置:邮件设置")
@ApiSupport(order = 799)
public interface EmailApi {
@Operation(summary = "查询邮件设置")
@GetMapping("/setting/query")
List<SettingItemVO> queryEmailSetting();
@Operation(summary = "保存邮件设置")
@PostMapping("/setting/save")
void saveEmailSetting(@RequestBody List<SettingItemVO> settingItemVOS);
@Operation(summary = "校验邮件设置")
@PostMapping("/setting/validate")
void validate(@RequestBody List<SettingItemVO> settingItemVOS);
}