|
|
@@ -20,7 +20,7 @@ import { useDriver } from '@/utils/driverGuide'
|
|
|
|
|
|
// import { driver } from 'driver.js'
|
|
|
|
|
|
-const steps: any = [
|
|
|
+const oceanSteps: any = [
|
|
|
{
|
|
|
element: '#driver-step-tracking-detail-1',
|
|
|
popover: {
|
|
|
@@ -87,8 +87,76 @@ const steps: any = [
|
|
|
}
|
|
|
}
|
|
|
]
|
|
|
-const { start } = useDriver(steps)
|
|
|
+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: `
|
|
|
+ <ol style="margin-left: 16px; list-style: disc">
|
|
|
+ <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: `
|
|
|
+ <ol style="margin-left: 16px; list-style: disc">
|
|
|
+ <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'
|
|
|
+ }
|
|
|
+ }
|
|
|
+]
|
|
|
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 } = useDriver(steps)
|
|
|
+ console.log(allData.value?.transportInfo?.mode, 'value')
|
|
|
start() // 开始引导
|
|
|
}
|
|
|
|