<template>
	<view>
		<view class="nav"></view>
		<view class="placeholder"></view>
		<view style="width: 100%; display: grid; place-items: center">
			<uni-title :title="dateDate + '：生产经营情况'" type="h1" color="blue" />
		</view>

		<trq-data></trq-data>
		<yy-data></yy-data>
	</view>
</template>

<script setup>
import { formatDate, getDateAfterDays } from '@/utils/dateTime.js';

import { ref, onMounted, computed, nextTick, watchEffect } from 'vue';

const res = wx.getSystemInfoSync();
const statusHeight = res.statusBarHeight; //状态栏高度
const cusnavbarheight = statusHeight + 44 + 'px';

const dateDate = ref('');

import trqData from './ribaoshuju/trqRbsj.vue';
import yyData from './ribaoshuju/yyRbsj.vue';

const strDate = () => {
	const now = new Date();
	if (now.getHours() < 11) {
		return formatDate(getDateAfterDays(now, -1)); //11点之前  头一天的数据
	} else {
		return formatDate(now);
	}
};
onMounted(() => {
	dateDate.value = strDate();
});
</script>

<style lang="scss" scoped>
.nav {
	width: calc(100% - 60rpx);
	padding: 0 30rpx;
	height: v-bind(cusnavbarheight);

	font-size: 24rpx;
	color: #ffffff;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 99;
	background-image: url('../../static/my/navbg.png');
	background-repeat: no-repeat;
	background-size: 750rpx 458rpx;
}

.placeholder {
	height: v-bind(cusnavbarheight);
}
</style>
