2025-03-13 18:41:30 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="version-detail">
|
|
|
|
|
|
<d-breadcrumb class="secret-breadcrumb">
|
2025-03-14 09:47:17 +08:00
|
|
|
|
<gc-breadcrumb-item :to="{ name: 'home' }"><span class="title">首页</span></gc-breadcrumb-item>
|
2025-03-15 10:58:49 +08:00
|
|
|
|
<!-- <gc-breadcrumb-item :to="{ name: 'Search' }"><span class="title">软件商城-软件版本列表</span></gc-breadcrumb-item>-->
|
|
|
|
|
|
<gc-breadcrumb-item><span class="cur-title">软件详情</span></gc-breadcrumb-item>
|
2025-03-13 18:41:30 +08:00
|
|
|
|
</d-breadcrumb>
|
|
|
|
|
|
<div class="version-detail-header">
|
|
|
|
|
|
<div class="header-top">
|
|
|
|
|
|
<GAvatar style="margin-right: 12px" :src="avatarUrl" name="Vue" :width="40" :height="40"></GAvatar>
|
|
|
|
|
|
<div>
|
2025-03-15 17:17:31 +08:00
|
|
|
|
<div class="header-title1">{{ softwareData.name }}</div>
|
2025-03-13 18:41:30 +08:00
|
|
|
|
<div class="header-div">
|
2025-03-15 17:17:31 +08:00
|
|
|
|
<span class="span1">版本:</span><span class="span2">{{ softwareData.version }}</span>
|
2025-03-13 18:41:30 +08:00
|
|
|
|
<span class="split"></span>
|
2025-03-15 17:17:31 +08:00
|
|
|
|
<span class="span1">生命周期状态:</span><span class="span2">{{ softwareData.lifecycle }}</span>
|
2025-03-13 18:41:30 +08:00
|
|
|
|
<span class="split"></span>
|
|
|
|
|
|
<span class="span1">集成风险:</span>
|
2025-03-15 17:17:31 +08:00
|
|
|
|
<d-tag color="#F6933B">{{ softwareData.risk }}</d-tag>
|
2025-03-13 18:41:30 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="fr">
|
2025-03-15 17:17:31 +08:00
|
|
|
|
<d-button class="mr-2" variant="solid" @click="openSubscription">订阅</d-button>
|
|
|
|
|
|
<d-modal class="subscribe-modal" style="width: auto;" v-model="subscribeModalVisable" title="订阅漏洞预警通知">
|
|
|
|
|
|
<template #header>
|
|
|
|
|
|
<div class="subscribe-header">
|
|
|
|
|
|
<d-icon name="icon-info-o" color="var(--devui-info)" size="18px"></d-icon>
|
|
|
|
|
|
<span>订阅漏洞预警通知</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<SubscriptionModal @close="colseSubscription" :softwareData="softwareData"></SubscriptionModal>
|
|
|
|
|
|
</d-modal>
|
2025-03-13 18:41:30 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<d-tabs class="jyh-tabs jyh-tabs-2" type="wrapped" v-model="selectTab">
|
|
|
|
|
|
<d-tab id="bbxx" title="版本信息"></d-tab>
|
|
|
|
|
|
<d-tab id="ylgx" title="依赖关系"></d-tab>
|
|
|
|
|
|
<d-tab id="ldxx" title="漏洞信息"></d-tab>
|
2025-03-15 12:37:16 +08:00
|
|
|
|
<d-tab id="SBOM" title="SBOM"></d-tab>
|
2025-03-14 15:36:40 +08:00
|
|
|
|
<d-tab id="communityInfo" title="开发者社区信息"></d-tab>
|
2025-03-14 20:03:14 +08:00
|
|
|
|
<d-tab id="ai" title="AI修复建议"></d-tab>
|
2025-03-15 12:37:16 +08:00
|
|
|
|
<d-tab id="licenseInfo" title="许可证信息"></d-tab>
|
2025-03-13 18:41:30 +08:00
|
|
|
|
</d-tabs>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="version-detail-content">
|
2025-03-15 12:03:07 +08:00
|
|
|
|
<version-info v-if="selectTab === 'bbxx'" @changeTabs="changeTabs"></version-info>
|
2025-03-14 09:47:17 +08:00
|
|
|
|
<vulnerabilities-list v-else-if="selectTab === 'ldxx'"></vulnerabilities-list>
|
2025-03-14 15:36:40 +08:00
|
|
|
|
<community-info v-else-if="selectTab === 'communityInfo'"></community-info>
|
2025-03-17 15:58:18 +08:00
|
|
|
|
<Dependence v-else-if="selectTab === 'ylgx'"></Dependence>
|
2025-03-15 12:37:16 +08:00
|
|
|
|
<SBOM v-else-if="selectTab === 'SBOM'" />
|
2025-03-14 20:03:14 +08:00
|
|
|
|
<AIRepair v-else-if="selectTab === 'ai'"></AIRepair>
|
2025-03-15 12:37:16 +08:00
|
|
|
|
<LicenseInfo v-else-if="selectTab === 'licenseInfo'"></LicenseInfo>
|
|
|
|
|
|
</div>
|
2025-03-13 18:41:30 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2025-03-15 12:03:07 +08:00
|
|
|
|
import { ref, reactive, watch } from 'vue';
|
2025-03-13 18:41:30 +08:00
|
|
|
|
import { useRouter, useRoute } from 'vue-router';
|
|
|
|
|
|
import { getOrgInfo } from '@/views/Org/hooks/orgInfo';
|
2025-03-14 09:47:17 +08:00
|
|
|
|
import VulnerabilitiesList from './VulnerabilitiesList.vue';
|
2025-03-14 15:36:40 +08:00
|
|
|
|
import CommunityInfo from './CommunityInfo.vue';
|
2025-03-13 18:41:30 +08:00
|
|
|
|
import VersionInfo from './VersionInfo.vue';
|
2025-03-15 12:37:16 +08:00
|
|
|
|
import SBOM from './SBOM.vue';
|
2025-03-14 20:03:14 +08:00
|
|
|
|
import AIRepair from '../../AIRepair/index.vue';
|
|
|
|
|
|
import LicenseInfo from '../../LicenseInfo/index.vue';
|
2025-03-17 15:58:18 +08:00
|
|
|
|
import Dependence from './Dependency.vue'
|
2025-03-13 18:41:30 +08:00
|
|
|
|
const { namespace } = getOrgInfo();
|
2025-03-15 12:03:07 +08:00
|
|
|
|
const route = useRoute(); // 获取路由对象
|
2025-03-14 09:47:17 +08:00
|
|
|
|
const avatarUrl = '/src/assets/imgs/jyh/工程首字母图标.png';
|
2025-03-15 17:17:31 +08:00
|
|
|
|
import SubscriptionModal from '@/views/Jyh/Version/Detail/SubscriptionModal.vue';
|
2025-03-13 18:41:30 +08:00
|
|
|
|
|
|
|
|
|
|
const selectTab = ref('bbxx');
|
|
|
|
|
|
|
|
|
|
|
|
// 删除弹窗
|
|
|
|
|
|
const item = ref('');
|
|
|
|
|
|
const deleteModal = ref();
|
|
|
|
|
|
const deletevModels = ref(false);
|
2025-03-15 12:03:07 +08:00
|
|
|
|
|
|
|
|
|
|
// 监听路由的 query.tab 变化
|
|
|
|
|
|
watch(
|
|
|
|
|
|
() => route.query.tab,
|
|
|
|
|
|
(newTab) => {
|
|
|
|
|
|
if (newTab) {
|
|
|
|
|
|
selectTab.value = newTab; // 根据 query 参数激活 Tab
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
{ immediate: true } // 立即执行一次
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
const changeTabs = (tab:string) => {
|
|
|
|
|
|
selectTab.value = tab;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-13 18:41:30 +08:00
|
|
|
|
const openDelete = (row: any) => {
|
|
|
|
|
|
item.value = row;
|
|
|
|
|
|
deleteModal.value.showFlag = true;
|
|
|
|
|
|
deletevModels.value = true;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
|
|
|
|
// 分页
|
|
|
|
|
|
const changeIndex = () => {
|
|
|
|
|
|
// getGroupClaListData();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const changeSize = () => {
|
|
|
|
|
|
pager.value.pageIndex = 1;
|
|
|
|
|
|
// getGroupClaListData();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const repoFun = (arr: any) => {
|
|
|
|
|
|
return arr ? (arr.length > 3 ? arr.slice(0, 3) : arr) : [];
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 编辑
|
|
|
|
|
|
const editRow = (row: any) => {
|
|
|
|
|
|
// 后续请换成params,暂时params传参没传过去
|
|
|
|
|
|
router.push({
|
|
|
|
|
|
path: 'cla/edit/' + row.object_id,
|
|
|
|
|
|
query: { cla: row.cla, pageType: 'edit' }
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 确认删除
|
|
|
|
|
|
const confirmDelete = async (e: any) => {
|
|
|
|
|
|
// const res = await reqCatch(deleteGroupCla, { group_id: namespace.value, cla_id: item.value.object_id });
|
|
|
|
|
|
// if (!res.error) {
|
|
|
|
|
|
// getGroupClaListData();
|
|
|
|
|
|
// }
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 去成员页
|
|
|
|
|
|
const goMember = (row: any) => {
|
|
|
|
|
|
// 后续请换成params,暂时params传参没传过去,注意路由有个:claID
|
|
|
|
|
|
router.push({
|
|
|
|
|
|
path: 'cla/claId/member',
|
|
|
|
|
|
query: { claId: row.object_id, claName: row.cla_name, group_path: namespace.value, pageType: 'edit' }
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
const getGroupClaListData = async () => {
|
|
|
|
|
|
// const params = {
|
|
|
|
|
|
// group_id: namespace.value,
|
|
|
|
|
|
// page: pager.value.pageIndex,
|
|
|
|
|
|
// per_page: pager.value.pageSize
|
|
|
|
|
|
// };
|
|
|
|
|
|
// const res = await reqCatch(getGroupClaList, params);
|
|
|
|
|
|
// if (!res.error) {
|
|
|
|
|
|
// tableData.value = res?.data?.data?.content;
|
|
|
|
|
|
// pager.value.total = res.data.data.total;
|
|
|
|
|
|
// }
|
|
|
|
|
|
};
|
|
|
|
|
|
getGroupClaListData();
|
|
|
|
|
|
|
|
|
|
|
|
const setClaStatus = async (row: any) => {
|
|
|
|
|
|
// const params = {
|
|
|
|
|
|
// group_id: namespace.value,
|
|
|
|
|
|
// cla_id: row.object_id,
|
|
|
|
|
|
// status: row.status
|
|
|
|
|
|
// };
|
|
|
|
|
|
// const res = await reqCatch(setGroupClaStatus, params);
|
|
|
|
|
|
// if (!res.error) {
|
|
|
|
|
|
// Message.success('操作成功!');
|
|
|
|
|
|
// getGroupClaListData();
|
|
|
|
|
|
// }
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const signCla = (row: any) => {
|
|
|
|
|
|
router.push('/cla/' + row.object_id);
|
|
|
|
|
|
};
|
2025-03-15 17:17:31 +08:00
|
|
|
|
|
|
|
|
|
|
const softwareData = ref({
|
|
|
|
|
|
name: 'vue',
|
|
|
|
|
|
version: '3.5.13',
|
|
|
|
|
|
lifecycle: '选中型',
|
|
|
|
|
|
risk: '低风险',
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const subscribeModalVisable = ref(false);
|
|
|
|
|
|
const openSubscription = () => {
|
|
|
|
|
|
subscribeModalVisable.value = true;
|
|
|
|
|
|
};
|
|
|
|
|
|
const colseSubscription = () => {
|
|
|
|
|
|
subscribeModalVisable.value = false;
|
|
|
|
|
|
};
|
2025-03-13 18:41:30 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
@import 'devui-theme/styles-var/devui-var.scss';
|
|
|
|
|
|
|
|
|
|
|
|
.version-detail {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
.secret-op {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-03-14 18:05:06 +08:00
|
|
|
|
.split {
|
|
|
|
|
|
height: 60%;
|
|
|
|
|
|
background-color: #ddd;
|
|
|
|
|
|
}
|
2025-03-13 18:41:30 +08:00
|
|
|
|
.error {
|
|
|
|
|
|
color: $devui-contrast;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.devui-table__row td) {
|
|
|
|
|
|
padding-top: 16px;
|
|
|
|
|
|
padding-bottom: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.devui-tag .devui-tag--default) {
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
padding: 4px 8px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
line-height: 16px;
|
|
|
|
|
|
margin-right: 8px;
|
2025-03-14 09:47:17 +08:00
|
|
|
|
border: 1px solid #e3e3ee;
|
2025-03-13 18:41:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.one-line {
|
|
|
|
|
|
word-break: break-all;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
|
color: #9a9b9c;
|
|
|
|
|
|
line-height: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.cur-title {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
color: #2d2d2e;
|
|
|
|
|
|
line-height: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.search-form {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
padding: 12px 20px 12px 0;
|
|
|
|
|
|
border-radius: 8px 0px 8px 8px;
|
2025-03-14 09:47:17 +08:00
|
|
|
|
background: #f2f5fc;
|
2025-03-13 18:41:30 +08:00
|
|
|
|
|
|
|
|
|
|
.output-btn {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
right: 28px;
|
|
|
|
|
|
bottom: 4px;
|
|
|
|
|
|
color: #191919;
|
|
|
|
|
|
font-family: HarmonyOS Sans SC;
|
|
|
|
|
|
font-weight: regular;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
line-height: 22px;
|
|
|
|
|
|
letter-spacing: 0px;
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.secret-breadcrumb {
|
|
|
|
|
|
padding: 7px 20px 12px;
|
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.version-detail-header {
|
2025-03-14 09:47:17 +08:00
|
|
|
|
background: #ffffff;
|
2025-03-13 18:41:30 +08:00
|
|
|
|
padding: 0 16%;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
//box-shadow: inset 0px -1px 0px 0px #EEF0F5;
|
|
|
|
|
|
.header-top {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
.header-title1 {
|
|
|
|
|
|
color: #191919;
|
|
|
|
|
|
font-family: HarmonyOS Sans;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
line-height: 26px;
|
|
|
|
|
|
letter-spacing: 0px;
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
margin-bottom: 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.header-div {
|
|
|
|
|
|
display: flex;
|
2025-03-14 18:05:06 +08:00
|
|
|
|
align-items: center;
|
2025-03-13 18:41:30 +08:00
|
|
|
|
height: 20px;
|
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
|
.span1 {
|
|
|
|
|
|
color: #808080;
|
|
|
|
|
|
font-family: HarmonyOS Sans SC;
|
|
|
|
|
|
font-weight: regular;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
line-height: 20px;
|
|
|
|
|
|
letter-spacing: 0px;
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
}
|
|
|
|
|
|
.span2 {
|
|
|
|
|
|
color: #191919;
|
|
|
|
|
|
font-family: HarmonyOS Sans;
|
|
|
|
|
|
font-weight: regular;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
line-height: 20px;
|
|
|
|
|
|
letter-spacing: 0px;
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .devui-tag {
|
|
|
|
|
|
.devui-tag--md {
|
2025-03-14 09:47:17 +08:00
|
|
|
|
color: #f6933b;
|
2025-03-13 18:41:30 +08:00
|
|
|
|
font-family: HarmonyOS Sans SC;
|
|
|
|
|
|
font-weight: regular;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
line-height: 20px;
|
|
|
|
|
|
letter-spacing: 0px;
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
height: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.version-detail-content {
|
|
|
|
|
|
padding: 0 16%;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
margin-top: 12px;
|
|
|
|
|
|
}
|
2025-03-15 17:17:31 +08:00
|
|
|
|
|
|
|
|
|
|
.subscribe-modal {
|
|
|
|
|
|
width: auto;
|
|
|
|
|
|
|
|
|
|
|
|
.subscribe-header {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
padding: 20px 20px 0;
|
|
|
|
|
|
>span {
|
|
|
|
|
|
margin-left: 8px;
|
|
|
|
|
|
color: #191919;
|
|
|
|
|
|
font-family: HarmonyOS Sans SC;
|
|
|
|
|
|
font-weight: medium;
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
line-height: 26px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-03-13 18:41:30 +08:00
|
|
|
|
</style>
|
2025-03-15 17:17:31 +08:00
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
</style>
|