<template>
	<view>
		<view class="list">
			<view class="item" v-for="(item,index) in list" :key="index" @click="go_business(item.id,item.title)">
				<view class="icon">
					<image v-if="item.title == '办公品领用'" src="./icon/bangong.png" mode=""></image>
					<image v-if="item.title == '用印申请'" src="./icon/yongyin.png" mode=""></image>
					<image v-if="item.title == '请假'" src="./icon/qingjia.png" mode=""></image>
					<image v-if="item.title == '其他申请'" src="./icon/qita.png" mode=""></image>
				</view>
				<view class="text">{{item.title}}</view>
			</view>
			<!-- <view class="item" @click="go_business()">
				<view class="icon">
					<image src="./icon/yongyin.png" mode=""></image>
				</view>
				<view class="text">用印申请</view>
			</view>
			<view class="item" @click="go_business()">
				<view class="icon">
					<image src="./icon/qingjia.png" mode=""></image>
				</view>
				<view class="text">请假</view>
			</view>
			<view class="item" @click="go_business()">
				<view class="icon">
					<image src="./icon/qita.png" mode=""></image>
				</view>
				<view class="text">其他申请</view>
			</view> -->
		</view>
		
		<view class="content">
			<view class="title">
				<view class="icon">
					<image src="./icon/title_icon.png" mode=""></image>
				</view>
				<view class="text">国家能源集团枣泉煤矿</view>
			</view>
			<view class="box">
				<view class="item" @click="go_communication_origanization()">
					<view class="icon">
						<image src="./icon/jiagou.png" mode=""></image>
					</view>
					<view class="text">组织架构</view>
				</view>
				<view class="item" @click="go_my_department()">
					<view class="icon">
						<image src="./icon/bumen.png" mode=""></image>
					</view>
					<view class="text">我的部门</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"t-o-zaoquan",
		data() {
			return {
				list:[]
			};
		},
		created() {
			this.get_worksheet_classify_list()
		},
		methods:{
			// 获取分类
			get_worksheet_classify_list(){
				this.$api.worksheet_classify_list({
					
				}).then((res)=>{
					console.log(res.data.data)
					this.list = res.data.data
				})
			},
			// 工单列表
			go_business(id,title){
				uni.navigateTo({
					url:"../../workbench/business_classfication/business_classfication?id="+id+"&title="+title
				})
			},
			go_communication_origanization(){
				uni.navigateTo({
					url:"../../origanization/communication/origanization/origanization"
				})
			},
			go_my_department(){
				uni.navigateTo({
					url:"../../origanization/communication/origanization/my_department/my_department"
				})
			}
		}
	}
</script>

<style lang="scss">
	.list{
		background-color: #FFFFFF;
		margin-bottom: 20rpx;
		
		box-sizing: border-box;
		padding: 50rpx 25rpx;
		
		display: flex;
		align-items: center;
		justify-content: space-between;
		.item{
			width: 175rpx;
			text-align: center;
			.icon{
				image{
					width: 78rpx;
					height: 78rpx;
				}
			}
			.text{
				margin-top: 24rpx;
				font-size: 32rpx;
			}
		}
	}
	
	.content{
		background-color: #FFFFFF;
		.title{
			height: 110rpx;
			display: flex;
			align-items: center;
			
			box-sizing: border-box;
			padding: 0 36rpx;
			border-bottom: 1rpx solid #F3F8F7;
			.icon{
				image{
					width: 48rpx;
					height: 36rpx;
				}
			}
			.text{
				margin-left: 20rpx;
				font-size: 38rpx;
				font-weight: 700;
			}
		}
		.box{
			box-sizing: border-box;
			padding: 0 50rpx;
			.item{
				height: 110rpx;
				
				display: flex;
				align-items: center;
				
				border-bottom: 1rpx solid #F3F8F7;
				
				.icon{
					image{
						width: 36rpx;
						height: 36rpx;
					}
				}
				.text{
					margin-left: 20rpx;
					font-size: 32rpx;
				}
			}
		}
	}
</style>
