query.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. const _Http = getApp().globalData.http;
  2. let obj = {
  3. stagename: {
  4. "id": 20221128143604,
  5. "content": {
  6. "pageNumber": 1,
  7. "pageSize": 1000,
  8. "where": {
  9. "condition": "",
  10. "allprojecttype": "",
  11. "projecttype": ""
  12. }
  13. }
  14. },
  15. brandname: {
  16. "content": {
  17. "isExport": 0,
  18. "pageNumber": 1,
  19. "pageSize": 1000,
  20. "where": {
  21. "condition": "",
  22. "tablefilter": {}
  23. }
  24. },
  25. "id": 20220922085103
  26. },
  27. tags: {
  28. "id": 20221013104401,
  29. "content": {
  30. "isExport": 1,
  31. "pageNumber": 1,
  32. "pageSize": 1000,
  33. "sys_systemtagid": 1,
  34. "where": {
  35. "condition": ""
  36. }
  37. }
  38. }
  39. }
  40. module.exports = {
  41. /**
  42. * 获取筛选分类查询 无分页
  43. * 项目类型:projecttype
  44. * 项目等级:projectgrade
  45. * 项目阶段:stagename
  46. * 领域:tradefield
  47. * 品牌:brandname
  48. * 客户标签:tags
  49. */
  50. async getTypes(name) {
  51. let params = null;
  52. if (["projecttype", 'projectgrade', 'tradefield'].includes(name)) {
  53. params = {
  54. "classname": "sysmanage.develop.optiontype.optiontype",
  55. "method": "optiontypeselect",
  56. "content": {
  57. "nochace": true,
  58. "pageNumber": 1,
  59. "pageSize": 1000,
  60. "typename": name,
  61. "parameter": {
  62. "siteid": wx.getStorageSync('userMsg').siteid
  63. }
  64. }
  65. }
  66. } else {
  67. params = obj[name];
  68. }
  69. if (!params) return;
  70. let res = await _Http.basic(params);
  71. console.log(`查询${name}`, res)
  72. return res.code == '1' ? res.data : [];
  73. }
  74. }