<template>
	<view class="wrapper">
		 <CustomNavbar title="" :showLeft="false">
			 <image class="langImg" style="width:55rpx; height: 44rpx;" src="../../static/image/home/change.png" mode="" ></image>
		</CustomNavbar>
		<view class="body-wrapper">
			<view class="logo-wrapper">
				<image class="logoImg" src="/static/image/home/logo.png" alt="" />
				<h3>露天炮孔验收仪</h3>
			</view>
			<p class="list-item">
				<image src="/static/image/home/icon1.png" alt="" />
				<span>登录</span>
				<button size="mini" class="funcBtn" type="primary" @click="navTo('login')">登录</button>
			</p>
			<p class="list-item">
				<image src="/static/image/home/icon1.png" alt="" />
				<span>入出date</span>
				<button size="mini" class="funcBtn" type="primary" @click="navTo('import')">导入导出</button>
			</p>
			<p class="list-item">
				<image src="/static/image/home/icon2.png" alt="" />
				<span>连接中深孔验收仪</span>
				<button size="mini" class="funcBtn" type="primary" @click="navTo('link')">连接</button>
			</p>
			<p class="list-item">
				<image src="/static/image/home/icon3.png" alt="" />
				<span>设备测试</span>
				<button size="mini" class="funcBtn" type="primary" @click="navTo('measureTest')">测量</button>
			</p>
			<p class="list-item">  
				<image src="/static/image/home/icon4.png" alt="" />
				<span>炮孔测量</span>
				<button size="mini" class="funcBtn" type="primary" @click="navTo('measure')">测量</button>
			</p>
			<p class="list-item">
				<image src="/static/image/home/icon1.png" alt="" />
				<span>钻孔测量数据列表</span>
				<button size="mini" class="funcBtn" type="primary" @click="navTo('export')">导出</button>
			</p>
			<p class="list-item">
				<image src="/static/image/home/5.png" alt="" />
				<span>导入数据预览</span>
				<button size="mini" class="funcBtn" type="primary" @click="navTo('importFileDataPreview')">进入</button>
			</p>
			<p class="list-item">
				<image src="/static/image/home/5.png" alt="" />
				<span>炮孔测量</span>
				<button size="mini" class="funcBtn" type="primary" @click="navTo('paokongceliang')">进入</button>
			</p>
			<view class="footer">
				<span>
					威海晶合数字矿山技术有限公司
				</span>
			</view>
		</view>
		
	</view>
</template>

<script>
	import CustomNavbar from '@/pages/component/CustomNavbar.vue';
    import {formatNumber,formatDateThis,getUnixTime} from "../../common/dateUtil.js"
	import {showCustomModal, showCustomToast} from "../../common/util.js"
	export default {
		onBackPress(options) {
			// showCustomToast({
			// 	title: '当前页为最后一页，不能继续返回了'
			// })
			// return true
		},
		components: {
		    CustomNavbar,
		  },
		data() {
			return {
				
			}
		},
		onShow() {
			uni.hideLoading()
		}, 
		mounted() {
			uni.hideTabBar()
		},
		methods: {
			navTo(flag){
				if(flag === 'export'){
					this.exportData2Excel()
					return
				}
				let url = ''
				if(flag === 'login'){
					// url = 'test'
					url = '/pages/user/login'
				}else if(flag === 'import'){
					url = '/pages/home/importFile'
				}else if(flag === 'measureTest'){
					url = '/pages/home/blueTest'
				}else if(flag === 'measure'){
					url = '/pages/home/blueMeasure'
				}else if(flag === 'link'){
					url = '/pages/home/blueSearch'
				}else if(flag === 'importFileDataPreview'){
					url = '/pages/home/importFileDataPreview'
				}else if(flag === 'paokongceliang'){
					url = '/pages/home/paokongceliang'
				}
				
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>
<style lang="scss">
.wrapper{
	width: 100vw;
	height: calc(100vh-44rpx);
	padding-top: 44rpx;
	background: linear-gradient(180deg, #007AFF 0%, #419AFF 16%, #EFF1F4 43%);
	position: relative;
	.footer{
		// position: absolute;
		// bottom: 10rpx;
		width: 100%;
		// padding-top: 200rpx;
		// height: 10rpx;
		// height: 120rpx;
		// line-height: 120rpx;
		text-align: center;
		span{
			font-weight: 400;
			font-size: 27rpx;
			color: #A0A7AE;
		}
	}
}
.body-wrapper{
	display: flex;
	justify-content: center;
	flex-direction: column;
	align-items: center;
	gap: 20rpx;
	background-color: linear-gradient(180deg, #007AFF 0%, #419AFF 16%, #EFF1F4 43%);;
}
.logo-wrapper{
	position: relative;
	height: 300rpx;
	display: flex;
	justify-content: center;
	flex-direction: column;
	align-items: center;
	gap: 50rpx;
	font-family: Source Han Sans SC;
	.logoImg{
		width: 454rpx;
		height: 98rpx;
	}
	h3{
		color: #ffffff;
		font-size: 37rpx;
	}
}
.list-item{
	width: 660rpx;
	height: 140rpx;
	// border-top: 1px solid rgba(187,187,187,1);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0px 30px;
	padding: 10px;
	background-color: #ffffff;
	border-radius: 10rpx;
	image{
		width: 102rpx;
		height: 102rpx;
	}
	span{
		display: inline-block;
		width: 320rpx;
		font-family: PingFangSC-regular;
		color: rgba(0,0,0,1);
		font-size: 18px;
		font-weight: bold;
	}
	.funcBtn{
		width: 120rpx;
		height: 62rpx;
		line-height: 62rpx;
		background: #FFFFFF;
		border-radius: 36rpx;
		border: 2rpx solid #007AFF;
		color: #007AFF;
		padding: 0;
		// font-size: 27rp;
		font-family: Source Han Sans SC;
		font-weight: bold;
		
	}
}
</style>
