102 lines
2.2 KiB
JavaScript
102 lines
2.2 KiB
JavaScript
|
|
import { httppost1, httppost2, httpget, httpget2 } from '../utils/request'
|
||
|
|
import { message } from 'antd'
|
||
|
|
import apiurl from './apiurl'
|
||
|
|
import appconsts from '../service/appconsts'
|
||
|
|
|
||
|
|
//监测预警的列表数据
|
||
|
|
export async function unionList (params = {}) {
|
||
|
|
const myParams = {
|
||
|
|
...params
|
||
|
|
}
|
||
|
|
const { data, code, msg } =
|
||
|
|
(await httppost2(apiurl.ysgzq.dbaq.dwsUnion, myParams)) || {}
|
||
|
|
|
||
|
|
if (code !== 200) {
|
||
|
|
message.error(msg || '请求失败')
|
||
|
|
return []
|
||
|
|
}
|
||
|
|
return data
|
||
|
|
}
|
||
|
|
|
||
|
|
export async function attResBasePage (params = {}) {
|
||
|
|
const myParams = {
|
||
|
|
...params
|
||
|
|
}
|
||
|
|
const { data, code, msg } =
|
||
|
|
(await httppost2(apiurl.ysgzq.dbaq.attResBasePage, myParams)) || {}
|
||
|
|
|
||
|
|
if (code !== 200) {
|
||
|
|
message.error(msg || '请求失败')
|
||
|
|
return []
|
||
|
|
}
|
||
|
|
return data
|
||
|
|
}
|
||
|
|
|
||
|
|
export async function hEResPage (params = {}) {
|
||
|
|
const myParams = {
|
||
|
|
...params
|
||
|
|
}
|
||
|
|
const { data, code, msg } =
|
||
|
|
(await httpget2(apiurl.ysgzq.dbaq.hEResPage, myParams)) || {}
|
||
|
|
|
||
|
|
if (code !== 200) {
|
||
|
|
message.error(msg || '请求失败')
|
||
|
|
return []
|
||
|
|
}
|
||
|
|
return data
|
||
|
|
}
|
||
|
|
|
||
|
|
export async function hERespageRes (params = {}) {
|
||
|
|
const myParams = {
|
||
|
|
...params
|
||
|
|
}
|
||
|
|
const { data, code, msg } =
|
||
|
|
(await httppost2(apiurl.ysgzq.dbaq.hERespageRes, myParams)) || {}
|
||
|
|
|
||
|
|
if (code !== 200) {
|
||
|
|
message.error(msg || '请求失败')
|
||
|
|
return []
|
||
|
|
}
|
||
|
|
return data
|
||
|
|
}
|
||
|
|
export async function dwsWyList (params = {}) {
|
||
|
|
const myParams = {
|
||
|
|
...params
|
||
|
|
}
|
||
|
|
const { data, code, msg } =
|
||
|
|
(await httppost2(apiurl.ysgzq.dbaq.dwsWyList, myParams)) || {}
|
||
|
|
|
||
|
|
if (code !== 200) {
|
||
|
|
message.error(msg || '请求失败')
|
||
|
|
return []
|
||
|
|
}
|
||
|
|
return data
|
||
|
|
}
|
||
|
|
|
||
|
|
export async function pressListPage (params = {}) {
|
||
|
|
const myParams = {
|
||
|
|
...params
|
||
|
|
}
|
||
|
|
const { data, code, msg } =
|
||
|
|
(await httppost2(apiurl.ysgzq.dbaq.pressList, myParams)) || {}
|
||
|
|
|
||
|
|
if (code !== 200) {
|
||
|
|
message.error(msg || '请求失败')
|
||
|
|
return []
|
||
|
|
}
|
||
|
|
return data
|
||
|
|
}
|
||
|
|
export async function alarmPage (params = {}) {
|
||
|
|
const myParams = {
|
||
|
|
...params
|
||
|
|
}
|
||
|
|
const { data, code, msg } =
|
||
|
|
(await httppost2(apiurl.ysgzq.dbaq.alarmPage, myParams)) || {}
|
||
|
|
|
||
|
|
if (code !== 200) {
|
||
|
|
message.error(msg || '请求失败')
|
||
|
|
return []
|
||
|
|
}
|
||
|
|
return data
|
||
|
|
}
|