1
guanqb
2024-01-20 f13afcb61276061871b30bce17a7877287df0b67
src/api/home/index.js
@@ -2,45 +2,68 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-12-27 14:19:19
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-02-09 10:46:30
 * @LastEditTime: 2023-06-26 14:24:51
 * @FilePath: \srs-police-affairs\src\api\home\index.js
 * @Description:
 *
 * Copyright (c) 2023 by shuishen 1109946754@qq.com, All Rights Reserved.
 * @Description:
 *
 * Copyright (c) 2023 by shuishen 1109946754@qq.com, All Rights Reserved.
 */
import request from "@/router/axios.js"
let equipmentNum = ""
if (process.env.NODE_ENV == "development") {
    // 开发
    equipmentNum = window.BASE_URL_CONFIG.VUE_APP_OUTER_NET_EQUIPMENT
} else {
    // 部署
    equipmentNum = window.BASE_URL_CONFIG.VUE_APP_INTRANET_EQUIPMENT
}
/**
 * 获取值班列表
 * @param {*}
 * @returns
 * @param {*}
 * @returns
 */
export const getSchedulingList = () => {
// export const getSchedulingList = (current, size, params) => {
export const getSchedulingList = (params) => {
    return request({
        url: `/api/scheduling/scheduling/page`,
        method: 'get',
        method: "get",
        params: {
            current: 1,
            size: 100,
            sameday: 1,
        }
            ...params,
            // current: current,
            // size: size
        },
    })
}
/**
 * 获取值班单位集合信息
 * @param {*}
 * @returns
 */
export const getSchedulingDeptList = (current, size, params) => {
    return request({
        url: `/api/scheduling/scheduling/getSchedulingDeptList`,
        method: "get",
        params: params,
    })
}
export const getAnswerPolices = (params) => {
    return request({
        url: `/api/doorplate/doorplate/acceptAlarmList`,
        method: 'get',
        params: params
        method: "get",
        params: params,
    })
}
export const getCallPolices = () => {
    return request({
        url: `/api/doorplate/doorplate/setOutAlarmList`,
        method: 'get',
        params: {}
        method: "get",
        params: {},
    })
}
@@ -48,48 +71,85 @@
export const getAlarmList = (params) => {
    return request({
        url: `/api/alarm/alarm/page`,
        method: 'get',
        method: "get",
        params: {
            ...params
        }
            ...params,
        },
    })
}
// 获取接警历史记录统计数据
export const getAlarmStatistics = (params) => {
    return request({
        url: `/api/alarm/alarm/statisticsAlarmByBJLX`,
        method: "get",
        params: {
            ...params,
        },
    })
}
// 获取处警历史
export const getActAsPoliceList = (alarmID, cjdwbh = '') => {
export const getActAsPoliceList = (alarmID, cjdwbh = "") => {
    return request({
        url: `/api/outAlarm/outAlarm/page`,
        method: 'get',
        method: "get",
        params: {
            current: 1,
            size: 100,
            alarmID,
            cjdwbh
        }
            cjdwbh,
        },
    })
}
// 案件统计接口查询
export const getCaseAll = (start, end, jjdwbh = '') => {
// 案件统计数量接口查询
export const getCaseAll = (start, end, jjdwbh = "") => {
    return request({
        url: `/api/alarm/alarm/statisticsAlarm`,
        method: 'get',
        method: "get",
        params: {
            start,
            end,
            jjdwbh
        }
            jjdwbh,
        },
    })
}
// 获取设备统计数据
export const getEquipment = (jjdwbh = '') => {
// 案件统计社区排行接口查询
export const getCaseRanking = (start, end, dwbh = "") => {
    return request({
        url: `/api/alarm/alarm/getAlarmVillageOrderList`,
        method: "get",
        params: {
            start,
            end,
            dwbh,
        },
    })
}
// 案件统计辖区排行接口查询
export const getCaseRankingArea = (start, end, dwbh = "") => {
    return request({
        url: `/api/alarm/alarm/getAlarmStatisticsByPoliceOrArea`,
        method: "get",
        params: {
            start,
            end,
            dwbh,
        },
    })
}
// 获取设备统计数据
export const getEquipment = (jjdwbh = "") => {
    return request({
        url: `/api/alarm/alarm/statisticsCameraTypeOnline`,
        method: 'get',
        method: "get",
        params: {
            jjdwbh
        }
            jjdwbh,
        },
    })
}
@@ -97,67 +157,109 @@
export const getPoliceStationTree = (type, id) => {
    return request({
        url: `/api/policeStationInfo/policeStationInfo/getPoliceStationTree`,
        method: 'get',
        method: "get",
        params: {
            type,
            id
        }
            id,
        },
    })
}
// 现有地模块
// 现有小区模块
export const getAreaStatisticInfo = (type, deptId) => {
    return request({
        url: `/api/policeStationInfo/policeStationInfo/getAreaStatisticInfo`,
        method: 'get',
        method: "get",
        params: {
            type,
            deptId
        }
            deptId,
        },
    })
}
// 获取设备分页数据
// 获取设备分页数据
export const getEquipmentPaging = (params) => {
    return request({
        // 内网
        url: `/device/query/devices/36110000002009999000/channelsCar`,
        // 外网
        // url: `/device/query/devices/34020000002000000003/channelsCar`,
        method: 'get',
        requestBaseUrl: 'outside',
        url: `/device/query/devices/${equipmentNum}/channelsCar`,
        method: "get",
        requestBaseUrl: "outside",
        params: {
            ...params
        }
            ...params,
        },
    })
}
// 获取设备数据
// 获取设备数据
export const getEquipmentAll = (params) => {
    return request({
        url: `/api/alarm/alarm/channelsCarAll`,
        method: 'get',
        method: "get",
        params: {
            ...params,
            deviceId: '36110000002009999000'
            // deviceId: '34020000002000000003'
        }
            deviceId: equipmentNum,
        },
    })
}
// 获取现有地详情弹窗
export const getLandDetail = (type, policeStationId, current, policeName, phone) => {
// 获取现有小区详情弹窗
export const getLandDetail = (params) => {
    return request({
        url: `/api/policeStationInfo/policeStationInfo/page`,
        method: 'get',
        params: {
            type,
            policeStationId,
            current,
            policeName,
            phone
        }
        method: "get",
        params: params,
    })
}
//实有房屋统计
export const getVillageStatisticData = (params) => {
    return request({
        url: `/api/villageDetail/villageDetail/getVillageStatisticData`,
        method: "get",
        params: params,
    })
}
//实有房屋统计--详情
export const getVillageStatisticDetail = (params) => {
    return request({
        url: `/api/villageDetail/villageDetail/page`,
        method: "get",
        params: params,
    })
}
//关注场所统计
export const getPlaceOfConcernStatisticData = (params) => {
    return request({
        url: `/api/placeOfConcern/placeOfConcern/getPlaceOfConcernStatisticData`,
        method: "get",
        params: params,
    })
}
//关注场所统计--详情
export const getPlaceOfConcernStatisticDetail = (params) => {
    return request({
        url: `/api/placeOfConcern/placeOfConcern/page`,
        method: "get",
        params: params,
    })
}
//实有住宅和关注场所统计总数
export const getVillageDetailAndPlaceStatisticNumber = (params) => {
    return request({
        url: `/api/placeOfConcern/placeOfConcern/getVillageDetailAndPlaceStatisticNumber`,
        method: "get",
        params: params,
    })
}
//酒店住户列表
export const getCheckInInfo = (params) => {
    return request({
        url: `/api/checkInInfo/checkInInfo/page`,
        method: "get",
        params,
    })
}