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.

35 lines
846 B

4 months ago
<template>
<div>
3 months ago
<!-- 企业端 -->
3 months ago
<div v-if="showCompanySection">
<!-- <div> -->
3 months ago
<qiyeduan />
4 months ago
</div>
3 months ago
<!-- 政务端 -->
3 months ago
<div v-if="checkRole(['common'])">
3 months ago
<zhengwuduan />
4 months ago
</div>
</div>
</template>
<script>
3 months ago
import qiyeduan from '@/views/components/qiyexinxi/qiyexinxi.vue'
import zhengwuduan from '@/views/components/zhengwuxinxi/zhengwuxinxi.vue'
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
4 months ago
export default {
3 months ago
components: { qiyeduan, zhengwuduan },
4 months ago
methods: {
3 months ago
checkPermi,
checkRole
3 months ago
},
computed: {
showCompanySection() {
const isCompany = this.checkRole(['company']);
const isCommon = this.checkRole(['common']);
// 如果两个角色都存在,则隐藏企业端
return isCompany && !isCommon;
}
3 months ago
}
4 months ago
}
3 months ago
</script>