| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- import HttpAxios from '@/utils/axios'
- const base = import.meta.env.VITE_API_HOST
- const baseUrl = `${base}/main_new_version.php`
- /**
- * 获取表格定制列功能数据
- */
- export const getTableSettingColumns = (params: any, config: any) => {
- return HttpAxios.get(`${baseUrl}`, params, config)
- }
- /**
- * 保存表格定制列数据
- */
- export const saveTableSettingColumns = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'ajax',
- operate: 'save_setting_display',
- model_name: 'Booking_Search',
- ...params
- },
- config
- )
- }
- /**
- * 修改密码
- */
- export const changePwdByLogin = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'password',
- ...params
- },
- config
- )
- }
- /**
- * 获取菜单列表
- */
- export const getMenuList = (params: any, config: any) => {
- return HttpAxios.get(
- `${baseUrl}`,
- {
- action: 'main',
- ...params
- },
- config
- )
- }
- /**
- * 获取日志列
- */
- export const getOperationTableColumns = (params: any, config: any) => {
- return HttpAxios.get(
- `${baseUrl}`,
- {
- action: 'opreation_log'
- },
- config
- )
- }
- /**
- * 查询日志
- */
- export const SearchOperationLog = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'opreation_log',
- operate: 'search',
- ...params
- },
- config
- )
- }
- /**
- * 日志表格下载
- */
- export const OperationLogDownload = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'opreation_log',
- operate: 'excel',
- ...params
- },
- config
- )
- }
- /**
- * 获取首页数据
- */
- export const GetDashboardData = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'main_welcome',
- ...params
- },
- config
- )
- }
- /**
- * 获取ETD to ETA (Days)
- */
- export const GetETDEcharts = (params: any, config: any) => {
- return HttpAxios.get(
- `${baseUrl}`,
- {
- action: 'main_report_etd',
- r_type: 'r1',
- ...params
- },
- config
- )
- }
- /**
- * 获取KPI Echarts
- */
- export const GetKPIEcharts = (params: any, config: any) => {
- return HttpAxios.get(
- `${baseUrl}`,
- {
- action: 'main_report_kpi',
- ...params
- },
- config
- )
- }
- /**
- * 获取Pending Echarts
- */
- export const GetPendingEcharts = (params: any, config: any) => {
- return HttpAxios.get(
- `${baseUrl}`,
- {
- action: 'main_report',
- ...params
- },
- config
- )
- }
- /**
- * 获取ContainerCount Echarts
- */
- export const GetContainerCountEcharts = (params: any, config: any) => {
- return HttpAxios.get(
- `${baseUrl}`,
- {
- action: 'main_report_container_bar',
- r_type: 'r2',
- ...params
- },
- config
- )
- }
- /**
- * 获取CO2 Emission
- */
- export const GetCo2EmissionEcharts = (params: any, config: any) => {
- return HttpAxios.get(
- `${baseUrl}`,
- {
- action: 'main_report_co2e_bar',
- r_type: 'co2e_orgin',
- ...params
- },
- config
- )
- }
- /**
- * 获取CO2 Destination
- */
- export const GetCo2DestinationEcharts = (params: any, config: any) => {
- return HttpAxios.get(
- `${baseUrl}`,
- {
- action: 'main_report_co2e_bar',
- r_type: 'co2e_destination',
- ...params
- },
- config
- )
- }
- /**
- * Top10 Origin/Destination
- */
- export const GetTop10ODEcharts = (params: any, config: any) => {
- return HttpAxios.get(
- `${baseUrl}`,
- {
- action: 'main_report_top10_bar',
- r_type: 'top',
- ...params
- },
- config
- )
- }
- /**
- * Save Layout
- */
- export const SaveLayout = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'save_layout',
- ...params
- },
- config
- )
- }
- /**
- * 评分提交
- */
- export const scoringgrade = (params: any, config: any) => {
- return HttpAxios.post(
- `${baseUrl}`,
- {
- action: 'tools',
- operate: 'mark_save',
- ...params
- },
- config
- )
- }
- /**
- * 获取首页筛选条件
- */
- export const getDashboardFilters = (config: any) => {
- return HttpAxios.get(
- `${baseUrl}`,
- {
- action: 'main_filter',
- },
- config
- )
- }
|