Commit ce679d226f6936f56a6d522a7fbe1239321baf41

Authored by ww
1 parent 6a7c38f6

fix: replace help doc icon && hidden workbench right help docs

1 <script lang="ts" setup> 1 <script lang="ts" setup>
2 - import { FileWordOutlined } from '@ant-design/icons-vue'; 2 + import { QuestionCircleOutlined } from '@ant-design/icons-vue';
3 import { Tooltip } from 'ant-design-vue'; 3 import { Tooltip } from 'ant-design-vue';
4 4
5 const handleJump = () => { 5 const handleJump = () => {
@@ -9,6 +9,6 @@ @@ -9,6 +9,6 @@
9 9
10 <template> 10 <template>
11 <Tooltip title="帮助文档"> 11 <Tooltip title="帮助文档">
12 - <FileWordOutlined class="text-base cursor-pointer" @click="handleJump" /> 12 + <QuestionCircleOutlined class="text-base cursor-pointer" @click="handleJump" />
13 </Tooltip> 13 </Tooltip>
14 </template> 14 </template>
1 <template> 1 <template>
2 <div class="p-4 md:flex"> 2 <div class="p-4 md:flex">
3 - <div class="md:w-7/10 w-full !mr-4 enter-y"> 3 + <div
  4 + class="md:w-7/10 w-full !mr-4 enter-y"
  5 + :class="role !== RoleEnum.SYS_ADMIN && '!md:w-full'"
  6 + >
4 <GrowCard :loading="loading" class="enter-y" :role="role" /> 7 <GrowCard :loading="loading" class="enter-y" :role="role" />
5 <SiteAnalysisMessage class="!my-4 enter-y" :loading="loading" :role="role" /> 8 <SiteAnalysisMessage class="!my-4 enter-y" :loading="loading" :role="role" />
6 <SiteAnalysis class="!my-4 enter-y" :loading="loading" :role="role" /> 9 <SiteAnalysis class="!my-4 enter-y" :loading="loading" :role="role" />
@@ -10,7 +13,7 @@ @@ -10,7 +13,7 @@
10 </Card> 13 </Card>
11 </div> 14 </div>
12 </div> 15 </div>
13 - <div class="md:w-3/10 w-full enter-y"> 16 + <div v-if="role === RoleEnum.SYS_ADMIN" class="md:w-3/10 w-full enter-y">
14 <Card 17 <Card
15 :style="{ width: '100%', height: !isAdmin(role) ? '100%' : '98.4%' }" 18 :style="{ width: '100%', height: !isAdmin(role) ? '100%' : '98.4%' }"
16 :title="!isAdmin(role) ? '帮助文档' : ''" 19 :title="!isAdmin(role) ? '帮助文档' : ''"
@@ -29,7 +32,7 @@ @@ -29,7 +32,7 @@
29 import HelpDoc from './components/HelpDoc.vue'; 32 import HelpDoc from './components/HelpDoc.vue';
30 import { USER_INFO_KEY } from '/@/enums/cacheEnum'; 33 import { USER_INFO_KEY } from '/@/enums/cacheEnum';
31 import { getAuthCache } from '/@/utils/auth'; 34 import { getAuthCache } from '/@/utils/auth';
32 - import { isAdmin } from '/@/enums/roleEnum'; 35 + import { isAdmin, RoleEnum } from '/@/enums/roleEnum';
33 36
34 defineExpose({ 37 defineExpose({
35 isAdmin, 38 isAdmin,
@@ -39,6 +42,8 @@ @@ -39,6 +42,8 @@
39 42
40 const role: string = userInfo?.roles[0]; 43 const role: string = userInfo?.roles[0];
41 44
  45 + console.log({ role });
  46 +
42 const loading = ref(true); 47 const loading = ref(true);
43 48
44 setTimeout(() => { 49 setTimeout(() => {