杜函宇 2 years ago
commit 69bfd3c500

@ -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,7 +543,13 @@ 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
); );
@ -558,13 +564,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);
}); });
} }

@ -70,10 +70,9 @@ 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: this.$filterDict("tc_cy_type", value.type), name: value.dictLabel,
count: 888, count: 888,
}); });
}); });
@ -81,7 +80,6 @@ export default {
this.init(); this.init();
this.animate(); this.animate();
}); });
});
}, },
init() { init() {
const tags = document.querySelectorAll(".tag"); const tags = document.querySelectorAll(".tag");

Loading…
Cancel
Save