|
@@ -28,7 +28,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
- import { computed, ref, onMounted } from 'vue';
|
|
|
|
|
|
|
+ import { computed, ref, onMounted, onUnmounted } from 'vue';
|
|
|
import CensusTabs from './AlgoCensusTabs.vue';
|
|
import CensusTabs from './AlgoCensusTabs.vue';
|
|
|
import ViolationStatItem from './ViolationStatItem.vue';
|
|
import ViolationStatItem from './ViolationStatItem.vue';
|
|
|
import { TimeTabEnum, violationHandleCounts } from '../types';
|
|
import { TimeTabEnum, violationHandleCounts } from '../types';
|
|
@@ -93,6 +93,10 @@
|
|
|
if (myChart.value) startAutoPlay();
|
|
if (myChart.value) startAutoPlay();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ onUnmounted(() => {
|
|
|
|
|
+ stopAutoPlay();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
function startAutoPlay() {
|
|
function startAutoPlay() {
|
|
|
stopAutoPlay();
|
|
stopAutoPlay();
|
|
|
timer = setInterval(function () {
|
|
timer = setInterval(function () {
|