这一版本优化了很多

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

@@ -175,28 +175,35 @@ const _sfc_main = {
name: ""
});
const hiddenDangerData = common_vendor.ref([]);
const dangerTabs = common_vendor.ref(["全部状态", "待验收", "待整改", "待交办", "验收通过"]);
const dangerTabs = common_vendor.ref([
{ label: "全部", value: null },
{ label: "待交办", value: 1 },
{ label: "待整改", value: 2 },
{ label: "待验收", value: 3 },
{ label: "待销号", value: 4 },
{ label: "已完成", value: 5 }
]);
const activeDangerTab = common_vendor.ref(0);
const switchDangerTab = (index) => {
activeDangerTab.value = index;
};
const filteredDangerData = common_vendor.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 () => {
try {
const res = await request_api.getHiddenDangerList(hiddenDangerParams.value);
common_vendor.index.__f__("log", "at pages/index/index.vue:396", res);
common_vendor.index.__f__("log", "at pages/index/index.vue:403", res);
if (res.code === 0) {
hiddenDangerData.value = res.data.records;
common_vendor.index.__f__("log", "at pages/index/index.vue:399", hiddenDangerData.value, 1111);
common_vendor.index.__f__("log", "at pages/index/index.vue:406", hiddenDangerData.value, 1111);
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:402", error);
common_vendor.index.__f__("error", "at pages/index/index.vue:409", error);
} finally {
loading.value = false;
}
@@ -272,7 +279,7 @@ const _sfc_main = {
}),
i: common_vendor.f(dangerTabs.value, (tab, index, i0) => {
return {
a: common_vendor.t(tab),
a: common_vendor.t(tab.label),
b: activeDangerTab.value === index ? 1 : "",
c: index,
d: common_vendor.o(($event) => switchDangerTab(index), index)