fix: BUG修改
This commit is contained in:
parent
e980cbe92c
commit
7b8d3e3994
@ -17,6 +17,10 @@ export const getEpSuroundInfoApi = (params: {}) => {
|
|||||||
export const getEpAlarmRecordInfoApi = (params: {}) => {
|
export const getEpAlarmRecordInfoApi = (params: {}) => {
|
||||||
return http.get(BASEURL + `/xmgl/mechanicalEquipmentPositionAlarm/list`, params);
|
return http.get(BASEURL + `/xmgl/mechanicalEquipmentPositionAlarm/list`, params);
|
||||||
};
|
};
|
||||||
|
// 机械设备定位--分页查询报警信息
|
||||||
|
export const getEpAlarmRecordInfoPageApi = (params: {}) => {
|
||||||
|
return http.get(BASEURL + `/xmgl/mechanicalEquipmentPositionAlarm/page`, params);
|
||||||
|
};
|
||||||
// 机械设备定位--查询实时数据信息
|
// 机械设备定位--查询实时数据信息
|
||||||
export const getEpRealtimeDataApi = (params: {}) => {
|
export const getEpRealtimeDataApi = (params: {}) => {
|
||||||
return http.get(BASEURL + `/xmgl/mechanicalEquipmentPositionData/list`, params);
|
return http.get(BASEURL + `/xmgl/mechanicalEquipmentPositionData/list`, params);
|
||||||
|
|||||||
@ -22,6 +22,10 @@ export const getSuroundInfoApi = (params: {}) => {
|
|||||||
export const getAlarmRecordInfoApi = (params: {}) => {
|
export const getAlarmRecordInfoApi = (params: {}) => {
|
||||||
return http.get(BASEURL + `/xmgl/safetyHatAlarm/list`, params);
|
return http.get(BASEURL + `/xmgl/safetyHatAlarm/list`, params);
|
||||||
};
|
};
|
||||||
|
// 智能安全帽--分页查询报警信息
|
||||||
|
export const getAlarmRecordInfoPageApi = (params: {}) => {
|
||||||
|
return http.get(BASEURL + `/xmgl/safetyHatAlarm/page`, params);
|
||||||
|
};
|
||||||
// 智能安全帽--查询实时数据信息
|
// 智能安全帽--查询实时数据信息
|
||||||
export const getRealtimeDataApi = (params: {}) => {
|
export const getRealtimeDataApi = (params: {}) => {
|
||||||
return http.get(BASEURL + `/xmgl/safetyHatData/newestList`, params);
|
return http.get(BASEURL + `/xmgl/safetyHatData/newestList`, params);
|
||||||
|
|||||||
@ -233,7 +233,7 @@
|
|||||||
<div style="width: 20%">报警时间</div>
|
<div style="width: 20%">报警时间</div>
|
||||||
<div style="width: 30%">报警信息</div>
|
<div style="width: 30%">报警信息</div>
|
||||||
</div>
|
</div>
|
||||||
<el-scrollbar class="list-box">
|
<el-scrollbar class="list-box" ref="refScrollbar">
|
||||||
<div v-for="(item, index) in listData" class="list-style" :key="item.id">
|
<div v-for="(item, index) in listData" class="list-style" :key="item.id">
|
||||||
<div style="width: 5%">{{ index + 1 }}</div>
|
<div style="width: 5%">{{ index + 1 }}</div>
|
||||||
<div style="width: 20%">{{ item.equipmentName }}</div>
|
<div style="width: 20%">{{ item.equipmentName }}</div>
|
||||||
@ -259,7 +259,7 @@ import {
|
|||||||
getEpDevOptionApi,
|
getEpDevOptionApi,
|
||||||
getEpTypeTotalApi,
|
getEpTypeTotalApi,
|
||||||
getEpSuroundInfoApi,
|
getEpSuroundInfoApi,
|
||||||
getEpAlarmRecordInfoApi,
|
getEpAlarmRecordInfoPageApi,
|
||||||
getEpRealtimeDataApi,
|
getEpRealtimeDataApi,
|
||||||
getEpRealtimeDataPageApi,
|
getEpRealtimeDataPageApi,
|
||||||
getEpDayRecordApi,
|
getEpDayRecordApi,
|
||||||
@ -289,6 +289,8 @@ var marker;
|
|||||||
var lineArr;
|
var lineArr;
|
||||||
var mapInstance;
|
var mapInstance;
|
||||||
var map;
|
var map;
|
||||||
|
const refScrollbar = ref(null as any); // 绑定到滚动的盒子上
|
||||||
|
let moreScroll = ref(true as any);
|
||||||
let choiceMonth = ref("2023-11");
|
let choiceMonth = ref("2023-11");
|
||||||
let dayRunRecord = ref([]); // 日行数据
|
let dayRunRecord = ref([]); // 日行数据
|
||||||
let hasRealTime = ref(false);
|
let hasRealTime = ref(false);
|
||||||
@ -392,7 +394,7 @@ onMounted(() => {
|
|||||||
choiceMonth.value = formatMonthTime(dayValue.value);
|
choiceMonth.value = formatMonthTime(dayValue.value);
|
||||||
// console.log("当前月份", choiceMonth.value);
|
// console.log("当前月份", choiceMonth.value);
|
||||||
initMap();
|
initMap();
|
||||||
getProgressListData();
|
getProgressListData('search');
|
||||||
getCrewListData();
|
getCrewListData();
|
||||||
getFenceList();
|
getFenceList();
|
||||||
getFenceType();
|
getFenceType();
|
||||||
@ -400,6 +402,20 @@ onMounted(() => {
|
|||||||
window.addEventListener("resize", e => {
|
window.addEventListener("resize", e => {
|
||||||
resetMapSize();
|
resetMapSize();
|
||||||
});
|
});
|
||||||
|
refScrollbar.value.wrapRef.addEventListener("scroll", (e: any) => {
|
||||||
|
// console.log("滚动容器", e);
|
||||||
|
const scrollTop = e.target.scrollTop;
|
||||||
|
const scrollHeight = e.target.scrollHeight;
|
||||||
|
const clientHeight = e.target.clientHeight;
|
||||||
|
// console.log("滚动容器", scrollTop, scrollHeight, clientHeight);
|
||||||
|
// 向上加载更多
|
||||||
|
if (scrollTop >= scrollHeight - clientHeight - 1) {
|
||||||
|
// console.log("加载更多");
|
||||||
|
if (moreScroll.value) {
|
||||||
|
getProgressListData('more');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
window.removeEventListener("resize", e => {
|
window.removeEventListener("resize", e => {
|
||||||
@ -462,7 +478,7 @@ function refreshDev() {
|
|||||||
queryInfo.value.devSn = "";
|
queryInfo.value.devSn = "";
|
||||||
clearFn();
|
clearFn();
|
||||||
getCrewListData();
|
getCrewListData();
|
||||||
getProgressListData();
|
getProgressListData('search');
|
||||||
}
|
}
|
||||||
|
|
||||||
function areaRadiusChange() {
|
function areaRadiusChange() {
|
||||||
@ -669,7 +685,7 @@ function getTodayMeter(day: any) {
|
|||||||
// 切换设备
|
// 切换设备
|
||||||
function devChange(e) {
|
function devChange(e) {
|
||||||
console.log("设备改变", e);
|
console.log("设备改变", e);
|
||||||
getProgressListData();
|
getProgressListData('search');
|
||||||
if (checked.value === 2) {
|
if (checked.value === 2) {
|
||||||
getDayRunData();
|
getDayRunData();
|
||||||
}
|
}
|
||||||
@ -777,14 +793,6 @@ function handle(type, show) {
|
|||||||
show: show
|
show: show
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
function SizeChange(val) {
|
|
||||||
pagInfo.value.pageSize = val;
|
|
||||||
getProgressListData();
|
|
||||||
}
|
|
||||||
function CurrentChange(val) {
|
|
||||||
pagInfo.value.pageNo = val;
|
|
||||||
getProgressListData();
|
|
||||||
}
|
|
||||||
//获取查询下拉
|
//获取查询下拉
|
||||||
function getCrewListData() {
|
function getCrewListData() {
|
||||||
let onlineType = "";
|
let onlineType = "";
|
||||||
@ -827,20 +835,25 @@ function getCrewListData() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
//获取报警列表数据
|
//获取报警列表数据
|
||||||
function getProgressListData() {
|
async function getProgressListData(tip:any) {
|
||||||
let data = {
|
let requestData:any = {
|
||||||
// pageNo: pagInfo.value.pageNo,
|
|
||||||
// pageSize: pagInfo.value.pageSize,
|
|
||||||
devSns: alarmDevSn.value,
|
devSns: alarmDevSn.value,
|
||||||
projectSn: store.sn
|
projectSn: store.sn,
|
||||||
};
|
pageNo: tip == 'search'?1:pagInfo.value.pageNo,
|
||||||
getEpAlarmRecordInfoApi(data).then(res => {
|
pageSize: 100
|
||||||
if (res.code == 200) {
|
}
|
||||||
listData.value = res.result;
|
const res: any = await getEpAlarmRecordInfoPageApi(requestData);
|
||||||
// pagInfo.value.total = res.result.total;
|
console.log("获取历史数据", res);
|
||||||
pagInfo.value.total = res.result.length;
|
if(tip == 'more'){
|
||||||
}
|
listData.value = listData.value.concat(res.result.records);
|
||||||
});
|
} else {
|
||||||
|
listData.value = res.result.records;
|
||||||
|
}
|
||||||
|
if (res.result.pages == pagInfo.value.pageNo) {
|
||||||
|
moreScroll.value = false;
|
||||||
|
} else {
|
||||||
|
pagInfo.value.pageNo = pagInfo.value.pageNo + 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function fenceNameChange(e) {
|
function fenceNameChange(e) {
|
||||||
console.log("围栏名称", e);
|
console.log("围栏名称", e);
|
||||||
@ -862,7 +875,7 @@ function handleCheckAllChange(val) {
|
|||||||
queryInfo.value.devSn = "";
|
queryInfo.value.devSn = "";
|
||||||
}
|
}
|
||||||
alarmDevSn.value = "";
|
alarmDevSn.value = "";
|
||||||
getProgressListData();
|
getProgressListData('search');
|
||||||
drawFencePoint();
|
drawFencePoint();
|
||||||
}
|
}
|
||||||
function handleCheckedCitiesChange(value) {
|
function handleCheckedCitiesChange(value) {
|
||||||
@ -902,7 +915,7 @@ function pointSelectChange() {
|
|||||||
}
|
}
|
||||||
alarmDevSn.value = warnDevSn;
|
alarmDevSn.value = warnDevSn;
|
||||||
console.log("当前devSn", alarmDevSn.value);
|
console.log("当前devSn", alarmDevSn.value);
|
||||||
getProgressListData();
|
getProgressListData('search');
|
||||||
}
|
}
|
||||||
|
|
||||||
function fenceAllChange(val) {
|
function fenceAllChange(val) {
|
||||||
@ -969,7 +982,7 @@ function selectChange(e) {
|
|||||||
// queryInfo.value.devSn = devList.value[0].value;
|
// queryInfo.value.devSn = devList.value[0].value;
|
||||||
queryInfo.value.devSn = nameOptions.value[0].value;
|
queryInfo.value.devSn = nameOptions.value[0].value;
|
||||||
alarmDevSn.value = "";
|
alarmDevSn.value = "";
|
||||||
getProgressListData();
|
getProgressListData('search');
|
||||||
getDayRunData();
|
getDayRunData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -322,7 +322,7 @@
|
|||||||
<div style="width: 20%">报警时间</div>
|
<div style="width: 20%">报警时间</div>
|
||||||
<div style="width: 40%">报警信息</div>
|
<div style="width: 40%">报警信息</div>
|
||||||
</div>
|
</div>
|
||||||
<el-scrollbar class="list-box">
|
<el-scrollbar class="list-box" ref="refScrollbar">
|
||||||
<div v-for="(item, index) in listData" class="list-style" :key="item.id">
|
<div v-for="(item, index) in listData" class="list-style" :key="item.id">
|
||||||
<div style="width: 10%">{{ index + 1 }}</div>
|
<div style="width: 10%">{{ index + 1 }}</div>
|
||||||
<div style="width: 15%">{{ item.workerName }}</div>
|
<div style="width: 15%">{{ item.workerName }}</div>
|
||||||
@ -347,7 +347,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
// import { getWorkerInfoList } from "@/assets/js/api/laborPerson";
|
// import { getWorkerInfoList } from "@/assets/js/api/laborPerson";
|
||||||
import {
|
import {
|
||||||
getAlarmRecordInfoApi,
|
getAlarmRecordInfoPageApi,
|
||||||
getHatDevOptionApi,
|
getHatDevOptionApi,
|
||||||
getWeekAlarmDataApi,
|
getWeekAlarmDataApi,
|
||||||
getRealtimeDataApi,
|
getRealtimeDataApi,
|
||||||
@ -374,6 +374,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
|
|||||||
import type { FormInstance, FormRules } from "element-plus";
|
import type { FormInstance, FormRules } from "element-plus";
|
||||||
import Card from "@/components/card.vue";
|
import Card from "@/components/card.vue";
|
||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
|
import moment from "moment"
|
||||||
const store = GlobalStore();
|
const store = GlobalStore();
|
||||||
import { computed, reactive, ref, onMounted, onBeforeMount, watch } from "vue";
|
import { computed, reactive, ref, onMounted, onBeforeMount, watch } from "vue";
|
||||||
var mouseTool;
|
var mouseTool;
|
||||||
@ -381,6 +382,8 @@ var marker;
|
|||||||
var lineArr;
|
var lineArr;
|
||||||
var mapInstance;
|
var mapInstance;
|
||||||
var map;
|
var map;
|
||||||
|
const refScrollbar = ref(null as any); // 绑定到滚动的盒子上
|
||||||
|
let moreScroll = ref(true as any);
|
||||||
let choiceMonth = ref("2023-11");
|
let choiceMonth = ref("2023-11");
|
||||||
let dayRunRecord = ref([]); // 日行数据
|
let dayRunRecord = ref([]); // 日行数据
|
||||||
let hasRealTime = ref(false);
|
let hasRealTime = ref(false);
|
||||||
@ -509,7 +512,7 @@ onMounted(async () => {
|
|||||||
// console.log("当前月份", choiceMonth.value);
|
// console.log("当前月份", choiceMonth.value);
|
||||||
initMap();
|
initMap();
|
||||||
// 智能安全帽--查询报警信息
|
// 智能安全帽--查询报警信息
|
||||||
getProgressListData();
|
getProgressListData('search');
|
||||||
// 智能安全帽--分类查询设备列表
|
// 智能安全帽--分类查询设备列表
|
||||||
getCrewListData();
|
getCrewListData();
|
||||||
// 智能安全帽--查询围栏信息
|
// 智能安全帽--查询围栏信息
|
||||||
@ -524,6 +527,20 @@ onMounted(async () => {
|
|||||||
window.addEventListener("resize", e => {
|
window.addEventListener("resize", e => {
|
||||||
resetMapSize();
|
resetMapSize();
|
||||||
});
|
});
|
||||||
|
refScrollbar.value.wrapRef.addEventListener("scroll", (e: any) => {
|
||||||
|
// console.log("滚动容器", e);
|
||||||
|
const scrollTop = e.target.scrollTop;
|
||||||
|
const scrollHeight = e.target.scrollHeight;
|
||||||
|
const clientHeight = e.target.clientHeight;
|
||||||
|
// console.log("滚动容器", scrollTop, scrollHeight, clientHeight);
|
||||||
|
// 向上加载更多
|
||||||
|
if (scrollTop >= scrollHeight - clientHeight - 1) {
|
||||||
|
// console.log("加载更多");
|
||||||
|
if (moreScroll.value) {
|
||||||
|
getProgressListData('more');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
window.removeEventListener("resize", e => {
|
window.removeEventListener("resize", e => {
|
||||||
@ -882,7 +899,7 @@ function refreshDev() {
|
|||||||
queryInfo.value.devSn = "";
|
queryInfo.value.devSn = "";
|
||||||
clearFn();
|
clearFn();
|
||||||
getCrewListData();
|
getCrewListData();
|
||||||
getProgressListData();
|
getProgressListData('search');
|
||||||
getLineEcharts();
|
getLineEcharts();
|
||||||
getFenceList();
|
getFenceList();
|
||||||
}
|
}
|
||||||
@ -938,7 +955,7 @@ function getDayRunData() {
|
|||||||
projectSn: store.sn,
|
projectSn: store.sn,
|
||||||
devSn: queryInfo.value.devSn,
|
devSn: queryInfo.value.devSn,
|
||||||
// month: choiceMonth.value
|
// month: choiceMonth.value
|
||||||
day: dayValue.value
|
day: moment(dayValue.value).format("YYYY-MM-DD")
|
||||||
};
|
};
|
||||||
console.log("👇日行数据月份查询参数");
|
console.log("👇日行数据月份查询参数");
|
||||||
console.log(data);
|
console.log(data);
|
||||||
@ -973,7 +990,7 @@ function getTodayMeter(day: any) {
|
|||||||
// 切换设备
|
// 切换设备
|
||||||
function devChange(e) {
|
function devChange(e) {
|
||||||
console.log("设备改变", e);
|
console.log("设备改变", e);
|
||||||
getProgressListData();
|
getProgressListData('search');
|
||||||
if (checked.value === 2) {
|
if (checked.value === 2) {
|
||||||
getDayRunData();
|
getDayRunData();
|
||||||
}
|
}
|
||||||
@ -1150,22 +1167,25 @@ function getCrewListData() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 智能安全帽--查询报警信息
|
// 智能安全帽--查询报警信息
|
||||||
function getProgressListData() {
|
async function getProgressListData(tip:any) {
|
||||||
let data = {
|
let requestData:any = {
|
||||||
// pageNo: pagInfo.value.pageNo,
|
|
||||||
// pageSize: pagInfo.value.pageSize,
|
|
||||||
devSns: alarmDevSn.value,
|
devSns: alarmDevSn.value,
|
||||||
|
projectSn: store.sn,
|
||||||
projectSn: store.sn
|
pageNo: tip == 'search'?1:pagInfo.value.pageNo,
|
||||||
};
|
pageSize: 100
|
||||||
getAlarmRecordInfoApi(data).then(res => {
|
}
|
||||||
console.log("👇智能安全帽--查询报警信息");
|
const res: any = await getAlarmRecordInfoPageApi(requestData);
|
||||||
console.log(res);
|
console.log("获取历史数据", res);
|
||||||
if (res.code == 200) {
|
if(tip == 'more'){
|
||||||
listData.value = res.result;
|
listData.value = listData.value.concat(res.result.records);
|
||||||
pagInfo.value.total = res.result.total;
|
} else {
|
||||||
}
|
listData.value = res.result.records;
|
||||||
});
|
}
|
||||||
|
if (res.result.pages == pagInfo.value.pageNo) {
|
||||||
|
moreScroll.value = false;
|
||||||
|
} else {
|
||||||
|
pagInfo.value.pageNo = pagInfo.value.pageNo + 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function fenceNameChange(e) {
|
function fenceNameChange(e) {
|
||||||
console.log("围栏名称", e);
|
console.log("围栏名称", e);
|
||||||
@ -1188,7 +1208,7 @@ function handleCheckAllChange(val) {
|
|||||||
queryInfo.value.devSn = "";
|
queryInfo.value.devSn = "";
|
||||||
}
|
}
|
||||||
alarmDevSn.value = "";
|
alarmDevSn.value = "";
|
||||||
getProgressListData();
|
getProgressListData('search');
|
||||||
drawFencePoint();
|
drawFencePoint();
|
||||||
}
|
}
|
||||||
function handleCheckedCitiesChange(value) {
|
function handleCheckedCitiesChange(value) {
|
||||||
@ -1234,7 +1254,7 @@ function pointSelectChange() {
|
|||||||
}
|
}
|
||||||
alarmDevSn.value = warnDevSn;
|
alarmDevSn.value = warnDevSn;
|
||||||
console.log("当前devSn", alarmDevSn.value);
|
console.log("当前devSn", alarmDevSn.value);
|
||||||
getProgressListData();
|
getProgressListData('search');
|
||||||
}
|
}
|
||||||
|
|
||||||
function fenceAllChange(val) {
|
function fenceAllChange(val) {
|
||||||
@ -1303,7 +1323,7 @@ function selectChange(e) {
|
|||||||
queryInfo.value.devSn = nameOptions.value[0].value;
|
queryInfo.value.devSn = nameOptions.value[0].value;
|
||||||
// queryInfo.value.devSn = devList.value[0].devSn;
|
// queryInfo.value.devSn = devList.value[0].devSn;
|
||||||
// alarmDevSn.value = "";
|
// alarmDevSn.value = "";
|
||||||
getProgressListData();
|
getProgressListData('search');
|
||||||
getDayRunData();
|
getDayRunData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user