import { httppost1, httppost2, httpget } from "../utils/request"; import { message } from 'antd'; import apiurl from './apiurl'; import appconsts from '../service/appconsts'; //监测预警的列表数据 export async function page(params = {}) { if(!params.tableName){ return { list: [], totalRow: 0 }; } const { data, code, msg } = await httppost2(apiurl.queryIaAllTitleAndApi,params) || {}; if (code !== 200) { message.error(msg || '请求失败'); return { list: [], totalRow: 0 }; } if(data.iaAllApi.records.length>0){ data.iaAllApi.records.map((item,index)=>{ item.key=index; }); } if(data.iaAllTitle){ data.iaAllApi.records.unshift(data.iaAllTitle); } return { list: data.iaAllApi.records, totalRow: data.iaAllApi.total }; }