|
@@ -1,9 +1,6 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import { useDriver } from '@/utils/driverGuide'
|
|
import { useDriver } from '@/utils/driverGuide'
|
|
|
import { useGuideStore } from '@/stores/modules/guide'
|
|
import { useGuideStore } from '@/stores/modules/guide'
|
|
|
-import { useThemeStore } from '@/stores/modules/theme'
|
|
|
|
|
-
|
|
|
|
|
-const themeStore = useThemeStore()
|
|
|
|
|
|
|
|
|
|
const guideStore = useGuideStore()
|
|
const guideStore = useGuideStore()
|
|
|
|
|
|
|
@@ -27,6 +24,15 @@ const steps: any = [
|
|
|
side: 'bottom'
|
|
side: 'bottom'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ element: '#kpi-chart-guide',
|
|
|
|
|
+ popover: {
|
|
|
|
|
+ title: '',
|
|
|
|
|
+ description:
|
|
|
|
|
+ 'Click the icon next to the report name to view the data explanation for each report.',
|
|
|
|
|
+ side: 'bottom'
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
element: '#drag-icon-guide',
|
|
element: '#drag-icon-guide',
|
|
|
popover: {
|
|
popover: {
|
|
@@ -43,39 +49,72 @@ const steps: any = [
|
|
|
description: 'Click "Save Layout" to preserve your customized report arrangement.',
|
|
description: 'Click "Save Layout" to preserve your customized report arrangement.',
|
|
|
side: 'bottom'
|
|
side: 'bottom'
|
|
|
}
|
|
}
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ 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 { start, moveNext, movePrevious, destroy } = useDriver(steps, {
|
|
|
|
|
|
|
+const { start, moveNext, movePrevious, destroy, hasNextStep, moveTo } = useDriver(steps, {
|
|
|
onNextClick: (element, step, options) => {
|
|
onNextClick: (element, step, options) => {
|
|
|
- console.log('onNextClick', options?.state?.activeIndex)
|
|
|
|
|
if (options?.state?.activeIndex === 0) {
|
|
if (options?.state?.activeIndex === 0) {
|
|
|
dashboardGuideStore.isShowViewManagementGuidePhoto = false
|
|
dashboardGuideStore.isShowViewManagementGuidePhoto = false
|
|
|
dashboardGuideStore.isShowTransportModeGuidePhoto = true
|
|
dashboardGuideStore.isShowTransportModeGuidePhoto = true
|
|
|
} else if (options?.state?.activeIndex === 1) {
|
|
} else if (options?.state?.activeIndex === 1) {
|
|
|
dashboardGuideStore.isShowTransportModeGuidePhoto = false
|
|
dashboardGuideStore.isShowTransportModeGuidePhoto = false
|
|
|
|
|
+ dashboardGuideStore.isShowKpiChartGuidePhoto = true
|
|
|
} else if (options?.state?.activeIndex === 2) {
|
|
} else if (options?.state?.activeIndex === 2) {
|
|
|
|
|
+ dashboardGuideStore.isShowKpiChartGuidePhoto = false
|
|
|
|
|
+ } else if (options?.state?.activeIndex === 3) {
|
|
|
dashboardGuideStore.isShowSaveConfigGuidePhoto = true
|
|
dashboardGuideStore.isShowSaveConfigGuidePhoto = true
|
|
|
|
|
+ } else if (options?.state?.activeIndex === 4) {
|
|
|
|
|
+ dashboardGuideStore.isShowSaveConfigGuidePhoto = false
|
|
|
}
|
|
}
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
moveNext() // 执行下一步
|
|
moveNext() // 执行下一步
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
onPrevClick: (element, step, options) => {
|
|
onPrevClick: (element, step, options) => {
|
|
|
- console.log('onNextClick', options?.state?.activeIndex)
|
|
|
|
|
if (options?.state?.activeIndex === 1) {
|
|
if (options?.state?.activeIndex === 1) {
|
|
|
dashboardGuideStore.isShowViewManagementGuidePhoto = true
|
|
dashboardGuideStore.isShowViewManagementGuidePhoto = true
|
|
|
|
|
+ dashboardGuideStore.isShowTransportModeGuidePhoto = false
|
|
|
|
|
+ } else if (options?.state?.activeIndex === 2) {
|
|
|
|
|
+ dashboardGuideStore.isShowTransportModeGuidePhoto = true
|
|
|
|
|
+ dashboardGuideStore.isShowKpiChartGuidePhoto = false
|
|
|
|
|
+ } else if (options?.state?.activeIndex === 3) {
|
|
|
|
|
+ dashboardGuideStore.isShowKpiChartGuidePhoto = true
|
|
|
|
|
+ dashboardGuideStore.isShowSaveConfigGuidePhoto = false
|
|
|
|
|
+ } else if (options?.state?.activeIndex === 4) {
|
|
|
|
|
+ dashboardGuideStore.isShowSaveConfigGuidePhoto = false
|
|
|
|
|
+ } else if (options?.state?.activeIndex === 5) {
|
|
|
|
|
+ dashboardGuideStore.isShowSaveConfigGuidePhoto = true
|
|
|
}
|
|
}
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
movePrevious() // 执行上一步
|
|
movePrevious() // 执行上一步
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
// 关闭导览时,隐藏所有图片
|
|
// 关闭导览时,隐藏所有图片
|
|
|
- onDestroyStarted: () => {
|
|
|
|
|
|
|
+ onDestroyStarted: (element, step, options) => {
|
|
|
|
|
+ if (hasNextStep()) {
|
|
|
|
|
+ moveTo(options.config.steps.length - 1) // 如果还有下一步,跳转到下一步
|
|
|
|
|
+
|
|
|
|
|
+ dashboardGuideStore.isShowViewManagementGuidePhoto = false
|
|
|
|
|
+ dashboardGuideStore.isShowTransportModeGuidePhoto = false
|
|
|
|
|
+ dashboardGuideStore.isShowSaveConfigGuidePhoto = false
|
|
|
|
|
+ dashboardGuideStore.isShowKpiChartGuidePhoto = false
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
// showExtraHighlights.value = false // 隐藏额外高亮
|
|
// showExtraHighlights.value = false // 隐藏额外高亮
|
|
|
dashboardGuideStore.isShowViewManagementGuidePhoto = false
|
|
dashboardGuideStore.isShowViewManagementGuidePhoto = false
|
|
|
dashboardGuideStore.isShowTransportModeGuidePhoto = false
|
|
dashboardGuideStore.isShowTransportModeGuidePhoto = false
|
|
|
dashboardGuideStore.isShowSaveConfigGuidePhoto = false
|
|
dashboardGuideStore.isShowSaveConfigGuidePhoto = false
|
|
|
|
|
+ dashboardGuideStore.isShowKpiChartGuidePhoto = false
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
destroy() // 销毁导览
|
|
destroy() // 销毁导览
|
|
|
}) // 确保在下一次DOM更新后执行销毁
|
|
}) // 确保在下一次DOM更新后执行销毁
|
|
@@ -97,22 +136,4 @@ defineExpose({
|
|
|
<div></div>
|
|
<div></div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
|
|
-.position-absolute {
|
|
|
|
|
- position: absolute;
|
|
|
|
|
- z-index: 1200;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.download-file-guide-class {
|
|
|
|
|
- right: 204px;
|
|
|
|
|
- top: 245px;
|
|
|
|
|
- width: 488px;
|
|
|
|
|
- height: 333px;
|
|
|
|
|
-}
|
|
|
|
|
-.customize-columns-guide-class {
|
|
|
|
|
- right: 24px;
|
|
|
|
|
- top: 246px;
|
|
|
|
|
- width: 515px;
|
|
|
|
|
- height: 353px;
|
|
|
|
|
-}
|
|
|
|
|
-</style>
|
|
|
|
|
|
|
+<style lang="scss" scoped></style>
|