lijinlong
许宏杰 2 years ago
parent fb723b3a7e
commit 9d30670849

@ -117,12 +117,15 @@
v-for="(item, idx) in dangerList" v-for="(item, idx) in dangerList"
:key="idx" :key="idx"
class="dangerText" class="dangerText"
> >
<span :data-url="item.fileUrl">{{ item.unitName }}</span> <span :data-url="item.fileUrl">{{ item.unitName }}</span>
<span :data-url="item.fileUrl">{{ item.riskName }}</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">{{
<span :data-url="item.fileUrl"> {{ $filterDict("tc_yh_source", item.riskSource) }}</span> $filterDict("tc_yh_level", item.level)
}}</span>
<span :data-url="item.fileUrl">
{{ $filterDict("tc_yh_source", item.riskSource) }}</span
>
</div> </div>
</vue-seamless-scroll> </vue-seamless-scroll>
</div> </div>
@ -140,7 +143,6 @@
:data="informList" :data="informList"
:class-option="classOption" :class-option="classOption"
class="table_ctn" class="table_ctn"
> >
<div <div
v-for="(item, index) in informList" v-for="(item, index) in informList"
@ -230,7 +232,7 @@
</template> </template>
<script> <script>
import {safeRisks} from '@/api/wlSafe' import { safeRisks } from "@/api/wlSafe";
import { listDanger, getDanger, listTb, getTb } from "@/api/zongzhi/st.js"; import { listDanger, getDanger, listTb, getTb } from "@/api/zongzhi/st.js";
import vueSeamlessScroll from "vue-seamless-scroll"; import vueSeamlessScroll from "vue-seamless-scroll";
import ModuleTitle from "../../common/ModuleTitle.vue"; import ModuleTitle from "../../common/ModuleTitle.vue";
@ -289,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,
}, },
], ],
@ -449,15 +451,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;
} }
}) });
}) });
}) });
}, },
/** /**
@ -534,12 +536,18 @@ 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" ||
@ -549,13 +557,18 @@ 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 }) => { })
.then(({ data }) => {
if (data) { if (data) {
this.dialogDetails = true; this.dialogDetails = true;
this.$nextTick(() => { this.$nextTick(() => {
docx.renderAsync(data, this.$refs.file1); // docx.renderAsync(data, this.$refs.file1); //
}); });
} }
})
.catch((error) => {
this.$message.error(error);
}); });
} }
@ -1254,7 +1267,7 @@ export default {
.file-content .docx p { .file-content .docx p {
text-align: center !important; text-align: center !important;
} }
.docx{ .docx {
padding: 104pt 90pt !important; padding: 104pt 90pt !important;
} }
</style> </style>

Loading…
Cancel
Save