瀏覽代碼

feat: 实现用户指南功能

zhouyuhao 11 月之前
父節點
當前提交
9ada87c54e

+ 2 - 1
src/auto-imports.d.ts

@@ -3,6 +3,7 @@
 // @ts-nocheck
 // noinspection JSUnusedGlobalSymbols
 // Generated by unplugin-auto-import
+// biome-ignore lint: disable
 export {}
 declare global {
   const $api: typeof import('@/api/index')['default']
@@ -68,6 +69,6 @@ declare global {
 // for type re-export
 declare global {
   // @ts-ignore
-  export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
+  export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
   import('vue')
 }

+ 229 - 13
src/styles/icons/iconfont.css

@@ -1,9 +1,9 @@
 @font-face {
   font-family: "font_family"; /* Project id 4672385 */
-  src: url('iconfont.woff2?t=1729653017918') format('woff2'),
-       url('iconfont.woff?t=1729653017918') format('woff'),
-       url('iconfont.ttf?t=1729653017918') format('truetype'),
-       url('iconfont.svg?t=1729653017918#font_family') format('svg');
+  src: url('iconfont.woff2?t=1733995908700') format('woff2'),
+       url('iconfont.woff?t=1733995908700') format('woff'),
+       url('iconfont.ttf?t=1733995908700') format('truetype'),
+       url('iconfont.svg?t=1733995908700#font_family') format('svg');
 }
 
 .font_family {
@@ -14,11 +14,235 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-icon_arrow_b:before {
+  content: "\e6fb";
+}
+
+.icon-icon_dark_b1:before {
+  content: "\e6f9";
+}
+
+.icon-icon_manual_b:before {
+  content: "\e6fa";
+}
+
+.icon-a-KLNLogo-Orange:before {
+  content: "\e6f8";
+}
+
+.icon-icon_themes_b:before {
+  content: "\e6f5";
+}
+
+.icon-icon_light_b:before {
+  content: "\e6f6";
+}
+
+.icon-icon_dark_b:before {
+  content: "\e6f7";
+}
+
+.icon-icon_list_b:before {
+  content: "\e6f4";
+}
+
+.icon-icon_tracking__line_b:before {
+  content: "\e6f1";
+}
+
+.icon-icon_form_b:before {
+  content: "\e6f2";
+}
+
+.icon-icon_filters_b:before {
+  content: "\e6f3";
+}
+
+.icon-icon_submit_b:before {
+  content: "\e6f0";
+}
+
+.icon-icon_previous_b:before {
+  content: "\e6ee";
+}
+
+.icon-icon_next_b:before {
+  content: "\e6ef";
+}
+
+.icon-icon_view_b:before {
+  content: "\e6ed";
+}
+
+.icon-icon_index_b:before {
+  content: "\e6eb";
+}
+
+.icon-icon_preference_b:before {
+  content: "\e6ec";
+}
+
+.icon-icon_container__load_plan_b:before {
+  content: "\e6e9";
+}
+
+.icon-icon_company_b1:before {
+  content: "\e6ea";
+}
+
+.icon-icon_my_shipment_b:before {
+  content: "\e6d7";
+}
+
+.icon-icon_air_booking_b:before {
+  content: "\e6d8";
+}
+
+.icon-icon_data_insight_b:before {
+  content: "\e6d9";
+}
+
+.icon-icon_exception__maintenace_b:before {
+  content: "\e6da";
+}
+
+.icon-icon_destination__delivery_b:before {
+  content: "\e6db";
+}
+
+.icon-icon_my_cargo_b:before {
+  content: "\e6dc";
+}
+
+.icon-icon_po__confirmation_b:before {
+  content: "\e6dd";
+}
+
+.icon-icon_my_po_b:before {
+  content: "\e6de";
+}
+
+.icon-icon_my_booking_b:before {
+  content: "\e6df";
+}
+
+.icon-icon_my__shipment_b:before {
+  content: "\e6e0";
+}
+
+.icon-icon_document__maintenance_b:before {
+  content: "\e6e1";
+}
+
+.icon-icon_po_cancel_b:before {
+  content: "\e6e2";
+}
+
+.icon-icon_dashboard_b:before {
+  content: "\e6e3";
+}
+
+.icon-icon_administration_fill_b:before {
+  content: "\e6e4";
+}
+
+.icon-icon_data_insight__fill_b:before {
+  content: "\e6e5";
+}
+
+.icon-icon_administration_b:before {
+  content: "\e6e6";
+}
+
+.icon-icon_container_b:before {
+  content: "\e6e7";
+}
+
+.icon-icon_exception__approval_b:before {
+  content: "\e6e8";
+}
+
+.icon-icon_po_mass__maintenance_b:before {
+  content: "\e6cf";
+}
+
+.icon-icon_security_b:before {
+  content: "\e6d0";
+}
+
+.icon-icon_packing_b:before {
+  content: "\e6d1";
+}
+
+.icon-icon_my__shipment_fill_b:before {
+  content: "\e6d2";
+}
+
+.icon-icon_general__maintenace_b:before {
+  content: "\e6d3";
+}
+
+.icon-icon_invoice_b:before {
+  content: "\e6d4";
+}
+
+.icon-icon_control__tower_search_b:before {
+  content: "\e6d5";
+}
+
+.icon-icon_po_follow_up_b:before {
+  content: "\e6d6";
+}
+
+.icon-icon_seabooking_b:before {
+  content: "\e6c8";
+}
+
+.icon-icon_sku__maintenace_b:before {
+  content: "\e6c9";
+}
+
+.icon-icon_po_restore_b:before {
+  content: "\e6ca";
+}
+
+.icon-icon_road__booking_b:before {
+  content: "\e6cb";
+}
+
+.icon-icon_po_close_b:before {
+  content: "\e6cc";
+}
+
+.icon-icon_reports_b:before {
+  content: "\e6cd";
+}
+
+.icon-icon_po__maintenance_b:before {
+  content: "\e6ce";
+}
+
+.icon-icon_warning_fill_b:before {
+  content: "\e6c6";
+}
+
+.icon-icon_fail_fill_b:before {
+  content: "\e6c7";
+}
+
+.icon-icon_publish_fill_b:before {
+  content: "\e6c5";
+}
+
+.icon-icon_refresh_bold_b:before {
+  content: "\e6c4";
+}
+
 .icon-icon_drag__line_b:before {
   content: "\e6c3";
 }
 
-.icon-icon_unverified_b:before {
+.icon-icon_success_b:before {
   content: "\e6c2";
 }
 
@@ -518,18 +742,10 @@
   content: "\e654";
 }
 
-.icon-icon_view_b:before {
-  content: "\e639";
-}
-
 .icon-icon_createpo_b:before {
   content: "\e63a";
 }
 
-.icon-icon_submit_b:before {
-  content: "\e63b";
-}
-
 .icon-icon_save_b:before {
   content: "\e63c";
 }

文件差異過大導致無法顯示
+ 0 - 0
src/styles/icons/iconfont.js


文件差異過大導致無法顯示
+ 6 - 0
src/styles/icons/iconfont.svg


二進制
src/styles/icons/iconfont.ttf


二進制
src/styles/icons/iconfont.woff


二進制
src/styles/icons/iconfont.woff2


+ 23 - 10
src/views/Layout/src/components/Header/HeaderView.vue

@@ -104,15 +104,28 @@ const handleChangePassword = () => {
 }
 
 const handleUserManual = () => {
-  $api.getUserGuide().then(async (res) => {
-    console.log(res.data.data)
-    // 创建一个 Blob 对象
-    const blob = new Blob([res.data.data], { type: 'application/pdf' })
-
-    const url = URL.createObjectURL(blob)
-    // 在新标签页中打开 PDF
-    window.open(url, '_blank')
-  })
+  try {
+    $api.getUserGuide().then(async (res) => {
+      console.log(res)
+      if (res.status !== 200) {
+        ElMessageBox.alert('The request failed. Please try again later', 'Prompt', {
+          confirmButtonText: 'OK',
+          confirmButtonClass: 'el-button--dark'
+        })
+        return
+      }
+      // 创建一个 Blob 对象
+      const blob = new Blob([res.data], { type: 'application/pdf' })
+      const url = URL.createObjectURL(blob)
+      // 在新标签页中打开 PDF
+      window.open(url, '_blank')
+    })
+  } catch (error) {
+    ElMessageBox.alert('The request failed. Please try again later', 'Prompt', {
+      confirmButtonText: 'OK',
+      confirmButtonClass: 'el-button--dark'
+    })
+  }
 }
 
 const logoutDialogRef = ref()
@@ -162,7 +175,7 @@ const handleLogin = () => {
             Change Password
           </div>
           <div class="item" @click="handleUserManual">
-            <span class="font_family icon-icon_password_b"></span>
+            <span class="font_family icon-icon_manual_b"></span>
             User Manual
           </div>
           <div class="item" @click="handleLogout">

部分文件因文件數量過多而無法顯示