<template>
	<view class="main-block">
		<view class="page-block">
			<view class="btn-list">
				<block v-for="(item,index) in power_list" :key='index'>
					<navigator 
					:url="item.address" class="item flex flex-col flex-center">
						<image :src="item.image" class="icon-img" mode="aspectFit"></image>
						<view class="name">{{item.name}}</view>
					</navigator>

					<navigator v-if="item.id==256||item.name=='门店设置'" :url="`./mandatory?store_id=${store_id}`"
						class="item flex flex-col flex-center">
						<image src="./static/images/icon_8.png" class="icon-img" mode="aspectFit"></image>
						<view class="name">必选商品设置</view>
					</navigator>
			    </block> 
		<!-- 		<navigator url="./storeSetup" class="item flex flex-col flex-center">
					<image src="./static/images/icon_1.png" class="icon-img" mode="aspectFit"></image>
					<view class="name">门店设置</view>
				</navigator> -->

<!-- 				<navigator url="./distriBution" class="item flex flex-col flex-center">
					<image src="./static/images/ps.png" class="icon-img" mode="aspectFit"></image>
					<view class="name">聚合配送</view>
				</navigator>

				<navigator url="./distriRule" class="item flex flex-col flex-center">
					<image src="./static/images/icon_2.png" class="icon-img" mode="aspectFit"></image>
					<view class="name">配送规则</view>
				</navigator>
				
				<navigator :url="`./bannerList?store_id=${store_id}`"
					class="item flex flex-col flex-center">
					<image src="./static/images/icon_3.png" class="icon-img" mode="aspectFit"></image>
					<view class="name">广告设置</view>
				</navigator>
				
				<navigator :url="`./staff?store_id=${store_id}&type=2`"
					class="item flex flex-col flex-center">
					<image src="./static/images/icon_4.png" class="icon-img" mode="aspectFit"></image>
					<view class="name">员工管理</view>
				</navigator>
				
				<navigator :url="`./handover?store_id=${store_id}`"
					class="item flex flex-col flex-center">
					<image src="./static/images/icon_5.png" class="icon-img" mode="aspectFit"></image>
					<view class="name">交班记录</view>
				</navigator>
				
				<navigator :url="`./BusinessHours?store_id=${store_id}`"
					class="item flex flex-col flex-center">
					<image src="./static/images/icon_15.png" class="icon-img" mode="aspectFit"></image>
					<view class="name">营业时间</view>
				</navigator>
				
				<navigator :url="`/saomaDiancan/lineUp/index?store_id=${store_id}`"
					class="item flex flex-col flex-center">
					<image src="./static/images/icon_14.png" class="icon-img" mode="aspectFit"></image>
					<view class="name">排队取号</view>
				</navigator>
	
				<navigator :url="`/saomaDiancan/tableList/tableList?store_id=${store_id}&name=${info.set.table_manager}`"
					class="item flex flex-col flex-center">
					<image src="./static/images/icon_8.png" class="icon-img" mode="aspectFit"></image>
					<view class="name">{{info.set.table_manager ||'餐桌管理'}}</view>
				</navigator>
				
				<navigator :url="`/saomaDiancan/tableTypeList/tableTypeList?store_id=${store_id}&name=${info.set.table_type}`"
					class="item flex flex-col flex-center">
					<image src="./static/images/icon_9.png" class="icon-img" mode="aspectFit"></image>
					<view class="name">{{info.set.table_type || '餐桌类型'}}</view>
				</navigator> -->
				
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				store_id: "",
				power_list:[]
			}
		},
		onLoad(e) {
			let { list } = this.$store.state.management_list.find((v, i) => v.id == e.id)
			this.power_list = list
			// console.log(this.power_list ,"this.power_list")
			this.store_id = uni.getStorageSync("store_id");
		},
	}
</script>

<style>
	
	.main-block {
		padding: 50rpx 25rpx 0;
	}
	
	.btn-list {
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-orient: horizontal;
		-webkit-box-direction: normal;
		-webkit-flex-flow: row wrap;
		flex-flow: row wrap;
		-webkit-box-pack: start;
		-webkit-justify-content: flex-start;
		justify-content: flex-start;
		-webkit-align-content: flex-start;
		align-content: flex-start;
	}
	
	.page-block {
		width: 700rpx;
		background-color: #fff;
		box-sizing: border-box;
		border-radius: 8rpx;
		margin-bottom: 30rpx;
	
	}
	
	.btn-list .item {
		width: 33.33%;
		height: 145rpx;
	}
	
	.btn-list .item .icon-img {
		display: block;
		width: 48rpx;
		height: 48rpx;
	}
	
	.btn-list .item .name {
		font-size: 24rpx;
		line-height: 33rpx;
		margin-top: 16rpx;
		color: #666;
	}
</style>
