update
This commit is contained in:
parent
a147eccee7
commit
3c3632469e
@ -508,7 +508,7 @@ const enterEachProvince: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
const data = await handleGetProvinceVehicleTreeList(req)
|
const data = await handleGetProvinceVehicleTreeList(req)
|
||||||
// JSON数据
|
// JSON数据
|
||||||
// const data = pageData
|
// const data = pageData
|
||||||
console.log('data', data);
|
console.log('数据', JSON.parse(JSON.stringify(data)));
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
setLoadingText('生成表头中,请稍后...')
|
setLoadingText('生成表头中,请稍后...')
|
||||||
// 拿到表头的数据
|
// 拿到表头的数据
|
||||||
|
|||||||
@ -561,6 +561,8 @@ const vehicleOwner: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
setExpandedRowKeys(['null-null-undefined-undefined-undefined-undefined-null'])
|
setExpandedRowKeys(['null-null-undefined-undefined-undefined-undefined-null'])
|
||||||
// 接口数据
|
// 接口数据
|
||||||
const data = await handleGetBayonetOwnerAHTreeList(req)
|
const data = await handleGetBayonetOwnerAHTreeList(req)
|
||||||
|
console.log('接口数据', JSON.parse(JSON.stringify(data)));
|
||||||
|
|
||||||
let endTime1: number = new Date().getTime()
|
let endTime1: number = new Date().getTime()
|
||||||
// 准备导出excel数据
|
// 准备导出excel数据
|
||||||
let startTime2: number = new Date().getTime()
|
let startTime2: number = new Date().getTime()
|
||||||
|
|||||||
@ -659,7 +659,7 @@ const PeriodWarning: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
DataType: 2
|
DataType: 2
|
||||||
}
|
}
|
||||||
let data = await handleGetPeriodWarningList(req)
|
let data = await handleGetPeriodWarningList(req)
|
||||||
console.log('table', data);
|
console.log('table', JSON.parse(JSON.stringify(data)));
|
||||||
|
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
data.forEach((item: any) => {
|
data.forEach((item: any) => {
|
||||||
|
|||||||
@ -140,6 +140,8 @@ const SpringFestival: React.FC<{ currentUser?: CurrentUser }> = (props) => {
|
|||||||
setDetailEndTime(params.StatisticsDate)
|
setDetailEndTime(params.StatisticsDate)
|
||||||
setDetailStartTime(params.CurStartDate)
|
setDetailStartTime(params.CurStartDate)
|
||||||
const data = await handleGetSpringTableList(req)
|
const data = await handleGetSpringTableList(req)
|
||||||
|
console.log('结果', JSON.parse(JSON.stringify(data)));
|
||||||
|
|
||||||
setShowCurrentFestivalObj(currentFestivalObj)
|
setShowCurrentFestivalObj(currentFestivalObj)
|
||||||
const list: any = []
|
const list: any = []
|
||||||
if (data.data && data.data.length > 0) {
|
if (data.data && data.data.length > 0) {
|
||||||
|
|||||||
@ -1,27 +1,7 @@
|
|||||||
import { tableList, wrapTreeNode } from '@/utils/format';
|
import { tableList, wrapTreeNode } from '@/utils/format';
|
||||||
import request from '@/utils/requestCode';
|
import request from '@/utils/requestCode';
|
||||||
import requestNormal from '@/utils/request';
|
import requestNormal from '@/utils/request';
|
||||||
import requestPythonTest from '@/utils/requestPythonTest';
|
|
||||||
|
|
||||||
// 在python测试项目中 获取 多维度经营数据对比 表格数据
|
|
||||||
export async function handlePythonGetList(params?: any) {
|
|
||||||
const data = await requestPythonTest(`api/monthly-revenue/query/`, {
|
|
||||||
method: 'GET',
|
|
||||||
params: { ...params }
|
|
||||||
});
|
|
||||||
|
|
||||||
if (data.Result_Code !== 100) {
|
|
||||||
return {
|
|
||||||
data: [],
|
|
||||||
current: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
total: 0,
|
|
||||||
success: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return data.Result_Data.List;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 获取月度车流分析数据
|
// 获取月度车流分析数据
|
||||||
|
|||||||
@ -1,7 +1,108 @@
|
|||||||
import {tableList, wrapTreeNode} from '@/utils/format';
|
import { tableList, wrapTreeNode } from '@/utils/format';
|
||||||
import request from '@/utils/requestCode';
|
import request from '@/utils/requestCode';
|
||||||
import requestNormal from '@/utils/request';
|
import requestNormal from '@/utils/request';
|
||||||
|
import requestPythonTest from '@/utils/requestPythonTest';
|
||||||
|
|
||||||
|
// 在python测试项目中 入区车辆归属地分析 表格数据
|
||||||
|
export async function handlePythonGetRevenueEstimateList(params?: any) {
|
||||||
|
const data = await requestPythonTest(`api/dynamic/GetRevenueEstimateList/`, {
|
||||||
|
method: 'GET',
|
||||||
|
params: { ...params }
|
||||||
|
});
|
||||||
|
|
||||||
|
if (data.Result_Code !== 100) {
|
||||||
|
return {
|
||||||
|
data: [],
|
||||||
|
current: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
success: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return data.Result_Data.List;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 在python测试项目中 获取 车流销售异常预警 表格数据
|
||||||
|
export async function handleNewPythonTrafficWarningList(params?: any) {
|
||||||
|
const data = await requestPythonTest(`api/dynamic/warningTypeMonthINCAnalysis/`, {
|
||||||
|
method: 'GET',
|
||||||
|
params: { ...params }
|
||||||
|
});
|
||||||
|
|
||||||
|
if (data.Result_Code !== 100) {
|
||||||
|
return {
|
||||||
|
data: [],
|
||||||
|
current: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
success: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return data.Result_Data.List;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 在python测试项目中 获取 车流销售异常预警 表格数据
|
||||||
|
export async function handlePythonTrafficWarningList(params?: any) {
|
||||||
|
const data = await requestPythonTest(`api/traffic-warning/cache/query/`, {
|
||||||
|
method: 'GET',
|
||||||
|
params: { ...params }
|
||||||
|
});
|
||||||
|
|
||||||
|
if (data.Result_Code !== 100) {
|
||||||
|
return {
|
||||||
|
data: [],
|
||||||
|
current: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
success: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return data.Result_Data.List;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 在python测试项目中 获取 多维度经营数据对比 表格数据
|
||||||
|
export async function handlePythonGetList(params?: any) {
|
||||||
|
const data = await requestPythonTest(`api/monthly-revenue/query/`, {
|
||||||
|
method: 'GET',
|
||||||
|
params: { ...params }
|
||||||
|
});
|
||||||
|
|
||||||
|
if (data.Result_Code !== 100) {
|
||||||
|
return {
|
||||||
|
data: [],
|
||||||
|
current: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
success: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return data.Result_Data.List;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 在python测试项目中 入区车辆归属地分析 表格数据
|
||||||
|
export async function handleBayonetList(params?: any) {
|
||||||
|
const data = await requestPythonTest(`api/bayonet/statistics/query/`, {
|
||||||
|
method: 'GET',
|
||||||
|
params: { ...params }
|
||||||
|
});
|
||||||
|
|
||||||
|
if (data.Result_Code !== 100) {
|
||||||
|
return {
|
||||||
|
data: [],
|
||||||
|
current: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
success: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return data.Result_Data.List;
|
||||||
|
}
|
||||||
|
|
||||||
export async function handleGetMonthINCAnalysis(params?: any) {
|
export async function handleGetMonthINCAnalysis(params?: any) {
|
||||||
const data = await request(`/Revenue/GetMonthINCAnalysis`, {
|
const data = await request(`/Revenue/GetMonthINCAnalysis`, {
|
||||||
|
|||||||
@ -752,6 +752,22 @@ export const handleGetServerPartList = (list: any) => {
|
|||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 没有合计的情况
|
||||||
|
export const handleGetServerPartListNoSum = (list: any) => {
|
||||||
|
const res: any = []
|
||||||
|
if (list && list.length > 0) {
|
||||||
|
list.forEach((item: any) => {
|
||||||
|
if (item.children && item.children.length > 0) {
|
||||||
|
item.children.forEach((subItem: any) => {
|
||||||
|
res.push(subItem)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
|
||||||
// 数组去重
|
// 数组去重
|
||||||
export const unique = (arr: any) => {
|
export const unique = (arr: any) => {
|
||||||
if (!Array.isArray(arr)) {
|
if (!Array.isArray(arr)) {
|
||||||
|
|||||||
@ -60,7 +60,7 @@ const request = extend({
|
|||||||
errorHandler, // default error handling
|
errorHandler, // default error handling
|
||||||
// prefix: '/EShangApiMain',// 开发
|
// prefix: '/EShangApiMain',// 开发
|
||||||
// prefix: 'https://eshangtech.com:18900/EShangApiMain', // 正式
|
// prefix: 'https://eshangtech.com:18900/EShangApiMain', // 正式
|
||||||
prefix: 'http://127.0.0.1:8002/', // 正式
|
prefix: 'http://192.168.1.207:8002/', // 正式
|
||||||
headers: {
|
headers: {
|
||||||
token: '',
|
token: '',
|
||||||
ProvinceCode: '',
|
ProvinceCode: '',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user