51 lines
1.1 KiB
JavaScript
51 lines
1.1 KiB
JavaScript
|
|
import {httppost1, httppost2, httpget} from "../utils/request";
|
||
|
|
import {message} from 'antd';
|
||
|
|
import apiurl from './apiurl';
|
||
|
|
|
||
|
|
//县基本信息 分页查询
|
||
|
|
export async function page(params = {}) {
|
||
|
|
const myParams = {
|
||
|
|
countycode: localStorage.getItem('ADCD6') + '000000',
|
||
|
|
...params
|
||
|
|
};
|
||
|
|
|
||
|
|
const {data, code, msg} = await httppost2(apiurl.reservoirWarnPerson.page, myParams) || {};
|
||
|
|
|
||
|
|
if (code !== 200) {
|
||
|
|
message.error(msg || '请求失败');
|
||
|
|
return {list: [], totalRow: 0};
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
return {list: data.records, totalRow: data.total};
|
||
|
|
}
|
||
|
|
|
||
|
|
//新增
|
||
|
|
export async function add(params = {}) {
|
||
|
|
const res = await httppost2(apiurl.reservoirWarnPerson.add, params) || {};
|
||
|
|
|
||
|
|
return res;
|
||
|
|
}
|
||
|
|
|
||
|
|
//编辑
|
||
|
|
export async function edit(params = {}) {
|
||
|
|
const res = await httppost2(apiurl.reservoirWarnPerson.edit, params) || {};
|
||
|
|
|
||
|
|
return res;
|
||
|
|
}
|
||
|
|
|
||
|
|
//删除
|
||
|
|
export async function del(params = {}) {
|
||
|
|
const res = await httppost1(apiurl.reservoirWarnPerson.del, params) || {};
|
||
|
|
|
||
|
|
return res;
|
||
|
|
}
|
||
|
|
|
||
|
|
//获取水库列表
|
||
|
|
export async function getReservoir(params = {}) {
|
||
|
|
const res = await httppost2(apiurl.informationManagement.stcd.page, params) || {};
|
||
|
|
|
||
|
|
return res;
|
||
|
|
}
|
||
|
|
|