【修复】证书颁发机构跳转问题

This commit is contained in:
chudong
2025-05-23 21:51:49 +08:00
parent 52e853aab4
commit d5369d384f
50 changed files with 3494 additions and 2236 deletions

View File

@@ -1,4 +1,4 @@
import { defineComponent, PropType, VNode } from 'vue'
import { defineComponent, VNode } from 'vue'
import { NButton, NFormItemGi, NGrid, NSelect, NText, NSpin, NFlex } from 'naive-ui'
// 类型导入
@@ -126,7 +126,7 @@ export default defineComponent<CAProviderSelectProps>({
return (
<div
class="flex items-center cursor-pointer hover:text-[#333] hover:bg-[#eee]"
onClick={goToAddCAProvider}
onClick={() => goToAddCAProvider('addCAForm')}
>
{$t('t_0_1747990626044')}
</div>
@@ -139,7 +139,7 @@ export default defineComponent<CAProviderSelectProps>({
/>
</NFormItemGi>
<NFormItemGi span={11}>
<NButton class="mx-[8px]" onClick={goToAddCAProvider} disabled={props.disabled}>
<NButton class="mx-[8px]" onClick={()=>goToAddCAProvider('caManage')} disabled={props.disabled}>
{$t('t_0_1747903670020')}
</NButton>
<NButton

View File

@@ -32,8 +32,8 @@ export function useCAProviderSelectController(props: CAProviderSelectProps, emit
* @function goToAddCAProvider
* @description 跳转到CA授权管理页面
*/
const goToAddCAProvider = () => {
window.open('http://localhost:5173/auto-deploy', '_blank')
const goToAddCAProvider = (type: string) => {
window.open(`/auto-deploy?type=${type}`, '_blank')
}
/**

View File

@@ -2,7 +2,7 @@ import { defineComponent, PropType } from 'vue'
import { NTag } from 'naive-ui'
// 类型导入
import type { AuthApiTypeIconProps } from './types.d'
import type { AuthApiTypeIconProps } from './types'
// 绝对路径内部导入 - 组件
import SvgIcon from '@components/SvgIcon' // 请确保此路径 @components/SvgIcon 是正确的

View File

@@ -11,16 +11,15 @@ import BaseComponent from '@components/BaseLayout'
*/
export default defineComponent({
name: 'CAManageModal',
setup() {
const { CATable, CATablePage, handleOpenAddForm, total } = useCAManageController()
/**
* 处理空状态添加按钮点击事件
*/
const handleEmptyAddClick = () => {
handleOpenAddForm()
}
props: {
type: {
type: String,
default: '',
},
},
setup(props) {
const { CATable, CATablePage, handleOpenAddForm, total } = useCAManageController(props)
return () => (
<BaseComponent
v-slots={{
@@ -35,7 +34,7 @@ export default defineComponent({
<CATable
size="medium"
v-slots={{
empty: () => <EmptyState addButtonText={$t('t_4_1747903685371')} onAddClick={handleEmptyAddClick} />,
empty: () => <EmptyState addButtonText={$t('t_4_1747903685371')} onAddClick={handleOpenAddForm} />,
}}
/>
</div>

View File

@@ -19,6 +19,8 @@ export default defineComponent({
WorkflowTable,
WorkflowTablePage,
isDetectionAddWorkflow,
isDetectionOpenCAManage,
isDetectionOpenAddCAForm,
handleAddWorkflow,
handleOpenCAManage,
hasChildRoutes,
@@ -40,6 +42,8 @@ export default defineComponent({
// 挂载时获取数据
onMounted(() => {
isDetectionAddWorkflow()
isDetectionOpenCAManage()
isDetectionOpenAddCAForm()
fetch()
})

View File

@@ -318,13 +318,36 @@ export const useController = () => {
}
}
/**
* @description 检测是否需要打开CA授权管理弹窗
*/
const isDetectionOpenCAManage = () => {
const { type } = route.query
if (type?.includes('caManage')) {
handleOpenCAManage()
router.push({ query: {} })
}
}
/**
* @description 检测是否需要打开添加CA授权弹窗
*/
const isDetectionOpenAddCAForm = () => {
const { type } = route.query
if (type?.includes('addCAForm')) {
handleOpenCAManage({ type: 'addCAForm' })
router.push({ query: {} })
}
}
/**
* @description 打开CA授权管理弹窗
*/
const handleOpenCAManage = () => {
const handleOpenCAManage = ({ type }: { type: string } = { type: '' }) => {
useModal({
title: $t('t_0_1747903670020'),
component: CAManageModal,
componentProps: { type },
area: 780,
})
}
@@ -332,7 +355,9 @@ export const useController = () => {
return {
WorkflowTable,
WorkflowTablePage,
isDetectionAddWorkflow,
isDetectionAddWorkflow, // 检测是否需要添加工作流
isDetectionOpenCAManage, // 检测是否需要打开CA授权管理弹窗
isDetectionOpenAddCAForm, // 检测是否需要打开添加CA授权弹窗
handleViewHistory, // 查看工作流执行历史
handleAddWorkflow, // 打开添加工作流弹窗
handleChangeActive, // 切换工作流状态
@@ -492,7 +517,7 @@ export const useHistoryController = (id: string) => {
* @description CA授权管理业务逻辑控制器
* @returns {Object} 返回CA授权管理控制器对象
*/
export const useCAManageController = () => {
export const useCAManageController = (props: { type: string }) => {
const { handleError } = useError()
// 表格配置
const columns = [
@@ -596,9 +621,9 @@ export const useCAManageController = () => {
resetCaForm()
useModal({
title: $t('t_4_1747903685371'),
area: 500,
component: () => import('./components/CAManageForm').then((m) => m.default),
footer: true,
area: 500,
onUpdateShow: (show) => {
if (!show) fetch()
},
@@ -606,7 +631,10 @@ export const useCAManageController = () => {
}
// 挂载时获取数据
onMounted(fetch)
onMounted(() => {
fetch()
if (props.type === 'addCAForm') handleOpenAddForm()
})
return {
CATable,

View File

@@ -309,6 +309,6 @@ declare global {
// for type re-export
declare global {
// @ts-ignore
export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
import('vue')
}

View File

@@ -16,20 +16,20 @@ declare module 'vue' {
CAProviderSelect: typeof import('./../src/components/CAProviderSelect/index.tsx')['default']
ConditionNode: typeof import('./../src/components/FlowChart/components/base/conditionNode/index.tsx')['default']
Config: typeof import('./../src/components/FlowChart/lib/config.tsx')['default']
DnsProviderSelect: typeof import('./../src/components/DnsProviderSelect/index.tsx')['default']
DnsProviderSelect: typeof import('../src/components/DnsProviderSelect/index.jsx')['default']
Drawer: typeof import('./../src/components/FlowChart/components/other/drawer.tsx')['default']
EndNode: typeof import('./../src/components/FlowChart/components/base/endNode.tsx')['default']
ErrorNode: typeof import('./../src/components/FlowChart/components/base/errorNode/index.tsx')['default']
FlowChart: typeof import('./../src/components/FlowChart/index.tsx')['default']
LogDisplay: typeof import('./../src/components/LogDisplay/index.tsx')['default']
NodeWrap: typeof import('./../src/components/FlowChart/components/render/nodeWrap.tsx')['default']
NotifyProviderSelect: typeof import('./../src/components/NotifyProviderSelect/index.tsx')['default']
NotifyProviderSelect: typeof import('../src/components/NotifyProviderSelect/index.jsx')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
SvgIcon: typeof import('./../src/components/SvgIcon/index.tsx')['default']
TableEmptyState: typeof import('./../src/components/TableEmptyState/index.tsx')['default']
TypeIcon: typeof import('./../src/components/TypeIcon/index.tsx')['default']
UseController: typeof import('./../src/components/DnsProviderSelect/useController.tsx')['default']
TypeIcon: typeof import('../src/components/TypeIcon/index.jsx')['default']
UseController: typeof import('../src/components/DnsProviderSelect/useController.jsx)['default']
UseStore: typeof import('./../src/components/FlowChart/useStore.tsx')['default']
Verify: typeof import('./../src/components/FlowChart/lib/verify.tsx')['default']
}

5450
frontend/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,18 +1,15 @@
{
"folders": [
{
"path": "."
},
{
"path": ".sync-git/allinssl-gitlab"
},
{
"path": ".sync-git/allinssl-github"
},
{
"path": ".sync-git/origin-cloud-control"
}
],
{
"path": "."
},
{
"path": ".sync-git/allinssl-gitlab"
},
{
"path": ".sync-git/allinssl-github"
}
],
"settings": {
"i18n-ally.enabledParsers": ["json", "yaml", "js"],
"i18n-ally.keystyle": "flat",