This commit is contained in:
2026-06-16 19:26:48 +08:00
parent 77e3a85134
commit d7461853cf
20 changed files with 1229 additions and 223 deletions
+7
View File
@@ -141,3 +141,10 @@
}
</script>
<style lang="scss" scoped>
.list-item .item-title {
white-space: normal;
word-break: break-all;
}
</style>
+237 -17
View File
@@ -2,19 +2,30 @@
<view class="page-list">
<!-- 操作按钮区域 -->
<view class="action-bar">
<view class="action-btn" @click="handleAutoPoint">自动点口</view>
<view class="action-btn" @click="handleForceClose">强制关闭批</view>
<view class="action-btn" @click="handleAdjust">点口调整</view>
<view class="action-btn primary" @click="handleAutoPoint">
<u-icon name="checkmark" :size="28" color="#fff"></u-icon>
<text>自动点口</text>
</view>
<view class="action-btn danger" @click="handleForceClose">
<u-icon name="close" :size="28" color="#fff"></u-icon>
<text>强制关闭</text>
</view>
<view class="action-btn warning" @click="handleAdjust">
<u-icon name="edit-pen" :size="28" color="#fff"></u-icon>
<text>点口调整</text>
</view>
</view>
<!-- 批号信息 -->
<view class="batch-info">
<view class="batch-info-left">
<text class="batch-label">批号</text>
<text class="batch-value">{{ PointBatchCode || '--' }}</text>
<view class="batch-refresh" @click="handleRefresh">
<u-icon name="reload" :size="36" :class="{ rotating: loading }"></u-icon>
</view>
</view>
<view class="batch-refresh" @click="handleRefresh">
<u-icon name="reload" :size="36" :class="{ rotating: loading }"></u-icon>
</view>
</view>
<!-- 列表内容 -->
<view class="list-scroll">
@@ -26,20 +37,18 @@
<!-- 数据列表 -->
<view v-else class="list-wrap">
<view v-for="(item, index) in listData" :key="item.id || index" class="card-item">
<view class="card-row">
<text class="card-label">管线号</text>
<text class="card-value">{{ item.PipelineCode || '--' }}</text>
</view>
<view class="card-row">
<text class="card-label">焊口代号</text>
<text class="card-value">{{ item.WeldJointCode || '--' }}</text>
</view>
<view class="card-row">
<text class="card-label">状态</text>
<view class="card-tag" :class="{ done: item.PointState == '1' }">
<view class="card-header">
<text class="card-code">{{ item.PipelineCode || '--' }}</text>
<view class="status-tag" :class="item.PointState == '1' ? 'done' : 'pending'">
{{ item.PointState == '1' ? '已点' : '未点' }}
</view>
</view>
<view class="card-body">
<view class="card-row">
<text class="row-label">焊口代号</text>
<text class="row-value">{{ item.WeldJointCode || '--' }}</text>
</view>
</view>
</view>
<!-- 空状态 -->
@@ -111,3 +120,214 @@
fetchData()
})
</script>
<style lang="scss" scoped>
/* 操作按钮区域 */
.action-bar {
display: flex;
gap: 20rpx;
padding: 24rpx;
background: #fff;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}
.action-btn {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 8rpx;
height: 72rpx;
border-radius: 12rpx;
font-size: 26rpx;
font-weight: 500;
color: #fff;
transition: all 0.2s;
&:active {
opacity: 0.85;
transform: scale(0.98);
}
&.primary {
background: linear-gradient(135deg, #4a7df5 0%, #356bdb 100%);
box-shadow: 0 4rpx 12rpx rgba(74, 125, 245, 0.3);
}
&.danger {
background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
box-shadow: 0 4rpx 12rpx rgba(255, 107, 107, 0.3);
}
&.warning {
background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
box-shadow: 0 4rpx 12rpx rgba(255, 167, 38, 0.3);
}
}
/* 批号信息 */
.batch-info {
display: flex;
align-items: flex-start;
justify-content: space-between;
padding: 24rpx 32rpx;
background: #fff;
margin-top: 2rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.batch-info-left {
display: flex;
align-items: flex-start;
gap: 16rpx;
}
.batch-label {
font-size: 28rpx;
color: #666;
line-height: 1.4;
}
.batch-value {
font-size: 28rpx;
font-weight: 600;
color: #333;
line-height: 1.4;
}
.batch-refresh {
width: 64rpx;
height: 64rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
background: #f5f6f8;
transition: all 0.2s;
&:active {
background: #e8e9eb;
transform: scale(0.95);
}
}
.rotating {
animation: rotate 1s linear infinite;
}
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
/* 列表区域 */
.list-scroll {
flex: 1;
overflow-y: auto;
background: #f5f6f8;
}
.list-wrap {
padding: 24rpx;
}
/* 卡片样式 */
.card-item {
background: #fff;
border-radius: 16rpx;
padding: 28rpx;
margin-bottom: 20rpx;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
transition: transform 0.15s, box-shadow 0.15s;
&:active {
transform: scale(0.99);
box-shadow: 0 1rpx 8rpx rgba(0, 0, 0, 0.04);
}
&:last-child {
margin-bottom: 0;
}
}
.card-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.card-code {
font-size: 30rpx;
font-weight: 600;
color: #333;
flex: 1;
word-break: break-all;
margin-right: 16rpx;
}
/* 状态标签 */
.status-tag {
display: inline-flex;
align-items: center;
padding: 8rpx 20rpx;
border-radius: 24rpx;
font-size: 24rpx;
font-weight: 500;
flex-shrink: 0;
white-space: nowrap;
&.done {
background: rgba(76, 175, 80, 0.1);
color: #4caf50;
}
&.pending {
background: rgba(153, 153, 153, 0.1);
color: #999;
}
}
.card-body {
padding-top: 20rpx;
}
.card-row {
display: flex;
align-items: center;
padding: 12rpx 0;
}
.row-label {
width: 160rpx;
font-size: 26rpx;
color: #999;
flex-shrink: 0;
}
.row-value {
font-size: 28rpx;
color: #333;
flex: 1;
}
/* 加载状态 */
.loading-box {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 120rpx 0;
}
.loading-text {
margin-top: 20rpx;
font-size: 26rpx;
color: #999;
}
</style>