mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-08 07:41:10 +08:00
【新增】申请证书算法配置
This commit is contained in:
@@ -23,16 +23,17 @@ export default defineComponent({
|
||||
end_day: 30,
|
||||
name_server: '',
|
||||
skip_check: 1,
|
||||
algorithm: 'RSA2048',
|
||||
},
|
||||
}),
|
||||
},
|
||||
},
|
||||
setup(props) {
|
||||
const { updateNodeConfig, isRefreshNode } = useStore()
|
||||
const { updateNodeConfig, advancedOptions, isRefreshNode } = useStore()
|
||||
// 弹窗辅助
|
||||
const { confirm } = useModalHooks()
|
||||
// 获取表单助手函数
|
||||
const { useFormInput, useFormHelp, useFormSwitch } = useFormHooks()
|
||||
const { useFormInput, useFormSelect, useFormMore, useFormHelp, useFormSwitch } = useFormHooks()
|
||||
// 表单参数
|
||||
const param = ref(deepClone(props.node.config))
|
||||
|
||||
@@ -88,23 +89,42 @@ export default defineComponent({
|
||||
)
|
||||
},
|
||||
},
|
||||
useFormInput(
|
||||
$t('t_0_1747106957037'),
|
||||
'name_server',
|
||||
{
|
||||
placeholder: $t('t_1_1747106961747'),
|
||||
onInput: (val: string) => {
|
||||
param.value.name_server = val.trim() // 去除空格
|
||||
param.value.name_server = param.value.name_server.replace(/,/g, ',') // 中文逗号分隔
|
||||
param.value.name_server = param.value.name_server.replace(/;/g, ',') // 去除分号
|
||||
},
|
||||
onFocus: () => {
|
||||
param.value.name_server = param.value.name_server.replace(/,^/g, '') // 中文逗号分隔
|
||||
},
|
||||
},
|
||||
{ showRequireMark: false },
|
||||
),
|
||||
useFormSwitch($t('t_2_1747106957037'), 'skip_check', {}, { showRequireMark: false }),
|
||||
useFormMore(advancedOptions),
|
||||
...(advancedOptions.value
|
||||
? [
|
||||
useFormSelect(
|
||||
$t('证书算法'),
|
||||
'algorithm',
|
||||
[
|
||||
{ label: 'RSA2048', value: 'RSA2048' },
|
||||
{ label: 'RSA3072', value: 'RSA3072' },
|
||||
{ label: 'RSA4096', value: 'RSA4096' },
|
||||
{ label: 'RSA8192', value: 'RSA8192' },
|
||||
{ label: 'EC256', value: 'EC256' },
|
||||
{ label: 'EC384', value: 'EC384' },
|
||||
],
|
||||
{},
|
||||
{ showRequireMark: false },
|
||||
),
|
||||
useFormInput(
|
||||
$t('t_0_1747106957037'),
|
||||
'name_server',
|
||||
{
|
||||
placeholder: $t('t_1_1747106961747'),
|
||||
onInput: (val: string) => {
|
||||
param.value.name_server = val.trim() // 去除空格
|
||||
param.value.name_server = param.value.name_server.replace(/,/g, ',') // 中文逗号分隔
|
||||
param.value.name_server = param.value.name_server.replace(/;/g, ',') // 去除分号
|
||||
},
|
||||
onFocus: () => {
|
||||
param.value.name_server = param.value.name_server.replace(/,^/g, '') // 中文逗号分隔
|
||||
},
|
||||
},
|
||||
{ showRequireMark: false },
|
||||
),
|
||||
useFormSwitch($t('t_2_1747106957037'), 'skip_check', {}, { showRequireMark: false }),
|
||||
]
|
||||
: []),
|
||||
useFormHelp([
|
||||
{
|
||||
content: $t('t_0_1747040228657'),
|
||||
@@ -121,6 +141,10 @@ export default defineComponent({
|
||||
// 创建表单实例
|
||||
const { component: Form, data, example } = useForm<ApplyNodeConfig>({ defaultValue: param, config, rules })
|
||||
|
||||
onMounted(() => {
|
||||
advancedOptions.value = false
|
||||
})
|
||||
|
||||
// 确认事件触发
|
||||
confirm(async (close) => {
|
||||
try {
|
||||
|
||||
@@ -109,6 +109,7 @@ nodeOptions[APPLY] = () =>
|
||||
end_day: 30,
|
||||
provider: '',
|
||||
provider_id: '',
|
||||
algorithm: 'RSA2048',
|
||||
},
|
||||
childNode: null,
|
||||
},
|
||||
|
||||
@@ -20,6 +20,7 @@ export default {
|
||||
provider_id: '',
|
||||
provider: '',
|
||||
end_day: 30,
|
||||
algorithm: 'RSA2048',
|
||||
},
|
||||
childNode: {
|
||||
id: 'deploy-1',
|
||||
|
||||
@@ -203,8 +203,10 @@ export interface ApplyNodeConfig {
|
||||
provider_id: string // DNS提供商授权ID
|
||||
provider: string // DNS提供商
|
||||
end_day: number // 续签间隔
|
||||
// 高级功能
|
||||
name_server: string // DNS递归服务器
|
||||
skip_check: number // 跳过检查
|
||||
algorithm: string // 数字证书算法
|
||||
// 高级功能
|
||||
// algorithm: 'RSA2048' | 'RSA3072' | 'RSA4096' | 'RSA8192' | 'EC256' | 'EC384' // 数字证书算法
|
||||
// dnsServer?: string // 指定DNS解析服务器
|
||||
|
||||
@@ -33,6 +33,7 @@ export const useFlowStore = defineStore('flow-store', () => {
|
||||
},
|
||||
}) // 流程图数据
|
||||
const flowZoom = ref(100) // 流程图缩放比例
|
||||
const advancedOptions = ref(false) // 高级选项
|
||||
const addNodeSelectList = ref<NodeSelect[]>([]) // 添加节点选项列表
|
||||
const excludeNodeSelectList = ref<NodeNum[]>([]) // 排除的节点选项列表
|
||||
const addNodeBtnRef = ref<HTMLElement | null>(null) // 添加节点按钮
|
||||
@@ -536,6 +537,7 @@ export const useFlowStore = defineStore('flow-store', () => {
|
||||
flowZoom, // 流程图缩放比例
|
||||
selectedNodeId, // 当前选中的节点ID
|
||||
isRefreshNode, // 是否刷新节点
|
||||
advancedOptions, // 高级选项
|
||||
|
||||
// 方法
|
||||
initFlowData, // 初始化流程图数据
|
||||
|
||||
Reference in New Issue
Block a user