Files
Situation-Awareness-Platfor…/src/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue

153 lines
4.2 KiB
Vue
Raw Normal View History

2025-03-15 15:06:17 +08:00
<template>
<div class="warning-detail-container">
<div class="warning-title">
2025-03-19 11:55:21 +08:00
<div style="padding-right: 20px;">{{ warningData.subject }}</div>
2025-03-15 15:06:17 +08:00
<div class="sub-title mt-3">
2025-03-18 15:33:54 +08:00
<div>
<span>重要性</span>
<d-tag type="danger" size="sm">{{warningData.importance}}</d-tag>
</div>
2025-03-18 17:13:54 +08:00
<div v-if="propsData.type === 'system'">
2025-03-18 15:33:54 +08:00
<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>
2025-03-15 15:06:17 +08:00
</div>
</div>
<div class="warning-text">
2025-03-18 15:33:54 +08:00
<d-editor-md
2025-03-18 17:24:35 +08:00
v-model="warningData.overview"
2025-03-18 15:33:54 +08:00
:mode="mode"
:toolbar-config="toolbarConfig"
></d-editor-md>
2025-03-15 15:06:17 +08:00
</div>
2025-03-19 11:55:21 +08:00
<div :style="{'border-radius': propsData.type === 'user' ? '6px' : 0}" class="warning-from">{{warningData.group}} {{ warningData.publishTime }}</div>
2025-03-15 15:06:17 +08:00
<div v-if="propsData.type === 'system'" class="warning-operation">
2025-03-15 17:17:31 +08:00
<d-button @click="confirm" variant="solid" class="mr-2">确定</d-button>
2025-03-15 15:06:17 +08:00
<d-button @click="$emit('close')">取消</d-button>
</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
const emit = defineEmits(['close']);
const propsData = defineProps(['type', 'warningData']);
2025-03-18 22:06:02 +08:00
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');
2025-03-19 11:55:21 +08:00
console.log(propsData.warningData)
warningData.value = propsData.warningData ?? {
2025-03-18 21:01:21 +08:00
subject: '【漏洞排查预警】ApacheIgnite远程代码执行漏洞排查CVE-2024-52577)',
importance: '高',
group: '可信开源代码库运营团队',
pulishTime: '2025-2-20',
overview: `## 一、概要
近日安全中心发现Apache lgnite远程代码执行漏洞CVE-2024-52577 2.6.0<Apache Ignite< 2.17.0版本中由于lgnite未能正确实施类序列化过滤器攻击者能够利用恶意序列化对象绕过安全检查从而在服务器端反序列化时触发任意代码的执行经可信开源代码库运营团队评审漏洞技术定级2级/3级若不满足利用条件可举证降为6级请你按要求在XX时间内完成修复
## 修复方案
升级Apache Ignite至安全版本2.17.0`
2025-03-19 11:55:21 +08:00
};
2025-03-15 15:06:17 +08:00
const confirm = () => {
emit('close');
};
2025-03-18 15:33:54 +08:00
const handleModeChange = () => {
if (mode.value === 'editonly') {
mode.value = 'readonly';
} else {
mode.value = 'editonly';
}
};
2025-03-15 15:06:17 +08:00
</script>
<style scoped lang="scss">
.warning-detail-container {
width: 600px;
.warning-title {
color: #000000;
font-family: HarmonyOS Sans SC;
font-weight: 600;
font-size: 20px;
line-height: 28px;
2025-03-18 17:13:54 +08:00
padding: 20px 20px 12px;
2025-03-15 15:06:17 +08:00
.sub-title {
2025-03-18 15:33:54 +08:00
display: flex;
justify-content: space-between;
>div:first-of-type>span {
2025-03-15 15:06:17 +08:00
margin-right: 12px;
color: #808080;
font-family: HarmonyOS Sans SC;
font-size: 12px;
}
}
}
.warning-text {
2025-03-18 21:01:21 +08:00
padding: 20px 20px 0;
2025-03-15 15:06:17 +08:00
background: #F6F6F8;
2025-03-18 15:33:54 +08:00
color: initial;
2025-03-18 17:13:54 +08:00
:deep .dp-md-readonly {
.dp-md-toolbar-container {
display: none;
}
}
:deep .dp-md-view {
background-color: #F6F6F8;
2025-03-18 15:33:54 +08:00
h2 {
font-size: 1.5em;
font-weight: bold;
}
p {
color: #252B3A;
font-family: 苹方-;
font-size: 14px;
line-height: 24px;
font-weight: 400;
}
}
2025-03-15 15:06:17 +08:00
.text-box {
div {
margin-bottom: 8px;
color: #252B3A;
font-family: HarmonyOS Sans SC;
font-weight: 600;
font-size: 16px;
line-height: 24px;
}
2025-03-18 15:33:54 +08:00
::v-deep .devui-textarea {
2025-03-15 15:06:17 +08:00
color: #252B3A;
font-family: 苹方-;
font-size: 14px;
line-height: 24px;
2025-03-18 15:33:54 +08:00
font-weight: 400;
2025-03-15 15:06:17 +08:00
}
}
}
.warning-from {
background: #F6F6F8;
color: #808080;
font-family: HarmonyOS Sans SC;
font-size: 14px;
text-align: center;
padding: 20px;
}
.warning-operation {
text-align: center;
padding: 20px;
}
}
</style>