fix: BUG修改
This commit is contained in:
parent
3dac96c588
commit
74953a2500
@ -3,7 +3,7 @@ NODE_ENV = 'development'
|
||||
|
||||
# 本地环境接口地址(/api/index.ts文件中使用)
|
||||
# VITE_API_URL = 'http://192.168.34.221:9111'
|
||||
# VITE_API_URL = 'http://192.168.34.221:28888'
|
||||
VITE_API_URL = 'http://192.168.34.221:28889'
|
||||
# VITE_API_URL = 'http://121.196.214.246/api'
|
||||
# VITE_API_URL = 'http://jxj.zhgdyun.com:100'
|
||||
# VITE_API_URL = 'http://192.168.34.221:12360'
|
||||
@ -12,7 +12,7 @@ NODE_ENV = 'development'
|
||||
# 演示平台
|
||||
# VITE_API_URL = 'http://jxj.zhgdyun.com:9809'
|
||||
# 百色七参数线上地址
|
||||
VITE_API_URL = 'http://101.43.164.214:11113'
|
||||
# VITE_API_URL = 'http://101.43.164.214:11113'
|
||||
|
||||
# 上传
|
||||
VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url='
|
||||
|
||||
@ -33,6 +33,10 @@ export const getCountHiddenDangerInspectRegion = (params: {}) => {
|
||||
export const getAlarmList = (params: {}) => {
|
||||
return http.post(BASEURL + `/xmgl/aiAnalyseHardWareAlarmRecord/selectAiAnalyseHardWareAlarmList`, params);
|
||||
};
|
||||
// 1.查询设备报警记录列表--分页
|
||||
export const getAlarmPage = (params: {}) => {
|
||||
return http.post(BASEURL + `/xmgl/aiAnalyseHardWareAlarmRecord/selectPageList`, params);
|
||||
};
|
||||
// 2.查询当前实时数据
|
||||
export const getRealTimeTotal = (params: {}) => {
|
||||
return http.post(BASEURL + `/xmgl/aiAnalyseHardWareAlarmRecord/countAiAnalyseHardWareAlarmTotal`, params);
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
<!-- <div>{{ item.alarmType ? getWarnName(item.alarmType) : "" }}</div> -->
|
||||
<div style="width: 18%">{{ item.alarmTypeName }}</div>
|
||||
<div style="width: 30%">{{ item.createTime }}</div>
|
||||
<div style="width: 10%" @click="openPeopleCountDialog({type: 1,data: item})">去处置</div>
|
||||
<div style="width: 10%" @click="openPeopleCountDialog({type: 1,data: item})" v-if="!item.handleResult">去处置</div>
|
||||
</div>
|
||||
<div class="not-data" v-if="alarmList.length == 0">
|
||||
<img src="@/assets/images/noData.png" />
|
||||
@ -74,7 +74,7 @@
|
||||
<script lang="ts" setup>
|
||||
import Card from "@/components/card.vue";
|
||||
import { ref, onMounted, computed } from "vue";
|
||||
import { getRealTimeTotal, getAlarmList } from "@/api/modules/securityManagement";
|
||||
import { getRealTimeTotal, getAlarmPage } from "@/api/modules/securityManagement";
|
||||
import { GlobalStore } from "@/stores";
|
||||
import dataDialog from "./data-dialog.vue";
|
||||
import dataListDialog from "./data-list-dialog.vue";
|
||||
@ -116,12 +116,22 @@ const getMemberCareList = async () => {
|
||||
//获取今日报警记录列表
|
||||
let alarmList = ref([] as any);
|
||||
let detailData = ref({} as any);
|
||||
const getAlarmListInfo = async () => {
|
||||
const res: any = await getAlarmList({ projectSn: store.sn });
|
||||
if (res.result.length > 0) {
|
||||
alarmList.value = res.result;
|
||||
const getAlarmListInfo = async (tip:any) => {
|
||||
let data:any = {
|
||||
projectSn: store.sn,
|
||||
pageNo: tip == 'search'?1:pageNo.value,
|
||||
pageSize: 20
|
||||
};
|
||||
const res: any = await getAlarmPage(data);
|
||||
if (tip == "more") {
|
||||
alarmList.value = alarmList.value.concat(res.result.records);
|
||||
} else {
|
||||
alarmList.value = [];
|
||||
alarmList.value = res.result.records;
|
||||
}
|
||||
if (res.result.pages == pageNo.value) {
|
||||
moreScroll.value = false;
|
||||
} else {
|
||||
pageNo.value = pageNo.value + 1;
|
||||
}
|
||||
dealVal.value = dealVal.value + 1;
|
||||
emits("updateListData",dealVal.value)
|
||||
@ -141,21 +151,21 @@ function closeDialog() {
|
||||
|
||||
onMounted(async () => {
|
||||
await getMemberCareList();
|
||||
await getAlarmListInfo();
|
||||
// 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) {
|
||||
// getMemberCountList("more");
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
await getAlarmListInfo('search');
|
||||
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) {
|
||||
getAlarmListInfo("more");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user