2026-07-14 15:39:44 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="ext-card" @click="handleClick">
|
|
|
|
|
<div class="ext-top">
|
|
|
|
|
<div class="ext-logo" :style="{ background: bgColor, color: iconColor }">
|
|
|
|
|
{{ system.icon }}
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
2026-07-17 11:20:17 +08:00
|
|
|
<h4>{{ system.label }} {{ system.name }}</h4>
|
|
|
|
|
<div class="ext-sub">{{ system.domain }}</div>
|
2026-07-14 15:39:44 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-07-17 11:20:17 +08:00
|
|
|
<p>{{ system.description }}</p>
|
2026-07-14 15:39:44 +08:00
|
|
|
<div class="sso-row">
|
|
|
|
|
<span class="sso-dot" :class="{ warn: system.status === 'integrating' }"></span>
|
|
|
|
|
{{ system.status === 'integrated' ? 'LDAP 原生配置接入 · 零代码' : 'LDAP 接入改造中' }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { computed } from 'vue'
|
|
|
|
|
import { subsystemApi, type Subsystem } from '@/api/subsystem'
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{
|
|
|
|
|
system: Subsystem
|
|
|
|
|
}>()
|
|
|
|
|
|
|
|
|
|
const bgColor = computed(() => {
|
|
|
|
|
const colors: Record<string, string> = {
|
2026-07-15 14:38:58 +08:00
|
|
|
W: 'var(--logo-w-bg)',
|
|
|
|
|
DM: 'var(--logo-dm-bg)',
|
|
|
|
|
CC: 'var(--logo-cc-bg)',
|
|
|
|
|
AP: 'var(--logo-ap-bg)',
|
|
|
|
|
QP: 'var(--logo-qp-bg)',
|
|
|
|
|
GF: 'var(--logo-gf-bg)',
|
2026-07-17 13:55:14 +08:00
|
|
|
SS: 'var(--logo-ss-bg)',
|
2026-07-14 15:39:44 +08:00
|
|
|
}
|
2026-07-15 14:38:58 +08:00
|
|
|
return colors[props.system.icon] || 'var(--bg-panel-2)'
|
2026-07-14 15:39:44 +08:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const iconColor = computed(() => {
|
|
|
|
|
const colors: Record<string, string> = {
|
2026-07-15 14:38:58 +08:00
|
|
|
W: 'var(--tag-blue-text)',
|
|
|
|
|
DM: 'var(--tag-green-text)',
|
|
|
|
|
CC: 'var(--err)',
|
|
|
|
|
AP: 'var(--tag-blue-text)',
|
|
|
|
|
QP: 'var(--tag-amber-text)',
|
|
|
|
|
GF: 'var(--warn)',
|
2026-07-17 13:55:14 +08:00
|
|
|
SS: 'var(--tag-cyan-text)',
|
2026-07-14 15:39:44 +08:00
|
|
|
}
|
2026-07-15 14:38:58 +08:00
|
|
|
return colors[props.system.icon] || 'var(--text-mid)'
|
2026-07-14 15:39:44 +08:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const handleClick = async () => {
|
|
|
|
|
if (props.system.sso_enabled) {
|
|
|
|
|
const { data } = await subsystemApi.getSSOUrl(props.system.id)
|
2026-07-15 14:47:42 +08:00
|
|
|
window.location.assign(data.sso_url)
|
2026-07-14 15:39:44 +08:00
|
|
|
} else {
|
|
|
|
|
window.open(props.system.url, '_blank')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.ext-card {
|
|
|
|
|
background: var(--bg-panel);
|
|
|
|
|
border: 1px solid var(--line);
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
padding: 18px;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 10px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: border-color 0.15s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ext-card:hover {
|
2026-07-15 14:38:58 +08:00
|
|
|
border-color: var(--hover-border);
|
2026-07-14 15:39:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ext-top {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ext-logo {
|
|
|
|
|
width: 38px;
|
|
|
|
|
height: 38px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
font-family: var(--mono);
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
h4 {
|
|
|
|
|
margin: 0;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ext-sub {
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
color: var(--text-dim);
|
|
|
|
|
font-family: var(--mono);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
p {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: var(--text-mid);
|
|
|
|
|
line-height: 1.6;
|
|
|
|
|
margin: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.sso-row {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
color: var(--text-dim);
|
|
|
|
|
margin-top: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.sso-dot {
|
|
|
|
|
width: 6px;
|
|
|
|
|
height: 6px;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
background: var(--accent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.sso-dot.warn {
|
|
|
|
|
background: var(--warn);
|
|
|
|
|
}
|
|
|
|
|
</style>
|