Browse Source

Merge branch 'dev' into feat_theme

zhouyuhao 11 months ago
parent
commit
855a65151b

+ 3 - 1
src/api/index.ts

@@ -2,6 +2,7 @@ import * as booking from './module/booking'
 import * as tracking from './module/tracking'
 import * as common from './module/common'
 import * as login from './module/login'
+import * as other from './module/other'
 /**
  * api 对象接口定义
  */
@@ -17,7 +18,8 @@ const apis = generateApiMap({
   ...booking,
   ...tracking,
   ...common,
-  ...login
+  ...login,
+  ...other
 })
 export default {
   ...apis // 取出所有可遍历属性赋值在新的对象上

+ 16 - 0
src/api/module/other.ts

@@ -0,0 +1,16 @@
+import HttpAxios from '@/utils/axios'
+import axios, { type AxiosInstance, type AxiosRequestConfig, type AxiosResponse } from 'axios'
+
+const base = import.meta.env.VITE_API_HOST
+const baseUrl = `${base}/main_new_version.php`
+/**
+ * user guide
+ */
+export const getUserGuide = () => {
+  return axios.get(baseUrl, {
+    params: {
+      action: 'user_guide'
+    },
+    responseType: 'blob'
+  })
+}

+ 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";
 }

File diff suppressed because it is too large
+ 0 - 0
src/styles/icons/iconfont.js


File diff suppressed because it is too large
+ 6 - 0
src/styles/icons/iconfont.svg


BIN
src/styles/icons/iconfont.ttf


BIN
src/styles/icons/iconfont.woff


BIN
src/styles/icons/iconfont.woff2


+ 1 - 1
src/views/Booking/src/BookingView.vue

@@ -395,7 +395,7 @@ const SearchInput = () => {
     <div class="heaer_top">
       <div class="search">
         <el-input
-          placeholder="Search booking No./HBL No./PO No./Carrier Booking No."
+          placeholder="Enter Booking/HBL/PO/Container/Carrier Booking No. "
           v-model="BookingSearch"
         >
           <template #prefix>

+ 31 - 8
src/views/Dashboard/src/components/BarChart.vue

@@ -14,23 +14,22 @@ const props = defineProps({
 const bar_data = ref(props.BarData)
 const bar_ref = ref()
 watch(
-  () => props.BarData,
+  () => bar_data.value,
   (current) => {
     bar_data.value = current
     initOption.xAxis.data = barName.value
     initOption.series = bar_series.value
     initOption.legend.data = Name.value
-    initOption.yAxis.max = Max.value
-    initOption.yAxis.interval = interval.value
     initOption.toolbox.feature.saveAsImage.name = downloadName.value
     initOption.toolbox.show = isShowTooltips.value
+    initOption.yAxis.max = Max.value
+    initOption.yAxis.interval = interval.value
+    initOption.title.text = bar_title.value
     initChart()
-    if (props.isRevenue) {
-      initOption.title.text = bar_title.value
-    }
   },
   {
-    deep: true
+    deep: true,
+    once: true
   }
 )
 // 最大值
@@ -221,6 +220,7 @@ const initOption = reactive({
   },
   yAxis: {
     type: 'value',
+    scale: true,
     splitLine: {
       show: true,
       lineStyle: {
@@ -306,10 +306,11 @@ const initChart = () => {
   window.addEventListener('resize', () => {
     bar_chart.resize()
   })
-  bar_chart.on('legendselectchanged', function (event) {
+  bar_chart.on('legendselectchanged', function (event: any) {
     const selected = event.selected
     let trueCount = 0
     let trueObj: any = {}
+    let truearr: any = []
     for (var key in selected) {
       if (selected[key]) {
         trueCount++
@@ -329,6 +330,28 @@ const initChart = () => {
         initOption.title.text = `Total: `
       })
     }
+    if (trueCount != 0) {
+      initOption.series.forEach((item: any) => {
+        if (Object.keys(trueObj).includes(item.name)) {
+          truearr.push(item)
+        }
+      })
+      const max = Math.max.apply(
+        Math,
+        truearr.map((ele: any) => {
+          return ele.Max
+        })
+      )
+      const interval = Math.max.apply(
+        Math,
+        truearr.map((ele: any) => {
+          return ele.interval
+        })
+      )
+      initOption.yAxis.max = max
+      initOption.yAxis.interval = interval
+    }
+    bar_chart.setOption(initOption)
   })
   bar_chart.setOption(initOption)
 }

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

@@ -103,6 +103,30 @@ const handleChangePassword = () => {
   changePasswordDialogRef.value.openDialog()
 }
 
+const handleUserManual = () => {
+  try {
+    $api.getUserGuide().then(async (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()
 
 const handleLogout = () => {
@@ -150,8 +174,8 @@ const handleLogin = () => {
             <span class="font_family icon-icon_password_b"></span>
             Change Password
           </div>
-          <div class="item" @click="handleChangePassword">
-            <span class="font_family icon-icon_password_b"></span>
+          <div class="item" @click="handleUserManual">
+            <span class="font_family icon-icon_manual_b"></span>
             User Manual
           </div>
           <div class="item" @click="handleLogout">

+ 4 - 1
src/views/Tracking/src/TrackingView.vue

@@ -642,7 +642,10 @@ const SearchInput = () => {
     <FilterTags :TagsListItem="TagsList" @changeTag="changeTag"></FilterTags>
     <div class="heaer_top">
       <div class="search">
-        <el-input placeholder="Search shipment No./reference No...." v-model="TrackingSearch">
+        <el-input
+          placeholder="Enter Booking/HBL/PO/Container/Carrier Booking No. "
+          v-model="TrackingSearch"
+        >
           <template #prefix>
             <span class="iconfont_icon">
               <svg class="iconfont icon_search" aria-hidden="true">

Some files were not shown because too many files changed in this diff