杜函宇 1 year ago
commit b58e124765

@ -4,6 +4,6 @@ ENV = 'development'
# base api
VUE_APP_BASE_API = '/dashboard'
VUE_APP_BASE_API2 = 'http://192.168.0.106:9027'
VUE_APP_BASE_API2 = 'http://192.168.0.110:9027'
BASE_API = 'http://10.10.3.35:9070'

@ -25,8 +25,8 @@ const dict = {
getDictType({ commit }) {
return new Promise((resolve, reject) => {
const query = {
list: 'sys_user_sex,tc_net_sx,tc_yq_media,tc_enter_type,tc_inlet_yewu,tc_item_type,tc_net_safety_level,tc_yes_no,tc_unit_type,tc_tmt_type,tc_db_steam_state,tc_attack_type,tc_yh_level,tc_yh_source,tc_yq_type,tc_event_type,tc_cy_type,tc_yq_state'
}
list: "sys_user_sex,tc_net_sx,tc_yq_media,tc_enter_type,tc_inlet_yewu,tc_item_type,tc_net_safety_level,tc_yes_no,tc_unit_type,tc_tmt_type,tc_db_steam_state,tc_attack_type,tc_yh_level,tc_yh_source,tc_yq_type,tc_event_type,tc_cy_type,tc_yq_state,tc_steam_state",
};
getDictList(query)
.then((res) => {
// console.log(res)

@ -104,25 +104,25 @@
<span>攻击源/IP</span>
<span>攻击类型</span>
</div>
<vue-seamless-scroll
:data="tableData"
:class-option="classOption"
class="monitorScroll"
>
<div
v-for="(item, idx) in tableData"
:key="idx"
class="monitor-list"
:data-obj="'安全监测'"
@click="getAttackSource(item.id)"
<div @click="getAttackSource($event)">
<vue-seamless-scroll
:data="tableData"
:class-option="classOption"
class="monitorScroll"
>
<span>{{ item.attackTime }}</span>
<span>{{ item.attackedIp }}</span>
<span>{{
$filterDict("tc_attack_type", item.attackType)
}}</span>
</div>
</vue-seamless-scroll>
<div
v-for="(item, idx) in tableData"
:key="idx"
class="monitor-list"
>
<span :data-id="item.id">{{ item.attackTime }}</span>
<span :data-id="item.id">{{ item.attackedIp }}</span>
<span :data-id="item.id">{{
$filterDict("tc_attack_type", item.attackType)
}}</span>
</div>
</vue-seamless-scroll>
</div>
</div>
</div>
</div>
@ -637,7 +637,9 @@ export default {
});
});
},
async getAttackSource(id) {
async getAttackSource(e) {
let id = e.target.dataset.id;
if (!id) return;
this.dialogWidth = "1000px";
getDetection(id).then((res) => {
this.tableDataPop = res.data;

@ -1,4 +1,3 @@
<template>
<div class="container">
<div class="module-container">
@ -108,6 +107,7 @@
<span>等级</span>
<span>隐患来源</span>
</div>
<div @click="rowDetails($event)">
<vue-seamless-scroll
:data="dangerList"
:class-option="classOption"
@ -117,42 +117,48 @@
v-for="(item, idx) in dangerList"
:key="idx"
class="dangerText"
@click="rowDetails(item)"
>
<span>{{ item.unitName }}</span>
<span>{{ item.riskName }}</span>
<span>{{ $filterDict("tc_yh_level", item.level) }}</span>
<span> {{ $filterDict("tc_yh_source", item.riskSource) }}</span>
<span :data-url="item.fileUrl">{{ item.unitName }}</span>
<span :data-url="item.fileUrl">{{ item.riskName }}</span>
<span :data-url="item.fileUrl">{{ $filterDict("tc_yh_level", item.level) }}</span>
<span :data-url="item.fileUrl"> {{ $filterDict("tc_yh_source", item.riskSource) }}</span>
</div>
</vue-seamless-scroll>
</div>
</div>
<!-- 通报处置 -->
<div v-if="dangerCurrentIndex === 1">
<div class="table_outside" @click="rowDetails($event)">
<div class="table_outside">
<div class="table_title">
<span class="title_one">单位名称</span>
<span class="title_two">目标IP/域名</span>
<span class="title_three">处置情况</span>
</div>
<div @click="rowDetails($event)">
<vue-seamless-scroll
:data="informList"
:class-option="classOption"
class="table_ctn"
>
<div
v-for="(item, index) in informList"
:key="index"
class="ctn_item"
>
<div class="item_name">
<div class="item_name" :data-url="item.fileUrl">
{{ item.depName }}
</div>
<div class="item_ip">
{{ item.domainName }}
<div class="item_ip" :data-url="item.fileUrl">
{{ item.ip }}
</div>
<span class="item_num">{{ item.status }}</span>
<span class="item_num" :data-url="item.fileUrl">{{
$filterDict("tc_steam_state", item.state)
}}</span>
</div>
</vue-seamless-scroll>
</div>
</div>
</div>
</div>
@ -206,9 +212,10 @@
class="file-content"
></div>
<div v-if="fileExtension === 'pdf'" class="file-content">
<div v-for="i in numPages" :key="i">
<iframe style="height: 100%; width: 100%" :src="pdfUrl"></iframe>
<!-- <div v-for="i in numPages" :key="i">
<pdf ref="pdf" :key="i" :src="pdfUrl" :page="i"></pdf>
</div>
</div> -->
</div>
</div>
<span slot="footer" class="dialog-footer">
@ -527,15 +534,40 @@ export default {
this.dialogStatus = true;
},
rowDetails(e) {
const row = JSON.parse(e.target.dataset.obj);
this.dialogTitle = row?.name || row?.systemName;
if (this.dangerCurrentIndex === 0) {
row.url = `/网信办大屏内容文档/网络安全/最新隐患/网络和信息安全通报-2023年第${row.issue}期 总第${row.totalNum}期(${row.systemName}.pdf`;
} else {
row.url = `/网信办大屏内容文档/网络安全/通报处置/${row.url}`;
if(!e.target.dataset.url) return
this.fileExtension = e.target.dataset.url.substring(
e.target.dataset.url.lastIndexOf(".") + 1
);
if (this.fileExtension == "pdf") {
this.pdfUrl = process.env.VUE_APP_BASE_API2 +e.target.dataset.url;
this.dialogDetails = true;
} else if (
this.fileExtension === "docx" ||
this.fileExtension === "doc"
) {
axios({
method: "get",
responseType: "blob", //
url: process.env.VUE_APP_BASE_API2 + e.target.dataset.url,
}).then(({ data }) => {
if (data) {
this.dialogDetails = true;
this.$nextTick(() => {
docx.renderAsync(data, this.$refs.file1); //
});
}
});
}
console.log(row, "aaa");
this.dialogDetails = true;
// const row = JSON.parse(e.target.dataset.obj)
// this.dialogTitle = row?.name || row?.systemName
// if (this.dangerCurrentIndex === 0) {
// row.url = `////-2023${row.issue} ${row.totalNum}${row.systemName}.pdf`
// } else {
// row.url = `////${row.url}`
// }
// console.log(row, 'aaa')
// this.dialogDetails = true
// this.fileExtension = row.url.substring(row.url.lastIndexOf('.') + 1)
// if (this.fileExtension === 'docx' || this.fileExtension === 'doc') {
@ -1222,4 +1254,7 @@ export default {
.file-content .docx p {
text-align: center !important;
}
.docx{
padding: 104pt 90pt !important;
}
</style>

Loading…
Cancel
Save