<template>
	<view class="content">
		<pondCard :id='pond_id'></pondCard>
		<view class="histroy">
			<view class="tit" style="margin-bottom: 40rpx;">
				历史操作记录
			</view>
			<myTable :dataList='dataList'></myTable>
		</view>
	</view>
</template>

<script setup>
	import pondCard from "@/components/aquatic/pondCard.vue"
	import {
		ref,
		reactive
	} from "vue"
	import myTable from "@/components/myTable/index.vue"
	import {

		actionsAPI
	} from "@/api/animal.js"
	import {
		onLoad
	} from "@dcloudio/uni-app"
	const dataList = reactive({})
	const pond_id = ref('')
	onLoad((option) => {
		pond_id.value = option.pond_id
		actionsAPI({
			type: 4,
			pond_id: pond_id.value
		}).then(res => {
			for (let key in res.data[option.index].action_record) {
				dataList[key] = res.data[option.index].action_record[key]
			}
		})
	})

	const navgo = (url) => {
		uni.navigateTo({
			url
		})
	}
</script>

<style lang="scss" scoped>
	.circumstance {
		width: 693.93rpx;
		margin: 0 auto;
		margin-bottom: 43rpx;

		.card-tit {
			display: flex;
			justify-content: space-between;
			margin-bottom: 28rpx;
		}

		.updata-btn {
			font-size: 26.29rpx;
			// width: 192.76rpx;
			padding: 0 30rpx;
			height: 57.83rpx;
			border: 1px solid #00A15E;
			color: #00A15E;
			display: flex;
			justify-content: center;
			align-items: center;
			border-radius: 31.54rpx 31.54rpx 31.54rpx 31.54rpx;
		}

		.check {
			font-size: 29.79rpx;
			text-align: center;
			display: flex;
			justify-content: center;
			align-items: center;
		}

		.tab {

			height: 500rpx;
			background-color: red;
		}
	}
</style>