stationnotifyApi.ts
2.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
import { defHttp } from '/@/utils/http/axios';
import {
  NoticeQueryParam,
  NotifyAddDraftModel,
  NotifyAddreLeaseModel,
} from '/@/api/stationnotification/model/stationnotifyModel';
enum NotifyManagerApi {
  /**
   * 场景URL
   */
  NOTICE_GET_URL = '/notice/page',
  NOTICE_GET_DETAIL_URL = '/notice',
  NOTICE_ADD_DRAFT_URL = '/notice/save',
  NOTICE_ADD_LEASE_URL = '/notice/send',
  NOTICE_DELETE_URL = '/notice/delete',
  NOTICE_GET_MYDETAIL_URL = '/noticeUser',
  NOTICE_GET_PAGE_URL = '/noticeUser/page',
  NOTICE_GET_READ_URL = '/noticeUser/read',
  NOTICE_GET_DICT_URL = '/dictItem',
  NOTICE_GET_DEPT_URL = '/organization/me/organizations',
}
// /**
//  * 获取详情
//  * @param
//  */
export const noticeByIdGetInfo = (id: string) => {
  return defHttp.get({
    url: `${NotifyManagerApi.NOTICE_GET_DETAIL_URL}/${id}`,
  });
};
/**
 * 分页查询通知表格页面
 * @param params pageSize page name
 */
export const notifyGetTableApi = (params?: NoticeQueryParam) => {
  return defHttp.get({
    url: NotifyManagerApi.NOTICE_GET_URL,
    params,
  });
};
/**
 * 新增草稿
 * @param params pageSize page name
 */
export const notifyAddDraftApi = (params: NotifyAddDraftModel) => {
  return defHttp.post<NotifyAddDraftModel>({
    url: NotifyManagerApi.NOTICE_ADD_DRAFT_URL,
    params,
  });
};
/**
 * 新增通知
 * @param params pageSize page name
 */
export const notifyAddLeaseApi = (params: NotifyAddreLeaseModel) => {
  return defHttp.post<NotifyAddreLeaseModel>({
    url: NotifyManagerApi.NOTICE_ADD_LEASE_URL,
    params,
  });
};
/**
 * 批量删除
 * @param params pageSize page name
 */
export const notifyDeleteApi = (ids: string[]) => {
  return defHttp.delete({
    url: NotifyManagerApi.NOTICE_DELETE_URL,
    data: ids,
  });
};
/**
 * 查询我的通知详情
 * @param params pageSize page name
 */
export const notifyMyGetDetailApi = (id: string) => {
  return defHttp.get({
    url: `${NotifyManagerApi.NOTICE_GET_MYDETAIL_URL}/${id}`,
  });
};
/**
 * 查询我的通知表格
 * @param params pageSize page name
 */
export const notifyMyGetrPageApi = (params?: NoticeQueryParam) => {
  return defHttp.get({
    url: NotifyManagerApi.NOTICE_GET_PAGE_URL,
    params,
  });
};
/**
 * 查询人员阅读情况分页
 * @param params pageSize page name
 */
export const notifyMyGetrReadApi = (params?: NoticeQueryParam) => {
  return defHttp.get({
    url: NotifyManagerApi.NOTICE_GET_READ_URL,
    params,
  });
};
/**
 * 获取字典----id
 * @param 无参数
 */
export const notifyDictGetApi = () => {
  return defHttp.get({
    url: `${NotifyManagerApi.NOTICE_GET_DICT_URL}?page=1&pageSize=10&dictId=74a3878d-1bb9-4a59-bd2d-d5e4646c7239&_t=1638928298910`,
  });
};
/**
 * 获取部门
 * @param 无参数
 */
export const notifyOrganizationGetApi = () => {
  return defHttp.get({
    url: NotifyManagerApi.NOTICE_GET_DEPT_URL,
  });
};