123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- import { request } from '/@/utils/service';
- import { PageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud';
- import { Session } from '/@/utils/storage';
- export const apiPrefix = '/api/system/job/create';
- export function GetPermission() {
- return request({
- url: apiPrefix + 'field_permission/',
- method: 'get',
- });
- }
- export function GetList(query: PageQuery) {
- return request({
- url: '/api/system/job/list',
- method: 'get',
- params: {...query,tenant_id:'1'},/* :Session.get('tenant_id').tenant_id || */
- });
- }
- export function GetObj(id: InfoReq) {
- return request({
- url: "/api/system/job/detail?id=" + id+"&tenant_id=1",
- method: 'get',
- });
- }
- export function AddObj(obj: AddReq) {
- return request({
- url: "/api/system/job/create",
- method: 'post',
- data: {...obj,tenant_id: '1'},/* Session.get('tenant_id').tenant_id || */
- });
- }
- export function UpdateObj(obj: EditReq) {
- return request({
- url: "/api/system/job/update",/* + obj.id+'/' */
- method: 'post',
- data: {...obj,tenant_id: '1'},
- });
- }
- export function DelObj(id: DelReq) {
- return request({
- url: '/api/system/job/delete',/* + id + '/' */
- method: 'delete',
- data: { id,tenant_id: '1' },
- });
- }
- export function BatchUpdateTags(data: any) {
- return request({
- url: '/api/system/competency/batch_bind',
- method: 'post',
- data
- });
- }
- export function GetCompetencyList(query:any) {
- return request({
- url: '/api/system/competency/list',
- method: 'get',
- params: {...query,tenant_id:1},
- });
- }
- /* 发布职位 */
- export function PublishPosition(data:any) {
- return request({
- url: 'api/system/job/update_status',
- method: 'post',
- data: JSON.stringify(data),
- headers: {
- 'Content-Type': 'application/json'
- }
- });
- }
- /* 批量修改状态 */
- export function batch_publish(data:any) {
- return request({
- url: '/api/system/job/batch_publish',
- method: 'post',
- data: JSON.stringify(data),
- headers: {
- 'Content-Type': 'application/json'
- }
- });
- }
- /* AI生成职位描述 */
- export function GeneratePositionDescription(data:any) {
- return request({
- url: '/api/ai/generate_job_description',
- method: 'post',
- data: JSON.stringify(data),
- headers: {
- 'Content-Type': 'application/json',
- 'Authorization': 'JWT ' +Session.get('token')
- }
- });
- }
- /* 检测是否有题目可以发布 */
- export function CheckQuestionVideosStatus(data:any) {
- return request({
- url: 'api/system/job/question_videos_status',
- method: 'get',
- params: data,
- });
- }
|