Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/api/jyh/index.ts
#	src/components/AdvanceSearch/index.vue
This commit is contained in:
付民康
2025-03-18 17:45:08 +08:00
15 changed files with 113 additions and 67 deletions

View File

@@ -16,7 +16,7 @@
</div>
<template #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">
<li class="menu-item">
行业
@@ -98,8 +98,8 @@ const inputGlow = ref(false);
const searchStr = ref('');
const position = ref(['right-start', 'right-end']);
const industryOptions = ref(['通信', '军工', '金融', '能源'])
const searchType = ref('组件/软件');
const searchOptions = ref(['组件/软件']);
const searchType = ref('软件');
const searchOptions = ref(['软件']);
const offset = ref({ mainAxis: 7 , crossAxis: -10 });
const isOpen = ref(false);
const rotate = ref(0);
@@ -127,7 +127,7 @@ const infoList = ref([
const homeSearch = ref(null);
const dropdownWidth = ref(0);
const selectedCate = ref('组件/软件');
const selectedCate = ref('软件');
const searchInput = ref(null);
const openAdvancedSearch = () => {

View File

@@ -70,7 +70,7 @@ const tableConfig = ref([
},
{
field: 'affectedComponent',
header: '影响件',
header: '影响件',
sortable: true,
sortMethod: null
},
@@ -147,4 +147,4 @@ const list = ref([
width: 14px;
height: 14px;
}
</style>
</style>

View File

@@ -4,7 +4,7 @@
<div class="mb-3">
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
<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="owner" header="订阅人"></d-column>
<d-column header="操作" width="100">

View File

@@ -4,7 +4,7 @@
<div class="mb-3">
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
<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 header="操作" width="100">
<template #default="scope">

View File

@@ -1,36 +1,26 @@
<template>
<div class="warning-detail-container">
<div class="warning-title">
<div>{{ warningData.title }}</div>
<div>{{ warningData.subject }}</div>
<div class="sub-title mt-3">
<div>
<span>重要性</span>
<d-tag type="danger" size="sm">{{warningData.importance}}</d-tag>
</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 === 'editonly'" class="edit-btn" @click="handleModeChange">预览</d-button>
</div>
</div>
</div>
<div class="warning-text">
<!-- <div class="text-box mb-5">
<div>概要</div>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ warningData.summary }}</p>
<d-textarea v-model="warningData.summary" id="textArea" autosize></d-textarea>
</div>
<div class="text-box">
<div>修复方案</div>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ warningData.fixMethod }}</p>
<d-textarea v-model="warningData.fixMethod" id="textArea2"></d-textarea>
</div> -->
<d-editor-md
v-model="warningData.text"
v-model="warningData.overview"
:mode="mode"
:toolbar-config="toolbarConfig"
></d-editor-md>
</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">
<d-button @click="confirm" variant="solid" class="mr-2">确定</d-button>
<d-button @click="$emit('close')">取消</d-button>
@@ -43,24 +33,14 @@ import { ref } from 'vue';
const emit = defineEmits(['close']);
const propsData = defineProps(['type', 'warningData']);
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 warningData = ref({});
const toolbarConfig = [
['undo', 'redo'],
['h1', 'h2', 'bold', 'italic', 'strike', 'underline', 'color', 'font'],
['ul', 'ol', 'checklist', 'code', 'link', 'image', 'table'],
];
const mode = ref('readonly');
// warningData.value = propsData.warningData;
warningData.value = JSON.parse(propsData.warningData.alertMsg ?? '{}');
const confirm = () => {
emit('close');
};
@@ -83,7 +63,7 @@ const handleModeChange = () => {
font-weight: 600;
font-size: 20px;
line-height: 28px;
padding: 4px 20px 12px;
padding: 20px 20px 12px;
.sub-title {
display: flex;
@@ -102,7 +82,15 @@ const handleModeChange = () => {
background: #F6F6F8;
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 {
font-size: 1.5em;
font-weight: bold;

View File

@@ -29,7 +29,7 @@
</div>
</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>
</d-modal>
</template>

View File

@@ -28,7 +28,7 @@
</div>
</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>
</d-modal>
</template>

View File

@@ -8,26 +8,31 @@
:header-bg="true"
:data="noticeTableData"
>
<d-column field="content" header="邀请内容"></d-column>
<d-column field="time" header="邀请时间" width="200"></d-column>
<d-column field="creator" header="邀请人" width="180"></d-column>
<d-column field="content" header="邀请内容" show-overflow-tooltip></d-column>
<d-column field="createTime" header="邀请时间" width="200" show-overflow-tooltip></d-column>
<d-column field="createUser" header="邀请人" width="180" show-overflow-tooltip></d-column>
<d-column header="操作" width="150">
<template #default="scope">
<d-button
variant="text"
color="primary"
class="mr-2"
@click="handleAccept(scope.row, 1)"
>
接收
</d-button>
<d-button
variant="text"
color="primary"
@click="handleAccept(scope.row, -1)"
>
拒绝
</d-button>
</template>
</d-column>
<template #empty>
<NoData />
</template>
</d-table>
<div class="invitation-pagination">
<d-pagination
@@ -47,21 +52,51 @@
</template>
<script setup lang="ts">
import { acceptInvite, getInviteListData } from '@/api/jyh';
import { ref, shallowReactive } from 'vue';
import NoData from "@/components/NoData/NoData.vue";
import { Message } from 'vue-devui';
const noticeTableData = ref([
{
content: '当您订阅的软件有漏洞预警通知时,将以应用号的方式通知。可在首页查看或取消订阅!',
time: '2025-03-15 17:29:30',
creator: '132456798',
}
]);
const noticeTableData = ref([]);
const pager = shallowReactive({
total: 1,
total: 0,
pageIndex: 1,
pageSize: 10,
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>
<style lang="scss" scoped>

View File

@@ -4,7 +4,7 @@
<div class="mb-3">
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
<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="owner" header="订阅人"></d-column>
<d-column header="操作" width="100">

View File

@@ -4,7 +4,7 @@
<div class="mb-3">
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
<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 header="操作" width="100">
<template #default="scope">

View File

@@ -18,7 +18,7 @@
<div v-else>{{ organizationInfo.organizationName }}</div>
</d-form-item>
<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>
</d-form-item>
</d-form>
@@ -35,10 +35,9 @@
<d-search icon-position="left" class="w-[296px]" placeholder="请输入搜索内容" />
</div>
<d-table
v-if="memberTableData.length"
:data="memberTableData"
class="w-full mb-[20px]"
fix-header
class="w-full mb-[20px] organ-table"
:fix-header="memberTableData.length > 0"
header-bg
max-height="500px"
>
@@ -52,11 +51,13 @@
<d-column field="joinDate" header="加入时间" />
<d-column header="操作">
<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>
</d-column>
<template #empty>
<NoData />
</template>
</d-table>
<NoData v-else />
<d-pagination
class="flex justify-end"
:total="pager.total"
@@ -83,7 +84,7 @@
<d-input v-model="createFormData.organizationName" />
</d-form-item>
<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>
@@ -112,7 +113,7 @@
</d-modal>
<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">
<d-button variant="solid" class="mr-[8px]" @click="deleteMember">确定</d-button>
<d-button @click="closeDeleteMemberModal">取消</d-button>
@@ -363,7 +364,7 @@ function closeDeleteMemberModal() {
</script>
<style scoped lang="scss">
:deep(.devui-table__row td) {
.organ-table :deep(.devui-table__row td) {
padding: 10px 16px;
}
</style>

View File

@@ -34,9 +34,9 @@
<d-table ref="table" :data="baseTreeTableData1" >
<d-column width="20px" type="index">
</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="code" filterable :filter-list="filterList" @filter-change="handleFilterChange" header="件编号">
<d-column field="code" filterable :filter-list="filterList" @filter-change="handleFilterChange" header="件编号">
<template #default="scope">
<a class="devui-link" @click="showDetail = true">{{ scope.row.code }}</a>
</template>
@@ -44,7 +44,7 @@
<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="language" filterable :filter-list="languageFilterList" @filter-change="handleFilterChange" header="编程语言"></d-column>
<d-column field="number" header="件漏洞数量">
<d-column field="number" header="件漏洞数量">
<template #default="scope">
<a class="devui-link" @click="showDetail = true">{{ scope.row.number }}</a>
</template>

View File

@@ -1,7 +1,7 @@
<template>
<div class="flex align-center justify-start">
<d-search icon-position="left" style="width: 380px" placeholder="请输入搜索件名称"></d-search>
<d-checkbox class="ml-10" label="只显示有漏洞的件" :isShowTitle="false" v-model="checked" />
<d-search icon-position="left" style="width: 380px" placeholder="请输入搜索件名称"></d-search>
<d-checkbox class="ml-10" label="只显示有漏洞的件" :isShowTitle="false" v-model="checked" />
</div>
<Card simple class="jyh-card mt-3">
<div class="clear-padding">