diff --git a/src/api/dashboard.ts b/src/api/dashboard.ts index 5bcb173..10e7f4d 100644 --- a/src/api/dashboard.ts +++ b/src/api/dashboard.ts @@ -84,3 +84,13 @@ export const getDeviceHistoryDetailApi = (params: { }) => { return request.get(`/api/v1/device/device_history/`, params); }; + +// 车辆管理 +export const getVehiclManagementApi = (params: any) => { + return request.get(`/api/v1/record/train_record/`, params); +}; + +// 外观检测故障前详情 +export const getBeforeMonitorDetailApi = (params: any) => { + return request.get(`/api/v1/record/before_arrive_record_list/`, params); +}; diff --git a/src/views/dashboard/AppearanceMonitor.scss b/src/views/dashboard/AppearanceMonitor.scss index e870a5f..a2ced30 100644 --- a/src/views/dashboard/AppearanceMonitor.scss +++ b/src/views/dashboard/AppearanceMonitor.scss @@ -35,7 +35,7 @@ .appearance-monitor-left { - width: 48%; + width: 49%; background-image: url("@/assets/common/boderBg.png"); background-size: 100% 100%; background-position: center; diff --git a/src/views/dashboard/AppearanceMonitor.vue b/src/views/dashboard/AppearanceMonitor.vue index 76d098b..d63bf24 100644 --- a/src/views/dashboard/AppearanceMonitor.vue +++ b/src/views/dashboard/AppearanceMonitor.vue @@ -86,7 +86,7 @@ - + @@ -97,10 +97,10 @@ import ContentHeader from "@/components/ContentHeader.vue"; import { BaseTable } from "@/components/CustomTable"; import { Swiper, SwiperSlide } from "swiper/vue"; import { Navigation, Scrollbar } from "swiper/modules"; -import { getAppearanceMonitorApi, getAppearanceMonitorDetailApi } from '@/api/dashboard'; +import { getAppearanceMonitorApi, getAppearanceMonitorDetailApi, getBeforeMonitorDetailApi } from '@/api/dashboard'; import { isSuccessApi } from "@/utils/forApi"; import PointModal from './components/PointModal.vue' -import AlarmModal from './components/AlarmModal.vue' +import AppearanceAlarmModal from './components/AppearanceAlarmModal.vue' import DeleteModal from './components/DeleteModal.vue' import { useWebSocketStore } from '@/stores/websocketStore'; import { onBeforeRouteLeave } from 'vue-router'; @@ -138,12 +138,12 @@ const columns = [ { label: "站点", property: "station", - width: 70, + width: 75, }, { label: "车号", property: "train_number", - width: 120, + width: 155, }, { label: "车型", @@ -153,7 +153,7 @@ const columns = [ { label: "车厢号", property: "train_carriage_number", - width: 80, + width: 95, }, { label: "告警类型", @@ -163,7 +163,7 @@ const columns = [ { label: "故障类型", property: "fault_type", - width: 120, + width: 90, }, { label: "等级", @@ -233,9 +233,10 @@ const columns = [ color:"#009DFF" }, onClick: (row) => { - // console.log(row.id); + console.log('row.id'); // 这里可以添加按钮点击后的具体逻辑 isAlarmOpen.value = true; + console.log(isAlarmOpen.value); currentRow.value = row; } }, @@ -270,6 +271,7 @@ const pagination = ref({ currentPage: 1, pageSize: 10, total: 0 }); const listData = ref([]); // 列表数据 const currentRow = ref>({}); // 当前选中行 const currFileList = ref[]>([]); // 详情的文件列表 +const currBeforeFileList = ref[]>([]); // 故障前详情的文件列表 const currFile = ref>({}); // 详情数据 const isPlaying = ref(false); // 是否播放 // 搜索表单 @@ -318,6 +320,19 @@ const getFileList = async () => { console.log(error, 'getDetailList_error') } } + +// 故障前详情 +const getBeforeFileList = async () => { + try { + const res = await getBeforeMonitorDetailApi({ id: currentRow.value?.id, current: 1, pageSize: 1000 }) + console.log(res.data, 'getDetailList_data') + if (isSuccessApi(res)) { + currBeforeFileList.value = res.data.data; + } + } catch (error) { + console.log(error, 'getDetailList_error') + } +} // TODO mock 获取视频列表数据 // const getFileList = async () => { // try { @@ -338,6 +353,7 @@ const getFileList = async () => { function loadDetail() { currentRow.value = listData.value[0] getFileList() + getBeforeFileList() } // 获取列表 @@ -392,6 +408,7 @@ const handleRowClassName = ({ row }) => { const handleRowClick = (row, event, rowIndex) => { currentRow.value = row; getFileList() + getBeforeFileList() }; onBeforeRouteLeave(() => { diff --git a/src/views/dashboard/PoleMonitor.vue b/src/views/dashboard/PoleMonitor.vue index dc813b8..d5ce813 100644 --- a/src/views/dashboard/PoleMonitor.vue +++ b/src/views/dashboard/PoleMonitor.vue @@ -121,12 +121,12 @@ const columns = [ { label: "站点", property: "station", - width: 70, + width: 80, }, { label: "车号", property: "train_number", - width: 120, + width: 155, }, { label: "车型", @@ -136,12 +136,12 @@ const columns = [ { label: "车厢号", property: "train_carriage_number", - width: 80, + width: 95, }, { label: "告警类型", property: "alarm_type", - width: 100, + width: 90, }, { label: "故障类型", diff --git a/src/views/dashboard/VehiclManagement.vue b/src/views/dashboard/VehiclManagement.vue index 92dbd2b..f2b89ed 100644 --- a/src/views/dashboard/VehiclManagement.vue +++ b/src/views/dashboard/VehiclManagement.vue @@ -33,7 +33,7 @@ - + @@ -43,7 +43,7 @@ + + \ No newline at end of file diff --git a/src/views/dashboard/components/VehiclModal.vue b/src/views/dashboard/components/VehiclModal.vue index 35b7501..fab5cf2 100644 --- a/src/views/dashboard/components/VehiclModal.vue +++ b/src/views/dashboard/components/VehiclModal.vue @@ -16,12 +16,10 @@ 列车ID:
- - +
- - +
@@ -29,12 +27,12 @@ 列车与车厢号
-
-
-
C54K
+
+
+
{{ item.model }}
- 04 - 15189 + + {{ item.carriage_number }}