<template>
	<view class="container">
		<uni-navbar title="安全信息"></uni-navbar>
		<view class="box">
			<view class="commonBj commonMt commonMb pd textStyle1 boxHeight overflowAuto">
				<view class="safe-title">
					<text>{{form.noticeTitle}}</text>
				</view>
				<view class="title-bottom">
					<view class="title-bottom-left">
						<image style="width: 25rpx;height: 25rpx;" src="../../static/images/home/time.png"
							mode="widthFix">
						</image>
						<text>{{form.createTime}}</text>
					</view>
					<view class="title-bottom-right">
						<text>来源：{{form.deptName}}</text>
					</view>
				</view>
				<view class="line-box">
				</view>
				<view class="text-content">
					<u-parse :tagStyle="style" :content="form.noticeContent"></u-parse>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		safeDetail
	} from "@/api/company/index.js"
	export default {
		onLoad(option) {
			console.log(option.id);
			this.getDetail(option.id)
		},
		data() {
			return {
				form: {},
				style: {
					p: 'color: #485B94;font-size:28rpx;',
					li: 'color: #485B94;font-size:28rpx',
					span: 'color: #485B94;font-size:28rpx',
					div: 'color: #485B94;font-size:28rpx',
					a: 'color: #485B94;font-size:28rpx',
				}
			}
		},
		methods: {
			getDetail(id) {
				safeDetail(id).then(res => {
					console.log(res);
					this.content = res.data.noticeContent
					this.form = res.data
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.textCenter {
		text-align: center;
		width: 100%;
	}

	.boxHeight {
		height: 80vh;
	}

	.overflowAuto {
		overflow-y: auto;
	}

	.textStyle1 {
		word-wrap: break-word;
		/*支持IE，chrome，FF*/
	}

	.pd {
		padding: 45rpx 27rpx;
	}

	.box-height {
		height: auto;
	}

	.line-box {
		width: 625rpx;
		height: 2rpx;
		background: #576CA1;
		margin: 34rpx auto;
	}

	.title-bottom {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 44rpx;

		.title-bottom-left {
			display: flex;
			justify-content: center;
			align-items: center;

			text {
				font-size: 24rpx;
				font-weight: 400;
				color: #485B94;
				margin-left: 13rpx;
			}
		}

		.title-bottom-right {
			font-size: 24rpx;
			font-weight: 400;
			color: #485B94;
		}
	}

	.safe-title {
		text-align: center;
		font-size: 30rpx;
		font-weight: bold;
		color: #333333;
	}

	.text-content {
		color: #485B94;
		font-size: 28rpx;
	}
</style>
