From a1c73423f2dd5c9071d1cd107a73901f2a454771 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Thu, 14 Sep 2023 10:56:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E8=AD=A6=E5=88=97=E8=A1=A8=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/AlarmInfoList.vue | 83 +++++++++++++++++++++++++++++--- src/pages/DecisionInfoManage.vue | 10 ++-- 2 files changed, 80 insertions(+), 13 deletions(-) diff --git a/src/pages/AlarmInfoList.vue b/src/pages/AlarmInfoList.vue index 41188a4..3f71812 100644 --- a/src/pages/AlarmInfoList.vue +++ b/src/pages/AlarmInfoList.vue @@ -10,12 +10,17 @@ v-model:pagination="pagination" :rows-per-page-options="[10, 20, 50, 100]" :loading="loading" - :filter="filter" binary-state-sort @request="onRequest" > @@ -31,6 +36,39 @@ + + + +
查询报警信息
+
+ + + + + + + + + +
+
@@ -130,10 +168,6 @@ const columnDefs: QTableColumn[] = [ const tableRef = ref(); const rows = reactive([]); -const filter = reactive({ - alertType: '', - lineId: '', -}); const loading = ref(false); const pagination = ref({ sortBy: 'desc', @@ -145,14 +179,13 @@ const pagination = ref({ async function onRequest(props: any) { const { page, rowsPerPage, sortBy, descending } = props.pagination; - const filter = props.filter; loading.value = true; try { let response = await alarmInfoListQuery({ current: page, size: rowsPerPage, - alertType: (saveAlertTypeData as never)[filter.alertType], - lineId: filter.lineId, + alertType: (saveAlertTypeData as never)[filter.value.alertType], + lineId: +filter.value.lineId, }); const pageData = response; pagination.value.rowsNumber = pageData.total; @@ -178,6 +211,40 @@ onMounted(() => { }); }); +const searchDialog = ref(false); +const filter = ref({ + alertType: '', + lineId: '', +}); +const optionsAlertType = [ + '蓝显', + '全线蓝显', + '列车延误2分钟', + '列车延误10分钟', + '整侧站台门无关闭锁紧信号', + '整侧站台门无法打开', + '整侧站台门无法关闭', + '道岔均失表', + '道岔定位失表', + '道岔反位失表', + '计轴红光带', + '计轴大面积红光带', + '计轴橙光带', + '计轴大面积橙光带', + '道岔大面积失表', + '列车信号故障', +]; +function searchDecisionInfo() { + searchDialog.value = false; + try { + tableRef.value.requestServerInteraction(); + } finally { + setTimeout(() => { + filter.value = { alertType: '', lineId: '' }; + }); + } +} + const dialogInstance = ref(); function openAlarmDialog(row: any) { row.alert_time = row.alertTime; diff --git a/src/pages/DecisionInfoManage.vue b/src/pages/DecisionInfoManage.vue index dc1ad09..aab7aed 100644 --- a/src/pages/DecisionInfoManage.vue +++ b/src/pages/DecisionInfoManage.vue @@ -237,10 +237,6 @@ const columnDefs: QTableColumn[] = [ const operateDisabled = ref(false); const tableRef = ref(); const rows = reactive([]); -const filter = ref({ - alertType: '', - areaConfigName: '', -}); const loading = ref(false); const pagination = ref({ sortBy: 'desc', @@ -284,13 +280,17 @@ onMounted(() => { }); const searchDialog = ref(false); +const filter = ref({ + alertType: '', + areaConfigName: '', +}); function searchDecisionInfo() { searchDialog.value = false; try { tableRef.value.requestServerInteraction(); } finally { setTimeout(() => { - filter.value = { alertType: '', areaConfigId: '' }; + filter.value = { alertType: '', areaConfigName: '' }; }); } }