style(progressCategory): 优化进度分类页面的样式和交互效果
- 调整摘要卡片的布局和间距 - 添加悬停动画效果和渐变边框 - 改进数值显示样式和默认值处理 - 增强图标视觉效果和交互反馈
This commit is contained in:
@ -24,7 +24,7 @@
|
||||
<el-tab-pane :label="item.name" v-for="item in tabList" :key="item.id" :name="item.id"></el-tab-pane>
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-row :gutter="10" class="mb8" style="display: flex; align-items: center;">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd()">新增</el-button>
|
||||
</el-col>
|
||||
@ -40,7 +40,7 @@
|
||||
<el-col :span="1.5">
|
||||
<el-button type="info" plain icon="Sort" @click="handleToggleExpandAll">展开/折叠</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :push="6">
|
||||
<el-col :span="8" :push="8">
|
||||
<div class="summary-container">
|
||||
<div class="summary-card owner-summary">
|
||||
<div class="summary-icon">
|
||||
@ -50,7 +50,8 @@
|
||||
</div>
|
||||
<div class="summary-content">
|
||||
<div class="summary-label">产值金额(业主)</div>
|
||||
<div class="summary-value">{{ ownerOutputSum }}</div>
|
||||
<div class="summary-value" v-if="ownerOutputSum">{{ ownerOutputSum }}</div>
|
||||
<div class="summary-value" v-else>0</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="summary-card construction-summary">
|
||||
@ -61,7 +62,8 @@
|
||||
</div>
|
||||
<div class="summary-content">
|
||||
<div class="summary-label">产值金额(分包)</div>
|
||||
<div class="summary-value">{{ constructionOutputSum }}</div>
|
||||
<div class="summary-value" v-if="constructionOutputSum">{{ constructionOutputSum }}</div>
|
||||
<div class="summary-value" v-else>0</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -313,7 +315,7 @@ const ownerOutputSum = computed(() => {
|
||||
tempData.value.forEach(item => {
|
||||
sum += Number(item.ownerOutputValue);
|
||||
})
|
||||
return proxy.formatPrice(sum);
|
||||
return proxy.formatPrice(sum) ?? 0;
|
||||
});
|
||||
const constructionOutputSum = computed(() => {
|
||||
let sum = 0;
|
||||
@ -542,58 +544,100 @@ onUnmounted(() => {
|
||||
<style scoped>
|
||||
.summary-container {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
gap: 20px;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.summary-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16px 20px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #e4e7ed;
|
||||
padding: 18px 24px;
|
||||
border-radius: 12px;
|
||||
background: #ffffff;
|
||||
min-width: 200px;
|
||||
transition: all 0.2s ease;
|
||||
min-width: 260px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
||||
border: 2px solid transparent;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.summary-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 3px;
|
||||
background: linear-gradient(90deg, transparent, rgba(64, 158, 255, 0.3), transparent);
|
||||
transform: translateX(-100%);
|
||||
transition: transform 0.6s ease;
|
||||
}
|
||||
|
||||
.summary-card:hover {
|
||||
border-color: #c0c4cc;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
.summary-card:hover::before {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
.owner-summary {
|
||||
background: #f8f9fa;
|
||||
border-color: #409eff;
|
||||
color: #303133;
|
||||
border-color: rgba(64, 158, 255, 0.2);
|
||||
}
|
||||
|
||||
.owner-summary::before {
|
||||
background: linear-gradient(90deg, transparent, rgba(64, 158, 255, 0.4), transparent);
|
||||
}
|
||||
|
||||
.construction-summary {
|
||||
background: #f8f9fa;
|
||||
border-color: #67c23a;
|
||||
color: #303133;
|
||||
border-color: rgba(103, 194, 58, 0.2);
|
||||
}
|
||||
|
||||
.construction-summary::before {
|
||||
background: linear-gradient(90deg, transparent, rgba(103, 194, 58, 0.4), transparent);
|
||||
}
|
||||
|
||||
.summary-icon {
|
||||
margin-right: 12px;
|
||||
margin-right: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 4px;
|
||||
background: #f0f2f5;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 12px;
|
||||
background: #f8f9fa;
|
||||
transition: all 0.3s ease;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.summary-icon::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: 12px;
|
||||
background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.summary-card:hover .summary-icon::after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.owner-summary .summary-icon {
|
||||
background: #e6f7ff;
|
||||
background: linear-gradient(135deg, #e6f7ff, #bae7ff);
|
||||
color: #409eff;
|
||||
box-shadow: 0 2px 8px rgba(64, 158, 255, 0.2);
|
||||
}
|
||||
|
||||
.construction-summary .summary-icon {
|
||||
background: #f0f9ff;
|
||||
background: linear-gradient(135deg, #f6ffed, #d9f7be);
|
||||
color: #67c23a;
|
||||
box-shadow: 0 2px 8px rgba(103, 194, 58, 0.2);
|
||||
}
|
||||
|
||||
.summary-content {
|
||||
@ -602,15 +646,22 @@ onUnmounted(() => {
|
||||
|
||||
.summary-label {
|
||||
font-size: 13px;
|
||||
color: #909399;
|
||||
margin-bottom: 6px;
|
||||
font-weight: 400;
|
||||
color: #8c8c8c;
|
||||
margin-bottom: 8px;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.3px;
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.summary-value {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #262626;
|
||||
font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
|
||||
letter-spacing: -0.5px;
|
||||
line-height: 1.2;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
|
Reference in New Issue
Block a user