holidayInfo.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import request from '@/utils/request'
  2. import constant from '@/constant'
  3. function pageList(formData){
  4. return request.post(constant.serverUrl + "/base/holidayInfo/pageList", formData);
  5. }
  6. function create(){
  7. return request.get(constant.serverUrl + "/base/holidayInfo/create");
  8. }
  9. function edit(id){
  10. return request.get(constant.serverUrl + "/base/holidayInfo/edit/" + id);
  11. }
  12. function add(formModel){
  13. return request.post(constant.serverUrl + "/base/holidayInfo/add", formModel,{
  14. headers: {
  15. "Content-Type": "application/json"
  16. }
  17. });
  18. }
  19. function update(formModel){
  20. return request.post(constant.serverUrl + "/base/holidayInfo/update", formModel,{
  21. headers: {
  22. "Content-Type": "application/json"
  23. }
  24. });
  25. }
  26. function remove(id){
  27. return request.post(constant.serverUrl + "/base/holidayInfo/delete/" + id);
  28. }
  29. function batchRemove(idList){
  30. return request.post(constant.serverUrl + "/base/holidayInfo/batchDelete",idList,{
  31. headers: {
  32. "Content-Type": "application/json"
  33. }
  34. });
  35. }
  36. function exportXls(formData) {
  37. //导出xls
  38. return request.post(constant.serverUrl + "/base/holidayInfo/exportXls", formData);
  39. }
  40. export default {
  41. pageList,create,edit,add,update,remove,batchRemove,exportXls
  42. }