This commit is contained in:
qiuyuan 2026-02-09 17:47:58 +08:00
parent 22ea512030
commit 1601c8dc5a

View File

@ -39,7 +39,8 @@
<!-- 状态列 -->
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'status'">
<span :style="{ color: instanceStatus.get(record.status)?.color }">{{ instanceStatus.get(record.status)?.text
<span :style="{ color: instanceStatus.get(record.status)?.color }">{{
instanceStatus.get(record.status)?.text
}}</span>
</template>
@ -66,6 +67,18 @@
{{ payTypeDic.get(record.price_type) }}
</span>
</template>
<template v-else-if="column.key === 'ssh_link'">
<span>
{{
record.ssh_link
? JSON.parse(record.ssh_link)?.root_password|| 'N/A'
: 'N/A'
}}
</span>
</template>
<!-- 操作列 -->
<template v-else-if="column.key === 'actions'">
<div class="action-buttons">
@ -182,7 +195,6 @@ import type { TableColumnType } from 'ant-design-vue'
import { message } from 'ant-design-vue'
import { hostCaseList } from '@/apis/admin'
import { releaseCase, reStartCase } from '@/apis/home'
import { get } from 'http'
import { payTypeDic, instanceStatus } from '@/utils/dict'
const router = useRouter()
@ -387,10 +399,10 @@ const handleJupyterLab = async (record: any) => {
try {
if (record.ssh_link) {
const linkObj = JSON.parse(record.ssh_link)
if(linkObj.proxy_host && linkObj.jupyter_token){
const baseUrl = `http://${linkObj.proxy_host}:5784/jupyter?token=${linkObj.jupyter_token}`
if (linkObj.proxy_host && linkObj.jupyter_token && linkObj.jupyter_port) {
const baseUrl = `http://${linkObj.proxy_host}:${linkObj.jupyter_port}/jupyter/lab?token=${linkObj.jupyter_token}`
console.log("====", baseUrl)
// window.open(baseUrl, '_blank', 'noopener,noreferrer')
window.open(baseUrl, '_blank', 'noopener,noreferrer')
}
}