@@ -122,39 +122,31 @@ import { GlobalStore } from "@/stores";
import { getCompanyDataList, getMemberInfoList } from "@/api/modules/labor";
import type { TabsPaneContext } from 'element-plus'
import { getAlarmTypeOption } from "@/api/modules/aIEarlyWarn";
-import { getAlarmRecordApi } from "@/api/modules/agjtCommandApi";
+import { getAlarmRecordApi, getAlarmTypeCountApi } from "@/api/modules/agjtCommandApi";
const store = GlobalStore();
const props = defineProps(["tip"]);
const BASEURL = import.meta.env.VITE_API_URL;
let showDialog = ref(false as any);
-const activeName = ref('first')
-const activeIndex = ref('1' as any)
-const onlineWorkList = ref([
- { name: "在职", value: 1 },
- { name: "离职", value: 2 }
-])
const enterpriseListData = ref([] as any);
-const memberTypeList = ref([
- { name: "劳务人员", value: 1 },
- { name: "管理人员", value: 2 },
- { name: "临时人员", value: 3 }
-]);
-const alarmTypeList = ref(["报警", "预警"]);
+const topDangerList = ref([] as any)
let pageNo = ref(1 as any);
let moreScroll = ref(true as any);
const refScrollbar = ref(null as any); // 绑定到滚动的盒子上
-const deviceList = ref([] as any); // 设备列表
const detailData = ref({} as any);
-const searchForm = ref({
- memberType: '',
- belongCompany: '',
- workState: '',
- name: '',
- idCard: ''
-});
-
const partyMemberList = ref({} as any);
let aiAlarmTypeEnum = ref([] as any);
+// 获取顶部数据
+const getQualityStatisticsNumDataFn = async () => {
+ let data = {
+ projectSn: store.sn,
+ isStatsByWeek: 1
+ };
+ const res: any = await getAlarmTypeCountApi(data);
+ if (res.code == 200) {
+ console.log("安全隐患顶部数据",res)
+ topDangerList.value = res.result.alarmList || []
+ }
+};
//获取告警类型枚举
const getWarnTypeOption = async () => {
const res: any = await getAlarmTypeOption({ projectSn: store.sn });
@@ -230,6 +222,7 @@ const getMemberCountList = async (tip:any) => {
onMounted(async () => {
await getCompanyList();
await getMemberCountList('search');
+ await getQualityStatisticsNumDataFn();
getWarnTypeOption();
refScrollbar.value.wrapRef.addEventListener("scroll", (e: any) => {
// console.log("滚动容器", e);