<template>
		<Dtask v-if="shenfen=='battalion'&&!isSupervisor"></Dtask>
		<Ztask v-else-if="shenfen=='brigade'"></Ztask>
		<Jtask v-else></Jtask>

</template>

<script>
	import Dtask from "@/pages/dadui/jiancha/jiancha.vue"
	import Jtask from "@/pages/dadui/jiuyuan/jiuyuan.vue"
	import Ztask from '@/pages/zhidui/assign/assign.vue'
	export default {
		components: {
			Dtask,
			Jtask,
			Ztask
		},
		data() {
			return {
				shenfen: "",
				isSupervisor: false
			}
		},
		onLoad() {
			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>
