加全部

This commit is contained in:
joylink_zhaoerwei 2023-11-03 16:57:05 +08:00
parent 6141e48bc7
commit 674ffc598f

View File

@ -230,6 +230,8 @@ import { useLineNetStore } from 'src/stores/line-net-store';
import { StompMessagingClient } from 'src/jl-graphic/message/WsMsgBroker';
import alarmStatistics from 'src/components/alarm/alarmStatistics.vue';
import { errorNotify } from 'src/utils/CommonNotify';
import { pageQuery } from 'src/api/LineInfoApi';
import { ApiError } from 'src/boot/axios';
const $q = useQuasar();
const lineNetStore = useLineNetStore();
@ -323,7 +325,7 @@ async function onRequest(props: any) {
size: rowsPerPage,
lineId: filter.value.lineId,
};
if (filter.value.alertType) {
if (filter.value.alertType !== '全部') {
Object.assign(params, {
alertType: (saveAlertTypeData as never)[filter.value.alertType],
});
@ -356,6 +358,7 @@ async function onRequest(props: any) {
}
onMounted(() => {
queryLineInfo();
setTimeout(() => {
tableRef.value.requestServerInteraction();
lineNetStore.alarmInfoListTable = tableRef.value;
@ -404,13 +407,34 @@ function batchHandle() {
}
const filter = ref({
alertType: '',
alertType: '全部',
lineId: 3,
beginDateTime: '',
endDateTime: '',
alertStatus: 999,
});
const optionsLineId: { name: string; lineId: number }[] = [];
async function queryLineInfo() {
try {
let response = await pageQuery({
current: 1,
size: 50,
});
response.records.forEach((info) => {
optionsLineId.push({ name: info.name, lineId: info.lineId });
});
} catch (err) {
const error = err as ApiError;
$q.notify({
type: 'negative',
message: error.title,
});
}
}
const optionsAlertType = [
'全部',
'蓝显',
'全线蓝显',
'列车延误2分钟',