fix: 界面功能优化,完成基础信息和心路历程优化。

This commit is contained in:
tianyongbao
2025-11-13 02:05:38 +08:00
parent 6231c2494f
commit f4b0366a39
29 changed files with 4327 additions and 1651 deletions

View File

@@ -25,8 +25,8 @@
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="内容" prop="remark" required labelPosition="top">
<u--textarea v-model="form.remark" placeholder="请填写内容" border="none" autoHeight inputAlign="right" count
maxlength="20000" style="padding:18rpx 0;"></u--textarea>
<u--textarea v-model="form.remark" placeholder="请填写内容" border="none" autoHeight count
maxlength="20000" style="padding:18rpx 0; min-height: 300rpx;"></u--textarea>
</u-form-item>
</u--form>
<view class="form-btn">
@@ -166,11 +166,28 @@ onLoad((option) => {
.section-title {
width: 360rpx;
color: #333333;
color: #fff;
line-height: 44rpx;
font-size: 30rpx;
border-left: 6rpx solid #2681FF;
padding-left: 26rpx;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 16rpx 26rpx;
margin: -16rpx -24rpx 20rpx;
border-radius: 8rpx 8rpx 0 0;
position: relative;
&::before {
content: '';
position: absolute;
left: 26rpx;
top: 50%;
transform: translateY(-50%);
width: 6rpx;
height: 28rpx;
background-color: #fff;
border-radius: 3rpx;
}
padding-left: 52rpx;
}
.form-view {
@@ -178,6 +195,15 @@ onLoad((option) => {
.form-btn {
padding-top: 20rpx;
::v-deep .u-button {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
border-radius: 12rpx;
height: 88rpx;
font-size: 32rpx;
box-shadow: 0 8rpx 16rpx rgba(102, 126, 234, 0.3);
}
}
}
}

View File

@@ -6,13 +6,40 @@
title="心路历程详情"
>
</u-navbar>
<view class="section">
<u-cell-group>
<u-cell title="标题:" titleStyle="font-weight:bolder" :value="detailInfo.name"></u-cell>
<u-cell title="类型:" titleStyle="font-weight:bolder" :value="detailInfo.type"></u-cell>
<u-cell title="记录时间:" titleStyle="font-weight:bolder" :value="detailInfo.createTime"></u-cell>
<u-cell title="内容:" titleStyle="font-weight:bolder" center :value="detailInfo.remark"> </u-cell>
</u-cell-group>
<view class="detail-card">
<view class="card-header">
<view class="card-title">
<uni-icons type="heart" size="24" color="#fff"></uni-icons>
<text class="card-name">{{ detailInfo.name }}</text>
</view>
</view>
<view class="section">
<view class="section-title">
<view class="title-icon"></view>
<text>基本信息</text>
</view>
<view class="info-grid">
<view class="info-item">
<text class="info-label">类型</text>
<text class="info-value">{{ detailInfo.type || '-' }}</text>
</view>
<view class="info-item">
<text class="info-label">记录时间</text>
<text class="info-value">{{ detailInfo.createTime || '-' }}</text>
</view>
</view>
</view>
<view class="section" v-if="detailInfo.remark">
<view class="section-title">
<view class="title-icon"></view>
<text>内容</text>
</view>
<view class="remark-content">
<text>{{ detailInfo.remark }}</text>
</view>
</view>
</view>
<u-toast ref="uToast"></u-toast>
</view>
@@ -53,39 +80,86 @@ onLoad((option) => {
</script>
<style lang="scss" scoped>
.section {
.detail-card {
margin: 24rpx;
padding: 16rpx 24rpx;
background-color: #fff;
border-radius: 8rpx;
.section-title {
width: 280rpx;
color: #333333;
line-height: 44rpx;
font-size: 30rpx;
border-left: 6rpx solid #2681FF;
padding-left: 26rpx;
}
.content {
width: 647rpx;
font-size: 28rpx;
color: #333333;
line-height: 40rpx;
text-align: left;
}
.img-con {
border-radius: 12rpx;
overflow: hidden;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
.card-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 32rpx;
display: flex;
flex-wrap: wrap;
gap: 20rpx
justify-content: space-between;
align-items: center;
.card-title {
display: flex;
align-items: center;
gap: 12rpx;
.card-name {
color: #fff;
font-size: 36rpx;
font-weight: bold;
}
}
}
.form-view {
padding: 20rpx 0rpx 0 10rpx;
.form-btn {
padding-top: 20rpx;
.section {
padding: 32rpx;
border-bottom: 1rpx solid #f0f0f0;
&:last-child {
border-bottom: none;
}
.section-title {
display: flex;
align-items: center;
gap: 12rpx;
margin-bottom: 24rpx;
font-size: 32rpx;
font-weight: bold;
color: #333;
.title-icon {
width: 6rpx;
height: 32rpx;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 3rpx;
}
}
.info-grid {
display: flex;
flex-direction: column;
gap: 24rpx;
.info-item {
display: flex;
justify-content: space-between;
align-items: center;
.info-label {
font-size: 28rpx;
color: #999;
}
.info-value {
font-size: 28rpx;
color: #333;
font-weight: 500;
}
}
}
.remark-content {
font-size: 28rpx;
color: #666;
line-height: 1.6;
text-align: justify;
}
}
}

View File

@@ -5,10 +5,13 @@
<u--input v-model="queryParams.name" border="false" placeholder="请输入标题" class="search-input"
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
</u--input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#667eea" size="28" label="筛选"
labelPos="left" labelSize="28rpx" labelColor="#667eea" @click="filterPanel = !filterPanel"
style="display: flex; align-items: center; gap: 6rpx; padding: 8rpx 16rpx; background: rgba(102, 126, 234, 0.1); border-radius: 20rpx; border: 1rpx solid rgba(102, 126, 234, 0.3);"></u-icon>
<view class="add-btn" @click="handleAdd()">
<uni-icons type="plus-filled" size="18" color="#ffffff"></uni-icons>
<text>新增</text>
</view>
<u-transition :show="filterPanel" mode="fade">
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
<view class="filter-panel-content">
@@ -19,8 +22,10 @@
</view>
</view>
<view class="btn-box">
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
<u-button text="重置" @click="resetQuery()"
customStyle="flex: 1; background: #f5f7fa; color: #666666; border: none; border-radius: 12rpx; font-size: 30rpx; height: 88rpx;"></u-button>
<u-button type="primary" text="确定" @click="searchSubmit()"
customStyle="flex: 2; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border: none; border-radius: 12rpx; font-size: 30rpx; font-weight: 600; height: 88rpx; box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3);"></u-button>
</view>
</view>
</u-transition>
@@ -28,27 +33,44 @@
</u-sticky>
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item">
<view class="item-header" @click="enterDetails(item)">
<u--text suffixIcon="arrow-right" lines="2" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
:text="item.name" size="30rpx" color="#333333" :bold="true"></u--text>
<view class="list-item" @click="enterDetails(item)">
<view class="item-header">
<view class="card-name-section">
<view class="card-icon">
<uni-icons type="heart" size="20" color="#ffffff"></uni-icons>
</view>
<view class="card-info">
<text class="card-name">{{ item.name }}</text>
</view>
</view>
</view>
<view class="item-row">
<text class="row-label">类型</text>
<text class="row-value">{{ dictStr(item.type, journeyTypeList) }}</text>
<view class="card-body">
<view class="info-row single">
<text class="info-label">类型</text>
<text class="info-value">{{ dictStr(item.type, journeyTypeList) }}</text>
</view>
<view class="info-row single">
<text class="info-label">记录时间</text>
<text class="info-value">{{ item.createTime || '-' }}</text>
</view>
<view class="info-row remark" v-if="item.remark">
<text class="info-label">内容</text>
<text class="info-value">{{ item.remark }}</text>
</view>
</view>
<view class="item-row">
<text class="row-label">记录时间</text>
<text class="row-value">{{ item.createTime }}</text>
</view>
<view class="item-row">
<text class="row-label">内容</text>
<text class="row-value">{{ item.remark }}</text>
</view>
<view class="operate" >
<!-- <view class="btn filling" @click="enterDetails(item)">查看</view > -->
<view class="btn filling" @click="handleEdit(item)">修改</view>
<view class="btn filling" @click="handleDelete(item)">删除</view>
<view class="operate" @click.stop>
<view class="btn-edit" @click="handleEdit(item)">
<uni-icons type="compose" size="16" color="#667eea"></uni-icons>
<text>修改</text>
</view>
<view class="btn-delete" @click="handleDelete(item)">
<uni-icons type="trash" size="16" color="#f5576c"></uni-icons>
<text>删除</text>
</view>
</view>
</view>
</u-list-item>
@@ -218,11 +240,39 @@ function selectStatus(item) {
align-items: center;
position: relative;
margin-bottom: 24rpx;
z-index: 100;
.search-input {
background: #F5F5F5;
background: #f5f7fa;
color: #333333;
margin-right: 36rpx;
flex: 1;
margin-right: 16rpx;
border-radius: 24rpx;
border: 1rpx solid #e8edf3;
}
.add-btn {
display: flex;
align-items: center;
gap: 6rpx;
padding: 12rpx 24rpx;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 24rpx;
box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3);
transition: all 0.3s ease;
flex-shrink: 0;
margin-left: 10rpx;
&:active {
transform: scale(0.95);
box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.3);
}
text {
color: #ffffff;
font-size: 28rpx;
font-weight: 600;
}
}
.filter-panel {
@@ -231,15 +281,17 @@ function selectStatus(item) {
left: 0;
top: 96rpx;
background-color: rgba(0, 0, 0, 0.5);
z-index: 999;
.filter-panel-content {
background-color: #ffff;
background-color: #ffffff;
padding: 0 30rpx 30rpx;
border-radius: 16rpx 16rpx 0 0;
.filter-title {
color: #000000;
font-size: 30rpx;
font-weight: 500;
color: #2c3e50;
font-size: 32rpx;
font-weight: 600;
padding: 30rpx 0;
}
@@ -261,14 +313,16 @@ function selectStatus(item) {
}
.active {
background-color: rgba(222, 241, 255, 1);
border: 1rpx solid rgba(22, 119, 255, 1);
background-color: rgba(102, 126, 234, 0.1);
border: 1rpx solid #667eea;
color: #667eea;
}
}
}
.btn-box {
display: flex;
gap: 20rpx;
padding: 24rpx 30rpx;
background-color: #fff;
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
@@ -278,97 +332,143 @@ function selectStatus(item) {
.list-item {
margin: 0 24rpx 24rpx;
padding: 32rpx;
background-color: #fff;
border-radius: 16rpx;
overflow: hidden;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 16rpx;
.status {
.status-item {
width: 120rpx;
height: 44rpx;
text-align: center;
line-height: 44rpx;
border-radius: 4rpx;
font-size: 24rpx;
}
.status1 {
background: #F0F0F0;
color: #8C8C8C;
}
.status2 {
background: rgba(38, 129, 255, 0.2);
color: #2681FF;
}
.status3 {
background: #F7F7F7;
color: #2681FF;
}
.status4 {
background: rgba(255, 85, 51, 0.2);
color: #FF5533;
}
.status5 {
background: #F7F7F7;
color: rgba(0, 0, 0, 0.85);
}
.status7 {
background: rgba(255, 129, 51, 0.2);
color: #FF8133;
}
.status8 {
background: rgba(65, 217, 165, 0.2);
color: #41D9A5;
padding: 24rpx;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
.card-name-section {
display: flex;
align-items: center;
flex: 1;
min-width: 0;
}
.card-icon {
width: 56rpx;
height: 56rpx;
background: rgba(255, 255, 255, 0.2);
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 16rpx;
flex-shrink: 0;
backdrop-filter: blur(10rpx);
}
.card-info {
display: flex;
flex-direction: column;
gap: 6rpx;
flex: 1;
min-width: 0;
.card-name {
color: #ffffff;
font-size: 32rpx;
font-weight: 600;
line-height: 1.2;
}
}
}
.item-row {
padding: 16rpx 0;
.row-label {
color: rgba(0, 0, 0, 0.55);
.card-body {
padding: 24rpx;
.info-row {
display: flex;
align-items: center;
padding: 16rpx 20rpx;
background: #f8f9fa;
border-radius: 8rpx;
margin-bottom: 12rpx;
&:last-child {
margin-bottom: 0;
}
&.single {
justify-content: space-between;
}
&.remark {
flex-direction: column;
align-items: flex-start;
}
.info-label {
color: #7f8c8d;
font-size: 28rpx;
flex-shrink: 0;
}
.info-value {
color: #2c3e50;
font-size: 28rpx;
font-weight: 500;
flex: 1;
text-align: right;
}
}
.row-value {
color: rgba(0, 0, 0, 0.85)
.info-row.remark {
.info-value {
text-align: left;
margin-top: 8rpx;
line-height: 1.6;
color: #666;
width: 100%;
}
}
}
.operate {
display: flex;
justify-content: flex-end;
padding: 0 24rpx 24rpx;
gap: 16rpx;
.btn {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
.btn-edit,
.btn-delete {
display: flex;
align-items: center;
gap: 6rpx;
padding: 12rpx 24rpx;
border-radius: 8rpx;
margin-left: 5rpx;
text-align: center;
font-size: 26rpx;
transition: all 0.3s ease;
&:active {
transform: scale(0.95);
}
}
.circulation {
background: rgba(0, 0, 0, 0.04);
margin-right: 24rpx;
color: rgba(0, 0, 0, 0.85);
.btn-edit {
background: rgba(102, 126, 234, 0.1);
color: #667eea;
border: 1rpx solid rgba(102, 126, 234, 0.3);
text {
color: #667eea;
}
}
.filling {
background: #2681FF;
border-radius: 8rpx;
color: #FFFFFF;
.btn-delete {
background: rgba(245, 87, 108, 0.1);
color: #f5576c;
border: 1rpx solid rgba(245, 87, 108, 0.3);
text {
color: #f5576c;
}
}
}
}