wenlele
2 years ago
4 changed files with 178 additions and 48 deletions
@ -0,0 +1,42 @@ |
|||||
|
"use strict"; |
||||
|
|
||||
|
import { basicAction } from "@peace/utils"; |
||||
|
import { ApiTable } from "$utils"; |
||||
|
|
||||
|
export function getCamera(query) { |
||||
|
return (dispatch) => |
||||
|
basicAction({ |
||||
|
type: "get", |
||||
|
dispatch: dispatch, |
||||
|
actionType: "GET_APPLICATION", |
||||
|
query: query, |
||||
|
url: `${ApiTable.getCamera}`, |
||||
|
msg: { option: "获取摄像头列表信息" }, |
||||
|
reducer: { name: "applicationData", params: { noClear: true } }, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
export function putForbidden(data, forbidden) { |
||||
|
return (dispatch) => |
||||
|
basicAction({ |
||||
|
type: "put", |
||||
|
dispatch: dispatch, |
||||
|
actionType: "PUT_APPLICATION", |
||||
|
data, |
||||
|
url: `${ApiTable.putForbidden}`, |
||||
|
msg: { option: forbidden ? "启用" : "禁用" }, //禁用摄像头
|
||||
|
reducer: {}, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
export function delCamera(orgId) { |
||||
|
return (dispatch) => |
||||
|
basicAction({ |
||||
|
type: "del", |
||||
|
dispatch: dispatch, |
||||
|
actionType: "DEL_APPLICATION", |
||||
|
url: `${ApiTable.delCamera.replace("{cameraId}", orgId)}`, |
||||
|
msg: { option: "设备会被存放在“设备回收站”中,删除" }, //删除摄像头
|
||||
|
reducer: {}, |
||||
|
}); |
||||
|
} |
@ -1,5 +1,8 @@ |
|||||
'use strict'; |
'use strict'; |
||||
|
|
||||
export default { |
|
||||
|
|
||||
|
import * as application from './application' |
||||
|
|
||||
|
export default { |
||||
|
...application |
||||
} |
} |
Loading…
Reference in new issue