123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- import { defHttp } from '/@/utils/http/axios';
- import { Modal } from 'ant-design-vue';
- enum Api {
- reportList = '/safety/reportInfo/list',
- save = '/safety/reportInfo/createReportFile',
- deleteById = '/safety/reportInfo/delete',
- downLoad = '/safety/reportInfo/download',
- hisList = '/safety/reportLog/list',
- hisdownload = '/safety/reportLog/download',
- getQuery = '/sys/dict/reportKind/query',
- getUpload = '/safety/reportInfo/upload',
- reportAdd= '/ventanaly-company/company/reportData/add',
- queryDepartTreeSync= '/sys/sysDepart/queryDepartTreeSync',
- synReportFile='/safety/reportInfo/synReportFile',
- listMap='/ventanaly-company/company/reportData/list',
- reportEdit='/ventanaly-company/company/reportData/edit',
- reportDel='/ventanaly-company/company/reportData/delete',
- queryTreeList='/sys/sysDepart/queryTreeList'
- }
- /**
- * 部门树列表
- * @param params
- */
- export const queryTreeList = () => defHttp.get({ url: Api.queryTreeList, });
- /**
- * 报表数据映射列表
- * @param params
- */
- export const listMap = (params) => defHttp.get({ url: Api.listMap, params });
- /**
- * 同步报表到文件共享中心
- * @param params
- */
- export const synReportFile = (params) => defHttp.post({ url: Api.synReportFile, params });
- /**
- * 报表数据映射-所属部门编号列表
- * @param params
- */
- export const queryDepartTreeSync = () => defHttp.get({ url: Api.queryDepartTreeSync});
- /**
- * 报表数据映射-添加
- * @param params
- */
- export const reportAdd = (params) => defHttp.post({ url: Api.reportAdd, params });
- /**
- * 报表数据映射-编辑
- * @param params
- */
- export const reportEdit = (params) => defHttp.post({ url: Api.reportEdit, params });
- /**
- * 报表数据映射-删除
- */
- export const reportDel = (params, handleSuccess) => {
- return defHttp.delete({ url: Api.reportDel, params }, { joinParamsToUrl: true }).then(() => {
- handleSuccess();
- });
- };
- /**
- * 列表接口
- * @param params
- */
- export const reportList = (params) => defHttp.get({ url: Api.reportList, params });
- /**
- * 历史记录列表接口
- * @param params
- */
- export const hisList = (params) => defHttp.get({ url: Api.hisList, params });
- /**
- * 保存或者更新用户
- * @param params
- */
- export const save = (params) => defHttp.post({ url: Api.save, params });
- /**
- * 删除用户
- */
- export const deleteById = (params, handleSuccess) => {
- return defHttp.delete({ url: Api.deleteById, params }, { joinParamsToUrl: true }).then(() => {
- handleSuccess();
- });
- };
- /*
- 下载
- */
- export const downLoad = (params) => defHttp.post({ url: Api.downLoad, params, responseType: 'blob' });
- /*
- 报表历史记录下载
- */
- export const hisdownload = (params) => defHttp.post({ url: Api.hisdownload, params, responseType: 'blob' });
- /**
- * 报表菜单类型
- * @param params
- */
- export const getQuery = () => defHttp.get({ url: Api.getQuery });
- /**
- * 报表或模板上传
- * @param params
- */
- export const getUpload = (params) => defHttp.post({ headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, url: Api.getUpload, params });
|