这一版本优化了很多

This commit is contained in:
王利强
2026-06-03 10:16:37 +08:00
parent 8046316216
commit 2af9f1fd59
954 changed files with 58194 additions and 1609 deletions

View File

@@ -82,11 +82,11 @@
<view class="plan-stats margin-top">
<view class="plan-stat-item">
<view class="plan-stat-num text-orange">{{ item.totalCount }}</view>
<view class="plan-stat-label">隐患</view>
<view class="plan-stat-label">排查项</view>
</view>
<view class="plan-stat-item">
<view class="plan-stat-num text-yellow">{{ item.totalCount - item.finishedCount }}</view>
<view class="plan-stat-label">整改</view>
<view class="plan-stat-label">排查</view>
</view>
<view class="plan-stat-item">
<view class="plan-stat-num text-olive">0</view>
@@ -120,7 +120,7 @@
v-for="(tab, index) in dangerTabs"
:key="index"
@click="switchDangerTab(index)"
>{{ tab }}</view>
>{{ tab.label }}</view>
</view>
</scroll-view>
<!-- 无数据提示 -->
@@ -131,9 +131,9 @@
<view class="danger-card margin-top" v-for="(item, index) in filteredDangerData" :key="item.hazardId">
<!-- 标题行图标+标题 + 等级标签 -->
<view class="flex justify-between align-center">
<view class="flex align-center">
<text class="cuIcon-infofill text-blue" style="font-size: 36rpx; margin-right: 12rpx;"></text>
<text class="text-bold" style="font-size: 30rpx;">{{ item.title }}</text>
<view class="flex align-center" style="flex: 1; min-width: 0; margin-right: 24rpx;">
<text class="cuIcon-infofill text-blue" style="font-size: 36rpx; margin-right: 12rpx; flex-shrink: 0;"></text>
<view class="text-bold" style="font-size: 30rpx; word-break: break-all; flex: 1;">{{ item.title }}</view>
</view>
<view class="level-tag" :class="{
'level-minor': item.levelName === '轻微隐患',
@@ -373,7 +373,14 @@
const hiddenDangerData = ref([]);
// 隐患排查 Tab 筛选
const dangerTabs = ref(['全部状态', '待验收', '待整改', '待交办', '验收通过']);
const dangerTabs = ref([
{ label: '全部', value: null },
{ label: '待交办', value: 1 },
{ label: '待整改', value: 2 },
{ label: '待验收', value: 3 },
{ label: '待销号', value: 4 },
{ label: '已完成', value: 5 }
]);
const activeDangerTab = ref(0);
// 切换 Tab
@@ -383,11 +390,11 @@
// 根据 Tab 过滤隐患数据
const filteredDangerData = computed(() => {
if (activeDangerTab.value === 0) {
const activeTab = dangerTabs.value[activeDangerTab.value];
if (!activeTab || activeTab.value === null) {
return hiddenDangerData.value;
}
const status = dangerTabs.value[activeDangerTab.value];
return hiddenDangerData.value.filter(item => item.statusName === status);
return hiddenDangerData.value.filter(item => item.status === activeTab.value);
});
const getHiddenDangerLists = async () => {