<template>
		<view class="">
			<view class="">
				<Dtask v-if="shenfen=='battalion'&&!isSupervisor"></Dtask>
			</view>
			<view class="">
				<Ztask v-if="shenfen=='brigade'"></Ztask>
			</view>
			<view class="">
				<Jtask v-if="shenfen=='squadron'||isSupervisor"></Jtask>
			</view>
		</view>

</template>

<script>
	import Dtask from "@/pages/dadui/jiancha/jiancha.vue"
	import Jtask from "@/pages/rescue/taskapply.vue"
	import Ztask from '@/pages/zhidui/assign/assign.vue'
	export default {
		components: {
			Dtask,
			Jtask,
			Ztask
		},
		data() {
			return {
				shenfen: "",
				isSupervisor: false
			}
		},
		onShow() {
			let roles = uni.getStorageSync("user").roles
			let isSupervisor = roles.find(item => {
				return item.name.indexOf('检查') != -1
			})
			isSupervisor ? this.isSupervisor = true : this.isSupervisor = false
			this.shenfen = uni.getStorageSync("user").organizationLevel

		},
		onReady() {

		},
		methods: {}
	}
</script>

<style lang="scss">
	
</style>
