index.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. // 质量月报
  2. import request from '@/utils/request'
  3. import { TeamManagement } from '@/apiConfig/api'
  4. // ----------------- 主页 --------------
  5. // 获取月报主页下拉选择
  6. export function getAvaliableInfo() {
  7. return request({
  8. url: TeamManagement + `/monthlyReport/getAvaliableInfo`,
  9. method: 'get'
  10. })
  11. }
  12. // 获取月报主页data
  13. export function monthlyReportIndex(id) {
  14. return request({
  15. url: TeamManagement + `/monthlyReport/monthlyReportIndex?id=${id}`,
  16. method: 'get'
  17. })
  18. }
  19. // ---------------- 通用设置 -------------------
  20. // 获取月报发起人列表
  21. export function getSponsorList() {
  22. return request({
  23. url: TeamManagement + `/monthlyReport/sponsorList`,
  24. method: 'get'
  25. })
  26. }
  27. // 添加月报发起人
  28. export function createSponsor(data) {
  29. return request({
  30. url: TeamManagement + `/monthlyReport/createSponsor`,
  31. method: 'post',
  32. data
  33. })
  34. }
  35. // 删除月报发起人
  36. export function deleteSponsor(data) {
  37. return request({
  38. url: TeamManagement + `/monthlyReport/deleteSponsor`,
  39. method: 'post',
  40. data
  41. })
  42. }
  43. // 获取业务线设置list
  44. export function monthlyReportSettingList() {
  45. return request({
  46. url: TeamManagement + `/monthlyReport/settingList`,
  47. method: 'get'
  48. })
  49. }
  50. // 更新业务线设置
  51. export function monthlyReportUpdatSetting(data) {
  52. return request({
  53. url: TeamManagement + `/monthlyReport/updatSetting`,
  54. method: 'post',
  55. data
  56. })
  57. }
  58. // -------------------- 团队设置 ----------------------
  59. // 获取部门信息列表
  60. export function getDeptSetting() {
  61. return request({
  62. url: TeamManagement + `/monthlyReport/getDeptSetting`,
  63. method: 'get'
  64. })
  65. }
  66. // 删除部门关联业务线
  67. export function deleteDeptBizRel(data) {
  68. return request({
  69. url: TeamManagement + `/monthlyReport/deleteDeptBizRel`,
  70. method: 'post',
  71. data
  72. })
  73. }
  74. // 部门添加关联业务线
  75. export function createDeptBizRel(data) {
  76. return request({
  77. url: TeamManagement + `/monthlyReport/createDeptBizRel`,
  78. method: 'post',
  79. data
  80. })
  81. }
  82. // 点击部门获取部门人员信息
  83. export function getDeptMember(id) {
  84. return request({
  85. url: TeamManagement + `/monthlyReport/getDeptMember?deptCode=${id}`,
  86. method: 'get'
  87. })
  88. }
  89. // 获取月报业务线
  90. export function getReportBizInfo(id) {
  91. return request({
  92. url: TeamManagement + `/monthlyReport/getReportBizInfo`,
  93. method: 'get'
  94. })
  95. }
  96. // 获取部门下odin节点
  97. export function getOdinNode(id) {
  98. return request({
  99. url: TeamManagement + `/monthlyReport/getOdinNode?deptId=${id}`,
  100. method: 'get'
  101. })
  102. }
  103. // -------------- 节点树 ---------------
  104. // 获取月报节点树 待定
  105. export function getOdinTree(data) {
  106. return request({
  107. url: data !== null ? TeamManagement + `/monthlyReport/getOdinTree?keyWord=${data}` : TeamManagement + `/monthlyReport/getOdinTree`,
  108. timeout: '10000',
  109. method: 'get'
  110. })
  111. }
  112. // 添加根节点
  113. export function addShowOdinNode(data) {
  114. return request({
  115. url: TeamManagement + `/monthlyReport/addShowOdinNode`,
  116. method: 'post',
  117. data
  118. })
  119. }
  120. // 创建月报
  121. export function createMonthlyReport(data) {
  122. return request({
  123. url: TeamManagement + `/monthlyReport/create`,
  124. method: 'post',
  125. data
  126. })
  127. }
  128. // 根据父odin节点加载odin子节点
  129. export function getOdinNodeByParentId(id) {
  130. return request({
  131. url: TeamManagement + `/monthlyReport/getOdinNodeByParentId?odinId=${id}`,
  132. timeout: '10000',
  133. method: 'get'
  134. })
  135. }
  136. // 部门模糊搜索
  137. export function getDeptByKeyWord(id) {
  138. return request({
  139. url: TeamManagement + `/monthlyReport/getDeptByKeyWord?keyWord=${id}`,
  140. timeout: '10000',
  141. method: 'get'
  142. })
  143. }
  144. // 节点树 增加团队
  145. export function createOdinDeptRel(data) {
  146. return request({
  147. url: TeamManagement + `/monthlyReport/createOdinDeptRelV2`,
  148. method: 'post',
  149. data
  150. })
  151. }
  152. // 节点树 删除团队
  153. export function deleteOdinBizRel(data) {
  154. return request({
  155. url: TeamManagement + `/monthlyReport/deleteOdinDeptRelV2`,
  156. method: 'post',
  157. data
  158. })
  159. }