From b2330c3a86aa2232a4d934c55199498ada93f4e3 Mon Sep 17 00:00:00 2001 From: buaixuexideshitongxue <2936013465@qq.com> Date: Thu, 26 Mar 2026 17:41:41 +0800 Subject: [PATCH] =?UTF-8?q?feat--=E5=AE=A1=E8=AE=A1=E8=B4=A8=E9=87=8F?= =?UTF-8?q?=E8=AF=84=E4=BB=B7=EF=BC=9A=E6=B7=BB=E5=8A=A0=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/warning/index.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/views/warning/index.vue b/src/views/warning/index.vue index a1bcb6f..b9df58e 100644 --- a/src/views/warning/index.vue +++ b/src/views/warning/index.vue @@ -8,7 +8,7 @@ const route = useRoute() const loading =ref(false) const total =ref(10) const tableData =ref([]) -const activeTab = ref(route.query.specialArea === 'cwlnt' ? 'cwlnt' : route.query.warningState === '1' ? '1' : '0') +const activeTab = ref(route.query.specialArea === 'cwlnt' ? 'cwlnt' : route.query.warningState === '1' ? '1' : 'all') const query = ref({ size: Number(route.query.size) || 10, current: Number(route.query.current) || 1, @@ -22,6 +22,9 @@ const handleClick = (tab)=>{ if (tab.props.name === 'cwlnt') { query.value.specialArea = 'cwlnt' query.value.warningState = '' + } else if (tab.props.name === 'all') { + query.value.specialArea = '' + query.value.warningState = '' } else { query.value.specialArea = '' query.value.warningState = tab.props.name @@ -33,13 +36,13 @@ const reset =()=>{ query.value={ size:10, current:1, - warningState: '0', + warningState: '', specialArea: '' } - activeTab.value = '0' + activeTab.value = 'all' getList(); } -const warningStateDisabled = computed(() => activeTab.value !== 'cwlnt') +const warningStateDisabled = computed(() => activeTab.value !== 'cwlnt' && activeTab.value !== 'all') const getList = async ()=>{ loading.value=true const res = await warningPage(query.value) @@ -123,6 +126,7 @@ watch(()=>route.query.load,(val)=>{ + @@ -143,6 +147,7 @@ watch(()=>route.query.load,(val)=>{
+