<template>
	<div class="msgDetail">
		<headNav
		@backPage="backPage"
		:title="'消息详情'"></headNav>
		
		<div class="top">
			<div class="FontColorNormal">{{ msgInfo.fileName }}</div>
			<span class="FontColorInfo mt10">{{ msgInfo.createdTime }}</span>
		</div>
		
		<div class="Detail" v-html="msgInfo.fileCont">
			
		</div>
		
		<div class="bottom">
			<van-cell title="通知单位" value="内容" />
			<van-cell title="单位账号" value="内容" />
			<van-cell title="回复时间" value="内容" />
			<van-cell title="回复内容" value="内容" />
		</div>
	</div>
</template>

<script>
	import headNav from '@/components/headNav.vue'
	import { get, post } from '@/utils/http.js'
	
	export default {
		name: 'msgDetail',
		components: {
			headNav
		},
		data() {
			return {
				msgInfo: ''
			}
		},
		mounted() {
			this.init();
		},
		methods: {
			// 初始化
			init() {
				this.getFileListApi();
			},
			
			// 获取文件列表
			getFileListApi() {
				post('/cdsupervisionNotice/pageList', {
					taskId: this.$route.params.taskId,
				}).then(res => {
					if (res.success == true) {
						let docIist = res.data.list;
						docIist.forEach(item => {
							if (item.id === this.$route.params.ID) {
								this.msgInfo = item;
							}
						});
					}
				});
			},
			
			backPage() {
				this.$router.go(-1);
			}
		},
	}
</script>

<style lang="scss" scoped>
	.msgDetail {
		font-size: 14px;
		position: relative;
		height: calc(100vh - 57px);
		
		.top {
			margin-top: 57px;
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			background-color: #fff;
			padding: 20px 15px;
			
		}
		
		.Detail {
			margin-top: 20px;
			color: #949494;
			font-size: 12px;
			padding: 0px 15px;
			line-height: 25px;
			max-height: calc(100vh - 345px);
			overflow: hidden;
			overflow-y: auto;
		}
		
		.bottom {
			position: absolute;
			width: 100%;
			bottom: 0;
		}
	}
</style>

<style lang="scss">
	.msgDetail {
		.van-cell {
			font-size: 12px;
			
			&::after {
				border-bottom: 1px solid #e8e8e8;
			}
		}
	}
</style>