fix: 样式修改完善,逻辑修改。

This commit is contained in:
tianyongbao
2026-01-19 22:34:37 +08:00
parent 51c0703670
commit 6dac8011f0

View File

@@ -196,10 +196,10 @@
</view> </view>
</view> </view>
</nut-config-provider> </nut-config-provider>
<nut-row class="m_t_20" style="width: 100%; overflow: hidden;"> <view class="m_t_20" style="width: 100%; box-sizing: border-box;">
<view class="chart-header-row"> <view class="chart-header-row">
<view class="chart-title"> <view class="left-section">
<text class="title-text">{{ <text class="chart-title-text">{{
prDev === 1 prDev === 1
? "溶解氧" ? "溶解氧"
: prDev === 2 : prDev === 2
@@ -213,33 +213,35 @@
: "" : ""
}}</text> }}</text>
</view> </view>
<view class="day-selector"> <view class="center-section">
<view <view class="day-selector">
class="day-btn" <view
:class="{ active: dayDev === 1 }" class="day-btn"
@click="changeDay(1)" :class="{ active: dayDev === 1 }"
> @click="changeDay(1)"
1 >
</view> 1
<view </view>
class="day-btn" <view
:class="{ active: dayDev === 3 }" class="day-btn"
@click="changeDay(3)" :class="{ active: dayDev === 3 }"
> @click="changeDay(3)"
3 >
</view> 3
<view </view>
class="day-btn" <view
:class="{ active: dayDev === 7 }" class="day-btn"
@click="changeDay(7)" :class="{ active: dayDev === 7 }"
> @click="changeDay(7)"
7 >
7
</view>
</view> </view>
</view> </view>
<view class="chart-actions"> <view class="right-section">
<text @click="fullscreenChart" class="action-link">放大</text> <view v-show="showChart" @click="fullscreenChart" class="action-link">放大</view>
<text class="divider-dot">·</text> <text v-show="showChart" class="divider-dot">·</text>
<text @click="changeShow" class="action-link">{{ setTitle }}</text> <view @click="changeShow" class="action-link">{{ setTitle }}</view>
</view> </view>
</view> </view>
<!-- <nut-col :span="8" class="font_32 f_weight c_222"> <!-- <nut-col :span="8" class="font_32 f_weight c_222">
@@ -290,7 +292,7 @@
<nut-col :span="8" class="font_32 c_1589E9" :style="{ textAlign: 'right' }"> <nut-col :span="8" class="font_32 c_1589E9" :style="{ textAlign: 'right' }">
<view @click="changeShow">{{ setTitle }}</view> <view @click="changeShow">{{ setTitle }}</view>
</nut-col> --> </nut-col> -->
</nut-row> </view>
<view :style="{ position: 'relative', marginTop: '10px', width: '100%', overflow: 'hidden' }" v-show="showChart"> <view :style="{ position: 'relative', marginTop: '10px', width: '100%', overflow: 'hidden' }" v-show="showChart">
<view class="loading-container" v-show="loading"> <view class="loading-container" v-show="loading">
<Loading /> <Loading />
@@ -1978,78 +1980,85 @@ defineExpose({
background: #09b8c2; background: #09b8c2;
} }
// 优化后的图表标题行样式 // 全新设计的图表标题行布局
.chart-header-row { .chart-header-row {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between;
width: 100%; width: 100%;
padding: 0 5px; height: 40px;
gap: 6px; padding: 0 12px;
box-sizing: border-box;
} }
.chart-title { // 左侧区域:标题
flex: 0 0 auto; .left-section {
min-width: 55px; flex-shrink: 0;
.title-text { width: 70px;
font-size: 28px;
.chart-title-text {
font-size: 30px;
font-weight: 600; font-weight: 600;
color: #222; color: #222;
white-space: nowrap; white-space: nowrap;
display: inline-block;
} }
} }
.day-selector { // 中间区域:按钮组
flex: 1 1 auto; .center-section {
flex: 1;
display: flex; display: flex;
align-items: center;
justify-content: center; justify-content: center;
gap: 0; padding: 0 10px;
border-radius: 6px;
overflow: hidden;
border: 1px solid #e5e5e5;
max-width: 220px;
.day-btn { .day-selector {
flex: 1; display: inline-flex;
padding: 0 10px; align-items: center;
height: 34px; border-radius: 6px;
line-height: 34px; overflow: hidden;
font-size: 22px; border: 1px solid #e5e5e5;
color: #666;
background: #fff;
border-right: 1px solid #e5e5e5;
text-align: center;
white-space: nowrap;
cursor: pointer;
transition: all 0.2s ease;
&:last-child { .day-btn {
border-right: none; padding: 0 16px;
} height: 34px;
line-height: 34px;
font-size: 24px;
color: #666;
background: #fff;
border-right: 1px solid #e5e5e5;
text-align: center;
white-space: nowrap;
cursor: pointer;
transition: all 0.2s ease;
&.active { &:last-child {
color: #fff; border-right: none;
background: linear-gradient(135deg, #09b8c2 0%, #07a5ae 100%); }
font-weight: 500;
}
&:not(.active):active { &.active {
background: #f8f8f8; color: #fff;
background: linear-gradient(135deg, #09b8c2 0%, #07a5ae 100%);
font-weight: 500;
}
&:not(.active):active {
background: #f8f8f8;
}
} }
} }
} }
.chart-actions { // 右侧区域:放大隐藏
flex: 0 0 auto; .right-section {
flex-shrink: 0;
width: 105px;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 4px; justify-content: flex-start;
min-width: 85px; gap: 6px;
justify-content: flex-end;
.action-link { .action-link {
font-size: 24px; font-size: 26px;
color: #1589E9; color: #1589E9;
white-space: nowrap; white-space: nowrap;
cursor: pointer; cursor: pointer;
@@ -2061,7 +2070,7 @@ defineExpose({
} }
.divider-dot { .divider-dot {
font-size: 16px; font-size: 18px;
color: #ccc; color: #ccc;
margin: 0; margin: 0;
} }
@@ -2150,7 +2159,7 @@ defineExpose({
// 功能按钮区域样式 // 功能按钮区域样式
.action-buttons { .action-buttons {
margin-top: 20rpx; margin-top: 10rpx;
padding: 0; padding: 0;
width: 100%; width: 100%;