修改并优化了一些功能及bug

This commit is contained in:
王利强
2026-05-14 13:45:46 +08:00
parent 805747d1d9
commit 2322fcf39a
51 changed files with 802 additions and 346 deletions

View File

@@ -1,9 +1,9 @@
<template>
<view class="padding page">
<view class="padding bg-white radius margin-bottom" v-for="(item,index) in hazardList" :key="index">
<view class="padding bg-white radius margin-bottom card-item" v-for="(item,index) in hazardList" :key="index">
<view class="flex justify-between margin-bottom">
<view class="text-bold text-black">{{item.hazardTitle}}</view>
<view>{{item.statusName}}</view>
<view class="text-bold text-black" style="flex: 1; margin-right: 16rpx;">{{item.hazardTitle}}</view>
<view class="status-tag" :class="getStatusClass(item.verifyResultName)">{{item.verifyResultName || '未知'}}</view>
</view>
<view class="flex margin-bottom">
<view class="text-gray">隐患日期</view>
@@ -74,7 +74,7 @@
:columns="deptColumns"
@confirm="onDeptConfirm"
@cancel="showDeptPicker = false"
@close="showDeptPicker = false"
@close="showDeptPicker = false"
></up-picker>
<view class="margin-bottom margin-top">主要负责人</view>
<up-input v-model="formData.responsiblePerson" placeholder="请输入主要负责人"></up-input>
@@ -366,6 +366,16 @@
})
};
// 根据审核状态返回对应样式类
const getStatusClass = (status) => {
switch (status) {
case '待审核': return 'status-pending';
case '已通过': return 'status-passed';
case '已驳回': return 'status-rejected';
default: return 'status-pending';
}
};
// 页面加载时获取销号申请列表
onMounted(() => {
fetchWriteOffList();
@@ -378,6 +388,33 @@
background: #EBF2FC;
}
.status-tag {
padding: 4rpx 16rpx;
border-radius: 6rpx;
font-size: 22rpx;
white-space: nowrap;
flex-shrink: 0;
font-weight: 500;
height: 40rpx;
line-height: 40rpx;
align-self: flex-start;
}
.status-pending {
background: #FFF7E6;
color: #FA8C16;
}
.status-passed {
background: #F6FFED;
color: #52C41A;
}
.status-rejected {
background: #FFF1F0;
color: #F5222D;
}
.popup-content {
width: 600rpx;
background: #fff;