|
@@ -1,7 +1,12 @@
|
|
|
<template>
|
|
|
<div class="ThreeDetailBox">
|
|
|
<ul>
|
|
|
- <li v-for="(item, index) in signs" :key="index">
|
|
|
+ <li
|
|
|
+ v-for="(item, index) in signs"
|
|
|
+ :class="{ active: currentIndex === index }"
|
|
|
+ :key="index"
|
|
|
+ @click="clickHandle(item, index)"
|
|
|
+ >
|
|
|
<span class="circle">{{ item['icon'] }}</span>
|
|
|
<div>
|
|
|
<p class="title">{{ item['title'] }}</p>
|
|
@@ -16,14 +21,13 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-const signs = ref<
|
|
|
- {
|
|
|
- icon: string
|
|
|
- title: string
|
|
|
- value: number
|
|
|
- unit: string
|
|
|
- }[]
|
|
|
->([
|
|
|
+interface SignInterface {
|
|
|
+ icon: string
|
|
|
+ title: string
|
|
|
+ value: number
|
|
|
+ unit: string
|
|
|
+}
|
|
|
+const signs = ref<SignInterface[]>([
|
|
|
{ icon: '签', title: '2023年度签约', value: 15005.65, unit: '万元' },
|
|
|
{ icon: '回', title: '2023年度回款', value: 15005.65, unit: '万元' },
|
|
|
{ icon: '净', title: '2023年度净合同额', value: 15005.65, unit: '万元' },
|
|
@@ -31,12 +35,19 @@ const signs = ref<
|
|
|
{ icon: '应', title: '总应收款', value: 15005.65, unit: '万元' },
|
|
|
{ icon: '余', title: '总合同余额', value: 15005.65, unit: '万元' }
|
|
|
])
|
|
|
+const currentIndex = ref<number>(0)
|
|
|
+const $emit = defineEmits<{
|
|
|
+ (e: 'click', v: SignInterface): void
|
|
|
+}>()
|
|
|
+const clickHandle = (item: SignInterface, index: number): void => {
|
|
|
+ currentIndex.value = index
|
|
|
+ $emit('click', item)
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-@import '../common.scss';
|
|
|
.ThreeDetailBox {
|
|
|
- padding: 30px 20px;
|
|
|
+ padding: 35px 20px;
|
|
|
height: 100%;
|
|
|
> ul {
|
|
|
height: 100%;
|
|
@@ -46,36 +57,42 @@ const signs = ref<
|
|
|
align-content: space-between;
|
|
|
> li {
|
|
|
padding: 10px 20px;
|
|
|
- border-radius: 4px;
|
|
|
+ border-radius: 8px;
|
|
|
border: 2px solid transparent;
|
|
|
cursor: pointer;
|
|
|
- &:hover {
|
|
|
- border-color: #498bef;
|
|
|
- background: linear-gradient(270deg, #eaf4ff 0%, #f9fcff 100%);
|
|
|
- }
|
|
|
&:nth-child(2n + 1) {
|
|
|
margin-right: 15px;
|
|
|
}
|
|
|
display: flex;
|
|
|
> .circle {
|
|
|
display: block;
|
|
|
- width: 56px;
|
|
|
- height: 56px;
|
|
|
- line-height: 56px;
|
|
|
+ width: 66px;
|
|
|
+ height: 66px;
|
|
|
+ line-height: 66px;
|
|
|
border-radius: 50%;
|
|
|
background-color: #498bef;
|
|
|
color: #fff;
|
|
|
- font-size: 18px;
|
|
|
+ font-size: 22px;
|
|
|
text-align: center;
|
|
|
margin-right: 5px;
|
|
|
}
|
|
|
+ &:nth-child(1),
|
|
|
+ &:nth-child(2) {
|
|
|
+ &.active,
|
|
|
+ &:hover {
|
|
|
+ border-color: #498bef;
|
|
|
+ background: linear-gradient(270deg, #eaf4ff 0%, #f9fcff 100%);
|
|
|
+ }
|
|
|
+ }
|
|
|
&:nth-child(3),
|
|
|
&:nth-child(4) {
|
|
|
> .circle {
|
|
|
background-color: #05ce9e;
|
|
|
}
|
|
|
+ &.active,
|
|
|
&:hover {
|
|
|
border-color: #05ce9e;
|
|
|
+ background: linear-gradient(270deg, #eaf4ff 0%, #f9fcff 100%);
|
|
|
}
|
|
|
}
|
|
|
&:nth-child(5),
|
|
@@ -83,18 +100,27 @@ const signs = ref<
|
|
|
> .circle {
|
|
|
background-color: #f9a527;
|
|
|
}
|
|
|
- &:hover {
|
|
|
- border-color: #f9a527;
|
|
|
- }
|
|
|
}
|
|
|
> div {
|
|
|
> .title {
|
|
|
color: #2d333c;
|
|
|
- font-size: 15px;
|
|
|
+ font-size: 16px;
|
|
|
margin-bottom: 5px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .numberBox {
|
|
|
+ > .number {
|
|
|
+ font-size: 26px;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ > .unit {
|
|
|
+ font-size: 16px;
|
|
|
+ margin-left: 3px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #2d333c;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|