edit.js 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. // 质量月报
  2. import request from '@/utils/request'
  3. import { projectManagementUrl, ldapServer } from '@/apiConfig/api'
  4. // 获取月报
  5. export function getMonthlyReport(reportId) {
  6. return request({
  7. url: projectManagementUrl + '/monthlyReport/get',
  8. // url: 'http://localhost:9528/data.json',
  9. method: 'get',
  10. timeout: '100000',
  11. params: {
  12. reportId
  13. }
  14. })
  15. }
  16. // 删除月报
  17. export function delMonthlyReport(reportId) {
  18. return request({
  19. url: projectManagementUrl + '/monthlyReport/delete',
  20. method: 'get',
  21. timeout: '100000',
  22. params: {
  23. reportId
  24. }
  25. })
  26. }
  27. // 更新整个月报
  28. export function updateMonthlyReport(data) {
  29. return request({
  30. url: projectManagementUrl + '/monthlyReport/update',
  31. method: 'post',
  32. timeout: '100000',
  33. data
  34. })
  35. }
  36. // 仅更新子月报
  37. export function updateSubReport(data) {
  38. return request({
  39. url: projectManagementUrl + '/monthlyReport/subReport/update',
  40. method: 'post',
  41. timeout: '100000',
  42. data
  43. })
  44. }
  45. // 获取完整报告
  46. /**
  47. *
  48. * @param data[reportId] 月报ID(93|94)
  49. * @param data[catalogTitle] (上月问题跟进|本月重点问题|服务端详情|客户端详情|硬件详情|本月优秀&持续改进)
  50. * @returns {*}
  51. */
  52. export function getAllSubReportCatalog(data) {
  53. return request({
  54. url: projectManagementUrl + '/monthlyReport/getAllSubReportCatalog',
  55. method: 'post',
  56. timeout: '100000',
  57. data
  58. })
  59. }
  60. // 更新反馈信息
  61. export function updateAnalyticFeedback(data) {
  62. return request({
  63. url: projectManagementUrl + '/monthlyReport/updateAnalyticFeedback',
  64. method: 'post',
  65. timeout: '100000',
  66. data
  67. })
  68. }
  69. // 获取部门数据
  70. export function getReportDependence(params) {
  71. return request({
  72. url: projectManagementUrl + '/monthlyReport/getReportDependence',
  73. method: 'get',
  74. timeout: '100000',
  75. params
  76. })
  77. }
  78. // 获取部门数据 v2
  79. // /api/department/getDeptArch
  80. export function getDeptArch() {
  81. return request({
  82. url: ldapServer + '/api/department/getDeptArch?deptId=100001',
  83. method: 'get',
  84. timeout: '100000'
  85. })
  86. }
  87. // 月报发送确认
  88. export function sendConfirm(data) {
  89. return request({
  90. url: projectManagementUrl + '/monthlyReport/sendConfirm',
  91. method: 'post',
  92. timeout: '100000',
  93. data
  94. })
  95. }
  96. // 子月报发送确认
  97. export function sendSubConfirm(data) {
  98. return request({
  99. url: projectManagementUrl + '/monthlyReport/confirm',
  100. method: 'post',
  101. timeout: '100000',
  102. data
  103. })
  104. }
  105. // 月报回退 /monthlyReport/returnReport subReportIds
  106. export function returnReport(data) {
  107. return request({
  108. url: projectManagementUrl + '/monthlyReport/returnReport',
  109. method: 'post',
  110. timeout: '100000',
  111. data
  112. })
  113. }
  114. // 获取子月报
  115. export function getSubReport(params) {
  116. return request({
  117. url: projectManagementUrl + '/monthlyReport/subReport/get',
  118. method: 'get',
  119. timeout: '100000',
  120. params
  121. })
  122. }
  123. // 月报发布
  124. export function publishReport(data) {
  125. return request({
  126. url: projectManagementUrl + '/monthlyReport/publish',
  127. method: 'post',
  128. timeout: '100000',
  129. data
  130. })
  131. }
  132. // 获取子月报列表
  133. export function getSubReportInfo(id) {
  134. return request({
  135. url: projectManagementUrl + '/monthlyReport/getSubReportInfo?id=' + id + '&needContent=true',
  136. timeout: '100000',
  137. method: 'get'
  138. })
  139. }
  140. // 重新拉取数据 /monthlyReport/pullDataAgain
  141. export function pullDataAgain(data) {
  142. return request({
  143. url: projectManagementUrl + '/monthlyReport/pullDataAgain',
  144. method: 'post',
  145. timeout: '100000',
  146. data
  147. })
  148. }
  149. // 获取整体概览数据
  150. export function getOverallOverview(reportId) {
  151. return request({
  152. url: projectManagementUrl + '/monthlyReport/getOverallOverview?reportId=' + reportId,
  153. timeout: '100000',
  154. method: 'get'
  155. })
  156. }
  157. // 获取线上问题饼图数据
  158. export function getOnlineProblemPieChart(reportId) {
  159. return request({
  160. url: projectManagementUrl + '/monthlyReport/getOnlineProblemPieChart?reportId=' + reportId,
  161. timeout: '100000',
  162. method: 'get'
  163. })
  164. }
  165. // 获取线上问题饼图数据
  166. export function getQualityProcessAndRdEfficiencyPieData(reportId) {
  167. return request({
  168. url: projectManagementUrl + '/monthlyReport/getQualityProcessAndRdEfficiencyPieData?reportId=' + reportId,
  169. timeout: '100000',
  170. method: 'get'
  171. })
  172. }
  173. // 月报阅览
  174. export function getMonthlyReportPreView(reportId) {
  175. return request({
  176. url: projectManagementUrl + '/monthlyReport/getMonthlyReportPreView?id=' + reportId,
  177. timeout: '100000',
  178. method: 'get'
  179. })
  180. }
  181. // 月报PDF阅览
  182. export function getMonthlyReportPrePdfView(reportId) {
  183. return request({
  184. url: projectManagementUrl + '/monthlyReport/getMonthlReportPdfPreview?id=' + reportId,
  185. timeout: '100000',
  186. method: 'get'
  187. })
  188. }
  189. // 获取月报负责人
  190. // /monthlyReport/getDeptCharge
  191. export function getDeptCharge(data) {
  192. return request({
  193. url: projectManagementUrl + '/monthlyReport/getDeptCharge',
  194. method: 'post',
  195. timeout: '100000',
  196. data
  197. })
  198. }
  199. // 月报PDF下载 /monthlyReport/downloadMonthlyReport
  200. export function downloadMonthlyReport(reportId) {
  201. return request({
  202. url: projectManagementUrl + '/monthlyReport/downloadMonthlyReport?id=' + reportId,
  203. timeout: '100000',
  204. method: 'get'
  205. })
  206. }
  207. // 拉取subtitle /monthlyReport/pullSubTitle
  208. export function pullSubTitle(data) {
  209. return request({
  210. url: projectManagementUrl + '/monthlyReport/pullSubTitle',
  211. method: 'post',
  212. timeout: '100000',
  213. data
  214. })
  215. }
  216. // 月报历史记录列表
  217. export function getHistory(params) {
  218. return request({
  219. url: projectManagementUrl + '/monthlyReport/getHistory',
  220. // url: 'http://127.0.0.1:4523/mock/368525/monthlyReport/getHistory',
  221. method: 'get',
  222. timeout: '100000',
  223. params
  224. })
  225. }
  226. // 月报历史记录详情
  227. export function getHistoryDetail(params) {
  228. return request({
  229. url: projectManagementUrl + '/monthlyReport/getHistoryDetail',
  230. // url: 'http://127.0.0.1:4523/mock/368525/monthlyReport/getHistoryDetail',
  231. method: 'get',
  232. timeout: '100000',
  233. params
  234. })
  235. }
  236. // 月报历史记录详情
  237. export function getAnalyticFeedback(data) {
  238. return request({
  239. url: projectManagementUrl + '/monthlyReport/getAnalyticFeedback',
  240. // url: 'http://127.0.0.1:4523/mock/368525/monthlyReport/getHistoryDetail',
  241. method: 'post',
  242. timeout: '100000',
  243. data
  244. })
  245. }
  246. // 月报回滚
  247. export function rollback (data) {
  248. return request({
  249. url: projectManagementUrl + '/monthlyReport/rollback',
  250. // url: 'http://127.0.0.1:4523/mock/368525/monthlyReport/getHistoryDetail',
  251. method: 'post',
  252. timeout: '100000',
  253. data
  254. })
  255. }