<template>
	<view>
		<view class="left">
			<block v-if="userInfo.type==2&&!userInfo.isStaff">
			<view @click="jumpUrl('/pages/index/index')" :class="'li dflex' + (currentTab == 'index' ? ' active' : '')">
				<image :src="'../../static/images/navico' + (currentTab == 'index' ? '0_h' : '0') + '.png'" class="navico"></image>
				首页
			</view>
			<view class="left-line"></view>
			<view class="left-tits">经营上报</view>
			<view @click="jumpUrl('/pages/route/route')" :class="'li dflex' + (currentTab == 'route' ? ' active' : '')">
				<image :src="'../../static/images/navico' + (currentTab == 'route' ? '1_h' : '1') + '.png'" class="navico"></image>
				旅游线路产品上报
			</view>
			<view @click="jumpUrl('/pages/business/business')" :class="'li dflex' + (currentTab == 'business' ? ' active' : '')">
				<image :src="'../../static/images/navico' + (currentTab == 'business' ? '2_h' : '2') + '.png'" class="navico"></image>
				经营信息上报
			</view>
			<view @click="jumpUrl('/pages/flow/flow')" :class="'li dflex' + (currentTab == 'flow' ? ' active' : '')">
				<image :src="'../../static/images/navico' + (currentTab == 'flow' ? '3_h' : '3') + '.png'" class="navico"></image>
				节假日客流上报
			</view>
			<view @click="jumpUrl('/pages/analysis/analysis')" :class="'li dflex' + (currentTab == 'analysis' ? ' active' : '')">
				<image :src="'../../static/images/navico' + (currentTab == 'analysis' ? '4_h' : '4') + '.png'" class="navico"></image>
				上报数据分析
			</view>
			<view class="left-line"></view>
			<view class="left-tits">人力资源</view>
			<view @click="jumpUrl('/pages/personal/personal')" :class="'li dflex' + (currentTab == 'personal' ? ' active' : '')">
				<image :src="'../../static/images/navico' + (currentTab == 'personal' ? '5_h' : '5') + '.png'" class="navico"></image>
				人员管理
			</view>
			<view @click="jumpUrl('/pages/personalDemand/personalDemand')" :class="'li dflex' + (currentTab == 'personal-demand' ? ' active' : '')">
				<image :src="'../../static/images/navico' + (currentTab == 'personal-demand' ? '6_h' : '6') + '.png'" class="navico"></image>
				需求发布
			</view>
			<view class="left-line"></view>
			<view class="left-tits">物资调配</view>
			<view @click="jumpUrl('/pages/materials/materials')" :class="'li dflex' + (currentTab == 'materials' ? ' active' : '')">
				<image :src="'../../static/images/navico' + (currentTab == 'materials' ? '7_h' : '7') + '.png'" class="navico"></image>
				物资管理
			</view>
			<view @click="jumpUrl('/pages/materialsDemand/materialsDemand')" :class="'li dflex' + (currentTab == 'materials-demand' ? ' active' : '')">
				<image :src="'../../static/images/navico' + (currentTab == 'materials-demand' ? '8_h' : '8') + '.png'" class="navico"></image>
				需求发布
			</view>
			<view class="left-line"></view>
			</block>
			<view class="left-tits">学习中心</view>
			<view @click="jumpUrl('/pages/learn/learn')" :class="'li dflex' + (currentTab == 'learn' ? ' active' : '')">
				<image :src="'../../static/images/navico' + (currentTab == 'learn' ? '9_h' : '9') + '.png'" class="navico"></image>
				听课学习
			</view>
			<view @click="jumpUrl('/pages/learnRecord/learnRecord')" :class="'li dflex' + (currentTab == 'learnRecord' ? ' active' : '')">
				<image :src="'../../static/images/navico' + (currentTab == 'learnRecord' ? '10_h' : '10') + '.png'" class="navico"></image>
				学习记录
			</view>
			<view @click="jumpUrl('/pages/exam/exam')" :class="'li dflex' + (currentTab == 'exam' ? ' active' : '')">
				<image :src="'../../static/images/navico' + (currentTab == 'exam' ? '11_h' : '11') + '.png'" class="navico"></image>
				正在考试
			</view>
			<view @click="jumpUrl('/pages/examRecord/examRecord')" :class="'li dflex' + (currentTab == 'examRecord' ? ' active' : '')">
				<image :src="'../../static/images/navico' + (currentTab == 'examRecord' ? '12_h' : '12') + '.png'" class="navico"></image>
				成绩查询
			</view>
			<block v-if="userInfo.type==2&&!userInfo.isStaff">
			<view class="left-line"></view>
			<view @click="jumpUrl('/pages/complaint/complaint')" :class="'lis' + (currentTab == 'complaint' ? ' active' : '')">投诉管理</view>

			<view @click="jumpUrl('/pages/award/award')" v-if="userInfo.categoryId == 'travel_agency'" :class="'lis' + (currentTab == 'award' ? ' active' : '')">
				招徕奖励
			</view>
			<view @click="jumpUrl('/pages/auditScenicRecord/auditScenicRecord')"
				v-if="userInfo.categoryId == 'scenic_spot'"
				:class="'lis' + (currentTab == 'auditScenicRecord' ? ' active' : '')"
			>
				招徕管理
			</view>
			<view @click="jumpUrl('/pages/auditHotelRecord/auditHotelRecord')"
				v-if="userInfo.categoryId == 'hotel'"
				:class="'lis' + (currentTab == 'auditHotelRecord' ? ' active' : '')"
			>
				招徕管理
			</view>
			<view @click="jumpUrl('/pages/declareHonor/declareHonor')" :class="'lis' + (currentTab == 'declare' ? ' active' : '')">资质申报</view>
			</block>
			<block>
			<view @click="jumpUrl('/pages/careerCentre/careerCentre')" :class="'lis' + (currentTab == 'career' ? ' active' : '')">人才交流</view>
			</block>
		</view>
	</view>
</template>
<script>
const app = getApp();
const req = require('../../utils/request.js');
const utils = require('../../utils/util.js');
export default {
	data() {
		return {
			userInfo: ''
		};
	},

	components: {},
	props: {
		currentTab: {
			type: String,
			default: 'index'
		}
	},
	watch: {},

	mounted() {
		this.userInfo = req.getStorage('userInfo');
	},

	methods: {
		jumpUrl(url){
			if(this.userInfo.type==1||this.userInfo.institutionState == 2){
				uni.navigateTo({
					url: url
				})
			}else{
				uni.navigateTo({
					url: '/pages/company/company'
				})
			}
		}
	}
};
</script>
<style>
@import '/static/css/main.css';
</style>
