杜函宇 2 years ago
commit 69bfd3c500

@ -291,31 +291,31 @@ export default {
{ {
title: "敏感信息泄露漏洞", title: "敏感信息泄露漏洞",
value: 0, value: 0,
type:1, type: 1,
}, },
{ {
title: "权限许可和访问控制", title: "权限许可和访问控制",
type:2, type: 2,
value: 0, value: 0,
}, },
{ {
title: "未加密登录请求", title: "未加密登录请求",
value: 0, value: 0,
type:3, type: 3,
}, },
{ {
title: "其他", title: "其他",
type:6, type: 6,
value: 0, value: 0,
}, },
{ {
title: "应用程序测试脚本漏洞", title: "应用程序测试脚本漏洞",
type:4, type: 4,
value: 0, value: 0,
}, },
{ {
title: "文件上传漏洞", title: "文件上传漏洞",
type:5, type: 5,
value: 0, value: 0,
}, },
], ],
@ -446,15 +446,15 @@ export default {
* 安全隐患大屏数据 * 安全隐患大屏数据
*/ */
safeListDP() { safeListDP() {
safeRisks().then(res=>{ safeRisks().then((res) => {
res.data.forEach((value,index)=>{ res.data.forEach((value, index) => {
this.safetyList.forEach((value1,index1)=>{ this.safetyList.forEach((value1, index1) => {
if(value.type == value1.type){ if (value.type == value1.type) {
this.safetyList[index1].value = value.count this.safetyList[index1].value = value.count;
} }
}) });
}) });
}) });
}, },
/** /**
* 通报完成情况 * 通报完成情况
@ -543,13 +543,19 @@ export default {
this.dialogStatus = true; this.dialogStatus = true;
}, },
rowDetails(e) { rowDetails(e) {
if(!e.target.dataset.url) return if (!e.target.dataset.url) {
this.$message({
message: "该记录暂无文件!",
type: "warning",
});
return;
}
this.fileExtension = e.target.dataset.url.substring( this.fileExtension = e.target.dataset.url.substring(
e.target.dataset.url.lastIndexOf(".") + 1 e.target.dataset.url.lastIndexOf(".") + 1
); );
if (this.fileExtension == "pdf") { if (this.fileExtension == "pdf") {
this.pdfUrl = process.env.VUE_APP_BASE_API2 +e.target.dataset.url; this.pdfUrl = process.env.VUE_APP_BASE_API2 + e.target.dataset.url;
this.dialogDetails = true; this.dialogDetails = true;
} else if ( } else if (
this.fileExtension === "docx" || this.fileExtension === "docx" ||
this.fileExtension === "doc" this.fileExtension === "doc"
@ -558,14 +564,19 @@ export default {
method: "get", method: "get",
responseType: "blob", // responseType: "blob", //
url: process.env.VUE_APP_BASE_API2 + e.target.dataset.url, url: process.env.VUE_APP_BASE_API2 + e.target.dataset.url,
}).then(({ data }) => { })
if (data) { .then(({ data }) => {
this.dialogDetails = true; if (data) {
this.$nextTick(() => {
docx.renderAsync(data, this.$refs.file1); // this.dialogDetails = true;
}); this.$nextTick(() => {
} docx.renderAsync(data, this.$refs.file1); //
}); });
}
})
.catch((error) => {
this.$message.error(error);
});
} }
// const row = JSON.parse(e.target.dataset.obj) // const row = JSON.parse(e.target.dataset.obj)

@ -70,18 +70,16 @@ export default {
}, },
methods: { methods: {
getDataList() { getDataList() {
wordCloud().then((res) => { this.$store.getters.dictObject["tc_cy_type"].forEach((value) => {
res.data.forEach((value) => { this.data.push({
this.data.push({ name: value.dictLabel,
name: this.$filterDict("tc_cy_type", value.type), count: 888,
count: 888,
});
});
this.$nextTick(() => {
this.init();
this.animate();
}); });
}); });
this.$nextTick(() => {
this.init();
this.animate();
});
}, },
init() { init() {
const tags = document.querySelectorAll(".tag"); const tags = document.querySelectorAll(".tag");

Loading…
Cancel
Save