49 lines
1.3 KiB
TypeScript
49 lines
1.3 KiB
TypeScript
import http from '@/utils/http'
|
||
|
||
const BASE_URL = '/sysDownRecord/record'
|
||
|
||
export interface DownRecordResp {
|
||
id: string
|
||
equipmentId: string
|
||
gh: string
|
||
peopleName: string
|
||
equipmentName: string
|
||
ruleName: string
|
||
peopleId: string
|
||
downTime: string
|
||
ruleId: string
|
||
downResult: number
|
||
operType: number
|
||
createTime: string
|
||
msg: string
|
||
createUserString: string
|
||
updateUserString: string
|
||
disabled: boolean
|
||
}
|
||
export interface DownRecordQuery {
|
||
equipmentId: number | undefined
|
||
peopleName: string | undefined
|
||
downTime: string | undefined
|
||
downTimeStart: string | undefined
|
||
downTimeEnd: string | undefined
|
||
downResult: number | undefined
|
||
sort: Array<string>
|
||
}
|
||
type Long = number
|
||
export interface DownRecordPageQuery extends DownRecordQuery, PageQuery {}
|
||
|
||
/** @desc 查询设备下发记录列表 */
|
||
export function listDownRecord(query: DownRecordPageQuery) {
|
||
return http.get<PageRes<DownRecordResp[]>>(`${BASE_URL}`, query)
|
||
}
|
||
|
||
/** @desc 导出设备下发记录 */
|
||
export function exportDownRecord(query: DownRecordQuery) {
|
||
return http.download(`${BASE_URL}/export`, query)
|
||
}
|
||
|
||
/** @desc 重新下发(仅支持单个下发,传入设备ID+人员ID+规则ID) */
|
||
export function downSinglePeople(equipmentId: Long, peopleId: Long, ruleId: Long){
|
||
return http.get(`${BASE_URL}/down/${equipmentId}/${peopleId}/${ruleId}`)
|
||
}
|