followplat.js 1001 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import http from '@/request/index.js';
  2. //跟台包清台
  3. export const state = {
  4. followData: [],
  5. surgcalData:[]
  6. };
  7. export const mutations = {
  8. setFollowData(state, data) {
  9. state.followData = data
  10. },
  11. }
  12. export const actions = {
  13. getFollowData({
  14. commit,
  15. rootState
  16. }, data) {
  17. return new Promise((resolve, reject) => {
  18. http('followplat.getListData', {
  19. ...data.pam,
  20. }, '加载中').then(res => {
  21. if (res.success == true) {
  22. data.that.$refs.paging.complete(res.data.records);
  23. } else {
  24. // commit('DetailsData', []);
  25. }
  26. }).catch(e => {
  27. reject(e)
  28. })
  29. })
  30. },
  31. getSurgcalData({
  32. commit,
  33. rootState
  34. }, data) {
  35. return new Promise((resolve, reject) => {
  36. http('surgical.getListData', {
  37. ...data.pam,
  38. }, '加载中').then(res => {
  39. if (res.success == true) {
  40. data.that.$refs.paging.complete(res.data.records);
  41. } else {
  42. // commit('DetailsData', []);
  43. }
  44. }).catch(e => {
  45. reject(e)
  46. })
  47. })
  48. },
  49. }