<route lang="json5" type="page">
	{
	layout: 'default',
	style: {
	navigationStyle: 'custom',
	navigationBarTitleText: '健康随访详情',
	},
	}
</route>
<template>
	<PageLayout navTitle="健康随访详情">
		<wd-cell-group v-for="(item, i) in info" :key="i" border>
			<wd-cell title="填报内容:" :value="item.tbnr" />
			<wd-cell title="是否:" :value="item.sf" />
		</wd-cell-group>
	</PageLayout>
</template>

<script setup>
	import {
		useMessage,
		useToast
	} from 'wot-design-uni'

	import {
		followpersonList,
		addhealthList,
		queryByIdApi
	} from '@/api/healthfollow/healthfllow'
	import {
		imgUrl
	} from '@/utils/index'
	import {
		useUserStore
	} from '@/store/user'

	const message = useMessage()
	const toast = useToast()
	const userStore = useUserStore();
	const info = ref({})
	const path = ref([])
	const image = ref([])
	const resumptiontime = ref(0)
	const minDate = ref(0)
	const queryById = (e) => {
		console.log("3334eeeeeeeeeee--", e)
		queryByIdApi(e).then((res) => {
			
			if (res.success) {
				info.value = res.result.records
				console.log("res---", res.result.records)
			}
		})
	}

	// 处理数据排序（按sort字段升序）
	const sortedInfo = computed(() => {
		if (info.value && info.value.records) {
			return [...info.value.records].sort((a, b) => {
				return parseInt(a.sort) - parseInt(b.sort)
			})
		}
		return []
	})


	onLoad((options) => {
		console.log("options---传进来的id--", options)
		queryById(options.id)
	})
</script>

<style lang="scss" scoped>
	.footer {
		padding: 12px;
	}
</style>