You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<!-- 企业端 -->
|
|
|
|
<div v-if="showCompanySection">
|
|
|
|
<!-- <div> -->
|
|
|
|
<qiyeduan />
|
|
|
|
</div>
|
|
|
|
<!-- 政务端 -->
|
|
|
|
<div v-if="checkRole(['common'])">
|
|
|
|
<zhengwuduan />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import qiyeduan from '@/views/components/qiyexinxi/qiyexinxi.vue'
|
|
|
|
import zhengwuduan from '@/views/components/zhengwuxinxi/zhengwuxinxi.vue'
|
|
|
|
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: { qiyeduan, zhengwuduan },
|
|
|
|
methods: {
|
|
|
|
checkPermi,
|
|
|
|
checkRole
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
showCompanySection() {
|
|
|
|
const isCompany = this.checkRole(['company']);
|
|
|
|
const isCommon = this.checkRole(['common']);
|
|
|
|
// 如果两个角色都存在,则隐藏企业端
|
|
|
|
return isCompany && !isCommon;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|