Bladeren bron

fix: 总部项目隐藏平台访问统计、人员访问数据等入口

louhangfei 1 jaar geleden
bovenliggende
commit
4107f084ee

+ 2 - 0
src/hooks/setting/index.ts

@@ -18,6 +18,7 @@ export const useGlobSetting = (): Readonly<GlobConfig> => {
     VITE_GLOB_TENANT_CODE,
     VITE_GLOB_QUESTION_LIST_VERSION,
     VITE_GLOB_DISABLE_DEPARTMENT_EDIT,
+    VITE_GLOB_HIDE_REPORT_MESSAGE_TABS,
   } = getAppEnvConfig();
 
   // Take global configuration
@@ -35,6 +36,7 @@ export const useGlobSetting = (): Readonly<GlobConfig> => {
     tenantCode: VITE_GLOB_TENANT_CODE,
     questionListVersion: VITE_GLOB_QUESTION_LIST_VERSION,
     disableDepartmentEdit: VITE_GLOB_DISABLE_DEPARTMENT_EDIT,
+    hideReportMessageTabs: VITE_GLOB_HIDE_REPORT_MESSAGE_TABS,
   };
   return glob as Readonly<GlobConfig>;
 };

+ 45 - 41
src/views/message/reportmessage/ReportMessage.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="report-message">
-    <div class="flex reportmessage-head-tabs">
+    <div class="flex reportmessage-head-tabs" v-if="!hideReportMessageTabs">
       <div
         class="flex justify-center items-center tab-item"
         :class="{ 'tab-item-active': type === item.value }"
@@ -14,52 +14,56 @@
     <Form />
   </div>
 </template>
-  
-  <script setup lang="ts">
-import Form from './components/Form.vue';
-import { typeName } from '@/views/message/constant';
-import { storeToRefs } from 'pinia';
-import useFormList from './store/useFormList';
-const formStore = useFormList();
-const { type } = storeToRefs(formStore);
-const switchTable = (value) => {
-  type.value = value;
-};
+
+<script setup lang="ts">
+  import Form from './components/Form.vue';
+  import { typeName } from '@/views/message/constant';
+  import { storeToRefs } from 'pinia';
+  import useFormList from './store/useFormList';
+  import { computed } from 'vue';
+  import { useGlobSetting } from '@/hooks/setting';
+  const formStore = useFormList();
+  const { type } = storeToRefs(formStore);
+  const switchTable = (value) => {
+    type.value = value;
+  };
+
+  const { hideReportMessageTabs } = useGlobSetting();
 </script>
-  
-  <style scoped lang="scss">
-.report-message {
-  height: calc(100vh - 64px - 18px);
-  background-color: rgba(255, 255, 255, 1);
-  padding: 21px;
-}
-.reportmessage-head {
-  height: 56px;
 
-  &-tabs {
-    margin: 18px 0;
+<style scoped lang="scss">
+  .report-message {
+    height: calc(100vh - 64px - 18px);
+    background-color: rgba(255, 255, 255, 1);
+    padding: 21px;
+  }
+  .reportmessage-head {
+    height: 56px;
+
+    &-tabs {
+      margin: 18px 0;
 
-    .tab-item {
-      width: 188px;
-      height: 38px;
-      background: #fafafa;
-      border: 1px solid #d9d9d9;
-      cursor: pointer;
+      .tab-item {
+        width: 188px;
+        height: 38px;
+        background: #fafafa;
+        border: 1px solid #d9d9d9;
+        cursor: pointer;
 
-      &-active {
-        color: rgba(22, 119, 255, 1);
-        background: #e2eefe;
-        border: 1px solid #1890ff;
+        &-active {
+          color: rgba(22, 119, 255, 1);
+          background: #e2eefe;
+          border: 1px solid #1890ff;
+        }
       }
-    }
 
-    :first-child {
-      border-radius: 8px 0px 0px 8px;
-    }
+      :first-child {
+        border-radius: 8px 0px 0px 8px;
+      }
 
-    :last-child {
-      border-radius: 0px 8px 8px 0px;
+      :last-child {
+        border-radius: 0px 8px 8px 0px;
+      }
     }
   }
-}
-</style>
+</style>

+ 4 - 0
types/config.d.ts

@@ -59,6 +59,7 @@ export interface GlobConfig {
   appPCUrl?: string;
   questionListVersion: string;
   disableDepartmentEdit?: boolean;
+  hideReportMessageTabs?: boolean;
 }
 
 export interface GlobEnvConfig {
@@ -89,6 +90,9 @@ export interface GlobEnvConfig {
 
   VITE_GLOB_QUESTION_LIST_VERSION: string;
   VITE_GLOB_DISABLE_DEPARTMENT_EDIT: boolean;
+
+  // 是否隐藏掉平台违规报警 平台访问统计和人员访问数据的tab, 默认不隐藏
+  VITE_GLOB_HIDE_REPORT_MESSAGE_TABS: boolean;
 }
 export interface GlobConfig {
   // 标题

+ 0 - 1
utils/devProxy/staff-shangfei/app.config.js

@@ -14,7 +14,6 @@ window.__PRODUCTION__SKYEYEADMIN__CONF__ = {
   "VITE_GLOB_APP_PC": "/skyeyev3pc/",
 
   "VITE_GLOB_QUESTION_LIST_VERSION": '',
-  
   // 为上飞定制的是否允许修改组织结构编辑,上飞不允许编辑,其他项目允许编辑
   "VITE_GLOB_DISABLE_DEPARTMENT_EDIT": true,
 

+ 4 - 1
utils/devProxy/staff-zongbu/app.config.js

@@ -13,7 +13,10 @@ window.__PRODUCTION__SKYEYEADMIN__CONF__ = {
   // 平台跳转地址
   "VITE_GLOB_APP_PC": "/skyeyev3pc-zongbu/",
 
-  'VITE_GLOB_QUESTION_LIST_VERSION': ''
+  'VITE_GLOB_QUESTION_LIST_VERSION': '',
+
+  VITE_GLOB_HIDE_REPORT_MESSAGE_TABS: true,
+
 
 };
 Object.freeze(window.__PRODUCTION__SKYEYEADMIN__CONF__);