templateInfo.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import request from '@/utils/request'
  2. import constant from '@/constant'
  3. function pageList(formData) {
  4. return request.post(constant.serverUrl + "/base/templateInfo/pageList", formData);
  5. }
  6. function list() {
  7. return request.post(constant.serverUrl + "/base/templateInfo/list");
  8. }
  9. function create() {
  10. return request.get(constant.serverUrl + "/base/templateInfo/create");
  11. }
  12. function edit(id) {
  13. return request.get(constant.serverUrl + "/base/templateInfo/edit/" + id);
  14. }
  15. function add(formModel) {
  16. return request.post(constant.serverUrl + "/base/templateInfo/add", formModel, {
  17. headers: {
  18. "Content-Type": "application/json"
  19. }
  20. });
  21. }
  22. function update(formModel) {
  23. return request.post(constant.serverUrl + "/base/templateInfo/update", formModel, {
  24. headers: {
  25. "Content-Type": "application/json"
  26. }
  27. });
  28. }
  29. function updateDate(formModel) {
  30. return request.post(constant.serverUrl + "/base/templateInfo/updateDate", formModel, {
  31. headers: {
  32. "Content-Type": "application/json"
  33. }
  34. });
  35. }
  36. function remove(id) {
  37. return request.post(constant.serverUrl + "/base/templateInfo/delete/" + id);
  38. }
  39. function checked(id) {
  40. return request.post(constant.serverUrl + "/base/templateInfo/checked/" + id);
  41. }
  42. function batchRemove(idList) {
  43. return request.post(constant.serverUrl + "/base/templateInfo/batchDelete", idList, {
  44. headers: {
  45. "Content-Type": "application/json"
  46. }
  47. });
  48. }
  49. function saveAttachment(formData) {
  50. return request.post(constant.serverUrl + "/base/templateInfo/saveAttachment", formData);
  51. }
  52. export default {
  53. pageList, create, edit, add, update, remove, batchRemove,list,checked,saveAttachment,updateDate
  54. }