Browse Source

style: 调整导览样式

jack 5 months ago
parent
commit
81c06a2d7b

+ 1 - 4
src/components/MoreFilters/src/MoreFilters.vue

@@ -1025,7 +1025,7 @@ const moreFiltersGuideImg = computed(() => {
         id="more-filters-guide"
         id="more-filters-guide"
         v-show="props.isShowMoreFiltersGuidePhoto"
         v-show="props.isShowMoreFiltersGuidePhoto"
         :class="{ 'dark-more-filters-guide-class': themeStore.theme === 'dark' }"
         :class="{ 'dark-more-filters-guide-class': themeStore.theme === 'dark' }"
-        class="more-filters-guide-class position-absolute"
+        class="more-filters-guide-class position-absolute-guide"
         :src="moreFiltersGuideImg"
         :src="moreFiltersGuideImg"
         alt=""
         alt=""
       />
       />
@@ -1231,9 +1231,6 @@ const moreFiltersGuideImg = computed(() => {
 </template>
 </template>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-.position-absolute {
-  position: absolute;
-}
 img.more-filters-guide-class {
 img.more-filters-guide-class {
   right: -1px;
   right: -1px;
   top: -1px;
   top: -1px;

+ 6 - 1
src/components/VTipTooltip/src/VTipTooltip.vue

@@ -17,6 +17,7 @@ const visible = ref(false)
 <template>
 <template>
   <div style="display: inline-block">
   <div style="display: inline-block">
     <el-tooltip
     <el-tooltip
+      effect="dark"
       popper-class="v-tip-tooltip"
       popper-class="v-tip-tooltip"
       v-model="visible"
       v-model="visible"
       :placement="props.placement"
       :placement="props.placement"
@@ -37,7 +38,7 @@ const visible = ref(false)
 div.v-tip-tooltip {
 div.v-tip-tooltip {
   padding: 16px;
   padding: 16px;
   border-radius: 12px;
   border-radius: 12px;
-  background-color: var(--color-tour-next-btn-color) !important;
+  // background-color: var(--color-tour-next-btn-color) !important;
   border: 0 !important;
   border: 0 !important;
   box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.1) !important;
   box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.1) !important;
   // .el-popper__arrow:before {
   // .el-popper__arrow:before {
@@ -45,6 +46,10 @@ div.v-tip-tooltip {
   //   background-color: var(--color-tour-next-btn-color) !important;
   //   background-color: var(--color-tour-next-btn-color) !important;
   //   box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.1) !important;
   //   box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.1) !important;
   // }
   // }
+  .label {
+    color: #f0f1f3;
+    font-size: 14px;
+  }
   .photo {
   .photo {
     width: 368px;
     width: 368px;
     margin-top: 8px;
     margin-top: 8px;

+ 203 - 1
src/stores/modules/guide.ts

@@ -1,5 +1,153 @@
 // store/guide.ts
 // store/guide.ts
 import { defineStore } from 'pinia'
 import { defineStore } from 'pinia'
+import { useDriver } from '@/utils/driverGuide'
+
+const oceanSteps: any = [
+  {
+    element: '#driver-step-tracking-detail-1',
+    popover: {
+      title: '',
+      description: 'Main operation button area',
+      side: 'bottom',
+      align: 'start'
+    }
+  },
+  {
+    element: '#driver-step-tracking-detail-2',
+    popover: {
+      description: 'Key shipment status',
+      side: 'bottom',
+      align: 'start'
+    }
+  },
+  {
+    element: '#driver-step-tracking-detail-3',
+    popover: {
+      description: 'Detail container status of each container',
+      side: 'bottom',
+      align: 'start'
+    }
+  },
+  {
+    element: '#tracking-map',
+    popover: {
+      description: `
+        <ul>
+          <li>Actual Line(Actual Trajectory)</li>
+          <li>Virtual Line(Planned Trajectory)</li>
+          <li>Arrow (Current Real-time Position)</li>
+        </ol>
+      `,
+      side: 'bottom',
+      align: 'start'
+    }
+  },
+  {
+    element: '#driver-step-tracking-detail-5',
+    popover: {
+      description: `
+      <ul>
+        <li>Upload Files</li>
+        <li>Clickable download icons to download files</li>
+      </ol>
+      `,
+      side: 'bottom',
+      align: 'start'
+    }
+  },
+  {
+    element: '#driver-step-tracking-detail-6',
+    popover: {
+      description: `
+        <p>Send email to site staff</p>
+        <p>Enter contents you want to communicate with, click “Send 
+         Email” button to send out.
+        </p>
+      `,
+      side: 'bottom',
+      align: 'start'
+    }
+  },
+  {
+    element: '#page-guide-btn-guide',
+    popover: {
+      title: '',
+      description:
+        'After closing, you can still click the "page guide" button to view the page guide of the current page.',
+      side: 'bottom'
+    }
+  }
+]
+const airSteps: any = [
+  {
+    element: '#driver-step-tracking-detail-1',
+    popover: {
+      title: '',
+      description: 'Main operation button area',
+      side: 'bottom',
+      align: 'start'
+    }
+  },
+  {
+    element: '#driver-step-tracking-detail-2',
+    popover: {
+      description: 'Key shipment status',
+      side: 'bottom',
+      align: 'start'
+    }
+  },
+  {
+    element: '#tracking-map',
+    popover: {
+      description: `
+        <ul>
+          <li>Actual Line(Actual Trajectory)</li>
+          <li>Virtual Line(Planned Trajectory)</li>
+          <li>Arrow (Current Real-time Position)</li>
+        </ol>
+      `,
+      side: 'bottom',
+      align: 'start'
+    }
+  },
+  {
+    element: '#driver-step-tracking-detail-5',
+    popover: {
+      description: `
+      <ul>
+        <li>Upload Files</li>
+        <li>Clickable download icons to download files</li>
+      </ol>
+      `,
+      side: 'bottom',
+      align: 'start'
+    }
+  },
+  {
+    element: '#driver-step-tracking-detail-6',
+    popover: {
+      description: `
+        <p>Send email to site staff</p>
+        <p>Enter contents you want to communicate with, click “Send 
+         Email” button to send out.
+        </p>
+      `,
+      side: 'bottom',
+      align: 'start'
+    }
+  },
+  {
+    element: '#page-guide-btn-guide',
+    popover: {
+      title: '',
+      description:
+        'After closing, you can still click the "page guide" button to view the page guide of the current page.',
+      side: 'bottom'
+    }
+  }
+]
+
+const guideTimer = ref<ReturnType<typeof setTimeout> | null>(null)
 export const useGuideStore = defineStore('guide', {
 export const useGuideStore = defineStore('guide', {
   state: () => ({
   state: () => ({
     booking: {
     booking: {
@@ -19,6 +167,60 @@ export const useGuideStore = defineStore('guide', {
       isShowTransportModeGuidePhoto: false,
       isShowTransportModeGuidePhoto: false,
       isShowSaveConfigGuidePhoto: false,
       isShowSaveConfigGuidePhoto: false,
       isShowKpiChartGuidePhoto: false
       isShowKpiChartGuidePhoto: false
+    },
+    trackingDetail: {
+      mode: 'Ocean Freight'
+    }
+  }),
+  actions: {
+    resetGuide(key: string) {
+      if (this.booking[key] !== undefined) {
+        this.booking[key] = false
+      } else if (this.tracking[key] !== undefined) {
+        this.tracking[key] = false
+      } else if (this.dashboard[key] !== undefined) {
+        this.dashboard[key] = false
+      }
+    },
+    handleTrackingDetailGuide() {
+      let steps = []
+      if (this.trackingDetail.mode === 'Ocean Freight') {
+        steps = oceanSteps
+      } else if (this.trackingDetail.mode === 'Air Freight') {
+        steps = airSteps
+      } else {
+        return
+      }
+      const { start, movePrevious, hasNextStep, moveTo, destroy } = useDriver(steps, {
+        onPrevClick: () => {
+          if (guideTimer.value) {
+            clearTimeout(guideTimer.value)
+            guideTimer.value = null
+          }
+          movePrevious()
+        },
+        onHighlightStarted: () => {
+          if (!hasNextStep()) {
+            guideTimer.value = setTimeout(() => {
+              destroy()
+            }, 3000)
+          }
+        },
+        onDestroyStarted: (element, step, options) => {
+          if (hasNextStep()) {
+            moveTo(options.config.steps.length - 1)
+            return
+          }
+          destroy()
+        },
+        onDestroyed: () => {
+          if (guideTimer.value) {
+            clearTimeout(guideTimer.value)
+            guideTimer.value = null
+          }
+        }
+      })
+      start() // 开始引导
     }
     }
-  })
+  }
 })
 })

+ 14 - 40
src/styles/driver.scss

@@ -5,6 +5,7 @@ div.driver-popover {
   padding-bottom: 8px;
   padding-bottom: 8px;
   background-image: linear-gradient(96deg, #b58eff 2.25%, #fdbc94 97.98%);
   background-image: linear-gradient(96deg, #b58eff 2.25%, #fdbc94 97.98%);
   box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.1);
   box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.1);
+  border-radius: 12px;
 }
 }
 // 标题
 // 标题
 header.driver-popover-title {
 header.driver-popover-title {
@@ -33,21 +34,24 @@ div.driver-popover-arrow-side-bottom {
 }
 }
 // 关闭图标
 // 关闭图标
 button.driver-popover-close-btn {
 button.driver-popover-close-btn {
-  top: 1px;
-  right: -2px;
-  color: var(--color-neutral-1);
+  top: -1px;
+  right: -6px;
+  color: #2b2f36;
   &:hover,
   &:hover,
   &:focus {
   &:focus {
-    color: var(--color-neutral-1);
+    color: #2b2f36;
   }
   }
 }
 }
 // 内容
 // 内容
 div.driver-popover-description {
 div.driver-popover-description {
-  color: var(--color-neutral-1);
+  color: #2b2f36;
   text-align: left;
   text-align: left;
   ul {
   ul {
     margin-left: 16px;
     margin-left: 16px;
     list-style: disc;
     list-style: disc;
+    li {
+      color: #2b2f36;
+    }
   }
   }
 }
 }
 
 
@@ -56,54 +60,24 @@ span.driver-popover-progress-text {
   color: rgba($color: #fff, $alpha: 0.7);
   color: rgba($color: #fff, $alpha: 0.7);
   font-size: 12px;
   font-size: 12px;
 }
 }
-.driver-popover-footer {
+footer.driver-popover-footer {
+  margin-top: 28px;
+  height: 36px;
   .driver-popover-navigation-btns {
   .driver-popover-navigation-btns {
     // 上一步
     // 上一步
     button.driver-popover-prev-btn {
     button.driver-popover-prev-btn {
       width: 96px;
       width: 96px;
-      height: 32px;
+      height: 36px;
       padding: 0;
       padding: 0;
       background-color: transparent;
       background-color: transparent;
       border: none;
       border: none;
-      // width: 96px;
-      // height: 32px;
-      // background-color: var(--color-btn-default-bg-color);
-      // color: var(--color-neutral-1);
-      // fill: var(--color-neutral-1);
-      // text-shadow: none;
-      // border: 1px solid var(--color-tour-prev-btn-border);
-      // margin-left: 8px !important;
-      // border-radius: 6px;
-      // text-align: center;
-      // &:hover {
-      //   // border: 1px solid var(--color-btn-default-bg-hover);
-      //   background-color: var(--color-btn-default-bg-hover);
-      //   fill: var(--color-theme);
-      //   span {
-      //     color: var(--color-theme);
-      //   }
-      // }
     }
     }
     button.driver-popover-next-btn {
     button.driver-popover-next-btn {
       width: 96px;
       width: 96px;
-      height: 32px;
+      height: 36px;
       padding: 0;
       padding: 0;
       background-color: transparent;
       background-color: transparent;
       border: none;
       border: none;
-      // background-color: var(--color-tour-next-btn-bg);
-      // fill: var(--color-tour-next-btn-color);
-      // border: none;
-      // text-shadow: none;
-      // color: var(--color-tour-next-btn-color);
-      // border-radius: 6px;
-      // text-align: center;
-      // &:hover {
-      //   background-color: var(--color-tour-next-btn-hover-bg);
-      //   fill: var(--color-tour-next-btn-bg);
-      //   span {
-      //     color: var(--color-tour-next-btn-color) !important;
-      //   }
-      // }
     }
     }
   }
   }
 }
 }

+ 6 - 0
src/styles/index.scss

@@ -51,3 +51,9 @@
 .icon_dark {
 .icon_dark {
   fill: var(--color-neutral-1);
   fill: var(--color-neutral-1);
 }
 }
+
+.position-absolute-guide {
+  position: absolute;
+  z-index: 1200;
+  box-shadow: 3px 3px 16px 0px rgba(0, 0, 0, 0.2);
+}

+ 3 - 2
src/utils/driverGuide.ts

@@ -28,7 +28,7 @@ export function useDriver(steps: DriveStep[], globalConfig?: Config) {
         img.src = stepsLength - 1 === state.activeIndex ? doneBtnImg : nextBtnImg // 替换成你的图片路径
         img.src = stepsLength - 1 === state.activeIndex ? doneBtnImg : nextBtnImg // 替换成你的图片路径
         img.alt = 'next'
         img.alt = 'next'
         img.style.width = '96px'
         img.style.width = '96px'
-        img.style.height = '32px'
+        img.style.height = '36px'
         nextBtn.appendChild(img)
         nextBtn.appendChild(img)
       }
       }
 
 
@@ -39,8 +39,9 @@ export function useDriver(steps: DriveStep[], globalConfig?: Config) {
         img.src = previousBtnImg // 替换成你的图片路径
         img.src = previousBtnImg // 替换成你的图片路径
         img.alt = 'previous'
         img.alt = 'previous'
         img.style.width = '96px'
         img.style.width = '96px'
-        img.style.height = '32px'
+        img.style.height = '36px'
         previousBtn.appendChild(img)
         previousBtn.appendChild(img)
+        img.style.display = state.activeIndex > 0 ? 'block' : 'none' // 如果是第一个步骤,则隐藏上一页按钮
       }
       }
     }
     }
   })
   })

+ 0 - 4
src/views/Booking/src/BookingView.vue

@@ -502,10 +502,6 @@ const handleGuide = () => {
 </template>
 </template>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-.position-absolute {
-  position: absolute;
-  z-index: 1200;
-}
 .filter-box {
 .filter-box {
   width: 100%;
   width: 100%;
   display: flex;
   display: flex;

+ 4 - 4
src/views/Booking/src/components/BookingGuide.vue

@@ -53,7 +53,7 @@ const steps: any = [
     element: '#more-filters-guide',
     element: '#more-filters-guide',
     popover: {
     popover: {
       title: '',
       title: '',
-      description: 'Click "more filters" to see more search options.',
+      description: 'Click "More Filters" to see more search options.',
       side: 'left'
       side: 'left'
     }
     }
   },
   },
@@ -196,7 +196,7 @@ defineExpose({
       <img
       <img
         id="booking-download-file-guide"
         id="booking-download-file-guide"
         v-show="bookingGuideStore.isShowDownloadFileGuidePhoto"
         v-show="bookingGuideStore.isShowDownloadFileGuidePhoto"
-        class="position-absolute download-file-guide-class"
+        class="position-absolute-guide download-file-guide-class"
         :src="downloadFileImg"
         :src="downloadFileImg"
         alt=""
         alt=""
       />
       />
@@ -206,7 +206,7 @@ defineExpose({
       <img
       <img
         id="booking-customize-columns-guide"
         id="booking-customize-columns-guide"
         v-show="bookingGuideStore.isShowCustomizeColumnsGuidePhoto"
         v-show="bookingGuideStore.isShowCustomizeColumnsGuidePhoto"
-        class="position-absolute customize-columns-guide-class"
+        class="position-absolute-guide customize-columns-guide-class"
         :src="customizeColumnsImg"
         :src="customizeColumnsImg"
         alt=""
         alt=""
       />
       />
@@ -215,7 +215,7 @@ defineExpose({
 </template>
 </template>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-.position-absolute {
+.position-absolute-guide {
   position: absolute;
   position: absolute;
   z-index: 1200;
   z-index: 1200;
 }
 }

+ 27 - 24
src/views/Dashboard/src/DashboardView.vue

@@ -809,6 +809,11 @@ const handleGuide = () => {
   dashboardGuideRef.value?.startGuide()
   dashboardGuideRef.value?.startGuide()
 }
 }
 const dashboardGuideRef = ref(null)
 const dashboardGuideRef = ref(null)
+
+function handleImageClick(event) {
+  event.stopPropagation() // 阻止事件冒泡
+  alert('Image clicked')
+}
 </script>
 </script>
 <template>
 <template>
   <div class="dashboard">
   <div class="dashboard">
@@ -822,25 +827,19 @@ const dashboardGuideRef = ref(null)
         <VDriverGuide style="margin-top: -1px" @click="handleGuide"></VDriverGuide>
         <VDriverGuide style="margin-top: -1px" @click="handleGuide"></VDriverGuide>
       </div>
       </div>
 
 
-      <div>
+      <div style="position: relative">
         <el-popover trigger="click" width="400" popper-style="border-radius: 12px">
         <el-popover trigger="click" width="400" popper-style="border-radius: 12px">
           <template #reference>
           <template #reference>
-            <el-button class="el-button--default" style="position: relative">
+            <el-button class="el-button--default">
               <span class="iconfont_icon">
               <span class="iconfont_icon">
                 <svg class="iconfont" aria-hidden="true">
                 <svg class="iconfont" aria-hidden="true">
                   <use xlink:href="#icon-icon_view__management_b"></use>
                   <use xlink:href="#icon-icon_view__management_b"></use>
                 </svg>
                 </svg>
               </span>
               </span>
               View Management
               View Management
-              <img
-                id="view-management-guide"
-                v-if="guideStore.dashboard.isShowViewManagementGuidePhoto"
-                class="view-management-guide-class"
-                :src="viewManagementImg"
-                alt=""
-              />
             </el-button>
             </el-button>
           </template>
           </template>
+
           <div class="Management">
           <div class="Management">
             <div class="title">View Management</div>
             <div class="title">View Management</div>
             <div class="management_content" v-for="(item, index) in Management" :key="index">
             <div class="management_content" v-for="(item, index) in Management" :key="index">
@@ -864,6 +863,14 @@ const dashboardGuideRef = ref(null)
             </div>
             </div>
           </div>
           </div>
         </el-popover>
         </el-popover>
+
+        <img
+          id="view-management-guide"
+          v-if="guideStore.dashboard.isShowViewManagementGuidePhoto"
+          class="view-management-guide-class"
+          :src="viewManagementImg"
+          alt=""
+        />
         <el-popover
         <el-popover
           :visible="SaveVisible"
           :visible="SaveVisible"
           :popper-style="{
           :popper-style="{
@@ -876,7 +883,6 @@ const dashboardGuideRef = ref(null)
           <template #reference>
           <template #reference>
             <el-button
             <el-button
               class="el-button--default"
               class="el-button--default"
-              style="position: relative"
               @blur="SaveVisible = false"
               @blur="SaveVisible = false"
               @click="SaveVisible = !SaveVisible"
               @click="SaveVisible = !SaveVisible"
             >
             >
@@ -886,15 +892,6 @@ const dashboardGuideRef = ref(null)
                 </svg>
                 </svg>
               </span>
               </span>
               Save
               Save
-
-              <!-- v-if="guideStore.dashboard.isShowSaveConfigGuidePhoto" -->
-              <img
-                id="save-config-guide"
-                v-if="guideStore.dashboard.isShowSaveConfigGuidePhoto"
-                class="save-config-guide-class"
-                :src="saveConfigImg"
-                alt=""
-              />
               <span class="iconfont_icon">
               <span class="iconfont_icon">
                 <svg class="iconfont" aria-hidden="true">
                 <svg class="iconfont" aria-hidden="true">
                   <use xlink:href="#icon-icon_dropdown_b"></use>
                   <use xlink:href="#icon-icon_dropdown_b"></use>
@@ -919,6 +916,13 @@ const dashboardGuideRef = ref(null)
             <div>Save Layout</div>
             <div>Save Layout</div>
           </div>
           </div>
         </el-popover>
         </el-popover>
+        <img
+          id="save-config-guide"
+          v-if="guideStore.dashboard.isShowSaveConfigGuidePhoto"
+          class="save-config-guide-class position-absolute-guide"
+          :src="saveConfigImg"
+          alt=""
+        />
       </div>
       </div>
     </div>
     </div>
     <!-- 图表 -->
     <!-- 图表 -->
@@ -951,7 +955,7 @@ const dashboardGuideRef = ref(null)
                   <img
                   <img
                     v-if="guideStore.dashboard.isShowKpiChartGuidePhoto"
                     v-if="guideStore.dashboard.isShowKpiChartGuidePhoto"
                     id="kpi-chart-guide"
                     id="kpi-chart-guide"
-                    class="kpi-chart-guide-class"
+                    class="kpi-chart-guide-class position-absolute-guide"
                     :src="kpiChartImg"
                     :src="kpiChartImg"
                     alt=""
                     alt=""
                   />
                   />
@@ -1358,8 +1362,8 @@ const dashboardGuideRef = ref(null)
 
 
 .view-management-guide-class {
 .view-management-guide-class {
   position: absolute;
   position: absolute;
-  top: -1px;
-  right: -17px;
+  top: 0px;
+  right: 89px;
   width: 343px;
   width: 343px;
   height: 478px;
   height: 478px;
   z-index: 1500;
   z-index: 1500;
@@ -1367,13 +1371,12 @@ const dashboardGuideRef = ref(null)
 .save-config-guide-class {
 .save-config-guide-class {
   position: absolute;
   position: absolute;
   top: -1px;
   top: -1px;
-  right: -1px;
+  right: 0px;
   width: 117px;
   width: 117px;
   height: 115px;
   height: 115px;
   z-index: 1500;
   z-index: 1500;
 }
 }
 .kpi-chart-guide-class {
 .kpi-chart-guide-class {
-  position: absolute;
   top: -1px;
   top: -1px;
   right: -1px;
   right: -1px;
   width: 589px;
   width: 589px;

+ 11 - 15
src/views/Dashboard/src/components/DashFiters.vue

@@ -190,11 +190,7 @@ const guideStore = useGuideStore()
       :offset="8"
       :offset="8"
     >
     >
       <template #reference>
       <template #reference>
-        <el-button
-          style="position: relative"
-          class="el-button--default"
-          @click="filters_visible = !filters_visible"
-        >
+        <el-button class="el-button--default" @click="filters_visible = !filters_visible">
           <span class="iconfont_icon">
           <span class="iconfont_icon">
             <svg class="iconfont" aria-hidden="true">
             <svg class="iconfont" aria-hidden="true">
               <use xlink:href="#icon-icon_filter_b"></use>
               <use xlink:href="#icon-icon_filter_b"></use>
@@ -206,14 +202,6 @@ const guideStore = useGuideStore()
               <use xlink:href="#icon-icon_dropdown_b"></use>
               <use xlink:href="#icon-icon_dropdown_b"></use>
             </svg>
             </svg>
           </span>
           </span>
-
-          <img
-            v-if="isShowTransportModeGuide && guideStore.dashboard.isShowTransportModeGuidePhoto"
-            id="transport-mode-guide"
-            :src="transportModeImg"
-            class="transport-mode-guide-class"
-            alt=""
-          />
         </el-button>
         </el-button>
       </template>
       </template>
       <div class="Dash_title">Transport Mode</div>
       <div class="Dash_title">Transport Mode</div>
@@ -297,17 +285,25 @@ const guideStore = useGuideStore()
         </div>
         </div>
       </div>
       </div>
     </el-popover>
     </el-popover>
+    <img
+      id="transport-mode-guide"
+      :src="transportModeImg"
+      v-if="isShowTransportModeGuide && guideStore.dashboard.isShowTransportModeGuidePhoto"
+      class="transport-mode-guide-class position-absolute-guide"
+      alt=""
+    />
   </div>
   </div>
 </template>
 </template>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .DashFilters {
 .DashFilters {
+  position: relative;
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
 }
 }
 .transport-mode-guide-class {
 .transport-mode-guide-class {
   position: absolute;
   position: absolute;
-  right: -1px;
-  top: -2px;
+  right: 0px;
+  top: -1px;
   width: 417px;
   width: 417px;
   height: 314px;
   height: 314px;
   z-index: 1000;
   z-index: 1000;

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

@@ -8,7 +8,9 @@ import { useHeaderSearch } from '@/stores/modules/headerSearch'
 import { onBeforeRouteUpdate } from 'vue-router'
 import { onBeforeRouteUpdate } from 'vue-router'
 import { useLoadingState } from '@/stores/modules/loadingState'
 import { useLoadingState } from '@/stores/modules/loadingState'
 import { useThemeStore } from '@/stores/modules/theme'
 import { useThemeStore } from '@/stores/modules/theme'
+import { useGuideStore } from '@/stores/modules/guide'
 
 
+const guideStore = useGuideStore()
 const themeStore = useThemeStore()
 const themeStore = useThemeStore()
 const userStore = useUserStore()
 const userStore = useUserStore()
 const route = useRoute()
 const route = useRoute()
@@ -161,7 +163,13 @@ const closePopover = () => {
 
 
 <template>
 <template>
   <div class="layout-toolbar">
   <div class="layout-toolbar">
-    <VBreadcrumb></VBreadcrumb>
+    <div style="display: flex">
+      <VBreadcrumb></VBreadcrumb>
+      <VDriverGuide
+        v-if="route.name === 'Tracking Detail'"
+        @click="guideStore.handleTrackingDetailGuide()"
+      ></VDriverGuide>
+    </div>
     <div class="right-info">
     <div class="right-info">
       <el-input
       <el-input
         v-model="searchValue"
         v-model="searchValue"
@@ -326,6 +334,7 @@ const closePopover = () => {
 .layout-toolbar {
 .layout-toolbar {
   display: flex;
   display: flex;
   justify-content: space-between;
   justify-content: space-between;
+  align-items: center;
   height: 100%;
   height: 100%;
 }
 }
 .right-info {
 .right-info {
@@ -495,4 +504,4 @@ div.el-popover.el-popper.user-config-popover {
 div.el-popper.theme-popper-class {
 div.el-popper.theme-popper-class {
   padding: 3px 4px;
   padding: 3px 4px;
 }
 }
-</style>
+</style>

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

@@ -750,10 +750,6 @@ const handleGuide = () => {
 </template>
 </template>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-.position-absolute {
-  position: absolute;
-  z-index: 1200;
-}
 .filter-box {
 .filter-box {
   width: 100%;
   width: 100%;
   display: flex;
   display: flex;

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

@@ -16,196 +16,8 @@ import { useOverflow } from '@/hooks/useOverflow'
 import { formatTimezone } from '@/utils/tools'
 import { formatTimezone } from '@/utils/tools'
 import { useThemeStore } from '@/stores/modules/theme'
 import { useThemeStore } from '@/stores/modules/theme'
 import ShareLinkDialog from './components/ShareLinkDialog.vue'
 import ShareLinkDialog from './components/ShareLinkDialog.vue'
-import { useDriver } from '@/utils/driverGuide'
-
-// import { driver } from 'driver.js'
-
-const oceanSteps: any = [
-  {
-    element: '#driver-step-tracking-detail-1',
-    popover: {
-      title: '',
-      description: 'Main operation button area',
-      side: 'bottom',
-      align: 'start'
-    }
-  },
-  {
-    element: '#driver-step-tracking-detail-2',
-    popover: {
-      description: 'Key shipment status',
-      side: 'bottom',
-      align: 'start'
-    }
-  },
-  {
-    element: '#driver-step-tracking-detail-3',
-    popover: {
-      description: 'Detail container status of each container',
-      side: 'bottom',
-      align: 'start'
-    }
-  },
-  {
-    element: '#tracking-map',
-    popover: {
-      description: `
-        <ul>
-          <li>Actual Line(Actual Trajectory)</li>
-          <li>Virtual Line(Planned Trajectory)</li>
-          <li>Arrow (Current Real-time Position)</li>
-        </ol>
-      `,
-      side: 'bottom',
-      align: 'start'
-    }
-  },
-  {
-    element: '#driver-step-tracking-detail-5',
-    popover: {
-      description: `
-      <ul>
-        <li>Upload Files</li>
-        <li>Clickable download icons to download files</li>
-      </ol>
-      `,
-      side: 'bottom',
-      align: 'start'
-    }
-  },
-  {
-    element: '#driver-step-tracking-detail-6',
-    popover: {
-      description: `
-        <p>Send email to site staff</p>
-        <p>Enter contents you want to communicate with, click “Send 
-         Email” button to send out.
-        </p>
-      `,
-      side: 'bottom',
-      align: 'start'
-    }
-  },
-  {
-    element: '#page-guide-btn-guide',
-    popover: {
-      title: '',
-      description:
-        'After closing, you can still click the "page guide" button to view the page guide of the current page.',
-      side: 'bottom'
-    }
-  }
-]
-const airSteps: any = [
-  {
-    element: '#driver-step-tracking-detail-1',
-    popover: {
-      title: '',
-      description: 'Main operation button area',
-      side: 'bottom',
-      align: 'start'
-    }
-  },
-  {
-    element: '#driver-step-tracking-detail-2',
-    popover: {
-      description: 'Key shipment status',
-      side: 'bottom',
-      align: 'start'
-    }
-  },
-  {
-    element: '#tracking-map',
-    popover: {
-      description: `
-        <ul>
-          <li>Actual Line(Actual Trajectory)</li>
-          <li>Virtual Line(Planned Trajectory)</li>
-          <li>Arrow (Current Real-time Position)</li>
-        </ol>
-      `,
-      side: 'bottom',
-      align: 'start'
-    }
-  },
-  {
-    element: '#driver-step-tracking-detail-5',
-    popover: {
-      description: `
-      <ul>
-        <li>Upload Files</li>
-        <li>Clickable download icons to download files</li>
-      </ol>
-      `,
-      side: 'bottom',
-      align: 'start'
-    }
-  },
-  {
-    element: '#driver-step-tracking-detail-6',
-    popover: {
-      description: `
-        <p>Send email to site staff</p>
-        <p>Enter contents you want to communicate with, click “Send 
-         Email” button to send out.
-        </p>
-      `,
-      side: 'bottom',
-      align: 'start'
-    }
-  },
-  {
-    element: '#page-guide-btn-guide',
-    popover: {
-      title: '',
-      description:
-        'After closing, you can still click the "page guide" button to view the page guide of the current page.',
-      side: 'bottom'
-    }
-  }
-]
-
-const guideTimer = ref<ReturnType<typeof setTimeout> | null>(null)
-const handleGuide = () => {
-  let steps = []
-  if (allData.value?.transportInfo?.mode === 'Ocean Freight') {
-    steps = oceanSteps
-  } else if (allData.value?.transportInfo?.mode === 'Air Freight') {
-    steps = airSteps
-  } else {
-    return
-  }
-  const { start, movePrevious, hasNextStep, moveTo, destroy } = useDriver(steps, {
-    onPrevClick: () => {
-      if (guideTimer.value) {
-        clearTimeout(guideTimer.value)
-        guideTimer.value = null
-      }
-      movePrevious()
-    },
-    onHighlightStarted: () => {
-      if (!hasNextStep()) {
-        guideTimer.value = setTimeout(() => {
-          destroy()
-        }, 3000)
-      }
-    },
-    onDestroyStarted: (element, step, options) => {
-      if (hasNextStep()) {
-        moveTo(options.config.steps.length - 1)
-        return
-      }
-      destroy()
-    },
-    onDestroyed: () => {
-      if (guideTimer.value) {
-        clearTimeout(guideTimer.value)
-        guideTimer.value = null
-      }
-    }
-  })
-  start() // 开始引导
-}
+import { useGuideStore } from '@/stores/modules/guide'
+const guideStore = useGuideStore()
 
 
 const route = useRoute()
 const route = useRoute()
 
 
@@ -288,6 +100,7 @@ const getData = () => {
       if (res.code === 200) {
       if (res.code === 200) {
         // 获取数据
         // 获取数据
         allData.value = res.data
         allData.value = res.data
+        guideStore.trackingDetail.mode = allData.value?.transportInfo?.mode || 'Ocean Freight'
       }
       }
     })
     })
     .finally(() => {
     .finally(() => {
@@ -326,7 +139,7 @@ const openShareDialog = () => {
         <VTag large :type="allData?.transportInfo?.status">{{
         <VTag large :type="allData?.transportInfo?.status">{{
           allData?.transportInfo?.status
           allData?.transportInfo?.status
         }}</VTag>
         }}</VTag>
-        <VDriverGuide @click="handleGuide"></VDriverGuide>
+
         <div class="right-operation" id="driver-step-tracking-detail-1">
         <div class="right-operation" id="driver-step-tracking-detail-1">
           <el-button
           <el-button
             v-if="
             v-if="

+ 3 - 8
src/views/Tracking/src/components/TrackingGuide.vue

@@ -58,7 +58,7 @@ const steps: any = [
     element: '#more-filters-guide',
     element: '#more-filters-guide',
     popover: {
     popover: {
       title: '',
       title: '',
-      description: 'Click "more filters" to see more search options.',
+      description: 'Click "More Filters" to see more search options.',
       side: 'left'
       side: 'left'
     }
     }
   },
   },
@@ -210,7 +210,7 @@ defineExpose({
       <img
       <img
         style="box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.1)"
         style="box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.1)"
         id="download-file-guide"
         id="download-file-guide"
-        class="position-absolute download-file-guide-class"
+        class="position-absolute-guide download-file-guide-class"
         v-if="trackingGuideStore.isShowDownloadFileGuidePhoto"
         v-if="trackingGuideStore.isShowDownloadFileGuidePhoto"
         :src="downloadFileImg"
         :src="downloadFileImg"
         alt=""
         alt=""
@@ -221,7 +221,7 @@ defineExpose({
       <img
       <img
         id="customize-columns-guide"
         id="customize-columns-guide"
         v-if="trackingGuideStore.isShowCustomizeColumnsGuidePhoto"
         v-if="trackingGuideStore.isShowCustomizeColumnsGuidePhoto"
-        class="position-absolute customize-columns-guide-class"
+        class="position-absolute-guide customize-columns-guide-class"
         :src="customizeColumnsImg"
         :src="customizeColumnsImg"
         alt=""
         alt=""
       />
       />
@@ -230,11 +230,6 @@ defineExpose({
 </template>
 </template>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-.position-absolute {
-  position: absolute;
-  z-index: 1200;
-}
-
 .download-file-guide-class {
 .download-file-guide-class {
   right: 204px;
   right: 204px;
   top: 245px;
   top: 245px;