| | |
| | | :backgroundImage="DataBoardDataInfoBg6" |
| | | label="发放额" |
| | | v-model:value="sumBountyReleaseAmountValue" |
| | | :precision="2" |
| | | ></DataBoardDataInfoItem> |
| | | <DataBoardDataInfoItem |
| | | :backgroundImage="DataBoardDataInfoBg7" |
| | | label="使用额" |
| | | v-model:value="sumBountyUseAmountValue" |
| | | :precision="2" |
| | | ></DataBoardDataInfoItem> |
| | | <DataBoardDataInfoItem |
| | | :backgroundImage="DataBoardDataInfoBg8" |
| | |
| | | v-model:choose="item.choose" |
| | | :parkName="item.parkName" |
| | | :class="item.class" |
| | | @click="handleClick(item.id)" |
| | | @click="handleClick(index)" |
| | | ></DataBoardCenterMapMark> |
| | | </div> |
| | | </div> |
| | |
| | | import { useIndustrialParkDropDownList } from '@/hooks'; |
| | | import _ from 'lodash'; |
| | | import { useIntervalValue } from '../hooks'; |
| | | import { useIntervalFn } from '@vueuse/core'; |
| | | |
| | | defineOptions({ |
| | | name: 'DataBoardCenterMap', |
| | |
| | | insurePeopleCount: 0, |
| | | }); |
| | | |
| | | function handleClick(id: string) { |
| | | function handleClick(chooseIndex: number) { |
| | | form.mapList.forEach((item, index) => { |
| | | item.choose = item.id === id; |
| | | item.choose = chooseIndex === index; |
| | | }); |
| | | form.industrialParkId = id; |
| | | form.industrialParkId = dataBoardIndustrialParkList.value[chooseIndex]?.id; |
| | | refetch(); |
| | | } |
| | | |
| | |
| | | }, |
| | | }); |
| | | |
| | | onMounted(async () => { |
| | | await queryClient.invalidateQueries(['industrialParkServices/getIndustrialParkDropDownList']); |
| | | if (dataBoardIndustrialParkList.value.length > 0) { |
| | | form.industrialParkId = dataBoardIndustrialParkList.value[0].id; |
| | | form.mapList = dataBoardIndustrialParkList.value; |
| | | refetch(); |
| | | } |
| | | }); |
| | | |
| | | const { value: totalCustomerCountValue, changeValue: changeTotalCustomerCount } = useIntervalValue( |
| | | form.totalCustomerCount |
| | | ); |
| | |
| | | const { value: insurePeopleCountValue, changeValue: changeInsurePeopleCount } = useIntervalValue( |
| | | form.insurePeopleCount |
| | | ); |
| | | |
| | | const { pause, resume } = useIntervalFn(() => { |
| | | if (dataBoardIndustrialParkList.value.length === 0) return; |
| | | const index = _.random(0, dataBoardIndustrialParkList.value.length - 1); |
| | | handleClick(index); |
| | | }, 30000); |
| | | |
| | | onMounted(async () => { |
| | | await queryClient.invalidateQueries(['industrialParkServices/getIndustrialParkDropDownList']); |
| | | if (dataBoardIndustrialParkList.value.length > 0) { |
| | | form.industrialParkId = dataBoardIndustrialParkList.value[0].id; |
| | | form.mapList = dataBoardIndustrialParkList.value; |
| | | refetch(); |
| | | } |
| | | resume(); |
| | | }); |
| | | |
| | | onUnmounted(() => { |
| | | pause(); |
| | | }); |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | @use '@/style/common.scss' as *; |