api.ts 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. import { request } from '/@/utils/service';
  2. import { PageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud';
  3. import { Session } from '/@/utils/storage';
  4. export const apiPrefix = '/system/interview_question/create';
  5. export function GetPermission() {
  6. return request({
  7. url: apiPrefix + 'field_permission/',
  8. method: 'get',
  9. });
  10. }
  11. export function GetList(query: PageQuery) {
  12. return request({
  13. url: '/api/system/interview_question/list',
  14. method: 'get',
  15. params: {...query,tenant_id:1},/* :Session.get('tenant_id').tenant_id || ,tenant_id:'1' */
  16. });
  17. }
  18. export function GetObj(id: InfoReq) {
  19. return request({
  20. url: "/api/system/interview_question/detail" + id,
  21. method: 'get',
  22. });
  23. }
  24. export function AddObj(obj: AddReq) {
  25. return request({
  26. url: "/api/system/interview_question/create",
  27. method: 'post',
  28. data: {...obj,tenant_id: '1'},/* Session.get('tenant_id').tenant_id ||,tenant_id: '1' */
  29. });
  30. }
  31. export function UpdateObj(obj: EditReq) {
  32. return request({
  33. url: "/api/system/interview_question/update",/* + obj.id+'/' */
  34. method: 'put',
  35. data: {...obj,tenant_id: '1'},
  36. });
  37. }
  38. export function DelObj(id: DelReq) {
  39. return request({
  40. url: '/api/system/interview_question/delete',/* + id + '/' ,tenant_id: '1' */
  41. method: 'delete',
  42. data: { id},
  43. });
  44. }
  45. export function GetTagList(params: any) {
  46. return request({
  47. url: '/api/system/question_tag/list',
  48. method: 'get',
  49. params: {...params,tenant_id:1},
  50. });
  51. }
  52. export function GetcategoryList(params: any) {
  53. return request({
  54. url: '/api/system/question_category/list',
  55. method: 'get',
  56. params: {...params,tenant_id:1},
  57. });
  58. }
  59. // 批量更新标签
  60. export function BatchUpdateTags(data: any) {
  61. return request({
  62. url: '/api/system/interview_question/batch_update_tags',
  63. method: 'post',
  64. data
  65. });
  66. }
  67. // 获取职位列表
  68. export function GetPositionList(params: any) {
  69. return request({
  70. url: '/api/system/job/list',
  71. method: 'get',
  72. params
  73. });
  74. }
  75. // 批量更新分类
  76. export function BatchUpdateCategory(data: any) {
  77. return request({
  78. url: '/api/system/interview_question/batch_update_category',
  79. method: 'post',
  80. data
  81. });
  82. }
  83. // 获取问题类型
  84. export function GetQuestionTypeList() {
  85. return request({
  86. url: '/api/wechat/question_type_enums',
  87. method: 'get'
  88. });
  89. }
  90. export const BatchUpdateCompetencyTags = (data: any) => {
  91. return request({
  92. url: '/api/system/question/batch_update_competency_tags',
  93. method: 'post',
  94. data
  95. });
  96. }
  97. // 获取胜任力标签列表
  98. export function GetCompetencyList(params: any) {
  99. return request({
  100. url: '/api/system/competency/list',
  101. method: 'get',
  102. params: {...params, tenant_id: 1}
  103. });
  104. }