<template>
	<view class="app">
		<head-info></head-info>
		<view class="container">
			<side-bar path='3'></side-bar>
			<view class="content">
				<view class="form">
					<view class="select">
						<uni-data-select v-model="value" :localdata="range" @change="change">
						</uni-data-select>
					</view>
					<view class="input">
						<uni-easyinput class="input" suffixIcon="search" v-model="value1" placeholder="船名/航次"
							@iconClick="iconClick">
						</uni-easyinput>
					</view>
				</view>
				<view class="itemList">
					<view v-for="(item, index) in ltemList" :key="index" class="item">
						<view class="title">
							<view class="name">
								海王星领袖
							</view>
						</view>

						<view class="table">
							<view class="row">
								<view class="nitem">
									进口航次: <text>735546</text>
								</view>
								<view class="nitem">
									贸易类型: <text>内贸</text>
								</view>
							</view>
							<view class="row">
								<view class="nitem">
									出口航次: <text>555546</text>
								</view>
								<view class="nitem">
									贸易类型: <text>外贸</text>
								</view>
							</view>
							<view class="row">
								<view class="nitem">
									计划泊位: <text>一泊位</text>
								</view>
								<view class="nitem">
									实际泊位: <text>一泊位</text>
								</view>
							</view>
							<view class="row">
								<view class="nitem" v-if="item==1">
									<text class="green">●</text> 已下载
									<text>2023/09/21 12:00</text>
								</view>
								<view class="nitem" v-if="item==2">
									<text>●</text> 未下载
								</view>
								<view class="nitem" v-if="item==1">
									<text class="green">●</text> 已上传
									<text>2023/09/21 12:00</text>
								</view>
								<view class="nitem" v-if="item==2">
									<text>●</text> 未上传
								</view>
							</view>
							<view class="footer">
								<view class="fitem">
									下载
								</view>
								<view class="fitem">
									上传
								</view>
							</view>
							
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>

</template>

<script>
	import SideBar from '@/components/sider-bar/slider-bar';
	import HeadInfo from '@/components/head-info/head-info';
	export default {
		data() {
			return {
				value: 0,
				value1:'',
				range: [{
						value: 0,
						text: "一号港"
					},
					{
						value: 1,
						text: "二号港"
					},
					{
						value: 2,
						text: "不冻港"
					},
				],
				ltemList: [1, 2, 1, 1, 2, 1, 1, 1, 1],
			}
		},
		onLoad() {

		},
		components: {
			SideBar,
			HeadInfo
		},
		methods: {
			change(e) {
				console.log("e:", e);
			},
		}
	};
</script>

<style>
	.container {
		background-color: #f5f6fa;
		display: flex;
	}

	.content {
		padding: 20px;

		.form {
			display: flex;

			.select {
				width: 100px;
			}

			.input {
				width: 200px;
				height: 35px;
				line-height: 35px;
				margin-left: 15px;
			}
		}

		.itemList {
			width: 100%;
			display: flex;
			justify-content: flex-start;
			flex-wrap: wrap;

			.item {
				width: 49%;
				margin-top: 15px;
				margin-right: 2%;
				border: 1px solid #c9cacb;

				.title {
					display: flex;
					justify-content: space-between;
					font-size: 21px;
					padding: 10px 20px;
					font-weight: 700;
				}

				.row {
					display: flex;
					justify-content: space-between;
					font-size: 18px;
					padding: 10px 20px;

					.nitem {
						width: 46%;

						.text {
							color: #929292;
						}
					}
				}

				.footer {
					display: flex;
					justify-content: space-between;
					height: 60px;
					line-height: 60px;
					font-size: 21px;
					background-color: #f7f9fa;
					color: #8d8f8f;

					.fitem {
						width: 50%;
						text-align: center;
					}

				}

			}

			.item:nth-child(2n) {
				margin-right: 0;
			}
		}
	}
</style>
