|
|
@@ -3,41 +3,46 @@ import global from '../Global.js'
|
|
|
|
|
|
// 基础方法进行封装
|
|
|
function getApiBasic(url, postdata) {
|
|
|
- return axios.post(url, postdata).then(function(data){
|
|
|
+ return axios.post(url, postdata).then(function (data) {
|
|
|
let json = data.data;
|
|
|
return json
|
|
|
- },function(response){
|
|
|
+ }, function (response) {
|
|
|
console.info(response);
|
|
|
})
|
|
|
}
|
|
|
|
|
|
// 调用的api改写成方法
|
|
|
export function worldDetail(postdata) {
|
|
|
- let url = headapi + 'worldDetail';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ let url = headapi + 'worldDetail';
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// 测试用接口
|
|
|
export function editbasicinfo(postdata) {
|
|
|
let url = headapi + 'editbasicinfo';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
+
|
|
|
export function modPwd(postdata) {
|
|
|
let url = headapi + 'modPwd';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
+
|
|
|
export function getLoftInfo(postdata) {
|
|
|
let url = headapi + 'getLoftInfo';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
+
|
|
|
export function wifiSingle(postdata) {
|
|
|
let url = headapi + 'wifiSingle';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
+
|
|
|
export function Scan(postdata) {
|
|
|
let url = headapi + 'Scan';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
+
|
|
|
export function Watching(postdata) {
|
|
|
// let url = headapi + 'Watching';
|
|
|
// return getApiBasic(url,postdata);
|
|
|
@@ -62,56 +67,60 @@ export function Watching(postdata) {
|
|
|
// 用户登录
|
|
|
export function SignIn(postdata) {
|
|
|
let url = headapi + 'v1/Auth/SignIn';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
+
|
|
|
// 获取验证图片
|
|
|
export function GenVerifyPic(postdata) {
|
|
|
let url = headapi + 'v1/Auth/GenVerifyPic';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
+
|
|
|
// 用户退出
|
|
|
export function SignOut(postdata) {
|
|
|
let url = headapi + 'v1/Auth/SignOut';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// 获取首页左侧组织结构信息
|
|
|
export function GetRegionAndDectorSelect(postdata) {
|
|
|
let url = headapi + 'v1/Auth/GetRegionAndDectorSelect';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// 获取统计数量集合
|
|
|
export function GetStaticinfo(postdata) {
|
|
|
// 获取统计数量集合,包括获取设备总数,在线设备,离线设备,禁用设备,当日报警数量,可疑事件总数
|
|
|
let url = headapi + 'v1/Company/GetStaticinfo';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// 区域检出实时记录
|
|
|
export function RegionDetInfolist(postdata) {
|
|
|
// 最小区域检出实时记录
|
|
|
let url = headapi + 'v1/Company/RegionDetInfolist';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
+
|
|
|
// 单个设备检测实时记录
|
|
|
export function SingleDetInfolist(postdata) {
|
|
|
// 单个设备检测实时记录
|
|
|
let url = headapi + 'v1/Company/SingleDetInfolist';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
+
|
|
|
// Wifi柱状图信息传入探测器Id
|
|
|
export function DetectorWifixyInfolist(postdata) {
|
|
|
// Wifi柱状图信息
|
|
|
let url = headapi + 'v1/Detector/DetectorWifixyInfolist';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// Wifi柱状图信息传入区域Id
|
|
|
export function RegionWifixyInfolist(postdata) {
|
|
|
// Wifi柱状图信息
|
|
|
let url = headapi + 'v1/Detector/RegionWifixyInfolist';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -119,63 +128,63 @@ export function RegionWifixyInfolist(postdata) {
|
|
|
export function Detector06GInfolist(postdata) {
|
|
|
// 6G折线图信息传入设备Id
|
|
|
let url = headapi + 'v1/Detector/Detector06GInfolist';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// 添加区域
|
|
|
export function RegionAdd(postdata) {
|
|
|
// 添加区域 第一级区域填0
|
|
|
let url = headapi + 'v1/Company/RegionAdd';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// 修改区域信息
|
|
|
export function RegionEdit(postdata) {
|
|
|
// 修改区域 第一级区域填0
|
|
|
let url = headapi + 'v1/Company/RegionEdit';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// 修改区域状态
|
|
|
export function RegionStatusEdit(postdata) {
|
|
|
// 修改内部区域状态设置为 9删除
|
|
|
let url = headapi + 'v1/Company/RegionStatusEdit';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// 区域图片上传
|
|
|
export function RegionPictureUpload(postdata) {
|
|
|
// 上传区域图片
|
|
|
let url = headapi + 'v1/Company/RegionPictureUpload';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// 查询信号 Wifi记录
|
|
|
export function LogWifiDetectedQueryByDetector(postdata) {
|
|
|
// 查询检测设备的Wifi信号记录
|
|
|
let url = headapi + 'v1/Detector/LogWifiDetectedQueryByDetector';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// 查询手机信号记录
|
|
|
export function LogPhoneDetectedQueryByDetector(postdata) {
|
|
|
// 查询手机信号记录
|
|
|
let url = headapi + 'v1/Detector/LogPhoneDetectedQueryByDetector';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// 获取单个区域信息
|
|
|
export function GetRegiononeinfo(postdata) {
|
|
|
// 获取单个区域信息
|
|
|
let url = headapi + 'v1/Company/GetRegiononeinfo';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// 获取企业内部区域选择框信息
|
|
|
export function GetRegionSelect(postdata) {
|
|
|
// 根据企业id获取企业内部区域选择框信息 default:1
|
|
|
let url = headapi + 'v1/Auth/GetRegionSelect';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// Detector part
|
|
|
@@ -184,40 +193,40 @@ export function GetRegionSelect(postdata) {
|
|
|
export function DetectorQuery(postdata) {
|
|
|
// 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
|
|
|
let url = headapi + 'v1/Detector/DetectorQuery';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// 添加检测设备
|
|
|
export function DetectorAdd(postdata) {
|
|
|
// 添加检测设备
|
|
|
let url = headapi + 'v1/Detector/DetectorAdd';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// 修改检测设备信息
|
|
|
export function DetectorEdit(postdata) {
|
|
|
// 添加检测设备
|
|
|
let url = headapi + 'v1/Detector/DetectorEdit';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// 修改检测设备状态
|
|
|
export function DetectorEditStatus(postdata) {
|
|
|
- // 修改检测设备状态 9删除
|
|
|
+ // 修改检测设备状态 //新状态0禁用1启用2已离线9删除
|
|
|
let url = headapi + 'v1/Detector/DetectorEditStatus';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
-// 修改检测设备状态
|
|
|
+// 通过RegionId下载区域图片
|
|
|
export function RegionPictureGetByRegionId(postdata) {
|
|
|
- // 修改检测设备状态 9删除
|
|
|
+ // 通过RegionId下载区域图片
|
|
|
let url = headapi + 'v1/Company/RegionPictureGetByRegionId';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|
|
|
|
|
|
// 获取下级区域选择框信息
|
|
|
export function GetChildRegionSelect(postdata) {
|
|
|
// 获取下级区域选择框信息
|
|
|
let url = headapi + 'v1/Auth/GetChildRegionSelect';
|
|
|
- return getApiBasic(url,postdata);
|
|
|
+ return getApiBasic(url, postdata);
|
|
|
}
|