|
|
|
@ -1,15 +1,13 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<Header /> |
|
|
|
<List :customer-list="list" /> |
|
|
|
<List ref="listRef" :customer-list="list" /> |
|
|
|
<img src="./assets/images/back_index_icon.svg" class="fixed bottom-11 left-[52px] z-100 h-12 w-28" alt="" @click="back" /> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 倒计时返回首页提示 --> |
|
|
|
<AutoBackNotification v-if="showCountDownDialog" :title="title" :delay="toWallpaperTime" /> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
import { ref, defineAsyncComponent, computed, onMounted } from 'vue' |
|
|
|
import { ref, computed, onMounted } from 'vue' |
|
|
|
import { storeToRefs } from 'pinia' |
|
|
|
import { useRootStore } from './stores/root' |
|
|
|
import { getCustomerList } from './http/api' |
|
|
|
@ -18,8 +16,6 @@ import { useHandleScreen } from '@/composables/useHandleScreen' |
|
|
|
import Header from './components/Header/Header.vue' |
|
|
|
import List from './components/List/List.vue' |
|
|
|
|
|
|
|
const AutoBackNotification = defineAsyncComponent(() => import('@/base/AutoBackNotification/AutoBackNotification.vue')) |
|
|
|
|
|
|
|
const store = useRootStore() |
|
|
|
const { device } = storeToRefs(store) |
|
|
|
|
|
|
|
@ -39,12 +35,16 @@ getCustomerList(device.value.projectCode).then(res => { |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
const { checkHandleScreen, showCountDownDialog, title, toWallpaperTime } = useHandleScreen(handleScreen) |
|
|
|
const { checkHandleScreen } = useHandleScreen(handleScreen) |
|
|
|
|
|
|
|
const listRef = ref<InstanceType<typeof List> | null>(null) |
|
|
|
//指定时间返回首页时做的操作 |
|
|
|
function handleScreen() { |
|
|
|
//TODO |
|
|
|
// router.push('/transfer') |
|
|
|
back() |
|
|
|
} |
|
|
|
|
|
|
|
function back() { |
|
|
|
listRef.value?.scroll() |
|
|
|
} |
|
|
|
|
|
|
|
onMounted(async () => { |
|
|
|
|