kbs.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. import request from "@utils/request";
  2. // 获取知识库
  3. export function getAllDict(params) {
  4. return request({
  5. url: `/api/sys/knowledge/base/getKnowledgeBasePage`,
  6. method: "post",
  7. data:{
  8. pageNum:1,
  9. pageSize:9999
  10. }
  11. });
  12. }
  13. //新增知识库
  14. export function addDict(params) {
  15. return request({
  16. url: `/api/sys/knowledge/base/insertSysKnowledgeBaseEntity`,
  17. method: "POST",
  18. data: params,
  19. headers: {
  20. "Content-type": "application/json",
  21. },
  22. });
  23. }
  24. // 删除知识库
  25. export function deleteSysDict(params) {
  26. return request({
  27. url: `/api/sys/knowledge/base/deleteById/${params.knowledgeId}`,
  28. method: "DELETE",
  29. headers: {
  30. "Content-type": "application/json",
  31. },
  32. });
  33. }
  34. // 更新系统知识库api
  35. export function updateSysDictParam(params) {
  36. return request({
  37. url: `/api/sys/knowledge/base/updateSysKnowledgeBaseEntity`,
  38. method: "POST",
  39. headers: {
  40. "Content-type": "application/json",
  41. },
  42. data: params,
  43. });
  44. }
  45. // 详细
  46. // 新增系统知识库数据api
  47. export function addDictValue(params) {
  48. return request({
  49. url: `/api/sys/dict/value/addDictValue`,
  50. method: "POST",
  51. headers: {
  52. "Content-type": "application/json",
  53. },
  54. data: params,
  55. });
  56. }
  57. // 删除知识库值
  58. export function deleteSysDictValue(params) {
  59. return request({
  60. url: `/api/sys/dict/value/deleteSysDictValue/${params.dictValueId}`,
  61. method: "DELETE",
  62. headers: {
  63. "Content-type": "application/json",
  64. },
  65. });
  66. }
  67. // 根据知识库id获取知识库数据
  68. export function getValueByDictId(params) {
  69. return request({
  70. url: `/api/sys/dict/value/getValueByDictId/${params.dictId}`,
  71. method: "GET",
  72. });
  73. }
  74. // 更新系统知识库值api
  75. export function updateSysDictValueParam(params) {
  76. return request({
  77. url: `/api/sys/dict/value/updateSysDictValueParam`,
  78. method: "POST",
  79. headers: {
  80. "Content-type": "application/json",
  81. },
  82. data: params,
  83. });
  84. }
  85. // 根据知识库id获取知识库数据
  86. export async function getValueByDictCode(params) {
  87. return request({
  88. url: `/api/sys/dict/value/getValueByDictCode/${params.dictCode}`,
  89. method: "GET",
  90. });
  91. }
  92. export async function getDmpAccessUrl(params) {
  93. return request({
  94. url: `/api/sys/sso/getDmpAccessUrl`,
  95. method: "GET",
  96. data: params,
  97. });
  98. }
  99. // 根据知识库id获取知识库数据
  100. export async function getFineReportType(params) {
  101. return request({
  102. url: `/api/other/fineReport/getFineReportType`,
  103. method: "GET",
  104. data: params,
  105. });
  106. }