diff --git a/src/views/privateOrder/security/components/componentRight.vue b/src/views/privateOrder/security/components/componentRight.vue index 4892df1..98236c9 100644 --- a/src/views/privateOrder/security/components/componentRight.vue +++ b/src/views/privateOrder/security/components/componentRight.vue @@ -291,31 +291,31 @@ export default { { title: "敏感信息泄露漏洞", value: 0, - type:1, + type: 1, }, { title: "权限许可和访问控制", - type:2, + type: 2, value: 0, }, { title: "未加密登录请求", value: 0, - type:3, + type: 3, }, { title: "其他", - type:6, + type: 6, value: 0, }, { title: "应用程序测试脚本漏洞", - type:4, + type: 4, value: 0, }, { title: "文件上传漏洞", - type:5, + type: 5, value: 0, }, ], @@ -446,15 +446,15 @@ export default { * 安全隐患大屏数据 */ safeListDP() { - safeRisks().then(res=>{ - res.data.forEach((value,index)=>{ - this.safetyList.forEach((value1,index1)=>{ - if(value.type == value1.type){ - this.safetyList[index1].value = value.count + safeRisks().then((res) => { + res.data.forEach((value, index) => { + this.safetyList.forEach((value1, index1) => { + if (value.type == value1.type) { + this.safetyList[index1].value = value.count; } - }) - }) - }) + }); + }); + }); }, /** * 通报完成情况 @@ -543,13 +543,19 @@ export default { this.dialogStatus = true; }, 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( 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; + this.pdfUrl = process.env.VUE_APP_BASE_API2 + e.target.dataset.url; + this.dialogDetails = true; } else if ( this.fileExtension === "docx" || this.fileExtension === "doc" @@ -558,14 +564,19 @@ export default { 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); // 渲染到页面预览 - }); - } - }); + }) + .then(({ data }) => { + if (data) { + + 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) diff --git a/src/views/privateOrder/sentiment/components/WordCloud.vue b/src/views/privateOrder/sentiment/components/WordCloud.vue index 938dd70..5dd50e9 100644 --- a/src/views/privateOrder/sentiment/components/WordCloud.vue +++ b/src/views/privateOrder/sentiment/components/WordCloud.vue @@ -70,18 +70,16 @@ export default { }, methods: { getDataList() { - wordCloud().then((res) => { - res.data.forEach((value) => { - this.data.push({ - name: this.$filterDict("tc_cy_type", value.type), - count: 888, - }); - }); - this.$nextTick(() => { - this.init(); - this.animate(); + this.$store.getters.dictObject["tc_cy_type"].forEach((value) => { + this.data.push({ + name: value.dictLabel, + count: 888, }); }); + this.$nextTick(() => { + this.init(); + this.animate(); + }); }, init() { const tags = document.querySelectorAll(".tag");