<template>
|
<CommonTitle title="降本增效" />
|
<div :style="{ marginLeft: pxToRem(14) }">
|
<div class="synergy">
|
<div class="synergy-item" v-for="item in list">
|
<div class="title">{{ item.name }}</div>
|
<div class="value" :style="{ color: item.color }">{{ item.value }}</div>
|
</div>
|
</div>
|
</div>
|
</template>
|
<script setup>
|
import CommonTitle from '@/components/CommonTitle.vue';
|
import { pxToRem } from '@/utils/rem';
|
import { optimizeCostEfficiency } from '@/api/home'
|
|
const list = ref([
|
{ name: '替代人工(人次)', value: 0, color: '#FFFFFF' },
|
{ name: '替代车辆(公里)', value: 0, color: '#FFA768' },
|
{ name: '节约成本(万元)', value: 0, color: '#68FFC8' },
|
]);
|
|
const getStatisticalData = () => {
|
optimizeCostEfficiency().then((res) => {
|
if (res.data.code !== 0) return;
|
let result = res.data.data
|
list.value[0].value = result.replaced_manual_times;
|
list.value[1].value = result.saved_vehicle_kilometers;
|
list.value[2].value = result.total_cost_saved;
|
});
|
};
|
onMounted(() => {
|
getStatisticalData();
|
});
|
</script>
|
|
<style scoped lang="scss">
|
.synergy {
|
width: 390px;
|
height: 108px;
|
background: linear-gradient(
|
270deg,
|
#1f3e7a 0%,
|
rgba(31, 62, 122, 0.35) 79%,
|
rgba(31, 62, 122, 0) 100%
|
);
|
opacity: 0.85;
|
margin: 2px 0 13 0;
|
display: flex;
|
justify-content: space-between;
|
padding: 11px 27px 0;
|
|
.synergy-item {
|
width: 95px;
|
height: 77px;
|
padding-top: 7px;
|
background: url('@/assets/images/home/homeRight/synergyBg.png') no-repeat center center / 100% 100%;
|
|
.title {
|
font-family: Source Han Sans CN, Source Han Sans CN, serif;
|
font-weight: 400;
|
font-size: 14px;
|
color: #ffffff;
|
text-align: center;
|
font-style: normal;
|
text-transform: none;
|
margin-bottom: 4px;
|
}
|
|
.value {
|
font-family: YouSheBiaoTiHei, YouSheBiaoTiHei, serif;
|
font-weight: 400;
|
font-size: 26px;
|
color: #ffffff;
|
line-height: 26px;
|
font-style: normal;
|
text-transform: none;
|
text-align: center;
|
}
|
}
|
}
|
</style>
|