增加新版本web页面
This commit is contained in:
130
web/src/api/cloudRecord.js
Normal file
130
web/src/api/cloudRecord.js
Normal file
@@ -0,0 +1,130 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 云端录像API
|
||||
|
||||
export function getPlayPath(id) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/cloud/record/play/path`,
|
||||
params: {
|
||||
recordId: id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function queryListByData(params) {
|
||||
const { app, stream, year, month, mediaServerId } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/cloud/record/date/list`,
|
||||
params: {
|
||||
app: app,
|
||||
stream: stream,
|
||||
year: year,
|
||||
month: month,
|
||||
mediaServerId: mediaServerId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function loadRecord(params) {
|
||||
const { app, stream, date } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/cloud/record/loadRecord`,
|
||||
params: {
|
||||
app: app,
|
||||
stream: stream,
|
||||
date: date
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function seek(params) {
|
||||
const { mediaServerId, app, stream, seek, schema } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/cloud/record/seek`,
|
||||
params: {
|
||||
mediaServerId: mediaServerId,
|
||||
app: app,
|
||||
stream: stream,
|
||||
seek: seek,
|
||||
schema: schema
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function speed(params) {
|
||||
const { mediaServerId, app, stream, speed, schema } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/cloud/record/speed`,
|
||||
params: {
|
||||
mediaServerId: mediaServerId,
|
||||
app: app,
|
||||
stream: stream,
|
||||
speed: speed,
|
||||
schema: schema
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function addTask(params) {
|
||||
const { app, stream, mediaServerId, startTime, endTime } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/cloud/record/task/add`,
|
||||
params: {
|
||||
app: app,
|
||||
stream: stream,
|
||||
mediaServerId: mediaServerId,
|
||||
startTime: startTime,
|
||||
endTime: endTime
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function queryTaskList(params) {
|
||||
const { mediaServerId, isEnd } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/cloud/record/task/list`,
|
||||
params: {
|
||||
mediaServerId: mediaServerId,
|
||||
isEnd: isEnd
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteRecord(ids) {
|
||||
return request({
|
||||
method: 'delete',
|
||||
url: `/api/cloud/record/delete`,
|
||||
data: {
|
||||
ids: ids
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function queryList(params) {
|
||||
const { app, stream, query, startTime, endTime, mediaServerId, page, count, ascOrder } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/cloud/record/list`,
|
||||
params: {
|
||||
app: app,
|
||||
stream: stream,
|
||||
query: query,
|
||||
startTime: startTime,
|
||||
endTime: endTime,
|
||||
mediaServerId: mediaServerId,
|
||||
page: page,
|
||||
count: count,
|
||||
ascOrder: ascOrder
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
244
web/src/api/commonChannel.js
Normal file
244
web/src/api/commonChannel.js
Normal file
@@ -0,0 +1,244 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 通用通道API
|
||||
|
||||
export function update(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/api/common/channel/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/api/common/channel/add',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function reset(id) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/api/common/channel/reset',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function queryOne(id) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/common/channel/one',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function addDeviceToGroup(params) {
|
||||
const { parentId, businessGroup, deviceIds } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/common/channel/group/device/add`,
|
||||
data: {
|
||||
parentId: parentId,
|
||||
businessGroup: businessGroup,
|
||||
deviceIds: deviceIds
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function addToGroup(params) {
|
||||
const { parentId, businessGroup, channelIds } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/common/channel/group/add`,
|
||||
data: {
|
||||
parentId: parentId,
|
||||
businessGroup: businessGroup,
|
||||
channelIds: channelIds
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteDeviceFromGroup(deviceIds) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/common/channel/group/device/delete`,
|
||||
data: {
|
||||
deviceIds: deviceIds
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteFromGroup(channels) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/common/channel/group/delete`,
|
||||
data: {
|
||||
channelIds: channels
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function addDeviceToRegion(params) {
|
||||
const { civilCode, deviceIds } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/common/channel/region/device/add`,
|
||||
data: {
|
||||
civilCode: civilCode,
|
||||
deviceIds: deviceIds
|
||||
}
|
||||
})
|
||||
}
|
||||
export function addToRegion(params) {
|
||||
const { civilCode, channelIds } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/common/channel/region/add`,
|
||||
data: {
|
||||
civilCode: civilCode,
|
||||
channelIds: channelIds
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteDeviceFromRegion(deviceIds) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/common/channel/region/device/delete`,
|
||||
data: {
|
||||
deviceIds: deviceIds
|
||||
}
|
||||
})
|
||||
}
|
||||
export function deleteFromRegion(channels) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/common/channel/region/delete`,
|
||||
data: {
|
||||
channelIds: channels
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getCivilCodeList(params) {
|
||||
const { page, count, channelType, query, online, civilCode } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/common/channel/civilcode/list`,
|
||||
params: {
|
||||
page: page,
|
||||
count: count,
|
||||
channelType: channelType,
|
||||
query: query,
|
||||
online: online,
|
||||
civilCode: civilCode
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getParentList(params) {
|
||||
const { page, count, channelType, query, online, groupDeviceId } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/common/channel/parent/list`,
|
||||
params: {
|
||||
page: page,
|
||||
count: count,
|
||||
channelType: channelType,
|
||||
query: query,
|
||||
online: online,
|
||||
groupDeviceId: groupDeviceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getUnusualParentList(params) {
|
||||
const { page, count, channelType, query, online } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/common/channel/parent/unusual/list`,
|
||||
params: {
|
||||
page: page,
|
||||
count: count,
|
||||
channelType: channelType,
|
||||
query: query,
|
||||
online: online
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function clearUnusualParentList(params) {
|
||||
const { all, channelIds } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/common/channel/parent/unusual/clear`,
|
||||
data: {
|
||||
all: all,
|
||||
channelIds: channelIds
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getUnusualCivilCodeList(params) {
|
||||
const { page, count, channelType, query, online } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/common/channel/civilCode/unusual/list`,
|
||||
params: {
|
||||
page: page,
|
||||
count: count,
|
||||
channelType: channelType,
|
||||
query: query,
|
||||
online: online
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function clearUnusualCivilCodeList(params) {
|
||||
const { all, channelIds } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/common/channel/civilCode/unusual/clear`,
|
||||
data: {
|
||||
all: all,
|
||||
channelIds: channelIds
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getIndustryList() {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/common/channel/industry/list'
|
||||
})
|
||||
}
|
||||
|
||||
export function getTypeList() {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/common/channel/type/list'
|
||||
})
|
||||
}
|
||||
|
||||
export function getNetworkIdentificationList() {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/common/channel/network/identification/list'
|
||||
})
|
||||
}
|
||||
|
||||
export function playChannel(channelId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/common/channel/play',
|
||||
params: {
|
||||
channelId: channelId
|
||||
}
|
||||
})
|
||||
}
|
||||
221
web/src/api/device.js
Normal file
221
web/src/api/device.js
Normal file
@@ -0,0 +1,221 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 国标设备API
|
||||
|
||||
export function queryDeviceSyncStatus(deviceId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/device/query/${deviceId}/sync_status/`
|
||||
})
|
||||
}
|
||||
|
||||
export function queryDevices(params) {
|
||||
const { page, count, query, status } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/device/query/devices`,
|
||||
params: {
|
||||
page: page,
|
||||
count: count,
|
||||
query: query,
|
||||
status: status
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteDevice(deviceId) {
|
||||
return request({
|
||||
method: 'delete',
|
||||
url: `/api/device/query/devices/${deviceId}/delete`
|
||||
})
|
||||
}
|
||||
|
||||
export function sync(deviceId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/device/query/devices/${deviceId}/sync`
|
||||
})
|
||||
}
|
||||
|
||||
export function updateDeviceTransport(deviceId, streamMode) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/device/query/transport/${deviceId}/${streamMode}`
|
||||
})
|
||||
}
|
||||
|
||||
export function setGuard(deviceId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/device/control/guard/${deviceId}/SetGuard`
|
||||
})
|
||||
}
|
||||
|
||||
export function resetGuard(deviceId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/device/control/guard/${deviceId}/ResetGuard`
|
||||
})
|
||||
}
|
||||
|
||||
export function subscribeCatalog(params) {
|
||||
const { id, cycle } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/device/query/subscribe/catalog`,
|
||||
params: {
|
||||
id: id,
|
||||
cycle: cycle
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function subscribeMobilePosition(params) {
|
||||
const { id, cycle, interval } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/device/query/subscribe/mobile-position`,
|
||||
params: {
|
||||
id: id,
|
||||
cycle: cycle,
|
||||
interval: interval
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function queryBasicParam(deviceId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/device/config/query/${deviceId}/BasicParam`
|
||||
})
|
||||
}
|
||||
|
||||
export function queryChannelOne(params) {
|
||||
const { deviceId, channelDeviceId } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/device/query/channel/one',
|
||||
params: {
|
||||
deviceId: deviceId,
|
||||
channelDeviceId: channelDeviceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function queryChannels(deviceId, params) {
|
||||
const { page, count, query, online, channelType, catalogUnderDevice } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/device/query/devices/${deviceId}/channels`,
|
||||
params: {
|
||||
page: page,
|
||||
count: count,
|
||||
query: query,
|
||||
online: online,
|
||||
channelType: channelType,
|
||||
catalogUnderDevice: catalogUnderDevice
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function deviceRecord(params) {
|
||||
const { deviceId, channelId, recordCmdStr } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/device/control/record`,
|
||||
params: {
|
||||
deviceId: deviceId,
|
||||
channelId: channelId,
|
||||
recordCmdStr: recordCmdStr
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function querySubChannels(params, deviceId, parentChannelId) {
|
||||
const { page, count, query, online, channelType } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/device/query/sub_channels/${deviceId}/${parentChannelId}/channels`,
|
||||
params: {
|
||||
page: page,
|
||||
count: count,
|
||||
query: query,
|
||||
online: online,
|
||||
channelType: channelType
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function queryChannelTree(params) {
|
||||
const { parentId, page, count } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/device/query/tree/channel/${this.deviceId}`,
|
||||
params: {
|
||||
parentId: parentId,
|
||||
page: page,
|
||||
count: count
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function changeChannelAudio(params) {
|
||||
const { channelId, audio } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/device/query/channel/audio`,
|
||||
params: {
|
||||
channelId: channelId,
|
||||
audio: audio
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function updateChannelStreamIdentification(params) {
|
||||
const { deviceDbId, streamIdentification } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/device/query/channel/stream/identification/update/`,
|
||||
params: {
|
||||
deviceDbId: deviceDbId,
|
||||
streamIdentification: streamIdentification
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function update(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/device/query/device/update`,
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function add(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/device/query/device/add`,
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function queryDeviceOne(deviceId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/device/query/devices/${deviceId}`
|
||||
})
|
||||
}
|
||||
|
||||
export function queryDeviceTree(params, deviceId) {
|
||||
const { page, count, parentId, onlyCatalog } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/device/query/tree/${deviceId}`,
|
||||
params: {
|
||||
page: page,
|
||||
count: count,
|
||||
parentId: parentId,
|
||||
onlyCatalog: onlyCatalog
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
218
web/src/api/frontEnd.js
Normal file
218
web/src/api/frontEnd.js
Normal file
@@ -0,0 +1,218 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 前端控制
|
||||
|
||||
export function setSpeedForScan(deviceId, channelDeviceId, scanId, speed) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/scan/set/speed/${deviceId}/${channelDeviceId}`,
|
||||
params: {
|
||||
scanId: scanId,
|
||||
speed: speed
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function setLeftForScan(deviceId, channelDeviceId, scanId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/scan/set/left/${deviceId}/${channelDeviceId}`,
|
||||
params: {
|
||||
scanId: scanId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function setRightForScan(deviceId, channelDeviceId, scanId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/scan/set/right/${deviceId}/${channelDeviceId}`,
|
||||
params: {
|
||||
scanId: scanId
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function startScan(deviceId, channelDeviceId, scanId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/scan/start/${deviceId}/${channelDeviceId}`,
|
||||
params: {
|
||||
scanId: scanId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function stopScan(deviceId, channelDeviceId, scanId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/scan/stop/${deviceId}/${channelDeviceId}`,
|
||||
params: {
|
||||
scanId: scanId
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function queryPreset(deviceId, channelDeviceId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/preset/query/${deviceId}/${channelDeviceId}`
|
||||
})
|
||||
}
|
||||
|
||||
export function addPointForCruise(deviceId, channelDeviceId, cruiseId, presetId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/cruise/point/add/${deviceId}/${channelDeviceId}`,
|
||||
params: {
|
||||
cruiseId: cruiseId,
|
||||
presetId: presetId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function deletePointForCruise(deviceId, channelDeviceId, cruiseId, presetId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/cruise/point/delete/${deviceId}/${channelDeviceId}`,
|
||||
params: {
|
||||
cruiseId: cruiseId,
|
||||
presetId: presetId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function setCruiseSpeed(deviceId, channelDeviceId, cruiseId, cruiseSpeed) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/cruise/speed/${deviceId}/${channelDeviceId}`,
|
||||
params: {
|
||||
cruiseId: cruiseId,
|
||||
speed: cruiseSpeed
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function setCruiseTime(deviceId, channelDeviceId, cruiseId, cruiseTime) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/cruise/time/${deviceId}/${channelDeviceId}`,
|
||||
params: {
|
||||
cruiseId: cruiseId,
|
||||
time: cruiseTime
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function startCruise(deviceId, channelDeviceId, cruiseId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/cruise/start/${deviceId}/${channelDeviceId}`,
|
||||
params: {
|
||||
cruiseId: cruiseId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function stopCruise(deviceId, channelDeviceId, cruiseId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/cruise/stop/${deviceId}/${channelDeviceId}`,
|
||||
params: {
|
||||
cruiseId: cruiseId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function addPreset(deviceId, channelDeviceId, presetId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/preset/add/${deviceId}/${channelDeviceId}`,
|
||||
params: {
|
||||
presetId: presetId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function callPreset(deviceId, channelDeviceId, presetId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/preset/call/${deviceId}/${channelDeviceId}`,
|
||||
params: {
|
||||
presetId: presetId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function deletePreset(deviceId, channelDeviceId, presetId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/preset/delete/${deviceId}/${channelDeviceId}`,
|
||||
params: {
|
||||
presetId: presetId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* command: on 开启, off 关闭
|
||||
*/
|
||||
export function auxiliary(deviceId, channelDeviceId, command, switchId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/auxiliary/${deviceId}/${channelDeviceId}`,
|
||||
params: {
|
||||
command: command,
|
||||
switchId: switchId
|
||||
}
|
||||
})
|
||||
}
|
||||
/**
|
||||
* command: on 开启, off 关闭
|
||||
*/
|
||||
export function wiper(deviceId, channelDeviceId, command) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/wiper/${deviceId}/${channelDeviceId}`,
|
||||
params: {
|
||||
command: command
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function ptz(deviceId, channelId, command, horizonSpeed, verticalSpeed, zoomSpeed) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/ptz/${deviceId}/${channelId}`,
|
||||
params: {
|
||||
command: command,
|
||||
horizonSpeed: horizonSpeed,
|
||||
verticalSpeed: verticalSpeed,
|
||||
zoomSpeed: zoomSpeed
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function iris(deviceId, channelId, command, speed) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/fi/iris/${deviceId}/${channelId}`,
|
||||
params: {
|
||||
command: command,
|
||||
speed: speed
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function focus(deviceId, channelDeviceId, command, speed) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/front-end/fi/focus/${deviceId}/${channelDeviceId}`,
|
||||
params: {
|
||||
command: command,
|
||||
speed: speed
|
||||
}
|
||||
})
|
||||
}
|
||||
33
web/src/api/gbRecord.js
Normal file
33
web/src/api/gbRecord.js
Normal file
@@ -0,0 +1,33 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function query([deviceId, channelId, startTime, endTime]) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/gb_record/query/' + deviceId + '/' + channelId + '?startTime=' + startTime + '&endTime=' + endTime
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function startDownLoad([deviceId, channelId, startTime, endTime, downloadSpeed]) {
|
||||
return request({
|
||||
url: '/api/gb_record/download/start/' + deviceId + '/' + channelId + '?startTime=' + startTime + '&endTime=' +
|
||||
endTime + '&downloadSpeed=' + downloadSpeed
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function stopDownLoad(deviceId, channelId, streamId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/gb_record/download/stop/' + deviceId + '/' + channelId + '/' + streamId
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function queryDownloadProgress([deviceId, channelId, streamId]) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/gb_record/download/progress/${deviceId}/${channelId}/${streamId}`
|
||||
})
|
||||
}
|
||||
|
||||
50
web/src/api/group.js
Normal file
50
web/src/api/group.js
Normal file
@@ -0,0 +1,50 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分组API
|
||||
|
||||
export function update(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/api/group/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function add(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/api/group/add',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function getTreeList(params) {
|
||||
const { query, parent, hasChannel } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/group/tree/list`,
|
||||
params: {
|
||||
query: query,
|
||||
parent: parent,
|
||||
hasChannel: hasChannel
|
||||
}
|
||||
})
|
||||
}
|
||||
export function deleteGroup(id) {
|
||||
return request({
|
||||
method: 'delete',
|
||||
url: `/api/group/delete`,
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
}
|
||||
export function getPath(params) {
|
||||
const { deviceId, businessGroup } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/group/path`,
|
||||
params: {
|
||||
deviceId: deviceId,
|
||||
businessGroup: businessGroup
|
||||
}
|
||||
})
|
||||
}
|
||||
15
web/src/api/log.js
Normal file
15
web/src/api/log.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function queryList(params) {
|
||||
const { query, startTime, endTime } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/log/list`,
|
||||
params: {
|
||||
query: query,
|
||||
startTime: startTime,
|
||||
endTime: endTime
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
142
web/src/api/platform.js
Normal file
142
web/src/api/platform.js
Normal file
@@ -0,0 +1,142 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function update(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/api/platform/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/api/platform/add',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function exit(deviceGbId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/platform/exit/${deviceGbId}`
|
||||
})
|
||||
}
|
||||
|
||||
export function remove(id) {
|
||||
return request({
|
||||
method: 'delete',
|
||||
url: `/api/platform/delete/`,
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function pushChannel(id) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/platform/channel/push`,
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getServerConfig() {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/platform/server_config`
|
||||
})
|
||||
}
|
||||
|
||||
export function query(params) {
|
||||
const { count, page, query } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/platform/query`,
|
||||
params: {
|
||||
count: count,
|
||||
page: page,
|
||||
query: query
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function getChannelList(params) {
|
||||
const { page, count, query, online, channelType, platformId, hasShare } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/platform/channel/list`,
|
||||
params: {
|
||||
page: page,
|
||||
count: count,
|
||||
query: query,
|
||||
online: online,
|
||||
channelType: channelType,
|
||||
platformId: platformId,
|
||||
hasShare: hasShare
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function addChannel(params) {
|
||||
const { platformId, channelIds, all } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/platform/channel/add`,
|
||||
data: {
|
||||
platformId: platformId,
|
||||
channelIds: channelIds,
|
||||
all: all
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function addChannelByDevice(params) {
|
||||
const { platformId, deviceIds } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/platform/channel/device/add`,
|
||||
data: {
|
||||
platformId: platformId,
|
||||
deviceIds: deviceIds
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function removeChannelByDevice(params) {
|
||||
const { platformId, deviceIds } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/platform/channel/device/remove`,
|
||||
data: {
|
||||
platformId: platformId,
|
||||
deviceIds: deviceIds
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function removeChannel(params) {
|
||||
const { platformId, channelIds, all } = params
|
||||
return request({
|
||||
method: 'delete',
|
||||
url: `/api/platform/channel/remove`,
|
||||
data: {
|
||||
platformId: platformId,
|
||||
channelIds: channelIds,
|
||||
all: all
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function updateCustomChannel(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/platform/channel/custom/update`,
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
28
web/src/api/play.js
Normal file
28
web/src/api/play.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 实时流播放API
|
||||
|
||||
export function play(deviceId, channelId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/play/start/' + deviceId + '/' + channelId
|
||||
})
|
||||
}
|
||||
export function stop(deviceId, channelId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/play/stop/' + deviceId + "/" + channelId,
|
||||
})
|
||||
}
|
||||
export function broadcastStart(deviceId, channelId, broadcastMode) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/play/broadcast/' + deviceId + '/' + channelId + "?timeout=30&broadcastMode=" + broadcastMode
|
||||
})
|
||||
}
|
||||
export function broadcastStop(deviceId, channelId, ) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/play/broadcast/stop/' + deviceId + '/' + channelId
|
||||
})
|
||||
}
|
||||
34
web/src/api/playback.js
Normal file
34
web/src/api/playback.js
Normal file
@@ -0,0 +1,34 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 回放流播放API
|
||||
|
||||
export function play([deviceId, channelId, startTime, endTime]) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/playback/start/' + deviceId + '/' + channelId + '?startTime=' + startTime + '&endTime=' + endTime
|
||||
})
|
||||
}
|
||||
export function resume(streamId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/playback/resume/' + streamId
|
||||
})
|
||||
}
|
||||
export function pause(streamId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/playback/pause/' + streamId
|
||||
})
|
||||
}
|
||||
export function setSpeed([streamId, speed]) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/playback/speed/${streamId}/${speed}`
|
||||
})
|
||||
}
|
||||
export function stop(deviceId, channelId, streamId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/playback/stop/' + deviceId + '/' + channelId + '/' + streamId
|
||||
})
|
||||
}
|
||||
85
web/src/api/recordPlan.js
Normal file
85
web/src/api/recordPlan.js
Normal file
@@ -0,0 +1,85 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getPlan(id) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/record/plan/get',
|
||||
params: {
|
||||
planId: id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function addPlan(params) {
|
||||
const { name, planList } = params
|
||||
return request({
|
||||
|
||||
method: 'post',
|
||||
url: '/api/record/plan/add',
|
||||
data: {
|
||||
name: name,
|
||||
planItemList: planList
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function update(params) {
|
||||
const { id, name, planList } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/api/record/plan/update',
|
||||
data: {
|
||||
id: id,
|
||||
name: name,
|
||||
planItemList: planList
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function queryList(params) {
|
||||
const { page, count, query } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/record/plan/query`,
|
||||
params: {
|
||||
page: page,
|
||||
count: count,
|
||||
query: query
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function deletePlan(id) {
|
||||
return request({
|
||||
method: 'delete',
|
||||
url: '/api/record/plan/delete',
|
||||
params: {
|
||||
planId: id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function queryChannelList(params) {
|
||||
const { page, count, channelType, query, online, planId , hasLink } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/record/plan/channel/list`,
|
||||
params: {
|
||||
page: page,
|
||||
count: count,
|
||||
query: query,
|
||||
online: online,
|
||||
channelType: channelType,
|
||||
planId: planId,
|
||||
hasLink: hasLink
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function linkPlan(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/record/plan/link`,
|
||||
data: data
|
||||
})
|
||||
}
|
||||
84
web/src/api/region.js
Normal file
84
web/src/api/region.js
Normal file
@@ -0,0 +1,84 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 行政区划API
|
||||
|
||||
export function getTreeList(params) {
|
||||
const {query, parent, hasChannel} = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/region/tree/list`,
|
||||
params: {
|
||||
query: query,
|
||||
parent: parent,
|
||||
hasChannel: hasChannel
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteRegion(id) {
|
||||
return request({
|
||||
method: "delete",
|
||||
url: `/api/region/delete`,
|
||||
params: {
|
||||
id: id,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function description(civilCode) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/region/description`,
|
||||
params: {
|
||||
civilCode: civilCode,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function addByCivilCode(civilCode) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/region/addByCivilCode`,
|
||||
params: {
|
||||
civilCode: civilCode,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function queryChildListInBase(parent) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: "/api/region/base/child/list",
|
||||
params: {
|
||||
parent: parent,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function update(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: "/api/region/update",
|
||||
data: data
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: "/api/region/add",
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function queryPath(deviceId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/region/path`,
|
||||
params: {
|
||||
deviceId: deviceId,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
11
web/src/api/role.js
Normal file
11
web/src/api/role.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 云端录像API
|
||||
|
||||
export function getAll() {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/role/all'
|
||||
})
|
||||
}
|
||||
|
||||
117
web/src/api/server.js
Normal file
117
web/src/api/server.js
Normal file
@@ -0,0 +1,117 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 服务API
|
||||
|
||||
export function getOnlineMediaServerList() {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/server/media_server/online/list`
|
||||
})
|
||||
}
|
||||
|
||||
export function getMediaServerList() {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/server/media_server/list`
|
||||
})
|
||||
}
|
||||
|
||||
export function getMediaServer(id) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/server/media_server/one/` + id
|
||||
})
|
||||
}
|
||||
|
||||
export function checkMediaServer(params) {
|
||||
const { ip, port, secret, type } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/server/media_server/check`,
|
||||
params: {
|
||||
ip: ip,
|
||||
port: port,
|
||||
secret: secret,
|
||||
type: type
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function checkMediaServerRecord(params) {
|
||||
const { ip, port } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/server/media_server/record/check`,
|
||||
params: {
|
||||
ip: ip,
|
||||
port: port
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function saveMediaServer(formData) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/server/media_server/save`,
|
||||
data: formData
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteMediaServer(id) {
|
||||
return request({
|
||||
method: 'delete',
|
||||
url: `/api/server/media_server/delete`,
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getSystemConfig() {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/server/system/configInfo`
|
||||
})
|
||||
}
|
||||
|
||||
export function getMediaInfo(params) {
|
||||
const { app, stream, mediaServerId } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/server/media_server/media_info`,
|
||||
params: {
|
||||
app: app,
|
||||
stream: stream,
|
||||
mediaServerId: mediaServerId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getSystemInfo() {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/server/system/info`
|
||||
})
|
||||
}
|
||||
|
||||
export function getMediaServerLoad() {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/server/media_server/load`
|
||||
})
|
||||
}
|
||||
|
||||
export function getResourceInfo() {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/server/resource/info`
|
||||
})
|
||||
}
|
||||
|
||||
export function info() {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/server/info`
|
||||
})
|
||||
}
|
||||
|
||||
85
web/src/api/streamProxy.js
Normal file
85
web/src/api/streamProxy.js
Normal file
@@ -0,0 +1,85 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 拉流代理API
|
||||
|
||||
export function queryFfmpegCmdList(mediaServerId) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/proxy/ffmpeg_cmd/list`,
|
||||
params: {
|
||||
mediaServerId: mediaServerId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function save(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/proxy/save`,
|
||||
data: data
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function update(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/proxy/update`,
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/proxy/add`,
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function queryList(params) {
|
||||
const { page, count, query, pulling, mediaServerId } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/proxy/list`,
|
||||
params: {
|
||||
page: page,
|
||||
count: count,
|
||||
query: query,
|
||||
pulling: pulling,
|
||||
mediaServerId: mediaServerId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function play(id) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/proxy/start`,
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function stopPlay(id) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/proxy/stop`,
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function remove(id) {
|
||||
return request({
|
||||
method: 'delete',
|
||||
url: '/api/proxy/delete',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
80
web/src/api/streamPush.js
Normal file
80
web/src/api/streamPush.js
Normal file
@@ -0,0 +1,80 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 推流列表API
|
||||
|
||||
export function saveToGb(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/push/save_to_gb`,
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/push/add`,
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function update(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/api/push/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function queryList(params) {
|
||||
const { page, count, query, pushing, mediaServerId } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/push/list`,
|
||||
params: {
|
||||
page: page,
|
||||
count: count,
|
||||
query: query,
|
||||
pushing: pushing,
|
||||
mediaServerId: mediaServerId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function play(id) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/push/start',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function remove(id) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/api/push/remove',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function removeFormGb(data) {
|
||||
return request({
|
||||
method: 'delete',
|
||||
url: '/api/push/remove_form_gb',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function batchRemove(ids) {
|
||||
return request({
|
||||
method: 'delete',
|
||||
url: '/api/push/batchRemove',
|
||||
data: {
|
||||
ids: ids
|
||||
}
|
||||
})
|
||||
}
|
||||
9
web/src/api/table.js
Normal file
9
web/src/api/table.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getList(params) {
|
||||
return request({
|
||||
url: '/vue-admin-template/table/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
91
web/src/api/user.js
Normal file
91
web/src/api/user.js
Normal file
@@ -0,0 +1,91 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function login(params) {
|
||||
return request({
|
||||
url: '/api/user/login',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
export function logout() {
|
||||
return request({
|
||||
url: '/api/user/logout',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function getUserInfo() {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/api/user/userInfo'
|
||||
})
|
||||
}
|
||||
|
||||
export function changePushKey(params) {
|
||||
const { pushKey, userId } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/api/user/changePushKey',
|
||||
params: {
|
||||
pushKey: pushKey,
|
||||
userId: userId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function queryList(params) {
|
||||
const { page, count } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/user/users`,
|
||||
params: {
|
||||
page: page,
|
||||
count: count
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function removeById(id) {
|
||||
return request({
|
||||
method: 'delete',
|
||||
url: `/api/user/delete?id=${id}`
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function add(params) {
|
||||
const { username, password, roleId } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/api/user/add',
|
||||
params: {
|
||||
username: username,
|
||||
password: password,
|
||||
roleId: roleId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function changePassword(params) {
|
||||
const { oldPassword, password } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/api/user/changePassword',
|
||||
params: {
|
||||
oldPassword: oldPassword,
|
||||
password: password
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function changePasswordForAdmin(params) {
|
||||
const { password, userId } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/api/user/changePasswordForAdmin',
|
||||
params: {
|
||||
password: password,
|
||||
userId: userId
|
||||
}
|
||||
})
|
||||
}
|
||||
69
web/src/api/userApiKey.js
Normal file
69
web/src/api/userApiKey.js
Normal file
@@ -0,0 +1,69 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function remark(params) {
|
||||
const { id, remark } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/api/userApiKey/remark',
|
||||
params: {
|
||||
id: id,
|
||||
remark: remark
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function queryList(params) {
|
||||
const { page, count } = params
|
||||
return request({
|
||||
method: 'get',
|
||||
url: `/api/userApiKey/userApiKeys`,
|
||||
params: {
|
||||
page: page,
|
||||
count: count
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function enable(id) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/userApiKey/enable?id=${id}`
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function disable(id) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/userApiKey/disable?id=${id}`
|
||||
})
|
||||
}
|
||||
|
||||
export function reset(id) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: `/api/userApiKey/reset?id=${id}`
|
||||
})
|
||||
}
|
||||
|
||||
export function remove(id) {
|
||||
return request({
|
||||
method: 'delete',
|
||||
url: `/api/userApiKey/delete?id=${id}`
|
||||
})
|
||||
}
|
||||
|
||||
export function add(params) {
|
||||
const { userId, app, enable, expiresAt, remark } = params
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/api/userApiKey/add',
|
||||
params: {
|
||||
userId: userId,
|
||||
app: app,
|
||||
enable: enable,
|
||||
expiresAt: expiresAt,
|
||||
remark: remark
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user