mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-08 07:41:10 +08:00
【修复】证书颁发机构跳转问题
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 是正确的
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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()
|
||||
})
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user