Merge branch 'master' of https://gitcode.com/hk_openRepo/OpenRepo_Portal into junjie_dev
# Conflicts: # src/api/jyh/index.ts # src/components/AdvanceSearch/index.vue # src/views/Jyh/Home/index.vue
This commit is contained in:
@@ -1,14 +1,56 @@
|
|||||||
|
import { reqCatchV2, type catchRt } from '@/utils/catch';
|
||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
|
||||||
// 详情-获取版本信息
|
// 详情-获取版本信息
|
||||||
export function releaseInfo(params: { repoId: string,releaseId: string }): Promise<any> {
|
export function releaseInfo(params: { softwareId: string }): Promise<any> {
|
||||||
const { repoId,releaseId } = params;
|
const { softwareId } = params;
|
||||||
return request({
|
return request({
|
||||||
url: `/api/v1/repo/release/info?repo_id=${repoId}&releaseId=${releaseId}`,
|
url: `/api/v1/repo/release/info?softwareId=${softwareId}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 详情-搜索结果列表
|
||||||
|
export function releasePage(data): Promise<any> {
|
||||||
|
return request({
|
||||||
|
url: `/api/v1/repo/release/page`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取邀请列表
|
||||||
|
export function getInviteListData(): catchRt<any> {
|
||||||
|
return reqCatchV2(() => request({
|
||||||
|
url: '/api/v1/group/member/invite/list',
|
||||||
|
method: 'get'
|
||||||
|
}, {
|
||||||
|
customError: true
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理邀请
|
||||||
|
export function acceptInvite(params): catchRt<any> {
|
||||||
|
return reqCatchV2(() => request({
|
||||||
|
url: '/api/v1/group/member/invite/accept',
|
||||||
|
method: 'post',
|
||||||
|
data: params,
|
||||||
|
}, {
|
||||||
|
customError: true
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 发送订阅
|
||||||
|
export function subscribeSoftware(params): catchRt<any> {
|
||||||
|
return reqCatchV2(() => request({
|
||||||
|
url: '/api/v1/alert/subscribe',
|
||||||
|
method: 'post',
|
||||||
|
data: params,
|
||||||
|
}, {
|
||||||
|
customError: true
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
// 获取高级筛选语言列表
|
// 获取高级筛选语言列表
|
||||||
export function searchLanguageList() {
|
export function searchLanguageList() {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
<d-form :layout="props.layout" :label-align="'end'">
|
<d-form :layout="props.layout" :label-align="'end'">
|
||||||
<d-row :gutter="16">
|
<d-row :gutter="16">
|
||||||
<d-col :span="8">
|
<d-col :span="8">
|
||||||
<d-form-item field="name" label="软件/组件名称">
|
<d-form-item field="name" label="软件名称">
|
||||||
<d-input placeholder="请输入软件/组件名称" v-model="formData.searchWord"/>
|
<d-input placeholder="请输入软件名称" v-model="formData.searchWord"/>
|
||||||
</d-form-item>
|
</d-form-item>
|
||||||
</d-col>
|
</d-col>
|
||||||
<d-col :span="8">
|
<d-col :span="8">
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
</d-row>
|
</d-row>
|
||||||
<d-row :gutter="16">
|
<d-row :gutter="16">
|
||||||
<d-col :span="8">
|
<d-col :span="8">
|
||||||
<d-form-item field="dependency" label="依赖软件">
|
<d-form-item field="dependency" label="依赖软件名称">
|
||||||
<d-input v-model="formData.dependentSoftware"/>
|
<d-input v-model="formData.dependentSoftware"/>
|
||||||
</d-form-item>
|
</d-form-item>
|
||||||
</d-col>
|
</d-col>
|
||||||
@@ -49,8 +49,6 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, defineEmits, defineProps, watch } from 'vue';
|
import { ref, defineEmits, defineProps, watch } from 'vue';
|
||||||
import { searchLanguageList } from '@/api/jyh'
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
layout: {
|
layout: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -102,11 +100,32 @@ const cancel = () => {
|
|||||||
emit('update:modelValue', formData.value);
|
emit('update:modelValue', formData.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
const getLanguageList = async() => {
|
const getLanguageList = () => {
|
||||||
const res: any = await searchLanguageList();
|
const mockData = [
|
||||||
if (!res.error) {
|
{
|
||||||
languageList.value = res.data.data;
|
"key": "c++",
|
||||||
}
|
"name": "C++"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "C",
|
||||||
|
"name": "C"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "PYTHON",
|
||||||
|
"name": "PYTHON"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "JAVA",
|
||||||
|
"name": "JAVA"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
languageList.value = mockData.map(item => {
|
||||||
|
return {
|
||||||
|
name: item.name,
|
||||||
|
value: item.key
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
getLanguageList();
|
getLanguageList();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<template #menu>
|
<template #menu>
|
||||||
<ul class="list-menu">
|
<ul class="list-menu">
|
||||||
<li class="menu-item" @click="onCategoryChange('组件/软件')">组件/软件</li>
|
<li class="menu-item" @click="onCategoryChange('软件')">软件</li>
|
||||||
<d-dropdown :position="position" :offset="0">
|
<d-dropdown :position="position" :offset="0">
|
||||||
<li class="menu-item">
|
<li class="menu-item">
|
||||||
行业
|
行业
|
||||||
@@ -107,6 +107,8 @@ const inputGlow = ref(false);
|
|||||||
const searchStr = ref('');
|
const searchStr = ref('');
|
||||||
const position = ref(['right-start', 'right-end']);
|
const position = ref(['right-start', 'right-end']);
|
||||||
const industryOptions = ref(['通信', '军工', '金融', '能源'])
|
const industryOptions = ref(['通信', '军工', '金融', '能源'])
|
||||||
|
const searchType = ref('软件');
|
||||||
|
const searchOptions = ref(['软件']);
|
||||||
const offset = ref({ mainAxis: 7 , crossAxis: -10 });
|
const offset = ref({ mainAxis: 7 , crossAxis: -10 });
|
||||||
const isOpen = ref(false);
|
const isOpen = ref(false);
|
||||||
const rotate = ref(0);
|
const rotate = ref(0);
|
||||||
@@ -117,7 +119,7 @@ const currentWarning = ref();
|
|||||||
|
|
||||||
const homeSearch = ref(null);
|
const homeSearch = ref(null);
|
||||||
const dropdownWidth = ref(0);
|
const dropdownWidth = ref(0);
|
||||||
const selectedCate = ref('组件/软件');
|
const selectedCate = ref('软件');
|
||||||
const tagMap = {
|
const tagMap = {
|
||||||
'高': '#f66f6a',
|
'高': '#f66f6a',
|
||||||
'中': '#fac20a',
|
'中': '#fac20a',
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ const tableConfig = ref([
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'affectedComponent',
|
field: 'affectedComponent',
|
||||||
header: '影响组件',
|
header: '影响软件',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
sortMethod: null
|
sortMethod: null
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
||||||
<d-column field="code" header="订阅时间"></d-column>
|
<d-column field="code" header="订阅时间"></d-column>
|
||||||
<d-column field="name" header="软件/组件名称"></d-column>
|
<d-column field="name" header="软件名称"></d-column>
|
||||||
<d-column field="detail" header="版本号"></d-column>
|
<d-column field="detail" header="版本号"></d-column>
|
||||||
<d-column field="owner" header="订阅人"></d-column>
|
<d-column field="owner" header="订阅人"></d-column>
|
||||||
<d-column header="操作" width="100">
|
<d-column header="操作" width="100">
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
||||||
<d-column field="code" header="订阅时间"></d-column>
|
<d-column field="code" header="订阅时间"></d-column>
|
||||||
<d-column field="name" header="软件/组件名称"></d-column>
|
<d-column field="name" header="软件名称"></d-column>
|
||||||
<d-column field="detail" header="版本号"></d-column>
|
<d-column field="detail" header="版本号"></d-column>
|
||||||
<d-column header="操作" width="100">
|
<d-column header="操作" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|||||||
@@ -1,36 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="warning-detail-container">
|
<div class="warning-detail-container">
|
||||||
<div class="warning-title">
|
<div class="warning-title">
|
||||||
<div>{{ warningData.title }}</div>
|
<div>{{ warningData.subject }}</div>
|
||||||
<div class="sub-title mt-3">
|
<div class="sub-title mt-3">
|
||||||
<div>
|
<div>
|
||||||
<span>重要性</span>
|
<span>重要性</span>
|
||||||
<d-tag type="danger" size="sm">{{warningData.importance}}</d-tag>
|
<d-tag type="danger" size="sm">{{warningData.importance}}</d-tag>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div v-if="propsData.type === 'system'">
|
||||||
<d-button v-show="mode === 'readonly'" class="edit-btn" icon="icon-edit" variant="text" title="编辑" @click="handleModeChange"/>
|
<d-button v-show="mode === 'readonly'" class="edit-btn" icon="icon-edit" variant="text" title="编辑" @click="handleModeChange"/>
|
||||||
<d-button v-show="mode === 'editonly'" class="edit-btn" @click="handleModeChange">预览</d-button>
|
<d-button v-show="mode === 'editonly'" class="edit-btn" @click="handleModeChange">预览</d-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="warning-text">
|
<div class="warning-text">
|
||||||
<!-- <div class="text-box mb-5">
|
|
||||||
<div>一、概要</div>
|
|
||||||
<p> {{ warningData.summary }}</p>
|
|
||||||
<d-textarea v-model="warningData.summary" id="textArea" autosize></d-textarea>
|
|
||||||
</div>
|
|
||||||
<div class="text-box">
|
|
||||||
<div>二、修复方案</div>
|
|
||||||
<p> {{ warningData.fixMethod }}</p>
|
|
||||||
<d-textarea v-model="warningData.fixMethod" id="textArea2"></d-textarea>
|
|
||||||
</div> -->
|
|
||||||
<d-editor-md
|
<d-editor-md
|
||||||
v-model="warningData.text"
|
v-model="warningData.overview"
|
||||||
:mode="mode"
|
:mode="mode"
|
||||||
:toolbar-config="toolbarConfig"
|
:toolbar-config="toolbarConfig"
|
||||||
></d-editor-md>
|
></d-editor-md>
|
||||||
</div>
|
</div>
|
||||||
<div :style="{'border-radius': propsData.type === 'user' ? '6px' : 0}" class="warning-from">可信开源代码库运营团队 {{ warningData.fromTime }}</div>
|
<div :style="{'border-radius': propsData.type === 'user' ? '6px' : 0}" class="warning-from">{{warningData.group}} {{ warningData.pulishTime }}</div>
|
||||||
<div v-if="propsData.type === 'system'" class="warning-operation">
|
<div v-if="propsData.type === 'system'" class="warning-operation">
|
||||||
<d-button @click="confirm" variant="solid" class="mr-2">确定</d-button>
|
<d-button @click="confirm" variant="solid" class="mr-2">确定</d-button>
|
||||||
<d-button @click="$emit('close')">取消</d-button>
|
<d-button @click="$emit('close')">取消</d-button>
|
||||||
@@ -43,24 +33,14 @@ import { ref } from 'vue';
|
|||||||
|
|
||||||
const emit = defineEmits(['close']);
|
const emit = defineEmits(['close']);
|
||||||
const propsData = defineProps(['type', 'warningData']);
|
const propsData = defineProps(['type', 'warningData']);
|
||||||
const warningData = ref({
|
const warningData = ref({});
|
||||||
title: '【漏洞排查预警】ApacheIgnite远程代码执行漏洞排查(CVE-2024-52577)',
|
|
||||||
importance: '高',
|
|
||||||
summary: '近日,安全中心发现Apache lgnite远程代码执行漏洞(CVE-2024-52577)。在 2.6.0<Apache Ignite< 2.17.0版本中,由于lgnite未能正确实施类序列化过滤器,攻击者能够利用恶意序列化对象绕过安全检查,从而在服务器端反序列化时触发任意代码的执行。经可信开源代码库运营团队评审漏洞技术定级2级/3级,若不满足利用条件可举证降为6级。请你按要求在XX时间内完成修复。',
|
|
||||||
fixMethod: '升级Apache Ignite至安全版本:2.17.0',
|
|
||||||
fromTime: '2025-2-20',
|
|
||||||
text: `## 一、概要
|
|
||||||
近日,安全中心发现Apache lgnite远程代码执行漏洞(CVE-2024-52577)。在 2.6.0<Apache Ignite< 2.17.0版本中,由于lgnite未能正确实施类序列化过滤器,攻击者能够利用恶意序列化对象绕过安全检查,从而在服务器端反序列化时触发任意代码的执行。经可信开源代码库运营团队评审漏洞技术定级2级/3级,若不满足利用条件可举证降为6级。请你按要求在XX时间内完成修复。
|
|
||||||
## 二、修复方案
|
|
||||||
升级Apache Ignite至安全版本:2.17.0`
|
|
||||||
});
|
|
||||||
const toolbarConfig = [
|
const toolbarConfig = [
|
||||||
['undo', 'redo'],
|
['undo', 'redo'],
|
||||||
['h1', 'h2', 'bold', 'italic', 'strike', 'underline', 'color', 'font'],
|
['h1', 'h2', 'bold', 'italic', 'strike', 'underline', 'color', 'font'],
|
||||||
['ul', 'ol', 'checklist', 'code', 'link', 'image', 'table'],
|
['ul', 'ol', 'checklist', 'code', 'link', 'image', 'table'],
|
||||||
];
|
];
|
||||||
const mode = ref('readonly');
|
const mode = ref('readonly');
|
||||||
// warningData.value = propsData.warningData;
|
warningData.value = JSON.parse(propsData.warningData.alertMsg ?? '{}');
|
||||||
const confirm = () => {
|
const confirm = () => {
|
||||||
emit('close');
|
emit('close');
|
||||||
};
|
};
|
||||||
@@ -83,7 +63,7 @@ const handleModeChange = () => {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
line-height: 28px;
|
line-height: 28px;
|
||||||
padding: 4px 20px 12px;
|
padding: 20px 20px 12px;
|
||||||
|
|
||||||
.sub-title {
|
.sub-title {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -102,7 +82,15 @@ const handleModeChange = () => {
|
|||||||
background: #F6F6F8;
|
background: #F6F6F8;
|
||||||
color: initial;
|
color: initial;
|
||||||
|
|
||||||
::v-deep .dp-md-view {
|
:deep .dp-md-readonly {
|
||||||
|
.dp-md-toolbar-container {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep .dp-md-view {
|
||||||
|
background-color: #F6F6F8;
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<d-modal class="warning-modal" v-model="warningModalVisable" title="主题:">
|
<d-modal class="warning-modal" v-model="warningModalVisable" title="">
|
||||||
<EarlyWarningDetail @close="colseWarningDetail" :warningData="currentWarning" type="user"></EarlyWarningDetail>
|
<EarlyWarningDetail @close="colseWarningDetail" :warningData="currentWarning" type="user"></EarlyWarningDetail>
|
||||||
</d-modal>
|
</d-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<d-modal class="warning-modal" v-model="warningModalVisable" title="主题:">
|
<d-modal class="warning-modal" v-model="warningModalVisable" title="">
|
||||||
<EarlyWarningDetail @close="colseWarningDetail" :warningData="currentWarning" type="user"></EarlyWarningDetail>
|
<EarlyWarningDetail @close="colseWarningDetail" :warningData="currentWarning" type="user"></EarlyWarningDetail>
|
||||||
</d-modal>
|
</d-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -8,26 +8,31 @@
|
|||||||
:header-bg="true"
|
:header-bg="true"
|
||||||
:data="noticeTableData"
|
:data="noticeTableData"
|
||||||
>
|
>
|
||||||
<d-column field="content" header="邀请内容"></d-column>
|
<d-column field="content" header="邀请内容" show-overflow-tooltip></d-column>
|
||||||
<d-column field="time" header="邀请时间" width="200"></d-column>
|
<d-column field="createTime" header="邀请时间" width="200" show-overflow-tooltip></d-column>
|
||||||
<d-column field="creator" header="邀请人" width="180"></d-column>
|
<d-column field="createUser" header="邀请人" width="180" show-overflow-tooltip></d-column>
|
||||||
<d-column header="操作" width="150">
|
<d-column header="操作" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<d-button
|
<d-button
|
||||||
variant="text"
|
variant="text"
|
||||||
color="primary"
|
color="primary"
|
||||||
class="mr-2"
|
class="mr-2"
|
||||||
|
@click="handleAccept(scope.row, 1)"
|
||||||
>
|
>
|
||||||
接收
|
接收
|
||||||
</d-button>
|
</d-button>
|
||||||
<d-button
|
<d-button
|
||||||
variant="text"
|
variant="text"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
@click="handleAccept(scope.row, -1)"
|
||||||
>
|
>
|
||||||
拒绝
|
拒绝
|
||||||
</d-button>
|
</d-button>
|
||||||
</template>
|
</template>
|
||||||
</d-column>
|
</d-column>
|
||||||
|
<template #empty>
|
||||||
|
<NoData />
|
||||||
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
<div class="invitation-pagination">
|
<div class="invitation-pagination">
|
||||||
<d-pagination
|
<d-pagination
|
||||||
@@ -47,21 +52,51 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { acceptInvite, getInviteListData } from '@/api/jyh';
|
||||||
import { ref, shallowReactive } from 'vue';
|
import { ref, shallowReactive } from 'vue';
|
||||||
|
import NoData from "@/components/NoData/NoData.vue";
|
||||||
|
import { Message } from 'vue-devui';
|
||||||
|
|
||||||
const noticeTableData = ref([
|
const noticeTableData = ref([]);
|
||||||
{
|
|
||||||
content: '当您订阅的软件有漏洞预警通知时,将以应用号的方式通知。可在首页查看或取消订阅!',
|
|
||||||
time: '2025-03-15 17:29:30',
|
|
||||||
creator: '132456798',
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
const pager = shallowReactive({
|
const pager = shallowReactive({
|
||||||
total: 1,
|
total: 0,
|
||||||
pageIndex: 1,
|
pageIndex: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageSizeOptions: [10, 20, 30, 40, 50],
|
pageSizeOptions: [10, 20, 30, 40, 50],
|
||||||
});
|
});
|
||||||
|
const queryInviteListData = async () => {
|
||||||
|
const data = await getInviteListData();
|
||||||
|
console.log(data)
|
||||||
|
if (!data?.data?.data?.data) {
|
||||||
|
pager.total = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
noticeTableData.value = data.data.data.data.map(item => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
content: `尊敬的用户,您好!为更好地整合资源、协同开发,现诚邀您加入${item.name}。`
|
||||||
|
}
|
||||||
|
});
|
||||||
|
pager.total = data.data.data.data.length;
|
||||||
|
};
|
||||||
|
queryInviteListData();
|
||||||
|
const handleAccept = async (row, type) => {
|
||||||
|
const data = await acceptInvite({
|
||||||
|
groupId: row.groupId,
|
||||||
|
status: type,
|
||||||
|
});
|
||||||
|
if (data?.data?.data?.data) {
|
||||||
|
Message({
|
||||||
|
type,
|
||||||
|
message: '成功接受',
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
Message({
|
||||||
|
type,
|
||||||
|
message: '接受失败',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
||||||
<d-column field="code" header="订阅时间"></d-column>
|
<d-column field="code" header="订阅时间"></d-column>
|
||||||
<d-column field="name" header="软件/组件名称"></d-column>
|
<d-column field="name" header="软件名称"></d-column>
|
||||||
<d-column field="detail" header="版本号"></d-column>
|
<d-column field="detail" header="版本号"></d-column>
|
||||||
<d-column field="owner" header="订阅人"></d-column>
|
<d-column field="owner" header="订阅人"></d-column>
|
||||||
<d-column header="操作" width="100">
|
<d-column header="操作" width="100">
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
||||||
<d-column field="code" header="订阅时间"></d-column>
|
<d-column field="code" header="订阅时间"></d-column>
|
||||||
<d-column field="name" header="软件/组件名称"></d-column>
|
<d-column field="name" header="软件名称"></d-column>
|
||||||
<d-column field="detail" header="版本号"></d-column>
|
<d-column field="detail" header="版本号"></d-column>
|
||||||
<d-column header="操作" width="100">
|
<d-column header="操作" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<div v-else>{{ organizationInfo.organizationName }}</div>
|
<div v-else>{{ organizationInfo.organizationName }}</div>
|
||||||
</d-form-item>
|
</d-form-item>
|
||||||
<d-form-item field="organizationProfile" label="组织简介">
|
<d-form-item field="organizationProfile" label="组织简介">
|
||||||
<d-textarea v-if="isEdit" v-model="createFormData.organizationProfile" show-count maxlength="200" />
|
<d-textarea v-if="isEdit" v-model="createFormData.organizationProfile" show-count maxlength="200" :rows="5" />
|
||||||
<div v-else>{{ organizationInfo.organizationProfile }}</div>
|
<div v-else>{{ organizationInfo.organizationProfile }}</div>
|
||||||
</d-form-item>
|
</d-form-item>
|
||||||
</d-form>
|
</d-form>
|
||||||
@@ -35,10 +35,9 @@
|
|||||||
<d-search icon-position="left" class="w-[296px]" placeholder="请输入搜索内容" />
|
<d-search icon-position="left" class="w-[296px]" placeholder="请输入搜索内容" />
|
||||||
</div>
|
</div>
|
||||||
<d-table
|
<d-table
|
||||||
v-if="memberTableData.length"
|
|
||||||
:data="memberTableData"
|
:data="memberTableData"
|
||||||
class="w-full mb-[20px]"
|
class="w-full mb-[20px] organ-table"
|
||||||
fix-header
|
:fix-header="memberTableData.length > 0"
|
||||||
header-bg
|
header-bg
|
||||||
max-height="500px"
|
max-height="500px"
|
||||||
>
|
>
|
||||||
@@ -52,11 +51,13 @@
|
|||||||
<d-column field="joinDate" header="加入时间" />
|
<d-column field="joinDate" header="加入时间" />
|
||||||
<d-column header="操作">
|
<d-column header="操作">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<d-button variant="text" color="primary" @click="openDeleteModal(row)">删除</d-button>
|
<d-button size="sm" variant="text" color="primary" class="p-0 justify-start" @click="openDeleteModal(row)">删除</d-button>
|
||||||
</template>
|
</template>
|
||||||
</d-column>
|
</d-column>
|
||||||
|
<template #empty>
|
||||||
|
<NoData />
|
||||||
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
<NoData v-else />
|
|
||||||
<d-pagination
|
<d-pagination
|
||||||
class="flex justify-end"
|
class="flex justify-end"
|
||||||
:total="pager.total"
|
:total="pager.total"
|
||||||
@@ -83,7 +84,7 @@
|
|||||||
<d-input v-model="createFormData.organizationName" />
|
<d-input v-model="createFormData.organizationName" />
|
||||||
</d-form-item>
|
</d-form-item>
|
||||||
<d-form-item field="organizationProfile" label="组织简介" required>
|
<d-form-item field="organizationProfile" label="组织简介" required>
|
||||||
<d-textarea v-model="createFormData.organizationProfile" show-count maxlength="200" />
|
<d-textarea v-model="createFormData.organizationProfile" show-count maxlength="200" :rows="6" />
|
||||||
</d-form-item>
|
</d-form-item>
|
||||||
</d-form>
|
</d-form>
|
||||||
|
|
||||||
@@ -112,7 +113,7 @@
|
|||||||
</d-modal>
|
</d-modal>
|
||||||
|
|
||||||
<d-modal v-model="deleteMemberModalCtrl" title="删除成员" class="w-[600px]">
|
<d-modal v-model="deleteMemberModalCtrl" title="删除成员" class="w-[600px]">
|
||||||
<div>即将删除成员‘{{ deleteRow.userName }}’,请确认是否继续?</div>
|
<div class="mb-[20px]">即将删除成员‘{{ deleteRow.userName }}’,请确认是否继续?</div>
|
||||||
<div class="flex justify-center">
|
<div class="flex justify-center">
|
||||||
<d-button variant="solid" class="mr-[8px]" @click="deleteMember">确定</d-button>
|
<d-button variant="solid" class="mr-[8px]" @click="deleteMember">确定</d-button>
|
||||||
<d-button @click="closeDeleteMemberModal">取消</d-button>
|
<d-button @click="closeDeleteMemberModal">取消</d-button>
|
||||||
@@ -363,7 +364,7 @@ function closeDeleteMemberModal() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
:deep(.devui-table__row td) {
|
.organ-table :deep(.devui-table__row td) {
|
||||||
padding: 10px 16px;
|
padding: 10px 16px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
</d-breadcrumb>
|
</d-breadcrumb>
|
||||||
<div class="version-detail-header">
|
<div class="version-detail-header">
|
||||||
<div class="header-top">
|
<div class="header-top">
|
||||||
<GAvatar style="margin-right: 16px" :src="avatarUrl" name="Vue" :width="72" :height="72"></GAvatar>
|
<GAvatar style="margin-right: 16px" :name="accountInfo.username" :src="accountInfo.avatar" name="Vue" :width="72" :height="72"></GAvatar>
|
||||||
<div class="pt-24">
|
<div class="pt-24">
|
||||||
<div class="header-title1">UserName</div>
|
<div class="header-title1">{{ accountInfo.username || '--' }}</div>
|
||||||
<div class="header-div">
|
<div class="header-div">
|
||||||
<span class="span1"
|
<span class="span1"
|
||||||
>介绍:包含项目管理、代码托管、CI/CD 和制品库等功能,提供完整的研发流程建议的新的团队…</span
|
>介绍:包含项目管理、代码托管、CI/CD 和制品库等功能,提供完整的研发流程建议的新的团队…</span
|
||||||
@@ -43,11 +43,13 @@ import { getOrgInfo } from '@/views/Org/hooks/orgInfo';
|
|||||||
import EarlyWarning from './Detail/EarlyWarning.vue';
|
import EarlyWarning from './Detail/EarlyWarning.vue';
|
||||||
import SubscribeList from './Detail/SubscribeList.vue';
|
import SubscribeList from './Detail/SubscribeList.vue';
|
||||||
import PersonalSettings from './Detail/PersonalSettings.vue';
|
import PersonalSettings from './Detail/PersonalSettings.vue';
|
||||||
|
import { useAccount } from '@/utils/hooks/useAccount';
|
||||||
|
|
||||||
const { namespace } = getOrgInfo();
|
const { namespace } = getOrgInfo();
|
||||||
const avatarUrl = '/src/assets/imgs/avatar/male.png';
|
const avatarUrl = '/src/assets/imgs/avatar/male.png';
|
||||||
|
|
||||||
const selectTab = ref('yjtzlb');
|
const selectTab = ref('yjtzlb');
|
||||||
|
const { accountInfo, RemoveInfo } = useAccount();
|
||||||
|
|
||||||
// 删除弹窗
|
// 删除弹窗
|
||||||
const item = ref('');
|
const item = ref('');
|
||||||
|
|||||||
84
src/views/Jyh/Search/Components/CountryModal.vue
Normal file
84
src/views/Jyh/Search/Components/CountryModal.vue
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<d-modal
|
||||||
|
title="贡献者分布"
|
||||||
|
v-model="visible"
|
||||||
|
class="file-search-modal"
|
||||||
|
:style="{ width: '800px' }"
|
||||||
|
@close="handleClose"
|
||||||
|
>
|
||||||
|
<Card simple class="jyh-card mb-4" style="box-shadow: none;padding: 0">
|
||||||
|
<d-chart :option="optionConChart" style="width: 100%; height: 400px"></d-chart>
|
||||||
|
<p class="text-center mt-translate-y">国家/地球分布</p>
|
||||||
|
</Card>
|
||||||
|
<template #footer>
|
||||||
|
<d-modal-footer style="text-align: center;">
|
||||||
|
<d-button variant="solid" color="primary" @click="handleClose">确认</d-button>
|
||||||
|
<d-button @click="handleClose">取消</d-button>
|
||||||
|
</d-modal-footer>
|
||||||
|
</template>
|
||||||
|
</d-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, defineExpose, reactive } from 'vue';
|
||||||
|
import { DChart } from 'vue-devui/echarts';
|
||||||
|
|
||||||
|
const optionConChart = reactive({
|
||||||
|
tooltip: {
|
||||||
|
show: true,
|
||||||
|
trigger: 'item'
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
data: ['美国', '中国', '德国', '瑞士', '法国', '英国', '印度', '日本', '荷兰', '俄罗斯']
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
// 给y轴添加单位后缀
|
||||||
|
axisLabel: {
|
||||||
|
formatter: '{value}%'
|
||||||
|
},
|
||||||
|
name: '单位',
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
data: [12, 14.8, 23.6, 18.6, 17.3, 13.1, 16, 11.8, 13.9, 16.4],
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: '40%',
|
||||||
|
// 给label添加单位后缀
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'top',
|
||||||
|
formatter: '{c}%'
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
color: '#2070F3',
|
||||||
|
borderRadius: [5, 5, 0, 0]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
// 控制模态框显示/隐藏
|
||||||
|
const visible = ref(false);
|
||||||
|
|
||||||
|
// 打开模态框
|
||||||
|
const openModal = () => {
|
||||||
|
visible.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 关闭模态框
|
||||||
|
const handleClose = () => {
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 暴露方法,供父组件调用
|
||||||
|
defineExpose({
|
||||||
|
openModal,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
@import 'devui-theme/styles-var/devui-var.scss';
|
||||||
|
|
||||||
|
</style>
|
||||||
84
src/views/Jyh/Search/Components/OrgModal.vue
Normal file
84
src/views/Jyh/Search/Components/OrgModal.vue
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<d-modal
|
||||||
|
title="贡献者分布"
|
||||||
|
v-model="visible"
|
||||||
|
class="file-search-modal"
|
||||||
|
:style="{ width: '800px' }"
|
||||||
|
@close="handleClose"
|
||||||
|
>
|
||||||
|
<Card simple class="jyh-card mb-4" style="box-shadow: none;padding: 0">
|
||||||
|
<d-chart :option="optionOrgChart" style="width: 100%; height: 400px"></d-chart>
|
||||||
|
<p class="text-center mt-translate-y">组织/公司分布</p>
|
||||||
|
</Card>
|
||||||
|
<template #footer>
|
||||||
|
<d-modal-footer style="text-align: center;">
|
||||||
|
<d-button variant="solid" color="primary" @click="handleClose">确认</d-button>
|
||||||
|
<d-button @click="handleClose">取消</d-button>
|
||||||
|
</d-modal-footer>
|
||||||
|
</template>
|
||||||
|
</d-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, defineExpose, reactive } from 'vue';
|
||||||
|
import { DChart } from 'vue-devui/echarts';
|
||||||
|
|
||||||
|
const optionOrgChart = reactive({
|
||||||
|
tooltip: {
|
||||||
|
show: true,
|
||||||
|
trigger: 'item'
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
data: ['公司1', '公司2', '公司3', '公司4', '公司5', '公司6', '公司7', '公司8', '公司9', '公司10']
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
// 给y轴添加单位后缀
|
||||||
|
axisLabel: {
|
||||||
|
formatter: '{value}%'
|
||||||
|
},
|
||||||
|
name: '单位',
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
data: [12, 14.8, 23.6, 18.6, 17.3, 13.1, 16, 11.8, 13.9, 16.4],
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: '40%',
|
||||||
|
// 给label添加单位后缀
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'top',
|
||||||
|
formatter: '{c}%'
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
color: '#2CB8C9',
|
||||||
|
borderRadius: [5, 5, 0, 0]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
// 控制模态框显示/隐藏
|
||||||
|
const visible = ref(false);
|
||||||
|
|
||||||
|
// 打开模态框
|
||||||
|
const openModal = () => {
|
||||||
|
visible.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 关闭模态框
|
||||||
|
const handleClose = () => {
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 暴露方法,供父组件调用
|
||||||
|
defineExpose({
|
||||||
|
openModal,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
@import 'devui-theme/styles-var/devui-var.scss';
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<AdvanceSearch v-model="newFormData" class="px-20">
|
<AdvanceSearch v-model="newFormData" class="px-20">
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<gc-form-operation class="jyh-form-operation">
|
<gc-form-operation class="jyh-form-operation">
|
||||||
<d-button class="mr-2" variant="solid">筛选</d-button>
|
<d-button class="mr-2" variant="solid">搜索</d-button>
|
||||||
<d-button variant="solid" color="secondary">清空</d-button>
|
<d-button variant="solid" color="secondary">清空</d-button>
|
||||||
</gc-form-operation>
|
</gc-form-operation>
|
||||||
<div class="left-btn">
|
<div class="left-btn">
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</AdvanceSearch>
|
</AdvanceSearch>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-3 px-20">
|
<div class="mt-3 px-20 min-h-[600px]">
|
||||||
<d-table :key="tableKey" class="jyh-table" v-if="tableData.length" :striped="false" :data="tableData" table-layout="auto">
|
<d-table :key="tableKey" class="jyh-table" v-if="tableData.length" :striped="false" :data="tableData" table-layout="auto">
|
||||||
<!-- 索引列 -->
|
<!-- 索引列 -->
|
||||||
<d-column type="index" width="40"></d-column>
|
<d-column type="index" width="40"></d-column>
|
||||||
@@ -40,6 +40,9 @@
|
|||||||
<template v-else-if="column.key === 'version'">
|
<template v-else-if="column.key === 'version'">
|
||||||
<a @click="gotoDetail(scope.row)">{{ scope.row.version }}</a>
|
<a @click="gotoDetail(scope.row)">{{ scope.row.version }}</a>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="column.key === 'releaseDate'">
|
||||||
|
<span>{{ formatTime(scope.row.releaseDate, 'YYYY-MM-DD') }}</span>
|
||||||
|
</template>
|
||||||
<template v-else-if="column.key === 'softwareVersion'">
|
<template v-else-if="column.key === 'softwareVersion'">
|
||||||
<a @click="gotoDetail(scope.row)">{{ scope.row.softwareVersion }}</a>
|
<a @click="gotoDetail(scope.row)">{{ scope.row.softwareVersion }}</a>
|
||||||
</template>
|
</template>
|
||||||
@@ -53,15 +56,19 @@
|
|||||||
<d-tag type="success">{{ scope.row.programmingLanguage }}</d-tag>
|
<d-tag type="success">{{ scope.row.programmingLanguage }}</d-tag>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.key === 'contributorCountries'">
|
<template v-else-if="column.key === 'contributorCountries'">
|
||||||
<span class="mr-2">美国 3.57%</span>
|
<div style="cursor: pointer" @click="openCountryModal(column)">
|
||||||
<d-tag color="gray">+3</d-tag>
|
<span class="mr-2">美国 3.57%</span>
|
||||||
|
<d-tag color="gray">+3</d-tag>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.key === 'contributorOrganizations'">
|
<template v-else-if="column.key === 'contributorOrganizations'">
|
||||||
<span class="mr-2">microsoft 3.57%</span>
|
<div style="cursor: pointer" @click="openOrgModal(column)">
|
||||||
<d-tag color="gray">+3</d-tag>
|
<span class="mr-2">microsoft 3.57%</span>
|
||||||
|
<d-tag color="gray">+3</d-tag>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.key === 'sourceCodeDownload'">
|
<template v-else-if="column.key === 'sourceDownloadUrl'">
|
||||||
<a>{{ scope.row.sourceCodeDownload }}</a>
|
<a>{{ scope.row.sourceDownloadUrl }}</a>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{ scope.row[column.key] }}
|
{{ scope.row[column.key] }}
|
||||||
@@ -88,6 +95,12 @@
|
|||||||
<span class="inline-block text-G900 text-sm font-normal leading-[20px] break-all">你确认删除此项:{{ item.cla_name }}
|
<span class="inline-block text-G900 text-sm font-normal leading-[20px] break-all">你确认删除此项:{{ item.cla_name }}
|
||||||
?</span>
|
?</span>
|
||||||
</GModal>
|
</GModal>
|
||||||
|
|
||||||
|
<!-- 引入子组件 -->
|
||||||
|
<CountryModal ref="countryModalRef" />
|
||||||
|
|
||||||
|
<!-- 引入子组件 -->
|
||||||
|
<OrgModal ref="orgModalRef" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -104,245 +117,21 @@ import { reqCatch } from '@/utils/catch';
|
|||||||
import { getOrgInfo } from '@/views/Org/hooks/orgInfo';
|
import { getOrgInfo } from '@/views/Org/hooks/orgInfo';
|
||||||
import { Message } from 'vue-devui';
|
import { Message } from 'vue-devui';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
|
import CountryModal from './CountryModal.vue'
|
||||||
|
import OrgModal from './OrgModal.vue'
|
||||||
import { useAccountStore } from '@/stores/user';
|
import { useAccountStore } from '@/stores/user';
|
||||||
|
const { formatTime } = useTimeFormat();
|
||||||
|
import { releasePage } from '@/api/jyh';
|
||||||
|
import { useTimeFormat } from '@/utils/hooks/useTimeFormat';
|
||||||
const { namespace } = getOrgInfo();
|
const { namespace } = getOrgInfo();
|
||||||
const userInfo = useAccountStore();
|
const userInfo = useAccountStore();
|
||||||
const { isLogin } = storeToRefs(userInfo);
|
const { isLogin } = storeToRefs(userInfo);
|
||||||
|
|
||||||
// 定义 tableKey,用于强制刷新表格
|
// 定义 tableKey,用于强制刷新表格
|
||||||
const tableKey = ref(0);
|
const tableKey = ref(0);
|
||||||
const tableData = ref([
|
const countryVisible = ref(false);
|
||||||
{
|
const orgVisible = ref(false);
|
||||||
softwareName: 'eslint-plugin-import',
|
const tableData = ref([]);
|
||||||
softwareVersion: '2.29.0',
|
|
||||||
releaseDate: '2025-03-10',
|
|
||||||
licenseCount: 3,
|
|
||||||
dependencyCount: 15,
|
|
||||||
productComponentUsage: ['供应链系统A', '供应链系统B'],
|
|
||||||
codeSize: '150KB',
|
|
||||||
vulnerabilityCount: 5,
|
|
||||||
industryCategory: '软件开发工具',
|
|
||||||
developer: 'ESLint团队',
|
|
||||||
contributorCountries: ['美国', '中国', '德国'],
|
|
||||||
contributorOrganizations: ['Google', 'Microsoft', 'Alibaba'],
|
|
||||||
programmingLanguage: 'JavaScript',
|
|
||||||
communityHash: 'a1b2c3d4',
|
|
||||||
softwareScore: 8.5,
|
|
||||||
sourceCodeDownload: 'https://github.com/eslint/eslint-plugin-import',
|
|
||||||
copyright: 'MIT License',
|
|
||||||
externalVulnerabilitySource: 'CVE-2025-1234',
|
|
||||||
versionDescription: '修复了若干安全漏洞',
|
|
||||||
compatibilityRisk: '低',
|
|
||||||
communityEOL: '2028-12-31',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
softwareName: 'react',
|
|
||||||
softwareVersion: '18.2.0',
|
|
||||||
releaseDate: '2025-02-15',
|
|
||||||
licenseCount: 1,
|
|
||||||
dependencyCount: 10,
|
|
||||||
productComponentUsage: ['供应链系统C'],
|
|
||||||
codeSize: '500KB',
|
|
||||||
vulnerabilityCount: 2,
|
|
||||||
industryCategory: '前端框架',
|
|
||||||
developer: 'Facebook',
|
|
||||||
contributorCountries: ['美国', '加拿大', '英国'],
|
|
||||||
contributorOrganizations: ['Facebook', 'Netflix', 'Airbnb'],
|
|
||||||
programmingLanguage: 'JavaScript',
|
|
||||||
communityHash: 'e5f6g7h8',
|
|
||||||
softwareScore: 9.0,
|
|
||||||
sourceCodeDownload: 'https://github.com/facebook/react',
|
|
||||||
copyright: 'MIT License',
|
|
||||||
externalVulnerabilitySource: 'CVE-2025-5678',
|
|
||||||
versionDescription: '新增了并发渲染功能',
|
|
||||||
compatibilityRisk: '中',
|
|
||||||
communityEOL: '2030-12-31',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
softwareName: 'vue',
|
|
||||||
softwareVersion: '3.2.0',
|
|
||||||
releaseDate: '2025-01-20',
|
|
||||||
licenseCount: 1,
|
|
||||||
dependencyCount: 8,
|
|
||||||
productComponentUsage: ['供应链系统D'],
|
|
||||||
codeSize: '300KB',
|
|
||||||
vulnerabilityCount: 1,
|
|
||||||
industryCategory: '前端框架',
|
|
||||||
developer: 'Evan You',
|
|
||||||
contributorCountries: ['中国', '美国', '日本'],
|
|
||||||
contributorOrganizations: ['Alibaba', 'Tencent', 'Baidu'],
|
|
||||||
programmingLanguage: 'JavaScript',
|
|
||||||
communityHash: 'i9j0k1l2',
|
|
||||||
softwareScore: 9.2,
|
|
||||||
sourceCodeDownload: 'https://github.com/vuejs/vue',
|
|
||||||
copyright: 'MIT License',
|
|
||||||
externalVulnerabilitySource: 'CVE-2025-9101',
|
|
||||||
versionDescription: '优化了性能',
|
|
||||||
compatibilityRisk: '低',
|
|
||||||
communityEOL: '2029-12-31',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
softwareName: 'webpack',
|
|
||||||
softwareVersion: '5.75.0',
|
|
||||||
releaseDate: '2025-04-05',
|
|
||||||
licenseCount: 2,
|
|
||||||
dependencyCount: 20,
|
|
||||||
productComponentUsage: ['供应链系统E'],
|
|
||||||
codeSize: '1MB',
|
|
||||||
vulnerabilityCount: 3,
|
|
||||||
industryCategory: '构建工具',
|
|
||||||
developer: 'Webpack团队',
|
|
||||||
contributorCountries: ['美国', '德国', '俄罗斯'],
|
|
||||||
contributorOrganizations: ['Google', 'Microsoft', 'Yandex'],
|
|
||||||
programmingLanguage: 'JavaScript',
|
|
||||||
communityHash: 'm3n4o5p6',
|
|
||||||
softwareScore: 8.8,
|
|
||||||
sourceCodeDownload: 'https://github.com/webpack/webpack',
|
|
||||||
copyright: 'MIT License',
|
|
||||||
externalVulnerabilitySource: 'CVE-2025-1122',
|
|
||||||
versionDescription: '修复了构建性能问题',
|
|
||||||
compatibilityRisk: '高',
|
|
||||||
communityEOL: '2027-12-31',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
softwareName: 'babel',
|
|
||||||
softwareVersion: '7.20.0',
|
|
||||||
releaseDate: '2025-03-25',
|
|
||||||
licenseCount: 1,
|
|
||||||
dependencyCount: 12,
|
|
||||||
productComponentUsage: ['供应链系统F'],
|
|
||||||
codeSize: '400KB',
|
|
||||||
vulnerabilityCount: 4,
|
|
||||||
industryCategory: '编译器',
|
|
||||||
developer: 'Babel团队',
|
|
||||||
contributorCountries: ['美国', '英国', '印度'],
|
|
||||||
contributorOrganizations: ['Facebook', 'Netflix', 'Uber'],
|
|
||||||
programmingLanguage: 'JavaScript',
|
|
||||||
communityHash: 'q7r8s9t0',
|
|
||||||
softwareScore: 8.7,
|
|
||||||
sourceCodeDownload: 'https://github.com/babel/babel',
|
|
||||||
copyright: 'MIT License',
|
|
||||||
externalVulnerabilitySource: 'CVE-2025-3344',
|
|
||||||
versionDescription: '新增了对新语法的支持',
|
|
||||||
compatibilityRisk: '中',
|
|
||||||
communityEOL: '2026-12-31',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
softwareName: 'typescript',
|
|
||||||
softwareVersion: '5.0.0',
|
|
||||||
releaseDate: '2025-05-01',
|
|
||||||
licenseCount: 1,
|
|
||||||
dependencyCount: 5,
|
|
||||||
productComponentUsage: ['供应链系统G'],
|
|
||||||
codeSize: '2MB',
|
|
||||||
vulnerabilityCount: 0,
|
|
||||||
industryCategory: '编程语言',
|
|
||||||
developer: 'Microsoft',
|
|
||||||
contributorCountries: ['美国', '中国', '加拿大'],
|
|
||||||
contributorOrganizations: ['Microsoft', 'Google', 'Alibaba'],
|
|
||||||
programmingLanguage: 'TypeScript',
|
|
||||||
communityHash: 'u1v2w3x4',
|
|
||||||
softwareScore: 9.5,
|
|
||||||
sourceCodeDownload: 'https://github.com/microsoft/TypeScript',
|
|
||||||
copyright: 'Apache License 2.0',
|
|
||||||
externalVulnerabilitySource: '无',
|
|
||||||
versionDescription: '新增了装饰器功能',
|
|
||||||
compatibilityRisk: '低',
|
|
||||||
communityEOL: '2035-12-31',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
softwareName: 'jest',
|
|
||||||
softwareVersion: '29.0.0',
|
|
||||||
releaseDate: '2025-06-10',
|
|
||||||
licenseCount: 1,
|
|
||||||
dependencyCount: 18,
|
|
||||||
productComponentUsage: ['供应链系统H'],
|
|
||||||
codeSize: '600KB',
|
|
||||||
vulnerabilityCount: 2,
|
|
||||||
industryCategory: '测试工具',
|
|
||||||
developer: 'Facebook',
|
|
||||||
contributorCountries: ['美国', '德国', '法国'],
|
|
||||||
contributorOrganizations: ['Facebook', 'Netflix', 'Spotify'],
|
|
||||||
programmingLanguage: 'JavaScript',
|
|
||||||
communityHash: 'y5z6a7b8',
|
|
||||||
softwareScore: 9.1,
|
|
||||||
sourceCodeDownload: 'https://github.com/facebook/jest',
|
|
||||||
copyright: 'MIT License',
|
|
||||||
externalVulnerabilitySource: 'CVE-2025-5566',
|
|
||||||
versionDescription: '优化了测试性能',
|
|
||||||
compatibilityRisk: '中',
|
|
||||||
communityEOL: '2032-12-31',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
softwareName: 'docker',
|
|
||||||
softwareVersion: '24.0.0',
|
|
||||||
releaseDate: '2025-07-15',
|
|
||||||
licenseCount: 1,
|
|
||||||
dependencyCount: 25,
|
|
||||||
productComponentUsage: ['供应链系统I'],
|
|
||||||
codeSize: '10MB',
|
|
||||||
vulnerabilityCount: 6,
|
|
||||||
industryCategory: '容器化工具',
|
|
||||||
developer: 'Docker Inc.',
|
|
||||||
contributorCountries: ['美国', '英国', '澳大利亚'],
|
|
||||||
contributorOrganizations: ['Docker Inc.', 'Google', 'Amazon'],
|
|
||||||
programmingLanguage: 'Go',
|
|
||||||
communityHash: 'c9d0e1f2',
|
|
||||||
softwareScore: 9.3,
|
|
||||||
sourceCodeDownload: 'https://github.com/docker/docker',
|
|
||||||
copyright: 'Apache License 2.0',
|
|
||||||
externalVulnerabilitySource: 'CVE-2025-7788',
|
|
||||||
versionDescription: '新增了对ARM架构的支持',
|
|
||||||
compatibilityRisk: '高',
|
|
||||||
communityEOL: '2030-12-31',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
softwareName: 'kubernetes',
|
|
||||||
softwareVersion: '1.28.0',
|
|
||||||
releaseDate: '2025-08-20',
|
|
||||||
licenseCount: 1,
|
|
||||||
dependencyCount: 30,
|
|
||||||
productComponentUsage: ['供应链系统J'],
|
|
||||||
codeSize: '15MB',
|
|
||||||
vulnerabilityCount: 8,
|
|
||||||
industryCategory: '容器编排工具',
|
|
||||||
developer: 'CNCF',
|
|
||||||
contributorCountries: ['美国', '中国', '德国'],
|
|
||||||
contributorOrganizations: ['Google', 'Red Hat', 'IBM'],
|
|
||||||
programmingLanguage: 'Go',
|
|
||||||
communityHash: 'g3h4i5j6',
|
|
||||||
softwareScore: 9.4,
|
|
||||||
sourceCodeDownload: 'https://github.com/kubernetes/kubernetes',
|
|
||||||
copyright: 'Apache License 2.0',
|
|
||||||
externalVulnerabilitySource: 'CVE-2025-9900',
|
|
||||||
versionDescription: '优化了集群管理功能',
|
|
||||||
compatibilityRisk: '高',
|
|
||||||
communityEOL: '2033-12-31',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
softwareName: 'postgresql',
|
|
||||||
softwareVersion: '15.0.0',
|
|
||||||
releaseDate: '2025-09-25',
|
|
||||||
licenseCount: 1,
|
|
||||||
dependencyCount: 7,
|
|
||||||
productComponentUsage: ['供应链系统K'],
|
|
||||||
codeSize: '8MB',
|
|
||||||
vulnerabilityCount: 3,
|
|
||||||
industryCategory: '数据库',
|
|
||||||
developer: 'PostgreSQL团队',
|
|
||||||
contributorCountries: ['美国', '加拿大', '日本'],
|
|
||||||
contributorOrganizations: ['PostgreSQL Inc.', 'Amazon', 'Microsoft'],
|
|
||||||
programmingLanguage: 'C',
|
|
||||||
communityHash: 'k7l8m9n0',
|
|
||||||
softwareScore: 9.6,
|
|
||||||
sourceCodeDownload: 'https://github.com/postgres/postgres',
|
|
||||||
copyright: 'PostgreSQL License',
|
|
||||||
externalVulnerabilitySource: 'CVE-2025-1122',
|
|
||||||
versionDescription: '新增了JSONB索引功能',
|
|
||||||
compatibilityRisk: '低',
|
|
||||||
communityEOL: '2035-12-31',
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
const formData = ref({ title: '',type: '', useType: '',formData:'',select: '',time1:null,name:'',versionCode:'',pulishTime:'' });
|
const formData = ref({ title: '',type: '', useType: '',formData:'',select: '',time1:null,name:'',versionCode:'',pulishTime:'' });
|
||||||
const typeOptions = reactive(['主软件', '依赖软件']);
|
const typeOptions = reactive(['主软件', '依赖软件']);
|
||||||
const riskOptions = reactive(['低', '中', '高']);
|
const riskOptions = reactive(['低', '中', '高']);
|
||||||
@@ -377,35 +166,60 @@ const openDelete = (row: any) => {
|
|||||||
const columns = ref([
|
const columns = ref([
|
||||||
{ key: 'softwareName', label: '软件名称', visible: true, filterable: true, sortable: false },
|
{ key: 'softwareName', label: '软件名称', visible: true, filterable: true, sortable: false },
|
||||||
{ key: 'softwareVersion', label: '软件版本', visible: true, filterable: true, sortable: false },
|
{ key: 'softwareVersion', label: '软件版本', visible: true, filterable: true, sortable: false },
|
||||||
{ key: 'releaseDate', label: '版本发布时间', visible: true, filterable: true, sortable: true },
|
{ key: 'securityScore', label: '软件评分', visible: true, filterable: false, sortable: true },
|
||||||
{ key: 'licenseCount', label: 'License数量', visible: true, filterable: false, sortable: false },
|
{ key: 'licenseCount', label: 'License数量', visible: true, filterable: false, sortable: false },
|
||||||
{ key: 'dependencyCount', label: '依赖软件数', visible: true, filterable: false, sortable: false },
|
{ key: 'industryCategory', label: '行业类型', visible: true, filterable: true, sortable: false },
|
||||||
|
{ key: 'primaryLanguage', label: '编程语言', visible: true, filterable: true, sortable: false },
|
||||||
|
{ key: 'codeLines', label: '代码量', visible: true, filterable: false, sortable: false },
|
||||||
|
{ key: 'sourceDownloadUrl', label: '源码包下载地址', visible: true, filterable: false, sortable: false },
|
||||||
|
{ key: 'releaseDate', label: '版本发布时间', visible: false, filterable: true, sortable: true },
|
||||||
|
{ key: 'dependencyCount', label: '依赖软件数', visible: false, filterable: false, sortable: false },
|
||||||
{ key: 'productComponentUsage', label: '产品成分使用量', visible: false, filterable: false, sortable: false },
|
{ key: 'productComponentUsage', label: '产品成分使用量', visible: false, filterable: false, sortable: false },
|
||||||
{ key: 'codeSize', label: '代码量', visible: true, filterable: false, sortable: false },
|
{ key: 'vulnerabilityCount', label: '漏洞数量', visible: false, filterable: false, sortable: false },
|
||||||
{ key: 'vulnerabilityCount', label: '漏洞数量', visible: true, filterable: false, sortable: false },
|
{ key: 'communityName', label: '开发商', visible: false, filterable: true, sortable: false },
|
||||||
{ key: 'industryCategory', label: '行业分类', visible: true, filterable: true, sortable: false },
|
{ key: 'contributorCountries', label: '贡献者国家/地区分布', visible: false, filterable: false, sortable: false },
|
||||||
{ key: 'developer', label: '开发商', visible: false, filterable: true, sortable: false },
|
{ key: 'contributorOrganizations', label: '贡献者组织/公司分布', visible: false, filterable: false, sortable: false },
|
||||||
{ key: 'contributorCountries', label: '贡献者国家/地区分布', visible: true, filterable: false, sortable: false },
|
|
||||||
{ key: 'contributorOrganizations', label: '贡献者组织/公司分布', visible: true, filterable: false, sortable: false },
|
|
||||||
{ key: 'programmingLanguage', label: '编程语言', visible: false, filterable: true, sortable: false },
|
|
||||||
{ key: 'communityHash', label: '社区hash值', visible: false, filterable: false, sortable: false },
|
{ key: 'communityHash', label: '社区hash值', visible: false, filterable: false, sortable: false },
|
||||||
{ key: 'softwareScore', label: '软件评分', visible: false, filterable: false, sortable: true },
|
|
||||||
{ key: 'sourceCodeDownload', label: '源码包下载地址', visible: true, filterable: false, sortable: false },
|
|
||||||
{ key: 'copyright', label: 'CopyRight', visible: false, filterable: false, sortable: false },
|
{ key: 'copyright', label: 'CopyRight', visible: false, filterable: false, sortable: false },
|
||||||
{ key: 'externalVulnerabilitySource', label: '外部漏洞源的软件名称', visible: false, filterable: true, sortable: false },
|
{ key: 'externalVulnerabilitySource', label: '外部漏洞源的软件名称', visible: false, filterable: true, sortable: false },
|
||||||
{ key: 'versionDescription', label: '版本描述', visible: false, filterable: false, sortable: false },
|
{ key: 'versionDescription', label: '版本描述', visible: false, filterable: false, sortable: false },
|
||||||
{ key: 'compatibilityRisk', label: '兼容性风险描述', visible: false, filterable: false, sortable: false },
|
{ key: 'compatibilityRisk', label: '兼容性风险描述', visible: false, filterable: false, sortable: false },
|
||||||
{ key: 'communityEOL', label: '社区EOL时间', visible: false, filterable: true, sortable: true },
|
{ key: 'eolDate', label: '社区EOL时间', visible: false, filterable: true, sortable: true },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 定义 showColumnList 状态
|
// 定义 showColumnList 状态
|
||||||
const showColumnList = ref(false);
|
const showColumnList = ref(false);
|
||||||
|
// 获取子组件的引用
|
||||||
|
const countryModalRef = ref(null);
|
||||||
|
const orgModalRef = ref(null);
|
||||||
|
|
||||||
|
// 打开模态框的方法
|
||||||
|
const openCountryModal = () => {
|
||||||
|
if (countryModalRef.value) {
|
||||||
|
countryModalRef.value.openModal(); // 调用子组件的方法
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 打开模态框的方法
|
||||||
|
const openOrgModal = () => {
|
||||||
|
if (orgModalRef.value) {
|
||||||
|
orgModalRef.value.openModal(); // 调用子组件的方法
|
||||||
|
}
|
||||||
|
};
|
||||||
// 更新 showColumnList 的方法
|
// 更新 showColumnList 的方法
|
||||||
const updateShowColumnList = (newValue) => {
|
const updateShowColumnList = (newValue) => {
|
||||||
showColumnList.value = newValue;
|
showColumnList.value = newValue;
|
||||||
tableKey.value++; // 更新 tableKey,强制刷新表格
|
tableKey.value++; // 更新 tableKey,强制刷新表格
|
||||||
};
|
};
|
||||||
|
// 更新 showColumnList 的方法
|
||||||
|
const openCountryChart = (row) => {
|
||||||
|
// selectRow.value = row;
|
||||||
|
countryVisible.value = true;
|
||||||
|
};
|
||||||
|
// 更新 showColumnList 的方法
|
||||||
|
const openOrgChart = (row) => {
|
||||||
|
// selectRow.value = row;
|
||||||
|
orgVisible.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@@ -413,7 +227,7 @@ const route = useRoute();
|
|||||||
const gotoDetail = (row) => {
|
const gotoDetail = (row) => {
|
||||||
// 后续请换成params,暂时params传参没传过去
|
// 后续请换成params,暂时params传参没传过去
|
||||||
router.push({
|
router.push({
|
||||||
path: 'repoDetail/' + row.version
|
path: 'repoDetail/' + row.id
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 分页
|
// 分页
|
||||||
@@ -486,6 +300,19 @@ const signCla = (row: any) => {
|
|||||||
router.push('/cla/' + row.object_id);
|
router.push('/cla/' + row.object_id);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getReleaseList = async() => {
|
||||||
|
const { data, error } = await releasePage({ ...newFormData.value, current: pager.value.pageIndex,size: pager.value.pageSize });
|
||||||
|
if (!error && data) {
|
||||||
|
debugger
|
||||||
|
tableData.value = data.data.records;
|
||||||
|
pager.value.total = data.data.total;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(async() => {
|
||||||
|
getReleaseList();
|
||||||
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const query: any = route.query;
|
const query: any = route.query;
|
||||||
newFormData.value = {
|
newFormData.value = {
|
||||||
|
|||||||
@@ -6,10 +6,10 @@
|
|||||||
<gc-breadcrumb-item><span class="cur-title">开源软件列表</span></gc-breadcrumb-item>
|
<gc-breadcrumb-item><span class="cur-title">开源软件列表</span></gc-breadcrumb-item>
|
||||||
</d-breadcrumb>
|
</d-breadcrumb>
|
||||||
<d-tabs class="jyh-tabs" type="wrapped" v-model="selectTab">
|
<d-tabs class="jyh-tabs" type="wrapped" v-model="selectTab">
|
||||||
<d-tab id="OssQuery" title="开源软件查询">
|
<d-tab id="OssQuery" title="软件列表">
|
||||||
<OssQuery/>
|
<OssQuery/>
|
||||||
</d-tab>
|
</d-tab>
|
||||||
<d-tab id="BatchVerify" title="批量校验">
|
<d-tab id="BatchVerify" title="软件校验">
|
||||||
<BatchVerify/>
|
<BatchVerify/>
|
||||||
</d-tab>
|
</d-tab>
|
||||||
</d-tabs>
|
</d-tabs>
|
||||||
|
|||||||
@@ -34,9 +34,9 @@
|
|||||||
<d-table ref="table" :data="baseTreeTableData1" >
|
<d-table ref="table" :data="baseTreeTableData1" >
|
||||||
<d-column width="20px" type="index">
|
<d-column width="20px" type="index">
|
||||||
</d-column>
|
</d-column>
|
||||||
<d-column field="name" header="组件版本名称" show-overflow-tooltip></d-column>
|
<d-column field="name" header="软件版本名称" show-overflow-tooltip></d-column>
|
||||||
<d-column field="groupid" header="groupid"></d-column>
|
<d-column field="groupid" header="groupid"></d-column>
|
||||||
<d-column field="code" filterable :filter-list="filterList" @filter-change="handleFilterChange" header="组件编号">
|
<d-column field="code" filterable :filter-list="filterList" @filter-change="handleFilterChange" header="软件编号">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<a class="devui-link" @click="showDetail = true">{{ scope.row.code }}</a>
|
<a class="devui-link" @click="showDetail = true">{{ scope.row.code }}</a>
|
||||||
</template>
|
</template>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
<d-column field="packageName" filterable :filter-list="packageFilterList" @filter-change="handleFilterChange" header="packageName"></d-column>
|
<d-column field="packageName" filterable :filter-list="packageFilterList" @filter-change="handleFilterChange" header="packageName"></d-column>
|
||||||
<d-column field="version" filterable :filter-list="versionFilterList" @filter-change="handleFilterChange" header="version"></d-column>
|
<d-column field="version" filterable :filter-list="versionFilterList" @filter-change="handleFilterChange" header="version"></d-column>
|
||||||
<d-column field="language" filterable :filter-list="languageFilterList" @filter-change="handleFilterChange" header="编程语言"></d-column>
|
<d-column field="language" filterable :filter-list="languageFilterList" @filter-change="handleFilterChange" header="编程语言"></d-column>
|
||||||
<d-column field="number" header="组件漏洞数量">
|
<d-column field="number" header="软件漏洞数量">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<a class="devui-link" @click="showDetail = true">{{ scope.row.number }}</a>
|
<a class="devui-link" @click="showDetail = true">{{ scope.row.number }}</a>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex align-center justify-start">
|
<div class="flex align-center justify-start">
|
||||||
<d-search icon-position="left" style="width: 380px" placeholder="请输入搜索组件名称"></d-search>
|
<d-search icon-position="left" style="width: 380px" placeholder="请输入搜索软件名称"></d-search>
|
||||||
<d-checkbox class="ml-10" label="只显示有漏洞的组件" :isShowTitle="false" v-model="checked" />
|
<d-checkbox class="ml-10" label="只显示有漏洞的软件" :isShowTitle="false" v-model="checked" />
|
||||||
</div>
|
</div>
|
||||||
<Card simple class="jyh-card mt-3">
|
<Card simple class="jyh-card mt-3">
|
||||||
<div class="clear-padding">
|
<div class="clear-padding">
|
||||||
|
|||||||
@@ -20,24 +20,49 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { subscribeSoftware } from '@/api/jyh';
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
|
import { Message } from 'vue-devui';
|
||||||
|
|
||||||
const props = defineProps(['softwareData']);
|
const props = defineProps(['softwareData']);
|
||||||
const emit = defineEmits(['close']);
|
const emit = defineEmits(['close']);
|
||||||
const formRef = ref(null);
|
const formRef = ref(null);
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
subscribeType: '',
|
subscribeType: '',
|
||||||
subscribeText: '',
|
|
||||||
});
|
});
|
||||||
const rules = {
|
const rules = {
|
||||||
subscribeType: [{ required: true, message: '请选择', trigger: 'change' }],
|
subscribeType: [{ required: true, message: '请选择', trigger: 'change' }],
|
||||||
};
|
};
|
||||||
|
const sendSubscribe = async () => {
|
||||||
|
const data = await subscribeSoftware({
|
||||||
|
softwareId: props.softwareData.id,
|
||||||
|
status: '1',
|
||||||
|
alertType: {
|
||||||
|
mobileSwitch: formData.value.subscribeType === '0',
|
||||||
|
emailSwitch: formData.value.subscribeType === '1',
|
||||||
|
webSwitch: formData.value.subscribeType === '2',
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
Message({
|
||||||
|
message: err.error,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
if (!data?.data?.data?.data) {
|
||||||
|
Message({
|
||||||
|
message: data?.data?.data?.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
emit('close');
|
||||||
|
}
|
||||||
|
}
|
||||||
const confirm = () => {
|
const confirm = () => {
|
||||||
(formRef?.value as any)?.validate((isValid: boolean, invalidFields: any) => {
|
(formRef?.value as any)?.validate((isValid: boolean, invalidFields: any) => {
|
||||||
if (!isValid) {
|
if (!isValid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit('close');
|
sendSubscribe();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -157,12 +157,12 @@
|
|||||||
|
|
||||||
<Card simple class="jyh-card mb-4">
|
<Card simple class="jyh-card mb-4">
|
||||||
<div class="card-title">网络安全</div>
|
<div class="card-title">网络安全</div>
|
||||||
<d-row class="mb-3">
|
<!-- <d-row class="mb-3">-->
|
||||||
<d-col :span="24">
|
<!-- <d-col :span="24">-->
|
||||||
<span class="card-key width-160">软件评分</span>
|
<!-- <span class="card-key width-160">软件评分</span>-->
|
||||||
<span class="card-val">{{ ReleaseInfo.networkSecurity.softwareRating || '--' }}</span>
|
<!-- <span class="card-val">{{ ReleaseInfo.networkSecurity.softwareRating || '--' }}</span>-->
|
||||||
</d-col>
|
<!-- </d-col>-->
|
||||||
</d-row>
|
<!-- </d-row>-->
|
||||||
<d-row class="mb-3">
|
<d-row class="mb-3">
|
||||||
<d-col :span="24">
|
<d-col :span="24">
|
||||||
<span class="card-key width-160">社区安全问题求助</span>
|
<span class="card-key width-160">社区安全问题求助</span>
|
||||||
@@ -289,12 +289,12 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
||||||
import { ref, defineEmits, onMounted,reactive } from 'vue';
|
import { ref, defineEmits, onMounted,reactive } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import { discussDetailType, userInfoType } from '@/api/discussion/types';
|
import { discussDetailType, userInfoType } from '@/api/discussion/types';
|
||||||
import { Message } from 'vue-devui/message';
|
import { Message } from 'vue-devui/message';
|
||||||
import { useClipboard } from '@vueuse/core/index';
|
import { useClipboard } from '@vueuse/core/index';
|
||||||
import { releaseInfo } from '@/api/jyh';
|
import { releaseInfo } from '@/api/jyh';
|
||||||
|
const route = useRoute();
|
||||||
const emits = defineEmits(['changeTabs']);
|
const emits = defineEmits(['changeTabs']);
|
||||||
|
|
||||||
// 触发事件的方法
|
// 触发事件的方法
|
||||||
@@ -340,15 +340,18 @@ const handleCopy = event => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const getReleaseInfo = async() => {
|
const getReleaseInfo = async(versionId) => {
|
||||||
const { data, error } = await releaseInfo({ repoId: '123',releaseId: '123' });
|
const { data, error } = await releaseInfo({ softwareId: versionId });
|
||||||
if (!error && data) {
|
if (!error && data) {
|
||||||
ReleaseInfo.value = data.data;
|
ReleaseInfo.value = data.data;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(async() => {
|
onMounted(() => {
|
||||||
getReleaseInfo();
|
const versionId = route.params.versionId; // 获取路由参数 versionId
|
||||||
|
if (versionId) {
|
||||||
|
getReleaseInfo(versionId); // 调用接口获取数据
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -9,14 +9,16 @@
|
|||||||
<div class="header-top">
|
<div class="header-top">
|
||||||
<GAvatar style="margin-right: 12px" :src="avatarUrl" name="Vue" :width="40" :height="40"></GAvatar>
|
<GAvatar style="margin-right: 12px" :src="avatarUrl" name="Vue" :width="40" :height="40"></GAvatar>
|
||||||
<div>
|
<div>
|
||||||
<div class="header-title1">{{ softwareData.name }}</div>
|
<div class="header-title1">{{ ReleaseInfo.basicInfo.softwareName || '--' }}</div>
|
||||||
<div class="header-div">
|
<div class="header-div">
|
||||||
<span class="span1">版本:</span><span class="span2">{{ softwareData.version }}</span>
|
<span class="span1">版本:</span><span class="span2">{{ ReleaseInfo.basicInfo.softwareVersion || '--' }}</span>
|
||||||
<span class="split"></span>
|
<span class="split"></span>
|
||||||
<span class="span1">生命周期状态:</span><span class="span2">{{ softwareData.lifecycle }}</span>
|
<!-- <span class="span1">生命周期状态:</span><span class="span2">{{ softwareData.lifecycle }}</span>-->
|
||||||
|
<!-- <span class="split"></span>-->
|
||||||
|
<span class="span1">软件评分:</span><span class="span2">{{ ReleaseInfo.networkSecurity.softwareRating || '--' }}</span>
|
||||||
<span class="split"></span>
|
<span class="split"></span>
|
||||||
<span class="span1">集成风险:</span>
|
<span class="span1">集成风险:</span>
|
||||||
<d-tag color="#F6933B">{{ softwareData.risk }}</d-tag>
|
<d-tag color="#F6933B">{{ ReleaseInfo.referenceInfo.integrationRisk || '--' }}</d-tag>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fr">
|
<div class="fr">
|
||||||
@@ -55,7 +57,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, watch } from 'vue';
|
import { ref, reactive, watch, onMounted } from 'vue';
|
||||||
import { useRouter, useRoute } from 'vue-router';
|
import { useRouter, useRoute } from 'vue-router';
|
||||||
import { getOrgInfo } from '@/views/Org/hooks/orgInfo';
|
import { getOrgInfo } from '@/views/Org/hooks/orgInfo';
|
||||||
import VulnerabilitiesList from './VulnerabilitiesList.vue';
|
import VulnerabilitiesList from './VulnerabilitiesList.vue';
|
||||||
@@ -69,6 +71,7 @@ const { namespace } = getOrgInfo();
|
|||||||
const route = useRoute(); // 获取路由对象
|
const route = useRoute(); // 获取路由对象
|
||||||
const avatarUrl = '/src/assets/imgs/jyh/工程首字母图标.png';
|
const avatarUrl = '/src/assets/imgs/jyh/工程首字母图标.png';
|
||||||
import SubscriptionModal from '@/views/Jyh/Version/Detail/SubscriptionModal.vue';
|
import SubscriptionModal from '@/views/Jyh/Version/Detail/SubscriptionModal.vue';
|
||||||
|
import { releaseInfo } from '@/api/jyh';
|
||||||
|
|
||||||
const selectTab = ref('bbxx');
|
const selectTab = ref('bbxx');
|
||||||
|
|
||||||
@@ -76,6 +79,28 @@ const selectTab = ref('bbxx');
|
|||||||
const item = ref('');
|
const item = ref('');
|
||||||
const deleteModal = ref();
|
const deleteModal = ref();
|
||||||
const deletevModels = ref(false);
|
const deletevModels = ref(false);
|
||||||
|
const ReleaseInfo = ref({
|
||||||
|
basicInfo: {},
|
||||||
|
copyRightReportList: [],
|
||||||
|
entityList: [],
|
||||||
|
networkSecurity: {},
|
||||||
|
openSourceLicenseList: [],
|
||||||
|
referenceInfo: {},
|
||||||
|
});
|
||||||
|
|
||||||
|
const getReleaseInfo = async(versionId) => {
|
||||||
|
const { data, error } = await releaseInfo({ softwareId: versionId });
|
||||||
|
if (!error && data) {
|
||||||
|
ReleaseInfo.value = data.data;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
const versionId = route.params.versionId; // 获取路由参数 versionId
|
||||||
|
if (versionId) {
|
||||||
|
getReleaseInfo(versionId); // 调用接口获取数据
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// 监听路由的 query.tab 变化
|
// 监听路由的 query.tab 变化
|
||||||
watch(
|
watch(
|
||||||
|
|||||||
Reference in New Issue
Block a user