Browse Source

feat: 根据1.0UAT修改bug和样式第二天

zhouyuhao 1 năm trước cách đây
mục cha
commit
2fd0c42002

+ 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')
 }

+ 4 - 0
src/styles/elementui.scss

@@ -318,6 +318,10 @@ div.el-drawer {
   .el-drawer__body {
     padding: 16px;
   }
+  .el-drawer__close-btn:focus i,
+  .el-drawer__close-btn:hover i {
+    color: var(--color-theme);
+  }
 }
 
 div .el-input__inner {

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

@@ -22,7 +22,7 @@ watch(
   (newVal) => {
     if (newVal) {
       const email = newVal?.email
-      emailData.value.email = email?.email?.em
+      emailData.value.email = email?.email
       emailData.value.ccEmail = email?.cc_email
       emailData.value.serial_no = newVal?.serial_no
       emailRecords.value = email?.emailRecords

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

@@ -92,7 +92,6 @@ const handleSearch = () => {
   }
 }
 onBeforeRouteUpdate((to, from, next) => {
-  console.log(to, from)
   // if (to.name === 'Tracking') {
   //   headerSearch.setChangeByLogin(false)
   // }

+ 3 - 2
src/views/Tracking/src/TrackingView.vue

@@ -248,7 +248,6 @@ const clearMoreFiltersTags = () => {
 
 // 从 store 中获取数据并绑定到输入框
 const headerSearchdData = computed(() => headerSearch.searchValue)
-
 // 监听 sharedData 的变化并更新 inputValue
 headerSearchdData.value && (TrackingSearch.value = headerSearchdData.value)
 headerSearch.clearSearchData()
@@ -257,7 +256,9 @@ watch(
   () => headerSearchdData.value,
   (newData) => {
     if (newData) {
-      console.log(headerSearchdData.value)
+      // 更新表格数据
+      TrackingTable_ref.value.getSharedTableData()
+      // 更新筛选条件
       TrackingSearch.value = headerSearchdData.value
       headerSearch.clearSearchData()
     }

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

@@ -268,7 +268,7 @@ const formatTime = (time: string) => {
         </template>
       </VueDraggable>
     </div>
-    <EmailDrawer ref="emailDrawerRef"></EmailDrawer>
+    <EmailDrawer @sendEmailSuccess="getData" ref="emailDrawerRef"></EmailDrawer>
     <AMSISFDrawer ref="AMSISFDrawerRef"></AMSISFDrawer>
   </div>
 </template>

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

@@ -126,6 +126,10 @@ const handleFocusEditor = () => {
   editorRef.value.focus()
 }
 
+const emit = defineEmits<{
+  sendEmailSuccess: []
+}>()
+
 const sendEmail = () => {
   const html = editorRef.value.getHtml()
   const text = editorRef.value.getText()
@@ -141,6 +145,7 @@ const sendEmail = () => {
       if (res.code === 200) {
         ElMessage.success('Email sent successfully')
         emailRecords.value = res.data.emailRecords
+        emit('sendEmailSuccess')
       }
     })
     .catch((err: any) => {
@@ -148,13 +153,24 @@ const sendEmail = () => {
     })
 }
 
+const clearData = () => {
+  valueHtml.value = ''
+}
+
 defineExpose({
   openDrawer
 })
 </script>
 
 <template>
-  <el-drawer v-model="drawer" :modal="false" :size="1000" title="Communication" direction="rtl">
+  <el-drawer
+    v-model="drawer"
+    @close="clearData"
+    :modal="false"
+    :size="1000"
+    title="Communication"
+    direction="rtl"
+  >
     <div class="email-view">
       <div class="email-path">
         <span class="font_family icon-icon_email_b" style="font-size: 18px"></span>
@@ -202,7 +218,10 @@ defineExpose({
         />
       </div>
       <div style="border-bottom: 1px solid var(--color-border)">
-        <el-button class="el-button--dark" style="float: right; margin: 8px 0 14px 0; height: 40px"
+        <el-button
+          @click="sendEmail"
+          class="el-button--dark"
+          style="float: right; margin: 8px 0 14px 0; height: 40px"
           ><span class="font_family icon-icon_submit_b" style="margin-right: 4px"></span> Send
           Email</el-button
         >

+ 3 - 32
src/views/Tracking/src/components/TrackingDetail/src/components/MapView.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="map" style="width: 100%; height: 520px" class="tracking-map"></div>
+  <div id="tracking-map" style="width: 100%; height: 520px" class="tracking-map"></div>
 </template>
 <script setup lang="ts">
 import L from 'leaflet'
@@ -44,7 +44,7 @@ const initMap = () => {
     return
   }
 
-  map = L.map('map').setView([51.505, -0.09], 3)
+  map = L.map('tracking-map').setView([51.505, -0.09], 3)
 
   // 添加 TileLayer
   L.tileLayer('https://map.kerryapex.com/osm_tiles/{z}/{x}/{y}.png', {
@@ -137,36 +137,7 @@ const getMarker = () => {
     })
     .then((res) => {
       if (res.code === 200) {
-        // const { data } = res
-        const data = [
-          {
-            lng: '117.70000000',
-            lat: '38.98333333',
-            label: 'Origin',
-            infor: 'XINGANG, CHINA',
-            sort: '1',
-            stime: '',
-            ptype: 'pol'
-          },
-          {
-            lng: '-76.61666667',
-            lat: '39.28333333',
-            label: 'Destination',
-            infor: 'BALTIMORE, MD',
-            sort: '2',
-            stime: '',
-            ptype: 'pod'
-          },
-          {
-            lng: '129.05000000',
-            lat: '35.13333333',
-            label: 'Transfer',
-            infor: 'BUSAN,KOREA',
-            sort: '3',
-            stime: '',
-            ptype: 'poe'
-          }
-        ]
+        const { data } = res
         data &&
           data.forEach((item) => {
             const iconColorList = {

+ 1 - 11
src/views/Tracking/src/components/TrackingTable/src/TrackingTable.vue

@@ -212,17 +212,6 @@ const getTableData = async (isInit: boolean, isPageChange?: boolean) => {
   })
 }
 
-// 当 sharedData 发生变化时,更新 inputValue
-watch(
-  () => headerSearch.isChangeByLogin,
-  (newData) => {
-    if (newData) {
-      getSharedTableData()
-      headerSearch.clearChangeByLogin()
-    }
-  }
-)
-
 // 查询列表数据
 const searchTableData = (data: any) => {
   tableLoading.value = true
@@ -451,6 +440,7 @@ const handleVGM = (row) => {
 }
 defineExpose({
   searchTableData,
+  getSharedTableData,
   pageInfo
 })
 </script>