<template>
	<view class="content">
		<view class="header">
			<view class="header-item">
				<text class="header-user">登录人员：{{userName}}</text>
			</view>
			<view class="header-item header-r">
				<button class="header-button" @click="toExit">退&nbsp;&nbsp;出</button>
			</view>
		</view>
		<view class="nav-wrapper">
			<view class="nav-wrap">
				<view class="nav-item">
					<text class="nav-text" @click="toJump('/pages/management/inscanerror')">入箱扫码异常</text>
				</view>
				<view class="nav-item">
					<text class="nav-text" @click="toJump('/pages/management/outscanerror')">出箱扫码异常</text>
				</view>
				<view class="nav-item">
					<text class="nav-text" @click="toJump('/pages/management/hcxcheck')">缓存线盘点</text>
				</view>
				<view class="nav-item">
					<text class="nav-text" @click="toJump('/pages/management/agvinerror')">AGV入箱异常</text>
				</view>
				<view class="nav-item">
					<text class="nav-text" @click="toJump('/pages/management/AgvOutError')">AGV出箱异常</text>
				</view>
				<view class="nav-item">
					<text class="nav-text" @click="toJump('/pages/management/HcxOutError')">缓存线出箱异常</text>
				</view>
				<view class="nav-item">
					<text class="nav-text" @click="toJump('/pages/management/ZlOperate')">指令操作</text>
				</view>
				<view class="nav-item">
					<text class="nav-text" @click="toJump('/pages/management/HcxErrorHandle')">缓存线异常处理</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userName: this.$store.getters.userInfo ? JSON.parse(this.$store.getters.userInfo).id : ''
			}
		},
		onLoad() {

		},
		methods: {
			toJump(path) {
				uni.navigateTo({
					url: path
				});
			},
			toExit () {
				this.$store.dispatch('delUserInfo', '')
				uni.redirectTo({
					url: '/pages/login/login'
				})
			}
		}
	}
</script>

<style lang="stylus" scoped>
@import '../../common/style/mixin.styl';
.content
	_fj()
	_wh(100%, 100%)
	flex-direction column
.header
	_fj()
	_wh(100%,42px)
	background-color $red
.header-item
	width calc(50% - 30px)
	padding 0 10px
.header-user
	_font(16px, 42px, #fff,,)
.header-r
	_fj(flex-end)
/deep/ .header-r uni-button
	margin-right 0
.header-button
	_wh(auto, 34px)
	_font(16px,34px,#333,,)
.nav-wrapper
	_wh(calc(100% - 15px),calc(100% - 72px))
	padding 0 20%
	background-color #fff
	border-radius 12px
	margin 15px auto
.nav-wrap
	_fj(flex-start)
	align-content center
	flex-wrap wrap
	_wh(100%, 100%)
.nav-item
	_fj(center)
	align-items center
	_wh(30%,82px)
	border-radius 12px
	border 10px solid #acbec6
	margin 15px 5% 15px 0
.nav-item:nth-child(3n)
	margin-right 0
.nav-text
	_font(18px, 42px, #333,,)
	letter-spacing: 2px
</style>
