1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- import { defHttp } from '/@/utils/http/axios';
- import { Modal } from 'ant-design-vue';
- enum Api {
- list = '/ventanaly-device/safety/ventanalyMonitorLimit/list',
- save = '/ventanaly-device/safety/ventanalyMonitorLimit/add',
- edit = '/ventanaly-device/safety/ventanalyMonitorLimit/edit',
- deleteById = '/ventanaly-device/safety/ventanalyMonitorLimit/delete',
- limitList = '/ventanaly-device/safety/limitLevel/list',
- limitSave = '/ventanaly-device/safety/limitLevel/add',
- limitEdit = '/ventanaly-device/safety/limitLevel/edit',
- limitDeleteById = '/ventanaly-device/safety/limitLevel/delete',
- importExcel = '/sys/user/importExcel',
- exportXls = '/sys/user/exportXls',
- }
- /**
- * 导出api
- * @param params
- */
- export const getExportUrl = Api.exportXls;
- /**
- * 导入api
- */
- export const getImportUrl = Api.importExcel;
- /**
- * 列表接口
- * @param params
- */
- export const list = (params) => defHttp.get({ url: Api.list, params });
- export const save = (params) => defHttp.post({ url: Api.save, params });
- export const edit = (params) => defHttp.put({ url: Api.edit, params });
- export const limitSave = (params) => defHttp.post({ url: Api.limitSave, params });
- export const limitEdit = (params) => defHttp.put({ url: Api.limitEdit, params });
- export const limitDeleteById = (params, handleSuccess) => {
- return defHttp.delete({ url: Api.limitDeleteById, params }, { joinParamsToUrl: true }).then(() => {
- handleSuccess();
- });
- };
- /**
- * 删除用户
- */
- export const deleteById = (params, handleSuccess) => {
- return defHttp.delete({ url: Api.deleteById, params }, { joinParamsToUrl: true }).then(() => {
- handleSuccess();
- });
- };
- /**
- * 保存或者更新用户
- * @param params
- */
- export const saveOrUpdate = (params, isUpdate) => {
- const url = isUpdate ? Api.edit : Api.save;
- return defHttp.put({ url: url, params });
- };
- export const limitList = (params) => defHttp.get({ url: Api.limitList, params });
|