Переглянути джерело

Merge branch 'dev' into feat_map

zhouyuhao 10 місяців тому
батько
коміт
bdd6e739e9

+ 1 - 2
src/api/module/booking.ts

@@ -51,11 +51,10 @@ export const getBookingDetail = (params: any, config: any) => {
 /**
  * 获取Booking详情页发送邮件
  */
-export const bookingSendEmail = (params: any, config: any) => {
+export const sendEmailApi = (params: any, config: any) => {
   return HttpAxios.post(
     `${baseUrl}`,
     {
-      action: 'ocean_booking',
       operate: 'save_communication',
       ...params
     },

+ 1 - 2
src/api/module/other.ts

@@ -1,5 +1,4 @@
-import HttpAxios from '@/utils/axios'
-import axios, { type AxiosInstance, type AxiosRequestConfig, type AxiosResponse } from 'axios'
+import axios from 'axios'
 
 const base = import.meta.env.VITE_API_HOST
 const baseUrl = `${base}/main_new_version.php`

+ 15 - 0
src/api/module/tracking.ts

@@ -122,3 +122,18 @@ export const getAllTrackingTableData = (params: any, config: any) => {
     config
   )
 }
+
+/**
+ * 用户点击分享链接后请求接口留下记录
+ */
+export const recordShareLinkClicked = (params: any, config: any) => {
+  return HttpAxios.post(
+    `${baseUrl}`,
+    {
+      action: 'ocean_order',
+      operate: 'share_shipment',
+      ...params
+    },
+    config
+  )
+}

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

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

+ 10 - 6
src/components/TransportMode/src/TransportMode.vue

@@ -20,6 +20,14 @@ watch(
   (current) => {
     console.log(current)
     TransportList.value = current
+    TransportList.value.forEach((item: any) => {
+      if (item.checked) {
+        checkedCount.push(item.name)
+        const map = new Map()
+        checkedCount.forEach((item) => map.set(item, true))
+        checkedCount = [...map.keys()]
+      }
+    })
   }
 )
 
@@ -61,18 +69,14 @@ const handleCheckAllChange = (val: any) => {
     }
   })
 }
-const handleCheckedTransportChange = (value: any, checked: any, index: any) => {
+const handleCheckedTransportChange = (value: any, checked: any) => {
   if (checked) {
     checkedCount.push(value)
     const map = new Map()
     checkedCount.forEach((item) => map.set(item, true))
     checkedCount = [...map.keys()]
   } else {
-    if (checkedCount.length == 1) {
-      checkedCount.splice(0, 1)
-    } else {
-      checkedCount.splice(index, 1)
-    }
+    checkedCount.splice(checkedCount.indexOf(value), 1)
   }
   checkAll.value = checkedCount.length === TransportList.value.length
 }

+ 1 - 1
src/main.ts

@@ -87,4 +87,4 @@ app.config.globalProperties.$toggleDarkMode = () => {
   }
 }
 
-app.mount('#app')
+app.mount('#app')

+ 1 - 1
src/styles/elementui.scss

@@ -776,4 +776,4 @@ div .DaterangeClass {
   background-color: var(--management-bg-color) !important;
   border-color: var(--management-bg-color) !important;
   border-radius: 12px !important;
-}
+}

+ 2 - 1
src/views/Booking/src/components/BookingDetail/src/components/EmailView.vue

@@ -138,7 +138,8 @@ const sendEmail = () => {
   const html = editorRef.value.getHtml()
   const text = editorRef.value.getText()
   $api
-    .bookingSendEmail({
+    .sendEmailApi({
+      action: 'ocean_booking',
       email: emailData.value.email,
       communication_cc: emailData.value.ccEmail,
       serial_no: emailData.value.serial_no,

+ 3 - 2
src/views/Dashboard/src/DashboardView.vue

@@ -5,6 +5,7 @@ import { VueDraggable } from 'vue-draggable-plus'
 import PieChart from './components/PieChart.vue'
 import SellerChart from './components/SellerChart.vue'
 import BarChart from './components/BarChart.vue'
+import RevenueChart from './components/RevenueChart.vue'
 import RecentStatus from './components/RecentStatus.vue'
 import ScoringSystem from './components/ScoringSystem.vue'
 import TopMap from './components/TopMap.vue'
@@ -1192,7 +1193,7 @@ const ClickParams = (val: any) => {
                 </div>
               </template>
               <template #content>
-                <BarChart
+                <RevenueChart
                   :BarData="RevenueObj"
                   :isRevenue="false"
                   v-vloading="RevenueLoading"
@@ -1200,7 +1201,7 @@ const ClickParams = (val: any) => {
                   :RevenueEndDate="revenue_date_end"
                   style="height: 300px"
                   :barHeight="{ height: '300px' }"
-                ></BarChart>
+                ></RevenueChart>
               </template>
             </VBox_Dashboard>
           </div>

+ 2 - 159
src/views/Dashboard/src/components/BarChart.vue

@@ -3,8 +3,6 @@
 import * as echarts from 'echarts'
 import { useThemeStore } from '@/stores/modules/theme'
 import { onMounted, ref, reactive, watch, computed } from 'vue'
-import updateIcon from '../image/xiazai.png'
-import * as XLSX from 'xlsx'
 const themeStore = useThemeStore()
 const props = defineProps({
   BarData: Object,
@@ -22,16 +20,13 @@ watch(
     initOption.xAxis.data = barName.value
     initOption.series = bar_series.value
     initOption.legend.data = Name.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()
   },
   {
-    deep: true,
-    once: true
+    deep: true
   }
 )
 // 最大值
@@ -64,86 +59,6 @@ const Name = computed(() => {
     return []
   }
 })
-const downloadName = computed(() => {
-  return bar_data.value?.download_name
-})
-const isShowTooltips = computed(() => {
-  return bar_data.value?.isShowTooltips
-})
-const exportData = ({ filename }: any) => {
-  $api
-    .RevenueDownload({
-      date_start: props.RevenueStartDate,
-      date_end: props.RevenueEndDate
-    })
-    .then((res: any) => {
-      if (res.code === 200) {
-        let header: any = []
-        let data: any = []
-        let sheetname: any = []
-        let filterA = res.data.r2_cloumn.map((el: any) => {
-          return el.dataIndex
-        })
-        let titleA = res.data.r2_cloumn.map((el: any) => {
-          return el.title
-        })
-        let filterB = res.data.r3_cloumn.map((el: any) => {
-          return el.dataIndex
-        })
-        let titleB = res.data.r3_cloumn.map((el: any) => {
-          return el.title
-        })
-        let result: any = [
-          {
-            tHeader: titleA,
-            filterVal: filterA,
-            tableDatas: res.data.r2,
-            sheetName: res.data.r2_title
-          },
-          {
-            tHeader: titleB,
-            filterVal: filterB,
-            tableDatas: res.data.r3,
-            sheetName: res.data.r3_title
-          }
-        ]
-        let formatJson = (filterVal: any, jsonData: any) => {
-          return jsonData.map((v: any) => filterVal.map((j: any) => v[j]))
-        }
-        for (var i in result) {
-          header.push(result[i].tHeader)
-          sheetname.push(result[i].sheetName)
-          data.push(formatJson(result[i].filterVal, result[i].tableDatas))
-        }
-        // 将表头插入数据数组中
-        for (let i = 0; i < header.length; i++) {
-          data[i].unshift(header[i])
-        }
-        let ws_name = sheetname
-        // 创建工作簿对象
-        let wb = XLSX.utils.book_new()
-        let ws: any = []
-        // 创建每个工作表并设置列宽
-        for (let j = 0; j < header.length; j++) {
-          ws.push(XLSX.utils.aoa_to_sheet(data[j]))
-          let arr: any = []
-          header[j].forEach((val: any) => {
-            arr.push({
-              wpx: 120
-            })
-          })
-          ws[j]['!cols'] = arr
-        }
-        // 将工作表对象添加到工作簿中
-        for (let k = 0; k < header.length; k++) {
-          wb.SheetNames.push(ws_name[k])
-          wb.Sheets[ws_name[k]] = ws[k]
-        }
-        XLSX.writeFile(wb, filename + '.xlsx') // 导出文件
-      }
-    })
-    .finally(() => {})
-}
 
 // 数额
 const initOption = reactive({
@@ -257,32 +172,7 @@ const initOption = reactive({
       color: '#646A73'
     }
   },
-  series: bar_series.value,
-  toolbox: {
-    iconStyle: {
-      borderColor: '#2B2F36'
-    },
-    emphasis: {
-      iconStyle: {
-        borderColor: '#ff7500'
-      } // hover上去时的颜色
-    },
-    itemSize: 25,
-    show: isShowTooltips.value, // 显示工具箱
-    feature: {
-      saveAsImage: { show: false, name: downloadName.value },
-      myTool1: {
-        show: true,
-        title: 'update',
-        icon: 'image://' + updateIcon,
-        onclick: function () {
-          let filename = 'Revenue Spent Details ' + barName.value[0] + '-' + barName.value[1]
-          exportData({ filename: filename })
-        }
-      }
-    },
-    showTitle: false
-  }
+  series: bar_series.value
 })
 onMounted(() => {
   initChart()
@@ -329,53 +219,6 @@ const initChart = () => {
   window.addEventListener('resize', () => {
     bar_chart.resize()
   })
-  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++
-        trueObj[key] = selected[key]
-      }
-    }
-    if (trueCount == 1) {
-      initOption.series.forEach((item: any, index: any) => {
-        if (item.name == Object.keys(trueObj)) {
-          initOption.series[index].label.show = true
-          initOption.title.text = `Total: ${initOption.series[index].total}`
-        }
-      })
-    } else {
-      initOption.series.forEach((item: any, index: any) => {
-        initOption.series[index].label.show = false
-        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)
 }
 

+ 16 - 1
src/views/Dashboard/src/components/RecentStatus.vue

@@ -19,6 +19,7 @@ interface RecentItem {
   Time: string
   timezone: string
   act_time: string
+  transport_mode: string
 }
 interface Props {
   RecentStatusList: RecentItem[]
@@ -39,13 +40,27 @@ const RouteToDetail = (val: any) => {
     <div class="recent_header">
       <!-- 头部 -->
       <div class="recent-header-left">
-        <div>
+        <div v-if="item.transport_mode == 'sea'">
           <span class="iconfont_icon">
             <svg class="iconfont iconfont_route icon_dark" aria-hidden="true">
               <use xlink:href="#icon-icon_ocean_b"></use>
             </svg>
           </span>
         </div>
+        <div v-else-if="item.transport_mode == 'air'">
+          <span class="iconfont_icon">
+            <svg class="iconfont iconfont_route icon_dark" aria-hidden="true">
+              <use xlink:href="#icon-icon_airplane_b"></use>
+            </svg>
+          </span>
+        </div>
+        <div v-else>
+          <span class="iconfont_icon">
+            <svg class="iconfont iconfont_route icon_dark" aria-hidden="true">
+              <use xlink:href="#icon-icon_truck_b"></use>
+            </svg>
+          </span>
+        </div>
         <div class="recent-title" @click="RouteToDetail(item)">{{ item.Title }}</div>
         <div class="recent-name">{{ item.name }}</div>
         <div class="recent-booking">

+ 385 - 0
src/views/Dashboard/src/components/RevenueChart.vue

@@ -0,0 +1,385 @@
+<!-- 竖形柱状图 -->
+<script lang="ts" setup>
+import * as echarts from 'echarts'
+import { useThemeStore } from '@/stores/modules/theme'
+import { onMounted, ref, reactive, watch, computed } from 'vue'
+import updateIcon from '../image/xiazai.png'
+import * as XLSX from 'xlsx'
+
+const themeStore = useThemeStore()
+const props = defineProps({
+  BarData: Object,
+  barHeight: Object,
+  isRevenue: Boolean,
+  RevenueStartDate: String,
+  RevenueEndDate: String
+})
+const bar_data = ref(props.BarData)
+const bar_ref = ref()
+watch(
+  () => bar_data.value,
+  (current) => {
+    bar_data.value = current
+    initOption.xAxis.data = barName.value
+    initOption.series = bar_series.value
+    initOption.legend.data = Name.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()
+  },
+  {
+    deep: true,
+    once: true
+  }
+)
+// 最大值
+const Max = computed(() => {
+  return bar_data.value?.Max
+})
+// 刻度
+const interval = computed(() => {
+  return bar_data.value?.interval
+})
+// x轴值
+const barName = computed(() => {
+  return bar_data.value?.barList
+})
+// title
+const bar_title = computed(() => {
+  return bar_data.value?.bar_title
+})
+// series
+const bar_series = computed(() => {
+  return bar_data.value?.barSeries
+})
+// legend标题
+const Name = computed(() => {
+  if (bar_data.value?.barSeries) {
+    return bar_data.value?.barSeries.map((item: any) => {
+      return item.name
+    })
+  } else {
+    return []
+  }
+})
+const downloadName = computed(() => {
+  return bar_data.value?.download_name
+})
+const isShowTooltips = computed(() => {
+  return bar_data.value?.isShowTooltips
+})
+const exportData = ({ filename }: any) => {
+  $api
+    .RevenueDownload({
+      date_start: props.RevenueStartDate,
+      date_end: props.RevenueEndDate
+    })
+    .then((res: any) => {
+      if (res.code === 200) {
+        let header: any = []
+        let data: any = []
+        let sheetname: any = []
+        let filterA = res.data.r2_cloumn.map((el: any) => {
+          return el.dataIndex
+        })
+        let titleA = res.data.r2_cloumn.map((el: any) => {
+          return el.title
+        })
+        let filterB = res.data.r3_cloumn.map((el: any) => {
+          return el.dataIndex
+        })
+        let titleB = res.data.r3_cloumn.map((el: any) => {
+          return el.title
+        })
+        let result: any = [
+          {
+            tHeader: titleA,
+            filterVal: filterA,
+            tableDatas: res.data.r2,
+            sheetName: res.data.r2_title
+          },
+          {
+            tHeader: titleB,
+            filterVal: filterB,
+            tableDatas: res.data.r3,
+            sheetName: res.data.r3_title
+          }
+        ]
+        let formatJson = (filterVal: any, jsonData: any) => {
+          return jsonData.map((v: any) => filterVal.map((j: any) => v[j]))
+        }
+        for (var i in result) {
+          header.push(result[i].tHeader)
+          sheetname.push(result[i].sheetName)
+          data.push(formatJson(result[i].filterVal, result[i].tableDatas))
+        }
+        // 将表头插入数据数组中
+        for (let i = 0; i < header.length; i++) {
+          data[i].unshift(header[i])
+        }
+        let ws_name = sheetname
+        // 创建工作簿对象
+        let wb = XLSX.utils.book_new()
+        let ws: any = []
+        // 创建每个工作表并设置列宽
+        for (let j = 0; j < header.length; j++) {
+          ws.push(XLSX.utils.aoa_to_sheet(data[j]))
+          let arr: any = []
+          header[j].forEach((val: any) => {
+            arr.push({
+              wpx: 120
+            })
+          })
+          ws[j]['!cols'] = arr
+        }
+        // 将工作表对象添加到工作簿中
+        for (let k = 0; k < header.length; k++) {
+          wb.SheetNames.push(ws_name[k])
+          wb.Sheets[ws_name[k]] = ws[k]
+        }
+        XLSX.writeFile(wb, filename + '.xlsx') // 导出文件
+      }
+    })
+    .finally(() => {})
+}
+
+// 数额
+const initOption = reactive({
+  //标题
+  title: {
+    text: bar_title.value || 'Total:', //主标题
+    left: 19,
+    top: 9.5,
+    textStyle: {
+      color: '#2B2F36',
+      fontWeight: '700',
+      fontFamily: 'Lato-Light',
+      fontSize: '14px'
+    }
+  },
+  // 间距
+  grid: {
+    top: '18%',
+    left: '1%',
+    right: '2%',
+    bottom: '5%',
+    containLabel: true // 距离包含坐标轴上的文字
+  },
+  // hover时的文字显示
+  tooltip: {
+    show: true,
+    trigger: 'axis',
+    axisPointer: {
+      type: 'shadow'
+    },
+    backgroundColor: '#2b2f36',
+    borderColor: '#2b2f36',
+    formatter: function (params: any) {
+      let str: any = ''
+      let allnum: any = 0
+      str += '<div style= ' + 'color:#FFF;font-family: Lato-Light>' + params[0].name + '</div>'
+      params.forEach((item: any) => {
+        allnum += item.value
+        allnum = Number(allnum.toFixed(2))
+        str +=
+          '<div style= ' +
+          'color:#FFF>' +
+          item.marker +
+          item.seriesName +
+          ': ' +
+          item.value +
+          '</div>'
+      })
+      allnum = allnum.toFixed(2)
+      str += '<div style= ' + 'color:#FFF;font-family: Lato-Light>Total: ' + allnum + '</div>'
+      return str
+    },
+    textStyle: {
+      color: '#FFF',
+      fontWeight: 700,
+      fontFamily: 'Lato-Light',
+      fontSize: '14px'
+    }
+  },
+  xAxis: {
+    type: 'category',
+    data: barName.value,
+    axisTick: {
+      show: false
+    },
+    axisLine: {
+      lineStyle: {
+        color: '#eaebed'
+      }
+    },
+    axisLabel: {
+      interval: 0,
+      fontFamily: 'Lato-Light',
+      color: '#B5B9BF'
+    }
+  },
+  yAxis: {
+    type: 'value',
+    scale: true,
+    splitLine: {
+      show: true,
+      lineStyle: {
+        type: 'dashed',
+        color: '#eaebed'
+      }
+    },
+    axisLine: {
+      show: true,
+      lineStyle: {
+        color: '#eaebed'
+      }
+    },
+    axisLabel: {
+      fontFamily: 'Lato-Light',
+      color: '#B5B9BF'
+    },
+    min: 0, // 最小值
+    max: Max.value, // 最大值
+    interval: interval.value // 刻度
+  },
+  legend: {
+    data: Name.value,
+    top: '3%',
+    itemGap: 30,
+    left: '40%',
+    itemHeight: 8, //修改icon图形大小
+    itemWidth: 8, //修改icon图形大小
+    textStyle: {
+      fontSize: 12,
+      fontFamily: 'Lato-Light',
+      color: '#646A73'
+    }
+  },
+  series: bar_series.value,
+  toolbox: {
+    iconStyle: {
+      borderColor: '#2B2F36'
+    },
+    emphasis: {
+      iconStyle: {
+        borderColor: '#ff7500'
+      } // hover上去时的颜色
+    },
+    itemSize: 25,
+    show: isShowTooltips.value, // 显示工具箱
+    feature: {
+      saveAsImage: { show: false, name: downloadName.value },
+      myTool1: {
+        show: true,
+        title: 'update',
+        icon: 'image://' + updateIcon,
+        onclick: function () {
+          let filename = 'Revenue Spent Details ' + barName.value[0] + '-' + barName.value[1]
+          exportData({ filename: filename })
+        }
+      }
+    },
+    showTitle: false
+  }
+})
+onMounted(() => {
+  initChart()
+  watch(
+    () => themeStore.theme,
+    (newVal) => {
+      if (newVal === 'dark') {
+        initOption.xAxis.axisLine.lineStyle.color = '#3F434A'
+        initOption.yAxis.axisLine.lineStyle.color = '#3F434A'
+        initOption.yAxis.splitLine.lineStyle.color = '#3F434A'
+        initChart()
+      } else {
+        initOption.xAxis.axisLine.lineStyle.color = '#eaebed'
+        initOption.yAxis.axisLine.lineStyle.color = '#eaebed'
+        initOption.yAxis.splitLine.lineStyle.color = '#eaebed'
+        initChart()
+      }
+    },
+    {
+      immediate: true,
+      deep: true
+    }
+  )
+})
+
+const initChart = () => {
+  const bar_chart = echarts.init(bar_ref.value)
+  //图表响应式
+  window.addEventListener('resize', () => {
+    bar_chart.resize()
+  })
+  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++
+        trueObj[key] = selected[key]
+      }
+    }
+    if (trueCount == 1) {
+      initOption.series.forEach((item: any, index: any) => {
+        if (item.name == Object.keys(trueObj)) {
+          initOption.series[index].label.show = true
+          initOption.title.text = `Total: ${initOption.series[index].total}`
+        }
+      })
+    } else {
+      initOption.series.forEach((item: any, index: any) => {
+        initOption.series[index].label.show = false
+        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)
+}
+</script>
+
+<template>
+  <div class="com-container">
+    <div ref="bar_ref" id="bar_chart" :style="props.barHeight"></div>
+  </div>
+</template>
+
+<style lang="scss" scoped>
+.com-container {
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  position: relative;
+}
+#bar_chart {
+  width: 100%;
+}
+</style>

+ 1 - 1
src/views/Layout/src/components/Header/HeaderView.vue

@@ -495,4 +495,4 @@ div.el-popover.el-popper.user-config-popover {
 div.el-popper.theme-popper-class {
   padding: 3px 4px;
 }
-</style>
+</style>

+ 6 - 0
src/views/Tracking/src/components/PublicTracking/src/components/ShareLinkDialog.vue

@@ -19,6 +19,12 @@ const copyToClipboard = async () => {
     ElMessage.success('Copied to clipboard')
     // 设置已复制标志
     copied.value = true
+    // $api
+    //   .recordShareLinkClicked({
+    //     url: shareLink.value
+    //   })
+    //   .then(() => {})
+    //   .catch(() => {})
 
     // 一段时间后重置标志
     setTimeout(() => {

+ 4 - 1
src/views/Tracking/src/components/TrackingDetail/src/TrackingDetail.vue

@@ -138,7 +138,10 @@ const openShareDialog = () => {
         }}</VTag>
         <div class="right-operation">
           <el-button
-            v-if="allData?.canViewAMSLog || allData?.canViewISFLog"
+            v-if="
+              (allData?.canViewAMSLog || allData?.canViewISFLog) &&
+              allData?.transportInfo?.mode !== 'Air Freight'
+            "
             type="default"
             @click="handleAMSISF"
           >

+ 2 - 1
src/views/Tracking/src/components/TrackingDetail/src/components/EmailDrawer.vue

@@ -139,7 +139,8 @@ const sendEmail = () => {
   const html = editorRef.value.getHtml()
   const text = editorRef.value.getText()
   $api
-    .bookingSendEmail({
+    .sendEmailApi({
+      action: 'ocean_order',
       email: emailData.value.email,
       communication_cc: emailData.value.ccEmail,
       serial_no: emailData.value.serial_no,

+ 1 - 1
src/views/Tracking/src/components/TrackingDetail/src/components/MapView.vue

@@ -740,4 +740,4 @@ onUnmounted(() => {
     }
   }
 }
-</style>
+</style>

+ 6 - 0
src/views/Tracking/src/components/TrackingDetail/src/components/ShareLinkDialog.vue

@@ -24,6 +24,12 @@ const copyToClipboard = async () => {
     ElMessage.success('Copied to clipboard')
     // 设置已复制标志
     copied.value = true
+    // $api
+    //   .recordShareLinkClicked({
+    //     url: shareLink.value
+    //   })
+    //   .then(() => {})
+    //   .catch(() => {})
 
     // 一段时间后重置标志
     setTimeout(() => {

+ 1 - 1
src/views/Tracking/src/components/TrackingDetail/src/components/TransportStep.vue

@@ -87,4 +87,4 @@ const handleTabClick = (name: string) => {
     border-bottom: none;
   }
 }
-</style>
+</style>

+ 8 - 2
src/views/Tracking/src/components/TrackingTable/src/TrackingTable.vue

@@ -606,8 +606,14 @@ defineExpose({
       </template>
       <!-- action操作的插槽 -->
       <template #action="{ row }">
-        <el-button @click="handleVGM(row)" class="el-button--blue" style="height: 24px">
-          <span class="font_family icon-icon_vgm_b"></span> <span style="font-size: 12px">VGM</span>
+        <el-button
+          v-if="row?.['Transportation Mode'] !== 'Air Freight'"
+          @click="handleVGM(row)"
+          class="el-button--blue"
+          style="height: 24px"
+        >
+          <span class="font_family icon-icon_vgm_b"></span>
+          <span style="font-size: 12px">VGM</span>
         </el-button>
       </template>
       <!-- Transportation Mode字段的插槽 -->