Forráskód Böngészése

feat: 只展示system settings页面中personal profile部分

zhouyuhao 9 hónapja
szülő
commit
f4aee60b66

+ 0 - 1
src/utils/tools.ts

@@ -36,7 +36,6 @@ export const formatTimezoneByUTCorGMT = (time: string, timezone: string) => {
   let formattedTime = ''
   formattedTime = moment(time).format('MMM-DD-YYYY hh:mm A')
   let gmtOffset = ''
-  console.log(timezone, formattedTime)
   if (timezone != null) {
     const timeZoneOffset = moment().tz(timezone).format('Z')
     // 替换 "+07:00" 为 "GMT+07"

+ 2 - 7
src/views/Layout/src/components/Header/HeaderView.vue

@@ -200,12 +200,7 @@ const notificationDrawer = ref(false)
           <span style="margin-top: -1px" class="font_family icon-icon_search_b"></span>
         </template>
       </el-input>
-      <div class="notice-icon" v-if="userStore.userInfo?.uname">
-        <!-- <span
-          @click="notificationDrawer = true"
-          class="font_family icon-icon_notice_b"
-          style="font-size: 18px"
-        ></span> -->
+      <!-- <div class="notice-icon" v-if="userStore.userInfo?.uname">
         <span class="unread-tip-icon"></span>
         <el-button
           style="height: 40px; width: 40px; margin-right: 0px"
@@ -214,7 +209,7 @@ const notificationDrawer = ref(false)
         >
           <span class="font_family icon-icon_notice_b" style="font-size: 18px"></span>
         </el-button>
-      </div>
+      </div> -->
       <!-- 
       <span class="font_family icon-icon_language_b" style="font-size: 16px"></span> -->
       <el-popover

+ 0 - 1
src/views/Layout/src/components/Header/components/NotificationDrawer.vue

@@ -91,7 +91,6 @@ const getNotificationList = () => {
     .then((res) => {
       if (res.code === 200) {
         notificationList.value = res.data
-        console.log(res, 'test')
       }
     })
     .finally(() => {

+ 15 - 4
src/views/Layout/src/components/Menu/MenuView.vue

@@ -30,19 +30,19 @@ const getMenuList = () => {
   //     path: '/dashboard'
   //   },
   //   {
-  //     index: 2,
+  //     index: '2',
   //     label: 'Booking',
   //     icon: 'icon_booking__fill_b',
   //     path: '/booking'
   //   },
   //   {
-  //     index: 3,
+  //     index: '3',
   //     label: 'Tracking',
   //     icon: 'icon_tracking__fill_b',
   //     path: '/tracking'
   //   },
   //   {
-  //     index: 4,
+  //     index: '4',
   //     label: 'System Management',
   //     icon: 'icon_system__management_fill_b',
   //     type: 'list',
@@ -82,6 +82,15 @@ handler()
 
 const activeMenu = ref()
 activeMenu.value = (route.meta?.activeMenu as string) || route.path
+// 默认展开的菜单
+const openeds = computed(() => {
+  if (!activeMenu.value) return []
+  const parentItem = menuList.value?.find((item: any) =>
+    item.children?.some((child: any) => child.path === activeMenu.value)
+  )
+  console.log(parentItem, 'item')
+  return parentItem ? [parentItem.index] : []
+})
 
 // 未登录白名单
 const whiteList = ['/login', '/public-tracking', '/public-tracking/detail', '/reset-password']
@@ -170,6 +179,8 @@ const jumpLink = (link: string) => {
       class="layout-menu"
       @select="changeRouter"
       :default-active="activeMenu"
+      :default-openeds="openeds"
+      :unique-opened="true"
       :collapse="isCollapse"
     >
       <template v-for="item in menuList" :key="item.index">
@@ -183,7 +194,7 @@ const jumpLink = (link: string) => {
           <span class="font_family" :class="[`icon-${item.icon}`]"></span>
           <template #title>{{ item.label }}</template>
         </el-menu-item>
-        <el-sub-menu v-else :index="item.path">
+        <el-sub-menu v-else :index="item.index">
           <template #title>
             <div class="font_family" style="font-size: 16px" :class="[`icon-${item.icon}`]"></div>
             <span>{{ item.label }}</span>

+ 1 - 1
src/views/SystemMessage/src/components/SystemMessageDetail.vue

@@ -39,7 +39,7 @@ const notificationData: any = {
 const getNotificationList = () => {
   $api.getNotificationDetails().then((res) => {
     if (res.code === 200) {
-      console.log(res, 'test')
+      // console.log(res, 'test')
     }
   })
 }

+ 2 - 2
src/views/SystemSettings/src/SystemSettings.vue

@@ -214,7 +214,7 @@ onMounted(() => {
   <div class="Title">System Settings</div>
   <el-tabs v-model="TabActive" class="demo-tabs">
     <el-tab-pane label="Personal Profile" name="Personal Profile"><PersonalProfile /></el-tab-pane>
-    <el-tab-pane label="Subscribe Notifications" name="Subscribe Notifications">
+    <!-- <el-tab-pane label="Subscribe Notifications" name="Subscribe Notifications">
       <div class="subscribedTitle">Notification Events for Subscribed Shipments</div>
       <div class="SubscribeCollapse">
         <el-collapse v-model="CollapseActive" accordion @change="changeCollapse">
@@ -325,7 +325,7 @@ onMounted(() => {
         >
       </div>
       <MonitoringTable @gettabledatalength="gettabledatalength"></MonitoringTable>
-    </el-tab-pane>
+    </el-tab-pane> -->
   </el-tabs>
 </template>
 

+ 1 - 4
src/views/SystemSettings/src/components/PersonalProfile.vue

@@ -82,7 +82,6 @@ const initNumbersFormat = () => {
 const numbersFormat = ref(initNumbersFormat())
 
 const saveConfig = (model: string) => {
-  console.log(123123)
   let params = {}
   if (model === 'profile') {
     params = {
@@ -97,9 +96,7 @@ const saveConfig = (model: string) => {
       numbers_format: numbersFormat.value
     }
   }
-  console.log(params, 'value')
   $api.saveUserInfo(params).then((res: any) => {
-    console.log(res, 'res')
     if (res.code === 200) {
       const updatedInfo =
         model === 'profile'
@@ -231,7 +228,7 @@ const saveConfig = (model: string) => {
                   style="padding: 0 40px"
                   class="el-button--dark save-icon"
                   size="large"
-                  >Save1222</el-button
+                  >Save</el-button
                 >
               </el-col>
             </el-row>