|
@@ -1,6 +1,6 @@
|
|
|
<!-- eslint-disable prettier/prettier -->
|
|
<!-- eslint-disable prettier/prettier -->
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { ref, withDefaults, onBeforeUnmount, onMounted,nextTick } from "vue"
|
|
|
|
|
|
|
+import { ref, withDefaults, onBeforeUnmount, onMounted, nextTick } from "vue"
|
|
|
import { useRouter } from "vue-router"
|
|
import { useRouter } from "vue-router"
|
|
|
import Rs from "@/core/services/RequestService"
|
|
import Rs from "@/core/services/RequestService"
|
|
|
|
|
|
|
@@ -8,8 +8,8 @@ const props = withDefaults(defineProps<{ polling?: number }>(), { polling: () =>
|
|
|
const list1 = ref<Array<any>>([])
|
|
const list1 = ref<Array<any>>([])
|
|
|
const list2 = ref<Array<any>>([])
|
|
const list2 = ref<Array<any>>([])
|
|
|
let scrollTimer1: any, scrollTimer2: any
|
|
let scrollTimer1: any, scrollTimer2: any
|
|
|
-const animate1 = ref(false)
|
|
|
|
|
-const animate2 = ref(false)
|
|
|
|
|
|
|
+const animate1 = ref(false)
|
|
|
|
|
+const animate2 = ref(false)
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
|
function beforeDestroy() {
|
|
function beforeDestroy() {
|
|
@@ -18,24 +18,24 @@ function beforeDestroy() {
|
|
|
}
|
|
}
|
|
|
function jump(type: number) {
|
|
function jump(type: number) {
|
|
|
switch (type) {
|
|
switch (type) {
|
|
|
- case 0:
|
|
|
|
|
- router.push({
|
|
|
|
|
- path: "/AnalysisInfo/clean",
|
|
|
|
|
- query: { current: 0, needBack: 1 },
|
|
|
|
|
- })
|
|
|
|
|
- break
|
|
|
|
|
- case 1:
|
|
|
|
|
- router.push({
|
|
|
|
|
- path: "/AnalysisInfo/clean",
|
|
|
|
|
- query: { current: 1, needBack: 1 },
|
|
|
|
|
- })
|
|
|
|
|
- break
|
|
|
|
|
|
|
+ case 0:
|
|
|
|
|
+ router.push({
|
|
|
|
|
+ path: "/AnalysisInfo/clean",
|
|
|
|
|
+ query: { current: 0, needBack: 1 },
|
|
|
|
|
+ })
|
|
|
|
|
+ break
|
|
|
|
|
+ case 1:
|
|
|
|
|
+ router.push({
|
|
|
|
|
+ path: "/AnalysisInfo/clean",
|
|
|
|
|
+ query: { current: 1, needBack: 1 },
|
|
|
|
|
+ })
|
|
|
|
|
+ break
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function init() {
|
|
function init() {
|
|
|
- Rs.get('sys/dataBoard/selectCleanCompany').then((res:any) => {
|
|
|
|
|
- list1.value=res.data.data.overdue_companyList
|
|
|
|
|
|
|
+ Rs.get("sys/dataBoard/selectCleanCompany").then((res: any) => {
|
|
|
|
|
+ list1.value = res.data.data.overdue_companyList
|
|
|
list2.value = res.data.data.week_clean_companyList
|
|
list2.value = res.data.data.week_clean_companyList
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
if (
|
|
if (
|
|
@@ -43,37 +43,36 @@ function init() {
|
|
|
Number((document.querySelector(".clean-box.over .box-body") as HTMLElement).offsetHeight)
|
|
Number((document.querySelector(".clean-box.over .box-body") as HTMLElement).offsetHeight)
|
|
|
) {
|
|
) {
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
- scrollTimer1 = setInterval(() => scroll(1), 5000);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ scrollTimer1 = setInterval(() => scroll(1), 5000)
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
if (
|
|
if (
|
|
|
Number((document.querySelector(".clean-box.week .list") as HTMLElement).offsetHeight) >
|
|
Number((document.querySelector(".clean-box.week .list") as HTMLElement).offsetHeight) >
|
|
|
- Number((document.querySelector(".clean-box.week .box-body") as HTMLElement).offsetHeight
|
|
|
|
|
- ))
|
|
|
|
|
- {
|
|
|
|
|
|
|
+ Number((document.querySelector(".clean-box.week .box-body") as HTMLElement).offsetHeight)
|
|
|
|
|
+ ) {
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
- scrollTimer2 = setInterval(() => scroll(2), 5000);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ scrollTimer2 = setInterval(() => scroll(2), 5000)
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}, props.polling)
|
|
}, props.polling)
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function scroll(type:number) {
|
|
|
|
|
|
|
+function scroll(type: number) {
|
|
|
if (type == 1) {
|
|
if (type == 1) {
|
|
|
- animate1.value = true;
|
|
|
|
|
|
|
+ animate1.value = true
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- list1.value.push(list1.value[0]);
|
|
|
|
|
- list1.value.shift();
|
|
|
|
|
- animate1.value = false;
|
|
|
|
|
- }, 2000);
|
|
|
|
|
|
|
+ list1.value.push(list1.value[0])
|
|
|
|
|
+ list1.value.shift()
|
|
|
|
|
+ animate1.value = false
|
|
|
|
|
+ }, 2000)
|
|
|
} else {
|
|
} else {
|
|
|
- animate2.value = true;
|
|
|
|
|
|
|
+ animate2.value = true
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- list2.value.push(list1.value[0]);
|
|
|
|
|
- list2.value.shift();
|
|
|
|
|
- animate2.value = false;
|
|
|
|
|
- }, 2000);
|
|
|
|
|
|
|
+ list2.value.push(list1.value[0])
|
|
|
|
|
+ list2.value.shift()
|
|
|
|
|
+ animate2.value = false
|
|
|
|
|
+ }, 2000)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|