<template>
|
<div
|
class="
|
page-container page-safety-report-detail page-safety-dispatch-report
|
colorfff
|
"
|
>
|
<div class="nav">
|
<img
|
class="nav-icon"
|
:src="require('@/assets/safety/location.png')"
|
alt=""
|
/>
|
<div class="nav-content">
|
<span>安全管理 </span>
|
<i class="el-icon el-icon-arrow-right"></i>
|
<span> 内容详情</span>
|
</div>
|
</div>
|
<div class="content">
|
<div class="detail-wrap">
|
<div class="title">
|
<span class="title-text">内容详情</span>
|
</div>
|
|
<div class="table">
|
<div class="row">
|
<div class="flex">
|
<div class="label"><span>创建时间</span>:</div>
|
<div class="value">{{ detail.createDate }}</div>
|
</div>
|
<div class="flex">
|
<div class="label"><span>标题</span>:</div>
|
<div class="value">{{ detail.title }}</div>
|
</div>
|
<div class="flex">
|
<div class="label"><span>信息类型</span>:</div>
|
<div class="value">{{typeMap[detail.type]}}</div>
|
</div>
|
</div>
|
<div class="row flex" style="width: 100%">
|
<div class="label"><span>内容详情</span>:</div>
|
<div class="value flex" style="padding-right: 30px; width: 85%">
|
<div style="margin-top: 1em" v-html="detail.publishContent"></div>
|
</div>
|
</div>
|
<div class="row flex" style="width: 100%" v-if="detail.fileList">
|
<div class="label"><span>附件内容</span>:</div>
|
<div class="value flex" style="padding-right: 30px; width: 85%">
|
<div style="margin-right: 10px; cursor: pointer" v-for="item in detail.fileList" @click="downloadFile(item)">{{item.fileName}}</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import qs from 'qs'
|
export default {
|
name: "accidentReportDetail",
|
data() {
|
return {
|
id: "",
|
detail: {
|
|
},
|
typeMap: {
|
"1": '服务月报',
|
"2": '安全月报',
|
"3": '安全学习',
|
"4": '规章制度',
|
"5": '公告通知',
|
"6": '疫情防控'
|
},
|
};
|
},
|
created() {
|
|
},
|
activated() {
|
this.getArtDetail();
|
},
|
methods: {
|
goBack() {
|
this.$router.go(-1);
|
},
|
getArtDetail(){
|
this.$axios.get(this.$Interface.safetyArticle.detail, {
|
params: {id: this.$route.query.id}
|
}).then(res => {
|
this.detail = res.data;
|
})
|
},
|
downloadFile(item){
|
let token = localStorage.getItem("mtoken");
|
item.token = token;
|
const a = document.createElement('a');
|
const url = `${this.$exportBase + 'sys/oss/download'}?${qs.stringify(item)}`
|
a.href = url;
|
a.click();
|
}
|
},
|
};
|
</script>
|
|
<style lang="less" scoped>
|
@import url("../../assets/css/common.css");
|
@orange: #1cd1d3;
|
@blue: #3e89d3;
|
.pointer {
|
cursor: pointer;
|
}
|
.page-container {
|
padding: 20px 30px;
|
padding-bottom: 0;
|
.nav {
|
display: flex;
|
font-size: 14px;
|
width: 100%;
|
height: 20px;
|
align-items: center;
|
.nav-icon {
|
width: 18px;
|
margin-left: 11px;
|
flex-shrink: 0;
|
margin-right: 11px;
|
}
|
.nav-content {
|
flex: 1;
|
}
|
}
|
.content {
|
margin-top: 30px;
|
.detail-wrap {
|
width: 96vw;
|
height: calc(100vh - 300px);
|
border: 2px solid #415788;
|
backdrop-filter: blur(2px);
|
margin: auto;
|
position: relative;
|
.title {
|
background: #090f1d;
|
padding: 17px 20px;
|
.title-text {
|
display: block;
|
margin-right: 8px;
|
width: 120px;
|
height: 29px;
|
background: #0c1a35;
|
border: 1px solid #47598f;
|
border-radius: 4px;
|
line-height: 29px;
|
text-align: center;
|
}
|
}
|
.icon-close {
|
position: absolute;
|
top: 0;
|
right: -3px;
|
width: 42px;
|
cursor: pointer;
|
}
|
.row {
|
margin: 0 4px;
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
}
|
.table {
|
// margin-top: 23px;
|
> .row {
|
font-size: 14px;
|
display: flex;
|
align-items: center;
|
padding: 10px 0;
|
>div{
|
width: 25%;
|
}
|
.label {
|
width: 100px;
|
text-align: right;
|
padding: 16px 0;
|
color: #a3b0d1;
|
line-height: 0;
|
span {
|
display: inline-block;
|
width: 60px;
|
text-align: right;
|
}
|
}
|
.value {
|
padding-left: 24px;
|
}
|
.row {
|
width: 435px;
|
border-bottom: 0;
|
margin-right: 30px;
|
flex-shrink: 0;
|
}
|
}
|
}
|
.action-bar {
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
color: #fff;
|
font-size: 14px;
|
margin-top: 313px;
|
.action-item:first-child {
|
margin-right: 96px;
|
}
|
.action-item {
|
padding: 8px 30px;
|
border-left: 2px solid;
|
border-right: 2px solid;
|
opacity: 0.8;
|
}
|
.orange {
|
border-color: @orange;
|
background-color: rgba(28, 209, 211, 0.1);
|
}
|
.blue {
|
border-color: @blue;
|
background-color: rgba(62, 137, 211, 0.1);
|
}
|
}
|
}
|
}
|
.flex{
|
display: flex;
|
align-items: center;
|
}
|
}
|
</style>
|