Merge branch 'wsw' into 'master'

# Conflicts:
#   conflict src/api/jyh/index.ts
#   conflict src/views/Jyh/PersonalCenter/Detail/InvitationNoticeList.vue
This commit is contained in:
yfzmpj
2025-03-19 12:09:50 +08:00
13 changed files with 199 additions and 71 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div class="warning-detail-container">
<div class="warning-title">
<div>{{ warningData.subject }}</div>
<div style="padding-right: 20px;">{{ warningData.subject }}</div>
<div class="sub-title mt-3">
<div>
<span>重要性</span>
@@ -20,7 +20,7 @@
:toolbar-config="toolbarConfig"
></d-editor-md>
</div>
<div :style="{'border-radius': propsData.type === 'user' ? '6px' : 0}" class="warning-from">{{warningData.group}} {{ warningData.pulishTime }}</div>
<div :style="{'border-radius': propsData.type === 'user' ? '6px' : 0}" class="warning-from">{{warningData.group}} {{ warningData.publishTime }}</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>
@@ -40,7 +40,8 @@ const toolbarConfig = [
['ul', 'ol', 'checklist', 'code', 'link', 'image', 'table'],
];
const mode = ref('readonly');
warningData.value = JSON.parse(propsData.warningData.alertMsg ?? JSON.stringify({
console.log(propsData.warningData)
warningData.value = propsData.warningData ?? {
subject: '【漏洞排查预警】ApacheIgnite远程代码执行漏洞排查CVE-2024-52577)',
importance: '高',
group: '可信开源代码库运营团队',
@@ -49,7 +50,7 @@ warningData.value = JSON.parse(propsData.warningData.alertMsg ?? JSON.stringify(
近日安全中心发现Apache lgnite远程代码执行漏洞CVE-2024-52577。在 2.6.0<Apache Ignite< 2.17.0版本中由于lgnite未能正确实施类序列化过滤器攻击者能够利用恶意序列化对象绕过安全检查从而在服务器端反序列化时触发任意代码的执行。经可信开源代码库运营团队评审漏洞技术定级2级/3级若不满足利用条件可举证降为6级。请你按要求在XX时间内完成修复。
## 二、修复方案
升级Apache Ignite至安全版本2.17.0`
}));
};
const confirm = () => {
emit('close');
};

View File

@@ -1,15 +1,18 @@
<template>
<Card simple class="jyh-card mt-3">
<div class="mb-3">
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="licenseTableData">
<d-column field="code" header="时间"></d-column>
<d-table v-if="tableData.length>0" class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
<d-column field="updateTime" header="时间">
<template #default="scope">
<span>{{ formatTime(scope.row.updateTime, 'YYYY-MM-DD') }}</span>
</template>
</d-column>
<d-column field="name" header="标题">
<template #default="scope">
<a @click="openWarningDetail(scope.row)">{{ scope.row.name }}</a>
</template>
</d-column>
<d-column field="detail" header="详情"></d-column>
<d-column field="owner" header="订阅人"></d-column>
<d-column field="alertMsg" header="详情"></d-column>
<d-column field="level" header="级别">
<template #default="scope, text">
<d-status v-if="scope.row.level === 4" type="error">危险</d-status>
@@ -25,7 +28,17 @@
</template>
</d-column>
</d-table>
<NoData v-else :small="false"></NoData>
</div>
<div class="mt-20 mb-20 flex justify-end">
<d-pagination size="md" :page-size-options="[10, 20, 50]" :total="pager.total"
v-model:pageSize="pager.pageSize" v-model:pageIndex="pager.pageIndex" :max-items="5"
:can-change-page-size="true" :can-view-total="true" total-item-text="总计" @page-index-change="changeIndex()"
@page-size-change="changeSize()" />
</div>
</Card>
<d-modal class="warning-modal" v-model="warningModalVisable" title="">
@@ -34,25 +47,45 @@
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { onMounted, ref } from 'vue';
import EarlyWarningDetail from '@/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue';
import NoData from "@/components/NoData/NoData.vue";
import { getgroupNoticeList, getNoticeList } from '@/api/jyh';
const licenseTableData = ref([
{ code: '05822156', name: 'MIT License', detail: 'integer', owner: 'admin', level: 4, status: 1 },
{ code: '05822156', name: 'MIT License', detail: 'integer', owner: 'admin', level: 3, status: 2 },
{ code: '05822156', name: 'MIT License', detail: 'integer', owner: 'admin', level: 2, status: 2 },
{ code: '05822156', name: 'MIT License', detail: 'integer', owner: 'admin', level: 1, status: 2 }
const tableData = ref([
// { code: '05822156', name: 'MIT License', detail: 'integer', level: 4, status: 1 },
// { code: '05822156', name: 'MIT License', detail: 'integer', level: 3, status: 2 },
// { code: '05822156', name: 'MIT License', detail: 'integer', level: 2, status: 1 },
// { code: '05822156', name: 'MIT License', detail: 'integer', level: 1, status: 2 }
]);
const pager = ref({
total: 0,
pageIndex: 1,
pageSize: 10
});
const warningModalVisable = ref(false);
const currentWarning = ref();
const openWarningDetail = (row) => {
warningModalVisable.value = true;
currentWarning.value = row;
currentWarning.value = JSON.parse(row.alertMsg ?? '{}');
};
const colseWarningDetail = () => {
warningModalVisable.value = false;
};
const getList = async() => {
const { data, error } = await getgroupNoticeList({ current: 1,size: pager.value.pageSize });
if (!error && data) {
tableData.value = data.data.data.records;
pager.value.total = data.data.data.total;
}
};
onMounted(async() => {
getList();
});
</script>
<style scoped lang="scss">

View File

@@ -1,14 +1,18 @@
<template>
<Card simple class="jyh-card mt-3">
<div class="mb-3">
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="licenseTableData">
<d-column field="code" header="时间"></d-column>
<d-table v-if="tableData.length>0" class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
<d-column field="updateTime" header="时间">
<template #default="scope">
<span>{{ formatTime(scope.row.updateTime, 'YYYY-MM-DD') }}</span>
</template>
</d-column>
<d-column field="name" header="标题">
<template #default="scope">
<a @click="openWarningDetail(scope.row)">{{ scope.row.name }}</a>
</template>
</d-column>
<d-column field="detail" header="详情"></d-column>
<d-column field="alertMsg" header="详情"></d-column>
<d-column field="level" header="级别">
<template #default="scope, text">
<d-status v-if="scope.row.level === 4" type="error">危险</d-status>
@@ -24,7 +28,17 @@
</template>
</d-column>
</d-table>
<NoData v-else :small="false"></NoData>
</div>
<div class="mt-20 mb-20 flex justify-end">
<d-pagination size="md" :page-size-options="[10, 20, 50]" :total="pager.total"
v-model:pageSize="pager.pageSize" v-model:pageIndex="pager.pageIndex" :max-items="5"
:can-change-page-size="true" :can-view-total="true" total-item-text="总计" @page-index-change="changeIndex()"
@page-size-change="changeSize()" />
</div>
</Card>
<d-modal class="warning-modal" v-model="warningModalVisable" title="">
@@ -33,25 +47,45 @@
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { onMounted, ref } from 'vue';
import EarlyWarningDetail from '@/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue';
import NoData from "@/components/NoData/NoData.vue";
import { getNoticeList } from '@/api/jyh';
const licenseTableData = ref([
{ code: '05822156', name: 'MIT License', detail: 'integer', level: 4, status: 1 },
{ code: '05822156', name: 'MIT License', detail: 'integer', level: 3, status: 2 },
{ code: '05822156', name: 'MIT License', detail: 'integer', level: 2, status: 1 },
{ code: '05822156', name: 'MIT License', detail: 'integer', level: 1, status: 2 }
const tableData = ref([
// { code: '05822156', name: 'MIT License', detail: 'integer', level: 4, status: 1 },
// { code: '05822156', name: 'MIT License', detail: 'integer', level: 3, status: 2 },
// { code: '05822156', name: 'MIT License', detail: 'integer', level: 2, status: 1 },
// { code: '05822156', name: 'MIT License', detail: 'integer', level: 1, status: 2 }
]);
const pager = ref({
total: 0,
pageIndex: 1,
pageSize: 10
});
const warningModalVisable = ref(false);
const currentWarning = ref();
const openWarningDetail = (row) => {
warningModalVisable.value = true;
currentWarning.value = row;
currentWarning.value = JSON.parse(row.alertMsg ?? '{}');
};
const colseWarningDetail = () => {
warningModalVisable.value = false;
};
const getList = async() => {
const { data, error } = await getNoticeList({ current: 1,size: pager.value.pageSize });
if (!error && data) {
tableData.value = data.data.data.records;
pager.value.total = data.data.data.total;
}
};
onMounted(async() => {
getList();
});
</script>
<style scoped lang="scss">

View File

@@ -1,7 +1,7 @@
<template>
<div class="invitation-notice-container">
<Card simple class="jyh-card mt-3">
<div class="mb-3">
<div class="mt-3">
<d-table
class="jyh-table jyh-table-2"
:header-bg="true"
@@ -86,12 +86,13 @@ const handleAccept = async (row, type) => {
});
if (data?.data?.data?.data) {
Message({
type,
type: 'success',
message: '成功接受',
});
queryInviteListData();
} else {
Message({
type,
type: 'error',
message: '接受失败',
});
}

View File

@@ -155,7 +155,7 @@ const userInfo = shallowRef<UserInfoType>({
groupDesc: null,
});
const searchOrganizationLoading = ref(false);
const hasOrganization = ref(false);
const hasOrganization = ref(true);
const organizationInfo = shallowRef<OrganizationInfoType>({
groupId: 0,
organizationName: '',
@@ -218,13 +218,14 @@ async function queryUserInfo() {
userInfo.value = res.data?.data.data;
}
if (userInfo.value.groupId) {
hasOrganization.value = true;
organizationInfo.value = {
groupId: userInfo.value.groupId,
organizationName: userInfo.value.groupName as string,
organizationProfile: userInfo.value.groupDesc as string,
};
getMemberList();
} else {
hasOrganization.value = false;
}
} catch (e) {
Message.error('查询用户信息失败');