| | |
| | | PS: 目前的底图仅用用作演示和学习,商用情况请自行购买授权使用。 |
| | | |
| | | ### 更换底图以及底图配置 |
| | | 目前WVP支持使用了更换底图,配置文件在web_src/static/js/mapConfig.js,请修改后重新编译前端文件。 |
| | | 目前WVP支持使用了更换底图,配置文件在web_src/static/js/config.js,请修改后重新编译前端文件。 |
| | | ```javascript |
| | | window.mapParam = { |
| | | // 开启/关闭地图功能 |
| | |
| | | long start = System.currentTimeMillis(); // 请求进入时间 |
| | | String uriName = ApiSaveConstant.getVal(servletRequest.getRequestURI()); |
| | | |
| | | String origin = servletRequest.getHeader("Origin"); |
| | | servletResponse.setContentType("application/json;charset=UTF-8"); |
| | | servletResponse.setHeader("Access-Control-Allow-Origin", origin != null ? origin : "*"); |
| | | servletResponse.setHeader("Access-Control-Allow-Credentials", "true"); |
| | | servletResponse.setHeader("Access-Control-Allow-Methods", "POST, GET, PATCH, DELETE, PUT"); |
| | | servletResponse.setHeader("Access-Control-Max-Age", "3600"); |
| | | servletResponse.setHeader("Access-Control-Allow-Headers", "token,Content-Type,Content-Length, Authorization, Accept,X-Requested-With,domain,zdy"); |
| | | filterChain.doFilter(servletRequest, servletResponse); |
| | | |
| | | if (uriName != null && userSetting != null && userSetting.getLogInDatebase() != null && userSetting.getLogInDatebase()) { |
| | |
| | | logDto.setUri(servletRequest.getRequestURI()); |
| | | logDto.setCreateTime(DateUtil.getNow()); |
| | | logService.add(logDto); |
| | | // logger.warn("[Api Access] [{}] [{}] [{}] [{}] [{}] {}ms", |
| | | // uriName, servletRequest.getMethod(), servletRequest.getRequestURI(), servletRequest.getRemoteAddr(), HttpStatus.valueOf(servletResponse.getStatus()), |
| | | // System.currentTimeMillis() - start); |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; |
| | | import org.apache.poi.hssf.eventmodel.ERFListener; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.security.core.AuthenticationException; |
| | |
| | | @Override |
| | | public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException e) { |
| | | // 允许跨域 |
| | | response.setHeader("Access-Control-Allow-Origin", "*"); |
| | | String origin = request.getHeader("Origin"); |
| | | response.setHeader("Access-Control-Allow-Credentials", "true"); |
| | | response.setHeader("Access-Control-Allow-Origin", origin != null ? origin : "*"); |
| | | response.setHeader("Access-Control-Allow-Methods", "PUT,POST, GET,DELETE,OPTIONS"); |
| | | // 允许自定义请求头token(允许head跨域) |
| | | response.setHeader("Access-Control-Allow-Headers", "token, Accept, Origin, X-Requested-With, Content-Type, Last-Modified"); |
| | | response.setHeader("Content-type", "application/json;charset=UTF-8"); |
| | |
| | | * 服务器定时上报时间,上报间隔可配置,默认10s上报一次
|
| | | */
|
| | | @ResponseBody
|
| | | |
| | | @PostMapping(value = "/on_server_keepalive", produces = "application/json;charset=UTF-8")
|
| | | public HookResult onServerKeepalive(@RequestBody OnServerKeepaliveHookParam param) {
|
| | |
|
| | |
| | | * 播放器鉴权事件,rtsp/rtmp/http-flv/ws-flv/hls的播放都将触发此鉴权事件。
|
| | | */
|
| | | @ResponseBody
|
| | | |
| | | @PostMapping(value = "/on_play", produces = "application/json;charset=UTF-8")
|
| | | public HookResult onPlay(@RequestBody OnPlayHookParam param) {
|
| | | if (logger.isDebugEnabled()) {
|
| | |
| | | * 位置信息管理 |
| | | */ |
| | | @Tag(name = "位置信息管理") |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/position") |
| | | public class MobilePositionController { |
| | |
| | | * @data: 2021-01-20 |
| | | */ |
| | | @Tag(name = "SSE推送") |
| | | @CrossOrigin |
| | | |
| | | @Controller |
| | | @RequestMapping("/api") |
| | | public class SseController { |
| | |
| | | import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommander; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform; |
| | | import com.genersoft.iot.vmp.media.zlm.ZLMHttpHookListener; |
| | | import com.genersoft.iot.vmp.service.IDeviceAlarmService; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| | | import com.genersoft.iot.vmp.utils.DateUtil; |
| | | import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; |
| | | import com.genersoft.iot.vmp.vmanager.bean.WVPResult; |
| | | import com.github.pagehelper.PageInfo; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.responses.ApiResponse; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.sip.InvalidArgumentException; |
| | |
| | | import java.util.List; |
| | | |
| | | @Tag(name = "报警信息管理") |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/alarm") |
| | | public class AlarmController { |
| | |
| | | import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| | | |
| | | import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.context.request.async.DeferredResult; |
| | | |
| | |
| | | import java.util.UUID; |
| | | |
| | | @Tag(name = "国标设备配置") |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/device/config") |
| | | public class DeviceConfig { |
| | |
| | | import java.util.UUID; |
| | | |
| | | @Tag(name = "国标设备控制") |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/device/control") |
| | | public class DeviceControl { |
| | |
| | | |
| | | @Tag(name = "国标设备查询", description = "国标设备查询") |
| | | @SuppressWarnings("rawtypes") |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/device/query") |
| | | public class DeviceQuery { |
| | |
| | | import java.util.List; |
| | | |
| | | @Tag(name = "视频流关联到级联平台") |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/gbStream") |
| | | public class GbStreamController { |
| | |
| | | |
| | | @Tag(name = "媒体流相关") |
| | | @Controller |
| | | @CrossOrigin |
| | | |
| | | @RequestMapping(value = "/api/media") |
| | | public class MediaController { |
| | | |
| | |
| | | * 级联平台管理 |
| | | */ |
| | | @Tag(name = "级联平台管理") |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/platform") |
| | | public class PlatformController { |
| | |
| | | import java.util.UUID; |
| | | |
| | | @Tag(name = "国标设备点播") |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/play") |
| | | public class PlayController { |
| | |
| | | * @author lin |
| | | */ |
| | | @Tag(name = "视频回放") |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/playback") |
| | | public class PlaybackController { |
| | |
| | | package com.genersoft.iot.vmp.vmanager.gb28181.ptz; |
| | | |
| | | |
| | | |
| | | import com.genersoft.iot.vmp.conf.exception.ControllerException; |
| | | import com.genersoft.iot.vmp.gb28181.bean.Device; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| | | import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.context.request.async.DeferredResult; |
| | | |
| | | import com.genersoft.iot.vmp.gb28181.bean.Device; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| | | |
| | | import javax.sip.InvalidArgumentException; |
| | | import javax.sip.SipException; |
| | |
| | | import java.util.UUID; |
| | | |
| | | @Tag(name = "云台控制") |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/ptz") |
| | | public class PtzController { |
| | |
| | | import java.util.UUID; |
| | | |
| | | @Tag(name = "国标录像") |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/gb_record") |
| | | public class GBRecordController { |
| | |
| | | import com.genersoft.iot.vmp.storager.dao.dto.LogDto; |
| | | import com.genersoft.iot.vmp.utils.DateUtil; |
| | | import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; |
| | | import com.genersoft.iot.vmp.vmanager.bean.WVPResult; |
| | | import com.github.pagehelper.PageInfo; |
| | | |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.ParseException; |
| | | |
| | | @Tag(name = "日志管理") |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/log") |
| | | public class LogController { |
| | |
| | | //import org.springframework.web.bind.annotation.*; |
| | | // |
| | | //@Tag(name = "云端录像") |
| | | //@CrossOrigin |
| | | // |
| | | //@RestController |
| | | //@RequestMapping("/api/record") |
| | | //public class RecordController { |
| | |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.genersoft.iot.vmp.VManageBootstrap; |
| | | import com.genersoft.iot.vmp.common.SystemAllInfo; |
| | | import com.genersoft.iot.vmp.common.VersionPo; |
| | | import com.genersoft.iot.vmp.conf.SipConfig; |
| | |
| | | import com.genersoft.iot.vmp.service.*; |
| | | import com.genersoft.iot.vmp.service.bean.MediaServerLoad; |
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| | | import com.genersoft.iot.vmp.utils.SpringBeanFactory; |
| | | import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; |
| | | import com.genersoft.iot.vmp.vmanager.bean.ResourceBaceInfo; |
| | | import com.genersoft.iot.vmp.vmanager.bean.ResourceInfo; |
| | | import com.genersoft.iot.vmp.vmanager.bean.SystemConfigInfo; |
| | | import gov.nist.javax.sip.SipStackImpl; |
| | | |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.sip.ListeningPoint; |
| | | import javax.sip.ObjectInUseException; |
| | | import javax.sip.SipProvider; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @SuppressWarnings("rawtypes") |
| | | @Tag(name = "服务控制") |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/server") |
| | | public class ServerController { |
| | |
| | | */ |
| | | @Tag(name = "拉流代理", description = "") |
| | | @Controller |
| | | @CrossOrigin |
| | | |
| | | @RequestMapping(value = "/api/proxy") |
| | | public class StreamProxyController { |
| | | |
| | |
| | | |
| | | @Tag(name = "推流信息管理") |
| | | @Controller |
| | | @CrossOrigin |
| | | |
| | | @RequestMapping(value = "/api/push") |
| | | public class StreamPushController { |
| | | |
| | |
| | | import com.genersoft.iot.vmp.storager.dao.dto.Role; |
| | | import com.genersoft.iot.vmp.utils.DateUtil; |
| | | import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; |
| | | import com.genersoft.iot.vmp.vmanager.bean.WVPResult; |
| | | |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Tag(name = "角色管理") |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/role") |
| | | public class RoleController { |
| | |
| | | import java.util.List; |
| | | |
| | | @Tag(name = "用户管理") |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/user") |
| | | public class UserController { |
| | |
| | | /** |
| | | * API兼容:设备控制 |
| | | */ |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/api/v1/control") |
| | | public class ApiControlController { |
| | |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.CrossOrigin; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | |
| | | * API兼容:系统接口 |
| | | */ |
| | | @Controller |
| | | @CrossOrigin |
| | | |
| | | @RequestMapping(value = "/api/v1") |
| | | public class ApiController { |
| | | |
| | |
| | | * API兼容:设备信息 |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/api/v1/device") |
| | | public class ApiDeviceController { |
| | |
| | | * API兼容:实时直播 |
| | | */ |
| | | @SuppressWarnings(value = {"rawtypes", "unchecked"}) |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/api/v1/stream") |
| | | public class ApiStreamController { |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @CrossOrigin |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/auth") |
| | | public class AuthController { |
| | |
| | | if (options.extract) { |
| | | return ExtractTextPlugin.extract({ |
| | | use: loaders, |
| | | fallback: 'vue-style-loader', |
| | | publicPath: '../../' |
| | | fallback: 'vue-style-loader' |
| | | }) |
| | | } else { |
| | | return ['vue-style-loader'].concat(loaders) |
| | |
| | | dev: { |
| | | |
| | | // Paths |
| | | assetsSubDirectory: './static', |
| | | assetsPublicPath: './', |
| | | assetsSubDirectory: 'static', |
| | | assetsPublicPath: '/', |
| | | proxyTable: { |
| | | '/debug': { |
| | | target: 'http://localhost:38080', |
| | | target: 'http://localhost:18080', |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/debug': '/' |
| | | } |
| | | }, |
| | | '/static/snap': { |
| | | target: 'http://localhost:38080', |
| | | target: 'http://localhost:18080', |
| | | changeOrigin: true, |
| | | // pathRewrite: { |
| | | // '^/static/snap': '/static/snap' |
| | |
| | | // Paths |
| | | assetsRoot: path.resolve(__dirname, '../../src/main/resources/static/'), |
| | | assetsSubDirectory: './static', |
| | | assetsPublicPath: './', |
| | | assetsPublicPath: '/', |
| | | |
| | | /** |
| | | * Source Maps |
| | |
| | | <script type="text/javascript" src="./static/js/EasyWasmPlayer.js"></script> |
| | | <script type="text/javascript" src="./static/js/liveplayer-lib.min.js"></script> |
| | | <script type="text/javascript" src="./static/js/ZLMRTCClient.js"></script> |
| | | <script type="text/javascript" src="./static/js/mapConfig.js"></script> |
| | | <script type="text/javascript" src="./static/js/config.js"></script> |
| | | <div id="app"></div> |
| | | </body> |
| | | </html> |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./record_proxy/${that.mediaServerId}/api/record/list`, |
| | | url:`/record_proxy/${that.mediaServerId}/api/record/list`, |
| | | params: { |
| | | page: that.currentPage, |
| | | count: that.count |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'delete', |
| | | url:`./record_proxy/api/record/delete`, |
| | | url:`/record_proxy/api/record/delete`, |
| | | params: { |
| | | page: that.currentPage, |
| | | count: that.count |
| | |
| | | let that = this; |
| | | that.$axios({ |
| | | method: 'get', |
| | | url:`./record_proxy/${that.mediaServerId}/api/record/file/list`, |
| | | url:`/record_proxy/${that.mediaServerId}/api/record/file/list`, |
| | | params: { |
| | | app: that.recordFile.app, |
| | | stream: that.recordFile.stream, |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'delete', |
| | | url:`./record_proxy/${that.mediaServerId}/api/record/delete`, |
| | | url:`/record_proxy/${that.mediaServerId}/api/record/delete`, |
| | | params: { |
| | | page: that.currentPage, |
| | | count: that.count |
| | |
| | | that.dateFilesObj = {}; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./record_proxy/${that.mediaServerId}/api/record/date/list`, |
| | | url:`/record_proxy/${that.mediaServerId}/api/record/date/list`, |
| | | params: { |
| | | app: that.recordFile.app, |
| | | stream: that.recordFile.stream |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./record_proxy/${that.mediaServerId}/api/record/file/download/task/add`, |
| | | url:`/record_proxy/${that.mediaServerId}/api/record/file/download/task/add`, |
| | | params: { |
| | | app: that.recordFile.app, |
| | | stream: that.recordFile.stream, |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./record_proxy/${that.mediaServerId}/api/record/file/download/task/list`, |
| | | url:`/record_proxy/${that.mediaServerId}/api/record/file/download/task/list`, |
| | | params: { |
| | | isEnd: isEnd, |
| | | } |
| | |
| | | this.getDeviceListLoading = true; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `./api/device/query/devices`, |
| | | url: `/api/device/query/devices`, |
| | | params: { |
| | | page: this.currentPage, |
| | | count: this.count |
| | |
| | | }).then(() => { |
| | | this.$axios({ |
| | | method: 'delete', |
| | | url: `./api/device/query/devices/${row.deviceId}/delete` |
| | | url: `/api/device/query/devices/${row.deviceId}/delete` |
| | | }).then((res) => { |
| | | this.getDeviceList(); |
| | | }).catch((error) => { |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: './api/device/query/devices/' + itemData.deviceId + '/sync' |
| | | url: '/api/device/query/devices/' + itemData.deviceId + '/sync' |
| | | }).then((res) => { |
| | | console.log("刷新设备结果:" + JSON.stringify(res)); |
| | | if (res.data.code !== 0) { |
| | |
| | | await this.$axios({ |
| | | method: 'get', |
| | | async: false, |
| | | url: `./api/device/query/${deviceId}/sync_status/`, |
| | | url: `/api/device/query/${deviceId}/sync_status/`, |
| | | }).then((res) => { |
| | | if (res.data.code == 0) { |
| | | if (res.data.data.errorMsg !== null) { |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: './api/device/query/transport/' + row.deviceId + '/' + row.streamMode |
| | | url: '/api/device/query/transport/' + row.deviceId + '/' + row.streamMode |
| | | }).then(function (res) { |
| | | |
| | | }).catch(function (e) { |
| | |
| | | this.detailFiles = []; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: './api/gb_record/query/' + this.deviceId + '/' + this.channelId + '?startTime=' + this.startTime + '&endTime=' + this.endTime |
| | | url: '/api/gb_record/query/' + this.deviceId + '/' + this.channelId + '?startTime=' + this.startTime + '&endTime=' + this.endTime |
| | | }).then((res)=>{ |
| | | this.recordsLoading = false; |
| | | if(res.data.code === 0) { |
| | |
| | | } else { |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: './api/playback/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + this.startTime + '&endTime=' + |
| | | url: '/api/playback/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + this.startTime + '&endTime=' + |
| | | this.endTime |
| | | }).then((res)=> { |
| | | if (res.data.code === 0) { |
| | |
| | | console.log('前端控制:播放'); |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: './api/playback/resume/' + this.streamId |
| | | url: '/api/playback/resume/' + this.streamId |
| | | }).then((res)=> { |
| | | this.$refs["recordVideoPlayer"].play(this.videoUrl) |
| | | }); |
| | |
| | | console.log('前端控制:暂停'); |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: './api/playback/pause/' + this.streamId |
| | | url: '/api/playback/pause/' + this.streamId |
| | | }).then(function (res) {}); |
| | | }, |
| | | gbScale(command){ |
| | | console.log('前端控制:倍速 ' + command); |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `./api/playback/speed/${this.streamId }/${command}` |
| | | url: `/api/playback/speed/${this.streamId }/${command}` |
| | | }).then(function (res) {}); |
| | | }, |
| | | downloadRecord: function (row) { |
| | |
| | | }else { |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: './api/gb_record/download/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + row.startTime + '&endTime=' + |
| | | url: '/api/gb_record/download/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + row.startTime + '&endTime=' + |
| | | row.endTime + '&downloadSpeed=4' |
| | | }).then( (res)=> { |
| | | if (res.data.code === 0) { |
| | |
| | | this.videoUrl = ''; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: './api/gb_record/download/stop/' + this.deviceId + "/" + this.channelId+ "/" + this.streamId |
| | | url: '/api/gb_record/download/stop/' + this.deviceId + "/" + this.channelId+ "/" + this.streamId |
| | | }).then((res)=> { |
| | | if (callback) callback(res) |
| | | }); |
| | |
| | | this.videoUrl = ''; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: './api/playback/stop/' + this.deviceId + "/" + this.channelId + "/" + this.streamId |
| | | url: '/api/playback/stop/' + this.deviceId + "/" + this.channelId + "/" + this.streamId |
| | | }).then(function (res) { |
| | | if (callback) callback() |
| | | }); |
| | |
| | | |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:"./api/user/login", |
| | | url:"/api/user/login", |
| | | params: loginParam |
| | | }).then(function (res) { |
| | | window.clearTimeout(timeoutTask) |
| | |
| | | var that = this; |
| | | that.$axios({ |
| | | method: 'delete', |
| | | url:`./api/platform/delete/${platform.serverGBId}` |
| | | url:`/api/platform/delete/${platform.serverGBId}` |
| | | }).then(function (res) { |
| | | if (res.data.code === 0) { |
| | | that.$message({ |
| | |
| | | |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/platform/query/${that.count}/${that.currentPage}` |
| | | url:`/api/platform/query/${that.count}/${that.currentPage}` |
| | | }).then(function (res) { |
| | | if (res.data.code === 0) { |
| | | that.total = res.data.data.total; |
| | |
| | | this.getDeviceListLoading = true; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `./api/push/list`, |
| | | url: `/api/push/list`, |
| | | params: { |
| | | page: that.currentPage, |
| | | count: that.count, |
| | |
| | | this.getListLoading = true; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: './api/push/getPlayUrl', |
| | | url: '/api/push/getPlayUrl', |
| | | params: { |
| | | app: row.app, |
| | | stream: row.stream, |
| | |
| | | let that = this; |
| | | that.$axios({ |
| | | method: "post", |
| | | url: "./api/push/stop", |
| | | url: "/api/push/stop", |
| | | params: { |
| | | app: row.app, |
| | | streamId: row.stream |
| | |
| | | let that = this; |
| | | that.$axios({ |
| | | method: "delete", |
| | | url: "./api/push/remove_form_gb", |
| | | url: "/api/push/remove_form_gb", |
| | | data: row |
| | | }).then((res) => { |
| | | if (res.data.code === 0) { |
| | |
| | | let that = this; |
| | | that.$axios({ |
| | | method: "delete", |
| | | url: "./api/push/batchStop", |
| | | url: "/api/push/batchStop", |
| | | data: { |
| | | gbStreams: this.multipleSelection |
| | | } |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/proxy/list`, |
| | | url:`/api/proxy/list`, |
| | | params: { |
| | | page: that.currentPage, |
| | | count: that.count |
| | |
| | | addOnvif: function(){ |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/onvif/search?timeout=3000`, |
| | | url:`/api/onvif/search?timeout=3000`, |
| | | }).then((res) =>{ |
| | | if (res.data.code === 0 ){ |
| | | if (res.data.data.length > 0) { |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/push/getPlayUrl`, |
| | | url:`/api/push/getPlayUrl`, |
| | | params: { |
| | | app: row.app, |
| | | stream: row.stream, |
| | |
| | | let that = this; |
| | | that.$axios({ |
| | | method:"delete", |
| | | url:"./api/proxy/del", |
| | | url:"/api/proxy/del", |
| | | params:{ |
| | | app: row.app, |
| | | stream: row.stream |
| | |
| | | this.$set(row, 'startBtnLoading', true) |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/proxy/start`, |
| | | url:`/api/proxy/start`, |
| | | params: { |
| | | app: row.app, |
| | | stream: row.stream |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/proxy/stop`, |
| | | url:`/api/proxy/stop`, |
| | | params: { |
| | | app: row.app, |
| | | stream: row.stream |
| | |
| | | this.getUserListLoading = true; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `./api/user/users`, |
| | | url: `/api/user/users`, |
| | | params: { |
| | | page: that.currentPage, |
| | | count: that.count |
| | |
| | | }).then(() => { |
| | | this.$axios({ |
| | | method: 'delete', |
| | | url: `./api/user/delete?id=${row.id}` |
| | | url: `/api/user/delete?id=${row.id}` |
| | | }).then((res) => { |
| | | this.getUserList(); |
| | | }).catch((error) => { |
| | |
| | | if (typeof (this.$route.params.deviceId) == "undefined") return; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `./api/device/query/devices/${this.$route.params.deviceId}/channels`, |
| | | url: `/api/device/query/devices/${this.$route.params.deviceId}/channels`, |
| | | params: { |
| | | page: that.currentPage, |
| | | count: that.count, |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: './api/play/start/' + deviceId + '/' + channelId |
| | | url: '/api/play/start/' + deviceId + '/' + channelId |
| | | }).then(function (res) { |
| | | console.log(res) |
| | | that.isLoging = false; |
| | |
| | | var that = this; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: './api/play/stop/' + this.deviceId + "/" + itemData.channelId |
| | | url: '/api/play/stop/' + this.deviceId + "/" + itemData.channelId |
| | | }).then(function (res) { |
| | | that.initData(); |
| | | }).catch(function (error) { |
| | |
| | | if (!this.showTree) { |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `./api/device/query/sub_channels/${this.deviceId}/${this.parentChannelId}/channels`, |
| | | url: `/api/device/query/sub_channels/${this.deviceId}/${this.parentChannelId}/channels`, |
| | | params: { |
| | | page: this.currentPage, |
| | | count: this.count, |
| | |
| | | }else { |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `./api/device/query/tree/channel/${this.deviceId}`, |
| | | url: `/api/device/query/tree/channel/${this.deviceId}`, |
| | | params: { |
| | | parentId: this.parentChannelId, |
| | | page: this.currentPage, |
| | |
| | | updateChannel: function (row) { |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: `./api/device/query/channel/update/${this.deviceId}`, |
| | | url: `/api/device/query/channel/update/${this.deviceId}`, |
| | | params: row |
| | | }).then(function (res) { |
| | | console.log(JSON.stringify(res)); |
| | |
| | | getSystemInfo: function (){ |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `./api/server/system/info`, |
| | | url: `/api/server/system/info`, |
| | | }).then( (res)=> { |
| | | if (res.data.code === 0) { |
| | | this.$refs.consoleCPU.setData(res.data.data.cpu) |
| | |
| | | getLoad: function (){ |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `./api/server/media_server/load`, |
| | | url: `/api/server/media_server/load`, |
| | | }).then( (res)=> { |
| | | if (res.data.code === 0) { |
| | | this.$refs.consoleNodeLoad.setData(res.data.data) |
| | |
| | | getResourceInfo: function (){ |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `./api/server/resource/info`, |
| | | url: `/api/server/resource/info`, |
| | | }).then( (res)=> { |
| | | if (res.data.code === 0) { |
| | | this.$refs.consoleResource.setData(res.data.data) |
| | |
| | | |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `./api/server/system/configInfo`, |
| | | url: `/api/server/system/configInfo`, |
| | | }).then( (res)=> { |
| | | console.log(res) |
| | | if (res.data.code === 0) { |
| | |
| | | var that = this; |
| | | await that.$axios({ |
| | | method: 'get', |
| | | url:`./api/platform/exit/${deviceGbId}` |
| | | url:`/api/platform/exit/${deviceGbId}` |
| | | }).then(function (res) { |
| | | result = res.data; |
| | | }).catch(function (error) { |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/platform/query/10000/1` |
| | | url:`/api/platform/query/10000/1` |
| | | }).then(function (res) { |
| | | that.platformList = res.data.data.list; |
| | | }).catch(function (error) { |
| | |
| | | if (that.proxyParam.mediaServerId !== "auto"){ |
| | | that.$axios({ |
| | | method: 'get', |
| | | url:`./api/proxy/ffmpeg_cmd/list`, |
| | | url:`/api/proxy/ffmpeg_cmd/list`, |
| | | params: { |
| | | mediaServerId: that.proxyParam.mediaServerId |
| | | } |
| | |
| | | this.noneReaderHandler(); |
| | | this.$axios({ |
| | | method: 'post', |
| | | url:`./api/proxy/save`, |
| | | url:`/api/proxy/save`, |
| | | data: this.proxyParam |
| | | }).then((res)=> { |
| | | this.dialogLoading = false; |
| | |
| | | var that = this; |
| | | await that.$axios({ |
| | | method: 'get', |
| | | url:`./api/platform/exit/${deviceGbId}` |
| | | url:`/api/platform/exit/${deviceGbId}` |
| | | }).then(function (res) { |
| | | result = res.data; |
| | | }).catch(function (error) { |
| | |
| | | getProgress(){ |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/device/query/${this.deviceId}/sync_status/`, |
| | | url:`/api/device/query/${this.deviceId}/sync_status/`, |
| | | }).then((res) => { |
| | | if (res.data.code === 0) { |
| | | if (!this.syncFlag) { |
| | |
| | | onSubmit: function () { |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: "./api/user/add", |
| | | url: "/api/user/add", |
| | | params: { |
| | | username: this.username, |
| | | password: this.password, |
| | |
| | | |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: "./api/role/all" |
| | | url: "/api/role/all" |
| | | }).then((res) => { |
| | | this.loading = true; |
| | | if (res.data.code === 0) { |
| | |
| | | console.log(this.form); |
| | | this.$axios({ |
| | | method:"post", |
| | | url:`./api/platform/catalog/${!this.isEdit? "add":"edit"}`, |
| | | url:`/api/platform/catalog/${!this.isEdit? "add":"edit"}`, |
| | | data: this.form |
| | | }).then((res)=> { |
| | | if (res.data.code === 0) { |
| | |
| | | onSubmit: function () { |
| | | this.$axios({ |
| | | method: 'post', |
| | | url:"./api/user/changePassword", |
| | | url:"/api/user/changePassword", |
| | | params: { |
| | | oldPassword: crypto.createHash('md5').update(this.oldPassword, "utf8").digest('hex'), |
| | | password: this.newPassword |
| | |
| | | onSubmit: function () { |
| | | this.$axios({ |
| | | method: 'post', |
| | | url:"./api/user/changePasswordForAdmin", |
| | | url:"/api/user/changePasswordForAdmin", |
| | | params: { |
| | | password: this.newPassword, |
| | | userId: this.form.id, |
| | |
| | | onSubmit: function () { |
| | | this.$axios({ |
| | | method: 'post', |
| | | url:"./api/user/changePushKey", |
| | | url:"/api/user/changePushKey", |
| | | params: { |
| | | pushKey: this.newPushKey, |
| | | userId: this.form.id, |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: './api/play/start/' + deviceId + '/' + channelId |
| | | url: '/api/play/start/' + deviceId + '/' + channelId |
| | | }).then(function (res) { |
| | | that.isLoging = false; |
| | | if (res.data.code === 0) { |
| | |
| | | |
| | | this.$axios({ |
| | | method:"post", |
| | | url:"./api/platform/update_channel_for_gb", |
| | | url:"/api/platform/update_channel_for_gb", |
| | | data:{ |
| | | platformId: that.platformId, |
| | | channelReduces: that.chooseData |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method:"get", |
| | | url:`./api/platform/catalog`, |
| | | url:`/api/platform/catalog`, |
| | | params: { |
| | | platformId: that.platformId, |
| | | parentId: parentId |
| | |
| | | removeCatalog: function (id, node){ |
| | | this.$axios({ |
| | | method:"delete", |
| | | url:`./api/platform/catalog/del`, |
| | | url:`/api/platform/catalog/del`, |
| | | params: { |
| | | id: id, |
| | | platformId: this.platformId, |
| | |
| | | setDefaultCatalog: function (id){ |
| | | this.$axios({ |
| | | method:"post", |
| | | url:`./api/platform/catalog/default/update`, |
| | | url:`/api/platform/catalog/default/update`, |
| | | params: { |
| | | platformId: this.platformId, |
| | | catalogId: id, |
| | |
| | | onClick: () => { |
| | | this.$axios({ |
| | | method:"delete", |
| | | url:"./api/platform/catalog/relation/del", |
| | | url:"/api/platform/catalog/relation/del", |
| | | data: data |
| | | }).then((res)=>{ |
| | | console.log("移除成功") |
| | |
| | | this.getCatalogFromUser((catalogId)=> { |
| | | this.$axios({ |
| | | method:"post", |
| | | url:"./api/platform/update_channel_for_gb", |
| | | url:"/api/platform/update_channel_for_gb", |
| | | data:{ |
| | | platformId: this.platformId, |
| | | all: all, |
| | |
| | | |
| | | this.$axios({ |
| | | method:"delete", |
| | | url:"./api/platform/del_channel_for_gb", |
| | | url:"/api/platform/del_channel_for_gb", |
| | | data:{ |
| | | platformId: this.platformId, |
| | | all: all, |
| | |
| | | |
| | | this.$axios({ |
| | | method:"get", |
| | | url:`./api/platform/channel_list`, |
| | | url:`/api/platform/channel_list`, |
| | | params: { |
| | | page: that.currentPage, |
| | | count: that.count, |
| | |
| | | }).then(() => { |
| | | this.$axios({ |
| | | method:"delete", |
| | | url:"./api/platform/del_channel_for_gb", |
| | | url:"/api/platform/del_channel_for_gb", |
| | | data:{ |
| | | platformId: this.platformId, |
| | | channelReduces: this.multipleSelection |
| | |
| | | |
| | | this.$axios({ |
| | | method: "post", |
| | | url: "./api/platform/update_channel_for_gb", |
| | | url: "/api/platform/update_channel_for_gb", |
| | | data: { |
| | | platformId: this.platformId, |
| | | channelReduces: this.multipleSelection, |
| | |
| | | this.getCatalogFromUser((catalogId)=>{ |
| | | this.$axios({ |
| | | method:"post", |
| | | url:"./api/gbStream/add", |
| | | url:"/api/gbStream/add", |
| | | data:{ |
| | | platformId: this.platformId, |
| | | catalogId: catalogId, |
| | |
| | | |
| | | this.$axios({ |
| | | method:"delete", |
| | | url:"./api/gbStream/del", |
| | | url:"/api/gbStream/del", |
| | | data:{ |
| | | platformId: this.platformId, |
| | | all: all, |
| | |
| | | |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/gbStream/list`, |
| | | url:`/api/gbStream/list`, |
| | | params: { |
| | | page: that.currentPage, |
| | | count: that.count, |
| | |
| | | }).then(() => { |
| | | this.$axios({ |
| | | method:"delete", |
| | | url:"./api/gbStream/del", |
| | | url:"/api/gbStream/del", |
| | | data:{ |
| | | platformId: this.platformId, |
| | | gbStreams: this.multipleSelection, |
| | |
| | | this.getCatalogFromUser((catalogId)=>{ |
| | | this.$axios({ |
| | | method:"post", |
| | | url:"./api/gbStream/add", |
| | | url:"/api/gbStream/add", |
| | | data:{ |
| | | platformId: this.platformId, |
| | | catalogId: catalogId, |
| | |
| | | this.form.mobilePositionSubmissionInterval = this.form.mobilePositionSubmissionInterval||0 |
| | | this.$axios({ |
| | | method: 'post', |
| | | url:`./api/device/query/device/${this.isEdit?'update':'add'}/`, |
| | | url:`/api/device/query/device/${this.isEdit?'update':'add'}/`, |
| | | params: this.form |
| | | }).then((res) => { |
| | | console.log(res.data) |
| | |
| | | if (tab.name === "codec") { |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: './zlm/' +this.mediaServerId+ '/index/api/getMediaInfo?vhost=__defaultVhost__&schema=rtsp&app='+ this.app +'&stream='+ this.streamId |
| | | url: '/zlm/' +this.mediaServerId+ '/index/api/getMediaInfo?vhost=__defaultVhost__&schema=rtsp&app='+ this.app +'&stream='+ this.streamId |
| | | }).then(function (res) { |
| | | that.tracksLoading = false; |
| | | if (res.data.code == 0 && res.data.tracks) { |
| | |
| | | this.$refs[this.activePlayer].pause() |
| | | that.$axios({ |
| | | method: 'post', |
| | | url: './api/play/convert/' + that.streamId |
| | | url: '/api/play/convert/' + that.streamId |
| | | }).then(function (res) { |
| | | if (res.data.code === 0) { |
| | | that.convertKey = res.data.key; |
| | |
| | | that.$refs.videoPlayer.pause() |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: './api/play/convertStop/' + this.convertKey |
| | | url: '/api/play/convertStop/' + this.convertKey |
| | | }).then(function (res) { |
| | | if (res.data.code == 0) { |
| | | console.log(res.data.msg) |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: './api/ptz/control/' + this.deviceId + '/' + this.channelId + '?command=' + command + '&horizonSpeed=' + this.controSpeed + '&verticalSpeed=' + this.controSpeed + '&zoomSpeed=' + this.controSpeed |
| | | url: '/api/ptz/control/' + this.deviceId + '/' + this.channelId + '?command=' + command + '&horizonSpeed=' + this.controSpeed + '&verticalSpeed=' + this.controSpeed + '&zoomSpeed=' + this.controSpeed |
| | | }).then(function (res) {}); |
| | | }, |
| | | //////////////////////播放器事件处理////////////////////////// |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: './api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=0¶meter2=' + presetPos + '&combindCode2=0' |
| | | url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=0¶meter2=' + presetPos + '&combindCode2=0' |
| | | }).then(function (res) {}); |
| | | }, |
| | | setSpeedOrTime: function (cmdCode, groupNum, parameter) { |
| | |
| | | console.log('前端控制:0x' + cmdCode.toString(16) + ' 0x' + groupNum.toString(16) + ' 0x' + parameter2.toString(16) + ' 0x' + combindCode2.toString(16)); |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: './api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=' + groupNum + '¶meter2=' + parameter2 + '&combindCode2=' + combindCode2 |
| | | url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=' + groupNum + '¶meter2=' + parameter2 + '&combindCode2=' + combindCode2 |
| | | }).then(function (res) {}); |
| | | }, |
| | | setCommand: function (cmdCode, groupNum, parameter) { |
| | |
| | | console.log('前端控制:0x' + cmdCode.toString(16) + ' 0x' + groupNum.toString(16) + ' 0x' + parameter.toString(16) + ' 0x0'); |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: './api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=' + groupNum + '¶meter2=' + parameter + '&combindCode2=0' |
| | | url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=' + groupNum + '¶meter2=' + parameter + '&combindCode2=0' |
| | | }).then(function (res) {}); |
| | | }, |
| | | copyUrl: function (dropdownItem){ |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method:"get", |
| | | url:`./api/platform/catalog`, |
| | | url:`/api/platform/catalog`, |
| | | params: { |
| | | platformId: that.platformId, |
| | | parentId: parentId |
| | |
| | | if (node.level === 0) { |
| | | this.$axios({ |
| | | method:"get", |
| | | url:`./api/platform/info/` + this.platformId, |
| | | url:`/api/platform/info/` + this.platformId, |
| | | }) |
| | | .then((res)=> { |
| | | if (res.data.code === 0) { |
| | |
| | | console.log(this.form); |
| | | this.$axios({ |
| | | method:"post", |
| | | url:`./api/platform/catalog/${!this.isEdit? "add":"edit"}`, |
| | | url:`/api/platform/catalog/${!this.isEdit? "add":"edit"}`, |
| | | data: this.form |
| | | }) |
| | | .then((res)=> { |
| | |
| | | console.log(this.form); |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/onvif/rtsp`, |
| | | url:`/api/onvif/rtsp`, |
| | | params: { |
| | | hostname: this.form.hostName, |
| | | timeout: 3000, |
| | |
| | | showDialog: false, |
| | | isLoging: false, |
| | | onSubmit_text: "立即创建", |
| | | saveUrl: "./api/platform/save", |
| | | saveUrl: "/api/platform/save", |
| | | |
| | | platform: { |
| | | id: null, |
| | |
| | | this.saveUrl = "/api/platform/add"; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/platform/server_config` |
| | | url:`/api/platform/server_config` |
| | | }).then(function (res) { |
| | | console.log(res); |
| | | if (res.data.code === 0) { |
| | |
| | | var that = this; |
| | | await that.$axios({ |
| | | method: 'get', |
| | | url:`./api/platform/exit/${deviceGbId}`}) |
| | | url:`/api/platform/exit/${deviceGbId}`}) |
| | | .then(function (res) { |
| | | if (res.data.code === 0) { |
| | | result = res.data.data; |
| | |
| | | if (this.edit) { |
| | | this.$axios({ |
| | | method:"post", |
| | | url:`./api/push/save_to_gb`, |
| | | url:`/api/push/save_to_gb`, |
| | | data: this.proxyParam |
| | | }).then( (res) => { |
| | | if (res.data.code === 0) { |
| | |
| | | }else { |
| | | this.$axios({ |
| | | method:"post", |
| | | url:`./api/push/add`, |
| | | url:`/api/push/add`, |
| | | data: this.proxyParam |
| | | }).then( (res) => { |
| | | if (res.data.code === 0) { |
| | |
| | | var that = this; |
| | | await that.$axios({ |
| | | method:"get", |
| | | url:`./api/platform/exit/${deviceGbId}` |
| | | url:`/api/platform/exit/${deviceGbId}` |
| | | }).then(function (res) { |
| | | result = res.data; |
| | | }).catch(function (error) { |
| | |
| | | onSubmit: function () { |
| | | console.log("onSubmit"); |
| | | this.isLoging = true; |
| | | let url = `./api/position/history/${this.channel.deviceId}?start=${this.searchFrom}&end=${this.searchTo}`; |
| | | let url = `/api/position/history/${this.channel.deviceId}?start=${this.searchFrom}&end=${this.searchTo}`; |
| | | if (this.channel.channelId) { |
| | | url+="&channelId=${this.channel.channelId}" |
| | | } |
| | |
| | | getProgress: function (callback){ |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `./api/gb_record/download/progress/${this.deviceId}/${this.channelId}/${this.stream}` |
| | | url: `/api/gb_record/download/progress/${this.deviceId}/${this.channelId}/${this.stream}` |
| | | }).then((res)=> { |
| | | console.log(res) |
| | | if (res.data.code === 0) { |
| | |
| | | stopDownloadRecord: function (callback) { |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: './api/gb_record/download/stop/' + this.deviceId + "/" + this.channelId+ "/" + this.stream |
| | | url: '/api/gb_record/download/stop/' + this.deviceId + "/" + this.channelId+ "/" + this.stream |
| | | }).then((res)=> { |
| | | if (callback) callback(res) |
| | | }); |
| | |
| | | getFileDownload: function (){ |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./record_proxy/${this.mediaServerId}/api/record/file/download/task/add`, |
| | | url:`/record_proxy/${this.mediaServerId}/api/record/file/download/task/add`, |
| | | params: { |
| | | app: this.app, |
| | | stream: this.stream, |
| | |
| | | getProgressForFile: function (callback){ |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./record_proxy/${this.mediaServerId}/api/record/file/download/task/list`, |
| | | url:`/record_proxy/${this.mediaServerId}/api/record/file/download/task/list`, |
| | | params: { |
| | | app: this.app, |
| | | stream: this.stream, |
| | |
| | | this.loading = true |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: './api/play/start/' + deviceId + '/' + channelId |
| | | url: '/api/play/start/' + deviceId + '/' + channelId |
| | | }).then(function (res) { |
| | | if (res.data.code === 0 && res.data.data) { |
| | | let videoUrl; |
| | |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: './api/play/start/' + deviceId + '/' + channelId |
| | | url: '/api/play/start/' + deviceId + '/' + channelId |
| | | }).then(function (res) { |
| | | that.isLoging = false; |
| | | if (res.data.code === 0) { |
| | |
| | | getDeviceList(currentPage, count, callback, errorCallback){ |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/device/query/devices`, |
| | | url:`/api/device/query/devices`, |
| | | params: { |
| | | page: currentPage, |
| | | count: count |
| | |
| | | getDevice(deviceId, callback, errorCallback){ |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/device/query/devices/${deviceId}`, |
| | | url:`/api/device/query/devices/${deviceId}`, |
| | | }).then((res) => { |
| | | if (typeof (callback) == "function") callback(res.data) |
| | | }).catch((error) => { |
| | |
| | | getChanel(isCatalog, catalogUnderDevice, deviceId, currentPage, count, callback, errorCallback) { |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `./api/device/query/devices/${deviceId}/channels`, |
| | | url: `/api/device/query/devices/${deviceId}/channels`, |
| | | params:{ |
| | | page: currentPage, |
| | | count: count, |
| | |
| | | getSubChannel(isCatalog, deviceId, channelId, currentPage, count, callback, errorCallback) { |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `./api/device/query/sub_channels/${deviceId}/${channelId}/channels`, |
| | | url: `/api/device/query/sub_channels/${deviceId}/${channelId}/channels`, |
| | | params:{ |
| | | page: currentPage, |
| | | count: count, |
| | |
| | | } |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `./api/device/query/tree/${deviceId}`, |
| | | url: `/api/device/query/tree/${deviceId}`, |
| | | params:{ |
| | | page: currentPage, |
| | | count: count, |
| | |
| | | getOnlineMediaServerList(callback){ |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/server/media_server/online/list`, |
| | | url:`/api/server/media_server/online/list`, |
| | | }).then((res) => { |
| | | if (typeof (callback) == "function") callback(res.data) |
| | | }).catch((error) => { |
| | |
| | | getMediaServerList(callback){ |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/server/media_server/list`, |
| | | url:`/api/server/media_server/list`, |
| | | }).then(function (res) { |
| | | if (typeof (callback) == "function") callback(res.data) |
| | | }).catch(function (error) { |
| | |
| | | getMediaServer(id, callback){ |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/server/media_server/one/` + id, |
| | | url:`/api/server/media_server/one/` + id, |
| | | }).then(function (res) { |
| | | if (typeof (callback) == "function") callback(res.data) |
| | | }).catch(function (error) { |
| | |
| | | checkServer(param, callback){ |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/server/media_server/check`, |
| | | url:`/api/server/media_server/check`, |
| | | params: { |
| | | ip: param.ip, |
| | | port: param.httpPort, |
| | |
| | | checkRecordServer(param, callback){ |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`./api/server/media_server/record/check`, |
| | | url:`/api/server/media_server/record/check`, |
| | | params: { |
| | | ip: param.ip, |
| | | port: param.recordAssistPort |
| | |
| | | addServer(param, callback){ |
| | | this.$axios({ |
| | | method: 'post', |
| | | url:`./api/server/media_server/save`, |
| | | url:`/api/server/media_server/save`, |
| | | data: param |
| | | }).then(function (res) { |
| | | if (typeof (callback) == "function") callback(res.data) |
| | |
| | | delete(id, callback) { |
| | | this.$axios({ |
| | | method: 'delete', |
| | | url:`./api/server/media_server/delete`, |
| | | url:`/api/server/media_server/delete`, |
| | | params: { |
| | | id: id |
| | | } |
| | |
| | | Vue.use(ElementUI); |
| | | Vue.use(VueCookies); |
| | | Vue.use(VueClipboards); |
| | | Vue.prototype.$axios = axios; |
| | | |
| | | Vue.prototype.$notify = Notification; |
| | | Vue.use(Contextmenu); |
| | | Vue.use(VCharts); |
| | | |
| | | axios.defaults.baseURL = (process.env.NODE_ENV === 'development') ? process.env.BASE_API : ""; |
| | | |
| | | axios.defaults.baseURL = (process.env.NODE_ENV === 'development') ? process.env.BASE_API : (window.baseUrl?window.baseUrl:""); |
| | | axios.defaults.withCredentials = true; |
| | | // api 返回401自动回登陆页面 |
| | | axios.interceptors.response.use(function (response) { |
| | | // 对响应数据做点什么 |
| | |
| | | } |
| | | return Promise.reject(error); |
| | | }); |
| | | |
| | | Vue.prototype.$axios = axios; |
| | | Vue.prototype.$cookies.config(60*30); |
| | | |
| | | new Vue({ |
File was renamed from web_src/static/js/mapConfig.js |
| | |
| | | |
| | | window.baseUrl = "" |
| | | |
| | | // map组件全局参数, 注释此内容可以关闭地图功能 |
| | | window.mapParam = { |
| | | // 开启/关闭地图功能 |