| | |
| | | v-if="visitList.length > 0"> |
| | | <view v-for="(item, index) in visitList" |
| | | :key="index"> |
| | | <view class="ledger-item"> |
| | | <view class="ledger-item" |
| | | :class="{ 'overdue': isOverdue(item.rectifyTime, item.rectifyActualTime) }"> |
| | | <view class="item-header"> |
| | | <view class="item-left"> |
| | | <view class="document-icon"> |
| | |
| | | @click="viewDetail(item)"> |
| | | 查看详情 |
| | | </u-button> --> |
| | | <u-button type="primary" |
| | | size="small" |
| | | class="action-btn" |
| | | @click="editVisit(item)"> |
| | | 编辑 |
| | | </u-button> |
| | | <u-button type="warning" |
| | | size="small" |
| | | class="action-btn" |
| | |
| | | :disabled="!item.rectifyActualTime" |
| | | @click="acceptanceVisit(item)"> |
| | | 验收 |
| | | </u-button> |
| | | </view> |
| | | <view class="action-buttons"> |
| | | <u-button type="primary" |
| | | size="small" |
| | | class="action-btn" |
| | | @click="editVisit(item)"> |
| | | 编辑 |
| | | </u-button> |
| | | <u-button type="info" |
| | | size="small" |
| | | class="action-btn" |
| | | @click="viewFileList(item)"> |
| | | 附件 |
| | | </u-button> |
| | | <u-button type="error" |
| | | size="small" |
| | |
| | | |
| | | const userStore = useUserStore(); |
| | | |
| | | // 检查隐患是否超期未整改 |
| | | const isOverdue = (rectifyTime, rectifyActualTime) => { |
| | | // 如果已经整改完成,则不超期 |
| | | if (rectifyActualTime) return false; |
| | | |
| | | // 如果没有整改期限,则不超期 |
| | | if (!rectifyTime) return false; |
| | | |
| | | const today = dayjs(); |
| | | const deadline = dayjs(rectifyTime); |
| | | |
| | | // 如果当前日期超过整改期限,则超期 |
| | | return today.isAfter(deadline, "day"); |
| | | }; |
| | | |
| | | // 搜索关键词 |
| | | const customerName = ref(""); |
| | | |
| | |
| | | // 返回上一页 |
| | | const goBack = () => { |
| | | uni.navigateBack(); |
| | | }; |
| | | const viewFileList = item => { |
| | | uni.setStorageSync("dangerInvestigationFileId", item.id); |
| | | uni.navigateTo({ |
| | | url: "/pages/safeProduction/dangerInvestigation/fileList", |
| | | }); |
| | | }; |
| | | |
| | | // 查询列表 |
| | |
| | | background: #667eea; // 保持页面特有的背景色 |
| | | box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3); // 保持页面特有的阴影效果 |
| | | } |
| | | .action-buttons { |
| | | gap: 4px; |
| | | } |
| | | .action-buttons { |
| | | padding: 0 0 10rpx 0; |
| | | } |
| | | |
| | | // 超期未整改的隐患样式 |
| | | .overdue { |
| | | border-left: 8rpx solid #ff4d4f; |
| | | background-color: rgba(255, 77, 79, 0.02); |
| | | } |
| | | |
| | | .overdue .item-header { |
| | | position: relative; |
| | | padding-left: 20rpx; |
| | | } |
| | | |
| | | .overdue .item-header::after { |
| | | content: "超期"; |
| | | position: absolute; |
| | | top: 32rpx; |
| | | right: 20rpx; |
| | | font-size: 24rpx; |
| | | font-weight: 500; |
| | | color: #ff4d4f; |
| | | background-color: rgba(255, 77, 79, 0.1); |
| | | padding: 4rpx 16rpx; |
| | | border-radius: 16rpx; |
| | | border: 1rpx solid rgba(255, 77, 79, 0.3); |
| | | } |
| | | |
| | | .overdue .detail-row:nth-child(7) .detail-value { |
| | | color: #ff4d4f; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .overdue .detail-row { |
| | | padding-left: 20rpx; |
| | | } |
| | | </style> |
| | | |