originalRecords.ets
5.0 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
import https from './request'
import { RecordsList, QueryParams, addParamsType, equipmentTest, LatestProjectTest,
companyPersonTest, reportDetailTest, MalfunctionListTest, MalfunctionListRow,
InitTest, realNameTest, orderTest,configTest,
recordTest, orderParams, recordParams, editType
} from './recordsType'
import { quarterTest } from './options/optionsType'
// 获取维保记录列表
export const getRecordsList = (data: QueryParams) => {
return https<RecordsList>({
url: '/maintenance/report/list',
method: 'get',
params: data
})
}
// 新增维保记录
export const addRecords = (data: addParamsType) => {
return https({
url: '/maintenance/report',
method: 'post',
data
})
}
// 修改维保记录
export const updateRecords = (data: addParamsType) => {
return https({
url: '/maintenance/report',
method: 'put',
data
})
}
interface deleteType{
reportId: number,
state: string
}
// 操作维保记录信息
export const deleteRecords = (data: deleteType) => {
return https({
url: '/maintenance/report/updateInfo',
method: 'post',
data
})
}
// 获取仪器设备列表
export const getEquipmentList = (data: QueryParams) => {
return https<equipmentTest>({
url: '/system/equipment/list',
method: 'get',
params: data
})
}
// 获取主要消防措施列表
export const getLatestProjectList = (type: string) => {
return https<LatestProjectTest>({
url: '/maintenance/project/latestProject',
method: 'get',
params: {
type
}
})
}
// 获取记录类型列表
export const getMaintenanceType = () => {
return https<quarterTest>({
url: '/system/dict/data/type/maintenance_system_type',
method: 'get'
})
}
// 获取记录状态列表
export const getMaintenanceState = () => {
return https<quarterTest>({
url: '/system/dict/data/type/report_state',
method: 'get'
})
}
// 获取公司维保人员人员列表
export const getCompanyPersonList = (data: QueryParams) => {
return https<companyPersonTest>({
url: '/system/companyPerson/list',
method: 'get',
params: data
})
}
// 获取维保详情
export const getReportDetail = (reportId: number) => {
return https<reportDetailTest>({
url: `/maintenance/report/view/${reportId}`,
method: 'get'
})
}
export interface downloadUrl {
code: number
data: string
msg: string
}
// 获取图片视频地址链接
export const getDownloadUrl = (cosKey: string, type: number) => {
return https<downloadUrl>({
url: `/system/COS/getDownloadUrl`,
method: 'get',
params: {
cosKey,
type
}
})
}
interface MalfunctionListType{
pageNum: number,
pageSize: number,
reportId: number
}
// 获取消防设施故障处理单
export const getMalfunctionList = (data: MalfunctionListType) => {
return https<MalfunctionListTest>({
url: `/maintenance/malfunction/list`,
method: 'get',
params: data
})
}
// 修改消防设施故障处理单
export const updateMalfunctionList = (data:editType) => {
return https({
url: `/maintenance/malfunction/updateList`,
method: 'post',
data
})
}
// 获取原始记录详情及签名
export const getInitDetail = (reportId: number) => {
return https<InitTest>({
url: `/maintenance/report/view/${reportId}`,
method: 'get'
})
}
// 根据报告编号获取实名信息
export const getSelectByReportNo = (reportNo: string) => {
return https<realNameTest>({
url: `/maintenance/verification/selectByReportNo`,
method: 'get',
params: {
reportNo
}
})
}
// 查询订单记录
export const getOrderList = (data: orderParams) => {
return https<orderTest>({
url: `/system/order/list`,
method: 'get',
params: data
})
}
// 查询消耗记录
export const getRecordList = (data: recordParams) => {
return https<recordTest>({
url: `/system/record/list`,
method: 'get',
params: data
})
}
// 查询支付来源
export const getOrderSource = () => {
return https<quarterTest>({
url: `/system/dict/data/type/pay_source`,
method: 'get'
})
}
// 查询订单状态
export const getOrderState = () => {
return https<quarterTest>({
url: `/system/dict/data/type/orders_state`,
method: 'get'
})
}
// 获取参数详情
export const getConfigDetail = (configId: number) => {
return https<configTest>({
url: `/system/config/${configId}`,
method: 'get'
})
}
// 完成签名
export const successReport = (reportId: number) => {
return https<configTest>({
url: `/maintenance/report/validReport`,
method: 'post',
data: {
reportId
}
})
}
// 退回签名
export const returnSing = (reportId: number) => {
return https<configTest>({
url: `/maintenance/report/backToEdit`,
method: 'post',
data: {
reportId
}
})
}
// 导入月度记录
export const importRecord = (fromReportId: number, toReportId:number) => {
return https({
url: `/maintenance/malfunction/importMalfunction`,
method: 'get',
params: {
fromReportId,
toReportId
}
})
}