fix: 问题修复

This commit is contained in:
meilin.huang
2024-04-18 20:50:14 +08:00
parent 01d3e1ad28
commit 2a6d620830
23 changed files with 86 additions and 138 deletions

View File

@@ -92,7 +92,6 @@ import { MachineProtocolEnum } from './enums';
import DrawerHeader from '@/components/drawer-header/DrawerHeader.vue';
import { ResourceCodePattern } from '@/common/pattern';
import { TagResourceTypeEnum } from '@/common/commonEnum';
import { getTagPath } from '../component/tag';
const props = defineProps({
visible: {
@@ -186,7 +185,8 @@ const { isFetching: saveBtnLoading, execute: saveMachineExec } = machineApi.save
watchEffect(() => {
state.dialogVisible = props.visible;
if (!state.dialogVisible) {
state.form = defaultForm;
state.form = { ...defaultForm };
state.form.authCerts = [];
return;
}
const machine: any = props.machine;
@@ -236,7 +236,6 @@ const getReqForm = () => {
if (!state.form.sshTunnelMachineId || state.form.sshTunnelMachineId <= 0) {
reqForm.sshTunnelMachineId = -1;
}
reqForm.tagCodePaths = state.form.tagCodePaths.map((t: any) => getTagPath(t)) as any;
return reqForm;
};