<template>
	<view class="notice">
		<view class="container">
			<ul>
				<li v-for="(item,index) in infoList" :key="index" @click="add('look')">
					<view class="title">航次：{{item.val1}}</view>
					<p>状态：{{item.val2}}</p>
					<p>进出口：{{item.val3}}</p>
					<p>贸易类型：{{item.val4}}</p>
					<p>作业日期：{{item.val5}}</p>
				</li>
			</ul>
			<view class="addBtn" @click="add('add')">+ 新增</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				infoList: [{
					val1: "CK124324",
					val2: "待上传",
					val3: "进口",
					val4: "内贸",
					val5: "05/30",
				}, {
					val1: "CK124324",
					val2: "待上传",
					val3: "进口",
					val4: "内贸",
					val5: "05/30",
				}, {
					val1: "CK124324",
					val2: "待上传",
					val3: "进口",
					val4: "内贸",
					val5: "05/30",
				}]
			}
		},
		methods: {
			add(state) {
				const obj = {
					state: state,
				}
				const params = encodeURIComponent(JSON.stringify(obj));
				uni.navigateTo({
					url: `/pages/shipWork/noticeAdd?params=${params}`
				})
			},
		}
	}
</script>

<style lang="less" scoped>
	.notice {
		.container {
			padding: 30px 20px;

			ul {
				padding: 20px 0;

				li {
					display: flex;
					justify-content: space-between;
					border-bottom: 1px solid #ccc;
					padding: 20px;

					.title {
						font-size: 16px;
						font-weight: bold;
						display: flex;
						flex-direction: column;
						justify-content: center;
					}

					.shift {
						p {
							font-size: 16px;
						}
					}

					.state {
						display: flex;
						flex-direction: column;
						justify-content: center;
					}
				}
			}

			.addBtn {
				position: fixed;
				right: 50px;
				bottom: 50px;
				width: 100px;
				height: 100px;
				border-radius: 50%;
				background-color: #2979ff;
				color: #fff;
				font-size: 24px;
				text-align: center;
				line-height: 100px;
				font-weight: bold;
			}
		}
	}
</style>