看板
Showing
2 changed files
with
22 additions
and
22 deletions
| ... | @@ -297,7 +297,8 @@ async function handelGetYS004() { | ... | @@ -297,7 +297,8 @@ async function handelGetYS004() { |
| 297 | async function handelGetYS005() { | 297 | async function handelGetYS005() { |
| 298 | const res = await getYS005() | 298 | const res = await getYS005() |
| 299 | form.value = res.data | 299 | form.value = res.data |
| 300 | console.log(res) | 300 | console.log(form.value.leaderinfo) |
| 301 | |||
| 301 | } | 302 | } |
| 302 | 303 | ||
| 303 | 304 | ||
| ... | @@ -344,27 +345,25 @@ const handelBing1 = (arr1, arr2) => { | ... | @@ -344,27 +345,25 @@ const handelBing1 = (arr1, arr2) => { |
| 344 | type: 'pie', | 345 | type: 'pie', |
| 345 | radius: ['99%', '100%'], | 346 | radius: ['99%', '100%'], |
| 346 | center: ['50%', '60%'], | 347 | center: ['50%', '60%'], |
| 347 | label: { | ||
| 348 | show: false | ||
| 349 | }, | ||
| 350 | |||
| 351 | emphasis: { | 348 | emphasis: { |
| 352 | scale: false, | 349 | scale: false, |
| 353 | // label: { | 350 | }, |
| 354 | // show: true, | 351 | label: { |
| 355 | // } | 352 | show: false, |
| 353 | emphasis: { | ||
| 354 | show: false | ||
| 355 | } | ||
| 356 | }, | 356 | }, |
| 357 | startAngle: 180, | 357 | startAngle: 180, |
| 358 | endAngle: 360, | 358 | endAngle: 360, |
| 359 | data: [ | 359 | data: [1], |
| 360 | {value: 48}, | ||
| 361 | {value: 1}, | ||
| 362 | {value: 48} | ||
| 363 | ], | ||
| 364 | itemStyle: { | 360 | itemStyle: { |
| 365 | color: 'rgba(1, 162, 237, 1)', | 361 | color: 'rgba(1, 162, 237, 1)', |
| 366 | }, | 362 | }, |
| 367 | barWidth: 2 | 363 | barWidth: 2, |
| 364 | tooltip: { | ||
| 365 | trigger: '' | ||
| 366 | } | ||
| 368 | }, | 367 | }, |
| 369 | { | 368 | { |
| 370 | name: '营业收入', | 369 | name: '营业收入', | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div class="scrolling-container" @mouseenter="pauseScroll" @mouseleave="resumeScroll"> | 2 | <div class="scrolling-container" @mouseenter="pauseScroll" @mouseleave="resumeScroll"> |
| 3 | <div :style="{ transform: `translateY(${offset}px)` }" class="scrolling-content"> | 3 | <div :style="{ transform: `translateY(${offset}px)` }" class="scrolling-content"> |
| 4 | <div v-for="(item, index) in dataList" :key="index" class="scrolling-item"> | 4 | <div v-for="(item, index) in list" :key="index" class="scrolling-item"> |
| 5 | <span/> {{ item }} | 5 | <span/> {{ item }} |
| 6 | </div> | 6 | </div> |
| 7 | <!-- 复制一份数据实现无缝滚动 --> | 7 | <!-- 复制一份数据实现无缝滚动 --> |
| 8 | <div v-for="(item, index) in dataList" :key="`copy-${index}`" class="scrolling-item"> | 8 | <div v-for="(item, index) in list" :key="`copy-${index}`" class="scrolling-item"> |
| 9 | <span/> {{ item }} | 9 | <span/> {{ item }} |
| 10 | </div> | 10 | </div> |
| 11 | </div> | 11 | </div> |
| ... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
| 13 | </template> | 13 | </template> |
| 14 | 14 | ||
| 15 | <script setup> | 15 | <script setup> |
| 16 | import {ref, onMounted, onUnmounted} from 'vue'; | 16 | import {ref, onMounted, onUnmounted, computed} from 'vue'; |
| 17 | 17 | ||
| 18 | const props = defineProps({ | 18 | const props = defineProps({ |
| 19 | data: { | 19 | data: { |
| ... | @@ -30,7 +30,8 @@ const props = defineProps({ | ... | @@ -30,7 +30,8 @@ const props = defineProps({ |
| 30 | } | 30 | } |
| 31 | }); | 31 | }); |
| 32 | 32 | ||
| 33 | const dataList = ref([...props.data] || []); | 33 | const list = computed(() => props.data || []) |
| 34 | |||
| 34 | const offset = ref(0); | 35 | const offset = ref(0); |
| 35 | const scrollInterval = ref(null); | 36 | const scrollInterval = ref(null); |
| 36 | const isPaused = ref(false); | 37 | const isPaused = ref(false); |
| ... | @@ -46,7 +47,7 @@ const initScroll = () => { | ... | @@ -46,7 +47,7 @@ const initScroll = () => { |
| 46 | } | 47 | } |
| 47 | // 重置位置到第一条数据 | 48 | // 重置位置到第一条数据 |
| 48 | offset.value = 0; | 49 | offset.value = 0; |
| 49 | 50 | ||
| 50 | // 设置定时器 | 51 | // 设置定时器 |
| 51 | scrollInterval.value = setInterval(() => { | 52 | scrollInterval.value = setInterval(() => { |
| 52 | if (!isPaused.value) { | 53 | if (!isPaused.value) { |
| ... | @@ -75,12 +76,12 @@ onMounted(() => { | ... | @@ -75,12 +76,12 @@ onMounted(() => { |
| 75 | const container = document.querySelector('.scrolling-container'); | 76 | const container = document.querySelector('.scrolling-container'); |
| 76 | const content = document.querySelector('.scrolling-content'); | 77 | const content = document.querySelector('.scrolling-content'); |
| 77 | const firstItem = document.querySelector('.scrolling-item'); | 78 | const firstItem = document.querySelector('.scrolling-item'); |
| 78 | 79 | ||
| 79 | if (container && content && firstItem) { | 80 | if (container && content && firstItem) { |
| 80 | containerHeight.value = container.clientHeight; | 81 | containerHeight.value = container.clientHeight; |
| 81 | contentHeight.value = content.clientHeight; | 82 | contentHeight.value = content.clientHeight; |
| 82 | itemHeight.value = firstItem.clientHeight; | 83 | itemHeight.value = firstItem.clientHeight; |
| 83 | 84 | ||
| 84 | // 如果内容高度小于容器高度,不需要滚动 | 85 | // 如果内容高度小于容器高度,不需要滚动 |
| 85 | if (contentHeight.value > containerHeight.value) { | 86 | if (contentHeight.value > containerHeight.value) { |
| 86 | // 初始位置设置为显示第一条数据 | 87 | // 初始位置设置为显示第一条数据 |
| ... | @@ -118,7 +119,7 @@ onUnmounted(() => { | ... | @@ -118,7 +119,7 @@ onUnmounted(() => { |
| 118 | color: #FFFFFF; | 119 | color: #FFFFFF; |
| 119 | height: calc(40 * 100vh / 1920); | 120 | height: calc(40 * 100vh / 1920); |
| 120 | margin: calc(8 * 100vw / 1920) 0; | 121 | margin: calc(8 * 100vw / 1920) 0; |
| 121 | 122 | ||
| 122 | span { | 123 | span { |
| 123 | display: inline-block; | 124 | display: inline-block; |
| 124 | width: calc(12 * 100vw / 1920); | 125 | width: calc(12 * 100vw / 1920); | ... | ... |
-
Please register or sign in to post a comment