<template>
	<view class="app">
		<head-info></head-info>
		<view class="container">
			<side-bar path='1'></side-bar>
			<view class="content">
				<view class="form">
					<view class="end">
						<superwei-combox :candidates="candidates_json" :isJSON="true" keyName="name"
							placeholder="请选择或输入" v-model="inputValue_json" @input="input_json"
							@select="select_json"></superwei-combox>

						<uni-easyinput class="input" suffixIcon="search" v-model="value1" placeholder="港区"
							@iconClick="iconClick">
						</uni-easyinput>
						<uni-easyinput class="input" suffixIcon="search" v-model="value2" placeholder="船名/航次"
							@iconClick="iconClick">
						</uni-easyinput>
					</view>
				</view>
				<view class="itemList">
					<view v-for="(item, index) in ltemList" :key="index" class="item" @click="toDetails">
						<view class="title">
							<view class="name">
								海王星领袖
							</view>
							<view class="status">
								<text v-if="item==1" class="green">● 作业中</text>
								<text v-else>● 已完成</text>
							</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>进口</text>
								</view>
								<view class="nitem">
									泊位: <text>一泊位</text>
								</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 {
				value1: '',
				value2: '',
				ltemList: [1, 1, 1, 1, 2, 1, 1, 1, 1],
				inputValue_json: '',
				candidates_json: [{
					id: '1',
					name: '选项一'
				}, {
					id: '2',
					name: '选项二',
					disabled: true // 单独设置disabled后即可禁用该选项
				}, {
					id: '3',
					name: '选项三'
				}, {
					id: '4',
					name: '选项四'
				}, {
					id: '5',
					name: '选项五',
					disabled: true // 单独设置disabled后即可禁用该选项
				}, {
					id: '6',
					name: '...'
				}]

			}
		},
		onLoad() {

		},
		components: {
			SideBar,
			HeadInfo
		},
		methods: {
			toDetails() {
				uni.navigateTo({
					url: '/pages/index/instruct'
				})
			},
			input_json() {},
			select_json() {},
		}
	};
</script>

<style>
	.container {
		display: flex;
	}

	.content {
		flex: 1;
		padding: 20px;

		.form {
			display: flex;
			justify-content: flex-end;

			.end {
				width: 500px;
				display: flex;
				justify-content: space-between;

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

		}

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

			.item {
				width: 32%;
				margin-top: 15px;
				margin-right: 2%;
				height: 160px;
				border: 1px solid #c9cacb;
				padding: 22px 15px;

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

				.status {
					font-size: 16px;
					font-weight: 400;
				}


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

					.nitem {
						width: 46%;

						text {
							color: #929292;
						}
					}

				}
			}

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