<template>
	<div class="app-container qyzx-details">
		<div class="bottomlist">
			<ul class="bottomlist-content">
				<li class="bottomlist-list"  >
					<p class="list-titel">
						{{textList.title}}
					</p>
					<div class="content-label">
						<span class="list-label list-label-zb" v-if="textList.tenderStage">
							{{textList.tenderStage}}
						</span>
						
						<span class="list-label" v-if="textList.province||textList.city||textList.area">
							{{textList.province}}
							<template v-if="textList.city">
								-{{textList.city}}
							</template>
							<template v-if="textList.area">
								-{{textList.area}}
							</template>
						</span>
						<span class="list-label list-label-zb" v-if="textList.businessType">
							{{textList.businessType}}
						</span>
						<span class="list-label list-label-lx" v-if="textList.industry">
							{{textList.industry}}
						</span>
					</div>
					
					<div  class="list-content">
						<p class="list-content-text" v-if="textList.tenderee">
							<span>招采单位：</span>
							<router-link v-if="textList.tenderee"  :to="textList.tendereeUipId?'/enterprise/' + encodeStr(textList.tendereeId) :'/company/' + encodeStr(textList.tendereeId) " tag="a" class="list-titel-a blue" v-html="textList.tenderee"></router-link>
							<span v-else>--</span>
							
							
						</p>
						<p class="list-content-text"  v-if="textList.agency">
							<span>代理单位：</span>
							<router-link v-if="textList.agency"  :to="textList.agencyUipId?'/enterprise/' + encodeStr(textList.agencyId) :'/company/' + encodeStr(textList.agencyId) " tag="a" class="list-titel-a blue" v-html="textList.agency"></router-link>
							<span v-else>--</span>
							
						</p>
						
					</div>
					<div  class="list-content"  v-if="textList.projectAmount||textList.contact">
						<p class="list-content-text"  v-if="textList.projectAmount">
							<span>预算金款：</span>
							<span v-if="textList.projectAmount">{{textList.projectAmount}}万元</span>
							<span v-else>--</span>
						</p>
						<p class="list-content-text"  v-if="textList.contact">
							<span>联系方式：</span>
							<span >招采单位 {{textList.contact}}{{textList.contactTel}}</span>
						</p>
					</div>
					
					<div  class="list-content" v-if="textList.issueTime||textList.overTime||textList.dataSource">
						<p class="list-content-text" v-if="textList.issueTime">
							<span>发布时间：</span>
							<span >{{textList.issueTime||'--'}}</span>
						</p>
						<p class="list-content-text" v-if="textList.overTime">
							<span>报名截止日期：</span>
							<span >{{textList.overTime||'--'}}</span>
						</p>
						<p class="list-content-text" v-if="textList.dataSource">
							<span>来源网站：</span>
							<span >{{textList.dataSource||'--'}}</span>
						</p>
					</div>
					
				</li>
			</ul>

		</div>

		<div class="content main3">
			<div class="common-title">原文信息</div>
			<div class="list-content-img"  @mouseenter="showimg=false" @mouseleave="showimg=true">
				<img v-if="showimg" src="@/assets/images/bxpro/original1.png">
				<img v-else src="@/assets/images/bxpro/original.png">
				<span>
					<a :href="textList.url" target="_blank">原文链接</a>
				</span>
			</div>
			<div class="main3-box" v-html="textList.content">
				
				
			
			</div>
		</div>
	
	
	</div>
</template>

<script>
	import "@/assets/styles/public.css";
	import api from '@/api/radar/radar.js';
	import {encodeStr} from "@/assets/js/common.js"
	export default {

		name: 'TenderDetails',
		data() {
			return {
				encodeStr,
				id: '',
				textList:{},
				showimg:true
			}
		},
		created() {
			this.id = this.$route.params.id;
			this.bidNoticeDetail();
		},
		methods: {
			bidNoticeDetail() {
				api.bidNoticeDetail({
					id: this.id
				}).then(res => {
					// console.log(res);
					this.textList = res.data;
					console.log(this.textList);
			
				}).catch(error => {
			
				});
			},
			

		}
	}
</script>

<style lang="scss" scoped>
	.bottomlist {
		width: 100%;
		background-color: #FFFFFF;

		border-radius: 4px 4px 4px 4px;

		.bottomlist-title {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-top: 12px;
			padding: 16px;
			border-bottom: 1px solid #EFEFEF;

			.title-right {
				display: flex;
				align-items: center;

				p:first-child {
					font-size: 12px;
					font-weight: 400;
					color: #3D3D3D;
					margin-right: 10px;
				}

				p:last-child {
					display: flex;
					align-items: center;
					font-size: 14px;
					font-weight: 400;
					color: rgba(35, 35, 35, 0.8);
				}

				img {
					width: 18px;
					height: 18px;
				}
			}

		}

		.bottomlist-content {

			padding-bottom: 0px;
		}

		.bottomlist-list {
			padding: 16px;
			font-size: 14px;
			border-bottom: 1px solid #EFEFEF;
			padding-bottom: 14px;

			.list-titel {
				font-size: 16px;
				font-weight: 700;
				color: #3D3D3D;
				line-height: 19px;

				.list-titel-a {
					text-decoration: none;
					color: #3D3D3D;
				}

				a:hover,
				a:visited,
				a:link,
				a:active {
					color: #3D3D3D;
				}
			}

			.content-label {
				margin-top: 12px;

				.list-label {
					background: #F3F3FF;
					color: #8491E8;
					border-radius: 1px 1px 1px 1px;
					margin-right: 12px;

					padding: 3px 7px;
					font-size: 12px;

				}
				.list-label-zb{
					font-weight: 400;
					color: #5A88F9;
					background: #E7EDFC;
				}
				.list-label-lx{
					font-weight: 400;
					color: #41A1FD;
					background: #E4F3FD;
				}
			}


			.list-content {
				margin-top: 6px;
				display: flex;
				justify-content: start;
				align-items: center;

				.list-content-text {
					margin-top: 7px;
					display: flex;
					justify-content: start;
					align-items: center;
					margin-right: 27px;
					font-size: 14px;

					span:first-child {
						font-weight: 400;
						color: rgba(35, 35, 35, 0.4);
						line-height: 15px
					}

					span:last-child {
						font-weight: 400;
						color: rgba(35, 35, 35, 0.8);
						line-height: 15px
					}

					.blue {
						color: #0081FF !important;
						cursor: pointer;

					}

				}


			}

			.list-addree {
				width: auto;
				background: #F3F4F5;
				display: inline-flex;
				margin-top: 7px;

				.list-content-text {
					margin-top: 0px;

					span {
						line-height: 30px !important;
					}
				}

				img {
					width: 14px;
					margin: 0 8px;

				}
			}


		}

		.bottomlist-list:hover {
			background: #F6F9FC;
			cursor: pointer;
		}

		.pagination {
			padding: 14px;

			.el-pagination {
				float: right;
			}
		}
	}

	.app-container {
		padding: 0;
	}

	.qyzx-details {
		.content {
			margin-top: 16px;
			background: #FFFFFF;
			padding: 16px;
			border-radius: 4px;
		}

		.common-title {
			margin-bottom: 8px;
		}


		.main3 {
			position: relative;
			.main3-box {
				margin-top: 22px;
				min-height: 400px;
				border: 1px solid #D8D8D8;
				padding: 16px;

			}
			.list-content-img{
				position: absolute;
				top: 16px;
				right:14px ;
				color: #0081FF;
				display: flex;
				align-items: center;
				font-size: 14px;
				cursor: pointer;
				img{
					width: 14px;
					height: 14px;
					margin-right: 4px;
				}
			}
			.list-content-img:hover{
				color: #0067CC;
			}
		}


	}
</style>