Sfoglia il codice sorgente

Merge branch 'dev' into feat_map

zhouyuhao 10 mesi fa
parent
commit
7d7ba17fb1

+ 40 - 20
src/components/TransportMode/src/TransportMode.vue

@@ -5,6 +5,7 @@ import emitter from '@/utils/bus'
 
 interface ListItem {
   name: string
+  sname: string
   number: number
   icon: string
   checked: boolean
@@ -22,11 +23,14 @@ watch(
     TransportList.value = current
     TransportList.value.forEach((item: any) => {
       if (item.checked) {
-        checkedCount.push(item.name)
+        checkedCount.push(item.sname)
         const map = new Map()
         checkedCount.forEach((item) => map.set(item, true))
         checkedCount = [...map.keys()]
       }
+      if (checkedCount.length == TransportList.value.length) {
+        checkAll.value = true
+      }
     })
   }
 )
@@ -62,7 +66,7 @@ const handleCheckAllChange = (val: any) => {
   TransportList.value.forEach((item: any) => {
     if (val) {
       item.checked = true
-      checkedCount.push(item.name)
+      checkedCount.push(item.sname)
     } else {
       item.checked = false
       checkedCount = []
@@ -98,21 +102,21 @@ const changedata = ref()
 //点击搜索
 const TransportData = {
   title: 'Transport Mode',
-  data: ''
+  data: ['']
 }
 const TransportSearch = (visible: any) => {
   TransportList.value.forEach((item: any) => {
     if (item.checked) {
-      checkedCount.push(item.name)
+      checkedCount.push(item.sname)
       const map = new Map()
       checkedCount.forEach((item) => map.set(item, true))
       checkedCount = [...map.keys()]
     }
   })
   if (checkedCount.length == TransportList.value.length) {
-    changedata.value = 'All'
+    changedata.value = ['All']
   } else {
-    changedata.value = checkedCount.join(', ')
+    changedata.value = checkedCount
   }
   TransportData.data = changedata.value
   emit('TransportSearch', TransportData)
@@ -133,15 +137,22 @@ const defaultTransport = () => {
     ) {
       if (sessionStorage.getItem('searchTableQeuryTracking') == null) {
         checkAll.value = true
-        TransportData.data = 'All'
+        TransportData.data = ['All']
       } else {
         searchTableQeuryTracking.value =
           JSON.parse(sessionStorage.getItem('searchTableQeuryTracking') as string) || {}
-        if (searchTableQeuryTracking.value.transport_mode == 'All') {
-          checkAll.value = true
-          TransportData.data = 'All'
+        if (searchTableQeuryTracking.value.transport_mode.length !== 0) {
+          TransportData.data = searchTableQeuryTracking.value.transport_mode
+          searchTableQeuryTracking.value.transport_mode.forEach((item: any) => {
+            if (item == 'All') {
+              checkAll.value = true
+            } else {
+              checkAll.value = false
+            }
+          })
         } else {
-          TransportData.data = ''
+          TransportData.data = []
+          checkAll.value = false
         }
       }
       emit('defaultTransport', TransportData, searchTableQeuryTracking.value)
@@ -154,24 +165,33 @@ const defaultTransport = () => {
           title: 'Transport Mode',
           data: data.transport_mode
         }
-        if (data.transport_mode == 'All') {
-          checkAll.value = true
-        }
+        data.transport_mode.forEach((item: any) => {
+          if (item == 'All') {
+            checkAll.value = true
+          }
+        })
         emit('defaultTransport', obj, searchTableQeuryTracking.value)
       }
     }
   } else {
     if (sessionStorage.getItem('searchTableQeury') == null) {
       checkAll.value = true
-      TransportData.data = 'All'
+      TransportData.data = ['All']
     } else {
       searchTableQeury.value =
         JSON.parse(sessionStorage.getItem('searchTableQeury') as string) || {}
-      if (searchTableQeury.value.transport_mode == 'All') {
-        checkAll.value = true
-        TransportData.data = 'All'
+      if (searchTableQeury.value.transport_mode.length !== 0) {
+        TransportData.data = searchTableQeury.value.transport_mode
+        searchTableQeury.value.transport_mode.forEach((item: any) => {
+          if (item == 'All') {
+            checkAll.value = true
+          } else {
+            checkAll.value = false
+          }
+        })
       } else {
-        TransportData.data = ''
+        TransportData.data = []
+        checkAll.value = false
       }
     }
     emit('defaultTransport', TransportData, searchTableQeury.value)
@@ -212,7 +232,7 @@ const defaultTransport = () => {
                 :value="item.name"
                 v-model="item.checked"
                 class="checkbox"
-                @change="handleCheckedTransportChange(item.name, item.checked, index)"
+                @change="handleCheckedTransportChange(item.sname, item.checked)"
               >
                 <div class="checkbox_title">
                   <span class="iconfont_icon">

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

@@ -512,9 +512,9 @@ const ClickParams = (val: any) => {
   const reportList: any = {}
   const handlereportlist = (transportation: any, type: any, name: any) => {
     if (transportation.includes('All')) {
-      reportList.transport_mode = 'All'
+      reportList.transport_mode = ['All']
     } else {
-      reportList.transport_mode = dashboardObj.ETDDefaultData.transportation
+      reportList.transport_mode = transportation
     }
     if (name == 'Container') {
       if (type == 'ETA') {
@@ -1195,7 +1195,6 @@ const ClickParams = (val: any) => {
               <template #content>
                 <RevenueChart
                   :BarData="RevenueObj"
-                  :isRevenue="false"
                   v-vloading="RevenueLoading"
                   :RevenueStartDate="revenue_date_start"
                   :RevenueEndDate="revenue_date_end"

+ 1 - 4
src/views/Dashboard/src/components/BarChart.vue

@@ -6,10 +6,7 @@ import { onMounted, ref, reactive, watch, computed } from 'vue'
 const themeStore = useThemeStore()
 const props = defineProps({
   BarData: Object,
-  barHeight: Object,
-  isRevenue: Boolean,
-  RevenueStartDate: String,
-  RevenueEndDate: String
+  barHeight: Object
 })
 const bar_data = ref(props.BarData)
 const bar_ref = ref()

+ 15 - 3
src/views/Dashboard/src/components/RevenueChart.vue

@@ -10,7 +10,6 @@ const themeStore = useThemeStore()
 const props = defineProps({
   BarData: Object,
   barHeight: Object,
-  isRevenue: Boolean,
   RevenueStartDate: String,
   RevenueEndDate: String
 })
@@ -25,9 +24,18 @@ watch(
     initOption.legend.data = Name.value
     initOption.toolbox.feature.saveAsImage.name = downloadName.value
     initOption.toolbox.show = isShowTooltips.value
+    initChart()
+  },
+  {
+    deep: true
+  }
+)
+watch(
+  () => bar_data.value,
+  (current) => {
+    bar_data.value = current
     initOption.yAxis.max = Max.value
     initOption.yAxis.interval = interval.value
-    initOption.title.text = bar_title.value
     initChart()
   },
   {
@@ -291,14 +299,18 @@ onMounted(() => {
     () => themeStore.theme,
     (newVal) => {
       if (newVal === 'dark') {
+        initOption.title.textStyle.color = '#f0f1f3'
+        initOption.xAxis.axisLine.lineStyle.color = '#3F434A'
         initOption.xAxis.axisLine.lineStyle.color = '#3F434A'
         initOption.yAxis.axisLine.lineStyle.color = '#3F434A'
-        initOption.yAxis.splitLine.lineStyle.color = '#3F434A'
+        initOption.legend.textStyle.color = 'rgba(240,241,243,0.7)'
         initChart()
       } else {
+        initOption.title.textStyle.color = '#2B2F36'
         initOption.xAxis.axisLine.lineStyle.color = '#eaebed'
         initOption.yAxis.axisLine.lineStyle.color = '#eaebed'
         initOption.yAxis.splitLine.lineStyle.color = '#eaebed'
+        initOption.legend.textStyle.color = '#646A73'
         initChart()
       }
     },

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

@@ -194,7 +194,7 @@ const { isOverflow: isDetailDestinationOverflow } = useOverflow(detailDestinatio
               <div class="content">{{ item.vessel || '--' }}</div>
             </div>
             <div class="item">
-              <div class="title">Voyage / Flight No.</div>
+              <div class="title">Voyage / Flight</div>
               <div class="content">{{ item.voyageNo || '--' }}</div>
             </div>
           </div>

+ 2 - 0
src/views/Tracking/src/components/TrackingDetail/src/components/UploadFilesDialog.vue

@@ -54,6 +54,7 @@ const handleSuccess = (response: any, file: any) => {
 
 const clearData = () => {
   uploadFileList.value = []
+  uploadRef.value.clearFiles()
 }
 const beforeAvatarUpload = (rawFile: any) => {
   if (
@@ -89,6 +90,7 @@ const beforeAvatarUpload = (rawFile: any) => {
       <el-upload
         class="upload-demo"
         ref="uploadRef"
+        :auto-upload="false"
         drag
         :accept="'application/pdf,.docx,.xlsx'"
         :show-file-list="false"